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
customerId ● String
customer Id
Return
cardStatus ● CardStatus
Current status of gift card
More
code ● String
Gift card code
createdAt ● Date
Time to create this record
currentBalance ● UnsignedInt64
Current balance of gift card
expiryDate ● Date
Gift card expiration time
originalValue ● UnsignedInt64
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
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?