Skip to main content
PUT
/
v2
/
templates
/
{templateId}
/
restrictions
Update Pass Template Distribution Restrictions
curl --request PUT \
  --url https://api.loyalty.dog/v2/templates/{templateId}/restrictions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "quantityRestriction": 123,
  "redemptionRestriction": 123,
  "passwordProtection": "<string>",
  "sharingRestriction": true,
  "dateRestriction": "2023-11-07T05:31:56Z"
}
'
{
  "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

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

"5eb7cf5a86d9755df3a6c593"

Body

application/json
quantityRestriction
integer | null
redemptionRestriction
integer | null
passwordProtection
string | null
sharingRestriction
boolean | null
dateRestriction
string<date-time> | null
returningUserRestriction
enum<string> | null
Available options:
user_decides,
show_existing,
create_new
passSharingMethod
enum<string> | null
Available options:
pass,
url,
disabled

Response

Successful Response