Create new program
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
country: '<string>',
merchantId: '<string>',
displayName: '<string>',
description: '<string>'
})
};
fetch('https://api.platform.getstell.com/v1/programs', 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/programs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"country": "<string>",
"merchantId": "<string>",
"displayName": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.platform.getstell.com/v1/programs"
payload = {
"name": "<string>",
"country": "<string>",
"merchantId": "<string>",
"displayName": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"type": "LOYALTY_CARD",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "<string>",
"name": "<string>",
"id": "<string>",
"status": "DRAFT",
"updatedAt": "2023-11-07T05:31:56Z",
"country": "<string>",
"displayName": "<string>",
"description": "<string>",
"merchantId": "<string>",
"passTypeIdentifier": "<string>",
"productType": "ENTRY"
},
"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": {}
}
}Programs
Create new program
Create a new loyalty or entry program. The program will be created in DRAFT status and can be published later.
POST
https://api.platform.getstell.com
/
v1
/
programs
Create new program
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
country: '<string>',
merchantId: '<string>',
displayName: '<string>',
description: '<string>'
})
};
fetch('https://api.platform.getstell.com/v1/programs', 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/programs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"country": "<string>",
"merchantId": "<string>",
"displayName": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.platform.getstell.com/v1/programs"
payload = {
"name": "<string>",
"country": "<string>",
"merchantId": "<string>",
"displayName": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"type": "LOYALTY_CARD",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "<string>",
"name": "<string>",
"id": "<string>",
"status": "DRAFT",
"updatedAt": "2023-11-07T05:31:56Z",
"country": "<string>",
"displayName": "<string>",
"description": "<string>",
"merchantId": "<string>",
"passTypeIdentifier": "<string>",
"productType": "ENTRY"
},
"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
Data required to create a new program.
Internal program name (2-100 characters)
Required string length:
2 - 100Pass type determining wallet style and functionality
Available options:
LOYALTY_CARD, STAMP_CARD, ID_CARD, BOARDING_PASS, EVENT_TICKET, COUPON, STORE_CARD, GIFT_CARD, GENERIC_CARD ISO 3166-1 alpha-2 country code for the program operating country
Pattern:
^[A-Z]{2}$ID of the merchant to associate the program with (optional for company-wide programs)
Public-facing program name (max 100 characters)
Maximum string length:
100Program description shown to customers (max 500 characters)
Maximum string length:
500Product tier (ENTRY: basic features, LOYALTY: advanced features)
Available options:
ENTRY, LOYALTY Was this page helpful?