Pagination

List endpoints in the GIFQ API are paginated. Use the page query parameter to navigate through results.


GET /api/orders?page=2
X-Api-Token: YOUR-API-KEY

Defaults and limits

ParameterDefaultMax
page1
limit1020

Pass limit alongside page to control how many records are returned per request:

GET /api/orders?page=1&limit=20
X-Api-Token: YOUR-API-KEY

Reading pagination state from response headers

Each paginated response carries four headers:

HeaderTypeDescription
current-pageintegerPage returned in this response
page-itemsintegerNumber of records in this response
total-countintegerTotal records matching the query
total-pagesintegerTotal number of available pages

Use total-pages to know when you have retrieved all results.

Endpoints that support pagination

EndpointDefault sort order
GET /api/ordersNewest first
GET /api/productsBrand name A–Z
GET /api/transactions
GET /api/campaigns
GET /api/campaigns/:id/catalog
GET /api/payout-orders
GET /api/payouts

Out-of-range pages

Requesting a page that does not exist returns HTTP 400:

{
  "message": "Pagination error: expected :page in 1..5; got 999",
  "status": "error"
}