Pagination
You can use pagination to move through pages of API call results for most collection endpoints. Use the page and limit query parameters to enable pagination in the response. You must use integers for both parameters.
The API's response returns paginated results, if there are any. If there are no results for the given request, the API returns a 204: No Content. See the Status & Error Codes page for examples.
Pagination Limitations
- By default, the page is set to
1and can have a maximum value of up to1,000.- By default, the limit is set to
1000and can have a maximum value of up to10,000.pagecannot be used without setting alimit
Content-Range Header
Additional information about the result set can be obtained by parsing the Content-Range header in the response, including:
- Resource requested
- Index of the first item
- Index of the last item
- Total number of records ignoring pagination for the given request criteria.
Examples
Example: GET The first page of the products list with 10 results of a total of 200
GET The first page of the products list with 10 results of a total of 200Query Parameters
| Name | Required | Type | Description |
|---|---|---|---|
limit | Optional | number | The number of records per page. |
page | Optional | number | The requested page within the collection. |
Request
curl --request GET \
--url 'https://rlp-dev.congacloud.io/api/revenue-admin/v1/products?page=1&limit=10' \
--header 'Accept: application/json' \
Content-Range Header
Content-Range: Products 1–10 / 200
Example: GET Get 10 products on page 3 of a possible 200 products
GET Get 10 products on page 3 of a possible 200 productsQuery Parameters
| Name | Required | Type | Description |
|---|---|---|---|
limit | Optional | number | The number of records per page. |
page | Optional | number | The requested page within the collection. |
Request
curl --request GET \
--url 'https://rlp-dev.congacloud.io/api/revenue-admin/v1/products?page=3&limit=10' \
--header 'Accept: application/json' \
Content-Range Header
Content-Range: Products 21–30 / 200
Updated almost 2 years ago
