Skip to main content

Gift Card Inquiry

Look up a gift card by the code a customer presents. Returns the balance, status and redemption rules — everything you need to decide what to charge before redeeming.

Endpoint

POST /v1/giftCards/inquiry

:::info Why POST The code is a secret. Sending it in a request body keeps it out of URLs, access logs, proxy logs and browser history. No endpoint in this API accepts a code as a path or query parameter. :::

Headers

HeaderTypeDescriptionRequired
X-Client-IdStringYour client ID✅ Yes
X-Client-SecretStringYour client secret✅ Yes
Content-TypeStringapplication/json✅ Yes

Request Body

FieldTypeDescriptionRequired
codeStringThe digital code the customer presented✅ Yes

Example Request

curl --location 'https://stage-platform-exlr8-incentives.exlr8now.com/v1/giftCards/inquiry' \
--header 'X-Client-Id: YOUR_CLIENT_ID' \
--header 'X-Client-Secret: YOUR_CLIENT_SECRET' \
--header 'Content-Type: application/json' \
--data '{
"code": "GC-7F3A-9K2M-4XQ8"
}'

Response

Successful Response — 200 OK

{
"success": true,
"data": {
"giftCardId": "9b2c4d6e-8f0a-4b1c-9d3e-5f7a1b2c3d4e",
"giftCardTemplateId": "d4c3b2a1-6f5e-4d3c-8b2a-1f0e9d8c7b6a",
"status": "ACTIVE",
"currency": "INR",
"initialBalance": 500,
"remainingBalance": 350,
"issuedAt": "2026-08-25T11:30:00Z",
"expiresAt": "2027-08-25T11:30:00Z",
"expired": false,
"minRedemptionAmount": 50,
"allowPartialRedemption": true
}
}

Response Fields

FieldTypeDescription
giftCardIdStringInternal identifier — store it for refunds and voids
giftCardTemplateIdStringThe template this card was issued from
statusStringACTIVE, INACTIVE, EXPIRED or FROZEN
currencyStringInherited from the campaign
initialBalanceNumberFace value at issuance
remainingBalanceNumberWhat is left to spend
issuedAtStringRFC 3339, UTC
expiresAtStringRFC 3339, UTC
expiredBooleanDerived from expiresAt against the current time
minRedemptionAmountNumberFloor on a single partial redemption
allowPartialRedemptionBooleanWhether the card may be spent across several orders

No hashes and no secrets are returned — the response is safe to log, though the request body is not.

Deciding what to charge

The last two fields are the ones your checkout logic turns on.

allowPartialRedemption = true
remainingBalance >= orderTotal → debit orderTotal (if >= minRedemptionAmount)
remainingBalance < orderTotal → debit remainingBalance, collect the rest by other means

allowPartialRedemption = false
→ debit the full remainingBalance, or decline the card

Check expired and status before offering the card at all. A card that is expired or not ACTIVE will be refused at redemption, so catching it here gives the customer a clearer message.

:::caution Redemption rules can come back zeroed minRedemptionAmount and allowPartialRedemption are read from the card's template. If that template cannot be loaded, the inquiry still succeeds but returns both as zero values — 0 and false — rather than failing.

allowPartialRedemption: false is therefore ambiguous: it may mean the template genuinely forbids partial redemption, or that the template could not be read. Treat the conservative reading (debit the full balance) as correct in both cases, and alert if you see it on a template you know allows partials. :::

:::note Inquiry is a snapshot The balance can change between an inquiry and a redemption — another checkout may spend the card in between. Treat the inquiry as guidance for the customer, and let the redemption call be the authority. Redemption re-reads the balance from the primary database and will reject an over-debit regardless of what the inquiry said. :::

Error Responses

Error codeHTTPCause
BAD_REQUEST400Missing code, or an unknown field
GC_INVALID422No card matches this code within your merchant
{
"success": false,
"errCode": "GC_INVALID",
"message": "Gift card is invalid: gift card not found"
}

GC_INVALID covers both a code that does not exist and a code belonging to another merchant — the platform does not distinguish the two.