Skip to main content
The Hi Doctor patient REST API has no single list envelope. Most collections are paginated with limit and offset and return count, next, previous and results, with 50 rows by default and up to 200 on the default paginator. A few return a bare JSON array, and pending renewal choices return an object with a pending array, so check the shape per endpoint before reading results. Last reviewed: 2026-11-04

What does a paginated response look like?

next and previous are absolute URLs, or null at either end.

Which shape does each list endpoint return?

For the journal and adverse-event lists, no maximum limit is documented. Request a sensible page size (for example 50) and follow next, rather than asking for everything in one call.

How do you page through a list safely?

  • Follow next. Do not compute offsets yourself, and keep the same limit and ordering for the whole walk.
  • Pages can shift. Offsets are positions, not cursors. If records are added or removed while you are paging (a new message arrives, for example), an item can appear twice or be skipped. Deduplicate by id, and re-read from the first page when you need a complete, current view.
  • Messages: with the default -created_at ordering, new messages land on the first page. Equal timestamps have no further tie-breaker.
  • Stop on null. When next is null, you have the last page.
  • Check next before sending a token to it. Require the same HTTPS origin as your configured API origin and the same collection path, reject URLs with credentials or fragments, and disable redirects. The quickstart shows the origin check.

Examples

The examples keep the walk short for readability. In production, add the next check above and a page cap.
For bare-array endpoints, read the response as a list directly; there is no next to follow.

Next steps

Quickstart

Sign in and make your first read.

Errors and recovery

Handle 429 and other errors while paging.

Messages

The message list and its ordering.