Skip to main content
POST
/
v2
/
giftcards
/
programs
/
{programId}
/
reports
/
schedule
Create Schedule
curl --request POST \
  --url https://api.loyalty.dog/v2/giftcards/programs/{programId}/reports/schedule \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "frequency": "<string>",
  "format": "<string>",
  "recipients": [
    "[email protected]"
  ],
  "dayOfWeek": 3,
  "dayOfMonth": 14,
  "hourUtc": 0,
  "metrics": [
    "<string>"
  ],
  "includePrivacyNotice": false
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT access token obtained from POST /v2/token.

Headers

X-Eposn-Customer-Token
string | null
X-Eposn-Merchant-Token
string | null

Path Parameters

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

"5eb7cf5a86d9755df3a6c593"

Query Parameters

cardId
string | null
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

Body

application/json
name
string
required
Required string length: 1 - 200
frequency
string
required
Pattern: ^(daily|weekly|monthly)$
format
string
required
Pattern: ^(csv|excel|json|pdf)$
recipients
string<email>[]
required
Required array length: 1 - 20 elements
dayOfWeek
integer | null
Required range: 0 <= x <= 6
dayOfMonth
integer | null
Required range: 1 <= x <= 28
hourUtc
integer
default:0
Required range: 0 <= x <= 23
metrics
string[]
includePrivacyNotice
boolean
default:false

Response

Successful Response