v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
GiftCards

ListGiftCards

Lists all gift cards. You can specify optional filters to retrieve a subset of the gift cards.

get/v2/gift-cards

Query parameters

typestring

If a type is provided, gift cards of this type are returned (see GiftCardType). If no type is provided, it returns gift cards of all types.

statestring

If the state is provided, it returns the gift cards in the specified state (see GiftCardStatus). Otherwise, it returns the gift cards of all states.

limitinteger

If a value is provided, it returns only that number of results per page. The maximum number of results allowed per page is 50. The default value is 30.

cursorstring

A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query. If a cursor is not provided, it returns the first page of the results. For more information, see Pagination.

customer_idstring

If a value is provided, returns only the gift cards linked to the specified customer

Response

Success

cursorstring

When a response is truncated, it includes a cursor that you can use in a subsequent request to fetch the next set of gift cards. If empty, this is the final response.

Example response

{
  "cursor": "JbFmyvUpaNKsfC1hoLSA4WlqkgkZXTWeKuStajR5BkP7OE0ETAbeWSi6U6u7sH",
  "gift_cards": [
    {
      "balance_money": {
        "amount": 3900,
        "currency": "USD"
      },
      "created_at": "2021-06-09T22:26:54.000Z",
      "gan": "7783320008524605",
      "gan_source": "SQUARE",
      "id": "gftc:00113070ba5745f0b2377c1b9570cb03",
      "state": "ACTIVE",
      "type": "DIGITAL"
    },
    {
      "balance_money": {
        "amount": 2000,
        "currency": "USD"
      },
      "created_at": "2021-05-20T22:26:54.000Z",
      "gan": "7783320002692465",
      "gan_source": "SQUARE",
      "id": "gftc:00128a12725b41e58e0de1d20497a9dd",
      "state": "ACTIVE",
      "type": "DIGITAL"
    }
  ]
}