Invoices

Upload Invoice PDF for AI Extraction

    Upload an invoice PDF file for automated AI-powered extraction and processing.

    **Processing Flow:**
    1. PDF is uploaded to S3 storage
    2. Background LangGraph workflow is queued for intelligent processing
    3. API returns immediately (202 Accepted)
    4. Background workflow processing:
       - Extracts invoice data using Reducto AI
       - Classifies document type (invoice/credit note)
       - Validates document is from your business
       - Matches or creates customer using AI semantic matching
       - Detects semantic duplicates
       - Validates extracted data
       - Creates invoice record
    5. Extracted invoice appears in GET /invoices/ list

    **File Requirements:**
    - Format: PDF or images (PNG, JPEG, GIF, BMP, TIFF, HEIC)
    - Size: Maximum 50MB for PDF, 10-20MB for images
    - Content: Invoice document or scanned invoice image
    - Content-Type validation: File content is verified to match declared type

    **Extraction Quality:**
    - Fields with ≥90% confidence are auto-filled
    - Fields below threshold require manual review
    - Line items with parsing errors are flagged
    - Total mismatches (>1% or >$10) trigger review flag

    **Duplicate Detection:**
    - AI compares with last 100 invoices
    - High confidence duplicates (≥90%) are blocked
    - Medium confidence (70-89%) are flagged for review
    - Low confidence (<70%) are processed normally

    **Access Control:**
    - Requires partner authentication
    - Business must belong to authenticated partner
    
post/v1/platform/businesses/{business_id}/ar-documents/upload

Request

  • Base URL
    https://docs.thredfi.com (the document declares no server; this is the origin it was published from)
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP basic
    • or HTTP bearer
    • or HTTP bearer

Path parameters

business_idstring uuid required

Request body

filestring binary required

PDF file to upload (max 50MB)

Response

document_idstring uuid required

Unique identifier for the uploaded document

task_idstring required

Celery task ID for tracking processing

statusstring required

Current status (always 'processing' initially)

messagestring required

Instructions for checking extraction result

Changes

No recorded changes to this operation across all 1 revision of this API.