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

# Create a Prior Authorization Status Check

> Creates an asynchronous check for prior authorizations matching a
patient, prescription NDC, and one or more insurance plans.

`instant_only` never falls back to standard processing. An ineligible
or failed instant check becomes a failed operation.

`instant_preferred` attempts instant processing first. If instant
processing is ineligible, fails, or produces no result, processing
falls back to the standard method.


<Warning>
  **Coming soon.** This API may change before launch, including breaking changes.
</Warning>

Create an asynchronous check for prior authorizations associated with one
patient, one medication NDC, and one or more insurance plans.

## Processing methods

* `instant_only` attempts only the instant method. If the request is ineligible
  or the instant attempt fails, the check ends with `status: failed`.
* `instant_preferred` attempts the instant method first and may fall back to the
  standard method. Polling exposes the method currently handling the check as
  `effective_processing_method`.

## Request requirements

* `prescription` contains only the medication `ndc`.
* `insurances` contains one or more insurance objects. Each object must include
  at least one non-empty discrete insurance field or a non-empty `images` list.
* Each insurance image supplies exactly one of `file_content` or `file_url`.
* Patient gender must be `male`, `female`, or `other`.
* Entity information is not accepted by this endpoint.

The eventual successful response contains operation metadata only. Retrieve
the prior authorization results by polling the returned ID.


## OpenAPI

````yaml post /pa-status
openapi: 3.1.0
info:
  title: Develop Health Public API
  description: Develop Health Public API
  version: '1.0'
servers:
  - url: https://api.develophealth.ai
security: []
paths:
  /pa-status:
    post:
      tags:
        - public-api
      summary: Create a PA status check
      description: |-
        Create an asynchronous PA status check.

        `instant_only` never falls back to standard processing. An ineligible or
        failed instant check becomes a failed operation. `instant_preferred`
        attempts instant processing first and permits standard fallback.

        This contract-only stub currently returns 501 without creating a record.
      operationId: create_pa_status
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaStatusRequest'
        required: true
      responses:
        '200':
          description: PA status check created; returns its current processing state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePaStatusSuccessResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '501':
          description: PA status checking is not yet implemented.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseV2'
      security:
        - FronteggJWTAuthentication: []
components:
  schemas:
    CreatePaStatusRequest:
      properties:
        processing_method:
          type: string
          enum:
            - instant_only
            - instant_preferred
          title: Processing Method
          description: >-
            Requested processing policy. instant_only fails if instant
            processing cannot produce a result; instant_preferred permits
            standard fallback.
        priority:
          type: integer
          maximum: 3
          minimum: 0
          title: Priority
          description: Lower values indicate higher processing priority.
          default: 2
        patient:
          $ref: '#/components/schemas/PaStatusPatient'
        provider:
          $ref: '#/components/schemas/PaStatusProvider'
        prescription:
          $ref: '#/components/schemas/PaStatusPrescription'
        insurances:
          items:
            $ref: '#/components/schemas/PaStatusInsurance'
          type: array
          minItems: 1
          title: Insurances
          description: Insurance plans to check for the requested NDC.
      additionalProperties: false
      type: object
      required:
        - processing_method
        - patient
        - provider
        - prescription
        - insurances
      title: CreatePaStatusRequest
    CreatePaStatusSuccessResponse:
      properties:
        status:
          type: string
          const: success
          title: Status
          default: success
        error:
          type: 'null'
          title: Error
        data:
          $ref: '#/components/schemas/CreatePaStatusResponseData'
      type: object
      required:
        - data
      title: CreatePaStatusSuccessResponse
      description: Successful response to POST /pa-status.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApiErrorResponseV2:
      properties:
        status:
          type: string
          const: error
          title: Status
          default: error
        error:
          $ref: '#/components/schemas/ApiErrorV2'
        data:
          type: 'null'
          title: Data
      type: object
      required:
        - error
      title: ApiErrorResponseV2
      description: V2 version of ApiErrorResponse using Pydantic v2.
    PaStatusPatient:
      properties:
        internal_id:
          type: string
          minLength: 1
          title: Internal Id
        first_name:
          type: string
          minLength: 1
          title: First Name
        last_name:
          type: string
          minLength: 1
          title: Last Name
        date_of_birth:
          type: string
          format: date
          title: Date Of Birth
        gender:
          type: string
          enum:
            - male
            - female
            - other
          title: Gender
          description: Unspecified gender is not accepted for PA status checks.
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
        mrn:
          anyOf:
            - type: string
            - type: 'null'
          title: Mrn
        address:
          $ref: '#/components/schemas/PaStatusAddress'
      additionalProperties: false
      type: object
      required:
        - internal_id
        - first_name
        - last_name
        - date_of_birth
        - gender
        - address
      title: PaStatusPatient
    PaStatusProvider:
      properties:
        internal_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Internal Id
        first_name:
          type: string
          minLength: 1
          title: First Name
        last_name:
          type: string
          minLength: 1
          title: Last Name
        npi:
          type: string
          minLength: 1
          title: Npi
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        fax:
          anyOf:
            - type: string
            - type: 'null'
          title: Fax
        address:
          $ref: '#/components/schemas/PaStatusOptionalAddress'
      additionalProperties: false
      type: object
      required:
        - first_name
        - last_name
        - npi
        - address
      title: PaStatusProvider
    PaStatusPrescription:
      properties:
        ndc:
          type: string
          pattern: ^(?:\d{5}-?\d{4}-?\d{2}|\d{4,5}-\d{3,4}-\d{1,2})$
          title: Ndc
          description: >-
            Medication National Drug Code. Segmented package NDCs and
            unsegmented 11-digit package NDCs are supported.
          examples:
            - 00169-4505-14
            - 169450514
      additionalProperties: false
      type: object
      required:
        - ndc
      title: PaStatusPrescription
    PaStatusInsurance:
      anyOf:
        - properties:
            member_id:
              type: string
              minLength: 1
          required:
            - member_id
        - properties:
            member_name:
              type: string
              minLength: 1
          required:
            - member_name
        - properties:
            payer_name:
              type: string
              minLength: 1
          required:
            - payer_name
        - properties:
            plan_name:
              type: string
              minLength: 1
          required:
            - plan_name
        - properties:
            client_name:
              type: string
              minLength: 1
          required:
            - client_name
        - properties:
            group_number:
              type: string
              minLength: 1
          required:
            - group_number
        - properties:
            rx_bin:
              type: string
              minLength: 1
          required:
            - rx_bin
        - properties:
            rx_pcn:
              type: string
              minLength: 1
          required:
            - rx_pcn
        - properties:
            rx_group:
              type: string
              minLength: 1
          required:
            - rx_group
        - properties:
            images:
              type: array
              minItems: 1
          required:
            - images
      properties:
        member_id:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Member Id
        member_name:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Member Name
        payer_name:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Payer Name
        plan_name:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Plan Name
        client_name:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Client Name
        group_number:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Group Number
        rx_bin:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Rx Bin
        rx_pcn:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Rx Pcn
        rx_group:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Rx Group
        images:
          anyOf:
            - items:
                $ref: '#/components/schemas/PaStatusAsset'
              type: array
              minItems: 1
            - type: 'null'
          title: Images
      additionalProperties: false
      type: object
      title: PaStatusInsurance
      description: Discrete insurance data and images for one plan.
    CreatePaStatusResponseData:
      properties:
        id:
          type: string
          minLength: 1
          title: Id
          description: Identifier used to poll the PA status GET endpoint.
        object:
          type: string
          const: pa_status
          title: Object
        effective_processing_method:
          type: string
          enum:
            - instant
            - standard
          title: Effective Processing Method
          description: >-
            Method currently running, that completed the operation, or that was
            most recently attempted before failure.
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
          title: Status
        failure_reason:
          anyOf:
            - $ref: '#/components/schemas/PaStatusFailureReason'
            - type: 'null'
          description: >-
            Failure details when status is failed; otherwise null. The failure
            code corresponds to the effective processing method.
      additionalProperties: false
      type: object
      required:
        - id
        - object
        - effective_processing_method
        - status
        - failure_reason
      title: CreatePaStatusResponseData
      description: Response metadata returned after creating a PA status check.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ApiErrorV2:
      properties:
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        code:
          type: string
          title: Code
      type: object
      required:
        - title
        - description
        - code
      title: ApiErrorV2
      description: V2 version of ApiError using Pydantic v2.
    PaStatusAddress:
      properties:
        street:
          type: string
          minLength: 1
          title: Street
        street_line_2:
          anyOf:
            - type: string
            - type: 'null'
          title: Street Line 2
        city:
          type: string
          minLength: 1
          title: City
        state_province:
          type: string
          minLength: 1
          title: State Province
        zip_postal_code:
          type: string
          minLength: 1
          title: Zip Postal Code
        country:
          type: string
          title: Country
          default: USA
      additionalProperties: false
      type: object
      required:
        - street
        - city
        - state_province
        - zip_postal_code
      title: PaStatusAddress
    PaStatusOptionalAddress:
      properties:
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
        street_line_2:
          anyOf:
            - type: string
            - type: 'null'
          title: Street Line 2
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state_province:
          anyOf:
            - type: string
            - type: 'null'
          title: State Province
        zip_postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip Postal Code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
      additionalProperties: false
      type: object
      title: PaStatusOptionalAddress
    PaStatusAsset:
      oneOf:
        - properties:
            file_content:
              type: string
              minLength: 1
          required:
            - file_content
        - properties:
            file_url:
              type: string
              minLength: 1
              format: uri
          required:
            - file_url
      properties:
        file_content:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          contentEncoding: base64
          title: File Content
          description: Base64-encoded file contents.
        file_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: File Url
          description: URL downloaded when the request is accepted.
      additionalProperties: false
      type: object
      title: PaStatusAsset
      description: Insurance image supplied by content or URL, but not both.
    PaStatusFailureReason:
      properties:
        code:
          type: string
          enum:
            - instant_pa_status_ineligible
            - instant_pa_status_failed
            - standard_pa_status_failed
          title: Code
        message:
          type: string
          minLength: 1
          title: Message
      additionalProperties: false
      type: object
      required:
        - code
        - message
      title: PaStatusFailureReason
  securitySchemes:
    FronteggJWTAuthentication:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````