Which extraction endpoint should I call first?
Start deterministic. If the document might be an e-invoice or a hybrid PDF, call /v1/extract/json: it reads the actual XML, so the result is exact and no AI is involved. Only when it answers 4006 NoEmbeddedXml, meaning the PDF has no machine-readable layer, send the same file to /v1/parse/json and let the AI read the page.
Does invoice extraction use AI?
Only where nothing else works. /v1/extract/json and /v1/extract/attachments are fully deterministic: they parse the embedded or supplied XML and never guess. /v1/parse/json is the AI endpoint for PDFs with no structured layer, and it says so honestly by scoring its own confidence in every answer.
Which file types are accepted?
/v1/extract/json and /v1/extract/attachments take a PDF or a UBL/CII XML file. /v1/parse/json takes a PDF only, typed, scanned, or photographed, up to 10 pages. Uploads are capped at 20 MB on every extraction endpoint.
How should I use the confidence scores?
Each AI-parsed invoice returns an overall score and four area scores (seller, buyer, tax calculation, line items), from 0.0 to 1.0. At 0.90 and above the read was unambiguous; between 0.70 and 0.89 spot-check high-value documents; below 0.70 route the invoice to a human before it reaches your books. The comparison is yours to make in code, which keeps the policy in your hands.
Can it read receipts?
No, by design. The parser extracts invoices: documents with line items, parties, and a tax breakdown. A receipt without invoice line items is rejected with 4008 NotAnInvoice instead of being force-fitted into an invoice shape, and a file containing several invoices returns 4009 MultipleInvoices so you can split it first.
What can I do with the extracted JSON?
The envelope matches the /v1/create request body. That makes round trips one-liners: read a received document with extraction, adjust fields, and post the result straight to invoice creation to issue a compliant UBL, CII, XRechnung, Factur-X, or ZUGFeRD document.
What about the other documents embedded in an e-invoice?
E-invoices can carry supporting documents (timesheets, delivery notes, contracts) as embedded attachments (BG-24). /v1/extract/attachments returns them all as a ZIP, copied byte-for-byte. Documents referenced only by URL are listed in the invoice but not fetched, and an invoice with no attachments answers 4013 NoAttachments.