Overview
Join a vibrant community of developers whose integrations with Xero are shaping the future of small businesses globally. Xero Developer: Powering Your Innovation and Growth!
Xero Accounting API is a finance API from xero.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 224 endpoints.
At a glance
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Finance
- Base URL
https://api.xero.com/api.xro/2.0- Version
- 2.9.4
- Endpoints
- 224
- OpenAPI
- Specification ↗
- Spec updated
- 2021-02-25
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://api.xero.com/api.xro/2.0/Accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.xero.com/api.xro/2.0/Accounts", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://api.xero.com/api.xro/2.0/Accounts",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /Accounts | Retrieves the full chart of accounts |
| PUT | /Accounts | Creates a new chart of accounts |
| GET | /Accounts/{AccountID} | Retrieves a single chart of accounts by using a unique account Id |
| POST | /Accounts/{AccountID} | Updates a chart of accounts |
| DELETE | /Accounts/{AccountID} | Deletes a chart of accounts |
| GET | /Accounts/{AccountID}/Attachments | Retrieves attachments for a specific accounts by using a unique account Id |
| GET | /Accounts/{AccountID}/Attachments/{AttachmentID} | Retrieves a specific attachment from a specific account using a unique attachment Id |
| GET | /Accounts/{AccountID}/Attachments/{FileName} | Retrieves an attachment for a specific account by filename |
| POST | /Accounts/{AccountID}/Attachments/{FileName} | Updates attachment on a specific account by filename |
| PUT | /Accounts/{AccountID}/Attachments/{FileName} | Creates an attachment on a specific account |
| GET | /BankTransactions | Retrieves any spent or received money transactions |
| POST | /BankTransactions | Updates or creates one or more spent or received money transaction |
| PUT | /BankTransactions | Creates one or more spent or received money transaction |
| GET | /BankTransactions/{BankTransactionID} | Retrieves a single spent or received money transaction by using a unique bank transaction Id |
| POST | /BankTransactions/{BankTransactionID} | Updates a single spent or received money transaction |
| GET | /BankTransactions/{BankTransactionID}/Attachments | Retrieves any attachments from a specific bank transactions |
| GET | /BankTransactions/{BankTransactionID}/Attachments/{AttachmentID} | Retrieves specific attachments from a specific BankTransaction using a unique attachment Id |
| GET | /BankTransactions/{BankTransactionID}/Attachments/{FileName} | Retrieves a specific attachment from a specific bank transaction by filename |
| POST | /BankTransactions/{BankTransactionID}/Attachments/{FileName} | Updates a specific attachment from a specific bank transaction by filename |
| PUT | /BankTransactions/{BankTransactionID}/Attachments/{FileName} | Creates an attachment for a specific bank transaction by filename |
| GET | /BankTransactions/{BankTransactionID}/History | Retrieves history from a specific bank transaction using a unique bank transaction Id |
| PUT | /BankTransactions/{BankTransactionID}/History | Creates a history record for a specific bank transactions |
| GET | /BankTransfers | Retrieves all bank transfers |
| PUT | /BankTransfers | Creates a bank transfer |
| GET | /BankTransfers/{BankTransferID} | Retrieves specific bank transfers by using a unique bank transfer Id |
| GET | /BankTransfers/{BankTransferID}/Attachments | Retrieves attachments from a specific bank transfer |
| GET | /BankTransfers/{BankTransferID}/Attachments/{AttachmentID} | Retrieves a specific attachment from a specific bank transfer using a unique attachment ID |
| GET | /BankTransfers/{BankTransferID}/Attachments/{FileName} | Retrieves a specific attachment on a specific bank transfer by file name |
| POST | /BankTransfers/{BankTransferID}/Attachments/{FileName} | updateBankTransferAttachmentByFileName |
| PUT | /BankTransfers/{BankTransferID}/Attachments/{FileName} | createBankTransferAttachmentByFileName |
| GET | /BankTransfers/{BankTransferID}/History | Retrieves history from a specific bank transfer using a unique bank transfer Id |
| PUT | /BankTransfers/{BankTransferID}/History | Creates a history record for a specific bank transfer |
| GET | /BatchPayments | Retrieves either one or many batch payments for invoices |
| PUT | /BatchPayments | Creates one or many batch payments for invoices |
| GET | /BatchPayments/{BatchPaymentID}/History | Retrieves history from a specific batch payment |
| PUT | /BatchPayments/{BatchPaymentID}/History | Creates a history record for a specific batch payment |
| GET | /BrandingThemes | Retrieves all the branding themes |
| GET | /BrandingThemes/{BrandingThemeID} | Retrieves a specific branding theme using a unique branding theme Id |
| GET | /BrandingThemes/{BrandingThemeID}/PaymentServices | Retrieves the payment services for a specific branding theme |
| POST | /BrandingThemes/{BrandingThemeID}/PaymentServices | Creates a new custom payment service for a specific branding theme |
| GET | /ContactGroups | Retrieves the contact Id and name of all the contacts in a contact group |
| PUT | /ContactGroups | Creates a contact group |
| GET | /ContactGroups/{ContactGroupID} | Retrieves a specific contact group by using a unique contact group Id |
| POST | /ContactGroups/{ContactGroupID} | Updates a specific contact group |
| PUT | /ContactGroups/{ContactGroupID}/Contacts | Creates contacts to a specific contact group |
| DELETE | /ContactGroups/{ContactGroupID}/Contacts | Deletes all contacts from a specific contact group |
| DELETE | /ContactGroups/{ContactGroupID}/Contacts/{ContactID} | Deletes a specific contact from a contact group using a unique contact Id |
| GET | /Contacts | Retrieves all contacts in a Xero organisation |
| POST | /Contacts | Updates or creates one or more contacts in a Xero organisation |
| PUT | /Contacts | Creates multiple contacts (bulk) in a Xero organisation |
| GET | /Contacts/{ContactID} | Retrieves a specific contacts in a Xero organisation using a unique contact Id |
| POST | /Contacts/{ContactID} | Updates a specific contact in a Xero organisation |
| GET | /Contacts/{ContactID}/Attachments | Retrieves attachments for a specific contact in a Xero organisation |
| GET | /Contacts/{ContactID}/Attachments/{AttachmentID} | Retrieves a specific attachment from a specific contact using a unique attachment Id |
| GET | /Contacts/{ContactID}/Attachments/{FileName} | Retrieves a specific attachment from a specific contact by file name |
| POST | /Contacts/{ContactID}/Attachments/{FileName} | updateContactAttachmentByFileName |
| PUT | /Contacts/{ContactID}/Attachments/{FileName} | createContactAttachmentByFileName |
| GET | /Contacts/{ContactID}/CISSettings | Retrieves CIS settings for a specific contact in a Xero organisation |
| GET | /Contacts/{ContactID}/History | Retrieves history records for a specific contact |
| PUT | /Contacts/{ContactID}/History | Creates a new history record for a specific contact |
| GET | /Contacts/{ContactNumber} | Retrieves a specific contact by contact number in a Xero organisation |
| GET | /CreditNotes | Retrieves any credit notes |
| POST | /CreditNotes | Updates or creates one or more credit notes |
| PUT | /CreditNotes | Creates a new credit note |
| GET | /CreditNotes/{CreditNoteID} | Retrieves a specific credit note using a unique credit note Id |
| POST | /CreditNotes/{CreditNoteID} | Updates a specific credit note |
| PUT | /CreditNotes/{CreditNoteID}/Allocations | Creates allocation for a specific credit note |
| GET | /CreditNotes/{CreditNoteID}/Attachments | Retrieves attachments for a specific credit notes |
| GET | /CreditNotes/{CreditNoteID}/Attachments/{AttachmentID} | Retrieves a specific attachment from a specific credit note using a unique attachment Id |
| GET | /CreditNotes/{CreditNoteID}/Attachments/{FileName} | Retrieves a specific attachment on a specific credit note by file name |
| POST | /CreditNotes/{CreditNoteID}/Attachments/{FileName} | Updates attachments on a specific credit note by file name |
| PUT | /CreditNotes/{CreditNoteID}/Attachments/{FileName} | Creates an attachment for a specific credit note |
| GET | /CreditNotes/{CreditNoteID}/History | Retrieves history records of a specific credit note |
| PUT | /CreditNotes/{CreditNoteID}/History | Retrieves history records of a specific credit note |
| GET | /CreditNotes/{CreditNoteID}/pdf | Retrieves credit notes as PDF files |
| GET | /Currencies | Retrieves currencies for your Xero organisation |
| PUT | /Currencies | Create a new currency for a Xero organisation |
| GET | /Employees | Retrieves employees used in Xero payrun |
| POST | /Employees | Creates a single new employees used in Xero payrun |
| PUT | /Employees | Creates new employees used in Xero payrun |
| GET | /Employees/{EmployeeID} | Retrieves a specific employee used in Xero payrun using a unique employee Id |
| GET | /ExpenseClaims | Retrieves expense claims |
| PUT | /ExpenseClaims | Creates expense claims |
| GET | /ExpenseClaims/{ExpenseClaimID} | Retrieves a specific expense claim using a unique expense claim Id |
| POST | /ExpenseClaims/{ExpenseClaimID} | Updates a specific expense claims |
| GET | /ExpenseClaims/{ExpenseClaimID}/History | Retrieves history records of a specific expense claim |
| PUT | /ExpenseClaims/{ExpenseClaimID}/History | Creates a history record for a specific expense claim |
| GET | /InvoiceReminders/Settings | Retrieves invoice reminder settings |
| GET | /Invoices | Retrieves sales invoices or purchase bills |
| POST | /Invoices | Updates or creates one or more sales invoices or purchase bills |
| PUT | /Invoices | Creates one or more sales invoices or purchase bills |
| GET | /Invoices/{InvoiceID} | Retrieves a specific sales invoice or purchase bill using a unique invoice Id |
| POST | /Invoices/{InvoiceID} | Updates a specific sales invoices or purchase bills |
| GET | /Invoices/{InvoiceID}/Attachments | Retrieves attachments for a specific invoice or purchase bill |
| GET | /Invoices/{InvoiceID}/Attachments/{AttachmentID} | Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id |
| GET | /Invoices/{InvoiceID}/Attachments/{FileName} | Retrieves an attachment from a specific invoice or purchase bill by filename |
| POST | /Invoices/{InvoiceID}/Attachments/{FileName} | Updates an attachment from a specific invoices or purchase bill by filename |
| PUT | /Invoices/{InvoiceID}/Attachments/{FileName} | Creates an attachment for a specific invoice or purchase bill by filename |
| POST | /Invoices/{InvoiceID}/Email | Sends a copy of a specific invoice to related contact via email |
| GET | /Invoices/{InvoiceID}/History | Retrieves history records for a specific invoice |
Showing the first 100 of 224 endpoints; the full list is in the documentation.
Questions
Does the Xero Accounting API API need an API key?
Yes. The Xero Accounting API API uses OAuth authentication; the documentation explains how to get credentials.
Does the Xero Accounting API API support HTTPS?
Yes, the Xero Accounting API API is served over HTTPS.
How many endpoints does the Xero Accounting API API have?
Its OpenAPI description lists 224 endpoints in version 2.9.4. The first 100 are shown on this page.
What are alternatives to the Xero Accounting API API?
Other Finance APIs include Stripe, SEC EDGAR Data, Plaid, Fed Treasury, Razorpay IFSC.
Similar finance APIs
Compare alternatives →Stripe
FinancePayment processing, subscriptions, and financial management
SEC EDGAR Data
FinanceAPI to access annual reports of public US companies
Plaid
FinanceConnect with user's bank accounts and access transaction data
Fed Treasury
FinanceU.S. Department of the Treasury Data
Razorpay IFSC
FinanceIndian Financial Systems Code (Bank Branch Codes)
Klarna
FinanceKlarna payment and shopping service
Listed from APIs.guru (CC0).