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

# Upload order document

> Upload one or more documents (PDF, images, or text files) for processing. Files are validated, stored, and queued for background AI processing to extract purchase order information.




## OpenAPI

````yaml POST /order/upload
openapi: 3.1.0
info:
  title: DocOpsAI API
  version: 0.1.0
  description: >
    AI-based order processing application that extracts information from email
    attachments and forwards to backend systems. Provides endpoints for order
    management, customer and product CRUD, email watching, and template
    parameter configuration.
  contact:
    name: DevOps Company
servers:
  - url: https://start.aiotic.ai
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: healthcheck
    description: Service health monitoring
  - name: order
    description: Order document upload and processing
  - name: order_status
    description: Order processing status tracking
  - name: customer
    description: Customer record management with vector search
  - name: product
    description: Product record management
  - name: template_parameters
    description: Prompt template parameter management
  - name: email-watcher
    description: Email inbox monitoring and processing
paths:
  /order/upload:
    post:
      tags:
        - order
      summary: Upload order document
      description: >
        Upload one or more documents (PDF, images, or text files) for
        processing. Files are validated, stored, and queued for background AI
        processing to extract purchase order information.
      operationId: uploadOrder
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - files
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: One or more files to process (PDF, JPG, PNG, TXT, MD)
                request_id:
                  type: string
                  format: uuid
                  description: Optional custom UUID for the request
              additionalProperties:
                type: string
                description: Additional form fields stored as metadata
      responses:
        '200':
          description: Files accepted and queued for processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderUploadResponse'
        '400':
          description: Invalid request (no files, invalid UUID, unsupported format)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported media type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    OrderUploadResponse:
      type: object
      required:
        - request_id
      properties:
        request_id:
          type: string
          format: uuid
          description: Unique identifier for the uploaded document
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >
        API key for authentication. Required on all endpoints except
        /healthcheck. Customer and product endpoints also accept a
        customer-specific API key.

````