Update sales invoice

Beta feature

This feature is currently in beta testing, and the final specification may still change.

Certain details of an existing sales invoice can be updated. For draft it is all values listed below, but for statuses paid and issued there are certain additional requirements (paymentDetails and emailDetails, respectively).

Access with

API key

Organization access token with sales-invoices.write

OAuth access with sales-invoices.write

Path Params
string
required

Provide the ID of the related sales invoice.

Body Params
boolean

Whether the entity was created in test mode or live mode. This field does not update the mode of the entity.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true.

string

The status for the invoice to end up in.

Dependent parameters: paymentDetails for paid, emailDetails for issued and paid.

Possible values: draft issued paid

string | null

A free-form memo you can set on the invoice, and will be shown on the invoice PDF.

string | null

The payment term to be set on the invoice.

Possible values: 7 days 14 days 30 days 45 days 60 days 90 days 120 days (default: 30 days)

paymentDetails
object

Used when setting an invoice to status of paid, and will store a payment that fully pays the invoice with the provided details. Required for paid status.

emailDetails
object | null

Used when setting an invoice to status of either issued or paid. Will be used to issue the invoice to the recipient with the provided subject and body. Required for issued status.

string

An identifier tied to the recipient data. This should be a unique value based on data your system contains, so that both you and us know who we're referring to. It is a value you provide to us so that recipient management is not required to send a first invoice to a recipient.

recipient
object | null

The recipient object should contain all the information relevant to create an invoice for an intended recipient. This data will be stored, updated, and re-used as appropriate, based on the recipientIdentifier.

lines
array of objects | null

Provide the line items for the invoice. Each line contains details such as a description of the item ordered and its price.

All lines must have the same currency as the invoice.

lines
discount
object | null

The discount to be applied to the entire invoice, possibly on top of the line item discounts.

boolean

This indicates whether the invoice is an e-invoice. The default value is false and can't be changed after the invoice has been issued.

When emailDetails is provided, an additional email is sent to the recipient.

Responses

Language
Credentials
Request
Response
Choose an example:
application/hal+json