5.9 KiB
5.9 KiB
Xero Routing Reference
App name: xero
Base URL proxied: api.xero.com
Automatic Tenant ID Injection
The router automatically injects the Xero-Tenant-Id header from your connection config. You do not need to provide it manually.
API Path Pattern
/xero/api.xro/2.0/{endpoint}
Common Endpoints
Contacts
List Contacts
GET /xero/api.xro/2.0/Contacts
Get Contact
GET /xero/api.xro/2.0/Contacts/{contactId}
Create Contact
POST /xero/api.xro/2.0/Contacts
Content-Type: application/json
{
"Contacts": [{
"Name": "John Doe",
"EmailAddress": "john@example.com",
"Phones": [{"PhoneType": "DEFAULT", "PhoneNumber": "555-1234"}]
}]
}
Invoices
List Invoices
GET /xero/api.xro/2.0/Invoices
Get Invoice
GET /xero/api.xro/2.0/Invoices/{invoiceId}
Create Invoice
POST /xero/api.xro/2.0/Invoices
Content-Type: application/json
{
"Invoices": [{
"Type": "ACCREC",
"Contact": {"ContactID": "xxx"},
"LineItems": [{
"Description": "Service",
"Quantity": 1,
"UnitAmount": 100.00,
"AccountCode": "200"
}]
}]
}
Accounts
List Accounts
GET /xero/api.xro/2.0/Accounts
Items
List Items
GET /xero/api.xro/2.0/Items
Payments
List Payments
GET /xero/api.xro/2.0/Payments
Bank Transactions
List Bank Transactions
GET /xero/api.xro/2.0/BankTransactions
Reports
Profit and Loss
GET /xero/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2024-01-01&toDate=2024-12-31
Balance Sheet
GET /xero/api.xro/2.0/Reports/BalanceSheet?date=2024-12-31
Trial Balance
GET /xero/api.xro/2.0/Reports/TrialBalance?date=2024-12-31
Currencies
List Currencies
GET /xero/api.xro/2.0/Currencies
Tax Rates
List Tax Rates
GET /xero/api.xro/2.0/TaxRates
Credit Notes
List Credit Notes
GET /xero/api.xro/2.0/CreditNotes
Purchase Orders
List Purchase Orders
GET /xero/api.xro/2.0/PurchaseOrders
Organisation
Get Organisation
GET /xero/api.xro/2.0/Organisation
Invoice Types
ACCREC- Accounts Receivable (sales invoice)ACCPAY- Accounts Payable (bill)
Notes
Xero-Tenant-Idheader is automatically injected by the router- Dates are in
YYYY-MM-DDformat - Multiple records can be created in a single request using arrays
- Updates use POST method with the record ID in the URL
- Draft invoices can be deleted by setting
StatustoDELETED - Use
wherequery parameter for filtering (e.g.,where=Status=="VOIDED")
Resources
- API Overview
- List Contacts
- Get Contact
- Create Contact
- Update Contact
- List Invoices
- Get Invoice
- Create Invoice
- Update Invoice
- Email Invoice
- List Accounts
- Get Account
- Create Account
- Update Account
- Delete Account
- List Items
- Get Item
- Create Item
- Update Item
- Delete Item
- List Payments
- Get Payment
- Create Payment
- Update Payment
- List Bank Transactions
- Get Bank Transaction
- Create Bank Transaction
- Update Bank Transaction
- Profit and Loss Report
- Balance Sheet Report
- Trial Balance Report
- Bank Summary Report
- Get Organisation