Skip to content
OpenNodeFlow.DocsOpen beta ↗
Agent guide ↗
Docs/Library asset reference

Xero List Accounts

Read chart of accounts with GET /Accounts, optional where filter, scope accounting.settings.read. Accounts does not use the paged-resource contract. Use Type=BANK or EnablePaymentsToAccount to choose a payment account; live provider validat

23 Oct 2026 · 3 min read
Markdown ↗JSON ↗

Read chart of accounts with GET /Accounts, optional where filter, scope accounting.settings.read. Accounts does not use the paged-resource contract. Use Type=BANK or EnablePaymentsToAccount to choose a payment account; live provider validation remains authoritative.

Inputs: tenantId, where. Outputs: accounts, metadata. exec/next/error are control sockets. Throwing selects an explicitly wired error control route through ONF; data outputs are absent on that path.

Authentication: configure secret names, never literal credentials. Access-token mode reads XERO_ACCESS_TOKEN. Managed-refresh mode bootstraps once from XERO_OAUTH_BOOTSTRAP JSON containing access_token, refresh_token, expires_at; XERO_CLIENT_ID / XERO_CLIENT_SECRET hold client values. PKCE omits the secret. Rotated pairs are immediately CAS-persisted in encrypted workspace storage; a 60-second CAS lock serializes refresh. Never use the same refresh grant in different workspaces/namespaces/keys or another app. Do not inspect/export token records into logs. Crash between provider refresh and persistence needs recovery within Xero's documented refresh grace period. No tokens are returned.

Requests use fixed HTTPS Xero hosts, no redirect following, bounded 2 MB response and per-request timeout. Only explicit HTTP loopback mock origins are accepted as overrides. Read HTTP 429/5xx retries are bounded to readRetries (0..2) and Retry-After/maxRetryDelayMs; a longer wait fails with metadata in the safe error message. Network failures and accounting writes are never internally retried. Configure ONF instance retries deliberately; keep write retries disabled. Errors omit raw provider bodies to avoid credential/PII disclosure.

Validation: isolated local mock services only; live tenant consent and account access have not been verified. Xero accounting requests, OAuth tokens, tenant connections, idempotency, rate limits.

Audited socket contract (21 October 2026)#

Inputs:

  • tenantId: string; required.
  • where: string; optional (absent stays absent).

Outputs:

  • accounts: @xero.accounts; required.
  • metadata: @xero.metadata; required.

Configuration:

  • authMode: string; default "accessToken". accessToken reads a current bearer secret; managedRefresh keeps rotating tokens encrypted in workspace storage.
  • accessTokenSecret: string; default "XERO_ACCESS_TOKEN"
  • bootstrapTokenSecret: string; default "XERO_OAUTH_BOOTSTRAP". JSON secret containing access_token, refresh_token and expires_at (ISO time). Used only when the storage key does not exist.
  • clientIdSecret: string; default "XERO_CLIENT_ID"
  • clientSecretSecret: string; default "XERO_CLIENT_SECRET"
  • pkce: boolean; default false
  • tokenNamespace: string; default "integration.xero.oauth"
  • tokenKey: string; default "default"
  • mockBaseUrl: string; default "". Tests only: HTTP loopback origin. Production endpoints cannot be overridden.
  • requestTimeoutMs: integer; default 10000
  • readRetries: integer; default 1
  • maxRetryDelayMs: integer; default 2000

Known provider records and list elements have structural schemas. Explicit dynamic payloads, selected query results and provider extensions retain the recursive JSON Value vocabulary; they do not imply a known provider entity. Null is distinct from omission. Runtime validates the exact selected immutable type version; reading newer documentation never repins existing graphs. This audit used synthetic fixtures/local mocks and does not establish live provider authorization or delivery.

Catalog identity#

FieldValue
Source keyxero.accounts.list
Kindnode
Familyxero
PackSee library discovery

Integration guide · Browse the catalog

Inputs#

Socket IDLabelTypeRequiredMeaning
execexeccontrolNo
tenantIdtenantIdstringYes
wherewherestringNo

Outputs#

Socket IDLabelTypeRequiredMeaning
accountsaccounts@xero.accounts v1Yes
metadatametadata@xero.metadata v1Yes
nextnextcontrolNo
errorerrorcontrolNo

Configuration schema#

json
{
  "type": "object",
  "properties": {
    "authMode": {
      "type": "string",
      "enum": [
        "accessToken",
        "managedRefresh"
      ],
      "default": "accessToken",
      "description": "accessToken reads a current bearer secret; managedRefresh keeps rotating tokens encrypted in workspace storage."
    },
    "accessTokenSecret": {
      "type": "string",
      "default": "XERO_ACCESS_TOKEN"
    },
    "bootstrapTokenSecret": {
      "type": "string",
      "default": "XERO_OAUTH_BOOTSTRAP",
      "description": "JSON secret containing access_token, refresh_token and expires_at (ISO time). Used only when the storage key does not exist."
    },
    "clientIdSecret": {
      "type": "string",
      "default": "XERO_CLIENT_ID"
    },
    "clientSecretSecret": {
      "type": "string",
      "default": "XERO_CLIENT_SECRET"
    },
    "pkce": {
      "type": "boolean",
      "default": false
    },
    "tokenNamespace": {
      "type": "string",
      "default": "integration.xero.oauth",
      "minLength": 1
    },
    "tokenKey": {
      "type": "string",
      "default": "default",
      "minLength": 1
    },
    "mockBaseUrl": {
      "type": "string",
      "default": "",
      "description": "Tests only: HTTP loopback origin. Production endpoints cannot be overridden."
    },
    "requestTimeoutMs": {
      "type": "integer",
      "minimum": 100,
      "maximum": 30000,
      "default": 10000
    },
    "readRetries": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2,
      "default": 1
    },
    "maxRetryDelayMs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000,
      "default": 2000
    }
  },
  "required": [],
  "additionalProperties": false
}

Source and installed versions#

This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See versioning, connections and integration setup.

Source provenance

Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.

  • ../OpenNodeFlow-Library/work/catalog-all.mjs
  • ../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs
  • ../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs
  • shared/seed.ts
  • shared/storage-library.ts
  • shared/variable-library.ts
  • shared/control-flow.ts
  • shared/remote-routes.ts
  • server/runtime-library.ts
  • shared/error-library.ts
  • shared/storage-model.ts
  • shared/builtin-documentation.ts
Type to search the documentation.
↑ ↓ to navigate · Enter to openAgent map ↗