Skip to main content
This example reads an invoice and returns its header fields plus every line item as a structured row. One object field captures the line-item table, so each row carries its own values, confidence and evidence.
The document
INVOICE
What comes back
invoice_number98%
issue_date98%
total_amount98%
currencyUSD
line_items
NodesParse → ExtractCredits60 per pageYou get

The workflow

Run it and read the result

Upload the invoice, then poll the run until its status is processed. The results arrive inline on that same read.

Response

The results envelope of a processed run, trimmed to the interesting fields. Every scalar field carries value, confidence, evidence, verification_status and value_override; the line_items rows repeat that shape per cell.

When it goes wrong

A currency comes back empty. An enum constrains the output to the names you declared, so an invoice in a currency you did not list has nothing to match. List every currency you expect in enum_options, or use a string field when the set is open. Your totals are off by a factor. Numbers arrive as JSON strings ("4594.62"). Cast each one with the type you declared before doing arithmetic on it. Rows are missing from a dense line-item table. Standard extraction is a single pass. Move the Extract node to the agentic tier (150 credits per page), which maps every table to the schema and reasons across sections. A value is wrong and you cannot see why. Read its evidence: every value carries the phrase and the page_number it was read from. When the evidence points at the wrong block, the field description is the ambiguous part. Name the label as it appears on the page. “Final total amount due including tax” extracts better than “total”. The numbers do not add up. Extraction reports what it read, not what is consistent. To check that subtotal + tax_amount = total_amount, add a Validate node with an arithmetic rule. Contract analysis shows a graph with validation.

Next steps

Field types

Object, enum and the other field shapes

Runs and results

Every section of the results envelope