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

# Save Superbill Draft

> Persist a Super Bill draft.

Source of truth is `charge.meta["superbill"]` (the full payload). We also
denormalize the per-line claim codes onto charge_items columns so they're
queryable for reporting / future flows (e.g. CMS-1500 export). The two
stay in sync because the save handler writes both.



## OpenAPI

````yaml post /billing/charge/{charge_id}/superbill
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/charge/{charge_id}/superbill:
    post:
      tags:
        - Charges
      summary: Save Superbill Draft
      description: >-
        Persist a Super Bill draft.


        Source of truth is `charge.meta["superbill"]` (the full payload). We
        also

        denormalize the per-line claim codes onto charge_items columns so
        they're

        queryable for reporting / future flows (e.g. CMS-1500 export). The two

        stay in sync because the save handler writes both.
      operationId: save_superbill_draft_billing_charge__charge_id__superbill_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: charge_id
          in: path
          required: true
          schema:
            type: string
            title: Charge Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveSuperbillRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: boolean
                title: >-
                  Response Save Superbill Draft Billing Charge  Charge Id 
                  Superbill Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SaveSuperbillRequest:
      properties:
        payload:
          $ref: '#/components/schemas/SuperbillPayload'
      type: object
      required:
        - payload
      title: SaveSuperbillRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SuperbillPayload:
      properties:
        services:
          items:
            $ref: '#/components/schemas/SuperbillServiceLine'
          type: array
          title: Services
        serviceDetails:
          $ref: '#/components/schemas/SuperbillServiceDetails'
        insurance:
          $ref: '#/components/schemas/SuperbillInsuranceInput'
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        includeCodeSummary:
          type: boolean
          title: Includecodesummary
          default: true
      type: object
      required:
        - services
        - serviceDetails
        - insurance
      title: SuperbillPayload
      description: >-
        Full superbill document state — what staff fills in + what was
        autofilled.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SuperbillServiceLine:
      properties:
        chargeItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Chargeitemid
        included:
          type: boolean
          title: Included
          default: true
        billingCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingcode
        billingCodeDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingcodedescription
        modifiers:
          items:
            type: string
          type: array
          title: Modifiers
          default: []
        icd10Codes:
          items:
            type: string
          type: array
          title: Icd10Codes
          default: []
        ndcCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Ndccode
        placeOfService:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeofservice
        startDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Startdate
        endDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Enddate
        quantity:
          type: number
          title: Quantity
          default: 1
        quantityLabel:
          type: string
          enum:
            - QUANTITY
            - UNITS
          title: Quantitylabel
          default: QUANTITY
        billedChargeCents:
          type: integer
          title: Billedchargecents
          default: 0
      type: object
      title: SuperbillServiceLine
      description: |-
        One service row on the superbill — sent back when sending/exporting.

        `charge_item_id` is the durable link back to the originating ChargeItems
        row when a line was seeded from a charge item. Lines added inline in the
        editor (with no backing charge item) leave it None. Saves use this id to
        denormalize per-line codes back onto the right row; position is unsafe
        because adding / removing lines in the editor shifts the indexes.
    SuperbillServiceDetails:
      properties:
        renderingProviderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Renderingproviderid
        renderingProviderName:
          anyOf:
            - type: string
            - type: 'null'
          title: Renderingprovidername
        renderingProviderNpi:
          anyOf:
            - type: string
            - type: 'null'
          title: Renderingprovidernpi
        billingProviderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingproviderid
        billingProviderName:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingprovidername
        billingProviderNpi:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingprovidernpi
        tin:
          anyOf:
            - type: string
            - type: 'null'
          title: Tin
        otherProviderName:
          anyOf:
            - type: string
            - type: 'null'
          title: Otherprovidername
        placeOfService:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeofservice
        facilityName:
          anyOf:
            - type: string
            - type: 'null'
          title: Facilityname
        startDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Startdate
        endDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Enddate
        hospitalAdmitDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Hospitaladmitdate
        dateOfInjury:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Dateofinjury
        priorAuthNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Priorauthnumber
      type: object
      title: SuperbillServiceDetails
    SuperbillInsuranceInput:
      properties:
        coverageType:
          anyOf:
            - type: string
            - type: 'null'
          title: Coveragetype
        payerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Payername
        planName:
          anyOf:
            - type: string
            - type: 'null'
          title: Planname
        planType:
          anyOf:
            - type: string
            - type: 'null'
          title: Plantype
        insuranceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Insuranceid
        groupId:
          anyOf:
            - type: string
            - type: 'null'
          title: Groupid
        effectiveDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Effectivedate
        eligibilityNote:
          anyOf:
            - type: string
            - type: 'null'
          title: Eligibilitynote
        claimsAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Claimsaddress
        guarantorName:
          anyOf:
            - type: string
            - type: 'null'
          title: Guarantorname
      type: object
      title: SuperbillInsuranceInput

````