Requests and replies
- Every path starts with
/api/patient.
- Bodies are JSON in UTF-8. Send
Content-Type: application/json with every body.
- Replies are JSON. Two exceptions: endpoints that return a file, and the chat reply, which is a stream of server-sent events.
GET reads. POST, PUT, PATCH and DELETE change something and need the write scope.
| Value | Format |
|---|
| Ids | Opaque strings. Store them as they are; do not parse them or assume a length. |
| Account id | A number that names the clinic account a person belongs to. user.accountId in the sign-in reply. |
| Emails | Compared in lowercase. Send them in lowercase. |
| Timestamps | ISO 8601 in UTC, for example 2026-12-02T10:15:00.000Z. |
| Dates | YYYY-MM-DD. |
| Phone numbers | The national number and the dial code as separate fields, for example "phone": "4155550123", "countryCode": "1". |
New fields
Fields are added to replies over time. Read the fields you need and ignore the rest. Do not fail on a field you have not seen before.
Repeating a call
| Call | Safe to repeat |
|---|
Any GET | Yes. |
POST /partner/terms/accept | Yes. Only the first acceptance is kept. |
POST /lab/uploads/{uploadId}/complete | Yes. A repeat returns the same job. |
| A finished sign-in | Yes. The link to your key is made once. |
| Steps that send a code | Each call sends a new code and counts toward the limits. |
| Other writes | Not unless the endpoint says so. Check the result before sending again. |
Retrying
| You got | Do |
|---|
A network error or a timeout on a GET | Retry, waiting longer each time. |
502, 503, 504 | Retry after Retry-After when it is present, otherwise after a few seconds. |
429 | Wait as long as the reply says. See Limits. |
400, 401, 403, 404, 409 | Do not retry the same request. Fix what the reply names. |
Time
Most calls answer within a second or two. Calls that have text written by AI take longer, and the chat reply arrives as a stream: read it as it comes.