Summarize invoiced and paid amounts
get_revenue_summaryUse this when someone asks how much they invoiced or were paid in a period, like last month. Returns invoice and payment counts and totals in the business currency, invoices by status and a collection rate; defaults to the last 90 days, at most 366, skipping drafts and counting at most 500 documents. Not for a single invoice or customer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endDate | No | Last UTC day to include, YYYY-MM-DD, at most 366 days after startDate; defaults to today | |
| startDate | No | First UTC day to include, YYYY-MM-DD; defaults to 89 days before endDate (a 90-day window) | |
| businessId | Yes | Business id: 24 lowercase hexadecimal characters |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| currency | Yes | ISO 4217 alpha-3 business currency, or null when unset | |
| invoiceCount | Yes | ||
| paymentCount | Yes | ||
| invoicedAmount | Yes | ||
| collectedAmount | Yes | Sum of the payments recorded in the range, whatever their status; not proof of bank settlement | |
| collectionRatePercent | Yes | collectedAmount as a percentage of invoicedAmount; null when a total is incomplete or nothing was invoiced | |
| invoiceStatusBreakdown | Yes | Non-draft invoices issued in the range, per status, with count and amount. Aggregates only: invoice, payment, customer, line-item, processor, card, bank, note and identifier data are never returned. | |
| invoiceCountIsLowerBound | Yes | ||
| paymentCountIsLowerBound | Yes | ||
| invoiceAmountMissingCount | Yes | ||
| paymentAmountMissingCount | Yes |