List Loyalty Program Rules
curl --request GET \
--url https://api.loyalty.dog/v2/loyalty/programs/{programId}/rules \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyalty.dog/v2/loyalty/programs/{programId}/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/loyalty/programs/{programId}/rules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "<string>",
"type": "point",
"active": true,
"provider": "<string>",
"name": "<string>",
"description": "<string>",
"stores": [
{
"shopId": "<string>",
"locationId": "<string>"
}
]
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Loyalty
List Loyalty Program Rules
Read point, price, bundle, and deal rules for a program you own.
Returns name, description, active, provider, and store ids only. Ratios, product targets, and prices are not included. Bundle rules are the discount rules.
Query parameters:
type: optional filter, one ofpoint,price,bundle,deal. An unknown value returns 400.
Scopes: ld_* keys need loyalty:read. JWT app keys and legacy tokens are unchanged.
Status codes:
- 200: rule rows for this program
- 400:
typeis not one of the four values - 404: program not found, or it belongs to another merchant
GET
/
v2
/
loyalty
/
programs
/
{programId}
/
rules
List Loyalty Program Rules
curl --request GET \
--url https://api.loyalty.dog/v2/loyalty/programs/{programId}/rules \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyalty.dog/v2/loyalty/programs/{programId}/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/loyalty/programs/{programId}/rules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "<string>",
"type": "point",
"active": true,
"provider": "<string>",
"name": "<string>",
"description": "<string>",
"stores": [
{
"shopId": "<string>",
"locationId": "<string>"
}
]
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Path Parameters
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Query Parameters
Return only this rule type.
Available options:
point, price, bundle, deal 