Developer API errors
Every error is an RFC 9457 problem document with a stable code. What each one means, and which are worth retrying.
Every error the Developer API returns is an RFC 9457 problem document, served
as application/problem+json:
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json{
"type": "https://docs.medos.one/errors/invalid-parameter",
"title": "Invalid parameter",
"status": 400,
"detail": "updatedSince must be an ISO-8601 date-time with an offset, e.g. 2026-11-01T00:00:00Z.",
"instance": "/v1/patients",
"code": "INVALID_PARAMETER",
"requestId": "01JCX6Q4W3J7N8Y2H5K9M1B0VD",
"errors": [
{
"field": "updatedSince",
"detail": "must be an ISO-8601 date-time with an offset, e.g. 2026-11-01T00:00:00Z"
}
]
}| Member | Always present | Meaning |
|---|---|---|
type | Yes | A URI naming the kind of problem. It resolves to that code's page on this site. |
title | Yes | A short summary. Fixed per type; it never varies between occurrences. |
status | Yes | The HTTP status, repeated. |
detail | Yes | What went wrong this time, for a human. Do not parse it. |
instance | Yes | The request path. The query string is deliberately left out, because it can hold a patient's phone number or email. |
code | Yes | The machine-readable code. Branch on this. |
requestId | Yes | Our id for the request. Quote it when you contact us. |
errors | When it applies | One entry per field at fault: field and detail. |
requiredFeature | On FEATURE_NOT_ENTITLED | The feature item the plan lacks. |
Branch on code, never on detail. The codes are a fixed, published list.
The wording of detail can change in any release.
To correlate with your own logs, send your id as x-request-id: 1–64 characters
of A–Z, a–z, 0–9, _ or -. It comes back as requestId. A value in any
other format is replaced with one we generate.
One request is answered in the old shape
A request that carries no x-api-key at all is not identifiable as a
Developer API call, so its 401 comes back in the widget's legacy shape,
{ "statusCode": 401, "status": "failed", "message": "Missing credentials…" }.
If you see that body, the header did not arrive. Check its exact name,
x-api-key, and anything that strips headers between you and us.
Every code
| Status | Code | What it means | Retry? |
|---|---|---|---|
400 | VALIDATION_FAILED | The body failed validation; errors[] lists each field. | No |
400 | UNKNOWN_FIELD | A query parameter or body field this route does not accept. | No |
400 | INVALID_PARAMETER | A value is malformed, out of range, or names something this workspace does not have. | No |
400 | INVALID_ACTING_USER | X-Acting-User-Id is not an MDU_… staff id. | No |
400 | END_USER_REQUIRED | Not returned by any Developer API route. Listed for completeness. | No |
401 | UNAUTHENTICATED | The key is unknown, inactive, expired, or not a Developer API key. | No |
403 | IP_NOT_ALLOWED | The calling address is not on the key's allowlist. | No |
403 | ROUTE_NOT_AVAILABLE | The path is not one of the twenty-four routes. | No |
403 | FEATURE_NOT_ENTITLED | The plan does not include this route's feature item. | No |
403 | ACTING_USER_NOT_A_MEMBER | The acting user is not an active member of this workspace. | No |
404 | NOT_FOUND | No such record in this workspace, or a /v2 path. | No |
405 | METHOD_NOT_ALLOWED | The path exists with other methods, listed in Allow. | No |
406 | NOT_ACCEPTABLE | Accept allows neither JSON nor PDF. | No |
409 | CONFLICT | The write conflicts with an existing record. | After re-reading |
415 | UNSUPPORTED_MEDIA_TYPE | A body that is not application/json. | No |
429 | RATE_LIMITED | Over a rate limit. | Yes, after Retry-After |
4xx | UPSTREAM_REJECTED | The Medos core refused the request; status is its status. | No |
500 | INTERNAL_ERROR | Our fault. | Yes, with backoff |
502 | UPSTREAM_UNAVAILABLE | The Medos core failed or did not answer. | Yes, with backoff |
The ones that look alike
401 vs 403 IP_NOT_ALLOWED. A 401 means the key itself was not accepted,
and it has the same detail for every cause. Telling you which check failed
would help someone guessing keys more than it helps you. A 403 IP_NOT_ALLOWED
means the key is fine and the address is not; detail names the address we
saw. Check IPv4 against IPv6 first: a dual-stack server often arrives over the
family you did not register. See IP allowlist.
403 ROUTE_NOT_AVAILABLE vs 403 FEATURE_NOT_ENTITLED. The first means the
route is not in the Developer API at all, usually a widget route such as booking,
so no grant will open it. The second means the route is in the API, but your plan
does not include it yet. See Entitlements.
404 on someone else's record. A patient, appointment or prescription that
belongs to another clinic is a 404, exactly like one that does not exist. A
403 would confirm it exists.
INVALID_PARAMETER instead of an empty page. A filter that names something
this workspace does not have, such as an unknown doctorId, is a 400 rather
than 200 with no rows. Empty results would read as "this practitioner has no
records", which is a wrong answer rather than an error you can see.
An upstream 401/403 is a 500. If the Medos core refuses the gateway's
own credential, that is our misconfiguration, not your key, so it is reported as
500 INTERNAL_ERROR rather than a 403 that would send you to check a key that
works.
Isolate it with one request
Call GET /v1/addresses with nothing but
x-api-key, from the server that will run your integration. If that answers
200, the key, the address and the plan are all fine, and the problem is in how
the failing request is built.
Retrying safely
Every route but seven is a read, so retrying is always safe. Of the seven writes:
- The patient upsert is safe to retry
when the body carries
idormrnNumber: a retry then finds the record the first attempt created and updates it. Without either, a retry after a timeout can create a second patient. - Recording vitals records a new reading on every successful call. After a timeout, read the patient's vitals before retrying, or a retry can record the reading twice.
- Replacing a medical history
is a
PUTthat sets all three lists to what you send, so repeating it is always safe. - Booking books a new appointment on every successful call. After a timeout, search the patient's appointments for that day before retrying, or a retry can book the visit twice.
- Rescheduling to the same time again is harmless once the first call landed, though Medos may refuse it as a taken slot. Read the appointment to see which happened.
- Setting a status to the one it
already has is accepted, except that
COMPLETEDandNO_SHOWcannot be left for another status, so read the appointment after a timeout before retrying. - Deleting twice answers
404the second time: the appointment is already gone.
| Status | Retry? |
|---|---|
400, 401, 403, 404, 405, 406, 415 | No. The same request fails the same way; fix it first. |
409 | Re-read the record, then decide. |
429 | Yes, after Retry-After seconds. |
500, 502 | Yes, with exponential backoff and a cap. |