When the Menu is Updated

Receiving updates to Menu data

Currently, in Flyt, you can configure a webhook that will receive events happening in the Flyt platform for your service. This webhook is used for confirmation of success / failure on events, or updates to remote resources (like stock, or menu data).

In the event of an update happening to a menu (either from a manual publish, or a synchronization), you will receieve the below payload in the webhook.

When you receive this event, we encourage you to recache the menu on your side.

// POST to <webhook address configured in Flyt>
field description values
type the type of event generated to this webhook string , one of: [ "menu_change", "stock-changed" ]
timestamp ISO 8061 formatted date that the event occurred string , e.g. "2018-02-26T15:26:05+00:00"
data additional context data for the webhook object , see below for more details
// for a menu changing (newly published or change)
{
  "type": "menu_change",
  "timestamp": "2018-02-26T15:26:05+00:00",
  "data": {
    "id": 2676,
    "menuId": 1779,
    "type": "3"
  }
}
field description values
data.id the location this event happened at integer : eg 1234
data.type the order type this menu was updated for string , one of [ "1", "2", "3" ] . 1 is Order Ahead, 2 is Eat in and 3 is Order & Deliver
data.menuId the menuId that was changed integer eg: 1234

Stock Update

// for a stock update
{
  "type": "stock-changed",
  "timestamp": "2018-02-26T15:26:05+00:00",
  "data": {
    "locationId": 2676,
    "status": "enabled"
  }
}
field description values
data.locationId the location this event happened at integer : eg 1234
data.status whether items were put in stock ( "enabled" ) or out of stock ( "disabled" ) string , one of [ "enabled", "disabled" ]

See the send to POS documentation for receiving webhooks on success or failure of orders.