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.
The order response
curl -i -X GET \ 'https://api.tyro.com/connect/orders/{id}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "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": [
- {
- "id": "uuid-101",
- "sku": "101",
- "description": "Chicken Burger",
- "modifiers": [
- {
- "id": "uuid-3636-101",
- "sku": "634",
- "description": "Cheese",
- "quantity": 1,
- "unitPrice": {
- "amount": 0,
- "currency": "AUD"
}
}, - {
- "id": "uuid-3636-202",
- "sku": "699",
- "description": "Bacon",
- "quantity": 1,
- "unitPrice": {
- "amount": 200,
- "currency": "AUD"
}, - "discounts": [
- {
- "amount": 100,
- "currency": "AUD",
- "description": "Half Price Bacon Day"
}
]
}, - {
- "id": "uuid-3636-303",
- "sku": "673",
- "description": "No Tomato",
- "quantity": 1,
- "unitPrice": {
- "amount": 0,
- "currency": "AUD"
}
}
], - "quantity": 2,
- "unitPrice": {
- "amount": 1500,
- "currency": "AUD"
}, - "discounts": [
- {
- "amount": 150,
- "currency": "AUD",
- "description": "10% Off Burgers on Tuesday"
}
]
}, - {
- "id": "uuid-202",
- "sku": "213",
- "description": "Large Fries",
- "quantity": 1,
- "unitPrice": {
- "amount": 450,
- "currency": "AUD"
}, - "discounts": [
- {
- "amount": 100,
- "currency": "AUD",
- "description": "Combo Price"
}
]
}, - {
- "id": "uuid-303",
- "sku": "5343",
- "description": "Small Cola",
- "quantity": 1,
- "unitPrice": {
- "amount": 250,
- "currency": "AUD"
}
}
], - "discounts": [
- {
- "amount": 836,
- "currency": "AUD",
- "description": "20% Loyalty Reward"
}
], - "surcharges": [
- {
- "amount": 380,
- "currency": "AUD",
- "description": "Public Holiday"
}, - {
- "amount": 300,
- "currency": "AUD",
- "description": "Corkage"
}
], - "total": {
- "amount": 3344,
- "currency": "AUD"
}, - "table": {
- "id": "B1"
}, - "customers": [
- {
- "firstName": "Daniel"
}
], - "paymentStatus": "CLOSED",
- "fulfilment": {
- "type": "PICK_UP"
}
}