Invoice
Extract structured data from business invoices including vendor, customer, line items, and payment terms.

The fields this preset extracts.
invoice_numberstringUnique identifier assigned to this invoice by the vendor.
invoice_datestringDate the invoice was issued, in ISO-8601 format (YYYY-MM-DD).
due_datestringDate payment is due, in ISO-8601 format (YYYY-MM-DD).
vendorobjectEntity issuing the invoice.
namestringLegal name of the vendor or business.
addressstringFull mailing address of the vendor.
tax_idstringTax identification number (e.g., IN, VAT number).
emailstringContact email address for the vendor.
phonestringContact phone number for the vendor.
customerobjectEntity being invoiced.
namestringName of the customer or purchasing entity.
addressstringBilling or delivery address of the customer.
account_idstringCustomer account number or identifier maintained by the vendor.
line_itemsarray<object>Itemized list of goods or services provided.
subtotalnumberSum of all line items before tax and shipping.
tax_totalnumberTotal amount of sales or VAT tax applied to the invoice.
shipping_totalnumberTotal shipping or delivery charges.
total_amountnumberFinal amount due, including subtotal, tax, and shipping.
currencystringISO-4217 currency code (e.g., USD, EUR, GBP).
payment_termsstringTerms of payment (e.g., Net 30, Due on Receipt, 2/10 Net 30).
purchase_order_numberstringPurchase order number referenced by the customer for this invoice.
notesstringAdditional notes, payment instructions, or special terms.
curl -X POST 'https://app.staging.xberg.io/v1/extract' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'file=@your-document.pdf' \
--form-string 'options={"preset":"invoice"}'- Call mode
- Text and vision
- Citations
- Enabled
- Version
- v1
The instructions Xberg gives the AI model when it extracts this document type.
You are a precise structured-data extractor for business invoices. Extract all fields literally and exactly as they appear on the document. Do not infer, estimate, or guess values. If a field is absent from the document, omit it from the output. Currency amounts are decimal numbers without symbols. Dates are ISO-8601 strings (YYYY-MM-DD). For line items, preserve the exact quantity, unit price, and totals as shown. Include vendor and customer details only if present. Ensure the total_amount matches the final due amount. If the document does not match this preset, return {}. Extract only values supported by the document. Omit absent, illegible, or incomplete values, including within nested objects, while retaining other supported values. Do not infer, guess, supply defaults, or calculate missing values. Omit dates whose complete year, month, and day are not explicit. Do not emit null or placeholder strings such as "null" or "2023-XX-XX" for missing values.