giftCardInfo
query
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Query a single customer's gift cards, including their gift card number, current balance, expiration date, and current status.
Arguments
customer Id
Return
Current status of gift card
Gift card code
Time to create this record
Current balance of gift card
Gift card expiration time
The original value of gift card
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
query giftCard Info
Code
query {
giftCardInfo(customerId: "gid://shopline/Customer/4602226680") {
expiryDate
code
currentBalance
originalValue
createdAt
cardStatus
}
}
Response
{
"data": {
"giftCardInfo": [
{
"currentBalance": "5000",
"expiryDate": null,
"originalValue": "5000",
"cardStatus": "ACTIVE",
"code": "gid://shopline/GiftCard/c94dc01491670a26",
"createdAt": "2024-07-25T05:25:12Z"
},
{
"cardStatus": "ACTIVE",
"code": "gid://shopline/GiftCard/e47ec17f34f11dad",
"createdAt": "2024-07-25T05:25:12Z",
"currentBalance": "5000",
"expiryDate": null,
"originalValue": "5000"
}
]
}
}
Was this article helpful to you?