BigblueDevelopers

Pagination

Page through list results with page tokens.

All List* operations except ListTrackings return results in pages.

How it works

Send page_size with no page_token. If there are more results, the response includes next_page_token. Send it as page_token to get the next page. When next_page_token is missing or empty, there are no more results.

First request
{ "page_size": 100 }
Response
{
  "products": [{ "id": "BGBL-ESPSRT-SMAL" }],
  "next_page_token": "ChgKFgoJcHJvZHVjdHMSCUJHQkwtRVNQ"
}
Next request
{ "page_size": 100, "page_token": "ChgKFgoJcHJvZHVjdHMSCUJHQkwtRVNQ" }

Don't store page tokens

Tokens are opaque. Don't parse, build or keep them. If paging stops partway, start again with no token. Keep the same filters on every page.

Page sizes

OperationDefault when page_size is 0Maximum
ListProducts500None
ListBundles100None
ListInboundShipments100None
ListInventories10001000
ListBundleInventories1000None
ListAllocationInventories10005000
ListOrders100None
ListOrderTickets100None
ListReturnsSet by the serverNone

A page_size above the maximum fails with invalid_argument. It isn't reduced for you.

Limits inside a result

  • ListInventories returns at most 100 lots per row.
  • A bundle can have at most 20 components.

Choosing a page size

Larger pages mean fewer requests against your rate limit.

  • For inventory, use the maximum: page_size: 1000, or 5000 for allocation inventories.
  • For orders, use 100 to 250. ListOrders loads fulfillments and trackings for each order, so large pages are slow.
  • For other lists, the default is fine.

On this page