Xero — data contract (compatible with Xero’s documented schema; not affiliated with Xero)
Xero Invoice — core fields from the Accounting API Invoices endpoint. Compatible with Xero's documented Invoice object; not affiliated with Xero. Date and DueDate match the raw JSON API (/Date(milliseconds+offset)/), not YYYY-MM-DD.
Validate a client's Xero export at ingest into your warehouse, or with POST /egress before sending the same shape to a partner, reverse ETL, or an AI agent.
Also available: ODCS v3.1.0 YAML. “Use this contract” forks it into your org, then opens the validation playground so you can upload the client file.
Fields
| Name | Type | Required | Rule | Description |
|---|---|---|---|---|
| InvoiceID | string | optional | pattern /^[0-9a-fA-F-]{36}$/ | — |
| InvoiceNumber | string | optional | — | — |
| Type | string | required | one of: ACCREC, ACCPAY | Invoice type: ACCREC (accounts receivable / sales) or ACCPAY (accounts payable / bills). |
| Contact | object | required | — | The contact the invoice is issued to or from. |
| Date | string | optional | pattern /^/Date\(-?[0-9]+([+-][0-9]{4})?\)/$/ | Invoice date as the Accounting API returns it: /Date(milliseconds+offset)/, for example /Date(1768003200000+0000)/ for 2026-01-10 UTC. This is not a YYYY-MM-DD string. The API does not emit ISO dates in this field. |
| DueDate | string | optional | pattern /^/Date\(-?[0-9]+([+-][0-9]{4})?\)/$/ | Due date in the same /Date(milliseconds+offset)/ form as Date. Not YYYY-MM-DD. |
| Status | string | optional | one of: DRAFT, SUBMITTED, AUTHORISED, PAID, VOIDED, DELETED | Invoice status in Xero. |
| LineAmountTypes | string | optional | one of: Exclusive, Inclusive, NoTax | — |
| CurrencyCode | string | optional | pattern /^[A-Z]{3}$/ | — |
| SubTotal | number | optional | ≥ 0 | — |
| TotalTax | number | optional | ≥ 0 | — |
| Total | number | optional | ≥ 0 | — |
| AmountDue | number | optional | ≥ 0 | — |
| AmountPaid | number | optional | ≥ 0 | — |
Sample rows
Three synthetic rows we wrote. They validate against this contract with zero violations. No real customer data.
[
{
"AmountDue": 1080,
"AmountPaid": 0,
"Contact": {
"ContactID": "00000000-0000-4000-8000-0000000000c1",
"Name": "Example Client Co"
},
"CurrencyCode": "USD",
"Date": "/Date(1768003200000+0000)/",
"DueDate": "/Date(1770595200000+0000)/",
"InvoiceID": "00000000-0000-4000-8000-000000000001",
"InvoiceNumber": "INV-1001",
"LineAmountTypes": "Exclusive",
"Status": "AUTHORISED",
"SubTotal": 1000,
"Total": 1080,
"TotalTax": 80,
"Type": "ACCREC"
},
{
"AmountDue": 0,
"AmountPaid": 486,
"Contact": {
"Name": "Acme Test LLC"
},
"CurrencyCode": "USD",
"Date": "/Date(1768176000000+0000)/",
"DueDate": "/Date(1769385600000+0000)/",
"InvoiceID": "00000000-0000-4000-8000-000000000002",
"InvoiceNumber": "INV-1002",
"Status": "PAID",
"SubTotal": 450,
"Total": 486,
"TotalTax": 36,
"Type": "ACCREC"
},
{
"AmountDue": 220,
"Contact": {
"Name": "Sample Supplier Ltd"
},
"CurrencyCode": "GBP",
"Date": "/Date(1768435200000+0000)/",
"InvoiceNumber": "BILL-5001",
"Status": "SUBMITTED",
"Total": 220,
"Type": "ACCPAY"
}
]Provenance
- Verified against
- https://developer.xero.com/documentation/api/accounting/invoices
- Checked
- 2026-11-06
- Version
- v1.0
- Author
- DataContractGate
- License
- MIT
Spotted a mismatch with the vendor’s current schema? Report an issue.
Stripe, Shopify, QuickBooks, Xero, HubSpot, Salesforce, Google Analytics and Square are trademarks of their respective owners. DataContractGate is not affiliated with or endorsed by them. These contracts describe data shaped like these vendors’ documented schemas; they are not official and are not certified by any vendor.