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.

Extraction JSON
{
  "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
dataObjectObject keyed by field name. Standard keys are listed below; account-specific or future fields can add more keys.
data.<field>.valueString, array, object, or nullNormalized value to map into your system.
data.<field>.candidatesArray or nullRaw 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>.provenanceObject or nullPersisted 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 profileValidation pathReported scope
XRechnung 3.0, UBL Invoice or CreditNotePinned KoSIT validator and XRechnung 3.0.2 configuration, using the matching UBL scenario.xml_profile_conformance
XRechnung 3.0, CIIPinned 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 CIIPinned KoSIT extension scenario on the original syntax plus deterministic mapping checks.xml_profile_conformance
CVD XRechnung 0.9, CIIPinned 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 COMFORTBundled 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 profilesDeterministic parser, structural, business, and arithmetic checks.structural_and_business
Unknown or insufficiently supported profileNo 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 valueJSON nullnullThe field was not visible, not applicable, or not extracted with enough confidence.
AmountDot-decimal string with two digits1079.50Negative balances keep a leading minus sign, for example -42.30.
DateYYYY-MM-DD2026-05-10Dates are normalized when the document provides enough information.
CurrencyISO 4217EURAlways uppercase when extracted.
CountryISO 3166-1 alpha-2DE, MTUsed for sender and recipient country codes.
Tax rowArray of objectstax_breakdowns.valueOne 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.

Reverse-charge tax row
{
  "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_amountDecimal string or null1079.50Amount the row's tax is calculated from, excluding tax.
tax_amountDecimal string or null205.10, 0.00Tax amount for this row.
tax_rateDecimal string or null19.00, 7.00, 0.00Percentage rate shown on the document. The percent sign is omitted.
taxabilityString or nulltaxable, zero_rated, exempt, out_of_scopeWhether the row is taxable, zero-rated, exempt, or outside the tax system.
tax_collection_mechanismString or nullseller_collected, reverse_charge, buyer_use_tax, not_collectedWho accounts for the tax. Reverse charge belongs here.
tax_exemption_reasonString or nullFree text from the documentVisible 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.

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

FieldTypeExampleDescription
typeStringinvoiceDocument class such as invoice, credit-note, reminder, salary-statement, bank-statement, contract, balance-sheet, tax-assessment-note, timesheet, letter, email, or other.
titleString or nullInvoiceVisible document title or email subject.
dateDate or null2026-05-10Main document date when the document has a single primary date.
issue_dateDate or null2026-05-10Issue date for invoices, letters, contracts, and similar documents.
payment_due_dateDate or null2026-06-09Payment due date or due-by date.
period_startDate or null2026-04-01Start of the service, billing, statement, or reporting period.
period_endDate or null2026-04-30End of the service, billing, statement, or reporting period.
document_numberString or nullRE-2026-1048Invoice number, document number, receipt number, or similar visible identifier.
customer_idString or nullC-88421Customer, debtor, or buyer identifier shown on the document.
contract_idString or nullMSA-2024-17Contract, agreement, or subscription identifier.
order_idString or nullPO-77819Purchase order, sales order, or order reference.
reference_idString or nullREF-59K2General reference number when it is not specifically a customer, contract, order, or payment reference.
cost_centerString or nullFIN-AP-DECost center or internal accounting code visible on the document.

Amounts and payment

FieldTypeExampleDescription
currencyString or nullEURISO 4217 currency code.
net_amountDecimal string or null1079.50Total amount before tax.
gross_amountDecimal string or null1079.50Tax-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_amountDecimal string or null0.00Total tax amount across the document when visible or derivable.
tax_rateDecimal string or null19.00Single visible tax rate when the document has one overall rate. Multi-rate documents should use tax_breakdowns.
opening_balanceDecimal string or null1482.25Opening balance, mainly for bank statements and account statements.
closing_balanceDecimal string or null952.10Closing balance, mainly for bank statements and account statements.
payment_statusString or nullopenPayment state when visible, commonly paid, open, or a document-specific wording.
payment_referenceString or nullRE-2026-1048Structured or free-text reference to include with payment.
account_holderString or nullMeyer Supply GmbHBank account holder or payment recipient name.
ibanString or nullDE89370400440532013000IBAN exactly as normalized from the document.
bicString or nullCOBADEFFXXXBIC/SWIFT code.
bankString or nullCommerzbankBank name.

Tax classification

FieldTypeExampleDescription
tax_breakdownsArray or nullSee tax breakdown rowsPer-rate or per-category tax rows. Prefer this over summary fields for accounting automation.
tax_systemString or nullvatTax regime: vat, gst, or sales_tax. Missing or uncertain values are null; reverse-charge treatment belongs in tax_collection_mechanism.
taxabilityString or nulltaxableTop-level taxability summary. Row-level values in tax_breakdowns are more precise.
tax_collection_mechanismString or nullreverse_chargeTop-level summary of who accounts for tax. Row-level values are more precise for mixed documents.
cross_border_tax_treatmentString or nulleu_b2b_serviceGeography/treatment summary such as domestic_taxable, eu_b2b_service, eu_goods, third_country_service, export, us_sales_tax, or us_use_tax.
supply_typeString or nullserviceSupply type: service, goods, or mixed.
tax_exemption_reasonString or nullIntra-EU B2B reverse chargeVisible exemption, zero-rating, out-of-scope, or reverse-charge reason.

Parties and addresses

FieldTypeExampleDescription
sender_nameString or nullMeyer Supply GmbHIssuer, seller, supplier, service provider, or sender.
sender_streetString or nullIndustriestrasse 14Sender street and house number.
sender_zipString or null50667Sender postal code.
sender_cityString or nullCologneSender city.
sender_stateString or nullNRWSender state, province, or region.
sender_country_codeString or nullDESender country as ISO 3166-1 alpha-2.
sender_tax_idString or null219/5800/1234Sender tax identifier that is not specifically a VAT/GST number.
sender_vat_numberString or nullDE123456789Sender VAT/GST number.
recipient_nameString or nullNorthwind Operations Ltd.Buyer, customer, recipient, or bill-to party.
recipient_streetString or nullTriq il-Port 8Recipient street and house number.
recipient_zipString or nullVLT 1440Recipient postal code.
recipient_cityString or nullVallettaRecipient city.
recipient_stateString or nullMaltaRecipient state, province, or region.
recipient_country_codeString or nullMTRecipient country as ISO 3166-1 alpha-2.
recipient_tax_idString or nullMT-TAX-88421Recipient tax identifier that is not specifically a VAT/GST number.
recipient_vat_numberString or nullMT12345678Recipient VAT/GST number.

Contact and notes

FieldTypeExampleDescription
emailString or nullbilling@example.comContact email visible on the document.
phone_numberString or null+49 221 555010Contact phone number visible on the document.
websiteString or nullhttps://meyer.exampleWebsite URL visible on the document.
company_register_idString or nullHRB 123456Company register, chamber, or corporate registry identifier.
noteString or nullReverse charge appliesRelevant 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.

FieldTypeExampleDescription
fromString or nullBilling TeamEmail sender display name.
from_emailString or nullbilling@example.comEmail sender address.
toString or nullAccounts PayableEmail recipient display name.
to_emailString or nullap@northwind.exampleEmail recipient address.
subjectString or nullInvoice RE-2026-1048Email subject.
email_dateDate or null2026-05-10Normalized email Date header. This remains separate from an attached document's date and issue_date.
message_idString or null<invoice-1048@example.com>Email Message-ID header.
in_reply_toString or null<thread-2026@example.com>Email In-Reply-To header when available.