v1

latestOpenAPI 3.0.1Apache 2.02026-07-26193304444.4 KB
Sales

Update a sale

Update an existing sale by ID.

🔒 Requires: sales:write scope

put/sales/{sale_id}

Path parameters

sale_idstring uuid required

A valid sale ID.

Request body

accounts_transaction_idstring

Xero invoice reference ID. Only editable for ONACCOUNT sales.

attributesstring[]

An array of attributes

customer_idstring uuid

The ID of the customer associated with this sale.

datestring

The date of the sale in RFC3339 format. If not provided will be added as the time the sale reached the server.

fulfillment_outlet_idstring uuid

The default outlet that should fulfill this sale when a line item does not specify its own fulfilment_outlet_id. Mutually exclusive with pick lists created via /sales/{sale_id}/pick_lists.

invoice_numberstring

The invoice number for the sale. If left null it will be populated by Lightspeed with the next available invoice number.

notestring

A note on the sale entered by the cashier.

short_codestring

Short, unique code to be printed on the receipt for loyalty tracking purposes.

state'parked' | 'pending' | 'voided' | 'closed' required

State of the sale.

Example request

{
  "attributes": [
    "onaccount"
  ],
  "date": "2009-11-10T23:00:00Z",
  "state": "closed"
}

Response

The updated sale.