New Order

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.

Request
Security:
header Parameters
Authorization
required
string
Default: Bearer {$$.env.access_token}
Request Body schema: application/json
required
object

Contains information about the food ordering partner that created the order.

locationId
required
string <= 50 characters

The id of the location as specified by the Tyro Connect system.

status
required
string
Default: "CREATED"

The current status of the order. When created, order status must be CREATED or ACCEPTED.

Enum: "CREATED" "ACCEPTED" "REJECTED" "BEING_PREPARED" "READY" "OUT_FOR_DELIVERY" "CANCELLED_BY_MERCHANT" "CANCELLED_BY_CUSTOMER" "FULFILLED"
notes
string

A free text field with instructions from the customer to the merchant.

required
Array of objects (Order Item)

A list of all the items in the order.

object

This object is optional, and if present will only have information about table and section.

Array of objects

The object only has a single field firstName.

Array of objects (Money Positive Amount With Description)

Each entry in the discounts array will apply to the whole order and is included in the order total value.

Array of objects (Money Positive Amount With Description)

Each entry in the surcharges array will apply to the whole order and is included in the order total value.

required
object

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.

object

This value will apply to the whole order and is included in the order total value.

required
object

Details about how the customers expect to receive the order.

paymentStatus
string
Default: "CLOSED"

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.

Responses
201

Created order

400

Bad request

401

Invalid access token

403

Insufficient permissions to create an order

post/orders
Request samples
application/json
{
  • "locationId": "tc-merchant-2000",
  • "origin": {
    },
  • "items": [
    ],
  • "discounts": [
    ],
  • "surcharges": [
    ],
  • "tip": {
    },
  • "total": {
    },
  • "table": {
    },
  • "status": "CREATED",
  • "customers": [
    ],
  • "fulfilment": {
    },
  • "paymentStatus": "CLOSED"
}
Response samples
application/json
{
  • "id": "order-identifier-in-tyro-connect",
  • "locationId": "tc-merchant-2000",
  • "origin": {
    },
  • "items": [
    ],
  • "discounts": [
    ],
  • "surcharges": [
    ],
  • "tip": {
    },
  • "total": {
    },
  • "table": {
    },
  • "status": "CREATED",
  • "customers": [
    ],
  • "fulfilment": {
    },
  • "paymentStatus": "CLOSED"
}
Copyright © Tyro Payments 2019-2024. All right reserved.