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

# Upload Json

> Upload a structured JSON estimate for catalog resolution, validation, and ESX generation.



## OpenAPI

````yaml /openapi.json post /upload/json
openapi: 3.1.0
info:
  title: Capout API
  description: >-
    Programmatic REST, WebSocket, and SSE API for uploading documents, tracking
    processing status, and reading claim balances.
  version: 1.0.0
servers:
  - url: https://api.capout.ai
    description: Public API
security: []
paths:
  /upload/json:
    post:
      tags:
        - Upload
      summary: Upload Json
      description: >-
        Upload a structured JSON estimate for catalog resolution, validation,
        and ESX generation.
      operationId: upload_json_upload_json_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StructuredEstimateV1'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CapoutApiKey: []
components:
  schemas:
    StructuredEstimateV1:
      properties:
        schema_version:
          type: string
          const: '1'
          title: Schema Version
          description: Contract schema version, must be '1'
          default: '1'
        file_name:
          type: string
          minLength: 1
          title: File Name
          description: Source filename
        estimate_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Estimate Name
          description: Display project or estimate name
        claim_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Claim Number
          description: Insurance claim number
        policy_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Policy Number
          description: Insurance policy number
        insured_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Insured Name
          description: Insured client name
        property_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Property Address
          description: Property address
        date_of_loss:
          anyOf:
            - type: string
            - type: 'null'
          title: Date Of Loss
          description: Date of loss (ISO format)
        carrier_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Carrier Name
          description: Insurance carrier name
        price_list:
          anyOf:
            - type: string
            - type: 'null'
          title: Price List
          description: Target Xactimate price list binding code
        line_items:
          items:
            $ref: '#/components/schemas/StructuredLineItemV1'
          type: array
          minItems: 1
          title: Line Items
          description: Nonempty ordered list of line items
      type: object
      required:
        - file_name
        - line_items
      title: StructuredEstimateV1
      description: Version 1 typed contract for structured estimate imports.
    UploadResponse:
      properties:
        document_id:
          type: string
          title: Document Id
          description: >-
            Public document ID for status polling, realtime subscriptions, and
            ESX downloads.
        status:
          type: string
          title: Status
          default: processing
        created_at:
          type: string
          format: date-time
          title: Created At
        status_url:
          type: string
          title: Status Url
        ws_url:
          type: string
          title: Ws Url
          default: /ws/status
        download_url:
          type: string
          title: Download Url
          description: >-
            Stable authenticated ESX download URL. It redirects to the
            Contractor profile by default once export is complete.
        contractor_download_url:
          type: string
          title: Contractor Download Url
          description: Stable authenticated URL for the Contractor (8D) ESX file
        carrier_download_url:
          type: string
          title: Carrier Download Url
          description: Stable authenticated URL for the Carrier (5L) ESX file
        source_type:
          type: string
          title: Source Type
          default: PDF
      type: object
      required:
        - document_id
        - created_at
        - status_url
        - download_url
        - contractor_download_url
        - carrier_download_url
      title: UploadResponse
      description: Response body for POST /upload.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StructuredLineItemV1:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Optional customer row identifier, unique within the estimate
        cat:
          anyOf:
            - type: string
            - type: 'null'
          title: Cat
          description: Xactimate category code (e.g. RFG, DRY)
        sel:
          anyOf:
            - type: string
            - type: 'null'
          title: Sel
          description: Xactimate selector code (e.g. 3TAB, 1/2)
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Item description for catalog resolution
        quantity:
          type: number
          exclusiveMinimum: 0
          title: Quantity
          description: Required finite number greater than zero
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
          description: Unit of measure (e.g. EA, SF, LF, SQ)
        activity:
          type: string
          title: Activity
          description: Activity symbol (+, -, &, R, I, M) or supported activity name
          default: +
        unit_price:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Unit Price
          description: Custom base unit price (non-negative)
        line_item_total:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Line Item Total
          description: Base whole-line total
        tax:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Tax
          description: Sales tax dollar amount
        rcv:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Rcv
          description: Replacement cost value
        acv:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Acv
          description: Actual cash value
        depreciation:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Depreciation
          description: Depreciation dollar amount
        depreciation_applicable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Depreciation Applicable
          description: Whether depreciation applies to this line
        depreciation_recoverable:
          type: boolean
          title: Depreciation Recoverable
          description: True if depreciation is recoverable, false if non-recoverable
          default: true
        overhead_profit:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Overhead Profit
          description: Overhead & Profit dollar amount
        overhead_profit_applicable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Overhead Profit Applicable
          description: Whether O&P applies to this line
        is_paid_when_incurred:
          type: boolean
          title: Is Paid When Incurred
          description: Paid when incurred flag
          default: false
        enabled:
          type: boolean
          title: Enabled
          description: Whether item is enabled for estimate export
          default: true
        room:
          type: string
          title: Room
          description: Room or area grouping
          default: General
        section:
          anyOf:
            - type: string
            - type: 'null'
          title: Section
          description: Optional section within room
        f9_note:
          anyOf:
            - type: string
            - type: 'null'
          title: F9 Note
          description: Optional multiline plain text F9 note
      type: object
      required:
        - quantity
      title: StructuredLineItemV1
      description: Line item within a StructuredEstimateV1 payload.
    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
  securitySchemes:
    CapoutApiKey:
      type: apiKey
      description: Organization-scoped CapOut API key
      in: header
      name: capout-api-key

````