Invoice Analysis
Authentication Required
Include your API key in the x-api-key header of every request.
The Invoice Analysis API uses Prism to validate, extract, and classify invoice data for tax compliance. Submit a structured invoice and receive a compliance assessment — including VAT treatment, recommended WHT deductions, and any detected anomalies — in a single synchronous response.
Integration Flow
- 1Submit Invoice: Send the invoice metadata and line items to Prism.
- 2Receive Analysis: Prism returns a tax compliance assessment with line-level VAT/WHT recommendations.
- 3Act on Results: Route compliant invoices to payment, flag anomalies for review, or trigger Flux filing automatically.
HTTP Request
POSThttps://api.taxstreem.com/v1/prism/invoice-analyze/single
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| businessId | string | Required | Unique identifier of your business/client entity. |
| businessName | string | Optional | Legal or trade name of the business entity. |
| businessTaxID | string | Optional | Business Tax Identification Number (TIN). |
| invoiceNumber | string | Optional | Invoice reference code (if known). |
| vendorName | string | Optional | Name of issuing vendor/supplier (if known). |
| vendorTaxId | string | Optional | Vendor's Tax Identification Number (if known). |
| invoiceDate | string | Optional | ISO issue date (if known, e.g. 2024-03-20). |
| currency | string | Optional | ISO 4217 currency code (e.g. NGN). |
| invoiceUrl | string | Optional | Public or pre-signed URL of invoice document (PDF, PNG, JPG) for OCR, error detection & tax treatment. |
Response
Returns 202 Accepted with job tracking details. Results are delivered via webhooks or polled via status URL.
| Field | Type | Description |
|---|---|---|
| data.jobId | string | Unique tracking job ID. |
| data.status | string | Job status (pending). |
Example Request
curl -X POST https://api.taxstreem.com/v1/prism/invoice-analyze/single \ -H "x-api-key: txsm_test_SK489c..." \ -H "Content-Type: application/json" \ -d '{ "businessId": "349584893-35444", "businessName": "Kev's Bakery Ltd", "businessTaxID": "12345678-0001", "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" }'
Example Response
202 Accepted
{
"success": true,
"data": {
"jobId": "job_987654321xyz",
"taskId": "task_12345",
"status": "pending",
"totalItems": 1,
"creditsUsed": 1,
"creditsRemaining": 499,
"message": "Single invoice treatment queued successfully",
"statusUrl": "/v1/prism/invoice-analyze/batch/job_987654321xyz/status"
}
}