Restaurant Management - API Actions
This page contains the API actions for restaurant management.
Contents
Restaurant status management
Restaurants must be online to accept any type of mobile orders. The POS must inform us of any change in a restaurant status immediately. To ensure that we have the latest restaurant status, we use a heartbeat process.
Moreover, we always expose restaurant availability information via endpoints and webhooks.
Store Heartbeat Webhook
A restaurant heartbeat is a scheduled process that runs every 15 minutes and requests the restaurant status.
Every time we request a store’s heartbeat, we trigger the Store Heartbeat webhook, which specifies what store we need an update for. The POS must answer that request by indicating whether the restaurant is online (isOnline
true) or offline (isOnline
false).
Update Store Status Endpoint
Whenever there's a change in a restaurant status, the POS must inform us of the change by using the Update Store Status endpoint. The POS must indicated if the store is online or not.
The POS should not wait for the store heartbeat webhook to trigger, but instead inform us immediately when the store availability change happens.
Get Store Status Endpoint
We make available all restaurants status via the Get Store Status endpoint. You need to specify the restaurant you want to get the status for.
In this endpoint you can see:
isAvailable
: whether the restaurant can accept mobile orders. This requiresisOnline
to be true, and other RBI internal configuration to be in place.isOnline
: whether the restaurant has an online heartbeat. This value is set by the POS via the Update Store Status endpoint (process described above).lastOnline
: indicates the last time the restaurant hadisOnline
set to true.
Restaurant information management
Other than availability (isOnline
), restaurants have many other attributes which are stored in the RBI platform. For example – restaurant name, operating hours, address and coordinates.
We expose changes in restaurant’s key attributes via our webhooks, and offer an endpoint to pull all that restaurant information.
Store Updated Event Webhook
We broadcast changes to restaurants' attributes via the Store Updated Event webhook.
The webhook includes the store id for which there was a change, and a callback URL to get the updated information.
The callback URL is a reference to the Get Store Details endpoint, explained below.
Get Store Details Endpoint
You can request the following restaurant information via the Get Store Details endpoint:
Availability for mobile ordering
Franchisee group name
Location, including coordinates and address
Restaurant name
POS Vendor used by the restaurant
Operating hours by service mode
Timezone
This information can be requested at any item, not only when the Store Updated Event webhook triggers.
List Store Endpoint
Each market has several restaurants. Requesting information for each restaurant one by one using the Get Store Details endpoint can be time-consuming.
Using the List Store endpoint you can get the same information for all open restaurants in the market with a single call.
Â
Â
Â