Get Restaurant Status
curl --request GET \
--url https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{rest_id} \
--header 'Access-Token: <api-key>'import requests
url = "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{rest_id}"
headers = {"Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Access-Token': '<api-key>'}};
fetch('https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{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/get/{rest_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/get/{rest_id}"
req, _ := http.NewRequest("GET", 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.get("https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{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/get/{rest_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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
Get Restaurant Status
Check if restaurant is open or closed
GET
/
restaurants
/
status
/
get
/
{rest_id}
Get Restaurant Status
curl --request GET \
--url https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{rest_id} \
--header 'Access-Token: <api-key>'import requests
url = "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{rest_id}"
headers = {"Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Access-Token': '<api-key>'}};
fetch('https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{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/get/{rest_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/get/{rest_id}"
req, _ := http.NewRequest("GET", 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.get("https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{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/get/{rest_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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
Checks the current operational status of a specific restaurant/branch.Path Parameters
Restaurant/branch UUID from the
/restaurants/get responseHeaders
Your API access token
Response
true if successfulCurrent 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'
const restaurantId = '8f2b9ce2-04de-4712-842d-a39f64596fdf';
const response = await fetch(
`https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/${restaurantId}`,
{
headers: {
'Access-Token': 'your-access-token'
}
}
);
const data = await response.json();
console.log(data.data); // "Open" or "Closed"
import requests
restaurant_id = '8f2b9ce2-04de-4712-842d-a39f64596fdf'
response = requests.get(
f'https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{restaurant_id}',
headers={'Access-Token': 'your-access-token'}
)
data = response.json()
print(data['data']) # "Open" or "Closed"
<?php
$restaurantId = '8f2b9ce2-04de-4712-842d-a39f64596fdf';
$url = "https://www.xn--dkkango-n2a.com/api/integrations/restaurants/status/get/{$restaurantId}";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Access-Token: your-access-token'
));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
echo $data['data']; // "Open" or "Closed"
?>
Response Examples
- Open
- Closed
{
"status": true,
"data": "Open"
}
{
"status": true,
"data": "Closed"
}
Error Responses
{
"status": false,
"error": "yetkisiz erişim"
}
{
"status": false,
"error": "URL hatalı"
}
{
"status": false,
"error": "restoran bulunamadı"
}
Use Cases
Display Status in POS
Display Status in POS
Show current restaurant status in your POS interface.
async function displayRestaurantStatus() {
const status = await getRestaurantStatus(restaurantId);
if (status === "Open") {
showGreenIndicator();
enableOrderAcceptance();
} else {
showRedIndicator();
disableOrderAcceptance();
}
}
Sync Status on Startup
Sync Status on Startup
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);
}
}
Periodic Status Check
Periodic Status Check
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.
Related Endpoints
Open Restaurant
Change status to open
Close Restaurant
Change status to closed
⌘I