Invoice analysis

​

Analyze an invoice document and return extracted invoice details.

Provide exactly one invoice document using multipart upload, document_url, or document_base64.

For full loan application ingestion with multiple document types, use POST /application/data. If a single document contains multiple invoices, the response may include multiple records in data.

Body·InvoiceAnalysisJsonRequest

required

Responses

  • application/json
  • application/json
  • Missing or invalid Bearer token. Response body is empty.

  • application/json
  • application/json
Request Example for post/application/invoice-analysis
curl https://api.kaaj.ai/application/invoice-analysis \
  --request POST \
  --header 'Content-Type: multipart/form-data' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --form 'file=@filename' \
  --form 'businessLegalName=' \
  --form 'run_price_comparables=true'
{
  "success": true,
  "app_id": "Kaaj-app-2",
  "file_id": 12345,
  "workflow_run_id": "987da4ba-ecaa-4abd-8231-416ae3fd4395",
  "data": [
    {
      "invoice_id": 67890,
      "total_invoice_value": 148225,
      "sender": {
        "name": "Kaaj-vendor-1",
        "address": "2 Kaaj Street, Kaaj-city, XX 00000"
      },
      "receiver": {
        "name": "Kaaj-business-2",
        "address": "3 Kaaj Street, Kaaj-city, XX 00000"
      },
      "transactions": [
        {
          "date": "2024-08-07",
          "description": "Sold Unit(s)",
          "amount": 147200,
          "category": "hard"
        }
      ],
      "equipments": [
        {
          "equipmentType": "Truck",
          "equipmentMake": "Kaaj-make",
          "equipmentModel": "model1",
          "equipmentYear": 2021,
          "equipmentCost": 147200,
          "equipmentVin": "vin1234"
        }
      ],
      "down_payment": 29645,
      "document_url": "https://example.com/downloads/invoice.pdf"
    }
  ]
}