Pagination

Card and transaction list endpoints use cursor-based pagination.

Request a page

Use limit to select a page size. The default is 10. Transaction limits must be from 1 to 100; the card schema does not declare an explicit range.

First page

curl -G https://p.swypex.com/v1/transaction \
  -H "Authorization: Bearer {access_token}" \
  --data-urlencode "limit=25"

The response contains a resource array and may contain nextCursor.

Response

{
  "transactions": [{ "id": "TXN1000000000" }, { "id": "TXN1000000001" }],
  "nextCursor": "eyJpZCI6IlRYTjEwMDAwMDAwMDEifQ=="
}

Request the next page

Pass nextCursor back as the next request's cursor value. Preserve the same filters and page size while traversing a result set.

Next page

curl -G https://p.swypex.com/v1/transaction \
  -H "Authorization: Bearer {access_token}" \
  --data-urlencode "limit=25" \
  --data-urlencode "cursor=eyJpZCI6IlRYTjEwMDAwMDAwMDEifQ=="

Stop when nextCursor is absent.

Resource response fields

  • Name
    cards
    Type
    Card[]
    Description

    Card results from GET /v1/card.

  • Name
    transactions
    Type
    Transaction[]
    Description

    Transaction results from GET /v1/transaction.

  • Name
    nextCursor
    Type
    string
    Description

    Cursor for the next page, when another page is available.

Filtering and consistency

Transactions support filters in addition to pagination. Keep every filter unchanged when requesting subsequent pages. Transactions are sorted by authorization date, newest first.

Was this page helpful?