Look Up Gift Card Balance
curl --request GET \
--url https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/lookup \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/lookup', 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/lookup"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"balance": "25.50",
"status": "pending"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Gift Cards
Look Up Gift Card Balance
Read one gift card’s balance and status by its printed number.
Exact match on a gift-card program the caller owns. The response is balance and status only. It does not return the card number, security code, or customer.
A partial number returns 404. Another merchant’s program returns 404.
This route accepts a normal bearer token. JWT app keys and legacy tokens do not need the Epos Now HMAC headers here. Other gift-card routes still require those headers for JWT and legacy tokens.
Query parameters:
number: printed card number, required, exact match, at most 20 characters.
Scopes: ld_* keys need giftcards:read.
Status codes:
- 200: balance and status
- 400:
numberis missing - 404: card or program not found
GET
/
v2
/
giftcards
/
programs
/
{programId}
/
cards
/
lookup
Look Up Gift Card Balance
curl --request GET \
--url https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/lookup \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/lookup', 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/lookup"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"balance": "25.50",
"status": "pending"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Path Parameters
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Query Parameters
Printed card number. Exact match.
Required string length:
1 - 20