Invoice report
distru-report-invoice-historyReadInvoice report: one row per invoice with its dates, sales order, customer, payment status, money totals and tax, charge and discount summaries; no line items.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| cursor | string | No | nextCursor of the previous call; keep the other arguments unchanged. |
| batchIds | string[] | No | Resolve via distru-search-batches. |
| customerIds | string[] | No | Resolve via distru-search-companies. |
| dueDatetime | object | No | Inclusive. YYYY-MM-DD (whole days, company timezone) or ISO 8601 with a UTC offset. Setting it lifts the invoiceDatetime default; for overdue or outstanding balances filter on this alone. |
| dueDatetime. | string | No | |
| dueDatetime. | string | No | |
| invoiceDatetime | object | No | Inclusive. YYYY-MM-DD (whole days, company timezone) or ISO 8601 with a UTC offset. Defaults to the last 30 days unless dueDatetime is set. If no rows match, check when the last invoice was with distru-search-invoices (sortBy INVOICE_DATE DESC, limit 1) before concluding none were issued. |
| invoiceDatetime. | string | No | |
| invoiceDatetime. | string | No | |
| orderStatuses | enum[]PENDINGPROCESSINGREADY_TO_SHIPDELIVERINGDELIVEREDCOMPLETEDCANCELEDMERGED | No | The invoice's sales order status. |
| paid | object | No | Dollars; nothing paid counts as 0. |
| paid. | number | No | Inclusive. |
| paid. | number | No | Inclusive. |
| productIds | string[] | No | Resolve via distru-search-products. |
| search | string | No | Case-insensitive substring of invoice number. Ranks closest match first. |
| shippedFromLicenseIds | string[] | No | Sales order shipped from these licenses, or line items came from a location on one. Resolve via distru-search-licenses. |
| statuses | enum[]NOT_PAIDPARTIALLY_PAIDFULLY_PAIDOVER_PAID | No | |
| total | object | No | Grand total, in dollars. |
| total. | number | No | Inclusive. |
| total. | number | No | Inclusive. |
| voidStatus | enumNOT_VOIDEDANYVOIDED | No | Voided invoices (sales order canceled) are no longer owed. Default NOT_VOIDED. |
| maxRowsLimit | integer | No | Rows per page. Defaults to 500. |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence | Description |
|---|---|---|---|
| nextCursor | string | Can be absent | Pass as cursor to fetch the next page. Present only when meta.truncated. |
| meta | object | Always | |
| meta. | string | Always | |
| meta. | string | Always | |
| meta. | number | Always | |
| meta. | number | Always | |
| meta. | number | Always | |
| meta. | number | Always | |
| meta. | boolean | Always | |
| meta. | object[] | Always | |
| meta. | string | Always | |
| meta. | string | Always | |
| rows | object[] | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | enumFULLY_PAIDNOT_PAIDOVER_PAIDPARTIALLY_PAID | Can be null | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null | |
| rows[]. | string | Can be null | |
| rows[]. | object[] | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null |
What the AI reads
Invoice report: one row per invoice with its dates, sales order, customer, payment status, money totals and tax, charge and discount summaries; no line items. Use for invoice history, payment status, outstanding balances and receivables. For order-level totals use distru-report-sales-orders with rowsPer ORDER; for one invoice's line items and charges use distru-get-invoice. outstanding is total minus paid, negative when overpaid. A voided invoice keeps its totals and payment status but is no longer owed; voidStatus leaves them out by default. totalDiscounts is negative. The money columns are 0, never null, when nothing applies; taxSummary, chargeSummary and discountSummary are null when the invoice has none. Rows come by invoice number, highest first, unless search is set. invoiceDate and dueDate are YYYY-MM-DD in the company's timezone; the money columns are numeric strings. Returns 500 rows by default (maxRowsLimit, up to 5000). When meta.truncated is true more rows exist: repeat the call with the same filters, any date range made explicit so every page covers the same one, and cursor set to nextCursor — or narrow the filters when you need a summary rather than every row.