This is the API for Apps looking to implement Ordering on Tyro Connect
Ordering API for App Partners (1.0)
Request
This endpoint is for creating an order that Tyro Connect will deliver to a POS.
Make sure you create the order in one of the following statuses:
CREATED- the order has been created but not approved by the merchant.ACCEPTED- the order has already been approved by the merchant (eg. via a separate app available to them).
Making identical requests with the same orderId and content does not create a new order. In this case, it returns the previously created order's details. This means every new order must have a different orderId.
Contains information about the food ordering partner that created the order.
An identifier that has been generated by the origin. This can be used for reconciliation of orders in the app partner’s system.
The id of the location as specified by the Tyro Connect system.
The current status of the order. When created, order status must be CREATED or ACCEPTED.
A list of all the items in the order.
An id unique to the order, representing the item within the overall order. 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.modifiersTotal - item.discounts) * item.quantity
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'
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.
This object is optional, and if present will only have information about table and section.
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.
The order total is calculated as order.total = (item.unitPrice + item.modifiersTotal - item.discounts) * item.quantity + order.surcharges - order.discounts + order.tip. Please note that TyroConnect does not enforce this calculation to allow flexibility while creating an order.
This value will apply to the whole order and is included in the order total value.
Details about how the customers expect to receive the order.
- Productionhttps://api.tyro.com/connect/orders
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- New Order
- Order with modifiers
- Order with discounts and notes
- Order with different modifiers
curl -i -X POST \
https://api.tyro.com/connect/orders \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "tc-merchant-2000",
"origin": {
"orderId": "2f8922fb-235f-40c6-af9a-3d6b46ce9635",
"orderReference": "Order for Tom"
},
"items": [
{
"id": "unique-item-id",
"sku": "sku-known-to-the-pos",
"description": "Amazing cheese burger",
"unitPrice": {
"currency": "AUD",
"amount": 2000
},
"discounts": [
{
"currency": "AUD",
"amount": 1000,
"description": "Half price cheese burgers on the first of the month"
}
],
"modifiers": [
{
"id": "uuid-3636-101",
"sku": "634",
"description": "Bacon",
"unitPrice": {
"amount": 0
},
"quantity": 1
}
],
"allergens": [
{
"description": "Fish"
},
{
"description": "Nuts"
}
],
"quantity": 1
}
],
"discounts": [
{
"currency": "AUD",
"amount": 200,
"description": "Student discount"
}
],
"surcharges": [
{
"currency": "AUD",
"amount": 200,
"description": "Public Holiday"
},
{
"currency": "AUD",
"amount": 200,
"description": "Plastic take away containers"
}
],
"tip": {
"currency": "AUD",
"amount": 150
},
"total": {
"currency": "AUD",
"amount": 1350
},
"table": {
"id": "B1",
"section": "Bar"
},
"status": "CREATED",
"customers": [
{
"firstName": "Daniel"
},
{
"firstName": "Elizabeth"
}
],
"fulfilment": {
"type": "PICK_UP"
},
"paymentStatus": "CLOSED"
}'Created order
Contains information about the food ordering partner that created the order.
An identifier that has been generated by the origin. This can be used for reconciliation of orders in the app partner’s system.
Reference for the order. You should use it to facilitate the communication between the merchant and the eater during fulfillment by providing a short code that allows the order to be easily identifiable.
The id of the location as specified by the Tyro Connect system.
The current status of the order. When created, order status must be CREATED or ACCEPTED.
A list of all the items in the order.
An id unique to the order, representing the item within the overall order. 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.modifiersTotal - item.discounts) * item.quantity
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'
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.
This object is optional, and if present will only have information about table and section.
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.
The order total is calculated as order.total = (item.unitPrice + item.modifiersTotal - item.discounts) * item.quantity + order.surcharges - order.discounts + order.tip. Please note that TyroConnect does not enforce this calculation to allow flexibility while creating an order.
This value will apply to the whole order and is included in the order total value.
Details about how the customers expect to receive the order.
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.
{ "id": "order-identifier-in-tyro-connect", "locationId": "tc-merchant-2000", "origin": { "orderId": "2f8922fb-235f-40c6-af9a-3d6b46ce9635", "orderReference": "Order for Tom", "name": "Charlie's Preorder App" }, "items": [ { … } ], "discounts": [ { … } ], "surcharges": [ { … }, { … } ], "tip": { "currency": "AUD", "amount": 150 }, "total": { "currency": "AUD", "amount": 1350 }, "table": { "id": "B1", "section": "Bar" }, "status": "CREATED", "customers": [ { … }, { … } ], "fulfilment": { "type": "PICK_UP" }, "paymentStatus": "CLOSED" }
- Productionhttps://api.tyro.com/connect/orders/{orderId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.tyro.com/connect/orders/{orderId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'The order response
Contains information about the food ordering partner that created the order.
An identifier that has been generated by the origin. This can be used for reconciliation of orders in the app partner’s system.
Reference for the order. You should use it to facilitate the communication between the merchant and the eater during fulfillment by providing a short code that allows the order to be easily identifiable.
The id of the location as specified by the Tyro Connect system.
The current status of the order. When created, order status must be CREATED or ACCEPTED.
A list of all the items in the order.
An id unique to the order, representing the item within the overall order. 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.modifiersTotal - item.discounts) * item.quantity
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'
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.
This object is optional, and if present will only have information about table and section.
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.
The order total is calculated as order.total = (item.unitPrice + item.modifiersTotal - item.discounts) * item.quantity + order.surcharges - order.discounts + order.tip. Please note that TyroConnect does not enforce this calculation to allow flexibility while creating an order.
This value will apply to the whole order and is included in the order total value.
Details about how the customers expect to receive the order.
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.
{ "id": "order-identifier-in-tyro-connect", "locationId": "tc-merchant-2000", "origin": { "orderId": "2f8922fb-235f-40c6-af9a-3d6b46ce9635", "orderReference": "Order for Tom", "name": "Charlie's Preorder App" }, "items": [ { … } ], "discounts": [ { … } ], "surcharges": [ { … }, { … } ], "tip": { "currency": "AUD", "amount": 150 }, "total": { "currency": "AUD", "amount": 1350 }, "table": { "id": "B1", "section": "Bar" }, "status": "ACCEPTED", "customers": [ { … }, { … } ], "fulfilment": { "type": "PICK_UP" }, "paymentStatus": "CLOSED" }
Request
In order to provide more information about the status changes to the order, you can send the following statuses:
CANCELLED_BY_CUSTOMER- customer has cancelled the order.FULFILLED- The order was completed successfully.
- Productionhttps://api.tyro.com/connect/orders/{orderId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- FULFILLED
- CANCELLED_BY_CUSTOMER
curl -i -X PATCH \
'https://api.tyro.com/connect/orders/{orderId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/merge-patch+json' \
-d '{
"status": "FULFILLED"
}'