Skip to main content
PUT
https://www.xn--dkkango-n2a.com/api/integrations
/
restaurants
/
status
/
close
/
{rest_id}
Close Restaurant
curl --request PUT \
  --url https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id} \
  --header 'Access-Token: <api-key>'
{
  "status": false,
  "error": "yetkisiz erişim"
}

Overview

Sets a restaurant status to closed, preventing new orders from being placed by customers.
Existing orders in progress will still need to be completed even after closing.

Path Parameters

rest_id
string
required
Restaurant/branch UUID

Headers

Access-Token
string
required
Your API access token

Response

status
boolean
true if successful
data
string
"OK" on success

Examples

curl -X PUT https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/8f2b9ce2-04de-4712-842d-a39f64596fdf \
  -H 'Access-Token: your-access-token'

Success Response (200)

{
  "status": true,
  "data": "OK"
}

Error Responses

{
  "status": false,
  "error": "yetkisiz erişim"
}

When to Use

Close restaurant at end of business day.
async function closeRestaurant() {
  // Check for pending orders
  const pendingOrders = await getPendingOrders();
  
  if (pendingOrders.length > 0) {
    const confirm = await askStaff(
      `${pendingOrders.length} orders pending. Close anyway?`
    );
    if (!confirm) return;
  }
  
  // Close restaurant
  await setRestaurantStatus(restaurantId, 'close');
  
  // Update UI
  showClosedStatus();
  
  // Log event
  console.log('Restaurant closed at', new Date());
}
Temporarily close for lunch break or maintenance.
async function startBreak(duration) {
  await setRestaurantStatus(restaurantId, 'close');
  notifyStaff(`Restaurant closed for ${duration} minutes`);
  
  // Auto-reopen after break
  setTimeout(async () => {
    await setRestaurantStatus(restaurantId, 'open');
    notifyStaff('Break ended - restaurant is open');
  }, duration * 60 * 1000);
}
Close immediately due to emergency or technical issues.
async function emergencyClose(reason) {
  await setRestaurantStatus(restaurantId, 'close');
  
  // Cancel pending orders
  const pending = await getPendingOrders();
  for (const order of pending) {
    await cancelOrder(order.id, 5); // Technical issue
  }
  
  logEmergency(reason);
  notifyManagement(reason);
}
Close when too busy or understaffed.
async function checkCapacity() {
  const activeOrders = await getActiveOrderCount();
  const MAX_CAPACITY = 20;
  
  if (activeOrders >= MAX_CAPACITY) {
    await setRestaurantStatus(restaurantId, 'close');
    notifyStaff('Capacity reached - closed temporarily');
  }
}

What Happens

1

Status Updated

Restaurant status changes to “Closed” in Dükkango platform
2

Hidden from Customers

Restaurant becomes unavailable in customer apps (or shown as closed)
3

No New Orders

Customers cannot place new orders
4

Existing Orders Continue

Orders already in progress must still be completed

Important Notes

Closing does NOT:
  • Cancel existing orders
  • Stop you from receiving orders already in the system
  • Affect orders that were placed before closing
You must still:
  • Complete all pending orders
  • Accept/reject received orders
  • Deliver in-progress orders

Best Practices

async function safeClose() {
  // 1. Check active orders
  const active = await getActiveOrders();
  if (active.length > 0) {
    console.warn(`${active.length} orders still active`);
  }
  
  // 2. Check unaccepted orders
  const received = await getReceivedOrders();
  if (received.length > 0) {
    alert(`${received.length} orders need attention!`);
    return false;
  }
  
  // 3. Close
  await setRestaurantStatus(restaurantId, 'close');
  return true;
}
Consider notifying customers before closing (if platform supports it).
Automate daily closing time.
// Close at 10:00 PM daily
scheduleDaily('22:00', async () => {
  await closeRestaurant();
});