Gift card activity

Gift card activity entries: issue, redemption, refund to the card, adjustment, void and block. Append-only.

Loading the search index…

Gift card activity

Objects

GiftCardTransaction

  • idintegerrequired

    ID of the record, unique among records of its kind in the store.

  • gift_card_idintegerrequired

    Gift card ID (/v1/gift-cards).

  • typestringrequired

    Entry kind: issue — issue; redeem — payment with the card; refund — a purchase refunded to the card; adjust — manual adjustment; void — void (the card was returned or not paid); block and unblock — block and its removal, with no amount; transfer_out and transfer_in — balance moved by a reissue from the old card to the new one.

    Values:
    issueredeemrefundadjustvoidblockunblocktransfer_outtransfer_in
  • amountintegerrequired

    Signed amount in minor units of the currency: positive — the liability grew, negative — it shrank, 0 — block and its removal.

  • balance_afterintegerrequired

    Card balance after this entry.

  • currencystringrequired

    Currency of the amounts, an ISO 4217 code: the currency of the store.

    Values:
    ARSUSDBRLCLPCOPMXNPENRUB
  • order_idinteger or nullrequired

    ID of the order.

  • payment_idinteger or nullrequired

    Payment ID (/v1/payments): a payment with the gift_card method or the payment for the card sale; null if there is no payment.

  • refund_idinteger or nullrequired

    ID of the refund (/v1/refunds) that returned money to the card or for the card itself; null if there is no refund.

  • notestring or nullrequired

    Adjustment reason or staff note; null if there is none.

  • created_atstring (date-time)required

    When the record was created.

Endpoints

Gift card activity: issue, redemption, refund to the card, adjustment, void, block and balance transfer

get/gift-card-transactions

Scope: finance:read

Parameters

Query

  • limitinteger

    Page size: up to 250 records; 50 by default.

    Minimum:
    1
    Maximum:
    250
  • cursorstring

    Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it.

    Max length:
    4096
  • updated_sincestring (date-time)

    Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor.

    Pattern:
    ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?(Z|[+-]\d{2}:\d{2})$
  • gift_card_idinteger

    Only entries of this gift card.

    Minimum:
    1
  • payment_idinteger

    Only entries of this payment.

    Minimum:
    1

Responses

200Success

application/json

  • dataarray of GiftCardTransactionrequired

    Records of the page.

  • deletedarray of objectrequired

    Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor.

    Fields · 2
    • idintegerrequired

      ID of the erased record.

    • deleted_atstring (date-time)required

      When the record was erased.

  • next_cursorstring or nullrequired

    Cursor of the next page; null on the last page.

  • has_morebooleanrequired

    true when there is a next page.

  • sync_cursorstring or nullrequired

    On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages.

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

410The sync cursor is older than the deletion retention period or was issued before the database was restored

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl "https://api.saleya.app/v1/gift-card-transactions" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN"
Example response · 200
{
  "data": [
    {
      "id": 0,
      "gift_card_id": 0,
      "type": "issue",
      "amount": 0,
      "balance_after": 0,
      "currency": "ARS",
      "order_id": 0,
      "payment_id": 0,
      "refund_id": 0,
      "note": "string",
      "created_at": "2026-01-15T12:00:00Z"
    }
  ],
  "deleted": [
    {
      "id": 0,
      "deleted_at": "2026-01-15T12:00:00Z"
    }
  ],
  "next_cursor": "string",
  "has_more": true,
  "sync_cursor": "string"
}

Gift card activity entry

get/gift-card-transactions/{entry}

Scope: finance:read

Parameters

Path

  • entryintegerrequired

    Gift card activity entry ID.

Responses

200Success

application/json

Returns GiftCardTransaction

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

404The object does not exist or is not available to the app

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl "https://api.saleya.app/v1/gift-card-transactions/{entry}" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN"
Example response · 200
{
  "id": 0,
  "gift_card_id": 0,
  "type": "issue",
  "amount": 0,
  "balance_after": 0,
  "currency": "ARS",
  "order_id": 0,
  "payment_id": 0,
  "refund_id": 0,
  "note": "string",
  "created_at": "2026-01-15T12:00:00Z"
}