Skip to content

GET /api/agent/expenses/summary

AP-side mirror of /api/agent/revenue/summary. Same shape, same parameters, same reconciliation semantics. Use FIRST for any 'monthly expense burn?', 'top suppliers by spend?', 'who are we paying the most?' question - 50x token savings vs paging through /api/agent/bills. PAID values are ex-GST (cash-basis) per the bill-side line splitter.

Auth

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

Query parameters

NameTypeRequiredNotes
dateFromstringno
dateTostringno
topNintegerno

Responses

200 — Aggregate expense summary

Body: ExpensesSummaryResponse

FieldTypeRequiredNotes
asOfDatestring (date)yes
currencystringyes
windowobjectyes
grandTotalSummaryBucketyes
byStatusobjectyes
byMontharray of SummaryMonthBucketyes
topContactsarray of SummaryTopContactyes
redactedItemCountintegeryes
billingAlertBillingAlertno
xeroAlertXeroAlertno

401 — Unauthorized

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

403 — Key lacks the required scope

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

429 — Rate-limited or quota-exhausted

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.