Authenticate with the accounting scope and set the xero-tenant-id header to the target organisation
Call GET /api.xro/2.0/Reports/AgedPayablesByContact with optional query parameters date (report as-of date) and contactID to filter by supplier, to retrieve amounts owed to each supplier broken down by age bucket
Call GET /api.xro/2.0/Reports/AgedReceivablesByContact with the same optional parameters to retrieve customer balances outstanding by age bucket
Parse the nested Rows response structure; Column headers describe the age buckets (Current, 1-30 days, 31-60 days, 61-90 days, Older) and each Row cell contains the amount for that contact and bucket
Export the parsed data for use in cash flow forecasting or collections workflow tooling
Known gotchas
These are display-oriented report endpoints; they do not support server-side sorting or filtering beyond the date and contactID parameters — all grouping and sorting must be done client-side
The date parameter defaults to today if omitted; to produce a historical aged report (e.g., for audit purposes) always explicitly pass the as-of date
Contact names in the report rows may differ from those in the Contacts API if a contact was renamed after invoices were created; cross-reference by contactID, not by display name
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp