Record Customer Consents
curl --request POST \
--url https://api.loyalty.dog/v2/loyalty/programs/{programId}/customers/{customerId}/consents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"consents": [
{
"granted": true
}
],
"policyVersion": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({consents: [{granted: true}], policyVersion: '<string>'})
};
fetch('https://api.loyalty.dog/v2/loyalty/programs/{programId}/customers/{customerId}/consents', 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}/customers/{customerId}/consents"
payload = {
"consents": [{ "granted": True }],
"policyVersion": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Loyalty
Record Customer Consents
Record Customer Consents
Creates an immutable consent record for each consent decision in the request. Captures IP address and user-agent at the time of recording for evidentiary purposes.
Consent records are append-only — each call adds new records; existing records are never modified. Use GET to retrieve the current state per consent type.
Path Parameters:
programId: UUID of the loyalty program (merchant)customerId: UUID of the customer
Request Body:
consents: List of consent decisions (consentType,granted,method)policyVersion: Version of the policy document accepted
Returns:
- 201 Created with the list of newly created consent records.
POST
/
v2
/
loyalty
/
programs
/
{programId}
/
customers
/
{customerId}
/
consents
Record Customer Consents
curl --request POST \
--url https://api.loyalty.dog/v2/loyalty/programs/{programId}/customers/{customerId}/consents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"consents": [
{
"granted": true
}
],
"policyVersion": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({consents: [{granted: true}], policyVersion: '<string>'})
};
fetch('https://api.loyalty.dog/v2/loyalty/programs/{programId}/customers/{customerId}/consents', 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}/customers/{customerId}/consents"
payload = {
"consents": [{ "granted": True }],
"policyVersion": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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"
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Body
application/json
Request body for POST /customers/{id}/consents.
Attributes: consents: One or more consent decisions to record. policyVersion: Version of the policy document the customer is consenting to.
Response
Successful Response
