Xero

Xero Account Data API (Beta)

Beta: this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access…

Finance & banking#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Beta: this API is in beta. Endpoints, request parameters and response shapes may change before general availability.

The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.

Endpoints 3

AccountData

  • GETGet the balance of each general ledger account as at a given date/account-balances?accountingBasis=ACCRUAL&date=2024-12-31&comparisonPeriodCount=3&comparisonPeriodSize=MONTH&accountIds=3fa85f64-5717-4562-b3fc-2c963f66afa6&class=ASSET&type=string&systemAccountCodes=string&trackingItemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6&unassignedToTrackingCategoryIds=3fa85f64-5717-4562-b3fc-2c963f66afa6Retrieves account balances as at date, optionally including balances for one or more prior comparison periods, and optionally filtered by account class, type,…
  • GETGet the net movement of each general ledger account over a date range/account-movements?accountingBasis=ACCRUAL&startDate=2024-01-01&endDate=2024-12-31&comparisonPeriodCount=3&comparisonPeriodSize=MONTH&accountIds=3fa85f64-5717-4562-b3fc-2c963f66afa6&class=ASSET&type=string&systemAccountCodes=string&trackingItemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6&unassignedToTrackingCategoryIds=3fa85f64-5717-4562-b3fc-2c963f66afa6Retrieves account movements between startDate and endDate, optionally including movements for one or more prior comparison periods of the same length, and…
  • GETGet general ledger account transactions between two dates, with pagination and filtering/account-transactions?accountingBasis=ACCRUAL&startDate=2024-01-01&endDate=2024-12-31&accountIds=3fa85f64-5717-4562-b3fc-2c963f66afa6&class=ASSET&type=string&systemAccountCodes=string&include=trackingCategories&maxJournalNumber=999999&token=stringRetrieves transactions posted between startDate and endDate (inclusive), optionally filtered by account IDs, class, type, or system account code, with…

API details

Base URL
https://api.xero.com/accountdata.xro/1.0
Authentication
OAuth 2.0 (authorization code flow) with 3 scopes
Operations
3 operations on 3 pathsGET 3
Main resources
AccountData 3
Response formats
application/json application/problem+json
Description format
OpenAPI 3.0.0, API version 20.1.0

How to test the Xero Account Data API (Beta) in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Xero Account Data API (Beta) collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 3 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Get the balance of each general ledger account as at a given date” (GET /account-balances?accountingBasis=ACCRUAL&date=2024-12-31&comparisonPeriodCount=3&comparisonPeriodSize=MONTH&accountIds=3fa85f64-5717-4562-b3fc-2c963f66afa6&class=ASSET&type=string&systemAccountCodes=string&trackingItemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6&unassignedToTrackingCategoryIds=3fa85f64-5717-4562-b3fc-2c963f66afa6), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Xero Account Data API (Beta)?

Beta: this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access… It is listed under Finance & banking and has 3 endpoints.

Who publishes the Xero Account Data API (Beta)?

It is listed from Xero's public API description (an OpenAPI document), not published by Xero on Swastik Codes. Anyone who controls xero.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Xero Account Data API (Beta)?

Requests go to https://api.xero.com/accountdata.xro/1.0. Endpoint paths are added to this base URL.

How do I authenticate with the Xero Account Data API (Beta)?

With OAuth 2.0 (authorization code flow) with 3 scopes.

How many endpoints does the Xero Account Data API (Beta) have?

3 operations on 3 paths (3 GET). The largest groups are AccountData.

Is forking the Xero Account Data API (Beta) free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.