Paging, sorting and filtering
Every list is paged, also short ones:
{
"data": [ { "id": 1 }, { "id": 2 } ],
"pagination": { "totalItems": 30, "totalPages": 3, "page": 1, "pageSize": 10 }
}
pagestarts at 1.pageSizedefaults to 50, at most 1000. Values out of range return422, never a silently smaller page.- A page past the end returns
200with an emptydata. - When
totalPages > 1you don't have everything yet: request the nextpage.
Sorting (where a list supports it): sortBy=createdAtUtc ascending, sortBy=-createdAtUtc descending, several fields comma-separated. Field names are the response's. Each list documents its sortable fields and its default. An unknown field returns 422. id is always the last sort key, so the order is stable. If orders are created or changed while you page through a list, an item can still move to another page: for a complete sync, filter with updatedSince and read again from the last updatedAtUtc you saw.
Filters are one query parameter per field, named after the response field:
- Several values for one parameter are comma-separated and mean OR:
status=sent,canceled. - Different parameters mean AND.
- Ranges use
…From(inclusive) and…To(exclusive): all of November isdeliveryFrom=2026-11-01&deliveryTo=2026-12-01. - Dates are
yyyy-MM-dd. Instants are ISO 8601 withZor an offset (2026-11-09T12:00:00Z); without one they return422. searchis a case-insensitive "contains" over the fields the list documents.- An invalid value returns
422on its field; all invalid parameters come back together.