Gift Card API reference

About Gift Card API

The Zettle Gift Card API is used to programmatically fetch details for a gift card. It's usually used together with the Purchase API to provide additional purchasing information. To be able to track the status of gift cards, each gift card has a code, and a unique gift card Uuid. The UUID is used in the purchase history information, and can be retrieved through the Purchase API.

Base URL

https://giftcard.izettle.com

OAuth Scope

READ:PURCHASE

For more information on how to get authorisation for the scope, see OAuth2 API.

Fetch details of a gift card

Returns details for a gift card with a known UUID.

1
GET /organizations/{organizationUuid}/giftcards/external/{Uuid}

Example: This request returns the details for the gift card with the Uuid 5c84a1a6-96d0-11eb-b3d5-7961f4378b1d. The returned response shows that the gift card is valid for two years from 2021. It is worth 5000 in the defined currency unit, and no redemptions have been made.

1
GET /organizations/self/giftcards/external/5c84a1a6-96d0-11eb-b3d5-7961f4378b1d

Example response:

1
{
2
"uuid": "5c84a1a6-96d0-11eb-b3d5-7961f4378b1d",
3
"created": "2021-04-06",
4
"validTo": "2023-04-06",
5
"initialAmount": 5000,
6
"remainingAmount": 5000
7
}

Parameters

Click to hide request parameters.
NameTypeInRequired/OptionalDescription
organizationUuidstringpathrequiredUnique identifier for your organisation. You can use following options to fill in this value:
  • Use self as the value. This will retrieve your organizationUuid from the authentication token in the request.
  • Get it by using the users/self endpoint of OAuth2 API. For more information, see OAuth2 API.
UuidstringpathrequiredUnique identifier for a gift card. It can be found in the purchase history fetched through the Purchase API. See for example Fetch expired and redeemed gift cards.

Responses

Click to hide HTTP status codes.
Status codeDescription
200 OKReturned when the operation is successful.
404 Giftcard not foundReturned when a a gift card is not found.
Click to hide response attributes.
NameTypeDescription
uuidstringUnique identifier for the gift card.
CreatedstringThe date when the gift card was created.
ValidTostringThe date after which the gift card will be expired and can no longer be used. A gift card can be valid for one, two, or three years.
initialAmountintegerThe amount of money that the gift card is loaded with.
remainingAmountintegerThe current balance of the gift card.