Skip to main content
POST
/
order-draft
/
register
Register an order draft
curl --request POST \
  --url https://api.example.com/order-draft/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "orderDraftId": "<string>"
}
'
{
"type": "orderRegistered",
"order": {
"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
orderDraftId
string
required

ID of the order draft to register

Response

Order successfully registered

type
enum<string>
Available options:
orderRegistered
order
object