Skip to main content
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>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT access token obtained from POST /v2/token.

Headers

authorization
string | null

Path Parameters

programId
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

customerId
required
Required string length: 24
Pattern: ^[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.

consents
ConsentInput · object[]
required
Minimum array length: 1
policyVersion
string
required
Minimum string length: 1

Response

Successful Response