Testing x0 with Yaak
Yaak is a good GUI HTTP client for exercising the x0 API before wiring Excel or an AI agent.
Create a request
- New request → method GET
- URL:
https://api.x0.co.nz/odata/v1/Accounts
- Auth → Bearer Token → paste your full API key
(x0_live_….secretfrom the portal — shown once at issue time)
That is enough for a successful call when a Xero org is connected and accounts are cached/synced.
Useful variants
| Purpose | URL |
|---|---|
| Service root | https://api.x0.co.nz/odata/v1 |
| Metadata | https://api.x0.co.nz/odata/v1/$metadata |
| Tenants | https://api.x0.co.nz/odata/v1/Tenants |
| Journals | https://api.x0.co.nz/odata/v1/Journals |
| Journals (Excel flat) | https://api.x0.co.nz/odata/v1/Journals_Table |
| Items | https://api.x0.co.nz/odata/v1/Items |
| Credit notes | https://api.x0.co.nz/odata/v1/CreditNotes |
| Credit notes (Excel flat) | https://api.x0.co.nz/odata/v1/CreditNotes_Table |
| Purchase orders | https://api.x0.co.nz/odata/v1/PurchaseOrders |
| Purchase orders (Excel flat) | https://api.x0.co.nz/odata/v1/PurchaseOrders_Table |
| Quotes | https://api.x0.co.nz/odata/v1/Quotes |
| Tax rates | https://api.x0.co.nz/odata/v1/TaxRates |
| Tracking categories | https://api.x0.co.nz/odata/v1/TrackingCategories |
| Budgets | https://api.x0.co.nz/odata/v1/Budgets |
| Budgets (Excel flat) | https://api.x0.co.nz/odata/v1/Budgets_Table |
| X0 (connection card) | https://api.x0.co.nz/odata/v1/X0 |
| Settings | https://api.x0.co.nz/odata/v1/Settings |
| Tables catalog | https://api.x0.co.nz/odata/v1/Tables |
| Filtered accounts | https://api.x0.co.nz/odata/v1/Accounts?$filter=Status eq 'ACTIVE'&$select=Code,Name&$top=100 |
| Specific tenant | https://api.x0.co.nz/odata/v1/Accounts?tenant_id=YOUR_TENANT_GUID |
Alternative auth header (if not using Yaak’s Bearer UI):
Authorization: Bearer x0_live_<id>.<secret>
or:
X-Api-Key: x0_live_<id>.<secret>
Excel-style query param (no Auth UI):
https://api.x0.co.nz/odata/v1/Accounts?api_key=x0_live_<id>.<secret>
Optional tenant header:
X-Xero-Tenant-Id: YOUR_TENANT_GUID
Local canoe
http://127.0.0.1:8001/odata/v1/Accounts
Same Bearer token from a local portal-issued key.
What “good” looks like
- Status
200 - JSON with a
valuearray of account objects - Response header
X-Request-Id(also stored in Admin → Api access logs)
Common failures
| Status | Likely cause |
|---|---|
401 |
Missing/wrong/expired key |
403 |
Key lacks xero.accounts.read (or needed scope) |
404 |
No Xero tenant connected |
502 |
Upstream Xero call failed (token refresh / Xero outage) |
Yaak environment tip
Store the token as an environment variable, e.g. X0_API_KEY, and set Auth Bearer to {{X0_API_KEY}} so you never commit secrets into shared request collections.
Related
- Documentation index · Glossary
- ai-agents.md — agent-oriented how-to
- odata.md — full OData options
- excel-desktop.md — same Bearer key in Excel
- Portal: issue keys under Dashboard → API keys