> ## 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.

# Read a drug on a Part D formulary

> Read one item of a Medicare Part D formulary by its id, `FormularyItem-` followed by CMS's formulary id and the drug's RxNorm code: `FormularyItem-00027002-311354`. So a caller holding a formulary and an RxNorm code reads the item with no search. A drug not on the formulary answers `404`, saying so with the month of CMS's file.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/fhir/r4/Basic/{id}
openapi: 3.1.0
info:
  title: haau3 Platform API
  version: 1.0.0-preview.49
  description: >-
    The haau3 platform API is in preview: it may change as we build, usually to
    add features or improve performance. Endpoints require an API key, sent as
    `Authorization: Bearer <key>`. Requests without a valid key return 401.
    Create a key in the dashboard at https://platform.haau3.com; a new
    organization starts on the free Developer plan. From 2026-11-02 a request
    past one of its plan's limits (requests a minute on every plan, requests a
    month on Developer) returns 429 with `Retry-After`. Every service is on the
    FHIR R4 base at `/v1/fhir/r4`, and every error is a FHIR `OperationOutcome`;
    https://docs.haau3.com/errors lists every status, whether to retry it, and
    what a method a path does not take answers.
servers:
  - url: https://api.haau3.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: FHIR base
    description: >-
      What the FHIR R4 base at `/v1/fhir/r4` answers for every service on it:
      the `CapabilityStatement` that lists them all, and batch Bundles that
      carry several requests to any of them in one round trip.
  - name: Scheduling
    description: >-
      Provider availability from SMART Scheduling Links publishers: Slot and
      Schedule, searched and read, and the Location, Practitioner,
      PractitionerRole and HealthcareService they name.
  - name: Terminology
    description: >-
      FHIR terminology operations over the code systems listed in
      TerminologyCapabilities. Some are resolved from their own source when you
      ask; others are held here at a named release, which that resource also
      names.
  - name: Provider directory
    description: >-
      CMS's National Provider Directory as FHIR R4: practitioners and their
      roles, organizations, payers and insurance networks, network membership,
      healthcare services, locations and endpoints. Every parameter the service
      serves is declared here, and any other is refused by name rather than
      ignored.
  - name: Questionnaires
    description: >-
      FHIR Questionnaire, served as its source publishes it. This service holds
      copies of a curated set and reaches any other questionnaire its source
      publishes by canonical URL, as well as forms published at their own
      address under places this service is set up to reach. Read one by id, and
      build the QuestionnaireResponse in your own application.
  - name: Medical Benefits
    description: >-
      FHIR InsurancePlan: what a Medicare Advantage or ACA Marketplace plan
      covers and what a member pays, read from the files CMS publishes. Every
      plan names the CMS release it was read from. Read a plan by its id, or
      search by identifier, name, state or county, and check whether the CMS
      National Provider Directory lists providers in a plan's network. A
      Medicare Part D formulary and a Part D plan's drug plan are InsurancePlans
      too, read on the same path by their own forms of id, and counted as
      Pharmacy Benefits.
  - name: Pharmacy Benefits
    description: >-
      The CARIN Consumer Real-Time Pharmacy Benefit Check as FHIR messaging:
      what a medication would cost a member under their coverage, or its price
      at pharmacies near a ZIP code, in real time, from the sources this service
      connects to. A member's request receives patient data, so send it only
      under an executed agreement. And Medicare Part D from CMS's monthly file,
      in the shape of HL7's Da Vinci US Drug Formulary guide: which drugs each
      formulary lists, at which tier and with which limits, and each plan's drug
      plan, with what each tier costs.
  - name: MedList
    description: >-
      One reconciled medication list from one patient's FHIR medication records,
      as US Core MedicationRequests with a Provenance for each. This operation
      receives patient data, so send it only under an executed agreement.
  - name: Structured Sig
    description: >-
      A prescription's free-text directions as a FHIR Dosage: the dose, unit,
      route, method and timing coded in SNOMED CT, NCIt and UCUM where the words
      support them, the directions kept verbatim, and a review flag on anything
      a person should check. It takes the directions and the medication's
      codings, never a patient.
  - name: Sandbox
    description: >-
      The FHIR base without production behind it, to build and test against: the
      same paths at `/v1/sandbox/fhir/r4`, answered with synthetic data that
      always gives the same answer. Its first service is the CARIN Consumer
      Real-Time Pharmacy Benefit Check, answered by Example Health Plan, a test
      insurer. It takes a test key (`haau3_sk_test_…`), made on the API keys
      page. A test key's requests count toward its organization's requests a
      minute, apart from its production requests, and never toward the plan's
      month. Send test members only, never a real person.
paths:
  /v1/fhir/r4/Basic/{id}:
    get:
      tags:
        - Pharmacy Benefits
      summary: Read a drug on a Part D formulary
      description: >-
        Read one item of a Medicare Part D formulary by its id, `FormularyItem-`
        followed by CMS's formulary id and the drug's RxNorm code:
        `FormularyItem-00027002-311354`. So a caller holding a formulary and an
        RxNorm code reads the item with no search. A drug not on the formulary
        answers `404`, saying so with the month of CMS's file.
      operationId: readBasic
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9\-.]{1,64}$
          description: 'The item''s id: `FormularyItem-00027002-311354`.'
          example: FormularyItem-00027002-311354
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          description: The item, as Da Vinci's FormularyItem.
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/Basic'
              examples:
                Lisinopril on a Part D formulary:
                  summary: Lisinopril on a Part D formulary
                  value:
                    resourceType: Basic
                    id: FormularyItem-00027002-311354
                    meta:
                      lastUpdated: '2026-12-01T23:00:45.878Z'
                      source: >-
                        https://data.cms.gov/sites/default/files/2026-11/796eebd3-4f54-43e3-90a4-c20cc0696767/2027_20261118.zip
                      profile:
                        - >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyItem|2.1.0
                    extension:
                      - url: >-
                          https://fhir.haau3.com/platform/StructureDefinition/part-d-data-month
                        valueDate: 2026-11
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyReference-extension
                        valueReference:
                          reference: InsurancePlan/Formulary-00027002
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-AvailabilityStatus-extension
                        valueCode: active
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-AvailabilityPeriod-extension
                        valuePeriod:
                          start: '2027-01-01'
                          end: '2027-12-31'
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension
                        valueCodeableConcept:
                          coding:
                            - system: >-
                                http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE
                              code: 1-month-in-retail
                              display: 1 month in network retail
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension
                        valueCodeableConcept:
                          coding:
                            - system: >-
                                http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE
                              code: 3-month-in-retail
                              display: 3 month in network retail
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension
                        valueCodeableConcept:
                          coding:
                            - system: >-
                                http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE
                              code: 3-month-in-mail
                              display: 3 month in network mail order
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-DrugTierID-extension
                        valueCodeableConcept:
                          coding:
                            - system: >-
                                https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier
                              code: '1'
                              display: Tier 1
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PriorAuthorization-extension
                        valueBoolean: false
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-StepTherapyLimit-extension
                        valueBoolean: false
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-QuantityLimit-extension
                        valueBoolean: true
                      - url: >-
                          http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-QuantityLimitDetail-extension
                        extension:
                          - url: Rolling
                            valueTiming:
                              repeat:
                                count: 60
                                period: 30
                                periodUnit: d
                    code:
                      coding:
                        - system: >-
                            http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-InsuranceItemTypeCS
                          code: formulary-item
                          display: Formulary Item
                    subject:
                      reference: MedicationKnowledge/FormularyDrug-311354
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            X-Correlation-Id:
              $ref: '#/components/headers/XCorrelationId'
        '400':
          description: 'A query parameter was sent: a read takes none.'
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/OperationOutcome'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            X-Correlation-Id:
              $ref: '#/components/headers/XCorrelationId'
        '401':
          $ref: '#/components/responses/FhirUnauthorized'
        '403':
          $ref: '#/components/responses/FhirForbiddenTestKey'
        '404':
          description: >-
            The drug is not on the formulary in CMS's file for the month named,
            the formulary is not in it, or the id names no item. The
            `OperationOutcome` says which.
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/OperationOutcome'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            X-Correlation-Id:
              $ref: '#/components/headers/XCorrelationId'
        '406':
          $ref: '#/components/responses/FhirNotAcceptable'
        '429':
          $ref: '#/components/responses/FhirTooManyRequests'
        '500':
          $ref: '#/components/responses/FhirServerError'
        '503':
          description: >-
            The Medicare Part D formulary could not be read just now (send the
            request again after `Retry-After`), or is not served on this
            deployment (no `Retry-After`). Never reported as an empty result or
            a drug not on a formulary. It is also the answer when the API key
            could not be checked just now, with `Retry-After`.
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/OperationOutcome'
          headers:
            Retry-After:
              description: >-
                Sent when waiting will help: the API key could not be checked
                just now, or the source behind this service is rate limiting
                requests or did not answer. How many seconds to wait before
                sending the request again.
              schema:
                type: integer
                minimum: 0
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            X-Correlation-Id:
              $ref: '#/components/headers/XCorrelationId'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl
            "https://api.haau3.com/v1/fhir/r4/Basic/FormularyItem-00027002-311354"
            \
              -H "Authorization: Bearer $HAAU3_API_KEY"
components:
  parameters:
    XRequestId:
      name: X-Request-Id
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: >-
        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.
  schemas:
    Basic:
      type: object
      description: A FHIR R4 [Basic](https://hl7.org/fhir/R4/basic.html).
      properties:
        resourceType:
          type: string
          const: Basic
      required:
        - resourceType
      additionalProperties: true
    OperationOutcome:
      type: object
      description: >-
        A FHIR R4
        [OperationOutcome](https://hl7.org/fhir/R4/operationoutcome.html).
      properties:
        resourceType:
          type: string
          const: OperationOutcome
        issue:
          type: array
          items:
            type: object
            properties:
              severity:
                type: string
                enum:
                  - fatal
                  - error
                  - warning
                  - information
              code:
                type: string
              details:
                type: object
                properties:
                  text:
                    type: string
                additionalProperties: true
              diagnostics:
                type: string
              expression:
                type: array
                items:
                  type: string
            required:
              - severity
              - code
            additionalProperties: true
      required:
        - resourceType
        - issue
  headers:
    XRequestId:
      description: >-
        The id haau3 gave this request, a UUID, on every response. Quote it in a
        question about the response.
      schema:
        type: string
        format: uuid
    XCorrelationId:
      description: The `X-Request-Id` you sent, when it was a UUID.
      schema:
        type: string
        format: uuid
  responses:
    FhirUnauthorized:
      description: Missing or invalid API key.
      content:
        application/fhir+json:
          schema:
            $ref: '#/components/schemas/OperationOutcome'
      headers:
        WWW-Authenticate:
          description: >-
            The scheme to authenticate with: `Bearer realm="api.haau3.com"`,
            with `error="invalid_token"` when a key was sent and not recognised.
          schema:
            type: string
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Correlation-Id:
          $ref: '#/components/headers/XCorrelationId'
    FhirForbiddenTestKey:
      description: >-
        A test key (`haau3_sk_test_…`) works only in the Sandbox, so one sent
        here is refused before the request runs: coded `forbidden`, with
        `test-key-outside-sandbox` from
        `https://haau3.com/fhir/CodeSystem/api-error` in `issue.details.coding`.
        Send a live key.
      headers:
        WWW-Authenticate:
          description: >-
            Sent when the API key works only in the other mode: `Bearer
            realm="api.haau3.com", error="insufficient_scope"`.
          schema:
            type: string
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Correlation-Id:
          $ref: '#/components/headers/XCorrelationId'
      content:
        application/fhir+json:
          schema:
            $ref: '#/components/schemas/OperationOutcome'
          examples:
            A test key outside the Sandbox:
              summary: A test key outside the Sandbox
              value:
                resourceType: OperationOutcome
                issue:
                  - severity: error
                    code: forbidden
                    details:
                      coding:
                        - system: https://haau3.com/fhir/CodeSystem/api-error
                          code: test-key-outside-sandbox
                          display: Test key outside the Sandbox
                      text: >-
                        This is a test key, which works only in the Sandbox
                        (https://api.haau3.com/v1/sandbox/fhir/r4). Send this
                        request with a live key; create one in the dashboard.
                        See
                        https://docs.haau3.com/authentication#test-and-live-keys
    FhirNotAcceptable:
      description: >-
        The request asked for a format other than JSON (`Accept` or `_format`),
        or for a FHIR release this endpoint does not serve (the `fhirVersion`
        media-type parameter).
      content:
        application/fhir+json:
          schema:
            $ref: '#/components/schemas/OperationOutcome'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Correlation-Id:
          $ref: '#/components/headers/XCorrelationId'
    FhirTooManyRequests:
      description: >-
        A limit of the organization's plan was reached: its requests a minute,
        or the Developer plan's requests a month. Send the request again after
        `Retry-After`, which for the monthly limit runs to the 1st of the next
        month (UTC).
      content:
        application/fhir+json:
          schema:
            $ref: '#/components/schemas/OperationOutcome'
      headers:
        Retry-After:
          description: How many seconds to wait before sending the request again.
          schema:
            type: integer
            minimum: 0
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Correlation-Id:
          $ref: '#/components/headers/XCorrelationId'
    FhirServerError:
      description: The server failed to process this request.
      content:
        application/fhir+json:
          schema:
            $ref: '#/components/schemas/OperationOutcome'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Correlation-Id:
          $ref: '#/components/headers/XCorrelationId'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: haau3_sk_live_…
      description: >-
        A live platform API key (`haau3_sk_live_…`), sent as `Authorization:
        Bearer <key>`. It works for every service outside the Sandbox. Create
        one on the API keys page at https://platform.haau3.com.

````

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