Add pagination requests
United States
Canada
Europe
Latin America
Clover merchant data sets can be very large. By default, REST API responses are returned 100 items at a time.
To ensure you are retrieving results as expected, add query parameters, such as offset
and limit
, to your request. These parameters can be used to page through large result sets. The default limit is 100 elements, and the hard limit is 1000.
Offsets and limits cannot be used to paginate results in nested fields. If the result set for a nested field contains more than 100 items, the API limits the results to the first 100 items.
Use limit
and offset
limit
and offset
The following example shows a request for three orders (limit=3
) from a merchant's tenth order (offset=10
).
curl --request GET \
--url 'https://sandbox.dev.clover.com/v3/merchants/{mId}/orders? \
limit=3&offset=10' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer {auth_token}'
The response includes an array of order objects.
{
"elements": [
{
"href": "https://sandbox.dev.clover.com/v3/merchants/{mId}/orders/VXQEY3VMTT74T",
"id": "VXQEY3VMTT74T",
"currency": "USD",
"paymentState": "OPEN",
"taxRemoved": false,
"isVat": false,
"state": "open",
...
},
{
"href": "https://sandbox.dev.clover.com/v3/merchants/{mId}/orders/KMAAH8QS60Z7A",
"id": "KMAAH8QS60Z7A",
"currency": "USD",
"paymentState": "OPEN",
"taxRemoved": false,
"isVat": false,
"state": "open",
...
},
{
"href": "https://sandbox.dev.clover.com/v3/merchants/{mId}/orders/9HWKT8NG6RA8A",
"id": "9HWKT8NG6RA8A",
"currency": "USD",
"paymentState": "OPEN",
"taxRemoved": false,
"isVat": false,
"state": "open",
...
}
],
"http://sandbox.dev.clover.com/v3/merchants/7R56PZ0Z0EAB1/orders?filter=stateIS%20NOT%20NULL&offset=10&limit=3"
Updated 11 months ago