Xero Accounting API REST API
Automate accounting workflows with cloud-based finance API
Xero's REST API provides comprehensive access to accounting, invoicing, payroll, and financial reporting data. Developers use it to build integrations that automate bookkeeping, synchronize transactions, manage invoices and payments, and generate real-time financial insights. The API powers thousands of business applications connecting to Xero's cloud accounting platform used by millions of small businesses worldwide.
https://api.xero.com/api.xro/2.0
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /Invoices | Retrieve all invoices with optional filtering by status, date, or contact |
| POST | /Invoices | Create new sales invoices or purchase bills with line items and tax details |
| GET | /Invoices/{InvoiceID} | Retrieve a specific invoice by its unique identifier |
| GET | /Contacts | List all contacts (customers and suppliers) in the organization |
| POST | /Contacts | Create new customer or supplier contact records |
| GET | /Accounts | Retrieve the chart of accounts including asset, liability, equity, revenue, and expense accounts |
| GET | /BankTransactions | Get bank transactions including spend money, receive money, and bank transfers |
| POST | /BankTransactions | Create bank transactions for recording payments and receipts |
| GET | /Payments | Retrieve payment records linked to invoices and credit notes |
| POST | /Payments | Record payments against invoices or bills |
| GET | /Reports/ProfitAndLoss | Generate profit and loss statement for specified date range |
| GET | /Reports/BalanceSheet | Retrieve balance sheet report showing assets, liabilities, and equity |
| GET | /Items | List inventory items and services with pricing information |
| GET | /TaxRates | Get configured tax rates for sales and purchases |
| GET | /Organisations | Retrieve organization details including name, address, and fiscal settings |
Code Examples
curl -X GET 'https://api.xero.com/api.xro/2.0/Invoices?Status=DRAFT' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'xero-tenant-id: YOUR_TENANT_ID' \
-H 'Accept: application/json'
Connect Xero Accounting API to AI
Deploy a Xero Accounting API MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Xero Accounting API through these tools:
create_invoice
Generate and send invoices to customers with line items, tax calculations, and due dates
get_financial_reports
Retrieve profit & loss, balance sheet, and cash flow reports for financial analysis
reconcile_bank_transactions
Match and reconcile bank transactions with invoices and bills automatically
manage_contacts
Create, update, and retrieve customer and supplier contact information
track_payments
Record and monitor payment status for outstanding invoices and bills
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy Xero Accounting API MCP Server →