Pagination

Pagination

List endpoints return paginated results. You control pagination with query parameters and read metadata from response headers.

Query Parameters

ParameterDefaultDescription
page1Page number
items20Items per page

Response Headers

Pagination metadata follows RFC 8288:

HeaderDescription
LinkNavigation links (first, prev, next, last)
Current-PageCurrent page number
Page-ItemsItems on this page
Total-PagesTotal number of pages
Total-CountTotal number of records

Example

$curl "https://app.recurrente.com/api/products?page=2&items=10" \
> -H "X-PUBLIC-KEY: ..." \
> -H "X-SECRET-KEY: ..."

Response headers:

Link: <.../products?page=1&items=10>; rel="first", <.../products?page=1&items=10>; rel="prev", <.../products?page=3&items=10>; rel="next", <.../products?page=5&items=10>; rel="last"
Current-Page: 2
Page-Items: 10
Total-Pages: 5
Total-Count: 47

Common Usage

To iterate through all items:

  1. Start with page=1
  2. Process the results
  3. If Current-Page < Total-Pages, increment the page and repeat
  4. Continue until you’ve processed all pages