updateInvoice( )


Update an existing invoice.

The updateInvoice() function returns a Promise that resolves to the updated invoice's ID when the invoice is updated.

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>
Was this helpful?
Yes
No