Pagination & Filtering
All list endpoints return paginated results. Use query parameters to control the page size and navigate through results.
Pagination Parameters
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
page | integer | 1 | — | Page number (1-indexed) |
per_page | integer | 25 | 100 | Results per page |
Example
curl -H "X-API-Key: bpos_..." \
"https://yourstore.brotherpos.ca/api/v1/products?page=2&per_page=50"
Pagination Response
Every list response includes a pagination object:
{
"data": [ ... ],
"pagination": {
"current_page": 2,
"per_page": 50,
"total_count": 342,
"total_pages": 7
}
}
Filtering
Search
Most list endpoints support a search parameter:
| Endpoint | Parameter | Searches |
|---|---|---|
| Products | search | Name, SKU, barcode |
| Customers | q | Name, email, phone, customer code |
# Search products by name
curl -H "X-API-Key: bpos_..." \
"https://yourstore.brotherpos.ca/api/v1/products?search=blue+dream"
# Search customers
curl -H "X-API-Key: bpos_..." \
"https://yourstore.brotherpos.ca/api/v1/customers?q=john"
Category Filtering
Filter products by category slug:
curl -H "X-API-Key: bpos_..." \
"https://yourstore.brotherpos.ca/api/v1/products?category=edibles"
Brand Filtering
Filter products by brand name:
curl -H "X-API-Key: bpos_..." \
"https://yourstore.brotherpos.ca/api/v1/products?brand=Broken+Coast"
Date Filtering
Filter sales by date range:
curl -H "X-API-Key: bpos_..." \
"https://yourstore.brotherpos.ca/api/v1/sales?start_date=2026-03-01&end_date=2026-03-22"
Incremental Sync
Products and customers support updated_since for efficient incremental syncing:
# Only get products updated in the last hour
curl -H "X-API-Key: bpos_..." \
"https://yourstore.brotherpos.ca/api/v1/products?updated_since=2026-03-22T11:00:00Z"
What's Next?
- Error Handling — Understand error responses
- Webhooks — Real-time event notifications
- Endpoints — Full endpoint reference