Skip to main content
POST
/
v2
/
loyalty
/
programs
/
{programId}
/
vouchers
Create Loyalty Program Voucher
curl --request POST \
  --url https://api.loyalty.dog/v2/loyalty/programs/{programId}/vouchers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z",
  "expiresIn": 123,
  "limitPerCustomer": 123,
  "availabilityCount": 123,
  "requireFields": [
    "<string>"
  ],
  "issueBeforeBirthday": 123,
  "discountValue": 123,
  "discountCurrency": "<string>",
  "categories": "<string>",
  "products": "<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"

Body

application/json
name
string
required
description
string | null
startDate
string<date-time> | null
endDate
string<date-time> | null
type
enum<string> | null
Available options:
welcome,
birthday,
other
expiresIn
limitPerCustomer
integer | null
availabilityCount
integer | null
requireFields
string[] | null
issueBeforeBirthday
discountValue
number | null
discountCurrency
string | null
discountType
enum<string> | null
Available options:
fixed,
percent,
other
categories
string | null
products
string | null
priceRule
enum<string> | null
Available options:
min,
max,
none

Response

Successful Response