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

# Preview Claim Bundle (Full Request)

> Builds a claim FHIR bundle from a full claim request without sending it. Prefer Preview Claim Bundle once the claim exists.



## OpenAPI

````yaml post /abdm/nhcx/v1/claim/preview
openapi: 3.1.0
info:
  description: ABHA Registration and login APIs
  title: Registration
  version: 1.0.0
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /abdm/nhcx/v1/claim/preview:
    post:
      summary: Preview Claim Bundle (Full Request)
      description: >-
        Builds a claim FHIR bundle from a full claim request without sending it.
        Prefer Preview Claim Bundle once the claim exists.
      parameters:
        - description: Eka User ID (OID)
          in: header
          name: X-Pt-Id
          schema:
            type: string
        - description: Partner User ID
          in: header
          name: X-Partner-Pt-Id
          schema:
            type: string
        - description: Partner HIP ID
          in: header
          name: X-Hip-Id
          schema:
            type: string
        - description: Optional. Applies the claim's catalogue to the items
          in: query
          name: claim_id
          schema:
            description: Optional. Applies the claim's catalogue to the items
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                abha_number:
                  type: string
                accident_info:
                  $ref: '#/components/schemas/ModelsAccidentInfo'
                admission_date:
                  format: date-time
                  type:
                    - 'null'
                    - string
                api_call_id:
                  type: string
                auth_type:
                  description: >-
                    AuthType "consent" (default) sends the Authentication
                    Consent Questionnaire response and OMITS the biometric
                    X-Token; "biometric" sends UserToken as the X-Token.
                  type: string
                bank_details:
                  $ref: '#/components/schemas/ModelsBankDetails'
                care_team_members:
                  description: >-
                    Index 0 → primary/responsible (e.g. operating surgeon) Index
                    1 → assisting role (e.g. anaesthesiologist)
                  items:
                    $ref: '#/components/schemas/ModelsClaimCareTeamMember'
                  type: array
                claim_type:
                  type: string
                claimed_amount:
                  type: number
                clinical_notes:
                  type: string
                consent:
                  $ref: '#/components/schemas/ModelsPreAuthConsent'
                diagnosis:
                  items:
                    $ref: '#/components/schemas/ModelsDiagnosisCoding'
                  type:
                    - array
                    - 'null'
                discharge_date:
                  format: date-time
                  type:
                    - 'null'
                    - string
                discharge_stage:
                  description: >-
                    DIS valueString: "After surgery"(default) | "Before surgery"
                    | "During surgery"
                  type: string
                discharge_type:
                  description: '"home"(default) | "mortuary" | "lama" | "dama"'
                  type: string
                documents:
                  description: >-
                    Legacy document list (kept for backward compat; prefer
                    SupportingDocs)
                  items:
                    $ref: '#/components/schemas/ModelsClaimDocument'
                  type: array
                hfr_facility_id:
                  description: HFR/registry id → provider Organization NPI
                  type: string
                hospital_address:
                  type: string
                hospital_name:
                  type: string
                itemized_billing:
                  items:
                    $ref: '#/components/schemas/ModelsBillingItem'
                  type: array
                member_id:
                  type: string
                patient_details:
                  $ref: '#/components/schemas/ModelsPatientDetails'
                payer_id:
                  type: string
                policy_number:
                  description: Coverage.identifier.value
                  type: string
                policy_period_end:
                  description: '"YYYY-MM-DD"'
                  type: string
                policy_period_start:
                  description: '"YYYY-MM-DD"'
                  type: string
                policy_scheme_name:
                  description: Coverage.class.name e.g. "PM-JAY Health Insurance Scheme"
                  type: string
                preauth_claim_number:
                  type: string
                preauth_number:
                  description: >-
                    preauth_number: PMJAY ref ("PMJAY/HP/S/...") →
                    insurance[].preAuthRef[] preauth_claim_number: CLN UUID from
                    parsed preauth → Claim.related[].claim.identifier
                    api_call_id: x-hcx-api_call_id from preauth submission →
                    reuse in claim to link sessions
                  type: string
                procedure_codes:
                  items:
                    type: string
                  type: array
                provider_id:
                  type: string
                questionnaire_answers:
                  description: >-
                    STG questionnaire responses carried over onto the claim
                    (same shape as pre-auth). Each becomes a
                    QuestionnaireResponse resource referenced from
                    Claim.supportingInfo (category STG).
                  items:
                    $ref: '#/components/schemas/ModelsPreAuthQuestionnaireAnswer'
                  type: array
                remarks:
                  type: string
                service_codes:
                  description: fallback if no ItemizedBilling
                  items:
                    type: string
                  type: array
                subscriber_id:
                  type: string
                supporting_docs:
                  description: >-
                    Embedded as supportingInfo.valueAttachment (NDHM HDS/INV/ATT
                    category codes).
                  items:
                    $ref: '#/components/schemas/ModelsClaimSupportingDoc'
                  type: array
                user_token:
                  type: string
              required:
                - payer_id
                - member_id
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: {}
                type:
                  - 'null'
                  - object
          description: OK
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NhcxError'
          description: ''
        5XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NhcxError'
          description: ''
      security:
        - authApiKey: []
components:
  schemas:
    ModelsAccidentInfo:
      properties:
        date:
          format: date-time
          type:
            - 'null'
            - string
        description:
          type: string
        type:
          description: MVA, Work, etc.
          type: string
      type: object
    ModelsBankDetails:
      properties:
        account_holder:
          type: string
        account_number:
          type: string
        bank_name:
          type: string
        ifsc_code:
          type: string
      required:
        - account_number
        - ifsc_code
        - bank_name
        - account_holder
      type: object
    ModelsClaimCareTeamMember:
      properties:
        hpr_id:
          description: ABDM HPR id → Practitioner HPID/HPIN
          type: string
        mobile:
          type: string
        name:
          type: string
        qualification_code:
          description: SNOMED code, e.g. "422234006"
          type: string
        qualification_display:
          description: e.g. "Ophthalmologist"
          type: string
        registration_id:
          description: NMC / council reg no.
          type: string
      required:
        - name
      type: object
    ModelsPreAuthConsent:
      properties:
        answers:
          items:
            $ref: '#/components/schemas/ModelsPreAuthQuestionnaireAnswer'
          type:
            - array
            - 'null'
        questionnaire_url:
          type: string
      type: object
    ModelsDiagnosisCoding:
      properties:
        code:
          type: string
        display:
          type: string
        system:
          description: defaults to ICD-10 if empty
          type: string
      required:
        - code
        - display
      type: object
    ModelsClaimDocument:
      properties:
        content:
          description: base64-encoded inline content
          type: string
        content_type:
          description: e.g. "application/pdf"
          type: string
        creation_date:
          description: '"YYYY-MM-DD"'
          type: string
        description:
          type: string
        title:
          type: string
        type:
          description: LAB_REPORT / RADIOLOGY / DISCHARGE_SUMMARY …
          type: string
        url:
          description: presigned URL (optional if content provided)
          type: string
      required:
        - type
        - content_type
      type: object
    ModelsBillingItem:
      properties:
        care_team_sequence:
          description: → careTeam sequences
          items:
            type: integer
          type: array
        category:
          $ref: '#/components/schemas/ModelsCodeableConcept'
        cycle_dates:
          description: >-
            The per-cycle session dates ("YYYY-MM-DD", one per cycle) for a
            cyclic line — each becomes one cycle-information supportingInfo unit
            (a dated EDT entry) linked to the item. The distinct per-cycle dates
            matter: same-dated units were not counted by the payer (Experiment
            D); run 27 cleared PAYR-1368 with distinct dates. Optional; falls
            back to the line's serviced period then the admission date. See
            docs/nhcx/nhcx_cyclic_procedures.md.
          items:
            type: string
          type: array
        description:
          type: string
        diagnosis_pointer:
          description: → diagnosis sequences
          items:
            type: integer
          type: array
        information_sequence:
          description: Sequence references into Claim arrays (1-based)
          items:
            type: integer
          type: array
        procedure_code:
          type: string
        procedure_sequence:
          description: → procedure sequences
          items:
            type: integer
          type: array
        quantity:
          type: number
        service_code:
          type: string
        service_date:
          description: Legacy fields (kept for backward compat)
          format: date-time
          type:
            - 'null'
            - string
        serviced_period_end:
          type: string
        serviced_period_start:
          description: Optional servicedPeriod for the line item (YYYY-MM-DD)
          type: string
        total_amount:
          type: number
        unit_price:
          type: number
      required:
        - service_code
      type: object
    ModelsPatientDetails:
      properties:
        abha_number:
          type: string
        age:
          description: optional; derived server-side if absent
          type: integer
        dob:
          description: YYYY-MM-DD
          type: string
        email:
          type: string
        gender:
          description: '"male"/"female"/"other" or title-case variants'
          type: string
        mobile:
          type: string
        name:
          type: string
        relation:
          type: string
      required:
        - name
      type: object
    ModelsPreAuthQuestionnaireAnswer:
      properties:
        answer: {}
        link_id:
          type: string
        question:
          type: string
        questionnaire_url:
          description: STG questionnaire URL
          type: string
      type: object
    ModelsClaimSupportingDoc:
      properties:
        category:
          description: e.g. "HDS"
          type: string
        category_display:
          description: human-readable label
          type: string
        code:
          description: e.g. "MDC"
          type: string
        code_display:
          type: string
        content:
          description: base64 inline payload (PMJAY requires data, not url)
          type: string
        content_type:
          description: '"application/pdf"'
          type: string
        creation:
          description: '"YYYY-MM-DD"'
          type: string
        doc_id:
          description: >-
            References a document the backend ALREADY stores for this case (a
            saved draft's attachment). When set and Content is empty, the
            service hydrates Content from its own store before
            validating/submitting — the client never has to download bytes it
            just asked the server to keep. See hydrateDocsFromDraft.
          type: string
        title:
          type: string
      required:
        - category
        - code
        - content_type
        - title
      type: object
    NhcxError:
      properties:
        error:
          type: string
        issues:
          description: >-
            Every validation problem found, when the backend rejects a submit
            before it reaches the payer
          items:
            type: string
          type: array
        updated_at:
          description: 'Only on a 409 from the draft save: the stored draft''s version'
          type: string
      type: object
    ModelsCodeableConcept:
      properties:
        coding:
          items:
            $ref: '#/components/schemas/ModelsCoding'
          type:
            - array
            - 'null'
        text:
          type: string
      type: object
    ModelsCoding:
      properties:
        code:
          type: string
        display:
          type: string
        system:
          type: string
      type: object
  securitySchemes:
    authApiKey:
      description: The API requires a Bearer token (JWT) for authentication.
      scheme: bearer
      type: http

````

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