Repository navigation
feat(accountdata): add Account Data API OpenAPI spec - #853
Draft
brandon-nicholson-xero wants to merge 5 commits into
Draft
brandon-nicholson-xero wants to merge 5 commits into
brandon-nicholson-xero wants to merge 5 commits into
Conversation
- 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>
yangb-xero
reviewed
Oct 9, 2026
| pagination: | ||
| pageSize: 200 | ||
| links: | ||
| next: /accountdata.xro/1.0/account-transactions?token=eyJvcmdJZCI6ImIwNDRlNGVhLWEyOTAtNGYxMS04ZGY4LTQwMTc5ZGZhNmNhZSJ9 |
Contributor
There was a problem hiding this comment.
can we replace this example token to a fake or dummy value? it seems decoding to an org id?
yangb-xero
reviewed
Oct 9, 2026
| paths: | ||
| /account-balances: | ||
| get: | ||
| tags: |
Contributor
There was a problem hiding this comment.
I think you'll need to only use one tag per API for all three endpoints, instead of one per endpoint. Our SDK codegen expects one API per spec.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the beta Account Data API spec (
xero-accountdata.yaml) and registers it inmanifest.jsonasaccountData(canPreview: false).The API exposes three read-only endpoints under
https://api.xero.com/accountdata.xro/1.0:GET /account-balances(scopeaccountdata.balances.read)GET /account-movements(scopeaccountdata.movements.read)GET /account-transactions(scopeaccountdata.transactions.read)Status: draft
Kept as a draft while the pagination
nextlink 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-transactionsreturnspagination.links.nextas a relative path without the public prefix (/v1/account-transactions?token=…), so following it as-is returns 404. Sending only thetokento/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
canPreviewisfalse.ValidationProblem) and gateway (GatewayProblem) shapes. The 500 response is intentionally generic.Checklist
featcommit titlemanifest.jsonnextlink behaviour agreed