TaxStreem Logo
DOCS/prism/batch-analyze-items

Batch Invoice Analysis

Authentication Required

Include your API key in the x-api-key header of every request.

The Batch Invoice Analysis API analyzes multiple invoices in a single request. Use this endpoint for bulk AP processing, periodic vendor statement reconciliation, or automated compliance sweeps across an invoice backlog.

Integration Flow

  1. 1Assemble Invoices: Collect all invoices into the invoices array — each follows the single analysis schema.
  2. 2Receive Reports: The response array contains one compliance report per invoice.
  3. 3Route Results: Trigger Flux filings for compliant invoices, escalate anomalies, and archive the full report.

HTTP Request

POSThttps://api.taxstreem.com/v1/prism/invoice/analyze/batch

Request Body

ParameterTypeRequiredDescription
invoicesarrayRequiredArray of invoice objects. Each follows the single analysis schema: invoiceNumber, vendorName, invoiceDate, currency, lineItems.

Response

Returns 200 OK with an array of compliance reports, one per submitted invoice.

Example Request
curl -X POST https://api.taxstreem.com/v1/prism/invoice/analyze/batch \
  -H "x-api-key: txsm_test_SK489c..." \
  -H "Content-Type: application/json" \
  -d '{
   "invoices": [
      {
         "invoiceNumber": "INV-2024-00342",
         "vendorName": "Acme Consulting Ltd",
         "vendorTaxId": "1234567890123123",
         "invoiceDate": "2024-03-20",
         "currency": "NGN",
         "lineItems": [
            {
               "description": "Consultancy services",
               "quantity": 1,
               "unitPrice": 250000
            }
         ]
      },
      {
         "invoiceNumber": "INV-2024-00343",
         "vendorName": "Lagos Properties Ltd",
         "invoiceDate": "2024-03-01",
         "currency": "NGN",
         "lineItems": [
            {
               "description": "Office rent March",
               "quantity": 1,
               "unitPrice": 500000
            }
         ]
      }
   ]
}'
Example Response
200 OK
{
  "results": [
    {
      "invoiceNumber": "INV-2024-00342",
      "complianceStatus": "COMPLIANT",
      "totalVat": 18750,
      "recommendedWht": 12500,
      "anomalies": [
      ]
    },
    {
      "invoiceNumber": "INV-2024-00343",
      "complianceStatus": "COMPLIANT",
      "totalVat": 0,
      "recommendedWht": 50000,
      "anomalies": [
      ]
    }
  ]
}