Skip to content

feat(accountdata): add Account Data API OpenAPI spec - #853

Merged
yangb-xero merged 7 commits into
XeroAPI:masterfrom
brandon-nicholson-xero:feat/account-data-api
Oct 14, 2026
Merged

yangb-xero merged 7 commits into
XeroAPI:masterfrom
brandon-nicholson-xero:feat/account-data-api

Conversation

@brandon-nicholson-xero

@brandon-nicholson-xero brandon-nicholson-xero commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds the beta Account Data API spec (xero-accountdata.yaml) and registers it in manifest.json as accountData (canPreview: false).

The API exposes three read-only endpoints under https://api.xero.com/accountdata.xro/1.0:

  • GET /account-balances (scope accountdata.balances.read)
  • GET /account-movements (scope accountdata.movements.read)
  • GET /account-transactions (scope accountdata.transactions.read)

Status: draft

Kept as a draft while the pagination next link is resolved (below). The spec was checked against the current service implementation and against live responses in a UAT environment for balances, movements and transactions.

Known issue

GET /account-transactions returns pagination.links.next as a relative path without the public prefix (/v1/account-transactions?token=…), so following it as-is returns 404. Sending only the token to /accountdata.xro/1.0/account-transactions?token=… works. The spec example currently shows the public-prefixed form and will be corrected once the intended behaviour is agreed.

Notes for review

  • Beta API: the info block says so, and canPreview is false.
  • Error responses document the real validation (ValidationProblem) and gateway (GatewayProblem) shapes. The 500 response is intentionally generic.

Checklist

  • feat commit title
  • Spec registered in manifest.json
  • yamllint passes; spec validates as OpenAPI 3.0
  • Pagination next link behaviour agreed

brandon-nicholson-xero and others added 5 commits October 8, 2026 07:51
- Register accountData in the API Explorer manifest (canPreview: false)

- Publish the beta Account Data API contract: account balances, account movements and account transactions

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Split Account into Account (no id) for balances and movements and TransactionAccount (with id) for transactions

- Make systemAccountCode required and non-null, documented as NONE when absent

- Document transactions source, taxRate and description as always present and pagination as null on the last page

- Document omitted zero results, bank account handling, type matching and movement range overlap

- Replace invented error examples with the ValidationProblem shape and real 403/404 behaviour

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…or bodies

- Document the gateway PascalCase 401 and 403 bodies, including the missing-scope case

- Replace error examples with verified 400 and 404 bodies and type URIs

- Document the empty-body 429 with Retry-After and X-Rate-Limit-Problem

- Remove the unverified 500 example

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…type URIs from examples

- Add DELETED to the account status values

- Remove internal service type URIs from the 400 and 404 error examples

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…on lines

- Document trackingCategories as omitted when not requested and an empty object when a line has no tracking

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Comment thread xero-accountdata.yaml Outdated
Comment thread xero-accountdata.yaml
…tifiers

- Tag all operations with AccountData so the SDK codegen produces one API for the spec

- Replace the example continuation token, which decoded to an organisation ID, with a fake value

- Replace the example GUIDs with randomly generated values

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…transactions

- Replace pagination.links.next with pagination.nextToken in the transactions response schema and examples

- Document nextToken as the value to send back as the token query parameter, so SDK users do not need to parse a URL

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@brandon-nicholson-xero
brandon-nicholson-xero marked this pull request as ready for review October 13, 2026 22:20
@yangb-xero
yangb-xero merged commit 59b760a into XeroAPI:master Oct 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants