v2

latestSwagger 2.02026-08-04108164321.0 KB
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

FieldsToUpdatestring[] required

Required: The collection of Field Names you wish to update. Possible Values: CustomerPONumber, DateIssued, PaymentTerms, DueDate, Subject, Notes, TransactionTaxConfigCode, ExchangeRate, InvoiceTemplateIDFK, InvoiceNumber, LineItems

TransactionIDinteger required

The ID of the Invoice to update

CustomerPONumberstring

Plain UTF8 text. 100 characters max

DateIssuedstring date-time

The Date the Invoice is issued. Date should be specified as local date.

PaymentTermsinteger
DueDatestring 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.

Subjectstring

Invoice Subject in plain UTF8 text. (no HTML). 255 characters max

Notesstring

Invoice Notes in plain UTF8 text. (no HTML). Max 2000 characters

TransactionTaxConfigCodestring

Possible values are (EX --- Tax Exclusive, INC --- Tax Inclusive). If left set to null/emptystring it will use the account default.

ExchangeRatenumber 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.

InvoiceTemplateIDFKinteger

And id for an invoice template in the account. If set to Null the account default invoice template will be used.

InvoiceNumberstring

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.

SendWebhooksboolean

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

Returns the updated invoice details.

TransactionIDinteger

Unique identifier for the invoice transaction.

AccountIDFKinteger

The Avaza account this invoice belongs to.

TransactionPrefixstring

Prefix used in the invoice number (e.g. 'INV').

InvoiceNumberstring

The full invoice number including prefix.

CompanyIDFKinteger

The customer company ID this invoice is for.

CompanyNamestring

Name of the customer company.

ExternalContactUserIDFKinteger

The external contact user ID associated with this invoice.

Subjectstring

Subject line for the invoice.

DateIssuedstring date-time

Date the invoice was issued.

DateSentstring date-time

Date the invoice was sent to the customer.

DueDatestring date-time

Payment due date.

TransactionStatusCodestring

Current status. Values: Draft, Sent, Late, Paid, Partial, Void.

TaxAmountnumber double

Total tax amount across all line items.

TransactionTaxConfigCodestring

Tax configuration: 'EX' (exclusive) or 'INC' (inclusive).

Balancenumber double

Outstanding balance remaining on the invoice.

CurrencyCodestring

ISO 3-character currency code for the invoice.

TotalAmountnumber double

Total amount of the invoice including tax.

ExchangeRatenumber double

Exchange rate to the account's base currency. 1.0 if same currency.

Notesstring

Additional notes or comments on the invoice.

CustomerPONumberstring

Customer's purchase order number for reference.

DateCreatedstring date-time

Date and time the record was created.

DateUpdatedstring date-time

Date and time the record was last updated.