---
title: "DRY RUN: computes the line items that AddUninvoicedItems would create for the given filters - quantities, blended rates, converted expense amounts with markup, generated descriptions, taxes, and the source record IDs each line covers - WITHOUT saving anything or marking any record as invoiced. Use it to answer \"what is ready to bill onto this invoice?\" and to confirm with a person before calling AddUninvoicedItems."
method: POST
path: "/api/Invoice/PreviewUninvoicedItems"
tags: ["Invoice"]
---

# DRY RUN: computes the line items that AddUninvoicedItems would create for the given filters - quantities, blended rates, converted expense amounts with markup, generated descriptions, taxes, and the source record IDs each line covers - WITHOUT saving anything or marking any record as invoiced. Use it to answer "what is ready to bill onto this invoice?" and to confirm with a person before calling AddUninvoicedItems.

`POST /api/Invoice/PreviewUninvoicedItems`

## Request body

- UninvoicedItemsRequest — Request for previewing or adding ALL matching uninvoiced records to an invoice in one call. At least one of Time / Expenses / FixedAmounts must be provided; a present section opts that record type in. Only currently-eligible records are selected, so the operation is naturally idempotent - a repeat call selects nothing.
  - `InvoiceID` integer, required — The Transaction ID of the invoice whose customer's uninvoiced records should be selected. The invoice must not be Void.
  - `Time` UninvoicedTimeFilter — Filters for selecting uninvoiced timesheet entries. Only billable, Approved/AutoApproved, not-yet-invoiced entries of the invoice's customer are ever selected; entries with a running timer are skipped and reported.
    - `ProjectIDs` integer[] — Project IDs to pull uninvoiced time from. When omitted, all billable projects of the invoice's customer are included.
    - `UserIDs` integer[] — Optional. Only include time logged by these user IDs.
    - `TaskIDs` integer[] — Optional. Only include time logged against these task IDs.
    - `CategoryIDs` integer[] — Optional. Only include time in these timesheet category IDs.
    - `DateFrom` string, date-time — Optional. Only include entries on or after this date.
    - `DateTo` string, date-time — Optional. Only include entries on or before this date.
    - `Grouping` string — How to group entries into line items: NoGrouping (one line per entry), GroupByProject, GroupByProjectCategory, GroupByProjectUser, GroupByProjectSection or GroupByProjectTask. Grouped lines get the total duration and a blended rate. Default NoGrouping.
    - `IncludeProjectName` boolean — Include the project name in generated descriptions. Default true.
    - `IncludeCategory` boolean — Include the timesheet category in generated descriptions. Default true.
    - `IncludeTask` boolean — Include the task title in generated descriptions. Default true.
    - `IncludeStartEndTime` boolean — Include start/end times in generated descriptions (entries with start/end times only). Default true.
    - `IncludeDate` boolean — Include the entry date in generated descriptions. Default true.
    - `IncludePerson` boolean — Include the person's name in generated descriptions. Default true.
    - `IncludeNotes` boolean — Include entry notes in generated descriptions. Default true.
  - `Expenses` UninvoicedExpenseFilter — Filters for selecting uninvoiced chargeable expenses. Only Approved/AutoApproved, chargeable, not-yet-invoiced expenses of the invoice's customer are ever selected.
    - `ProjectIDs` integer[] — Project IDs to pull uninvoiced expenses from. When omitted, all of the customer's uninvoiced chargeable expenses are included (with or without a project).
    - `UserIDs` integer[] — Optional. Only include expenses submitted by these user IDs.
    - `DateFrom` string, date-time — Optional. Only include expenses dated on or after this date.
    - `DateTo` string, date-time — Optional. Only include expenses dated on or before this date.
    - `Grouping` string — How to group expenses into line items: NoGrouping (one line per expense) or GroupByExpenseCategory (one line per project + category + tax). Default NoGrouping.
    - `IncludeProjectName` boolean — Include the project name in generated descriptions. Default true.
    - `IncludeCategory` boolean — Include the expense category in generated descriptions. Default true.
    - `IncludeDate` boolean — Include the expense date in generated descriptions. Default true.
    - `IncludePerson` boolean — Include the person's name in generated descriptions. Default true.
    - `IncludeTripName` boolean — Include the expense report (trip) name in generated descriptions. Default false.
    - `IncludeNotes` boolean — Include expense notes in generated descriptions. Default true.
  - `FixedAmounts` UninvoicedFixedAmountFilter — Filters for selecting uninvoiced fixed amounts. Each fixed amount always becomes its own line item.
    - `ProjectIDs` integer[] — Project IDs to pull uninvoiced fixed amounts from. When omitted, all projects of the invoice's customer are included.
    - `OnlyCompletedTasks` boolean — When true, only fixed amounts on completed tasks are included. Default false.
    - `IncludeProjectName` boolean — Include the project name in generated descriptions. Default true.
    - `IncludeTask` boolean — Include the task title in generated descriptions. Default true.
    - `IncludeAssignedUser` boolean — Include the task's assigned users in generated descriptions. Default true.
    - `IncludeNotes` boolean — Include fixed amount notes in generated descriptions. Default true.
  - `ExpenseExchangeRates` ExpenseExchangeRate[] — Optional exchange-rate overrides for expenses in a currency different from the invoice currency.
    - `CurrencyCode` string, required — ISO standard 3 character currency code of the expense currency.
    - `Rate` number, double, required — The rate that converts 1 unit of the expense currency into the invoice currency. Must be greater than zero.
  - `SendWebhooks` boolean — If true (add only; ignored by preview), fires invoice_updated plus timesheet_updated/expense_updated webhook events for linked records. Defaults to false.

## Response `200`

Returns the computed line items and totals. An empty LineItems list means nothing is currently ready to bill for the filters.

- PreviewUninvoicedItemsResult — Result of previewing uninvoiced records for an invoice. Nothing is saved by a preview.
  - `LineItems` PreviewLineItem[] — The line items that AddUninvoicedItems would create for the same request.
    - `SourceType` string — The type of source records this line invoices: Timesheet, Expense or FixedAmount.
    - `Description` string — The generated line description.
    - `Quantity` number, double — The calculated quantity (e.g. total hours).
    - `UnitPrice` number, double — The calculated unit price (blended rate / converted amount including markup / fixed amount).
    - `Amount` number, double — The calculated line total.
    - `TaxAmount` number, double — The calculated tax amount.
    - `TaxIDFK` integer — The derived tax for the line.
    - `InventoryItemIDFK` integer — The derived inventory item for the line.
    - `ProjectIDFK` integer — The project the line is attributed to, if any.
    - `TimesheetEntryIDs` integer[] — Timesheet entries covered by this line.
    - `ExpenseIDs` integer[] — Expenses covered by this line.
    - `FixedAmountIDs` integer[] — Fixed amounts covered by this line.
  - `SubtotalAmount` number, double — Sum of the previewed line amounts.
  - `TaxAmount` number, double — Sum of the previewed line tax amounts.
  - `TotalAmount` number, double — The total the previewed lines would add to the invoice.
  - `SkippedTimesheetEntryIDs` integer[] — Timesheet entries that matched the filters but were skipped because they have a running timer.
  - `Warnings` string[] — Non-fatal notices about the preview.

## Other responses

- `400` — The request or filters are invalid; nothing was computed.
- `404` — No invoice with that ID exists.

## Changes

- **2026-08-30** `e99843f3c878` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/avaza/apis/avaza-api-documentation/changes/api/Invoice/PreviewUninvoicedItems/post.md)

---

[API](https://skmtc.dev/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.dev/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/revisions/e99843f3c878/schema)
