Gift Card
Private Gift Card API endpoints
A page of the shop's issued gift cards, newest first.
Query parameters
statuses[]optionalstring[]Only cards in any of these statuses. Values must be distinct.
variant_ids[]optionalinteger[]Only cards of these denominations (product_id). Values must be distinct.
customer_idoptionalintegerOnly cards redeemed by this customer of the shop.
buyer_idoptionalintegerOnly cards bought by this customer of the shop.
queryoptionalstringMatches part of the code, the recipient's name or the recipient's email.
created_at[gte]optionalstringOnly cards issued on or after this time, UTC, in Y-m-dTH:i:s format with no timezone.
created_at[lte]optionalstringOnly cards issued on or before this time, UTC, in Y-m-dTH:i:s format with no timezone.
expiring_at[gte]optionalstringOnly cards expiring on or after this time, UTC, in Y-m-dTH:i:s format with no timezone.
expiring_at[lte]optionalstringOnly cards expiring on or before this time, UTC, in Y-m-dTH:i:s format with no timezone.
sort[field]optionalstringField to sort by. Required whenever any sort[...] key is present. When sort is omitted the list is ordered by id descending.
Possible values: id, created_at, expiring_at, redeemed_at, cancelled_at.
sort[direction]optionalstringSort direction; defaults to asc.
Possible values: asc, desc.
Defaults to "asc".
pageoptionalintegerPage number
per_pageoptionalintegerItems per page
Defaults to 10.
expand[]optionalstring[]List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. A list that was not requested is null. A requested list with no records is []. Unknown keys are ignored unless the endpoint says otherwise.
Returnsobject
Gift cards list response
Error responses
422objectA query parameter failed validation: an unknown status, a customer_id or buyer_id that is not a customer of the shop, a date not in 2026-11-01T00:00:00 format, sort[direction] without sort[field], an unknown sort field or direction, page below 1, or per_page outside 1 to 100.
Issue a gift card for a denomination, a variant of one of the shop's gift card products. The card is worth the denomination's price and starts issued. The gift card email is sent to the recipient unless notify_customer is false. Nothing is sent while the shop's gift card email is turned off.
Request body
variant_idRequiredintegerThe denomination, a variant of one of the shop's gift card products that is not archived. Unpublished variants are accepted. The card shows it as product_id.
customer_nameRequiredstringThe recipient's name.
customer_emailRequiredstringThe recipient's email.
Format: email.
messageoptionalstring | nullThe message shown in the gift card email.
buyer_idoptionalinteger | nullThe buyer, a customer of the shop who paid for the card.
expiring_atoptionalstring | nullThe deadline to redeem the code, a future time in UTC. Omitted: the denomination's expiration months from now, at the end of that day, or no expiry when the denomination has none. null: no expiry. Format Y-m-dTH:i:s, with no timezone.
notify_customeroptionalbooleanWhether the gift card email is sent to the recipient.
Defaults to true.
ReturnsGiftCard
The issued gift card
Error responses
400objectGift cards are not available for the shop (feature_not_available).
422objectA key failed validation: variant_id is not a variant of one of the shop's gift card products or is archived, buyer_id is not a customer of the shop, expiring_at is not a future time in 2027-11-19T23:59:59 format, customer_name or customer_email is missing, customer_email is not an email, message is longer than 255 characters, or notify_customer is not a boolean.
One of the shop's issued gift cards.
Path parameters
gift_cardRequiredintegerGift card ID
Query parameters
expand[]optionalstring[]List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. A list that was not requested is null. A requested list with no records is []. Unknown keys are ignored unless the endpoint says otherwise.
ReturnsGiftCard
Gift card object response
Error responses
404objectThe gift card does not exist or belongs to another shop.
Partially update a gift card: send only the keys you want to change; every other value stays as it is. used and cancelled cards cannot be edited. An expired card accepts a request only when it sends expiring_at, which extends the card: it becomes issued when it was never redeemed, otherwise redeemed or partially_used by its balance.
Path parameters
gift_cardRequiredintegerGift card ID
Request body
balanceoptionalintegerWhat is left to spend, in minor units of the shop's base currency, up to the card's amount. A redeemed or partially_used card becomes redeemed at the full amount and partially_used below it; an issued card stays issued.
expiring_atoptionalstring | nullThe deadline to redeem the code, UTC, in the future; null removes it. On an expired card it extends the card. Format Y-m-dTH:i:s, with no timezone.
messageoptionalstring | nullThe message shown in the gift card email; null removes it.
customer_nameoptionalstringThe recipient's name.
customer_emailoptionalstringThe recipient's email.
Format: email.
ReturnsGiftCard
Gift card object response
Error responses
400objectThe card is used (gift_card_used) or cancelled (gift_card_cancelled), or it is expired and the request sends no expiring_at (gift_card_expired). An expired card with a cancelled_at cannot be extended (gift_card_cancelled), nor can one with a balance of 0 (gift_card_used).
404objectThe gift card does not exist or belongs to another shop.
422objectValidation failed: balance is not a whole number from 1 to the card's amount, expiring_at is not in 2027-11-19T23:59:59 format or not in the future, message is longer than 255 characters, customer_name is empty or longer than 255 characters, or customer_email is not a valid email or is longer than 255 characters.
Cancel an issued, redeemed, partially_used or expired card. Its code stops working at checkout and in renewals, and open carts drop it. The balance is kept. Cancelling a card that is already cancelled, or an expired card with a cancelled_at, changes nothing.
Path parameters
gift_cardRequiredintegerGift card ID
ReturnsGiftCard
The cancelled gift card
Error responses
400objectThe card has no balance left (gift_card_used).
404objectThe gift card does not exist or belongs to another shop.