This is the API for POS's looking to implement sales data on Tyro Connect
Sales Data API (1.1)
Request
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.
This is the Tyro Connect defined location Id. It is a globally unique identifier that is used to identify a merchants individual site
Identifiers and reference numbers that were generated by the partner.
Information about the source of the sale.
An enum describing what kind of sale took place.
An enum describing the status of the sale. A closed sale cannot be opened.
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
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.
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.
Details about the staff member who performed the transaction
The total amount (in cents) of tax collected for this sale by the merchant.
- Productionhttps://api.tyro.com/connect/sales
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- Example Sale
- Combination Sale
curl -i -X POST \
https://api.tyro.com/connect/sales \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"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"
}
}'If the Sale was successfully saved on the server you will receive a 201 Created and the created Sale.
The current version of the Sale. The most update to date version needs to be provided when making updates.
This is the Tyro Connect defined location Id. It is a globally unique identifier that is used to identify a merchants individual site
Identifiers and reference numbers that were generated by the partner.
Information about the source of the sale.
An enum describing what kind of sale took place.
An enum describing the status of the sale. A closed sale cannot be opened.
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
The time the sale was closed on the partner. The format of the date time is the notation as defined by RFC 3339, section 5.6
Details about the staff member who performed the transaction
The total amount (in cents) of tax collected for this sale by the merchant.
The total (in cents) of this sale after tax, discounts, modifiers and rounding have been applied.
{ "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": [ { … } ], "discounts": [ { … } ], "surcharges": [ { … } ], "tax": { "amount": 12520, "currency": "AUD" }, "payments": [ { … } ], "total": { "amount": 12520, "currency": "AUD" }, "subtotal": { "amount": 12520, "currency": "AUD" } }
- Productionhttps://api.tyro.com/connect/sales/{saleId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.tyro.com/connect/sales/{saleId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'The sales response
The current version of the Sale. The most update to date version needs to be provided when making updates.
This is the Tyro Connect defined location Id. It is a globally unique identifier that is used to identify a merchants individual site
Identifiers and reference numbers that were generated by the partner.
Information about the source of the sale.
An enum describing what kind of sale took place.
An enum describing the status of the sale. A closed sale cannot be opened.
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
The time the sale was closed on the partner. The format of the date time is the notation as defined by RFC 3339, section 5.6
Details about the staff member who performed the transaction
The total amount (in cents) of tax collected for this sale by the merchant.
The total (in cents) of this sale after tax, discounts, modifiers and rounding have been applied.
- Example Sale
- Combination Sale
{ "version": 69, "locationId": "luna-park", "origin": { "saleId": "SaleId" }, "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": [ { … } ], "payments": [ { … } ], "tax": { "amount": 123, "currency": "AUD" }, "total": { "amount": 369, "currency": "AUD" }, "table": { "seats": 1, "number": "11" }, "subtotal": { "amount": 369, "currency": "AUD" } }
Request
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.
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.
An enum describing the status of the sale. Once the sale has been closed, it cannot be reopened.
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.
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.
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.
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.
The total amount (in cents) of tax collected for this sale by the merchant. This must be updated when the total changes.
Provide all existing & new payments to be applied to the sale. Existing payments cannot be removed.
- Productionhttps://api.tyro.com/connect/sales/{saleId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
'https://api.tyro.com/connect/sales/{saleId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"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"
}
}'If the Sale was successfully updated on the server you will receive a 200 OK and the updated Sale with a new version.
The current version of the Sale. The most update to date version needs to be provided when making updates.
This is the Tyro Connect defined location Id. It is a globally unique identifier that is used to identify a merchants individual site
Identifiers and reference numbers that were generated by the partner.
Information about the source of the sale.
An enum describing what kind of sale took place.
An enum describing the status of the sale. A closed sale cannot be opened.
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
The time the sale was closed on the partner. The format of the date time is the notation as defined by RFC 3339, section 5.6
Details about the staff member who performed the transaction
The total amount (in cents) of tax collected for this sale by the merchant.
The total (in cents) of this sale after tax, discounts, modifiers and rounding have been applied.
{ "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": [ { … } ], "discounts": [ { … } ], "surcharges": [ { … } ], "tax": { "amount": 12520, "currency": "AUD" }, "payments": [ { … } ], "total": { "amount": 12520, "currency": "AUD" }, "subtotal": { "amount": 12520, "currency": "AUD" } }