Skip to main content

Pagination

Most list endpoints in the RxScale APIs are paginated through query parameters.
Not every list endpoint is paginated. Smaller, bounded collections — appointment types, appointment-type reminders, a doctor’s availability rules, notification subscriptions, webhook subscriptions, review links and wallet passes — return the full list in a single response.Do not send page or limit to an unpaginated endpoint. They are not part of its contract: depending on the endpoint they are either silently ignored or rejected with 400 and an Unknown field. message.A paginated response is recognisable by its envelope: it carries totalRegistries and totalPages. An unpaginated one does not. The rows sit under data, with one exception — GET /v1/management/doctors/{doctor_uid}/blacklisted-skus returns them under blacklisted_skus. Each endpoint’s reference page lists exactly which query parameters it accepts and shows the response it returns.

Query Parameters

Pages are zero-indexed. The first page is page=0, not page=1.

Response Format

Paginated endpoints return:
  • data — Array of items for the current page
  • totalRegistries — Total number of items across all pages
  • totalPages — Total number of pages (calculated as ceil(totalRegistries / limit))

Limits

The maximum limit is not uniform across the External Pharmacy API — it depends on the endpoint family. Requesting a limit above the maximum will be capped to the maximum — the request still succeeds, it simply returns fewer items than you asked for. Always read totalRegistries and totalPages from the response rather than assuming your requested limit was applied.

Requesting a Page Past the End

Requesting a page beyond the last one returns 200 with an empty data array. totalRegistries and totalPages still report the full collection, so you can tell how far it actually goes.
A negative page is treated as page=0.
An empty data array is a reliable stop condition for a sync loop: the API never silently serves the last page again in place of the page you asked for.

Example

Fetching the second page of 25 products:
Response:

Iterating Through All Pages

Use the smallest limit that makes sense for your use case. Smaller pages mean faster responses and less memory usage.