Table of Contents
Get paid sooner when you accept payments online straight from a Xero invoice. Give your customers different payment options, including PayPal and Stripe.
API Overview
Xero is a cloud-based accounting software designed for small businesses and accountants. It offers a comprehensive suite of features, including invoicing, expense tracking, bank reconciliation, and financial reporting. Xero integrates with a wide range of third-party applications, making it a versatile solution for businesses of all sizes. Its user-friendly interface and intuitive navigation make it easy for users to manage their finances and gain valuable insights into their business performance. Xero's mobile app allows users to access their financial data on the go, providing them with real-time updates and the ability to manage their finances from anywhere. The Xero API provides developers with access to Xero's functionality and data. The API is RESTful and uses OAuth 2.0 for authentication. The API documentation is comprehensive and includes examples in multiple programming languages. Xero also offers a range of tools and resources to help developers integrate with the API, including a sandbox environment for testing and a community forum for support. Webhooks allow developers to receive real-time notifications of changes to Xero data. Rate limits are in place to ensure that the API is used responsibly and to prevent abuse. Developers can monitor their API usage through the Xero Developer Portal.
API Request Limits
Starter Plan
20 requests per second
Standard Plan
60 requests per second
Premium Plan
120 requests per second
APIs
Method: get
Description: Retrieves a list of accounts..
Endpoint: /Accounts
Parameters:
Method: get
Description: Retrieves a specific account..
Endpoint: /Accounts/{id}
Parameters:
Method: put
Description: Updates a specific account..
Endpoint: /Accounts/{id}?
Parameters:
Method: delete
Description: Deletes a specific account..
Endpoint: /Accounts/{id}
Parameters:
Method: get
Description: Retrieves the activity statement for a given statement date according to the organisation's tax reporting period..
Endpoint: /ActivityStatements/{activityStatementId}
Parameters:
Method: get
Description: Retrieves a list of attachments..
Endpoint: /Attachments
Parameters:
Method: post
Description: Uploads an attachment.
Endpoint: e.g.
Parameters: a PDF receipt.
Method: get
Description: Retrieves a list of bank accounts..
Endpoint: /BankAccounts
Parameters:
Method: get
Description: Retrieves a list of bank transactions according to specified query parameters..
Endpoint: /BankTransactions
Parameters:
Method: post
Description: Creates a batch payment from multiple existing account payments..
Endpoint: /BatchPayments
Parameters:
Method: get
Description: Retrieves all the Batch Payments created through the Xero API..
Endpoint: /BatchPayments
Parameters:
Method: get
Description: Retrieves a list of brands..
Endpoint: /Brands
Parameters:
Method: get
Description: Retrieves a list of branding themes..
Endpoint: /BrandingThemes
Parameters:
Method: get
Description: Retrieves events from a Google Calendar that are associated with this Xero organisation..
Endpoint: /CalendarEvents
Parameters:
Method: get
Description: Retrieves a list of contacts..
Endpoint: /Contacts
Parameters:
Method: get
Description: Retrieves a specific contact..
Endpoint: /Contacts/{id}
Parameters:
Method: put
Description: Updates a contact..
Endpoint: /Contacts/{id}
Parameters:
Method: delete
Description: Deletes a contact..
Endpoint: /Contacts/{id}
Parameters:
Method: get
Description: Retrieves a list of attachments for a given contact..
Endpoint: /Contacts/{id}/Attachments
Parameters:
Method: post
Description: Uploads an attachment to a contact..
Endpoint: /Contacts/{id}/Attachments
Parameters:
Method: get
Description: Retrieves a list of credit notes..
Endpoint: /CreditNotes
Parameters:
Method: get
Description: Retrieves a specific credit note..
Endpoint: /CreditNotes/{creditNoteId}
Parameters:
Method: put
Description: Updates a specific credit note..
Endpoint: /CreditNotes/{id}?
Parameters:
Method: delete
Description: Deletes a specific credit note..
Endpoint: /CreditNotes/{id}
Parameters:
Method: get
Description: Retrieves a list of currencies..
Endpoint: /Currencies
Parameters:
Method: get
Description: Retrieves a specific currency..
Endpoint: /Currencies/{currencyCode}
Parameters:
Method: get
Description: Retrieves a list of employee groups..
Endpoint: /EmployeeGroups
Parameters:
Method: get
Description: Retrieves a specific employee group..
Endpoint: /EmployeeGroups/{id}
Parameters:
Method: get
Description: Retrieves a list of employees..
Endpoint: /Employees
Parameters:
Method: get
Description: Retrieves a specific employee..
Endpoint: /Employees/{id}
Parameters:
Method: put
Description: Updates a specific employee..
Endpoint: /Employees/{id}
Parameters:
Method: delete
Description: Deletes a specific employee..
Endpoint: /Employees/{id}
Parameters:
Method: get
Description: Retrieves a list of expense claims..
Endpoint: /ExpenseClaims
Parameters:
Method: get
Description: Retrieves a specific expense claim..
Endpoint: /ExpenseClaims/{id}
Parameters:
Method: put
Description: Updates a specific expense claim..
Endpoint: /ExpenseClaims/{id}
Parameters:
Method: delete
Description: Deletes a specific expense claim..
Endpoint: /ExpenseClaims/{id}
Parameters:
Method: get
Description: Retrieves a list of fixed assets..
Endpoint: /FixedAssets
Parameters:
Method: get
Description: Retrieves a specific fixed asset..
Endpoint: /FixedAssets/{id}
Parameters:
Method: put
Description: Updates a specific fixed asset..
Endpoint: /FixedAssets/{id}
Parameters:
Method: delete
Description: Deletes a specific fixed asset..
Endpoint: /FixedAssets/{id}
Parameters:
Method: get
Description: Retrieves a list of history records..
Endpoint: /HistoryRecords
Parameters:
Method: get
Description: Retrieves a specific history record..
Endpoint: /HistoryRecords/{id}
Parameters:
Method: get
Description: Retrieves a list of invoices..
Endpoint: /Invoices
Parameters:
Method: get
Description: Retrieves a specific invoice..
Endpoint: /Invoices/{invoiceId}
Parameters:
Method: put
Description: Updates a specific invoice..
Endpoint: /Invoices/{id}?
Parameters:
Method: delete
Description: Deletes a specific invoice..
Endpoint: /Invoices/{id}
Parameters:
Method: get
Description: Retrieves a list of item groups..
Endpoint: /ItemGroups
Parameters:
Method: get
Description: Retrieves a specific item group..
Endpoint: /ItemGroups/{id}
Parameters:
Method: get
Description: Retrieves a list of items..
Endpoint: /Items
Parameters:
Method: get
Description: Retrieves a specific item..
Endpoint: /Items/{id}
Parameters:
Method: put
Description: Updates a specific item..
Endpoint: /Items/{id}?
Parameters:
Method: delete
Description: Deletes a specific item..
Endpoint: /Items/{id}
Parameters:
Method: get
Description: Retrieves a list of journal entries..
Endpoint: /JournalEntries
Parameters:
Method: get
Description: Retrieves a specific journal entry..
Endpoint: /JournalEntries/{id}
Parameters:
Method: put
Description: Updates a specific journal entry..
Endpoint: /JournalEntries/{id}
Parameters:
Method: delete
Description: Deletes a specific journal entry..
Endpoint: /JournalEntries/{id}
Parameters:
Method: get
Description: Retrieves a list of journals..
Endpoint: /Journals
Parameters:
Method: get
Description: Retrieves a specific journal..
Endpoint: /Journals/{id}
Parameters:
Method: get
Description: Retrieves a list of linked transactions for a given transaction..
Endpoint: /LinkedTransactions
Parameters:
Method: get
Description: Retrieves a list of manual journals..
Endpoint: /ManualJournals
Parameters:
Method: get
Description: Retrieves a specific manual journal..
Endpoint: /ManualJournals/{id}
Parameters:
Method: put
Description: Updates a specific manual journal..
Endpoint: /ManualJournals/{id}
Parameters:
Method: delete
Description: Deletes a specific manual journal..
Endpoint: /ManualJournals/{id}
Parameters:
Method: get
Description: Retrieves information about the specified organisation..
Endpoint: /Organisation
Parameters:
Method: post
Description: Creates a new organisation..
Endpoint: /Organisation
Parameters:
Method: get
Description: Retrieves a list of organisations..
Endpoint: /Organisations
Parameters:
Method: get
Description: Retrieves a list of overpayments..
Endpoint: /Overpayments
Parameters:
Method: get
Description: Retrieves a specific overpayment..
Endpoint: /Overpayments/{overpaymentId}
Parameters:
Method: get
Description: Retrieves a list of payments..
Endpoint: /Payments
Parameters:
Method: get
Description: Retrieves a specific payment..
Endpoint: /Payments/{id}
Parameters:
Method: put
Description: Updates a specific payment..
Endpoint: /Payments/{id}?
Parameters:
Method: delete
Description: Deletes a specific payment..
Endpoint: /Payments/{id}
Parameters:
Method: get
Description: Retrieves a list of prepayments..
Endpoint: /Prepayments
Parameters:
Method: get
Description: Retrieves a specific prepayment..
Endpoint: /Prepayments/{prepaymentId}
Parameters:
Method: get
Description: Retrieves a list of purchase orders..
Endpoint: /PurchaseOrders
Parameters:
Method: get
Description: Retrieves a specific purchase order..
Endpoint: /PurchaseOrders/{purchaseOrderId}
Parameters:
Method: put
Description: Updates a specific purchase order..
Endpoint: /PurchaseOrders/{id}?
Parameters:
Method: delete
Description: Deletes a specific purchase order..
Endpoint: /PurchaseOrders/{id}
Parameters:
Method: get
Description: Retrieves a list of quotes..
Endpoint: /Quotes
Parameters:
Method: get
Description: Retrieves a specific quote..
Endpoint: /Quotes/{quoteId}
Parameters:
Method: put
Description: Updates a specific quote..
Endpoint: /Quotes/{id}?
Parameters:
Method: delete
Description: Deletes a specific quote..
Endpoint: /Quotes/{id}
Parameters:
Method: get
Description: Retrieves a list of receipts..
Endpoint: /Receipts
Parameters:
Method: post
Description: Creates a receipt..
Endpoint: /Receipts
Parameters:
Method: get
Description: Retrieves a specific receipt..
Endpoint: /Receipts/{receiptId}
Parameters:
Method: put
Description: Updates a specific receipt..
Endpoint: /Receipts/{id}?
Parameters:
Method: delete
Description: Deletes a specific receipt..
Endpoint: /Receipts/{id}
Parameters:
Method: get
Description: Retrieves a list of available reports..
Endpoint: /Reports
Parameters:
Method: get
Description: Retrieves a specific report..
Endpoint: /Reports/{reportId}
Parameters:
Method: put
Description: Updates a specific report..
Endpoint: /Reports/{id}
Parameters:
Method: delete
Description: Deletes a specific report..
Endpoint: /Reports/{id}
Parameters:
Method: get
Description: Retrieves a list of tax rates..
Endpoint: /TaxRates
Parameters:
Method: get
Description: Retrieves a specific tax rate..
Endpoint: /TaxRates/{taxRateId}
Parameters:
Method: get
Description: Retrieves a list of tracking categories..
Endpoint: /TrackingCategories
Parameters:
Method: get
Description: Retrieves a specific tracking category..
Endpoint: /TrackingCategories/{id}
Parameters:
Method: get
Description: Retrieves a list of tracking options..
Endpoint: /TrackingOptions
Parameters:
Method: get
Description: Retrieves a specific tracking option..
Endpoint: /TrackingOptions/{id}
Parameters:
Method: get
Description: Retrieves a list of transfers..
Endpoint: /Transfer
Parameters:
Method: get
Description: Retrieves a specific transfer..
Endpoint: /Transfer/{id}
Parameters:
Method: put
Description: Updates a specific transfer..
Endpoint: /Transfer/{id}
Parameters:
Method: delete
Description: Deletes a specific transfer..
Endpoint: /Transfer/{id}
Parameters:
Method: get
Description: Retrieves a list of units of measure..
Endpoint: /UnitOfMeasures
Parameters:
FAQ
How do I authenticate with Xero API?
Use OAuth 2.0 to authenticate and authorize your application. Obtain a consumer key and secret from the Xero developer portal.
What are the rate limits for Xero API?
Rate limits vary depending on API endpoint. Refer to the Xero API documentation for specific limits for each endpoint.
How do I get a sandbox account for testing?
Sign up for a free Xero developer account. Create a new organization within the developer account and select the 'Sandbox' option.
How do I handle API errors?
Xero API returns errors in JSON format. Handle errors by checking the 'error' key in the response and taking appropriate actions based on the error code and message.
How do I use a private key for authentication?
Generate a private key using an RSA or ECDSA algorithm. Use the private key to create a JWT (JSON Web Token) and pass it in the 'Authorization' header of API requests.