Pagination
Cursor-based pagination for list and export endpoints.
Pagination
Product list, order list, and bulk export endpoints use cursor-based pagination. Responses include a resource array (products or orders), a pageInfo object for navigation, and an optional estimatedTotalCount.
Forward pagination
- Call the list endpoint with
?first=24(or with filters where supported). - Read
pageInfo.endCursorandpageInfo.hasNextPagefrom the response. - If
hasNextPageis true, request the next page with?first=24&after=<endCursor>.
Products:
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/vendor/products?first=24"
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/vendor/products?first=24&after=CURSOR_FROM_PAGE_INFO"Orders:
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/vendor/orders?first=24"
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/vendor/orders?first=24&after=CURSOR_FROM_PAGE_INFO"Response shape
Products:
{
"products": [ /* ... */ ],
"pageInfo": {
"startCursor": "...",
"endCursor": "...",
"hasNextPage": true,
"hasPreviousPage": false
},
"estimatedTotalCount": 12345
}Orders:
{
"orders": [ /* ... */ ],
"pageInfo": {
"startCursor": "...",
"endCursor": "...",
"hasNextPage": true,
"hasPreviousPage": false
},
"estimatedTotalCount": 128
}- Cursors are opaque. Do not parse or construct them; pass them back exactly as returned.
estimatedTotalCountfor products comes from the database planner and may benullor imprecise, especially with search filters. For orders it is an exact count scoped to your vendor suborders. Use both as hints only (~N items).firstdefaults to 24 on list endpoints and 100 on bulk export; capped at 100 on both.
Bulk export
GET /vendor/products/export uses the same cursor parameters and pageInfo response shape. Export rows are slim (product_id, product_code, vendor_price, amount) but pagination works identically to list:
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/vendor/products/export?first=100"
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/vendor/products/export?first=100&after=CURSOR_FROM_PAGE_INFO"Walk the catalog by looping until pageInfo.hasNextPage is false.
Backward pagination
Use last with before (pass pageInfo.startCursor) to page backward. Do not send after and before in the same request.