Overview
Checks the current operational status of a specific restaurant/branch.
Path Parameters
Restaurant/branch UUID from the /restaurants/get response
Response
Current restaurant status: "Open" or "Closed"
Examples
curl -X GET https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/8f2b9ce2-04de-4712-842d-a39f64596fdf \
-H 'Access-Token: your-access-token'
Response Examples
{
"status": true,
"data": "Open"
}
Restaurant is accepting orders.{
"status": true,
"data": "Closed"
}
Restaurant is not accepting orders.
Error Responses
{
"status": false,
"error": "yetkisiz erişim"
}
Use Cases
Show current restaurant status in your POS interface.async function displayRestaurantStatus() {
const status = await getRestaurantStatus(restaurantId);
if (status === "Open") {
showGreenIndicator();
enableOrderAcceptance();
} else {
showRedIndicator();
disableOrderAcceptance();
}
}
Check status when POS application starts.async function initializePOS() {
const restaurants = await getRestaurants();
for (const restaurant of restaurants) {
const status = await getRestaurantStatus(restaurant.id);
updateLocalStatus(restaurant.id, status);
}
}
Poll status periodically to stay in sync.// Check status every 5 minutes
setInterval(async () => {
const status = await getRestaurantStatus(restaurantId);
if (status !== currentStatus) {
currentStatus = status;
notifyStatusChange(status);
}
}, 300000);
Status changes made via the API are immediately reflected in the Dükkango platform.
Open Restaurant
Change status to open
Close Restaurant
Change status to closed