Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.routemcp.io/llms.txt

Use this file to discover all available pages before exploring further.

Xero

Overview

PropertyValue
Slugxero
AuthOAuth 2.0 + PKCE
API versionv2.0
SandboxYes — via Xero’s “Demo Company”
Rate limit60 req/min, 5,000 req/day per org

Supported resources

ResourceListGetCreateUpdateDelete
Invoice
Contact
Account
Payment
Tax Rate
Journal Entry
Expense
Purchase Order
Sales Order
Credit Note
Vendor Credit
Item
Tracking Category
Company Info
Employee
Transaction
Bank Feed Account
Bank Feed Transaction
Balance Sheet
Income Statement
Attachment
Address
Phone Number
Accounting Period
Payment Method
Payment Term
Cash Flow Statement
General Ledger Transaction
Expense Report
Item Fulfillment
Project

Connect setup

Xero uses OAuth 2.0 with PKCE. You need an app registered in the Xero Developer Portal.
1

Create a Xero app

Go to Xero Developer PortalNew app. Choose Web app and integration type Accounting. Under Configuration, copy the Client ID and Client Secret.
2

Add the redirect URL

In your app’s OAuth 2.0 redirect URIs list, add:
https://api.routemcp.io/api/v1/auth/callback
3

Configure required scopes

Enable the following scopes on your app:
  • openid
  • profile
  • email
  • offline_access
  • accounting.invoices
  • accounting.payments
  • accounting.banktransactions
  • accounting.manualjournals
  • accounting.contacts
  • accounting.settings
  • accounting.reports.balancesheet.read
  • accounting.reports.profitandloss.read
  • accounting.attachments
  • files
4

Connect via the widget

When your end user opens the Connect widget, they will enter the Client ID and Client Secret, then be redirected to Xero to authorize the connection.

Usage

# List sales invoices (AR) from Xero
curl "https://api.routemcp.io/api/v1/accounting/invoice?provider=xero" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "X-End-User-Id: user-123"

# Create a bill (AP) — set type=ACCOUNTS_PAYABLE
curl -X POST "https://api.routemcp.io/api/v1/accounting/invoice?provider=xero" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -H "X-End-User-Id: user-123" \
  -d '{ "type": "ACCOUNTS_PAYABLE", "contact": "urn:xero:contact:abc", "total_amount": 850.00, "due_date": "2026-06-01" }'

# Update by URN
curl -X PATCH "https://api.routemcp.io/api/v1/accounting/invoice/urn:xero:invoice:abc-uuid?provider=xero" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -H "X-End-User-Id: user-123" \
  -d '{ "memo": "Approved by ops" }'

Notes

  • Pass type: "ACCOUNTS_PAYABLE" on invoice create to write a bill. The same pattern applies to credit_note / vendor_credit. For vendor contacts, set is_supplier: true.
  • address and phone_number ids are discoverable inline on contact.addresses[].id and contact.phone_numbers[].id.