updateInvoice( )


Update an existing invoice.

The updateInvoice() function returns a Promise that resolves to the ID and version of the updated invoice.

Note: The customer listed on the invoice must be an existing site contact or member.

Method Declaration
Copy
Method Parameters
idIdAndVersionRequired

ID and version of the invoice to update.


invoiceFieldsInvoiceFieldsRequired

The data used to update the invoice.


fieldMaskArray<string>

Fields to update in the invoice. If not specified, all fields update.

One of:

  • "customer"
  • "lineItems"
  • "number"
  • "locale"
  • "discount"
  • "title"
  • "currency"
  • "issueDate"
  • "dueDate"
  • "taxes"
  • "totals.total"
  • "totals.subtotal"
  • "totals.subtotal"
  • "totals.fees"
  • "metadata.notes"
  • "metadata.legalTerms"
  • "metadata.sourceUrl"
  • "metadata.sourceProperties"
  • "metadata.source"
  • "metadata.sourceRefId"
Returns
Return Type:Promise<Response>
Did this help?