Pagination, Filtering & Sorting
Pagination
All list endpoints are paginated. Control pagination with query parameters:
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number |
per_page | 20 | Items per page (max 100) |
# Get page 3 with 50 items per page
curl -H "Authorization: Bearer KEY:SECRET"
"https://example.com/api/v1/products?page=3&per_page=50"
Sorting
| Parameter | Description |
|---|---|
sort | Field name to sort by (resource-specific) |
order | asc or desc (default: asc) |
# Products sorted by price, highest first
curl -H "Authorization: Bearer KEY:SECRET"
"https://example.com/api/v1/products?sort=price&order=desc"
Filtering
Each resource supports specific filter parameters. Common patterns:
# Products in category 5
/api/v1/products?cat_id=5
# Active products only
/api/v1/products?status=1
# Orders with status "Complete"
/api/v1/orders?status=3
# Orders in a date range
/api/v1/orders?date_from=2026-01-01&date_to=2026-03-31
Search
Use the search parameter for LIKE searches across relevant fields:
/api/v1/products?search=leather+wallet
/api/v1/customers?search=john
Sparse Fieldsets
Request only the fields you need:
/api/v1/products?fields=product_id,name,price