Update program
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: '<string>',
merchantId: '<string>',
displayName: '<string>',
name: '<string>',
description: '<string>'
})
};
fetch('https://api.platform.getstell.com/v1/programs/{programId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.platform.getstell.com/v1/programs/{programId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"merchantId": "<string>",
"displayName": "<string>",
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.platform.getstell.com/v1/programs/{programId}"
payload = {
"country": "<string>",
"merchantId": "<string>",
"displayName": "<string>",
"name": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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
Update program
Update an existing program. Supports partial updates.
PATCH
https://api.platform.getstell.com
/
v1
/
programs
/
{programId}
Update program
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: '<string>',
merchantId: '<string>',
displayName: '<string>',
name: '<string>',
description: '<string>'
})
};
fetch('https://api.platform.getstell.com/v1/programs/{programId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.platform.getstell.com/v1/programs/{programId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"merchantId": "<string>",
"displayName": "<string>",
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.platform.getstell.com/v1/programs/{programId}"
payload = {
"country": "<string>",
"merchantId": "<string>",
"displayName": "<string>",
"name": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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.
Path Parameters
Body
application/json
Fields to update on an existing program.
ISO 3166-1 alpha-2 country code for the program operating country
Pattern:
^[A-Z]{2}$Update merchant association (can be set or cleared)
Public-facing program name (max 100 characters)
Maximum string length:
100Internal program name (2-100 characters)
Required string length:
2 - 100Program description shown to customers (max 500 characters)
Maximum string length:
500Update program lifecycle status
Available options:
DRAFT, PUBLISHED, DELETED, ARCHIVED Was this page helpful?