Request Parameters
Example Request
Response Format
Paginated responses include ameta object with pagination details:
Meta Fields
Sorting
Some list endpoints take asort parameter. GET /widgets does not: it is always newest first. Where it is accepted, use the format field:direction:
- Ascending:
sort=created_at:asc - Descending:
sort=created_at:desc
Common Sort Fields
SDK Example
Using the TypeScript SDK:Best Practices
Use Reasonable Page Sizes
Use Reasonable Page Sizes
Start with the default (20) or use 50-100 for bulk operations. Avoid requesting single items via pagination.
Cache Total Count
Cache Total Count
The
total count is computed on each request. For expensive queries, cache it and only refresh periodically.Handle Empty Pages
Handle Empty Pages
An empty
data array is valid. Always check hasNextPage to determine if more data exists.