Pagination & ordering

All list endpoints support pagination and sorting via URL query parameters.

Query parameters

ParameterTypeRequiredDefaultNotes
pageintegerNo0Zero-indexed. First page is 0.
sizeintegerNo200Number of items per page. Maximum 1000; values above this are capped (or rejected — see Errors).
sortFieldstringNo—Name of the field to sort by. See individual endpoint docs for supported fields.
sortDirectionstringNoASCOne of ASC or DESC.

Example requests

Default pagination (page 0, size 200):

GET /v0/items

Second page, 50 per page:

GET /v0/items?page=1&size=50

Sorted by creation date, newest first:

GET /v2/saleorders?sortField=createdAt&sortDirection=DESC

Combined:

GET /v2/saleorders?page=2&size=100&sortField=createdAt&sortDirection=DESC

Errors

  • size greater than 1000 will be ignored and 1000 will be used.
  • Invalid sortField (not a recognized field for the endpoint) returns a 400 Bad Request.
  • sortDirection values other than ASC/DESC will be ignored an ASC will be used.


Did this page help you?