v1

latestOpenAPI 3.0.02026-07-1398671635.1 KB
Order Webhooks
publicly-accessible

Order ready for preparation (async)

This webhook will be invoked when we have determined that an order is ready for preparation. Upon receiving the request, you should perform any preparation-related activities, such as sending the order to the POS system / kitchen screen. NOTE: This version of the webhook is asynchronous, and we expect a response in two parts:

  1. We expect an immediate 202 response from this webhook to denote that you have received the request;
  2. Following that, we expect an async callback - indicating either success or failure of the operation. The body for the async callbacks are as below:

Success callback

{
      "status": "Success",
      "message": "Order successfully sent to POS",
      "data": {}
}

Failure callback

{
      "status": "Failure",
      "message": "{errorMessage}",   // e.g. "The POS is currently in use"
      "data": {}
}
post/order-ready-for-preparation-async

Request body

OrderIdstring
Currencystring
TotalPricenumber
CustomerNotesobject
PlacedDatestring date-time
IsTestboolean

Example request

{
  "OrderId": "XYZ123456",
  "Currency": "GBP",
  "TotalPrice": 19.25,
  "Fulfilment": {
    "Method": "Delivery",
    "CustomerDueDate": "2018-03-10T14:45:28Z",
    "CustomerDueAsap": false,
    "Address": {
      "Lines": [
        "Fleet Place House",
        "Fleet Pl"
      ],
      "City": "London",
      "PostalCode": "EC4M 7RD",
      "Geolocation": {
        "Latitude": 51.51641,
        "Longitude": -0.103198
      }
    },
    "PhoneNumber": "+441234567890"
  },
  "Payment": {
    "Lines": [
      {
        "Type": "card",
        "Value": 19.25,
        "Paid": false
      }
    ]
  },
  "Customer": {
    "Id": "Batman",
    "Name": "Bruce Wayne"
  },
  "Items": [
    {
      "Reference": "1234",
      "Name": "Chicken Box Meal",
      "Synonym": "",
      "Quantity": 2,
      "UnitPrice": 5,
      "TotalPrice": 10,
      "Items": [
        {
          "Reference": "9876",
          "Name": "Fries",
          "Synonym": "Regular",
          "Quantity": 1,
          "UnitPrice": 0,
          "Items": []
        },
        {
          "Reference": "6789",
          "Name": "Pepsi",
          "Synonym": "330ml",
          "Quantity": 2,
          "UnitPrice": 0,
          "Items": []
        }
      ]
    },
    {
      "Reference": "4321",
      "Name": "Milkshake",
      "Synonym": "",
      "Quantity": 1,
      "UnitPrice": 7.25,
      "TotalPrice": 7.25,
      "Items": []
    }
  ],
  "PriceBreakdown": {
    "Discount": 0,
    "Tips": 0.5,
    "Taxes": 3.85,
    "Items": 17.25,
    "Fees": {
      "Delivery": 1,
      "ServiceCharge": 0.5,
      "Other": 0
    }
  },
  "CustomerNotes": [
    {
      "Key": "Floor",
      "Value": "5th floor"
    },
    {
      "Key": "Code",
      "Value": "Code 1234"
    }
  ],
  "PlacedDate": "2018-03-10T14:45:28Z",
  "Restaurant": {
    "Id": "99999",
    "Name": "Just Eat Test Restaurant",
    "Address": {
      "Lines": [
        "Oldridge Road"
      ],
      "City": "London",
      "PostalCode": "SW12 8PW",
      "Geolocation": {
        "Latitude": 51.4484,
        "Longitude": -0.1504
      }
    },
    "PhoneNumber": "+441200000000",
    "Refererence": "R99999"
  },
  "IsTest": true
}

Response

Upon successful receipt of this event, a 202 status code should be returned, indicating the request has been accepted. You should then later respond with the result of processing this request, via the callback URL endpoint.