Reloadgiftcardbynumber
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/reload-by-number \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cardNumber": "<string>",
"amount": 2500.005
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cardNumber: '<string>', amount: 2500.005})
};
fetch('https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/reload-by-number', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/reload-by-number"
payload = {
"cardNumber": "<string>",
"amount": 2500.005
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "5eb7cf5a86d9755df3a6c593",
"cardNumber": "<string>",
"balance": "<string>",
"initialValue": "<string>",
"status": "pending",
"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
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Gift Cards
Reloadgiftcardbynumber
Reload Gift Card by Card Number
Allows topping up a gift card using the card number instead of the card ID. This is useful for POS/cashier scenarios where the cashier types or scans a card number rather than looking up the internal ID.
Business Rules:
- Same rules as the standard reload endpoint
- Only ACTIVE cards can be reloaded
- Card must not be expired
- Reload amount: 0.01−5,000 per transaction
- Maximum card balance: $10,000
Request Body:
cardNumber: The full card number (up to 20 chars)amount: Amount to add (0.01−5,000)referenceId: External reference ID for tracking (optional)description: Transaction description (optional, defaults to “Gift card reload”)
Status Codes:
- 200: Gift card reloaded successfully
- 400: Cannot reload (inactive, expired, or would exceed max balance)
- 404: Gift card not found
POST
/
v2
/
giftcards
/
programs
/
{programId}
/
cards
/
reload-by-number
Reloadgiftcardbynumber
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/reload-by-number \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cardNumber": "<string>",
"amount": 2500.005
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cardNumber: '<string>', amount: 2500.005})
};
fetch('https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/reload-by-number', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/reload-by-number"
payload = {
"cardNumber": "<string>",
"amount": 2500.005
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "5eb7cf5a86d9755df3a6c593",
"cardNumber": "<string>",
"balance": "<string>",
"initialValue": "<string>",
"status": "pending",
"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
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Path Parameters
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Query Parameters
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Body
application/json
Response
Successful Response
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Gift card status enumeration.
Available options:
pending, active, suspended, expired, voided, depleted Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
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
Show child attributes
Show child attributes
