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

# Get bill by ID

> Returns a single bill with full detail. Requires read:bills scope.



## OpenAPI

````yaml /openapi-v1.json get /bills/{id}
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v1
security: []
tags: []
paths:
  /bills/{id}:
    get:
      tags:
        - Bills
      summary: Get bill by ID
      description: Returns a single bill with full detail. Requires read:bills scope.
      operationId: BillsPublicController_getBill
      parameters:
        - name: id
          required: true
          in: path
          description: Bill ID
          schema:
            type: string
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBillSuccessResponse'
        '400':
          description: Missing or invalid request parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiBadRequestResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiNotFoundResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
      security:
        - api-key: []
components:
  schemas:
    GetBillSuccessResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/ExternalBillDetailResponse'
      required:
        - code
        - data
    PublicApiBadRequestResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: bad_request
        message:
          type: string
          description: Human-readable error message
          example: '''id'' must be a valid UUID'
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiNotFoundResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: not_found
        message:
          type: string
          description: Human-readable error message
          example: Resource not found
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    ExternalBillDetailResponse:
      type: object
      properties:
        id:
          type: string
          description: Bill unique identifier
          example: 9a8b7c6d-5e4f-3a2b-1c0d-e9f8a7b6c5d4
        dateOfService:
          type: string
          description: Date of service (YYYY-MM-DD)
          example: '2025-01-15'
        billingType:
          type: string
          description: Billing type
          nullable: true
          example: professional
        isCosmetic:
          type: boolean
          description: Whether the bill is cosmetic
          example: false
        isBillable:
          type: boolean
          description: >-
            Whether the bill is billable. Also true when billability has not yet
            been evaluated against EHR data.
          example: true
        virtualEncounter:
          type: boolean
          description: Whether it is a virtual encounter
          example: false
        isEmCodingEnabled:
          type: boolean
          description: Whether E&M coding is enabled
          example: true
        patientId:
          type: string
          description: Patient ID
          nullable: true
          example: c56103bc-d39c-46d3-9f31-38dd2b5e05f6
        patientFirstName:
          type: string
          description: Patient first name
          nullable: true
          example: Sarah
        patientLastName:
          type: string
          description: Patient last name
          nullable: true
          example: Johnson
        patientDob:
          type: string
          description: Patient date of birth
          nullable: true
          example: '1985-03-15'
        primaryProviderName:
          type: string
          description: Primary provider name
          nullable: true
          example: Dr. James Wilson
        billUnderName:
          type: string
          description: Bill-under provider name
          nullable: true
          example: Dr. James Wilson
        facilityId:
          type: string
          description: Facility ID
          nullable: true
          example: b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e
        facilityName:
          type: string
          description: Facility name
          nullable: true
          example: West LA Dermatology
        specialty:
          type: string
          description: Specialty
          nullable: true
          example: Dermatology
        codingGroups:
          description: Coding groups
          type: array
          items:
            $ref: '#/components/schemas/ExternalCodingGroupResponse'
        primaryInsurance:
          type: string
          description: Primary insurance name
          nullable: true
          example: Blue Cross Blue Shield
        secondaryInsurance:
          type: string
          description: Secondary insurance name
          nullable: true
          example: null
        createdAt:
          type: string
          description: Created timestamp
          example: '2025-01-15T09:30:00.000Z'
        updatedAt:
          type: string
          description: Last updated timestamp
          example: '2025-01-20T14:22:00.000Z'
        cliaNumber:
          type: string
          description: CLIA number
          nullable: true
          example: 05D2081496
        patientMrn:
          type: string
          description: Patient MRN
          nullable: true
          example: MRN-10042
        patientGender:
          type: string
          description: Patient gender
          nullable: true
          example: Female
        primaryProviderId:
          type: string
          description: Primary provider ID
          nullable: true
          example: d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a
        primaryProviderFirstName:
          type: string
          description: Primary provider first name
          nullable: true
          example: James
        primaryProviderLastName:
          type: string
          description: Primary provider last name
          nullable: true
          example: Wilson
        billUnderProviderId:
          type: string
          description: Bill-under provider ID
          nullable: true
          example: d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a
        billUnderProviderFirstName:
          type: string
          description: Bill-under provider first name
          nullable: true
          example: James
        billUnderProviderLastName:
          type: string
          description: Bill-under provider last name
          nullable: true
          example: Wilson
      required:
        - id
        - dateOfService
        - billingType
        - isCosmetic
        - isBillable
        - virtualEncounter
        - isEmCodingEnabled
        - patientId
        - patientFirstName
        - patientLastName
        - patientDob
        - primaryProviderName
        - billUnderName
        - facilityId
        - facilityName
        - specialty
        - codingGroups
        - primaryInsurance
        - secondaryInsurance
        - createdAt
        - updatedAt
        - cliaNumber
        - patientMrn
        - patientGender
        - primaryProviderId
        - primaryProviderFirstName
        - primaryProviderLastName
        - billUnderProviderId
        - billUnderProviderFirstName
        - billUnderProviderLastName
    ExternalCodingGroupResponse:
      type: object
      properties:
        id:
          type: string
          description: Coding group ID
          example: f6a7b8c9-d0e1-4f2a-3b4c-5d6e7f8a9b0c
        status:
          type: string
          description: Status
          example: finalized
        createdAt:
          type: string
          description: Created timestamp
          example: '2025-01-15T09:30:00.000Z'
        updatedAt:
          type: string
          description: Last updated timestamp
          example: '2025-01-20T14:22:00.000Z'
        diagnoses:
          description: Diagnoses in this coding group
          type: array
          items:
            $ref: '#/components/schemas/ExternalDiagnosisResponse'
        lineItems:
          description: Line items in this coding group
          type: array
          items:
            $ref: '#/components/schemas/ExternalLineItemResponse'
      required:
        - id
        - status
        - createdAt
        - updatedAt
        - diagnoses
        - lineItems
    ExternalDiagnosisResponse:
      type: object
      properties:
        id:
          type: string
          description: Diagnosis ID
          example: a7b8c9d0-e1f2-4a3b-4c5d-6e7f8a9b0c1d
        code:
          type: string
          description: Diagnosis code (e.g. ICD-10)
          example: L70.0
        description:
          type: string
          description: Diagnosis description
          nullable: true
          example: Acne vulgaris
        position:
          type: number
          description: Position in the diagnosis list
          example: 1
        codeRevision:
          type: string
          description: Code revision (e.g. ICD-10-CM)
          example: ICD-10-CM
      required:
        - id
        - code
        - description
        - position
        - codeRevision
    ExternalLineItemResponse:
      type: object
      properties:
        id:
          type: string
          description: Line item ID
          example: b8c9d0e1-f2a3-4b4c-5d6e-7f8a9b0c1d2e
        code:
          type: string
          description: Procedure code (e.g. CPT)
          example: '99213'
        codeType:
          type: string
          description: Code type (e.g. CPT, HCPCS)
          example: CPT
        description:
          type: string
          description: Description
          nullable: true
          example: Office/outpatient visit, est patient, low complexity
        units:
          type: string
          description: Number of units
          example: '1'
        charge:
          type: string
          description: Charge per unit
          nullable: true
          example: '150.00'
        totalCharge:
          type: string
          description: Total charge
          nullable: true
          example: '150.00'
        balance:
          type: string
          description: Remaining balance
          nullable: true
          example: '30.00'
        modifiers:
          description: Modifiers
          type: array
          items:
            $ref: '#/components/schemas/ModifierInfo'
        position:
          type: number
          description: Position in the line item list
          nullable: true
          example: 1
        linkedDiagnoses:
          description: Linked diagnoses
          type: array
          items:
            $ref: '#/components/schemas/LinkedDiagnosisInfo'
        ndcCode:
          type: string
          description: NDC code
          nullable: true
          example: 00069-3150-83
        ndcQualifier:
          type: string
          description: NDC qualifier
          nullable: true
          example: N4
        ndcQuantity:
          type: string
          description: NDC quantity
          nullable: true
          example: '1.0'
        ndcProcedureDescription:
          type: string
          description: NDC / supplemental procedure description (e.g. from claim line)
          nullable: true
      required:
        - id
        - code
        - codeType
        - description
        - units
        - charge
        - totalCharge
        - balance
        - modifiers
        - position
        - linkedDiagnoses
        - ndcCode
        - ndcQualifier
        - ndcQuantity
        - ndcProcedureDescription
    ModifierInfo:
      type: object
      properties:
        code:
          type: string
          description: Modifier code
          example: '25'
        name:
          type: string
          description: Modifier name
          example: Significant, Separately Identifiable E/M Service
      required:
        - code
    LinkedDiagnosisInfo:
      type: object
      properties:
        code:
          type: string
          description: Diagnosis code
          example: L70.0
        description:
          type: string
          description: Diagnosis description
          nullable: true
          example: Acne vulgaris
        position:
          type: number
          description: Position
          example: 1
      required:
        - code
        - description
        - position
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````