This is the API for POSes looking to implement food ordering on Tyro Connect
Food Ordering API (1.0)
Request
This endpoint is used to fetch the details of an order. It can be used when a new webhook event is received. It can also be used to fetch the order at a later date if required.
Note: For the best end user experience, we recommend to include the following fields when showing the order to the user (eg. on a docket, bump screen):
origin.name- this displays the name of the App the order originated from,origin.orderReference- this displays the order reference that allows its easy identification,customers.firstName- this displays the name of the customer.
Please keep in mind that those fields do not have restrictions on length and might need to be handled appropriately on your end to be displayed correctly to the end user.
- Productionhttps://api.tyro.com/connect/orders/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.tyro.com/connect/orders/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'The order response
This is the Tyro Connect defined location Id. It is a globally unique identifier that is used to identify a merchants individual site
Contains information about the food ordering partner that created the order.
An id that has been generated by the origin. This can be used for reconciliation of orders in the app partner's system.
A reference number provided by the app partner that allows for easy identification of an order by the restaurant staff and eaters.
The status that the order is currently in
This field provides additional information about the status of the order
Details about how the customers expect to receive the order
A list of all the items in the order.
It is unique for a given orderId and represents the item within the overall order, i.e. 2 of the same items will have unique ids.
The basic price of a single item in cents excluding discounts (if any).
Each entry in the discounts array will apply to each single item - it represents unit discounts (eg. if the quantity of this object is defined as 2 and the discounts array contains one $1 entry, each of the 2 items should be discounted by $1). item.total = (item.unitPrice - item.discounts) * item.quantity
A human readable description of the item that can be used to resolve mismatches between the app and the POS.
The number of units of this item required to fulfil the order. Please note that items with different modifiers or surcharges should be split into separate item objects.
A list of modifications to be made to the parent item. Each entry in this array will apply to each single item - it represents unit modifiers (eg. if the quantity of this object is defined as 2 and the modifiers array contains one $1 entry, each of the 2 items should be modified by $1). item.total = (item.unitPrice + item.modifiersTotal - item.discounts) * item.quantity'
This object is optional, and if present will only have information about the table identifier and the section.
Current payment status of the order. Can be either OPEN or CLOSED. OPEN payment status is only applicable for orders with fulfilment type of DINE_IN.
Each entry in the discounts array will apply to the whole order and is included in the order total value.
Each entry in the surcharges array will apply to the whole order and is included in the order total value.
This value will apply to the whole order and is included in the order total value.
The order total is calculated as order.total = (item.unitPrice - item.discounts) * item.quantity + order.surcharges - order.discounts + order.tip. Please note that TyroConnect does not enforce this calculation on the app side to allow flexibility and the provided total should always be used.
- Get Order
- Order with discounts and notes
- Order with different modifiers
{ "id": "uuid-1001", "locationId": "tc-location-1001", "origin": { "name": "UberEats", "orderId": "order-1001", "orderReference": "Order for Tom" }, "status": "ACCEPTED", "notes": "Support it, but plenty of Merchants want it disabled. This would be an app setting", "items": [ { … }, { … }, { … } ], "discounts": [ { … } ], "surcharges": [ { … }, { … } ], "total": { "amount": 3344, "currency": "AUD" }, "table": { "id": "B1" }, "customers": [ { … } ], "paymentStatus": "CLOSED", "fulfilment": { "type": "PICK_UP" } }
Request
There are two kinds of status updates that you can send to Tyro Connect to indicate how the order is progressing: mandatory status updates (that allow us to track order properly) and optional status updates (that will positively impact user experience if the connected App can handle such status update).
The mandatory status updates that you must send to indicate if the POS was able to successfully handle the order are:
ACCEPTED- POS accepted the order and it will be fulfilled.REJECTED- POS failed to handle the order and the order will not be fulfilled.READY- The order is ready to be picked up by the customer.
Orders that stay in the CREATED state for longer than two minutes will be automatically rejected and no further update is possible.
The optional status updates are:
BEING_PREPARED- order is being preparedOUT_FOR_DELIVERY- order was dispatched for delivery (where applicable)FULFILLED- The order has been picked up by the customer and is fulfilled (this will not apply if the order was dispatched for delivery).CANCELLED_BY_MERCHANT- the merchant cancelled the order and it will not be fulfilledCANCELLED_BY_CUSTOMER- customer contacted merchant and cancelled the order
- Productionhttps://api.tyro.com/connect/orders/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- ACCEPTED
- REJECTED
- READY
curl -i -X PATCH \
'https://api.tyro.com/connect/orders/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/merge-patch+json' \
-d '{
"status": "ACCEPTED"
}'