Gift Card List

🔒

Requires price_rules access scope. More access scope

The Gift Card List API retrieves a list of gift cards with various filtering options.

This API is especially useful for:

  1. Listing all gift cards with detailed information.
  2. Filtering gift cards by creation date, update date, or initial value.
  3. Paginating and managing large sets of gift card data.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

FieldTypeRequiredExampleDescription
statusstringNoenableStatus of the gift card.
created_at_minstringNo2018-10-01T16:15:47-04:00Filter gift cards created at or after this date.
created_at_maxstringNo2018-10-01T16:15:47-04:00Filter gift cards created at or before this date.
updated_at_minstringNo2018-10-01T16:15:47-04:00Filter gift cards last updated at or after this date.
updated_at_maxstringNo2018-10-01T16:15:47-04:00Filter gift cards last updated at or before this date.
initial_value_minstringNo50.00Filter gift cards with initial value greater than this.
initial_value_maxstringNo200.00Filter gift cards with initial value less than this.
pagestringNo1Page number for pagination.
limitstringNo10Limit of gift cards per page.
idsstringNo377026890382183978,377006280092433706Comma-separated list of gift card IDs.

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeDescriptionExample
gift_cards[].idstringUnique identifier for the gift card.377026890382183978
gift_cards[].last_charactersstringLast characters of the gift card code.218p
gift_cards[].balancestringCurrent balance of the gift card.100.00
gift_cards[].initial_valuestringThe initial value of the gift card.100.00
gift_cards[].notestringNote attached to the gift card.note
gift_cards[].expires_onstringExpiration date of the gift card in ISO-8601 format.2025-11-01T00:00:00Z
gift_cards[].disabled_atstringTimestamp when the gift card was disabled.null
gift_cards[].enabledbooleanWhether the gift card is currently enabled.true
gift_cards[].created_atstringTimestamp of when the gift card was created.2024-05-06T10:12:05Z
gift_cards[].updated_atstringTimestamp of when the gift card was last updated.2024-05-06T10:12:05Z
gift_cards[].statusstringStatus of the gift card (enable or disable).enable
gift_cards[].currencystringCurrency in which the gift card is denominated.USD
gift_cards[].line_item_idstringID of the line item associated with the gift card.null
gift_cards[].order_idstringID of the order associated with the gift card.null
gift_cards[].user_idstringUser ID of the creator or owner of the gift card.cba51e16-ac53-43d8-a7a3-161c5b1ecd8e
gift_cards[].template_suffixstringSuffix of the template used to render the gift card online.null
gift_cards[].customer_idstringCustomer ID associated with the gift card.2dd957e3-2051-4cdf-8584-9c0046b4d1ae
totalstringTotal number of gift cards matching the query.2

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "invalid line_item id"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
422The time parameter passed in is illegalinvalid time parameterThe time parameter passed in is illegal
The status parameter passed in is illegalinvalid statusThe status parameter passed in is illegal

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!