This endpoint is used to send open or closed Sales to Tyro Connect. Please note, all items in a sale must be of an identical currency.
When creating a sale, please try to include all the optional fields that are available.
locationId required | string This is the Tyro Connect defined location Id. It is a globally unique identifier that is used to identify a merchants individual site |
required | object Identifiers and reference numbers that were generated by the partner. |
required | object Information about the source of the sale. |
type required | string Default: "SALE" An enum describing what kind of sale took place. |
status | string Default: "CLOSED" An enum describing the status of the sale. A closed sale cannot be opened. |
openedZonedDateTime required | string <date-time> The time the sale was opened on the partner. The format of the date time is the notation as defined by RFC 3339, section 5.6 |
closedZonedDateTime | string <date-time> The time the sale was closed on the partner. 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. |
parentSaleId | string The original sale id referencing the previous sale that was reopened. Only allowed if the status is REOPENED and it must reference an existing sale id. |
object | |
object Information about which register in the venue was used | |
required | object Details about the staff member who performed the transaction |
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. | |
bookingId | string The booking ID defined by Tyro Connect to identify a reservation |
Array of objects (Line Item) | |
Array of objects (Money Positive Amount With Description) | |
Array of objects (Money Positive Amount With Description) | |
object The total amount (in cents) of tax collected for this sale by the merchant. | |
Array of objects | |
object The total (in cents) of this sale after tax, discounts, modifiers and rounding have been applied. |
If the Sale was successfully saved on the server you will receive a 201 Created
and the created Sale.
If a Sale with the supplied origin.saleId, type and locationId already exist, and the incoming sale is different than the saved one, the server will respond with 409 Conflict
.
{- "locationId": "luna-park",
- "origin": {
- "saleId": "SaleId",
- "locationId": "POS-0000001"
}, - "source": {
- "type": "MEANDU"
}, - "type": "SALE",
- "status": "CLOSED",
- "openedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "closedZonedDateTime": "2018-05-02T08:28:13+10:00",
- "staff": {
- "id": "8675309"
}, - "bookingId": "6dca53a9-04c7-46aa-991c-cfdf51a8f652",
- "items": [
- {
- "id": "DRINK-123",
- "name": "Diet Soda",
- "sku": "1123581321",
- "unitPrice": {
- "amount": 123,
- "currency": "AUD"
}, - "unitPriceTax": {
- "amount": 123,
- "currency": "AUD"
}, - "quantity": 3,
- "tax": {
- "amount": 369,
- "currency": "AUD"
}, - "total": {
- "amount": 369,
- "currency": "AUD"
}
}
], - "payments": [
- {
- "acquirer": {
- "name": "TYRO",
- "transactionReference": "88888888-4444-4444-4444-121212121212",
- "terminalId": "57"
}, - "method": "EFTPOS",
- "type": "SALE",
- "goodsAndServicesAmount": {
- "amount": 123,
- "currency": "AUD"
}
}
], - "tax": {
- "amount": 123,
- "currency": "AUD"
}, - "total": {
- "amount": 369,
- "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"
}
}