Skip to content

Pagination

A v2 list route returns one page at a time. Each response carries a cursor for the next page, and an empty cursor means you have the last one. Pass the cursor back exactly as you received it: it is opaque, so don’t build or edit one. v1 pages differently, with a whole URL (see the aside at the end).

  1. Request the first page with no cursor.
  2. Read the next cursor from the response. If it is empty, you are done.
  3. Otherwise, send the same request again with cursor set to that value.
GET /v2/storefront/orders/shipped?lastUpdatedTs=2026-09-22T14:00:00Z&pageSize=50
{
"orders": [],
"nextPageCursor": "c29tZS1vcGFxdWUtY3Vyc29y"
}
GET /v2/storefront/orders/shipped?lastUpdatedTs=2026-09-22T14:00:00Z&pageSize=50&cursor=c29tZS1vcGFxdWUtY3Vyc29y

The cursor does not carry your filters. Each page reads them from the request, so send the same ones every time and change only cursor.

Every paged v2 route takes cursor in. The name of the cursor that comes back differs:

Routes Next cursor
Orders and listing nextPageCursor
Inventory nextCursor
Shipping nextCursor

Where a route takes pageSize, leave it out for the server default. Each service sets its own default and maximum, and a larger pageSize is lowered to the maximum rather than rejected. The listing routes take no pageSize at all.

On the orders and inventory routes, a cursor the service cannot read answers 400 with invalid cursor in the message. See Errors.

API changelog · Built 0c509dd3