Xero Tool
Read Xero accounting data — invoices, contacts, accounts, payments — via the Xero Accounting API.
Tool ID
xero-accounting
Credential Required
Yes — a server-refreshed OAuth credential (auth mode: oauth_user). Link an oauth-type credential (mint one with itcli.py /oauth); the InTouch server resolves and refreshes it and hands the tool a live access_token, sent on every request as Authorization: Bearer <token>. The tool never refreshes or stores the token — the server owns the token lifecycle. All requests go to https://api.xero.com/api.xro/2.0. Every request also carries the Xero-tenant-id header, taken from the task's required tenantId input (get it from Xero's GET /connections).
Credential Properties
| Property | Type | Default | Description |
|---|---|---|---|
client_id |
string | — | OAuth app client ID |
client_secret |
string | — | OAuth app client secret (if required on refresh) |
token_url |
string | — | Provider OAuth token endpoint — used to refresh |
access_token |
string | — | Required. Current access token — kept fresh by the server; do not edit by hand |
refresh_token |
string | — | Refresh token; enables automatic server-side refresh |
token_type |
string | Bearer |
Token type |
scope |
string | — | Granted OAuth scopes (space-separated) |
expires_at |
string | — | Access-token expiry in epoch seconds (0 = non-expiring) |
Operations
1. list_invoices — List invoices
Lists invoices in the organisation. Calls GET /Invoices.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string (enum) | — | Required. One of: list_invoices, get_invoice, list_contacts, list_accounts, list_payments |
tenantId |
string | — | Required. Xero organisation tenant id — sent as the Xero-tenant-id header (from GET /connections) |
query |
string | — | Optional query params as a JSON object string, e.g. {"page": 1, "where": "Status==\"AUTHORISED\""} |
Published Outputs:
- result — the JSON response body
- status — HTTP status code
2. get_invoice — Get an invoice
Reads a single invoice by GUID. Calls GET /Invoices/{invoiceID}.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string (enum) | — | Required. |
tenantId |
string | — | Required. Xero organisation tenant id (sent as the Xero-tenant-id header) |
invoiceID |
string | — | Required. Invoice GUID |
query |
string | — | Optional query params as a JSON object string |
Published Outputs:
- result — the JSON response body
- status — HTTP status code
3. list_contacts — List contacts
Lists contacts. Calls GET /Contacts.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string (enum) | — | Required. |
tenantId |
string | — | Required. Xero organisation tenant id (sent as the Xero-tenant-id header) |
query |
string | — | Optional query params as a JSON object string, e.g. {"page": 1} |
Published Outputs:
- result — the JSON response body
- status — HTTP status code
4. list_accounts — List accounts
Lists the chart of accounts. Calls GET /Accounts.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string (enum) | — | Required. |
tenantId |
string | — | Required. Xero organisation tenant id (sent as the Xero-tenant-id header) |
query |
string | — | Optional query params as a JSON object string |
Published Outputs:
- result — the JSON response body
- status — HTTP status code
5. list_payments — List payments
Lists payments. Calls GET /Payments.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string (enum) | — | Required. |
tenantId |
string | — | Required. Xero organisation tenant id (sent as the Xero-tenant-id header) |
query |
string | — | Optional query params as a JSON object string, e.g. {"page": 1} |
Published Outputs:
- result — the JSON response body
- status — HTTP status code
Self-Contained JAR
The jar bundles all runtime dependencies; only intouch-tool-api is provided by the server.
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
completeoperationresultstatuswarning