Pagination & Filtering

Navigate paginated responses and filter results

Pagination Basics

List endpoints return paginated results. By default, you get 20 items per page. Use the page and per_page query parameters to navigate.

Query Parameters

  • page — 1-indexed page number (default: 1)
  • per_page — items per page (default: 20, max: 100)

Response Format

Paginated responses include metadata alongside the data array:

{
  "data": [
    { "id": 1, "name": "Product A", ... },
    { "id": 2, "name": "Product B", ... }
  ],
  "page": 1,
  "per_page": 20,
  "total": 142,
  "total_pages": 8
}

Iterating All Pages

To fetch all items, loop until page > total_pages:

# Fetch page 1, then increment
curl "https://yourshop.zeroshop.io/admin/api/products?page=1&per_page=50" \
  -H "Authorization: Bearer zspat_..."

# Check total_pages in response, repeat for page=2, page=3, etc.

We value your privacy

We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.