Actions91
- Bank Account Actions
- Classification Actions
- Colleague Actions
- Contact Actions
- Customer Actions
- Customer Family Actions
- Product Actions
- Product Family Actions
- Product Image Actions
- Purchase Invoice Actions
- Receipt Actions
- Sale Credit Actions
- Sale Invoice Actions
- Sale Quote Actions
- Setting Actions
- Supplier Actions
- Unit Actions
- User Actions
- VAT Actions
- Webhook Actions
Sale Invoice → Update
AI-generatedSummary
Updates a draft sale invoice with the specified ID using a PUT request to /v1/SaleInvoices/{id}. The operation consumes the required invoice ID and optional additional fields and lines to modify the invoice draft.
Inputs
- id (required) — Invoice ID of the draft invoice to update. Type: number, default: 0.
- additionalFields — Collection of optional fields for the invoice update. Available options: customerId (number), customerOrderReference (string), date (dateTime), footerNotes (string), headerNotes (string), internalId (string), internalNotes (string), subject (string), vendorReference (string).
- lines — Fixed collection of invoice document lines. Each line can include: classificationId (number), date (dateTime), description (string), productId (number), productInternalId (string), productNumber (string), purchasePrice (number), quantity (number), taxExcludedPrice (number), taxIncludedPrice (number), type (options: Empty, New Page, Product, Service, Subtotal, Text).
Output shape
The API returns the updated sale invoice data. Exact return shape is not explicitly documented in the properties or source; described as the runtime effect of the update operation.
Request options (batching, proxy, timeout, SSL validation) are configured via the 'requestOptions' parameter and are not specific to this operation.
Examples
Example 1: Update an existing draft invoice's customer and add a single line item.
Set id to the target invoice's numeric ID. In additionalFields, set customerId to the desired customer's ID. In lines, add one line object with productId, quantity, and tax-inclusive price.