Batch create passes
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
passes: [
{
templateOverrides: {},
payload: '<string>',
loyaltyState: {},
notificationMessage: '<string>',
externalId: '<string>',
activationDate: '2023-11-07T05:31:56Z',
entryState: {},
customer: {
firstName: '<string>',
lastName: '<string>',
emailAddress: 'jsmith@example.com',
personalId: '<string>',
lookupSource: '<string>',
mobileNumber: '<string>',
isNew: true
},
expirationDate: '2023-11-07T05:31:56Z'
}
],
programId: '<string>',
options: {stopOnError: true, skipDuplicates: true}
})
};
fetch('https://api.platform.getstell.com/v1/passes/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.getstell.com/v1/passes/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"passes": [
{
"templateOverrides": {},
"payload": "<string>",
"loyaltyState": {},
"notificationMessage": "<string>",
"externalId": "<string>",
"activationDate": "2023-11-07T05:31:56Z",
"entryState": {},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"emailAddress": "jsmith@example.com",
"personalId": "<string>",
"lookupSource": "<string>",
"mobileNumber": "<string>",
"isNew": true
},
"expirationDate": "2023-11-07T05:31:56Z"
}
],
"programId": "<string>",
"options": {
"stopOnError": true,
"skipDuplicates": true
}
}
'import requests
url = "https://api.platform.getstell.com/v1/passes/batch"
payload = {
"passes": [
{
"templateOverrides": {},
"payload": "<string>",
"loyaltyState": {},
"notificationMessage": "<string>",
"externalId": "<string>",
"activationDate": "2023-11-07T05:31:56Z",
"entryState": {},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"emailAddress": "jsmith@example.com",
"personalId": "<string>",
"lookupSource": "<string>",
"mobileNumber": "<string>",
"isNew": True
},
"expirationDate": "2023-11-07T05:31:56Z"
}
],
"programId": "<string>",
"options": {
"stopOnError": True,
"skipDuplicates": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"summary": {
"total": 123,
"processingTimeMs": 123,
"failed": 123,
"succeeded": 123,
"skipped": 123
},
"results": [
{
"index": 123,
"passId": "<string>",
"externalId": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
]
},
"requestId": "<string>"
}{
"requestId": "<string>",
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request parameters",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "FORBIDDEN",
"message": "Access denied to this resource",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal server error occurred",
"details": {}
}
}Passes
Batch create passes
Create multiple passes in a single request. Supports up to 1000 passes per call with automatic duplicate detection.
POST
https://api.platform.getstell.com
/
v1
/
passes
/
batch
Batch create passes
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
passes: [
{
templateOverrides: {},
payload: '<string>',
loyaltyState: {},
notificationMessage: '<string>',
externalId: '<string>',
activationDate: '2023-11-07T05:31:56Z',
entryState: {},
customer: {
firstName: '<string>',
lastName: '<string>',
emailAddress: 'jsmith@example.com',
personalId: '<string>',
lookupSource: '<string>',
mobileNumber: '<string>',
isNew: true
},
expirationDate: '2023-11-07T05:31:56Z'
}
],
programId: '<string>',
options: {stopOnError: true, skipDuplicates: true}
})
};
fetch('https://api.platform.getstell.com/v1/passes/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.getstell.com/v1/passes/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"passes": [
{
"templateOverrides": {},
"payload": "<string>",
"loyaltyState": {},
"notificationMessage": "<string>",
"externalId": "<string>",
"activationDate": "2023-11-07T05:31:56Z",
"entryState": {},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"emailAddress": "jsmith@example.com",
"personalId": "<string>",
"lookupSource": "<string>",
"mobileNumber": "<string>",
"isNew": true
},
"expirationDate": "2023-11-07T05:31:56Z"
}
],
"programId": "<string>",
"options": {
"stopOnError": true,
"skipDuplicates": true
}
}
'import requests
url = "https://api.platform.getstell.com/v1/passes/batch"
payload = {
"passes": [
{
"templateOverrides": {},
"payload": "<string>",
"loyaltyState": {},
"notificationMessage": "<string>",
"externalId": "<string>",
"activationDate": "2023-11-07T05:31:56Z",
"entryState": {},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"emailAddress": "jsmith@example.com",
"personalId": "<string>",
"lookupSource": "<string>",
"mobileNumber": "<string>",
"isNew": True
},
"expirationDate": "2023-11-07T05:31:56Z"
}
],
"programId": "<string>",
"options": {
"stopOnError": True,
"skipDuplicates": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"summary": {
"total": 123,
"processingTimeMs": 123,
"failed": 123,
"succeeded": 123,
"skipped": 123
},
"results": [
{
"index": 123,
"passId": "<string>",
"externalId": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
]
},
"requestId": "<string>"
}{
"requestId": "<string>",
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request parameters",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "FORBIDDEN",
"message": "Access denied to this resource",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal server error occurred",
"details": {}
}
}Authorizations
API key authentication. Include your API key as a Bearer token.
Example: Bearer sk_prod_xxxxxx
Get your API key from the Stell Dashboard.
Body
application/json
Request to batch create multiple passes.
Array of passes to create (1-1000 items)
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
ID of the program to create passes for (all passes in batch use the same program)
Minimum string length:
1Batch processing options
Show child attributes
Show child attributes
⌘I