Skip to main content
Every service is on the FHIR base, /v1/fhir/r4, and every error a service answers is a FHIR OperationOutcome, sent as application/fhir+json. A FHIR client reads it like any other resource. A request to an address no service serves is the one exception: see addresses no service serves. Each service’s page lists the statuses that service answers for its own reasons. This page covers the ones every service shares.

The OperationOutcome

OperationOutcome
Each entry in issue carries a code from FHIR’s issue types and a details.text saying what went wrong, written for people, so do not parse it. Where haau3 names the reason with a code of its own, details.coding carries it too, so you can act on the code rather than the words. On a 400, expression names the parameter at fault.

Addresses no service serves

A request to an address outside every service’s base, such as a misspelt path or one the API no longer serves, answers a 404 RFC 9457 problem, sent as application/problem+json:
Problem
Problems may gain members over time. Ignore any member you do not recognise.

Statuses every service shares

A 502, a 504, and some 503s come from a source behind a service: see when a source fails. A 403 comes from any service for a key in the wrong mode, and from the two operations that receive patient data: see forbidden.

Forbidden

403, coded forbidden, with haau3’s reason as a code from https://haau3.com/fhir/CodeSystem/api-error in issue.details.coding. Send it again only once what it names has changed.
  • test-key-outside-sandbox, from production: the key is a test key, which works only in the Sandbox. Send a live key. The response carries WWW-Authenticate: Bearer realm="api.haau3.com", error="insufficient_scope". See test and live keys.
  • live-key-in-sandbox, from the Sandbox: the key is a live key, which does not work there. Send a test key. The response carries the same WWW-Authenticate.
  • phi-agreement-required in issue.details.coding, from https://haau3.com/fhir/CodeSystem/api-error: the request was not test data marked as such, and your organization does not have both a business associate agreement (BAA) with haau3 in force and the Team or Scale plan. The operation did not run. Send test data labelled as patient data describes, or request a BAA. When the request was labelled only in part, expression names the first resources without the label. From MedList’s $reconcile-medications and Pharmacy Benefits’ $process-message.
  • not-open-to-customers in issue.details.coding: the operation is not yet open to customers, so it did not run and the request was not read. Pharmacy Benefits’ $process-message refuses every request from a customer’s organization this way (see Pharmacy Benefits). It is an expected answer, not a fault in the request.

Invalid request

400. Something in the request is not valid: a parameter, its value, or the body. The OperationOutcome names each parameter at fault. A parameter the path does not take, or one sent twice, is a 400 too: see parameters.
  • not-the-example, from the Sandbox at https://sandbox.haau3.com, coded from https://haau3.com/fhir/CodeSystem/sandbox-error in issue.details.coding (issue code business-rule). The Sandbox answers each operation’s documented example request with a fixed answer, and this request is not the example. The words name the example to send. A request that production would refuse gets production’s refusal there instead. For any other request, call production with a live key.

Unauthorized

401. No API key was sent, or the key sent was not recognised. The OperationOutcome says which, and the response carries WWW-Authenticate: Bearer realm="api.haau3.com", with error="invalid_token" added when a key was sent. See Authentication.

Not found

404. Nothing is served at this path, or the record asked for does not exist. Under the FHIR base it is an OperationOutcome, and GET /v1/fhir/r4/metadata lists what the base serves; anywhere else it is a problem (see addresses no service serves), and GET /openapi.json lists every path the API serves.

Method not allowed

405. The path exists, but does not take the method sent. The Allow header lists the methods it does take, for example Allow: GET, HEAD, OPTIONS.

Not acceptable

406. The request asked for a format the API does not answer in. Every answer is JSON: see formats. On the FHIR base it is also the answer to a FHIR release this endpoint does not serve.

Unsupported media type

415. A body was posted without saying it is JSON. Send Content-Type: application/fhir+json (application/json is accepted too).

Rate limited

429. Your organization reached one of its plan’s limits. Two can answer, each with a Retry-After header in seconds and a sentence naming the limit:
  • Requests a minute, on every plan. The wait runs to the start of the next minute, so it is at most 60 seconds. Send the request again after it.
  • Requests a month, on the Developer plan only. The wait runs to 00:00 UTC on the 1st of the next month, which can be weeks away, so don’t send it again automatically. Change plan to keep going now.
Each plan’s numbers are in limits. The Sandbox’s own host, sandbox.haau3.com, has two more, counted by IP address, each running to the end of that address’s hour, and a third while it is busy:
  • Requests an hour with no key, 30 from each IP address, an IPv6 address counted by its /64. Send a free test key to raise it.
  • Keys that were not recognised, 30 within an hour from one IP address, an IPv6 address counted by its /48. Until the hour ends, that address’s requests with a key are refused before the key is checked.
  • Busy: when the Sandbox is counting too many addresses to take a new one, a request with no key from a new address is refused, with a Retry-After of a minute. A request with a test key is not.

Server error

500. The server failed to process the request. Send it again once, after a short wait. If it fails again, the request is one we have to fix.

Unavailable

503. The service cannot answer right now. When the response carries Retry-After, wait that many seconds before sending the request again. The OperationOutcome says what is unavailable: a source rate limiting requests is coded throttled (see when a source fails), and a source this deployment does not have is coded not-supported. Any request can get a 503 with Retry-After when its API key could not be checked just now, coded transient. So can a Slot or Schedule request when the scheduling store is unavailable or slow, and an $in-network request that asks about a pharmacy when the Part D pharmacy network data is. None of these says anything about the request: send it again after the wait.

When a source fails

Four services answer from a source behind them: terminology (LOINC), the provider directory (CMS’s National Provider Directory), Questionnaires (LOINC, and a form’s own publisher) and Medical Benefits’ $in-network (the provider directory). When the source fails, the service says so in an OperationOutcome. It never answers with a guess, an empty result or “not found” in place of the answer it could not get. Pharmacy Benefits asks several price sources at once, so it answers a failing source differently: the prices that did come back are the answer, and the source that failed is named in a note. Only when no price came back and a source failed is the answer a 503, coded transient with source-unavailable in issue.details.coding, and Retry-After (see Pharmacy Benefits). Before answering any of these, the service has already asked its source a second time when that could help, after waiting a moment, and waited as long as the source asked when that was 5 seconds or less. Inside a batch Bundle, a throttled entry answers 503 but carries no Retry-After, because an entry has no headers of its own. Wait 2 seconds and send that entry again.

Methods

  • 405 and Allow. A method a path does not take answers 405 with an Allow header naming the methods it does take.
  • HEAD answers exactly like GET on every path that takes GET, without the body.
  • OPTIONS answers 204 with the Allow header and no body. Like every request to a service, it needs an API key.
Inside a batch Bundle, an entry gets the answer the same request would get on its own. A 405 there has no header to carry, so its OperationOutcome names the methods instead.

Formats

Every answer is JSON. A request whose Accept header admits no JSON gets a 406 rather than JSON it did not ask for. These admit JSON: application/json, application/fhir+json, application/json+fhir, text/json, application/* and */*, with any parameters. No Accept header at all is fine too. On the FHIR base, _format takes precedence over Accept: json, application/json, application/fhir+json, application/json+fhir and text/json are served, and any other value is a 406. A POST to the FHIR base must say its body is JSON, with Content-Type: application/fhir+json or one of the types above. A body sent without one gets a 415.

Limits

Every API open to customers today is included in every plan. Free to start on the Developer plan. Each plan has two limits, counted for your organization across all of its keys: A month is a calendar month in UTC. Each entry in a batch counts as a request of its own, under its own service, and GET metadata counts as none, on the FHIR base and in the Sandbox. A 5xx, a 401, a 429 and a 403 for a key in the wrong mode do not count, and neither does a batch entry answered with a 5xx. On the Developer plan, a batch sent before the allowance is used up is answered whole, and the next request is refused. If an organization keeps going past its allowance, we’ll get in touch about a plan that fits. The minute limit counts every request sent with your organization’s keys, a batch as one, and a request past it is a 429 on every plan (see rate limited). The Sandbox counts apart. A test key’s requests there count toward a minute of their own, at your plan’s number and apart from your production requests, and never toward the month, at sandbox.haau3.com and at /v1/sandbox/fhir/r4 alike; the Usage page shows them as one line beside your services and leaves them out of the month’s total. A call to sandbox.haau3.com with no key is counted by its IP address instead, 30 an hour, and by no organization (see the Sandbox without a key). Your organization’s count for this month is on the dashboard’s Overview and Usage pages at platform.haau3.com, and the plans are on pricing. Every request also has bounds of its own, whatever the plan: The largest batch most callers need is far smaller: a batch of 50 lookups is a few kilobytes. A source or store that does not answer in time is a 504. When your API key could not be checked, or the scheduling store is unavailable or slow, the answer is a 503 with Retry-After (see unavailable). Neither says anything about your request, so send it again after a short wait. A first call after a quiet period can take up to about 30 seconds while the service starts, and calls after it are faster. Set your timeout above that and allow one retry; each SDK’s defaults (65 seconds and one retry) already do.

Paging

A list that can be long comes back a page at a time, in one of four ways, each its service’s own: Every other list comes back whole in one answer: a Questionnaire search (with total), $counties and $in-network.

Caching and compression

Every JSON answer is compressed with gzip when the request’s Accept-Encoding allows it, and says so in Content-Encoding. Most HTTP clients ask for this and undo it without being told. The Slot Publisher’s NDJSON files are sent uncompressed.

Parameters

Each operation takes the parameters the API reference lists for it, and no others. A parameter it does not take gets a 400 that names it, rather than an answer as if it had not been sent, so a misspelt filter never comes back as an unfiltered answer that looks right. Every parameter at fault is named at once, one OperationOutcome issue each, its expression naming the parameter. The words list the parameters the operation does take. For example, a Slot search sent startafter, which it does not take:
  • A parameter sent twice is refused the same way, unless the API reference says it repeats, as property does on CodeSystem/$lookup. A search’s alternatives for one parameter, such as several codes, are one parameter whose values are separated by commas.
  • A read (GET [base]/[type]/[id]), a batch, $reconcile-medications and $process-message take no parameters. A batch entry carries its own in its request.url, and each entry is checked as the same request on its own would be.
  • _format belongs to the FHIR base and is taken on every path there (see formats).
  • A Parameters body, when an operation is called with POST, follows the same rules: a parameter the operation does not take is refused, each parameter needs a name and a value, and a name sent both in the URL and in the body counts as sent twice.
Names are checked before values. Once every parameter is one the operation takes, a value that is not valid is named in the same way.

Request ids

Every response carries an X-Request-Id header holding a UUID that haau3 gave the request, errors included. An OperationOutcome is unchanged: the id is in the header only. A problem, the answer for an address no service serves, carries the same id as its instance, written urn:uuid:<id>. Email support is hello@haau3.com. To ask about a response, send its X-Request-Id and the time you sent the request. haau3 can find a request by its id for 30 days, so ask within that time. You can also send an id of your own. Put a UUID in the request’s X-Request-Id header, and the response carries it back in X-Correlation-Id, beside haau3’s id. haau3 keeps your id with its record of the request, so a question can name either one. A value that is not a UUID is ignored: it is not kept, and it does not come back.

Changes

Changes to what the API takes and answers are recorded on the changelog, newest first, under the day each took effect.