curl -X POST "https://api.haau3.com/v1/sandbox/fhir/r4/\$process-message" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Bundle",
"id": "sandbox-mei-lin-priced",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-bundle|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"entry": [
{
"fullUrl": "https://app.example.test/fhir/MessageHeader/phi-request",
"resource": {
"resourceType": "MessageHeader",
"id": "phi-request",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-messageheader|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"source": { "name": "Example app", "endpoint": "https://app.example.test" },
"focus": [{ "reference": "Claim/phi-claim" }],
"eventCoding": {
"code": "rtpbc-request",
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
"display": "RTPBC Request"
},
"definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-request"
}
},
{
"fullUrl": "https://app.example.test/fhir/Claim/phi-claim",
"resource": {
"resourceType": "Claim",
"id": "phi-claim",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-claim|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [{ "value": "sandbox-mei-lin-priced" }],
"patient": { "reference": "Patient/phi-patient" },
"provider": { "reference": "Organization/phi-pharmacy" },
"prescription": { "reference": "MedicationRequest/phi-prescription" },
"careTeam": [{ "provider": { "reference": "Practitioner/phi-prescriber" }, "sequence": 1 }],
"insurance": [
{
"coverage": { "reference": "Coverage/phi-coverage" },
"sequence": 1,
"focal": true
}
],
"item": [
{
"careTeamSequence": [1],
"productOrService": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "311354",
"display": "lisinopril 5 MG Oral Tablet"
}
]
},
"quantity": {
"value": 30,
"unit": "{Each}",
"system": "http://unitsofmeasure.org",
"code": "{Each}"
},
"sequence": 1
}
],
"status": "active",
"type": {
"coding": [
{
"code": "pharmacy",
"system": "http://terminology.hl7.org/CodeSystem/claim-type",
"display": "Pharmacy"
}
]
},
"use": "predetermination",
"created": "2026-10-20T14:00:00Z",
"priority": {
"coding": [
{
"code": "normal",
"system": "http://terminology.hl7.org/CodeSystem/processpriority",
"display": "Normal"
}
]
}
}
},
{
"fullUrl": "https://app.example.test/fhir/Patient/phi-patient",
"resource": {
"resourceType": "Patient",
"id": "phi-patient",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-patient|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [
{ "system": "https://app.example.test/patients", "value": "example-0001" },
{
"system": "https://example-health-plan.test/member-id",
"value": "EX0000001"
}
],
"name": [{ "given": ["Mei"], "family": "Lin" }],
"gender": "female",
"birthDate": "1958-03-14"
}
},
{
"fullUrl": "https://app.example.test/fhir/Coverage/phi-coverage",
"resource": {
"resourceType": "Coverage",
"id": "phi-coverage",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-coverage|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"beneficiary": { "reference": "Patient/phi-patient" },
"payor": [
{
"identifier": {
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType",
"code": "payerid"
}
]
},
"system": "https://payers.example.test",
"value": "SANDBOX-EHP"
},
"display": "Example Health Plan"
}
],
"class": [
{
"type": {
"coding": [
{
"code": "rxbin",
"system": "http://terminology.hl7.org/CodeSystem/coverage-class"
}
]
},
"value": "000000"
},
{
"type": {
"coding": [
{
"code": "rxpcn",
"system": "http://terminology.hl7.org/CodeSystem/coverage-class"
}
]
},
"value": "EXAMPLE"
},
{
"type": {
"coding": [
{
"code": "rxgroup",
"system": "http://terminology.hl7.org/CodeSystem/coverage-class"
}
]
},
"value": "EXGROUP01"
},
{
"type": {
"coding": [
{
"code": "rxid",
"system": "http://terminology.hl7.org/CodeSystem/coverage-class"
}
]
},
"value": "EX0000001"
}
],
"status": "active",
"subscriberId": "EX0000001",
"relationship": {
"coding": [
{
"code": "self",
"system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship"
}
]
}
}
},
{
"fullUrl": "https://app.example.test/fhir/MedicationRequest/phi-prescription",
"resource": {
"resourceType": "MedicationRequest",
"id": "phi-prescription",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-medicationrequest|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "311354",
"display": "lisinopril 5 MG Oral Tablet"
}
]
},
"subject": { "reference": "Patient/phi-patient" },
"requester": { "reference": "Practitioner/phi-prescriber" },
"dispenseRequest": {
"quantity": {
"value": 30,
"unit": "{Each}",
"system": "http://unitsofmeasure.org",
"code": "{Each}"
},
"expectedSupplyDuration": {
"value": 30,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
},
"performer": { "reference": "Organization/phi-pharmacy" }
},
"substitution": { "allowedBoolean": true },
"status": "draft",
"intent": "proposal",
"authoredOn": "2026-10-20"
}
},
{
"fullUrl": "https://app.example.test/fhir/Practitioner/phi-prescriber",
"resource": {
"resourceType": "Practitioner",
"id": "phi-prescriber",
"meta": {
"profile": ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|8.0.1"],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [{ "system": "http://hl7.org/fhir/sid/us-npi", "value": "2900000011" }],
"name": [{ "given": ["Ada"], "suffix": ["MD"], "family": "Okafor" }]
}
},
{
"fullUrl": "https://app.example.test/fhir/Organization/phi-pharmacy",
"resource": {
"resourceType": "Organization",
"id": "phi-pharmacy",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-pharmacy-organization|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [{ "system": "http://hl7.org/fhir/sid/us-npi", "value": "2900000003" }],
"type": [
{
"coding": [
{
"code": "R",
"system": "http://terminology.hl7.org/CodeSystem/NCPDPPharmacyType",
"display": "Retail"
}
]
}
],
"telecom": [{ "system": "phone", "value": "305-555-0100" }],
"address": [
{
"line": ["100 Example Street"],
"city": "Miami",
"state": "FL",
"postalCode": "33131",
"country": "US"
}
],
"active": true,
"name": "Example Pharmacy"
}
}
],
"type": "message",
"timestamp": "2026-10-20T14:00:00Z"
}'import { readFile } from "node:fs/promises";
import { Haau3, type fhir4 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
// request.json holds a test member's pharmacy benefit check, as a Bundle.
const body: fhir4.Bundle = JSON.parse(await readFile("request.json", "utf8"));
const bundle = await haau3.sandboxProcessMessage(body);
console.log(bundle.entry?.length ?? 0);
import json
from haau3 import Haau3, fhir
client = Haau3() # reads HAAU3_API_KEY
# request.json holds a test member's pharmacy benefit check, as a Bundle.
with open("request.json") as file:
body: fhir.Bundle = json.load(file)
bundle = client.sandbox_process_message(body)
print(len(bundle.get("entry", [])))
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"github.com/haau3/haau3-go"
"github.com/haau3/haau3-go/fhir"
)
func main() {
ctx := context.Background()
client, err := haau3.NewClient() // reads HAAU3_API_KEY
if err != nil {
log.Fatal(err)
}
data, err := os.ReadFile("request.json") // a test member's pharmacy benefit check
if err != nil {
log.Fatal(err)
}
var body fhir.Bundle
if err := json.Unmarshal(data, &body); err != nil {
log.Fatal(err)
}
bundle, err := client.SandboxProcessMessage(ctx, &body)
if err != nil {
log.Fatal(err)
}
fmt.Println(len(bundle.Entry))
}
{
"resourceType": "Bundle",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-bundle|2.0.0-ballot"
]
},
"type": "message",
"timestamp": "2026-10-27T12:00:00Z",
"entry": [
{
"fullUrl": "urn:uuid:5a4db0c5-0001-4000-8000-000000000001",
"resource": {
"resourceType": "MessageHeader",
"id": "5a4db0c5-0001-4000-8000-000000000001",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-messageheader|2.0.0-ballot"
]
},
"eventCoding": {
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
"code": "rtpbc-response",
"display": "RTPBC Response"
},
"source": {
"name": "haau3 Sandbox",
"endpoint": "https://api.haau3.com/v1/sandbox/fhir/r4"
},
"response": {
"identifier": "phi-request",
"code": "ok"
},
"focus": [
{
"reference": "urn:uuid:5a4db0c5-0001-4000-8000-000000000002"
}
],
"definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-response"
}
},
{
"fullUrl": "urn:uuid:5a4db0c5-0001-4000-8000-000000000002",
"resource": {
"resourceType": "ClaimResponse",
"id": "5a4db0c5-0001-4000-8000-000000000002",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-claimresponse|2.0.0-ballot"
]
},
"identifier": [
{
"value": "5a4db0c5-0001-4000-8000-000000000002"
}
],
"status": "active",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/claim-type",
"code": "pharmacy",
"display": "Pharmacy"
}
]
},
"use": "predetermination",
"patient": {
"reference": "https://app.example.test/fhir/Patient/phi-patient"
},
"created": "2026-10-27T12:00:00Z",
"insurer": {
"identifier": {
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType",
"code": "payerid"
}
]
},
"system": "https://payers.example.test",
"value": "SANDBOX-EHP"
},
"display": "Example Health Plan"
},
"request": {
"identifier": {
"value": "sandbox-mei-lin-priced"
}
},
"outcome": "complete",
"disposition": "Processed. A synthetic answer from Example Health Plan, haau3's test insurer.",
"item": [
{
"extension": [
{
"url": "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-benefitRestriction",
"valueCoding": {
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-benefit-restriction-temporary",
"code": "covered",
"display": "Covered"
}
}
],
"itemSequence": 1,
"adjudication": [
{
"category": {
"coding": [
{
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-patient-pay-type-temporary",
"code": "copay",
"display": "Copay"
}
]
},
"amount": {
"value": 10,
"currency": "USD"
}
},
{
"category": {
"coding": [
{
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-patient-pay-type-temporary",
"code": "total",
"display": "Total patient responsibility"
}
]
},
"amount": {
"value": 10,
"currency": "USD"
}
}
]
}
],
"processNote": [
{
"number": 1,
"text": "Synthetic answer from Example Health Plan, haau3's test insurer, for test member Mei Lin: formulary row \"Priced with a copay\". Not a real price or benefit."
}
]
}
},
{
"fullUrl": "https://app.example.test/fhir/Patient/phi-patient",
"resource": {
"resourceType": "Patient",
"id": "phi-patient",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-patient|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [
{
"system": "https://app.example.test/patients",
"value": "example-0001"
},
{
"system": "https://example-health-plan.test/member-id",
"value": "EX0000001"
}
],
"name": [
{
"given": [
"Mei"
],
"family": "Lin"
}
],
"gender": "female",
"birthDate": "1958-03-14"
}
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "forbidden",
"details": {
"coding": [
{
"system": "https://haau3.com/fhir/CodeSystem/api-error",
"code": "live-key-in-sandbox",
"display": "Live key in the Sandbox"
}
],
"text": "This is a live key, which does not work in the Sandbox. Send this request with a test key; create one in the dashboard. See https://docs.haau3.com/authentication#test-and-live-keys"
}
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}Check a test member's medication cost with a test insurer
The Sandbox’s pharmacy benefit check: the same operation as /v1/fhir/r4/$process-message, at the Sandbox’s FHIR base, /v1/sandbox/fhir/r4, where Example Health Plan, a test insurer, answers the CARIN Consumer Real-Time Pharmacy Benefit Check (STU2 ballot, 2.0.0-ballot) as a payer would, with synthetic data. Every organization may call it on every plan, and each request counts like any other. POST a FHIR Bundle of type message whose first entry is a MessageHeader with the event rtpbc-request: a member’s request, with the member’s Patient and Coverage, the prescription and its prescriber, and a pharmacy. A request is read by the same rules as Pharmacy Benefits’ member’s request. The member must be one of the test insurer’s test members, named by member ID in Coverage.subscriberId, the Coverage’s rxid class, or a Patient identifier whose system is https://example-health-plan.test/member-id; a request for anyone else is answered the error no-test-member and nothing else. Send test members only, never a real person. Each medication in the test insurer’s formulary table always gets the same answer, by its RxNorm code or NDC: priced with a copay, covered at $0 with an alternative, not covered with an alternative, prior authorization required, or a quantity limit. Any other medication gets a default priced answer, and one test member’s requests are always declined, insurer-declined. Both errors are coded from https://haau3.com/fhir/CodeSystem/sandbox-error in ClaimResponse.error. The answer is a message Bundle whose MessageHeader answers the request’s, with one ClaimResponse naming the insurer by its Payer ID, SANDBOX-EHP, and the request’s Patient as it was sent, a test member’s labelled HTEST; a process note says which test member and formulary row answered. Amounts are fixed, whatever the quantity. Nothing a request carries is stored or logged, and every answer is sent with Cache-Control: no-store. The operation takes no query parameters. The test members and the formulary table are at https://docs.haau3.com/sandbox/example-health-plan.
curl -X POST "https://api.haau3.com/v1/sandbox/fhir/r4/\$process-message" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Bundle",
"id": "sandbox-mei-lin-priced",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-bundle|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"entry": [
{
"fullUrl": "https://app.example.test/fhir/MessageHeader/phi-request",
"resource": {
"resourceType": "MessageHeader",
"id": "phi-request",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-messageheader|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"source": { "name": "Example app", "endpoint": "https://app.example.test" },
"focus": [{ "reference": "Claim/phi-claim" }],
"eventCoding": {
"code": "rtpbc-request",
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
"display": "RTPBC Request"
},
"definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-request"
}
},
{
"fullUrl": "https://app.example.test/fhir/Claim/phi-claim",
"resource": {
"resourceType": "Claim",
"id": "phi-claim",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-claim|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [{ "value": "sandbox-mei-lin-priced" }],
"patient": { "reference": "Patient/phi-patient" },
"provider": { "reference": "Organization/phi-pharmacy" },
"prescription": { "reference": "MedicationRequest/phi-prescription" },
"careTeam": [{ "provider": { "reference": "Practitioner/phi-prescriber" }, "sequence": 1 }],
"insurance": [
{
"coverage": { "reference": "Coverage/phi-coverage" },
"sequence": 1,
"focal": true
}
],
"item": [
{
"careTeamSequence": [1],
"productOrService": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "311354",
"display": "lisinopril 5 MG Oral Tablet"
}
]
},
"quantity": {
"value": 30,
"unit": "{Each}",
"system": "http://unitsofmeasure.org",
"code": "{Each}"
},
"sequence": 1
}
],
"status": "active",
"type": {
"coding": [
{
"code": "pharmacy",
"system": "http://terminology.hl7.org/CodeSystem/claim-type",
"display": "Pharmacy"
}
]
},
"use": "predetermination",
"created": "2026-10-20T14:00:00Z",
"priority": {
"coding": [
{
"code": "normal",
"system": "http://terminology.hl7.org/CodeSystem/processpriority",
"display": "Normal"
}
]
}
}
},
{
"fullUrl": "https://app.example.test/fhir/Patient/phi-patient",
"resource": {
"resourceType": "Patient",
"id": "phi-patient",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-patient|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [
{ "system": "https://app.example.test/patients", "value": "example-0001" },
{
"system": "https://example-health-plan.test/member-id",
"value": "EX0000001"
}
],
"name": [{ "given": ["Mei"], "family": "Lin" }],
"gender": "female",
"birthDate": "1958-03-14"
}
},
{
"fullUrl": "https://app.example.test/fhir/Coverage/phi-coverage",
"resource": {
"resourceType": "Coverage",
"id": "phi-coverage",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-coverage|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"beneficiary": { "reference": "Patient/phi-patient" },
"payor": [
{
"identifier": {
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType",
"code": "payerid"
}
]
},
"system": "https://payers.example.test",
"value": "SANDBOX-EHP"
},
"display": "Example Health Plan"
}
],
"class": [
{
"type": {
"coding": [
{
"code": "rxbin",
"system": "http://terminology.hl7.org/CodeSystem/coverage-class"
}
]
},
"value": "000000"
},
{
"type": {
"coding": [
{
"code": "rxpcn",
"system": "http://terminology.hl7.org/CodeSystem/coverage-class"
}
]
},
"value": "EXAMPLE"
},
{
"type": {
"coding": [
{
"code": "rxgroup",
"system": "http://terminology.hl7.org/CodeSystem/coverage-class"
}
]
},
"value": "EXGROUP01"
},
{
"type": {
"coding": [
{
"code": "rxid",
"system": "http://terminology.hl7.org/CodeSystem/coverage-class"
}
]
},
"value": "EX0000001"
}
],
"status": "active",
"subscriberId": "EX0000001",
"relationship": {
"coding": [
{
"code": "self",
"system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship"
}
]
}
}
},
{
"fullUrl": "https://app.example.test/fhir/MedicationRequest/phi-prescription",
"resource": {
"resourceType": "MedicationRequest",
"id": "phi-prescription",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-medicationrequest|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "311354",
"display": "lisinopril 5 MG Oral Tablet"
}
]
},
"subject": { "reference": "Patient/phi-patient" },
"requester": { "reference": "Practitioner/phi-prescriber" },
"dispenseRequest": {
"quantity": {
"value": 30,
"unit": "{Each}",
"system": "http://unitsofmeasure.org",
"code": "{Each}"
},
"expectedSupplyDuration": {
"value": 30,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
},
"performer": { "reference": "Organization/phi-pharmacy" }
},
"substitution": { "allowedBoolean": true },
"status": "draft",
"intent": "proposal",
"authoredOn": "2026-10-20"
}
},
{
"fullUrl": "https://app.example.test/fhir/Practitioner/phi-prescriber",
"resource": {
"resourceType": "Practitioner",
"id": "phi-prescriber",
"meta": {
"profile": ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|8.0.1"],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [{ "system": "http://hl7.org/fhir/sid/us-npi", "value": "2900000011" }],
"name": [{ "given": ["Ada"], "suffix": ["MD"], "family": "Okafor" }]
}
},
{
"fullUrl": "https://app.example.test/fhir/Organization/phi-pharmacy",
"resource": {
"resourceType": "Organization",
"id": "phi-pharmacy",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-pharmacy-organization|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [{ "system": "http://hl7.org/fhir/sid/us-npi", "value": "2900000003" }],
"type": [
{
"coding": [
{
"code": "R",
"system": "http://terminology.hl7.org/CodeSystem/NCPDPPharmacyType",
"display": "Retail"
}
]
}
],
"telecom": [{ "system": "phone", "value": "305-555-0100" }],
"address": [
{
"line": ["100 Example Street"],
"city": "Miami",
"state": "FL",
"postalCode": "33131",
"country": "US"
}
],
"active": true,
"name": "Example Pharmacy"
}
}
],
"type": "message",
"timestamp": "2026-10-20T14:00:00Z"
}'import { readFile } from "node:fs/promises";
import { Haau3, type fhir4 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
// request.json holds a test member's pharmacy benefit check, as a Bundle.
const body: fhir4.Bundle = JSON.parse(await readFile("request.json", "utf8"));
const bundle = await haau3.sandboxProcessMessage(body);
console.log(bundle.entry?.length ?? 0);
import json
from haau3 import Haau3, fhir
client = Haau3() # reads HAAU3_API_KEY
# request.json holds a test member's pharmacy benefit check, as a Bundle.
with open("request.json") as file:
body: fhir.Bundle = json.load(file)
bundle = client.sandbox_process_message(body)
print(len(bundle.get("entry", [])))
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"github.com/haau3/haau3-go"
"github.com/haau3/haau3-go/fhir"
)
func main() {
ctx := context.Background()
client, err := haau3.NewClient() // reads HAAU3_API_KEY
if err != nil {
log.Fatal(err)
}
data, err := os.ReadFile("request.json") // a test member's pharmacy benefit check
if err != nil {
log.Fatal(err)
}
var body fhir.Bundle
if err := json.Unmarshal(data, &body); err != nil {
log.Fatal(err)
}
bundle, err := client.SandboxProcessMessage(ctx, &body)
if err != nil {
log.Fatal(err)
}
fmt.Println(len(bundle.Entry))
}
{
"resourceType": "Bundle",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-bundle|2.0.0-ballot"
]
},
"type": "message",
"timestamp": "2026-10-27T12:00:00Z",
"entry": [
{
"fullUrl": "urn:uuid:5a4db0c5-0001-4000-8000-000000000001",
"resource": {
"resourceType": "MessageHeader",
"id": "5a4db0c5-0001-4000-8000-000000000001",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-messageheader|2.0.0-ballot"
]
},
"eventCoding": {
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
"code": "rtpbc-response",
"display": "RTPBC Response"
},
"source": {
"name": "haau3 Sandbox",
"endpoint": "https://api.haau3.com/v1/sandbox/fhir/r4"
},
"response": {
"identifier": "phi-request",
"code": "ok"
},
"focus": [
{
"reference": "urn:uuid:5a4db0c5-0001-4000-8000-000000000002"
}
],
"definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-response"
}
},
{
"fullUrl": "urn:uuid:5a4db0c5-0001-4000-8000-000000000002",
"resource": {
"resourceType": "ClaimResponse",
"id": "5a4db0c5-0001-4000-8000-000000000002",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-claimresponse|2.0.0-ballot"
]
},
"identifier": [
{
"value": "5a4db0c5-0001-4000-8000-000000000002"
}
],
"status": "active",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/claim-type",
"code": "pharmacy",
"display": "Pharmacy"
}
]
},
"use": "predetermination",
"patient": {
"reference": "https://app.example.test/fhir/Patient/phi-patient"
},
"created": "2026-10-27T12:00:00Z",
"insurer": {
"identifier": {
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType",
"code": "payerid"
}
]
},
"system": "https://payers.example.test",
"value": "SANDBOX-EHP"
},
"display": "Example Health Plan"
},
"request": {
"identifier": {
"value": "sandbox-mei-lin-priced"
}
},
"outcome": "complete",
"disposition": "Processed. A synthetic answer from Example Health Plan, haau3's test insurer.",
"item": [
{
"extension": [
{
"url": "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-benefitRestriction",
"valueCoding": {
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-benefit-restriction-temporary",
"code": "covered",
"display": "Covered"
}
}
],
"itemSequence": 1,
"adjudication": [
{
"category": {
"coding": [
{
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-patient-pay-type-temporary",
"code": "copay",
"display": "Copay"
}
]
},
"amount": {
"value": 10,
"currency": "USD"
}
},
{
"category": {
"coding": [
{
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-patient-pay-type-temporary",
"code": "total",
"display": "Total patient responsibility"
}
]
},
"amount": {
"value": 10,
"currency": "USD"
}
}
]
}
],
"processNote": [
{
"number": 1,
"text": "Synthetic answer from Example Health Plan, haau3's test insurer, for test member Mei Lin: formulary row \"Priced with a copay\". Not a real price or benefit."
}
]
}
},
{
"fullUrl": "https://app.example.test/fhir/Patient/phi-patient",
"resource": {
"resourceType": "Patient",
"id": "phi-patient",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-patient|2.0.0-ballot"
],
"security": [
{
"code": "HTEST",
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"display": "test health data"
}
]
},
"identifier": [
{
"system": "https://app.example.test/patients",
"value": "example-0001"
},
{
"system": "https://example-health-plan.test/member-id",
"value": "EX0000001"
}
],
"name": [
{
"given": [
"Mei"
],
"family": "Lin"
}
],
"gender": "female",
"birthDate": "1958-03-14"
}
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "forbidden",
"details": {
"coding": [
{
"system": "https://haau3.com/fhir/CodeSystem/api-error",
"code": "live-key-in-sandbox",
"display": "Live key in the Sandbox"
}
],
"text": "This is a live key, which does not work in the Sandbox. Send this request with a test key; create one in the dashboard. See https://docs.haau3.com/authentication#test-and-live-keys"
}
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}Authorizations
Your platform API key, sent as Authorization: Bearer <key>: a live key (haau3_sk_live_…) for every service, or a test key (haau3_sk_test_…) for the Sandbox, the one place a test key works and a live key does not.
Headers
An id of your own for this request, as a UUID. It comes back in the X-Correlation-Id header and is kept with haau3's record of the request. Any value that is not a UUID is ignored. See https://docs.haau3.com/errors#request-ids.
Body
Response
The answer: a FHIR Bundle of type message with a MessageHeader, one ClaimResponse and the request's Patient, returned as the response body itself. The ClaimResponse carries the formulary table's answer in item and any alternative in addItem, or no-test-member or insurer-declined in error.