Skip to main content
POST
/
order
Create a new order
curl --request POST \
  --url https://api.example.com/order \
  --header 'Content-Type: application/json' \
  --data '
{
  "locationId": "loc_123",
  "items": [
    {
      "productName": "Margherita Pizza",
      "price": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "quantity": 1,
      "productInternalId": "prod_123",
      "productRef": "PIZZA_LARGE",
      "customerNotes": "Without onions please",
      "options": [
        {
          "name": "Extra Cheese",
          "optionListName": "Toppings",
          "optionListInternalId": "opt_list_123",
          "optionInternalId": "opt_123",
          "quantity": 1,
          "ref": "EXTRA_CHEESE",
          "price": {
            "amount": 0,
            "currency": "CHF"
          }
        }
      ]
    }
  ],
  "customerId": "cust_123",
  "serviceType": "delivery",
  "channel": "whatsapp",
  "ref": "WA_ORDER_123",
  "expectedTime": "2025-03-26T14:30:00Z",
  "customerNotes": "Please ring the doorbell",
  "deliveryAddress": {
    "address": "123 Main St",
    "address2": "Apt 1",
    "postalCode": "12345",
    "city": "New York",
    "country": "United States",
    "latitude": 40.7128,
    "longitude": -74.006
  },
  "discounts": [
    {
      "name": "Summer Sale",
      "priceOff": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "ref": "SUMMER_2024"
    }
  ],
  "charges": [
    {
      "name": "Delivery Fee",
      "price": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "ref": "DELIVERY_FEE"
    }
  ],
  "payments": [
    {
      "externalId": "pay_123",
      "status": "processing",
      "type": "stripe",
      "orderId": "order_123",
      "amount": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "paymentMethodId": "method_123"
    }
  ],
  "status": "accepted"
}
'
{
  "id": "order_123",
  "createdAt": "2024-03-15T14:00:00Z",
  "shortId": "ABC123",
  "status": "new",
  "updatedAt": "2024-03-15T14:30:00Z",
  "serviceType": "delivery",
  "channel": "whatsapp",
  "ref": "WA_ORDER_123",
  "expectedTime": "2024-03-15T14:30:00Z",
  "confirmedTime": "2024-03-15T14:30:00Z",
  "customerNotes": "Please ring the doorbell",
  "collectionCode": "1234",
  "deliveryAddress": {
    "address": "123 Main St",
    "address2": "Apt 1",
    "postalCode": "12345",
    "city": "New York",
    "country": "United States",
    "latitude": 40.7128,
    "longitude": -74.006
  },
  "total": {
    "amount": 995,
    "currency": "CHF",
    "formatted": "CHF 9.95"
  },
  "items": [
    {
      "id": "item_123",
      "productName": "Margherita Pizza",
      "price": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "quantity": 1,
      "productInternalId": "prod_123",
      "skuName": "Large",
      "skuRef": "PIZZA_LARGE",
      "skuInternalId": "sku_123",
      "customerNotes": "Extra crispy",
      "options": [
        {
          "id": "opt_123",
          "name": "Extra Cheese",
          "optionListName": "Toppings",
          "optionListInternalId": "opt_list_123",
          "optionInternalId": "opt_123",
          "quantity": 1,
          "ref": "EXTRA_CHEESE",
          "price": {
            "amount": 995,
            "currency": "CHF",
            "formatted": "CHF 9.95"
          }
        }
      ]
    }
  ],
  "deals": [
    {
      "id": "deal_123",
      "name": "Combo Menu",
      "price": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "skus": [
        {
          "id": "sku_123",
          "name": "Medium Fries",
          "quantity": 1,
          "price": {
            "amount": 995,
            "currency": "CHF",
            "formatted": "CHF 9.95"
          },
          "ref": "FRIES_M",
          "options": [
            {
              "id": "opt_123",
              "name": "Extra Cheese",
              "price": {
                "amount": 995,
                "currency": "CHF",
                "formatted": "CHF 9.95"
              },
              "optionListName": "Toppings",
              "quantity": 1
            }
          ]
        }
      ],
      "ref": "COMBO_1"
    }
  ],
  "discounts": [
    {
      "id": "disc_123",
      "name": "Summer Sale",
      "priceOff": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "ref": "SUMMER_2024"
    }
  ],
  "charges": [
    {
      "id": "charge_123",
      "name": "Delivery Fee",
      "price": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "ref": "DELIVERY_FEE"
    }
  ],
  "payments": [
    {
      "id": "pay_123",
      "externalId": "pay_123",
      "amount": {
        "amount": 995,
        "currency": "CHF",
        "formatted": "CHF 9.95"
      },
      "status": "processing",
      "type": "stripe",
      "orderId": "order_123",
      "paymentMethodId": "method_123"
    }
  ],
  "customer": {
    "id": "cust_123",
    "createdAt": "2024-03-15T14:00:00Z",
    "paymentMethods": [
      {
        "id": "pm_123",
        "type": "card",
        "last4": "4242",
        "isActive": true,
        "customerId": "cust_123"
      }
    ],
    "locationIds": [
      "loc_123",
      "loc_456"
    ],
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phone": "+41791234567",
    "whatsappNumber": "+41791234567",
    "stripeId": "cus_123",
    "address": {
      "address": "123 Main St",
      "address2": "Apt 1",
      "postalCode": "12345",
      "city": "New York",
      "country": "United States",
      "latitude": 40.7128,
      "longitude": -74.006
    },
    "orders": [
      "<string>"
    ]
  }
}

Body

application/json
locationId
string
required

The id of the location where the order is being created

Example:

"loc_123"

items
object[]
required

Items of the order. An order must have at least one item.

customerId
string

The id of the customer associated with the order.

Example:

"cust_123"

serviceType
enum<string>
default:delivery

The delivery type of the order. An order can be delivered, collected at the restaurant to go or eaten in the restaurant

Available options:
delivery,
collection,
eat_in
Example:

"delivery"

channel
enum<string>
default:pos

The channel through which the order is being created

Available options:
pos,
whatsapp,
uberEats,
justEat,
deliveroo
Example:

"whatsapp"

ref
string

an external reference for the order. Can be used to identify the order in an external system such as a POS system

Example:

"WA_ORDER_123"

expectedTime
string<date-time>

Time at which the order is expected to be ready for collection / delivered depending on the service type

Example:

"2025-03-26T14:30:00Z"

customerNotes
string

Customer notes about the order in general

Example:

"Please ring the doorbell"

deliveryAddress
object

The delivery address for this order. You can provide an address or coordinates

discounts
object[]

Discounts applied to the order. An order can have multiple discounts.

charges
object[]

Charges applied to the order. An order can have multiple charges.

payments
object[]

Payments applied to the order. An order can have multiple payments.

status
enum<string>
default:new

Status of the order. The status is used to track the order and is automatically updated by the system.

Available options:
received,
in_preparation,
awaiting_shipment,
awaiting_collection,
in_delivery,
completed,
rejected,
cancelled,
delivery_failed
Example:

"accepted"

Response

Order created successfully

id
string
required

Order ID

Example:

"order_123"

createdAt
string<date-time>
required

Creation date

Example:

"2024-03-15T14:00:00Z"

shortId
string
required

Short ID

Example:

"ABC123"

status
enum<string>
required

Order status

Available options:
received,
in_preparation,
awaiting_shipment,
awaiting_collection,
in_delivery,
completed,
rejected,
cancelled,
delivery_failed
Example:

"new"

updatedAt
string<date-time>

Last update date

Example:

"2024-03-15T14:30:00Z"

serviceType
enum<string>

Service type

Available options:
delivery,
collection,
eat_in
Example:

"delivery"

channel
string

Order channel

Example:

"whatsapp"

ref
string

Order reference

Example:

"WA_ORDER_123"

expectedTime
string<date-time>

Expected delivery/collection time

Example:

"2024-03-15T14:30:00Z"

confirmedTime
string<date-time>

Confirmed delivery/collection time

Example:

"2024-03-15T14:30:00Z"

customerNotes
string

Customer notes

Example:

"Please ring the doorbell"

collectionCode
string

Collection code

Example:

"1234"

deliveryAddress
object

Delivery address

total
object

Total amount

items
object[]

Order items

deals
object[]

Order deals

discounts
object[]

Order discounts

charges
object[]

Order charges

payments
object[]

Order payments

customer
object

Customer information