Documents

Upload Document for AI Classification (AR/AP)

    Upload a financial document file for automated AI-powered AR/AP classification and processing.

    **Processing Flow:**
    1. Document is uploaded to S3 storage
    2. Background unified workflow is queued
    3. API returns immediately (202 Accepted)
    4. Background workflow processing:
       - Extracts document data using Reducto AI
       - Classifies as AR (Accounts Receivable) or AP (Accounts Payable)
       - Routes to appropriate workflow:
         - AR: Sales invoices, customer credit notes (you are the issuer)
         - AP: Bills, receipts, vendor credit notes (you are the recipient)
       - Matches or creates customer/vendor using AI
       - Creates appropriate entity record
    5. Extracted entity appears in respective API endpoint

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

    **Classification Confidence:**
    - High confidence (≥80%): Document processed automatically
    - Low confidence (<80%): Document marked as failed, manual classification required

    **Access Control:**
    - Requires partner authentication
    - Business must belong to authenticated partner
    
post/v1/platform/businesses/{business_id}/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 or image file (AR or AP document, 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 result after AR/AP classification

Changes

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