Invoice

Finds ALL currently-eligible uninvoiced records for the invoice's customer matching the filters (timesheets, expenses and/or fixed amounts), groups them per the requested grouping, appends the generated line items to the invoice and marks the source records as invoiced - one call instead of list + construct + add. Selection only ever picks eligible records, so a repeat call finds nothing and returns zero counts (safe to retry). Use PreviewUninvoicedItems first for a dry run. The invoice must not be Void.

post/api/Invoice/AddUninvoicedItems

Request body

InvoiceIDinteger required

The Transaction ID of the invoice whose customer's uninvoiced records should be selected. The invoice must not be Void.

SendWebhooksboolean

If true (add only; ignored by preview), fires invoice_updated plus timesheet_updated/expense_updated webhook events for linked records. Defaults to false.

Response

Returns the updated invoice, new line item IDs and per-type linked counts. Zero counts mean nothing matched - not an error.

AddedTransactionLineItemIDsinteger[]

The TransactionLineItemIDs of the newly created line items.

TimesheetEntriesLinkedinteger

Number of timesheet entries linked (marked invoiced).

ExpensesLinkedinteger

Number of expenses linked (marked invoiced).

FixedAmountsLinkedinteger

Number of fixed amounts linked (marked invoiced).

SkippedTimesheetEntryIDsinteger[]

Timesheet entries that matched the filters but were skipped because they have a running timer.

Warningsstring[]

Non-fatal notices (e.g. an invoice status change caused by the new total).

Changes