Skip to main content

Pagination & Filtering

All list endpoints return paginated results. Use query parameters to control the page size and navigate through results.


Pagination Parameters

ParameterTypeDefaultMaxDescription
pageinteger1Page number (1-indexed)
per_pageinteger25100Results 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

Most list endpoints support a search parameter:

EndpointParameterSearches
ProductssearchName, SKU, barcode
CustomersqName, 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?