Xero API simulator
A hosted, read-only drop-in for the Xero Accounting API —
an extra feature of x0 Professional.
Point your OAuth and Accounting base URLs here instead of
api.xero.com / identity.xero.com and exercise a real client
against seeded orgs, nested JSON, pagination, attachments, and Xero-shaped errors —
without a live Xero organisation or partner app review.
Not a Xero product and not affiliated with Xero Limited. Surface compatibility is intentional; data is synthetic. Available on Professional and Enterprise plans.
When to use it
- CI / local dev for anything that talks to Xero Accounting (Excel connectors, ETL, agents)
- Proving pagination,
If-Modified-Since, 429 backoff, and attachment downloads - Onboarding a new engineer before they get Xero demo-company access
If you want flat Excel / OData tables rather than the raw Xero JSON, that is x0 — the product this simulator was built to test.
Base URL
Public host (x0-dev):
https://sim.dev.x0.co.nz
- Health
GET https://sim.dev.x0.co.nz/_sim/health- OpenAPI
https://sim.dev.x0.co.nz/_sim/docs- Authorize
https://sim.dev.x0.co.nz/identity/connect/authorize- Token
https://sim.dev.x0.co.nz/connect/token- Connections
https://sim.dev.x0.co.nz/connections- Accounting
https://sim.dev.x0.co.nz/api.xro/2.0/…
Self-host is not required — Pro customers use this public host with provisioned credentials.
OAuth2
Authorization code + refresh token, Xero-style. Client auth is HTTP Basic
(client_id:client_secret) or form fields. Authorize auto-approves seeded orgs
(no consent UI) so CI can follow the redirect.
POST https://sim.dev.x0.co.nz/connect/token Authorization: Basic base64(client_id:client_secret) Content-Type: application/x-www-form-urlencoded grant_type=authorization_code&code=…&redirect_uri=… # or grant_type=refresh_token&refresh_token=…
Then GET https://sim.dev.x0.co.nz/connections with the access token.
Accounting calls need Authorization: Bearer … and
xero-tenant-id: <tenant guid>.
Access ~30 minutes, refresh ~60 days. Register your redirect URI with us (or in Django admin if you run the sim yourself).
Accounting GETs
Nested Xero JSON under /api.xro/2.0/{Resource}. Writes return 403 (read-only v1).
x0 sync set (start here)
| Resource | Pagination | Also |
|---|---|---|
Accounts |
none | attachments |
Organisation |
none | — |
Journals |
offset | — |
Contacts |
page / pageSize | attachments · history |
Invoices |
page / pageSize | attachments · history |
ManualJournals |
page / pageSize | attachments · history |
BankTransactions |
page / pageSize | attachments · history |
Payments |
page / pageSize | history |
Remaining Accounting collections
BankTransfers, BatchPayments, BrandingThemes, Budgets, ContactGroups, CreditNotes, Currencies, Employees, ExpenseClaims, Items, LinkedTransactions, InvoiceReminders, Overpayments, Prepayments, PurchaseOrders, Quotes, Receipts, RepeatingInvoices, TaxRates, TrackingCategories, Users, PaymentServices
Reports (shells)
Reports/TenNinetyNine, Reports/AgedPayablesByContact, Reports/AgedReceivablesByContact, Reports/BalanceSheet, Reports/BankSummary, Reports/BudgetSummary, Reports/ExecutiveSummary, Reports/ProfitAndLoss, Reports/TrialBalance
Behaviour you can rely on
- Pagination —
page/pageSize(max 100). Journals useoffset. - If-Modified-Since — supported on most collections.
- Dates — Xero
/Date(milliseconds)/strings, not ISO. - Attachments — list + binary by id or filename on resources that have them.
- History —
/{Resource}/{id}/Historywhere noted above. - Rate limits — 60 / minute and 5000 / day per tenant.
Headers:
X-DayLimit-Remaining,X-MinLimit-Remaining. Over limit →429+Retry-After. - Errors — Xero-shaped JSON (
Type,Message,Detail, …).
Minimal curl
# after you have an access token + tenant id SIM=https://sim.dev.x0.co.nz curl -sS "$SIM/api.xro/2.0/Accounts" \ -H "Authorization: Bearer $ACCESS" \ -H "xero-tenant-id: $TENANT" curl -sS "$SIM/api.xro/2.0/Contacts?page=1&pageSize=100" \ -H "Authorization: Bearer $ACCESS" \ -H "xero-tenant-id: $TENANT" curl -sS "$SIM/api.xro/2.0/Journals?offset=0" \ -H "Authorization: Bearer $ACCESS" \ -H "xero-tenant-id: $TENANT"
Point an existing Xero client at the sim
Override the four Xero hosts (names vary by SDK):
XERO_API_BASE_URL=https://sim.dev.x0.co.nz/api.xro/2.0 XERO_CONNECTIONS_URL=https://sim.dev.x0.co.nz/connections XERO_TOKEN_URL=https://sim.dev.x0.co.nz/connect/token XERO_AUTHORIZE_URL=https://sim.dev.x0.co.nz/identity/connect/authorize
Same idea when x0 itself is pointed at the sim in development — see the simulator guide.
Get access
Hosted simulator credentials are a Professional feature
(option xero_api_simulator).
We provision an OAuth client_id / client_secret
and a seeded tenant — those are not published on this page.
Request simulator credentials or email support@x0.co.nz with your redirect URI and what you are testing (include that you are on Professional, or ask about upgrading).
Guide: Xero API simulator · Pricing · x0 guides · About x0