API v1 documentation
Extraction fields
Understand the normalized JSON shape returned after processing completes.
Extraction response shape
Extraction responses are keyed by normalized field name. Each field contains a system-ready value, optional candidates considered for review, and optional provenance for the selected value. Candidate provenance is not included.
{
"data": {
"type": {
"value": "invoice",
"candidates": ["Invoice"]
},
"document_number": {
"value": "RE-2026-1048",
"candidates": ["RE-2026-1048"],
"provenance": {
"method": "structured_invoice",
"source": "pdf_embedded_xml",
"derived_from": [],
"transforms": []
}
},
"issue_date": {
"value": "2026-05-10",
"candidates": ["10 May 2026"]
},
"sender_name": {
"value": "Meyer Supply GmbH",
"candidates": ["Meyer Supply GmbH"]
},
"recipient_name": {
"value": "Northwind Operations Ltd.",
"candidates": ["Northwind Operations Ltd."]
},
"currency": {
"value": "EUR",
"candidates": ["EUR"]
},
"gross_amount": {
"value": "1079.50",
"candidates": ["Amount due EUR 1,079.50"]
},
"tax_breakdowns": {
"value": [
{
"taxable_amount": "1079.50",
"tax_amount": "0.00",
"tax_rate": "0.00",
"taxability": "taxable",
"tax_collection_mechanism": "reverse_charge",
"tax_exemption_reason": "Intra-EU B2B reverse charge"
}
],
"candidates": ["Reverse charge applies under Article 196 VAT Directive"]
}
}
}
| Property | Type | Description |
|---|---|---|
data | Object | Object keyed by field name. Standard keys are listed below; account-specific or future fields can add more keys. |
data.<field>.value | String, array, object, or null | Normalized value to map into your system. |
data.<field>.candidates | Array or null | Raw or derived candidates considered for that field. Store them if you build review screens or troubleshooting workflows; they do not identify the origin of the selected value. |
data.<field>.provenance | Object or null | Persisted origin of the selected non-null value. New automatic results report method, source, derived_from, and transforms. Legacy rows and all effective extraction fields projected from a profile result after any human-review decision return null, including fields not individually reviewed, because that projection no longer represents untouched automatic output. It never contains document values or text snippets. |
Winning-value provenance
method is one of structured_invoice, ai, deterministic, structured_markup, email_envelope, derived, or unknown. source uses a bounded category such as xml, pdf_embedded_xml, email_attachment_xml, document_text, pdf_text, ocr_text, email_header, or email_body. Broader categories such as mixed are used when a more precise source cannot be attributed safely.
A semantically derived value identifies its inputs without copying their contents. For example, a BIC calculated from an extracted IBAN reports method: "derived", derived_from: ["iban"], and a bounded transform identifier. Normalization alone preserves the original extraction method. Read latest_extraction_run.provenance_summary for method counts across all selected non-null fields; strategies_used remains separate processing metadata. The summary is null when the run has no persisted automatic winning-field provenance, including analysis, validation, in-progress, legacy, and reviewed-profile results.
E-invoice validation coverage
The validation claim is reported per run in quality.structured.validation_scope. xml_profile_conformance applies only to Standard XRechnung 3.0 and Extension XRechnung 3.0 in the named XML syntax, profile, scenario, and persisted ruleset version. structural_and_business reports deterministic parser, structural, business, and arithmetic checks without claiming complete official profile conformance.
| Syntax and profile | Validation path | Reported scope |
|---|---|---|
| XRechnung 3.0, UBL Invoice or CreditNote | Pinned KoSIT validator and XRechnung 3.0.2 configuration, using the matching UBL scenario. | xml_profile_conformance |
| XRechnung 3.0, CII | Pinned KoSIT validator and XRechnung 3.0.2 configuration, using the CII scenario on the original XML. | xml_profile_conformance |
| Extension XRechnung 3.0, UBL Invoice or CII | Pinned KoSIT extension scenario on the original syntax plus deterministic mapping checks. | xml_profile_conformance |
| CVD XRechnung 0.9, CII | Pinned KoSIT CVD scenario on the original CII plus deterministic mapping checks. UBL CVD is not claimed as supported; complete XML profile conformance is not claimed. | structural_and_business |
| ZUGFeRD 1.0 COMFORT | Bundled XSD and Schematron with pinned artifact checksums, plus deterministic arithmetic rules; complete XML profile conformance is not claimed. | structural_and_business |
| Supported Factur-X/ZUGFeRD 2 and other supported CII/UBL profiles | Deterministic parser, structural, business, and arithmetic checks. | structural_and_business |
| Unknown or insufficiently supported profile | No conformance claim; inspect validation_status and assessment. | none |
For a PDF with embedded XML, the XML result and visible invoice evidence are assessed separately. In validation mode, bounded rendered OCR supplies the visible evidence; a searchable or hidden native text layer cannot establish a passing result. A valid XML profile can therefore retain validation_status: "valid" while assessment: "fail" reports a PDF/XML conflict. Multiple recognized invoice XML attachments return multiple_embedded_invoice_xml_attachments as an indeterminate result instead of selecting one. No current result claims complete PDF/A or e-invoice container conformance, and none is a statement of legal validity.
Extension XRechnung 3.0
Exdata validates the original UBL or CII for Extension XRechnung 3.0 with the matching pinned official KoSIT scenario, without rewriting the source syntax. Support is limited to invoices that declare the exact profile urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0#conformant#urn:xeinkauf.de:kosit:extension:xrechnung_3.0 and pass the profile and deterministic mapping checks. The exact CVD profile is additionally supported in CII syntax through its pinned CVD scenario, but its reported scope is structural_and_business; UBL CVD is not claimed as supported. An invalid invoice or an unknown or unsupported profile fails closed.
In extraction mode, every supported e-invoice receives one human-readable HTML invoice visualization in CII, UBL, and ZUGFeRD 1.0 COMFORT syntax, so the same invoice layout is returned regardless of the source format. Locally validated Extension XRechnung 3.0 invoices additionally keep their source-ordered recursive invoice-line view. For exceptionally large line sets or repeatable review sections, the affected content is shown as a clearly labelled bounded prefix so browser rendering remains safe; the original XML remains unchanged. This HTML file is the canonical preview; the accompanying JPEG is only a representative thumbnail and visual fallback. Other convertible e-invoices are transformed to HTML, while remaining safe XML uses a pretty-printed XML fallback.
Accepted invoices map into the document-level v1 fields. For the UBL Extension path, these include type, document_number, date, issue_date, period_start, period_end, currency, net_amount, gross_amount, tax_amount, seller and recipient identity, address, country, tax and VAT fields, customer_id, payment_due_date, one unambiguous payee iban and bic, normalized tax breakdown and classification fields, and note. Recursive line hierarchy, embedded attachment metadata, and third-party payment rows feed the HTML visualization but are not returned as v1 extraction fields; exceptionally large line sets or repeatable review sections are shown as clearly labelled source-order prefixes. Multiple ambiguous payee accounts remain validation-only and leave the singular iban and bic fields null.
For the UBL Extension path, net_amount is UBL TaxExclusiveAmount and gross_amount is the tax-inclusive invoice total, UBL TaxInclusiveAmount (BT-112). gross_amount is not the remaining PayableAmount after prepaid or third-party payment allocation.
ZUGFeRD 1.0 COMFORT
Exdata supports invoices that declare the exact profile urn:ferd:CrossIndustryDocument:invoice:1p0:comfort and TypeCode 380 or 84. The published tax TypeCodes VAT, ZF_INSURANCE_TAX (insurance tax), and AAJ (second-hand-parts tax) are supported. The original XML must pass its ZUGFeRD 1.0 XSD, Schematron constraints, and arithmetic validation. The reported scope is structural_and_business, not complete XML profile conformance. ZUGFeRD 1.0 BASIC, EXTENDED, other document or tax codes, invalid, and unknown profiles fail closed with unsupported_structured_invoice.
Accepted COMFORT invoices map validated document, party, payment, amount, tax, billing-period, and note values into the document-level v1 fields. gross_amount is GrandTotalAmount; the optional DuePayableAmount is used only as validation and linkage evidence. The same rules apply to XML embedded in a PDF; embedded values become authoritative only when the visible invoice corroborates its critical identity and amounts without conflicts. XML email attachments use the same validation path.
Normalized values
Use value for automation, candidates for review, and provenance to route or audit the selected value by extraction path. The same response shape is used for PDFs, images, office documents, email files, XML/e-invoices, and structured source files.
| Kind | Format | Example | Notes |
|---|---|---|---|
| Missing value | JSON null | null | The field was not visible, not applicable, or not extracted with enough confidence. |
| Amount | Dot-decimal string with two digits | 1079.50 | Negative balances keep a leading minus sign, for example -42.30. |
| Date | YYYY-MM-DD | 2026-05-10 | Dates are normalized when the document provides enough information. |
| Currency | ISO 4217 | EUR | Always uppercase when extracted. |
| Country | ISO 3166-1 alpha-2 | DE, MT | Used for sender and recipient country codes. |
| Tax row | Array of objects | tax_breakdowns.value | One row per visible tax rate or category. |
Tax breakdown rows
tax_breakdowns.value is null or an array. Each row represents one visible tax rate or tax category from the document. Use rows when your system needs posting, VAT/GST handling, reverse-charge treatment, or audit trails.
{
"tax_breakdowns": {
"value": [
{
"taxable_amount": "1079.50",
"tax_amount": "0.00",
"tax_rate": "0.00",
"taxability": "taxable",
"tax_collection_mechanism": "reverse_charge",
"tax_exemption_reason": "Intra-EU B2B reverse charge"
}
],
"candidates": ["Reverse charge applies under Article 196 VAT Directive"]
}
}
| Subfield | Type | Allowed values / format | Description |
|---|---|---|---|
taxable_amount | Decimal string or null | 1079.50 | Amount the row's tax is calculated from, excluding tax. |
tax_amount | Decimal string or null | 205.10, 0.00 | Tax amount for this row. |
tax_rate | Decimal string or null | 19.00, 7.00, 0.00 | Percentage rate shown on the document. The percent sign is omitted. |
taxability | String or null | taxable, zero_rated, exempt, out_of_scope | Whether the row is taxable, zero-rated, exempt, or outside the tax system. |
tax_collection_mechanism | String or null | seller_collected, reverse_charge, buyer_use_tax, not_collected | Who accounts for the tax. Reverse charge belongs here. |
tax_exemption_reason | String or null | Free text from the document | Visible exemption, zero-rating, out-of-scope, or reverse-charge reason. |
Field metadata
Every standard extraction key below can appear in the data object. Use the field name as the stable mapping key, candidates for value review, and provenance for the origin of the selected value.
| Field | Common documents | Source | Integration note |
|---|---|---|---|
type |
All documents | Classification | Branch document-specific mapping. |
title |
Letters, contracts, emails | Visible title or email subject | Display in review queues. |
date |
All documents | Primary visible date | For attachment-bearing emails, this remains the selected document date. |
issue_date |
Invoices, letters, contracts | Visible issue date | Use as invoice or document date in accounting systems. |
email_date |
EML, MSG | Email Date header | Use for transport chronology without replacing the attached document date. |
payment_due_date |
Invoices, reminders | Visible due date | Drive approval and payment scheduling. |
period_start |
Statements, contracts, timesheets | Visible service/reporting period | Pair with period_end for accrual and reporting. |
period_end |
Statements, contracts, timesheets | Visible service/reporting period | Pair with period_start for accrual and reporting. |
document_number |
Invoices, receipts, letters | Visible document identifier | Use for duplicate checks with sender and amount. |
customer_id |
Invoices, statements | Visible customer/debtor ID | Map to customer or vendor master data. |
contract_id |
Contracts, subscriptions | Visible agreement ID | Link documents to contract records. |
order_id |
Invoices, delivery notes | Visible PO or order reference | Map to purchase orders when available. |
reference_id |
All documents | Visible general reference | Fallback reference when no specific field applies. |
cost_center |
Invoices, internal forms | Visible accounting code | Use as a suggestion, not an automatic posting rule without validation. |
currency |
Invoices, statements | Normalized ISO 4217 currency | Required before posting amounts. |
net_amount |
Invoices, credit notes | Visible or derived total before tax | Use for tax and expense posting. |
gross_amount |
Invoices, credit notes, statements | Visible tax-inclusive invoice total | Do not assume this is the outstanding balance when prepayments or third-party allocations exist. |
tax_amount |
Invoices, credit notes | Visible or derived tax total | Prefer tax_breakdowns for detailed posting. |
tax_rate |
Single-rate invoices | Visible overall tax rate | Use only when the document has one tax rate. |
opening_balance |
Bank/account statements | Visible opening balance | Useful for reconciliation. |
closing_balance |
Bank/account statements | Visible closing balance | Useful for reconciliation. |
payment_status |
Invoices, receipts | Visible payment wording | Treat as document-provided context, not live payment state. |
payment_reference |
Invoices, reminders | Visible payment reference | Send with bank transfers when required. |
account_holder |
Invoices, statements | Visible bank account holder | Validate against sender before payment automation. |
iban |
Invoices, statements | Visible IBAN | Normalize before payment workflows. |
bic |
Invoices, statements | Visible BIC/SWIFT code | Optional for many SEPA flows but useful for validation. |
bank |
Invoices, statements | Visible bank name | Display alongside account details for review. |
tax_breakdowns |
Invoices, credit notes | Visible tax rows/categories | Use for VAT/GST posting and reverse-charge handling. |
tax_system |
Taxable documents | Classification from document context | Select tax engine or accounting tax code family. |
taxability |
Taxable documents | Summary classification | Use row-level taxability when tax_breakdowns is present. |
tax_collection_mechanism |
Taxable documents | Summary classification | Use row-level values for mixed tax documents. |
cross_border_tax_treatment |
Cross-border invoices | Derived geography/treatment summary | Route to tax review or account coding rules. |
supply_type |
Invoices and contracts | Classification from line/context evidence | Separate goods, services, and mixed supplies. |
tax_exemption_reason |
Zero-rated/exempt/reverse-charge documents | Visible exemption or reverse-charge wording | Store for audit and review. |
sender_name |
All documents | Visible issuer/sender name | Map to supplier/vendor or sender record. |
sender_street |
All documents | Visible sender address | Use for vendor enrichment and country checks. |
sender_zip |
All documents | Visible sender address | Use with sender_city and sender_country_code. |
sender_city |
All documents | Visible sender address | Use with sender_zip and sender_country_code. |
sender_state |
All documents | Visible sender address | Useful for US and regional tax workflows. |
sender_country_code |
All documents | Normalized ISO country code | Use for cross-border rules. |
sender_tax_id |
Invoices, tax documents | Visible local tax ID | Keep separate from VAT/GST number. |
sender_vat_number |
Invoices, tax documents | Visible VAT/GST number | Validate before automatic tax posting. |
recipient_name |
All documents | Visible buyer/recipient name | Map to customer, entity, or bill-to record. |
recipient_street |
All documents | Visible recipient address | Use for entity and tax checks. |
recipient_zip |
All documents | Visible recipient address | Use with recipient_city and country. |
recipient_city |
All documents | Visible recipient address | Use with recipient_zip and country. |
recipient_state |
All documents | Visible recipient address | Useful for US and regional tax workflows. |
recipient_country_code |
All documents | Normalized ISO country code | Use for cross-border rules. |
recipient_tax_id |
Invoices, tax documents | Visible local tax ID | Keep separate from VAT/GST number. |
recipient_vat_number |
Invoices, tax documents | Visible VAT/GST number | Use for B2B reverse-charge checks. |
email |
All documents | Visible contact email | Use for support or supplier contact enrichment. |
phone_number |
All documents | Visible contact phone | Use for review context. |
website |
All documents | Visible website URL | Use for enrichment, not as identity proof by itself. |
company_register_id |
Company documents | Visible registry identifier | Store for vendor or customer master data. |
note |
All documents | Relevant visible note | Show to reviewers when the note affects payment, tax, or status. |
from |
EML, MSG | Email header/display name | Use for email-origin workflows. |
from_email |
EML, MSG | Email header address | Use for routing and sender checks. |
to |
EML, MSG | Email header/display name | Use for routing and support context. |
to_email |
EML, MSG | Email header address | Use for mailbox and recipient checks. |
subject |
EML, MSG | Email subject | Use as envelope context; attachment title remains authoritative when selected. |
message_id |
EML, MSG | Email Message-ID header | Use for email idempotency or thread lookup. |
in_reply_to |
EML, MSG | Email threading header | Use for thread linkage. |
Document fields
Field reference for the keys available in document extraction. A field can be present with null when it is not visible or not applicable to the uploaded document.
Identity and dates
| Field | Type | Example | Description |
|---|---|---|---|
type | String | invoice | Document class such as invoice, credit-note, reminder, salary-statement, bank-statement, contract, balance-sheet, tax-assessment-note, timesheet, letter, email, or other. |
title | String or null | Invoice | Visible document title or email subject. |
date | Date or null | 2026-05-10 | Main document date when the document has a single primary date. |
issue_date | Date or null | 2026-05-10 | Issue date for invoices, letters, contracts, and similar documents. |
payment_due_date | Date or null | 2026-06-09 | Payment due date or due-by date. |
period_start | Date or null | 2026-04-01 | Start of the service, billing, statement, or reporting period. |
period_end | Date or null | 2026-04-30 | End of the service, billing, statement, or reporting period. |
document_number | String or null | RE-2026-1048 | Invoice number, document number, receipt number, or similar visible identifier. |
customer_id | String or null | C-88421 | Customer, debtor, or buyer identifier shown on the document. |
contract_id | String or null | MSA-2024-17 | Contract, agreement, or subscription identifier. |
order_id | String or null | PO-77819 | Purchase order, sales order, or order reference. |
reference_id | String or null | REF-59K2 | General reference number when it is not specifically a customer, contract, order, or payment reference. |
cost_center | String or null | FIN-AP-DE | Cost center or internal accounting code visible on the document. |
Amounts and payment
| Field | Type | Example | Description |
|---|---|---|---|
currency | String or null | EUR | ISO 4217 currency code. |
net_amount | Decimal string or null | 1079.50 | Total amount before tax. |
gross_amount | Decimal string or null | 1079.50 | Tax-inclusive invoice total. For Extension XRechnung 3.0 this is BT-112, not the remaining payable amount after prepaid or third-party payment allocation. |
tax_amount | Decimal string or null | 0.00 | Total tax amount across the document when visible or derivable. |
tax_rate | Decimal string or null | 19.00 | Single visible tax rate when the document has one overall rate. Multi-rate documents should use tax_breakdowns. |
opening_balance | Decimal string or null | 1482.25 | Opening balance, mainly for bank statements and account statements. |
closing_balance | Decimal string or null | 952.10 | Closing balance, mainly for bank statements and account statements. |
payment_status | String or null | open | Payment state when visible, commonly paid, open, or a document-specific wording. |
payment_reference | String or null | RE-2026-1048 | Structured or free-text reference to include with payment. |
account_holder | String or null | Meyer Supply GmbH | Bank account holder or payment recipient name. |
iban | String or null | DE89370400440532013000 | IBAN exactly as normalized from the document. |
bic | String or null | COBADEFFXXX | BIC/SWIFT code. |
bank | String or null | Commerzbank | Bank name. |
Tax classification
| Field | Type | Example | Description |
|---|---|---|---|
tax_breakdowns | Array or null | See tax breakdown rows | Per-rate or per-category tax rows. Prefer this over summary fields for accounting automation. |
tax_system | String or null | vat | Tax regime: vat, gst, or sales_tax. Missing or uncertain values are null; reverse-charge treatment belongs in tax_collection_mechanism. |
taxability | String or null | taxable | Top-level taxability summary. Row-level values in tax_breakdowns are more precise. |
tax_collection_mechanism | String or null | reverse_charge | Top-level summary of who accounts for tax. Row-level values are more precise for mixed documents. |
cross_border_tax_treatment | String or null | eu_b2b_service | Geography/treatment summary such as domestic_taxable, eu_b2b_service, eu_goods, third_country_service, export, us_sales_tax, or us_use_tax. |
supply_type | String or null | service | Supply type: service, goods, or mixed. |
tax_exemption_reason | String or null | Intra-EU B2B reverse charge | Visible exemption, zero-rating, out-of-scope, or reverse-charge reason. |
Parties and addresses
| Field | Type | Example | Description |
|---|---|---|---|
sender_name | String or null | Meyer Supply GmbH | Issuer, seller, supplier, service provider, or sender. |
sender_street | String or null | Industriestrasse 14 | Sender street and house number. |
sender_zip | String or null | 50667 | Sender postal code. |
sender_city | String or null | Cologne | Sender city. |
sender_state | String or null | NRW | Sender state, province, or region. |
sender_country_code | String or null | DE | Sender country as ISO 3166-1 alpha-2. |
sender_tax_id | String or null | 219/5800/1234 | Sender tax identifier that is not specifically a VAT/GST number. |
sender_vat_number | String or null | DE123456789 | Sender VAT/GST number. |
recipient_name | String or null | Northwind Operations Ltd. | Buyer, customer, recipient, or bill-to party. |
recipient_street | String or null | Triq il-Port 8 | Recipient street and house number. |
recipient_zip | String or null | VLT 1440 | Recipient postal code. |
recipient_city | String or null | Valletta | Recipient city. |
recipient_state | String or null | Malta | Recipient state, province, or region. |
recipient_country_code | String or null | MT | Recipient country as ISO 3166-1 alpha-2. |
recipient_tax_id | String or null | MT-TAX-88421 | Recipient tax identifier that is not specifically a VAT/GST number. |
recipient_vat_number | String or null | MT12345678 | Recipient VAT/GST number. |
Contact and notes
| Field | Type | Example | Description |
|---|---|---|---|
email | String or null | billing@example.com | Contact email visible on the document. |
phone_number | String or null | +49 221 555010 | Contact phone number visible on the document. |
website | String or null | https://meyer.example | Website URL visible on the document. |
company_register_id | String or null | HRB 123456 | Company register, chamber, or corporate registry identifier. |
note | String or null | Reverse charge applies | Relevant visible note that does not fit another normalized field. |
Email fields
These fields are extracted from EML and MSG uploads. When no usable financial attachment is present, shared fields describe the email itself: type is email, title comes from the subject, date comes from the email header, and email parties can populate sender_name and recipient_name.
When a supported attachment is selected, its financial evidence is authoritative for shared document fields, including type, title, date, issue_date, sender_name, and recipient_name. The envelope stays available through from, from_email, to, to_email, subject, and email_date. Exdata selects one primary financial attachment for one result. Supported e-invoice XML is preferred when its profile, structural constraints, and arithmetic business invariants pass. When an email also contains a PDF, critical XML fields must link to that human-readable representation without conflicts before the XML becomes authoritative; otherwise the PDF is used when it remains readable. Other document candidates are surfaced through degraded quality metadata rather than merged into one record.
| Field | Type | Example | Description |
|---|---|---|---|
from | String or null | Billing Team | Email sender display name. |
from_email | String or null | billing@example.com | Email sender address. |
to | String or null | Accounts Payable | Email recipient display name. |
to_email | String or null | ap@northwind.example | Email recipient address. |
subject | String or null | Invoice RE-2026-1048 | Email subject. |
email_date | Date or null | 2026-05-10 | Normalized email Date header. This remains separate from an attached document's date and issue_date. |
message_id | String or null | <invoice-1048@example.com> | Email Message-ID header. |
in_reply_to | String or null | <thread-2026@example.com> | Email In-Reply-To header when available. |