Skip to main content
Follow the protected REST mount guide for xero.invoices.observations or xero.contacts.observations. Bind records and task answers to the installer’s data label. Bind providerEndpoint to https://api.xero.com and /api.xro/2.0/Invoices or /api.xro/2.0/Contacts. Use a sealed OAuth credential with the corresponding accounting read scope. Set selection to the connected tenant UUID. Initialize the matching xero.invoices.observations or xero.contacts.observations profile. The app requests Xero’s summaryOnly records and keys them by InvoiceID or ContactID. A short page ends the numbered walk and the next walk starts at one. Each response admits 1–100 records and 36 KiB. Rows that disappear stay published, and a returned archive or void status is retained as observed. Xero can change content during a walk. Xero Accounting API pagination

Write contacts

Follow the native write mount guide. Use mode xero.contacts.create-update-delete with providerWriter, endpoint https://api.xero.com and pass the writer in receivers.writers under that mode. Use multiSecret with two header bindings. Seal the OAuth access token as Authorization with prefix Bearer and the selected tenant UUID as xero-tenant-id. Give the credential accounting contact write permission. Supply one Xero Contact object. Update sets ContactID from the command. Delete sets ContactStatus: "ARCHIVED". HTTP 200 must return the contact ID without validation errors and, on archive, the archived state. The receiver gets one dispatch attempt with Idempotency-Key because the credential and tenant seals can rotate independently. Commands take up to 24 KiB of JSON and carry no read cursor. Provider write API

Ledger resources and reports

Use a separate protected REST mount for each resource. For inline resources, bind providerEndpoint to https://api.xero.com and /api.xro/2.0/<resource>. Journals use the sealed download binding below. For these modes, seal the OAuth bearer token as Authorization and the tenant ID as xero-tenant-id through two multiSecret header bindings. Use the resource’s accounting scopes and a tenant role allowed to read it. Reports and journals require reporting permissions. Follow Xero’s entitlement requirements for the Journals API. Payments and bank transactions restart at page one after the reported last page. Accounts must fit in one response. Inline answers must fit in 36 KiB before projection. Missing records remain published and returned statuses remain observations. For the invoice and contact modes above, the installed projection is the whole returned summary object, including its nested fields.

Stage journal responses

Bind xeroJournalDownload(auth, data) as receivers.xeroJournals with the same two sealed headers and protected data label. Initialize with { profile: { mode: "provider", provider: "xero.journals.observations", limit: 100 } }. Xero exposes an exclusive JournalNumber offset and returns up to 100 journals per response. The receiver seals one complete response of up to 8 MiB in 512 KiB parts. The app lands up to eight indexed journals per local transaction, with larger journals given their own transaction. A projected journal is bounded to 512 KiB. The app commits the provider offset with the final local page, retires the parts, and polls from that offset until Xero returns an empty page. A fresh attempt can reread an interrupted response from the last committed offset and land records by JournalID. Xero Journals API

Write invoices

Use providerWriter with mode xero.invoices.create-update, the writer passed in receivers.writers under that mode and the same two sealed headers and key timing as contact writes. Use an invoice write scope. Supply one invoice object up to 24 KiB. PUT creates the invoice. POST updates the invoice UUID from the command. The app acknowledges HTTP 200 only with one matching InvoiceID and no returned validation errors. It retains the status and ID. Writes have no read cursor and issue one keyed dispatch attempt. Xero Accounting API reference