Extraction & TablesPOST /v1/extract?template=tax_invoice&options=tables

Extract Invoice Line Items, Subtotals & Tax Breakdowns

Automates accounts payable intake. Reads tax invoices across jurisdictions (AU GST, UK VAT, US Sales Tax). Employs template extraction for headers and zero-cost native PDF vector parsing for line item tables.

Instant execution

Run this verification workflow directly. For instant zero-auth testing with deterministic fixture data, include the Stp-Sandbox: true header.

bash
curl -X POST "https://www.stipple.sh/v1/extract?template=tax_invoice&options=tables" \
  -H "Authorization: Bearer stp_live_your_key_here" \
  -F "file=@supplier_invoice_1094.pdf"

Expected JSON response

The engine returns deterministic findings with evidence traces, confidence bounds, and recommended actions:

json
{
  "document_type": "tax_invoice",
  "mode": "template",
  "fields": {
    "invoice_number": { "value": "INV-2026-9041", "confidence": 0.99, "page": 1 },
    "vendor_abn": { "value": "51 824 753 556", "confidence": 0.98, "page": 1 },
    "invoice_date": { "value": "2026-08-10", "confidence": 0.99, "page": 1 },
    "subtotal": { "value": 4500.00, "confidence": 0.98, "page": 1 },
    "gst": { "value": 450.00, "confidence": 0.98, "page": 1 },
    "total": { "value": 4950.00, "confidence": 0.99, "page": 1 }
  },
  "tables": [
    {
      "page": 1,
      "source": "native_pdf",
      "rows": 2,
      "header": ["Description", "Quantity", "Rate", "Amount"],
      "json": [
        { "Description": "Cloud Infrastructure Engineering Consulting", "Quantity": "30 hrs", "Rate": "150.00", "Amount": "4,500.00" }
      ]
    }
  ]
}

AI agent prompt & MCP tool usage

When configuring autonomous agents (Claude Desktop, Cursor, Hermes), use this verified prompt pattern:

text
You are an Accounts Payable Automation Agent.
1. Call extract_fields(template="tax_invoice", options="tables")
2. Verify that subtotal + gst == total.
3. Check vendor_abn against the approved vendor registry.
4. Route to ERP payment queue if valid, else flag for manual AP review.

Input parameters & headers

FieldTypeRequiredDescription
filefile (multipart)RequiredTax invoice PDF or image file.
templatestringOptionalSet to "tax_invoice" to apply standard invoice taxonomy.
optionsstringOptionalSet to "tables" to extract row-by-row line items.

Diagnostic signals & failed checks

Each check reports exactly what it tested and what evidence it found. High severity signals trigger an escalated risk band:

tax.gst_calculation_variancemedium

Stated GST deviates from statutory 10% on taxable items by more than 1 cent rounding.

invoice.abn_missinghigh

Document claims to be a Tax Invoice but lacks a valid statutory business tax number.

Production considerations & edge cases

  • Multi-currency line items: Overseas disbursements billed on domestic invoices are tagged with their specific currency codes.

Related workflows

Take it to production

The snippets above run against the sandbox with Stp-Sandbox: true — no key, no credits, fixture data. Drop that header and the call is real, which needs a key.

A weekly credit allowance of your own, usage metering, and somewhere for purchased credits to live.

Every key gets a free weekly allowance. Past that, prepaid credit packs cover it, and Errors & limits says what happens when you run out.