Skip to main content

Offset pagination

By default, Yapily limits the maximum amount of transactions returned in one request to GET Account Transactions to 1000. If you request contains more than this limit, you can use pagination access all transactions. The following fields are used for pagination:

How it works

  1. Send a request to GET Account Transactions. If pagination.totalCount is greater than pagination.self.limit then you haven’t received the full number of transactions for your request.
  2. Execute the request again and specify the offset property to increment the number by X (where X is the value of pagination.self.limit). This will return the next X transactions.
  3. Repeat step 2 until pagination.totalCount is the same as or less than pagination.self.limit.

Examples

No limit specified

For a call to Get Account Transactions that had 6500 transactions without any limit, calling:
  • GET /accounts/{accountId}/transactions returns transactions 1-1000
  • GET /accounts/{accountId}/transactions?offset=1000 returns transactions 1001-2000
  • GET /accounts/{accountId}/transactions?offset=6000 returns transactions 6001-6500

Specifying a limit

For a call to Get Account Transactions that had 467 transactions with a limit=50, calling:
  • GET /accounts/{accountId}/transactions?limit=50 returns transactions 1-50
  • GET /accounts/{accountId}/transactions?limit=50&offset=50 returns transactions 51-100
  • GET /accounts/{accountId}/transactions?limit=50&offset=450 returns transactions 451-467