Active orders

Active Orders are orders that not yet delivered to the table or in waiting There are two types of orders that MUST be defined when creating an order:

  • ON_PREMISES is the default order type which represents orders where a customer(s) intend on eating at the restaurant site.
  • TO_GO order type represents orders where a customer does not intend on eating on site or sitting at a restaurant for long as they wait for their order delivery.

Here is an example of an active order:

{
  "status": 200,
  "returnCode": 5,
  "activeorder": {
    "name": "27",
    "uuid": "66565bd2-5c3e-4b2d-80ff-82cfc1dd2f76",
    "orderType": "ON_PREMISE",
    "locationName": "207",
    "state": "located",
    "stateChanged": "2016-06-10T15:10:08",
    "created": "2016-06-10T15:08:43",
    "paged": false,
    "elapsedTime": 0
  }
}
  • name identifies the order number. When using a tracker, the tracker's number will be used to represent the order.
  • uuid is a unique identifier that is generated by the gateway. When searching for individual active orders, both the order name or uuid can be used.
  • orderType identifies the order type.
  • locationName identifies where a customer with a tracker is sitting at. If there is no such table, locationName will be an empty string (""). It is entirely possible to have a locationName for either TO_GO or ON_PREMISES. For example, an order that is not quite ready for a TO_GO customer may result in them taking a seat with a tracker while they await final delivery.
  • state represents the status of the order:
    • If a tracker is started using the start unit (Green unit), the state will be "started".
    • When the tracker is at a tagged table, the state will change to "located". It is possible for an order to be generated with state, "located" if tracker was not started beforehand.
    • When an order has been delivered and the tracker is cleared using the clearing units (Red units), the state will change to "cleared" and will no longer be an active order. It can be viewed by calling GET /api/v2/orders for retrieving history.
  • "stateChanged" refers to a ISO8601 timestamp when a state has changed.
  • "created" refers to a ISO8601 timestamp when an order has been created. This is not to be confused with the timestamp when an order is "started" although they may be very close.
  • "paged" describes whether an order has been paged or not.
  • "elapsedTime" is a dynamic property that tells the number of seconds since an order was created.