Close Restaurant
curl --request PUT \
--url https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id} \
--header 'Access-Token: <api-key>'import requests
url = "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}"
headers = {"Access-Token": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'Access-Token': '<api-key>'}};
fetch('https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}")
.header("Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": false,
"error": "yetkisiz erişim"
}
{
"status": false,
"error": "URL hatalı"
}
{
"status": false,
"error": "restoran bulunamadı"
}
Restaurants
Close Restaurant
Set restaurant status to closed
PUT
/
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>'import requests
url = "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}"
headers = {"Access-Token": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'Access-Token': '<api-key>'}};
fetch('https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}")
.header("Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{rest_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": false,
"error": "yetkisiz erişim"
}
{
"status": false,
"error": "URL hatalı"
}
{
"status": false,
"error": "restoran bulunamadı"
}
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
string
required
Restaurant/branch UUID
Headers
string
required
Your API access token
Response
boolean
true if successfulstring
"OK" on successExamples
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'
const restaurantId = '8f2b9ce2-04de-4712-842d-a39f64596fdf';
const response = await fetch(
`https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/${restaurantId}`,
{
method: 'PUT',
headers: {
'Access-Token': 'your-access-token'
}
}
);
const data = await response.json();
// Restaurant is now closed
import requests
restaurant_id = '8f2b9ce2-04de-4712-842d-a39f64596fdf'
response = requests.put(
f'https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{restaurant_id}',
headers={'Access-Token': 'your-access-token'}
)
data = response.json()
# Restaurant is now closed
<?php
$restaurantId = '8f2b9ce2-04de-4712-842d-a39f64596fdf';
$url = "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/close/{$restaurantId}";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Access-Token: your-access-token'
));
$response = curl_exec($ch);
curl_close($ch);
// Restaurant is now closed
?>
Success Response (200)
{
"status": true,
"data": "OK"
}
Error Responses
{
"status": false,
"error": "yetkisiz erişim"
}
{
"status": false,
"error": "URL hatalı"
}
{
"status": false,
"error": "restoran bulunamadı"
}
When to Use
Daily Closing
Daily Closing
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());
}
Break Time
Break Time
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);
}
Emergency Closure
Emergency Closure
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);
}
Capacity Limit
Capacity Limit
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
- Complete all pending orders
- Accept/reject received orders
- Deliver in-progress orders
Best Practices
Check Before Closing
Check Before Closing
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;
}
Notify Customers
Notify Customers
Consider notifying customers before closing (if platform supports it).
Scheduled Closing
Scheduled Closing
Automate daily closing time.
// Close at 10:00 PM daily
scheduleDaily('22:00', async () => {
await closeRestaurant();
});
Related Endpoints
Open Restaurant
Set restaurant to open
Check Status
Get current status
Cancel Orders
Cancel pending orders