Skip to main content
POST
/
v2
/
giftcards
/
programs
/
{programId}
/
cards
Creategiftcard
curl --request POST \
  --url https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "initialValue": 5000.005,
  "merchantId": "5eb7cf5a86d9755df3a6c593",
  "customerEmail": "[email protected]",
  "customerPhone": "<string>",
  "customerName": "<string>",
  "senderName": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "isPhysical": false,
  "designTemplate": "<string>",
  "customMessage": "<string>",
  "deliverAt": "2023-11-07T05:31:56Z"
}
'
{
  "id": "5eb7cf5a86d9755df3a6c593",
  "cardNumber": "<string>",
  "balance": "<string>",
  "initialValue": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "activatedAt": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z",
  "suspendedReason": "<string>",
  "suspendedUntil": "2023-11-07T05:31:56Z",
  "suspendedAt": "2023-11-07T05:31:56Z",
  "customerId": "5eb7cf5a86d9755df3a6c593",
  "customerEmail": "<string>",
  "customerPhone": "<string>",
  "customerName": "<string>",
  "merchantId": "5eb7cf5a86d9755df3a6c593",
  "isPhysical": true,
  "designTemplate": "<string>",
  "customMessage": "<string>",
  "lastFourDigits": "<string>",
  "programId": "5eb7cf5a86d9755df3a6c593",
  "card": {
    "serialNumber": "<string>",
    "passTypeIdentifier": "<string>",
    "url": "<string>"
  },
  "senderName": "<string>",
  "merchantName": "<string>",
  "deliverAt": "2023-11-07T05:31:56Z",
  "delivered": false
}

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
initialValue
required
Required range: 0.01 <= x <= 10000
merchantId
string
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

customerEmail
string<email> | null
customerPhone
string<phone> | null
customerName
string | null
Maximum string length: 255
senderName
string | null
Maximum string length: 255
expiresAt
string<date-time> | null
isPhysical
boolean
default:false
designTemplate
string | null
Maximum string length: 100
customMessage
string | null
Maximum string length: 500
deliverAt
string<date-time> | null

Response

Successful Response

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

"5eb7cf5a86d9755df3a6c593"

cardNumber
string
required
balance
string
required
initialValue
string
required
status
enum<string>
required

Gift card status enumeration.

Available options:
pending,
active,
suspended,
expired,
voided,
depleted
createdAt
string<date-time>
required
updatedAt
string<date-time> | null
required
activatedAt
string<date-time> | null
required
expiresAt
string<date-time>
required
suspendedReason
string | null
required
suspendedUntil
string<date-time> | null
required
suspendedAt
string<date-time> | null
required
customerId
string | null
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

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

"5eb7cf5a86d9755df3a6c593"

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

"5eb7cf5a86d9755df3a6c593"

card
PassCard · object
required

The customer card object

Attributes: serialNumber (str): The serial number of the customer pass passTypeIdentifier (str): The pass type identifier of the customer pass url (str): The shareable URL of the customer pass

senderName
string | null
merchantName
string | null
deliverAt
string<date-time> | null
delivered
boolean
default:false