Pagination, Sorting & Filtering
list type API methods support a few functions to help prepare or navigate the list. These functions are:
To do pagination, you will need to set these variables.
|Page size||Page number|
|Number of objects to be returned in a page. Default page size is 10 and max page size is 1000.||The page number you want returned.|
When you make the API call, include
page[number]= to set the variables above.
Sorting allows you to sort lists according to one or more criteria fields, for example, you might want to sort based on the
createdAt date time. To sort, pass in a
?sort= as part of the call.
The sort order for each sort field is ascending by default. If you need to sort by descending, prefix the sort field parameter with a minus.
See the example below, where we want to list
disbursements with the latest disbursements shown first.
Each list type API method will have its own specific filtering methods. Please find their filtering methods in the specific API sections. Here is an example of how to filter a list response:
For listing of
disbursements, these are the filters you can use:
|Filter Name||Filter By|
Disbursement Statuses: 'processing', 'completed', or 'failed'
Payment Statuses: "paid", "completed"
Updated 7 months ago