TaxStreem Logo
DOCS/prism/analyze-items

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

  1. 1Submit Invoice: Send the invoice metadata and line items to Prism.
  2. 2Receive Analysis: Prism returns a tax compliance assessment with line-level VAT/WHT recommendations.
  3. 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

Request Body

ParameterTypeRequiredDescription
invoiceNumberstringRequiredYour invoice reference number. Used as the idempotency key.
vendorNamestringRequiredLegal name of the issuing vendor or supplier.
vendorTaxIdstringOptionalVendor's Tax Identification Number. Improves compliance assessment accuracy.
invoiceDatestringRequiredISO 8601 date the invoice was issued (e.g. 2024-03-20).
currencystringRequiredISO 4217 currency code (e.g. NGN).
lineItemsarrayRequiredInvoice line items. Each object requires description, quantity, unitPrice, and optional vatStatus.

Response

Returns 200 OK with a synchronous compliance report for the invoice.

FieldTypeDescription
invoiceNumberstringEcho of the submitted invoice number.
complianceStatusstringCOMPLIANT, REVIEW_REQUIRED, or NON_COMPLIANT.
totalVatnumberComputed VAT amount across all line items.
recommendedWhtnumberRecommended WHT deduction amount based on the vendor profile and invoice nature.
anomaliesarrayList of detected compliance issues. Empty array when fully compliant.
Example Request
curl -X POST https://api.taxstreem.com/v1/prism/invoice/analyze \
  -H "x-api-key: txsm_test_SK489c..." \
  -H "Content-Type: application/json" \
  -d '{
   "invoiceNumber": "INV-2024-00342",
   "vendorName": "Acme Consulting Ltd",
   "vendorTaxId": "1234567890123123",
   "invoiceDate": "2024-03-20",
   "currency": "NGN",
   "lineItems": [
      {
         "description": "Professional consultancy services",
         "quantity": 1,
         "unitPrice": 250000,
         "vatStatus": 0
      }
   ]
}'
Example Response
200 OK
{
ย ย "invoiceNumber": "INV-2024-00342",
ย ย "complianceStatus": "COMPLIANT",
ย ย "totalVat": 18750,
ย ย "recommendedWht": 12500,
ย ย "anomalies": [
ย ย ]
}