Beta
Not authenticated — log in first

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

  1. Call the list endpoint with ?first=24 (or with filters where supported).
  2. Read pageInfo.endCursor and pageInfo.hasNextPage from the response.
  3. If hasNextPage is 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.
  • estimatedTotalCount for products comes from the database planner and may be null or imprecise, especially with search filters. For orders it is an exact count scoped to your vendor suborders. Use both as hints only (~N items).
  • first defaults 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.