v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
GiftCardActivities

ListGiftCardActivities

Lists gift card activities. By default, you get gift card activities for all gift cards in the seller's account. You can optionally specify query parameters to filter the list. For example, you can get a list of gift card activities for a gift card, for all gift cards in a specific region, or for activities within a time window.

get/v2/gift-cards/activities

Query parameters

gift_card_idstring

If you provide a gift card ID, the endpoint returns activities that belong to the specified gift card. Otherwise, the endpoint returns all gift card activities for the seller.

typestring

If you provide a type, the endpoint returns gift card activities of this type. Otherwise, the endpoint returns all types of gift card activities.

location_idstring

If you provide a location ID, the endpoint returns gift card activities for that location. Otherwise, the endpoint returns gift card activities for all locations.

begin_timestring

The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year.

end_timestring

The timestamp for the end of the reporting period, in RFC 3339 format. Inclusive. Default: The current time.

limitinteger

If you provide a limit value, the endpoint returns the specified number of results (or less) per page. A maximum value is 100. The default value is 50.

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 you do not provide the cursor, the call returns the first page of the results.

sort_orderstring

The order in which the endpoint returns the activities, based on created_at.

  • ASC - Oldest to newest.
  • DESC - Newest to oldest (default).

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 activities. If empty, this is the final response.

Example response

{
  "gift_card_activities": [
    {
      "created_at": "2021-06-02T22:26:38.000Z",
      "gift_card_balance_money": {
        "amount": 700,
        "currency": "USD"
      },
      "gift_card_gan": "7783320002929081",
      "gift_card_id": "gftc:6d55a72470d940c6ba09c0ab8ad08d20",
      "id": "gcact_897698f894b44b3db46c6147e26a0e19",
      "location_id": "81FN9BNFZTKS4",
      "redeem_activity_details": {
        "amount_money": {
          "amount": 300,
          "currency": "USD"
        }
      },
      "type": "REDEEM"
    },
    {
      "activate_activity_details": {
        "amount_money": {
          "amount": 1000,
          "currency": "USD"
        },
        "line_item_uid": "eIWl7X0nMuO9Ewbh0ChIx",
        "order_id": "jJNGHm4gLI6XkFbwtiSLqK72KkAZY"
      },
      "created_at": "2021-05-20T22:26:54.000Z",
      "gift_card_balance_money": {
        "amount": 1000,
        "currency": "USD"
      },
      "gift_card_gan": "7783320002929081",
      "gift_card_id": "gftc:6d55a72470d940c6ba09c0ab8ad08d20",
      "id": "gcact_b968ebfc7d46437b945be7b9e09123b4",
      "location_id": "81FN9BNFZTKS4",
      "type": "ACTIVATE"
    }
  ]
}