Invoice

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

View the invoice example
Sample Invoice document

The fields this preset extracts.

invoice_numberstring

Unique identifier assigned to this invoice by the vendor.

invoice_datestring

Date the invoice was issued, in ISO-8601 format (YYYY-MM-DD).

due_datestring

Date payment is due, in ISO-8601 format (YYYY-MM-DD).

vendorobject

Entity issuing the invoice.

namestring

Legal name of the vendor or business.

addressstring

Full mailing address of the vendor.

tax_idstring

Tax identification number (e.g., IN, VAT number).

emailstring

Contact email address for the vendor.

phonestring

Contact phone number for the vendor.

customerobject

Entity being invoiced.

namestring

Name of the customer or purchasing entity.

addressstring

Billing or delivery address of the customer.

account_idstring

Customer account number or identifier maintained by the vendor.

line_itemsarray<object>

Itemized list of goods or services provided.

subtotalnumber

Sum of all line items before tax and shipping.

tax_totalnumber

Total amount of sales or VAT tax applied to the invoice.

shipping_totalnumber

Total shipping or delivery charges.

total_amountnumber

Final amount due, including subtotal, tax, and shipping.

currencystring

ISO-4217 currency code (e.g., USD, EUR, GBP).

payment_termsstring

Terms of payment (e.g., Net 30, Due on Receipt, 2/10 Net 30).

purchase_order_numberstring

Purchase order number referenced by the customer for this invoice.

notesstring

Additional notes, payment instructions, or special terms.

curl
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.

Open-source primitives, composed into one backend. Curated cohort of design partners. Apply to work with us.

We value your privacy

Xberg uses cookies to improve your experience, personalize content, and analyze traffic. You can manage your preferences at any time.