• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
List gift card activities BETA

GET /v2/gift-cards/activities

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.


Permissions
GIFTCARDS_READ
Try in API Explorer
Name Description
gift_card_id
string

If a gift card ID is provided, the endpoint returns activities related to the specified gift card. Otherwise, the endpoint returns all gift card activities for the seller.

type
string

If a type is provided, the endpoint returns gift card activities of the specified type. Otherwise, the endpoint returns all types of gift card activities.

location_id
string

If a location ID is provided, the endpoint returns gift card activities for the specified location. Otherwise, the endpoint returns gift card activities for all locations.

begin_time
string

The timestamp for the beginning of the reporting period, in RFC 3339 format. This start time is inclusive. The default value is the current time minus one year.

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

end_time
string

The timestamp for the end of the reporting period, in RFC 3339 format. This end time is inclusive. The default value is the current time.

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

limit
integer (32-bit)

If a limit is provided, the endpoint returns the specified number of results (or fewer) per page. The maximum value is 100. The default value is 50. For more information, see Pagination.

cursor
string

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, the endpoint returns the first page of the results. For more information, see Pagination.

sort_order
string

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

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

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

gift_card_activities
GiftCardActivity [ ]

The requested gift card activities or an empty object if none are found.

cursor
string

When a response is truncated, it includes a cursor that you can use in a subsequent request to retrieve the next set of activities. If a cursor is not present, this is the final response. For more information, see Pagination.

Examples

You are viewing an old version of the API
GET /v2/gift-cards/activities
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/gift-cards/activities \
  -H 'Square-Version: 2022-05-12' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "gift_card_activities": [
    {
      "id": "gcact_897698f894b44b3db46c6147e26a0e19",
      "type": "REDEEM",
      "location_id": "81FN9BNFZTKS4",
      "created_at": "2021-06-02T22:26:38.000Z",
      "gift_card_id": "gftc:6d55a72470d940c6ba09c0ab8ad08d20",
      "gift_card_gan": "7783320002929081",
      "gift_card_balance_money": {
        "amount": 700,
        "currency": "USD"
      },
      "redeem_activity_details": {
        "amount_money": {
          "amount": 300,
          "currency": "USD"
        }
      }
    },
    {
      "id": "gcact_b968ebfc7d46437b945be7b9e09123b4",
      "type": "ACTIVATE",
      "location_id": "81FN9BNFZTKS4",
      "created_at": "2021-05-20T22:26:54.000Z",
      "gift_card_id": "gftc:6d55a72470d940c6ba09c0ab8ad08d20",
      "gift_card_gan": "7783320002929081",
      "gift_card_balance_money": {
        "amount": 1000,
        "currency": "USD"
      },
      "activate_activity_details": {
        "amount_money": {
          "amount": 1000,
          "currency": "USD"
        },
        "order_id": "jJNGHm4gLI6XkFbwtiSLqK72KkAZY",
        "line_item_uid": "eIWl7X0nMuO9Ewbh0ChIx"
      }
    }
  ]
}