> ## Documentation Index
> Fetch the complete documentation index at: https://docs.haau3.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pharmacy Benefits

> What a medication would cost: the CARIN Consumer Real-Time Pharmacy Benefit Check as FHIR R4 messaging, for a member's coverage or for cash prices near a ZIP code.

Pharmacy Benefits is one of haau3's two Benefits services, the two halves of CMS's Real-Time
Benefits use case. Pharmacy Benefits answers what a medication would cost, in real time, from the
sources it connects to; [Plan Benefits](/benefits/medical) answers what a Medicare Advantage or
Marketplace plan covers and what a member pays, from CMS's plan files.

Ask what a medication would cost: its price at pharmacies near a ZIP code, with no patient
details, or what it would cost a member under their pharmacy coverage. The exchange is the
[CARIN Consumer Real-Time Pharmacy Benefit Check](https://hl7.org/fhir/us/carin-rtpbc/2026May/)
(STU2 ballot, `2.0.0-ballot`): you POST a FHIR `message` Bundle and get the answer in the same
exchange.

<Note>
  **No source is connected yet.** Until the first price source and insurer are connected, every
  check is answered with the reason it could not be priced, never with a price made up in its
  place. The answers below show exactly what comes back today. A price, once a source gives one,
  is an estimate; the pharmacy confirms the price.
</Note>

<Warning>
  **A member's request carries patient data.** Send the `rtpbc-request` message only under an
  executed agreement with haau3, as the [terms](https://platform.haau3.com/terms) require. The
  request without patient details carries none. Nothing you send is stored, cached or logged. See
  [Data handling](#data-handling).
</Warning>

## Service base

```
https://api.haau3.com/v1/fhir/r4
```

Everything hangs off that base, exactly as the FHIR REST specification describes. `/v1/`
is the version of the haau3 platform API contract, **not** a FHIR version. The FHIR release is
`r4`, and every response says so:

```
Content-Type: application/fhir+json; fhirVersion=4.0
```

You never have to ask for a release. A plain `Accept: application/fhir+json`, or no `Accept`
header at all, works fine. If you do ask for one we do not serve, or for a format other than JSON
(in `Accept` or `_format`), you get a `406` rather than a silent substitution.

Every error on this base is a FHIR `OperationOutcome`, including the `401` you get without a key
and a `429`, so a FHIR client only ever has one error shape to parse.
[Errors, limits and request ids](/errors) lists the statuses every service shares.

<Note>
  The uppercase form `/v1/fhir/R4/...` redirects to the lowercase base with a `308`, which
  preserves the method and body so a POST is not quietly turned into a GET.
</Note>

The [Terminology service](/terminology/terminology-service), the
[Provider directory](/provider-directory/provider-directory),
[Questionnaires](/questionnaires/questionnaires), [Plan Benefits](/benefits/medical) and
[MedList](/medlist/medlist) use this same base and the same `CapabilityStatement`. This operation
is declared under `rest.operation`, beside MedList's.

## What is served

One operation, on the service base itself:

| Operation | Call |
| - | - |
| `$process-message` | `POST [base]/$process-message` |

`GET [base]/metadata` returns the `CapabilityStatement`, which lists this operation under
`rest.operation` and names CARIN's responder statement in `instantiates`. The operation accepts
`POST` only, with `Content-Type: application/fhir+json`, and it needs an API key (see
[Authentication](/authentication)). It takes no parameters: it answers synchronously, and its input
is the message Bundle sent as the body.

Every request is a `Bundle` of type `message` whose first entry is a `MessageHeader`. The
header's `eventCoding` says which of two messages it is, from the system
`http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type`:

| Event | Asks | Answered by |
| - | - | - |
| `rtpbc-request-non-phi` | A medication's price at pharmacies near a ZIP code, or at one pharmacy, without patient details | Price sources |
| `rtpbc-request` | What a medication would cost a member under their pharmacy coverage | The member's insurer or pharmacy benefit manager, found by the coverage's payer |

## Price a medication without patient details

The request names the product and the quantity in its `Claim`, masks the patient and the coverage
with a `data-absent-reason` of `masked`, and names either a pharmacy in `Claim.provider` or one or
more ZIP codes in its `preferredPharmacyPostalCode` extension.

```bash theme={null}
curl -X POST -H "Authorization: Bearer $HAAU3_API_KEY" \
  -H "Content-Type: application/fhir+json" \
  --data @request.json \
  "https://api.haau3.com/v1/fhir/r4/\$process-message"
```

The `request.json` below is the synthetic example from the haau3 FHIR Implementation Guide: 30
lisinopril 5 mg tablets (RxNorm `311354`) at pharmacies in ZIP code 33131.

```json request.json theme={null}
{
  "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"
}
```

The answer today: the request was read, and no price source returned a price.

```json theme={null}
{
  "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"
}
```

## Check a member's cost

The member's request carries their `Patient` and `Coverage`, the prescription as a
`MedicationRequest`, its prescriber as a `Practitioner`, and the pharmacy as an `Organization`
named by its NPI or NCPDP provider id. The `Coverage` carries the payer's identifier in
`payor.identifier`: it is how the member's insurer is found, so a member's request without it is
refused. For prices without patient details, send `rtpbc-request-non-phi` instead.

Some insurers answer only with the member's own authorization. When this service connects to one,
your app will send the member's authorization with each request, and it will be passed to that
insurer for that one request and kept nowhere. How it is sent will be documented here before then.

<Accordion title="A member's request and today's answer">
  ```json request.json theme={null}
  {
    "resourceType": "Bundle",
    "id": "pharmacy-benefits-request-phi",
    "meta": {
      "profile": [
        "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-bundle|2.0.0-ballot"
      ]
    },
    "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"
            ]
          },
          "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"
            ]
          },
          "identifier": [
            {
              "value": "benefit-check-0001"
            }
          ],
          "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": [
                  {
                    "code": "311354",
                    "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                    "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"
            ]
          },
          "identifier": [
            {
              "system": "https://app.example.test/patients",
              "value": "example-0001"
            }
          ],
          "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"
            ]
          },
          "beneficiary": {
            "reference": "Patient/phi-patient"
          },
          "payor": [
            {
              "identifier": {
                "system": "https://payers.example.test",
                "value": "EXAMPLE-PAYER"
              },
              "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"
            ]
          },
          "medicationCodeableConcept": {
            "coding": [
              {
                "code": "311354",
                "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                "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"
            ]
          },
          "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"
            ]
          },
          "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"
  }
  ```

  The answer today: no insurer this service connects to answers for the coverage's payer. The
  member's `Patient` comes back as it was sent, as CARIN requires.

  ```json theme={null}
  {
    "resourceType": "Bundle",
    "meta": {
      "profile": [
        "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-bundle|2.0.0-ballot"
      ]
    },
    "entry": [
      {
        "fullUrl": "urn:uuid:10e5197b-4ed1-4379-a54e-a7a5cfd45bf4",
        "resource": {
          "resourceType": "MessageHeader",
          "id": "10e5197b-4ed1-4379-a54e-a7a5cfd45bf4",
          "meta": {
            "profile": [
              "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-messageheader|2.0.0-ballot"
            ]
          },
          "source": {
            "name": "haau3 Pharmacy Benefits",
            "endpoint": "https://api.haau3.com/v1/fhir/r4"
          },
          "response": {
            "identifier": "phi-request",
            "code": "ok"
          },
          "focus": [
            {
              "reference": "urn:uuid:ad0656b7-df53-4cdb-9934-0c48f5ea9994"
            }
          ],
          "eventCoding": {
            "code": "rtpbc-response",
            "system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
            "display": "RTPBC Response"
          },
          "definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-response"
        }
      },
      {
        "fullUrl": "urn:uuid:ad0656b7-df53-4cdb-9934-0c48f5ea9994",
        "resource": {
          "resourceType": "ClaimResponse",
          "id": "ad0656b7-df53-4cdb-9934-0c48f5ea9994",
          "meta": {
            "profile": [
              "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-claimresponse|2.0.0-ballot"
            ]
          },
          "identifier": [
            {
              "value": "ad0656b7-df53-4cdb-9934-0c48f5ea9994"
            }
          ],
          "patient": {
            "reference": "https://app.example.test/fhir/Patient/phi-patient"
          },
          "insurer": {
            "identifier": {
              "system": "https://payers.example.test",
              "value": "EXAMPLE-PAYER"
            }
          },
          "request": {
            "identifier": {
              "value": "benefit-check-0001"
            }
          },
          "error": [
            {
              "code": {
                "coding": [
                  {
                    "code": "no-responder-for-coverage",
                    "system": "https://haau3.com/fhir/CodeSystem/pharmacy-benefits-processing-code",
                    "display": "No responder for this coverage"
                  }
                ]
              }
            }
          ],
          "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 insurer this service connects to answers for this coverage's payer."
        }
      },
      {
        "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"
            ]
          },
          "identifier": [
            {
              "system": "https://app.example.test/patients",
              "value": "example-0001"
            }
          ],
          "name": [
            {
              "given": [
                "Mei"
              ],
              "family": "Lin"
            }
          ],
          "gender": "female",
          "birthDate": "1958-03-14"
        }
      }
    ],
    "type": "message",
    "timestamp": "2026-10-20T14:00:01Z"
  }
  ```
</Accordion>

## Reading the answer

The answer is a `Bundle` of type `message`. Its `MessageHeader` answers yours: `response.identifier`
is your `MessageHeader.id`, and `response.code` is `ok` whenever the request was read. Its one
`ClaimResponse` carries either prices and coverage in `item`, or the reason there are none in
`error`, never both, as CARIN requires. `ClaimResponse.request.identifier` is your `Claim`'s
identifier. A member's answer also carries your `Patient`, at the same `fullUrl`.

When no connected source can answer, `ClaimResponse.outcome` is `error` and `error[0].code` carries
a code from `https://haau3.com/fhir/CodeSystem/pharmacy-benefits-processing-code`:

| Code | Meaning |
| - | - |
| `no-responder-for-coverage` | No insurer or pharmacy benefit manager this service connects to answers for the coverage's payer. Nothing is said about whether the medication is covered. |
| `no-price-source` | No price source this service connects to returned a price for the product, quantity and place asked about. No price is estimated in its place. |
| `source-not-available-to-caller` | A source that could answer is connected, but its terms do not make it available to your organization. |

An NCPDP reject code in an answer comes from the source that sent it, unchanged.

## What is refused

The whole request is refused with HTTP `400` and an `OperationOutcome` before any source is asked
when it holds:

* a query parameter: the operation takes none;
* a body that is not a `Bundle` of type `message` (a `Parameters` resource is refused by name), or
  a first entry that is not a `MessageHeader`;
* an event other than the two above (issue code `not-supported`);
* a list over its cap (issue code `too-long`): 20 entries, 5 `focus` references, 10 codings on a
  product, 10 ZIP codes, 10 identifiers on a pharmacy, 5 payors and 20 classes on a coverage;
* an element the CARIN profiles require that is missing, such as the `MessageHeader.id`, the
  `Claim`'s one identifier and one item, or a quantity with no unit;
* a reference that names no entry in the Bundle, or names one of the wrong type, resolved as FHIR
  resolves references inside a Bundle;
* a product with no NDC (11 digits, no dashes) or RxNorm code: text alone cannot be priced;
* a ZIP code that is not five digits or ZIP+4;
* in a request without patient details, a patient or coverage that is not masked, or no pharmacy
  and no ZIP code;
* in a member's request, no `Coverage`, or a `Coverage` with no `payor.identifier`;
* malformed content, or a body over 1 MiB (HTTP `413`).

The `OperationOutcome` names the element by its FHIRPath in `expression`, and never repeats a value
you sent.

## Errors

Every error is a FHIR `OperationOutcome`.

| Status | Meaning |
| - | - |
| `400` | The request was refused, as listed above. The outcome names the element. |
| `413` | A body over 1 MiB. The outcome's issue code is `too-long`. |

The statuses every service shares, among them `401`, `405`, `406`, `415`, `429` and `500`, are on
[Errors, limits and request ids](/errors).

This operation is not offered inside a batch Bundle. A batch entry that names it is refused by
name.

## Data handling

This operation is stateless. Nothing a request carries is stored, cached or logged, apart from a
request ID you choose to send, and each check is a point-in-time answer: nothing from an earlier
request bears on a later one. A refusal names the element, never a value. Every answer carries
`Cache-Control: no-store`, errors included, so no cache between you and the service keeps one.

A member's request is protected health information. The haau3
[terms](https://platform.haau3.com/terms) reserve patient data for services designated to receive
it under an executed agreement, and this operation is one of them. Send a member's request only
under such an agreement with haau3. The platform project that serves it runs under Google Cloud's
Business Associate Agreement.

## Specification

The contract is the CARIN Consumer Real-Time Pharmacy Benefit Check,
[STU2 ballot](https://hl7.org/fhir/us/carin-rtpbc/2026May/), and the haau3 FHIR Implementation
Guide's [Pharmacy Benefits page](https://fhir.haau3.com/pharmacy-benefits.html):

* [Pharmacy Benefits Processing Code](https://fhir.haau3.com/CodeSystem-pharmacy-benefits-processing-code.html),
  the code system
* Examples: the [request without patient details](https://fhir.haau3.com/Bundle-pharmacy-benefits-request-non-phi.html)
  and [its answer](https://fhir.haau3.com/Bundle-pharmacy-benefits-response-non-phi.html), and the
  [member's request](https://fhir.haau3.com/Bundle-pharmacy-benefits-request-phi.html) and
  [its answer](https://fhir.haau3.com/Bundle-pharmacy-benefits-response-phi.html)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.