POST to /api.xro/2.0/CreditNotes with Type set to ACCREC (for accounts-receivable credit) and include the Contact, LineItems, and CurrencyCode matching the original invoice
Submit the credit note for approval by setting Status to AUTHORISED in the same request or via a subsequent PUT
Allocate the credit note against one or more invoices by POSTing to /api.xro/2.0/CreditNotes/{CreditNoteID}/Allocations with an array of allocation objects each containing InvoiceID and Amount
Verify the allocation by retrieving the invoice via GET /api.xro/2.0/Invoices/{InvoiceID} and checking the AmountDue has decreased accordingly
Handle partial allocations by repeating the allocation step across multiple invoices until the credit note RemainingCredit reaches zero
Known gotchas
A credit note must be AUTHORISED before allocations can be applied; attempting to allocate from a DRAFT credit note returns a validation error
The currency of the credit note and the target invoice must match; cross-currency allocations are not supported and will be rejected
Deleted or voided invoices cannot receive allocations; check the invoice Status field before attempting to apply a credit
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