Pagination
Pagination is used to move through pages of results.
Example:
Page includes information about the current page.
limit is the per page limit used for this response.
offset is the current offset by number of records (not pages).
current is the current page.
total is the total page count.
Results includes information about the whole result set.
total is the total results that match any filters applied (or all results, if no filter was applied).
Pagination fields will never be omitted from a listing response, even if there are no results.
You can, therefore, easily paginate resources using page[offset]
and page[limit]
query string parameters on most top-level endpoints. Both of these values are integers.
Pagination is also supported within our JavaScript and Swift SDK.
Pagination Limitations
By default, page lengths are set to
100
. You can adjust this setting globally for your project via the settings endpoint or override on any single call. There is a maximum page length of100
for any paginated call.Requests to
/v2/orders
and/v2/files
have a hard offset limit of10,000
records.Requests to other endpoints have a soft offset limit of
10,000
records.
Example: Get all categories, 2 per page
GET
https://api.moltin.com/v2/categories?page[limit]=2
Query Parameters
Name | Type | Description |
---|---|---|
page[limit] | number | The number of records to offset the results by |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token to grant access to the API |
Example: Get products 21 - 30
GET
https://api.moltin.com/v2/products?page[limit]=10&page[offset]=20
Use page[offset] to get additional pages for your content.
Query Parameters
Name | Type | Description |
---|---|---|
page[offset] | number | The number of records to offset the results by |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token to grant access to the API |
Last updated