Create and apply Xero tracking categories to invoices and run segmented P&L reports

domain: developer.xero.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a TrackingCategory via POST to the TrackingCategories endpoint with a name and Status of ACTIVE
  2. Add TrackingOptions (sub-values) to the category by POSTing to the TrackingCategories options sub-resource
  3. When creating or updating an Invoice, include a Tracking array on each LineItem referencing the TrackingCategory name and TrackingOption name
  4. Query the ProfitAndLoss report endpoint with trackingCategoryID and trackingOptionID parameters to retrieve a segmented financial view
  5. For bulk re-categorization, update existing invoices using the PUT batch endpoint, patching only the Tracking field on affected lines
  6. Archive obsolete TrackingOptions by updating their Status to ARCHIVED to prevent new assignments while preserving historical data

Known gotchas

Related routes

Use Xero tracking categories for divisional and branch reporting via API
developer.xero.com · 6 steps · unrated
Attach files to Xero invoices using the Files API and manage invoice-level attachments
developer.xero.com · 6 steps · unrated
Create and manage Xero Repeating Invoices via the Accounting API
developer.xero.com · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans