This endpoint is used to updates Sales. Please note, updates with the same contents are ignored and all items in a sale must be of an identical currency.
version required | number Represents the last read version of the sale returned by the GET request. If this version is out of date, the request will fail with a 412. Get the latest sale and merge it with the values from this request, then retry with the latest version. |
status | string Default: "CLOSED" An enum describing the status of the sale. Once the sale has been closed, it cannot be reopened. |
closedZonedDateTime | string <date-time> The time the sale was closed on the POS. closedZonedDateTime is required when the status is CLOSED otherwise optional. The format of the date time is the notation as defined by RFC 3339, section 5.6. |
object Details about the staff member from the POS | |
object The section within the venue where the sale took place. | |
object Optional information about the table where in the venue the sale took place. | |
Array of objects (Line Item) Provide existing & new item to be applied to the sale. The update will do a complete array replacement so any items not provided in this request will be removed. | |
Array of objects (Money Positive Amount With Description) Provide existing & new discounts to be applied to the sale. The update will do a complete array replacement so any discounts not provided in this request will be removed. | |
Array of objects (Money Positive Amount With Description) Provide existing & new surcharges to be applied to the sale. The update will do a complete array replacement so any surcharges not provided in this request will be removed. | |
object The total amount (in cents) of tax collected for this sale by the merchant. This must be updated when the total changes. | |
Array of objects Provide all existing & new payments to be applied to the sale. Existing payments cannot be removed. | |
object The total (in cents) of this sale. This must be updated when items, discounts or surcharges are added. It is expected to calculate to: sum(items[].total) - discounts + surcharges |
If the Sale was successfully updated on the server you will receive a 200 OK
and the updated Sale with a new version.
The provided version is outdated. This indicates that another process has made updates to the same Sale. Get the latest sale object and retry with the latest version.
{- "version": 0,
- "status": "CLOSED",
- "closedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "staff": {
- "id": "string"
}, - "section": {
- "id": "string",
- "name": "string"
}, - "table": {
- "number": "MAIN-33",
- "seats": 0
}, - "items": [
- {
- "id": "string",
- "name": "string",
- "category": "string",
- "description": "string",
- "sku": "string",
- "barcode": "string",
- "modifiers": [
- { }
], - "unitPrice": {
- "amount": 12520,
- "currency": "AUD"
}, - "unitPriceTax": {
- "amount": 12520,
- "currency": "AUD"
}, - "unitCost": {
- "amount": 12520,
- "currency": "AUD"
}, - "unitCostTax": {
- "amount": 12520,
- "currency": "AUD"
}, - "discounts": [
- {
- "amount": 12520,
- "currency": "AUD",
- "description": "Tuesday Happy Hour Discount"
}
], - "sale": {
- "type": "SALE"
}, - "surcharges": [
- {
- "amount": 12520,
- "currency": "AUD",
- "description": "Tuesday Happy Hour Discount"
}
], - "quantity": 0,
- "tax": {
- "amount": 12520,
- "currency": "AUD"
}, - "total": {
- "amount": 12520,
- "currency": "AUD"
}, - "hidden": true
}
], - "discounts": [
- {
- "amount": 12520,
- "currency": "AUD",
- "description": "Tuesday Happy Hour Discount"
}
], - "surcharges": [
- {
- "amount": 12520,
- "currency": "AUD",
- "description": "Tuesday Happy Hour Discount"
}
], - "tax": {
- "amount": 12520,
- "currency": "AUD"
}, - "payments": [
- {
- "acquirer": {
- "name": "TYRO",
- "transactionReference": "string",
- "terminalId": "string"
}, - "method": "EFTPOS",
- "type": "SALE",
- "goodsAndServicesAmount": {
- "amount": 12520,
- "currency": "AUD"
}, - "tipAmount": {
- "amount": 12520,
- "currency": "AUD"
}, - "cashoutAmount": {
- "amount": 12520,
- "currency": "AUD"
}, - "surchargeAmount": {
- "amount": 12520,
- "currency": "AUD"
}, - "items": [
- {
- "itemId": "string",
- "total": {
- "amount": 12520,
- "currency": "AUD"
}
}
]
}
], - "total": {
- "amount": 12520,
- "currency": "AUD"
}
}
{- "id": "string",
- "version": 0,
- "locationId": "string",
- "origin": {
- "saleId": "string",
- "locationId": "string"
}, - "source": {
- "type": "DELIVEROO",
- "other": "string"
}, - "type": "SALE",
- "status": "CLOSED",
- "openedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "closedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "parentSaleId": "string",
- "customer": {
- "id": "string"
}, - "register": {
- "id": "string",
- "name": "string"
}, - "staff": {
- "id": "string"
}, - "section": {
- "id": "string",
- "name": "string"
}, - "table": {
- "number": "MAIN-33",
- "seats": 0
}, - "bookingId": "string",
- "items": [
- {
- "id": "string",
- "name": "string",
- "category": "string",
- "description": "string",
- "sku": "string",
- "barcode": "string",
- "modifiers": [
- { }
], - "unitPrice": {
- "amount": 12520,
- "currency": "AUD"
}, - "unitPriceTax": {
- "amount": 12520,
- "currency": "AUD"
}, - "unitCost": {
- "amount": 12520,
- "currency": "AUD"
}, - "unitCostTax": {
- "amount": 12520,
- "currency": "AUD"
}, - "discounts": [
- {
- "amount": 12520,
- "currency": "AUD",
- "description": "Tuesday Happy Hour Discount"
}
], - "sale": {
- "type": "SALE"
}, - "surcharges": [
- {
- "amount": 12520,
- "currency": "AUD",
- "description": "Tuesday Happy Hour Discount"
}
], - "quantity": 0,
- "tax": {
- "amount": 12520,
- "currency": "AUD"
}, - "total": {
- "amount": 12520,
- "currency": "AUD"
}, - "hidden": true
}
], - "discounts": [
- {
- "amount": 12520,
- "currency": "AUD",
- "description": "Tuesday Happy Hour Discount"
}
], - "surcharges": [
- {
- "amount": 12520,
- "currency": "AUD",
- "description": "Tuesday Happy Hour Discount"
}
], - "tax": {
- "amount": 12520,
- "currency": "AUD"
}, - "payments": [
- {
- "acquirer": {
- "name": "TYRO",
- "transactionReference": "string",
- "terminalId": "string"
}, - "method": "EFTPOS",
- "type": "COMBINATION",
- "goodsAndServicesAmount": {
- "amount": 12520,
- "currency": "AUD"
}, - "tipAmount": {
- "amount": 12520,
- "currency": "AUD"
}, - "cashoutAmount": {
- "amount": 12520,
- "currency": "AUD"
}, - "surchargeAmount": {
- "amount": 12520,
- "currency": "AUD"
}, - "items": [
- {
- "itemId": "string",
- "total": {
- "amount": 12520,
- "currency": "AUD"
}
}
]
}
], - "total": {
- "amount": 12520,
- "currency": "AUD"
}, - "subtotal": {
- "amount": 12520,
- "currency": "AUD"
}
}