---
title: "Updates an existing draft invoice. Only fields listed in the FieldsToUpdate array will be modified. When LineItems is included in FieldsToUpdate, all existing line items not present in the array are deleted."
method: PUT
path: "/api/Invoice"
tags: ["Invoice"]
---

# Updates an existing draft invoice. Only fields listed in the FieldsToUpdate array will be modified. When LineItems is included in FieldsToUpdate, all existing line items not present in the array are deleted.

`PUT /api/Invoice`

## Request body

- UpdatedInvoice — Request model for updating an existing invoice. Only fields in FieldsToUpdate are modified. When LineItems is included, existing lines not in the array are deleted.
  - `FieldsToUpdate` string[], required — Required: The collection of Field Names you wish to update. Possible Values: CustomerPONumber, DateIssued, PaymentTerms, DueDate, Subject, Notes, TransactionTaxConfigCode, ExchangeRate, InvoiceTemplateIDFK, InvoiceNumber, LineItems
  - `TransactionID` integer, required — The ID of the Invoice to update
  - `CustomerPONumber` string — Plain UTF8 text. 100 characters max
  - `DateIssued` string, date-time — The Date the Invoice is issued. Date should be specified as local date.
  - `PaymentTerms` integer
  - `DueDate` string, date-time — If the Due Date is specified then Payment Terms will be set to -1 (Custom). Otherwise DueDate will be auto calculated based on the provided IssueDate and Payment Term. Due Date must be greater than or equal to Issue Date.
  - `Subject` string — Invoice Subject in plain UTF8 text. (no HTML). 255 characters max
  - `Notes` string — Invoice Notes in plain UTF8 text. (no HTML). Max 2000 characters
  - `TransactionTaxConfigCode` string — Possible values are (EX --- Tax Exclusive, INC --- Tax Inclusive). If left set to null/emptystring it will use the account default.
  - `ExchangeRate` number, double — Exchange rate is only valid for invoices in currency other than default account currency. If not specified it will get the market rate based on the Date Issued.
  - `InvoiceTemplateIDFK` integer — And id for an invoice template in the account. If set to Null the account default invoice template will be used.
  - `InvoiceNumber` string — Pass a string or integer. If an integer is passed then the largest integer will be use as the seed to auto generate the next invoice number in the sequence.
  - `LineItems` UpdatedInvoiceLineItem[]
    - `TransactionLineItemID` integer — Optional ID of exisiting TransactionLineItem that should be retained and updated
    - `InventoryItemIDFK` integer, required — The ID of the InventoryItem this line item is linked to
    - `Description` string — Plain UTF8 text. (no HTML)
    - `Quantity` number, double, required — The quantity for the line item
    - `UnitPrice` number, double, required — The unit price for the lineitem.
    - `TaxIDFK` integer — Must match an existing Tax ID.
    - `Discount` number, double — Enter 10.5 to give a 10.5% discount
    - `ProjectIDFK` integer — Optional. Project ID of an Avaza Project that belongs to this customer, so line item is attributed to that Project for reporting.
  - `SendWebhooks` boolean — If true, fires the invoice_updated webhook event to any subscribed endpoints (and timesheet_updated for any timesheet rows whose invoice link changed). Defaults to false to preserve existing integration behaviour.

## Response `200`

Returns the updated invoice details.

- Invoice — A customer invoice including line items, status, amounts, issuer/recipient details, and web links.
  - `TransactionID` integer — Unique identifier for the invoice transaction.
  - `AccountIDFK` integer — The Avaza account this invoice belongs to.
  - `TransactionPrefix` string — Prefix used in the invoice number (e.g. 'INV').
  - `InvoiceNumber` string — The full invoice number including prefix.
  - `CompanyIDFK` integer — The customer company ID this invoice is for.
  - `CompanyName` string — Name of the customer company.
  - `ExternalContactUserIDFK` integer — The external contact user ID associated with this invoice.
  - `Subject` string — Subject line for the invoice.
  - `DateIssued` string, date-time — Date the invoice was issued.
  - `DateSent` string, date-time — Date the invoice was sent to the customer.
  - `DueDate` string, date-time — Payment due date.
  - `TransactionStatusCode` string — Current status. Values: Draft, Sent, Late, Paid, Partial, Void.
  - `TaxAmount` number, double — Total tax amount across all line items.
  - `TransactionTaxConfigCode` string — Tax configuration: 'EX' (exclusive) or 'INC' (inclusive).
  - `Balance` number, double — Outstanding balance remaining on the invoice.
  - `CurrencyCode` string — ISO 3-character currency code for the invoice.
  - `TotalAmount` number, double — Total amount of the invoice including tax.
  - `ExchangeRate` number, double — Exchange rate to the account's base currency. 1.0 if same currency.
  - `Notes` string — Additional notes or comments on the invoice.
  - `CustomerPONumber` string — Customer's purchase order number for reference.
  - `DateCreated` string, date-time — Date and time the record was created.
  - `DateUpdated` string, date-time — Date and time the record was last updated.
  - `LineItems` InvoiceLineItem[] — Line items on this invoice.
    - `TransactionLineItemID` integer — Unique identifier for the line item.
    - `InventoryItemIDFK` integer — The inventory/product item ID for this line item.
    - `InventoryItemName` string — Name of the inventory/product item.
    - `InventoryItemSKU` string — Stock Keeping Unit code for the inventory item.
    - `Description` string — Text description for the line item.
    - `Quantity` number, double — Quantity of items on this line.
    - `UnitPrice` number, double — Price per unit for this line item.
    - `TaxAmount` number, double — Calculated tax amount on this line item.
    - `TaxIDFK` integer — The tax rate ID applied to this line item.
    - `TaxCode` string — Short code for the applied tax rate.
    - `TaxName` string — Name of the applied tax rate.
    - `ProjectIDFK` integer — Optional project ID this line item is attributed to for reporting.
    - `ProjectTitle` string — Title of the associated project.
    - `Amount` number, double — Calculated line total (Quantity x UnitPrice less Discount).
    - `Discount` number, double — Discount percentage applied to this line item.
  - `Links` InvoiceLinks — URLs for client-facing view, internal view, and editing an invoice in the Avaza web application.
    - `ClientView` string — URL for the customer to view and pay the invoice online.
    - `View` string — URL for viewing the invoice in the Avaza application.
    - `Edit` string — URL for editing the invoice in the Avaza application.
  - `Issuer` IssuerDetails — Billing address and tax details for the Avaza account (the party issuing an invoice or estimate).
    - `BillingAddress` string — Formatted multi-line billing address.
    - `BillingAddressLine` string — Street address line of the billing address.
    - `BillingAddressCity` string — City/suburb of the billing address.
    - `BillingAddressState` string — State/province of the billing address.
    - `BillingAddressPostCode` string — Postal/ZIP code of the billing address.
    - `BillingCountryCode` string — ISO 3166-1 alpha-2 country code of the billing address.
    - `TaxNumber` string — Tax registration number (e.g. VAT number, ABN, EIN).
  - `Recipient` RecipientDetails — Billing address details for the customer receiving an invoice or estimate.
    - `CompanyIDFK` integer — The customer company ID.
    - `CompanyName` string — Name of the customer company.
    - `RecipientFormattedBillingAddress` string — Pre-formatted multi-line billing address for the recipient.
    - `RecipientBillingAddressLine` string — Street address line for the recipient.
    - `RecipientBillingAddressCity` string — City/suburb for the recipient.
    - `RecipientBillingAddressState` string — State/province for the recipient.
    - `RecipientBillingAddressPostCode` string — Postal/ZIP code for the recipient.
    - `RecipientBillingAddressCountryCode` string — ISO country code for the recipient.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.net/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/versions/1eeadf750514/schema)
