Xero Accounting API
xero · Finance
Xero Accounting API API
Authentication
No authentication requiredFree to use with no key needed.
Sample Requests
GET
Retrieves the full chart of accounts
Retrieves the full chart of accounts
https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/Accounts?order=asc&where=example
Hover any highlighted part to learn what it does
Headers — extra info sent with the request
| xero-tenant-id | example |
curl -X GET "https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/Accounts?order=asc&where=example" \ -H "xero-tenant-id: example"
import requests
params = {
"order": "asc",
"where": "example"
}
headers = {
"xero-tenant-id": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/Accounts",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/Accounts');
url.searchParams.set('order', 'asc');
url.searchParams.set('where', 'example');
const response = await fetch(url, {
headers: {
'xero-tenant-id': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/Accounts")
q := baseURL.Query()
q.Set("order", "asc")
q.Set("where", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("xero-tenant-id", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/Accounts")
uri.query = URI.encode_www_form({
"order" => "asc",
"where" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["xero-tenant-id"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/Accounts?" . http_build_query([
"order" => "asc",
"where" => "example"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"xero-tenant-id: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET
Retrieves any spent or received money transactions
Retrieves any spent or received money transactions
https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransactions?page=1&order=asc&where=example&unitdp=1
Hover any highlighted part to learn what it does
Headers — extra info sent with the request
| xero-tenant-id | example |
curl -X GET "https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransactions?page=1&order=asc&where=example&unitdp=1" \ -H "xero-tenant-id: example"
import requests
params = {
"page": "1",
"order": "asc",
"where": "example",
"unitdp": "1"
}
headers = {
"xero-tenant-id": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransactions",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransactions');
url.searchParams.set('page', '1');
url.searchParams.set('order', 'asc');
url.searchParams.set('where', 'example');
url.searchParams.set('unitdp', '1');
const response = await fetch(url, {
headers: {
'xero-tenant-id': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransactions")
q := baseURL.Query()
q.Set("page", "1")
q.Set("order", "asc")
q.Set("where", "example")
q.Set("unitdp", "1")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("xero-tenant-id", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransactions")
uri.query = URI.encode_www_form({
"page" => "1",
"order" => "asc",
"where" => "example",
"unitdp" => "1"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["xero-tenant-id"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransactions?" . http_build_query([
"page" => "1",
"order" => "asc",
"where" => "example",
"unitdp" => "1"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"xero-tenant-id: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET
Retrieves all bank transfers
Retrieves all bank transfers
https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransfers?order=asc&where=example
Hover any highlighted part to learn what it does
Headers — extra info sent with the request
| xero-tenant-id | example |
curl -X GET "https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransfers?order=asc&where=example" \ -H "xero-tenant-id: example"
import requests
params = {
"order": "asc",
"where": "example"
}
headers = {
"xero-tenant-id": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransfers",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransfers');
url.searchParams.set('order', 'asc');
url.searchParams.set('where', 'example');
const response = await fetch(url, {
headers: {
'xero-tenant-id': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransfers")
q := baseURL.Query()
q.Set("order", "asc")
q.Set("where", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("xero-tenant-id", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransfers")
uri.query = URI.encode_www_form({
"order" => "asc",
"where" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["xero-tenant-id"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/BankTransfers?" . http_build_query([
"order" => "asc",
"where" => "example"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"xero-tenant-id: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Xero Accounting API?
Xero Accounting API is a Finance API. Developers commonly use finance APIs for:
- processing payments and handling transactions
- building subscription and billing systems
- automating invoicing and financial reporting
- fraud detection and risk scoring
- connecting to banking and accounting software
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Xero Accounting API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide