Processing Commercial Invoices

Learn how to upload and process commercial invoices, including field extraction, validation, and compliance checks.

Overview

CargoLint’s invoice processing engine automatically extracts structured data from commercial invoices with high accuracy. Our AI-powered system handles various invoice formats and provides confidence scores for every extracted field.

Supported Invoice Formats

CargoLint accepts invoices in the following file formats:

  • PDF - Native PDF documents
  • TIFF - Multi-page TIFF files
  • JPEG/PNG - Single-page images

Maximum file size: 5 MB per document.

Extracted Fields

When processing an invoice, CargoLint extracts the following key information:

Core Information

  • Shipper/Seller - Company name, address, contact details
  • Consignee/Buyer - Company name, address, contact details
  • Invoice Number - Unique invoice identifier
  • Invoice Date - Issue date and terms
  • Currency - Transaction currency code
  • Total Amount - Invoice total with tax breakdown

Line Items

Each line item includes:

  • Item description
  • Quantity and unit of measure
  • Unit price and line total
  • HS code classification
  • Country of origin
  • Weight and dimensions (if available)

Confidence Scoring

Each extracted field includes a confidence score (0.0 - 1.0) indicating extraction reliability:

{
  "invoice_number": {
    "value": "INV-2026-001234",
    "confidence": 0.98
  },
  "shipper": {
    "name": "TechExport Co., Ltd",
    "confidence": 0.95,
    "address": "Shanghai, China",
    "address_confidence": 0.92
  },
  "line_items": [
    {
      "description": "Electronic components",
      "quantity": 1000,
      "unit_price": 25.50,
      "hs_code": "8542.31.00",
      "hs_code_confidence": 0.87
    }
  ]
}

Invoice Confidence Thresholds

  • High confidence: > 0.85
  • Review recommended: 0.65 - 0.85
  • Low confidence: < 0.65 (requires manual review)

Compliance Checks

CargoLint automatically validates:

  • Required field presence
  • HS code consistency with product description
  • Total amount calculations
  • Incoterm validation
  • Weight mismatches
  • Export restrictions by destination country

Handling Low-Confidence Extractions

When the overall document confidence falls below 70%:

  1. Review Queue - Documents are automatically flagged for human review
  2. Manual Correction - Team members can review and correct extractions in a side-by-side viewer
  3. Learning - Corrections feed back into the system to improve future accuracy

Best Practices

  • Ensure invoice images are clear and well-lit
  • Avoid blurred or skewed documents
  • Provide complete invoices (don’t crop important fields)
  • Use standard invoice templates when possible
  • Scan at 300 DPI minimum for best results

Processing API Endpoint

Upload an invoice for processing:

curl -X POST https://api.cargolint.com/api/v1/documents \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@invoice.pdf"

The API returns the document ID and processing status. Retrieve extraction results once processing completes:

curl -X GET https://api.cargolint.com/api/v1/documents/{document_id}/extractions \
  -H "X-API-Key: YOUR_API_KEY"

Processing typically completes within 2-5 seconds for standard invoices.