curl -X POST "https://api.haau3.com/v1/fhir/r4/\$process-message" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Bundle",
"id": "pharmacy-benefits-request-non-phi",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-bundle-non-phi|2.0.0-ballot"
]
},
"entry": [
{
"fullUrl": "https://app.example.test/fhir/MessageHeader/non-phi-request",
"resource": {
"resourceType": "MessageHeader",
"id": "non-phi-request",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-messageheader-non-phi|2.0.0-ballot"
]
},
"source": { "name": "Example app", "endpoint": "https://app.example.test" },
"focus": [{ "reference": "https://app.example.test/fhir/Claim/non-phi-claim" }],
"eventCoding": {
"code": "rtpbc-request-non-phi",
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
"display": "RTPBC Non-PHI Request"
},
"definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-request-non-phi"
}
},
{
"fullUrl": "https://app.example.test/fhir/Claim/non-phi-claim",
"resource": {
"resourceType": "Claim",
"id": "non-phi-claim",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-claim-non-phi|2.0.0-ballot"
]
},
"identifier": [{ "value": "price-check-0001" }],
"patient": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "masked"
}
]
},
"provider": {
"extension": [
{
"url": "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-preferredPharmacyPostalCode",
"valueString": "33131"
}
]
},
"insurance": [
{
"coverage": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "masked"
}
]
},
"sequence": 1,
"focal": false
}
],
"item": [
{
"productOrService": {
"coding": [
{
"code": "311354",
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"display": "lisinopril 5 MG Oral Tablet"
}
],
"text": "lisinopril 5 mg 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"
}
]
}
}
}
],
"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 pharmacy benefit check without patient details, as a Bundle.
const body: fhir4.Bundle = JSON.parse(await readFile("request.json", "utf8"));
const bundle = await haau3.processMessage(body);
console.log(bundle.entry?.length ?? 0);
import json
from haau3 import Haau3, fhir
client = Haau3() # reads HAAU3_API_KEY
# request.json holds a pharmacy benefit check without patient details, as a Bundle.
with open("request.json") as file:
body: fhir.Bundle = json.load(file)
bundle = client.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 pharmacy benefit check without patient details
if err != nil {
log.Fatal(err)
}
var body fhir.Bundle
if err := json.Unmarshal(data, &body); err != nil {
log.Fatal(err)
}
bundle, err := client.ProcessMessage(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-non-phi|2.0.0-ballot"
]
},
"entry": [
{
"fullUrl": "urn:uuid:cfe4fe76-8b70-4edc-af4b-7e2f8c25b3e8",
"resource": {
"resourceType": "MessageHeader",
"id": "cfe4fe76-8b70-4edc-af4b-7e2f8c25b3e8",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-messageheader-non-phi|2.0.0-ballot"
]
},
"source": {
"name": "haau3 Pharmacy Benefits",
"endpoint": "https://api.haau3.com/v1/fhir/r4"
},
"response": {
"identifier": "non-phi-request",
"code": "ok"
},
"focus": [
{
"reference": "urn:uuid:a7fb50aa-3ca5-47a1-96f8-67ec1e95546e"
}
],
"eventCoding": {
"code": "rtpbc-response-non-phi",
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
"display": "RTPBC Non-PHI Response"
},
"definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-response-non-phi"
}
},
{
"fullUrl": "urn:uuid:a7fb50aa-3ca5-47a1-96f8-67ec1e95546e",
"resource": {
"resourceType": "ClaimResponse",
"id": "a7fb50aa-3ca5-47a1-96f8-67ec1e95546e",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-claimresponse-non-phi|2.0.0-ballot"
]
},
"identifier": [
{
"value": "a7fb50aa-3ca5-47a1-96f8-67ec1e95546e"
}
],
"patient": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "masked"
}
]
},
"insurer": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "masked"
}
]
},
"request": {
"identifier": {
"value": "price-check-0001"
}
},
"error": [
{
"code": {
"coding": [
{
"code": "no-price-source",
"system": "https://haau3.com/fhir/CodeSystem/pharmacy-benefits-processing-code",
"display": "No price source returned a price"
}
]
}
}
],
"status": "active",
"type": {
"coding": [
{
"code": "pharmacy",
"system": "http://terminology.hl7.org/CodeSystem/claim-type",
"display": "Pharmacy"
}
]
},
"use": "predetermination",
"created": "2026-10-20T14:00:01Z",
"outcome": "error",
"disposition": "No price source this service connects to returned a price for this request."
}
}
],
"type": "message",
"timestamp": "2026-10-20T14:00:01Z"
}{
"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>"
]
}
]
}{
"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 what a medication costs (pharmacy benefit check)
FHIR system-level operation $process-message, as the CARIN Consumer Real-Time Pharmacy Benefit Check (STU2 ballot, 2.0.0-ballot) specifies. POST a FHIR Bundle of type message whose first entry is a MessageHeader with one of two events. rtpbc-request-non-phi asks for a medication’s price without patient details: a Claim naming the product (an NDC of 11 digits with no dashes, or an RxNorm code) and the quantity, with the patient and the coverage masked, and a pharmacy or one or more ZIP codes. rtpbc-request asks what a medication would cost a member under their coverage: the member’s Patient and Coverage, with the payer’s identifier in payor.identifier, the prescription and its prescriber, and a pharmacy. The answer is a message Bundle whose MessageHeader answers the request’s, with one ClaimResponse that carries either prices and coverage in item or the reason there are none in error, and for a member’s request the request’s Patient as it was sent. A check no connected source can answer carries no-responder-for-coverage or no-price-source from https://haau3.com/fhir/CodeSystem/pharmacy-benefits-processing-code. A price is an estimate; the pharmacy confirms the price. A member’s request receives patient data, so send it only under an executed agreement. Nothing a request carries is stored or logged, apart from the request’s ids, and every answer is sent with Cache-Control: no-store. The operation takes no parameters and is not offered inside a batch. The contract is published at https://fhir.haau3.com/pharmacy-benefits.html.
curl -X POST "https://api.haau3.com/v1/fhir/r4/\$process-message" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Bundle",
"id": "pharmacy-benefits-request-non-phi",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-bundle-non-phi|2.0.0-ballot"
]
},
"entry": [
{
"fullUrl": "https://app.example.test/fhir/MessageHeader/non-phi-request",
"resource": {
"resourceType": "MessageHeader",
"id": "non-phi-request",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-messageheader-non-phi|2.0.0-ballot"
]
},
"source": { "name": "Example app", "endpoint": "https://app.example.test" },
"focus": [{ "reference": "https://app.example.test/fhir/Claim/non-phi-claim" }],
"eventCoding": {
"code": "rtpbc-request-non-phi",
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
"display": "RTPBC Non-PHI Request"
},
"definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-request-non-phi"
}
},
{
"fullUrl": "https://app.example.test/fhir/Claim/non-phi-claim",
"resource": {
"resourceType": "Claim",
"id": "non-phi-claim",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-claim-non-phi|2.0.0-ballot"
]
},
"identifier": [{ "value": "price-check-0001" }],
"patient": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "masked"
}
]
},
"provider": {
"extension": [
{
"url": "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-preferredPharmacyPostalCode",
"valueString": "33131"
}
]
},
"insurance": [
{
"coverage": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "masked"
}
]
},
"sequence": 1,
"focal": false
}
],
"item": [
{
"productOrService": {
"coding": [
{
"code": "311354",
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"display": "lisinopril 5 MG Oral Tablet"
}
],
"text": "lisinopril 5 mg 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"
}
]
}
}
}
],
"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 pharmacy benefit check without patient details, as a Bundle.
const body: fhir4.Bundle = JSON.parse(await readFile("request.json", "utf8"));
const bundle = await haau3.processMessage(body);
console.log(bundle.entry?.length ?? 0);
import json
from haau3 import Haau3, fhir
client = Haau3() # reads HAAU3_API_KEY
# request.json holds a pharmacy benefit check without patient details, as a Bundle.
with open("request.json") as file:
body: fhir.Bundle = json.load(file)
bundle = client.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 pharmacy benefit check without patient details
if err != nil {
log.Fatal(err)
}
var body fhir.Bundle
if err := json.Unmarshal(data, &body); err != nil {
log.Fatal(err)
}
bundle, err := client.ProcessMessage(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-non-phi|2.0.0-ballot"
]
},
"entry": [
{
"fullUrl": "urn:uuid:cfe4fe76-8b70-4edc-af4b-7e2f8c25b3e8",
"resource": {
"resourceType": "MessageHeader",
"id": "cfe4fe76-8b70-4edc-af4b-7e2f8c25b3e8",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-messageheader-non-phi|2.0.0-ballot"
]
},
"source": {
"name": "haau3 Pharmacy Benefits",
"endpoint": "https://api.haau3.com/v1/fhir/r4"
},
"response": {
"identifier": "non-phi-request",
"code": "ok"
},
"focus": [
{
"reference": "urn:uuid:a7fb50aa-3ca5-47a1-96f8-67ec1e95546e"
}
],
"eventCoding": {
"code": "rtpbc-response-non-phi",
"system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
"display": "RTPBC Non-PHI Response"
},
"definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-response-non-phi"
}
},
{
"fullUrl": "urn:uuid:a7fb50aa-3ca5-47a1-96f8-67ec1e95546e",
"resource": {
"resourceType": "ClaimResponse",
"id": "a7fb50aa-3ca5-47a1-96f8-67ec1e95546e",
"meta": {
"profile": [
"http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-claimresponse-non-phi|2.0.0-ballot"
]
},
"identifier": [
{
"value": "a7fb50aa-3ca5-47a1-96f8-67ec1e95546e"
}
],
"patient": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "masked"
}
]
},
"insurer": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "masked"
}
]
},
"request": {
"identifier": {
"value": "price-check-0001"
}
},
"error": [
{
"code": {
"coding": [
{
"code": "no-price-source",
"system": "https://haau3.com/fhir/CodeSystem/pharmacy-benefits-processing-code",
"display": "No price source returned a price"
}
]
}
}
],
"status": "active",
"type": {
"coding": [
{
"code": "pharmacy",
"system": "http://terminology.hl7.org/CodeSystem/claim-type",
"display": "Pharmacy"
}
]
},
"use": "predetermination",
"created": "2026-10-20T14:00:01Z",
"outcome": "error",
"disposition": "No price source this service connects to returned a price for this request."
}
}
],
"type": "message",
"timestamp": "2026-10-20T14:00:01Z"
}{
"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>"
]
}
]
}{
"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 (haau3_sk_…), sent as Authorization: Bearer <key>.
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.