Skip to content

GET /api/agent/credit-notes

Returns AR credit notes (Xero ACCRECCREDIT) for the caller's org — the documents /api/agent/invoices does NOT include. Use this to verify a claimed customer credit (CN-####): its existence, holder, balance (remainingCredit), and how much has been applied (allocatedAmount). Filterable by Xero status (raw string match), contactId, and issue-date range. Same pagination/totals/redaction semantics as /api/agent/invoices (cursor + nextCursor, ?autoPaginate=true 5,000-row cap with truncated, ?totals=true aggregate block, totalCount, sensitive-contact drop with redactedItemCount). Coverage: ACTIVE credits only (AUTHORISED with remaining > 0) — fully-applied/voided credits are not synced.

Auth

  • Required scope: READ_INVOICES
  • Header: Authorization: Bearer cr_live_<prefix>_<secret>

Query parameters

NameTypeRequiredNotes
statusstringnoComma-separated raw Xero credit-note statuses (e.g. AUTHORISED). Direct string match.
contactIdstringno
dateFromstringnoInclusive issue-date lower bound (YYYY-MM-DD).
dateTostringnoInclusive issue-date upper bound (YYYY-MM-DD).
cursorstringno
limitintegerno
autoPaginatebooleanno
totalsbooleanno

Responses

200 — Matching AR credit notes.

Body: CreditNotesResponse

FieldTypeRequiredNotes
creditNotesarray of CreditNoteyes
nextCursorstringyes
totalCountintegeryes
redactedItemCountintegeryes
truncatedbooleanno
totalsInvoiceBillTotalsno
totalsTruncatedbooleanno
billingAlertBillingAlertno
xeroAlertXeroAlertno

401 — Unauthorized

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

Response headers

Every successful response carries X-CashRunway-Subscription, X-CashRunway-Plan, X-CashRunway-Quota-Remaining, and X-CashRunway-Quota-Reset. Trialing subscriptions also include X-CashRunway-Trial-Days-Remaining. See the overview for details.

Released under a proprietary license.