Skip to content

Latest commit

 

History

History
203 lines (159 loc) · 5.92 KB

File metadata and controls

203 lines (159 loc) · 5.92 KB

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-Id header is automatically injected by the router
  • Dates are in YYYY-MM-DD format
  • 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 Status to DELETED
  • Use where query parameter for filtering (e.g., where=Status=="VOIDED")

Resources