Batch Invoice Analysis
Authentication Required
Include your API key in the x-api-key header of every request.
The Batch Invoice Analysis API queues multiple invoices across one or more businesses for asynchronous AI tax analysis and compliance classification. Use this endpoint for bulk AP processing, periodic multi-entity vendor statement reconciliation, or automated compliance sweeps across large invoice backlogs.
Integration Flow
- 1Assemble Batch: Group invoices by business entity in the
businessesarray (or submit a flatinvoicesarray). - 2Queue Job: Send
POST /prism/invoice-analyze/batch. Receive a202 Acceptedresponse with a trackingjobId. - 3Poll or Webhook: Query job status via
GET /prism/invoice-analyze/batch/:job_id/statusor receive asynchronous completion events via registered webhooks.
HTTP Request
POSThttps://api.taxstreem.com/v1/prism/invoice-analyze/batch
Request Body Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
| taskId | string | Optional | Developer-supplied task tracking identifier (e.g. task_flex_20260827_001). |
| batchId | string | Optional | Unique batch identifier for developer tracking (e.g. batch_2024_0320_01). |
| businesses | array | Conditional | Multi-business batch array (Required if flat invoices is omitted). Each item includes businessId, businessName, businessTaxID, state, country, and nested invoices. |
| invoices | array | Conditional | Flat array of invoice objects (Required if businesses is omitted). |
Response
Returns 202 Accepted confirming the batch has been successfully queued for processing.
Batch Status Endpoint
To check the status of a queued batch invoice analysis job, issue a GET request using the generated jobId:
GEThttps://api.taxstreem.com/v1/prism/invoice-analyze/batch/:job_id/status
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 '{ "taskId": "task_flex_20260827_001", "batchId": "batch_2024_0320_01", "businesses": [ { "businessId": "biz_84930291", "businessName": "Kev's Bakery Ltd", "businessTaxID": "1234567890001", "state": "Lagos", "country": "NG", "invoices": [ { "invoiceNumber": "INV-2024-00342", "vendorName": "Acme Consulting Ltd", "vendorTaxId": "1234567890123123", "invoiceDate": "2024-03-20", "currency": "NGN", "invoiceUrl": "https://storage.taxstreem.com/invoices/inv-001.pdf" }, { "invoiceNumber": "INV-2024-00343", "vendorName": "Lagos Properties Ltd", "invoiceDate": "2024-03-01", "currency": "NGN", "invoiceUrl": "https://storage.taxstreem.com/invoices/inv-002.pdf" } ] }, { "businessId": "biz_99201128", "businessName": "Mama Put Catering", "businessTaxID": "9876543210001", "state": "Abuja", "country": "NG", "invoices": [ { "invoiceNumber": "INV-2024-00891", "vendorName": "Flour Mills of Nigeria PLC", "invoiceDate": "2024-03-15", "currency": "NGN", "invoiceUrl": "https://storage.taxstreem.com/invoices/inv-003.pdf" } ] } ] }'
Example Response
202 Accepted
{
"success": true,
"data": {
"jobId": "job_a1b2c3d4e5f6",
"taskId": "task_flex_20260827_001",
"status": "pending",
"totalItems": 3,
"creditsUsed": 3,
"creditsRemaining": 497,
"message": "Batch invoice analysis queued successfully",
"statusUrl": "https://api.taxstreem.com/v1/prism/invoice-analyze/batch/job_a1b2c3d4e5f6/status"
},
"meta": {
"requestId": "req_87654321",
"timestamp": "2026-09-11T23:55:25.300Z"
}
}