cURL
curl --request GET \ --url https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{rest_id} \ --header 'Access-Token: <api-key>'
{ "status": false, "error": "yetkisiz erişim" }
Check if restaurant is open or closed
/restaurants/get
true
"Open"
"Closed"
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'
{ "status": true, "data": "Open" }
{ "status": true, "data": "Closed" }
Display Status in POS
async function displayRestaurantStatus() { const status = await getRestaurantStatus(restaurantId); if (status === "Open") { showGreenIndicator(); enableOrderAcceptance(); } else { showRedIndicator(); disableOrderAcceptance(); } }
Sync Status on Startup
async function initializePOS() { const restaurants = await getRestaurants(); for (const restaurant of restaurants) { const status = await getRestaurantStatus(restaurant.id); updateLocalStatus(restaurant.id, status); } }
Periodic Status Check
// Check status every 5 minutes setInterval(async () => { const status = await getRestaurantStatus(restaurantId); if (status !== currentStatus) { currentStatus = status; notifyStatusChange(status); } }, 300000);