Skip to main content
POST
/
v2
/
giftcards
/
programs
/
{programId}
/
analytics
/
export
Export Analytics
curl --request POST \
  --url https://api.loyalty.dog/v2/giftcards/programs/{programId}/analytics/export \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "format": "csv",
  "period": "<string>",
  "from": "<string>",
  "to": "<string>",
  "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
format
string
default:csv
Pattern: ^(csv|excel|json|pdf)$
period
string | null
Pattern: ^(7d|30d|90d|12m|custom)$
from
string | null
to
string | null
metrics
string[]
includePrivacyNotice
boolean
default:false

Response

Successful Response