TaxStreem Logo
DOCS/prism/vendor-upload

Vendor Upload

Authentication Required

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

The Vendor Upload API allows you to upload vendor documents — such as invoices, receipts, or purchase orders — directly to Prism for automated extraction and tax compliance analysis. Prism parses the document, extracts key fields, and returns structured data that can feed directly into VAT and WHT filing workflows.

Requests to this endpoint must use multipart/form-data encoding. Do not send JSON — the Content-Type header must be multipart/form-data.

Integration Flow

  1. 1Upload Document: Send the vendor document as a file field in a multipart form request.
  2. 2Receive Extracted Data: Prism returns structured fields — vendor name, invoice number, line items, totals, and tax treatment — parsed from the document.
  3. 3Feed Downstream: Pass the extracted data to the Invoice Analysis or Flux Filing APIs to complete your compliance workflow.

HTTP Request

POSThttps://api.taxstreem.com/v1/prism/vendor/upload

Request — Form Fields

FieldTypeRequiredDescription
filefileRequiredThe vendor document to analyse. Accepted formats: PDF, PNG, JPG. Maximum file size: 10 MB.
documentTypestringRequiredType of document being uploaded. Accepted values: invoice, receipt, purchase_order.
vendorIdstringOptionalYour internal vendor identifier. If provided, Prism uses your existing vendor profile to improve extraction accuracy.
currencystringOptionalISO 4217 hint for the document currency. Helps Prism resolve ambiguous amounts (e.g. NGN).

Response

Returns 200 OK with structured data extracted from the uploaded document.

FieldTypeDescription
documentIdstringUnique identifier for the uploaded document. Use this to reference the document in subsequent API calls.
vendorNamestringExtracted vendor or supplier name.
vendorTaxIdstring | nullExtracted Tax ID of the vendor. null if not found in the document.
invoiceNumberstring | nullExtracted invoice or receipt reference number.
invoiceDatestring | nullISO 8601 date extracted from the document.
totalAmountnumberTotal document amount including taxes.
currencystringDetected or provided currency code.
lineItemsarrayExtracted line items. Each contains description, quantity, unitPrice, and vatStatus.
confidencenumberExtraction confidence score between 0 and 1. Scores below 0.75 indicate fields that may need manual verification.

Error Codes

HTTP StatusError KeyCause & Resolution
400Bad RequestMissing file or unsupported file format. Ensure you are sending multipart/form-data.
401UnauthorizedMissing or invalid x-api-key header.
413Payload Too LargeFile exceeds the 10 MB limit. Compress or split the document before uploading.
422Unprocessable EntityPrism could not extract meaningful data from the document. Try a higher-resolution scan or a different file.
Example Request
curl -X POST https://api.taxstreem.com/v1/prism/vendor/upload \
  -H "x-api-key: txsm_test_SK489c..." \
  -H "Content-Type: multipart/form-data" \
  -d '{
   "file": "@/path/to/invoice.pdf",
   "documentType": "invoice",
   "vendorId": "vendor-acme-001",
   "currency": "NGN"
}'
Example Response
200 OK
{
  "documentId": "doc-prism-xaee2ddf",
  "vendorName": "Acme Consulting Ltd",
  "vendorTaxId": "1234567890123123",
  "invoiceNumber": "INV-2024-00342",
  "invoiceDate": "2024-03-20",
  "totalAmount": 281250,
  "currency": "NGN",
  "lineItems": [
    {
      "description": "Professional consultancy services",
      "quantity": 1,
      "unitPrice": 250000,
      "vatStatus": 0
    }
  ],
  "confidence": 0.96
}