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:pagination.totalCount- the total number of transactions your query would returnpagination.self.limit- the value of limit if specified in the request or 1000 if not specifiedoffset- the number of transaction records to be skipped
How it works
-
Send a request to GET Account Transactions. If
pagination.totalCountis greater thanpagination.self.limitthen you haven’t received the full number of transactions for your request. -
Execute the request again and specify the
offsetproperty to increment the number by X (where X is the value ofpagination.self.limit). This will return the next X transactions. -
Repeat step 2 until
pagination.totalCountis the same as or less thanpagination.self.limit.
Examples
No limit specified
For a call to Get Account Transactions that had 6500 transactions without any limit, calling:GET /accounts/{accountId}/transactionsreturns transactions 1-1000GET /accounts/{accountId}/transactions?offset=1000returns transactions 1001-2000GET /accounts/{accountId}/transactions?offset=6000returns 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=50returns transactions 1-50GET /accounts/{accountId}/transactions?limit=50&offset=50returns transactions 51-100GET /accounts/{accountId}/transactions?limit=50&offset=450returns transactions 451-467
Cursor-based pagination
Cursor-based pagination feature is currently available as a Private Beta version.
Please contact your Customer Success Manager if you would like to access it.
from and before as optional query parameters when sending the initial request, and accepts cursor as optional query parameter in subsequent requests.
How it works
Yapily doesn’t set alimit for the maximum number of transactions returned per page, but an individual Institution can set a limit.
The meta object in the response includes count that represents the number of transactions in that page, but doesn’t return a field for the total number of transactions.
The data object in the response contains an array of transactions.
The links object in the response returns opaque cursor tokens that can be fed into the subsequent request:
first- a cursor or link to the first pageprev- a cursor or link to the previous pageself- a cursor or link to the current pagenext- a cursor or link to the next pagelast- a cursor or link to the last page
Examples
GET /accounts/{accountId}/real-time/transactionsto fetch transactions in the first page. Returnsself,nextandlastpage cursors:
GET /accounts/{accountId}/real-time/transactions?cursor=cccto fetch transactions in a middle page. Returnsfirst,prev,self,nextandlastpage cursors:
GET /accounts/{accountId}/real-time/transactions?cursor=zzzto fetch transactions in the final page. Returnsfirst,prevandselfpage cursors: