Deactivate Food Item
curl --request PUT \
--url https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/{food_id} \
--header 'Access-Token: <api-key>'import requests
url = "https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/{food_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/foods/status-passive/{food_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/foods/status-passive/{food_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/foods/status-passive/{food_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/foods/status-passive/{food_id}")
.header("Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/{food_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": "ürün bulunamadı"
}
Foods
Deactivate Food Item
Make a menu item unavailable for ordering
PUT
/
foods
/
status-passive
/
{food_id}
Deactivate Food Item
curl --request PUT \
--url https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/{food_id} \
--header 'Access-Token: <api-key>'import requests
url = "https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/{food_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/foods/status-passive/{food_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/foods/status-passive/{food_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/foods/status-passive/{food_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/foods/status-passive/{food_id}")
.header("Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/{food_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": "ürün bulunamadı"
}
Overview
Deactivates a specific menu item, making it unavailable for customers to order (e.g., out of stock, discontinued).Path Parameters
integer
required
Food/product ID from the menu
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/foods/status-passive/1 \
-H 'Access-Token: your-access-token'
const foodId = 1; // Beef Burrito
const response = await fetch(
`https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/${foodId}`,
{
method: 'PUT',
headers: {
'Access-Token': 'your-access-token'
}
}
);
const data = await response.json();
// Food item is now unavailable
import requests
food_id = 1 # Beef Burrito
response = requests.put(
f'https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/{food_id}',
headers={'Access-Token': 'your-access-token'}
)
data = response.json()
# Food item is now unavailable
<?php
$foodId = 1; // Beef Burrito
$url = "https://www.xn--dkkango-n2a.com/api/integrations/foods/status-passive/{$foodId}";
$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);
// Food item is now unavailable
?>
Success Response (200)
{
"status": true,
"data": "OK"
}
Error Responses
{
"status": false,
"error": "yetkisiz erişim"
}
{
"status": false,
"error": "URL hatalı"
}
{
"status": false,
"error": "ürün bulunamadı"
}
Use Cases
Out of Stock
Out of Stock
Deactivate item when ingredients run out.
async function markOutOfStock(foodId, itemName) {
await deactivateFood(foodId);
notifyStaff(`⚠️ ${itemName} is now out of stock`);
logInventoryChange(foodId, 'out_of_stock');
// Optional: Notify manager
if (await shouldNotifyManager(foodId)) {
sendManagerAlert(`${itemName} out of stock - reorder needed`);
}
}
Quality Issues
Quality Issues
Temporarily disable items with quality concerns.
async function suspendItem(foodId, reason) {
await deactivateFood(foodId);
await logIssue({
foodId,
type: 'quality_issue',
reason,
timestamp: new Date(),
suspendedBy: currentUser.id
});
notifyKitchenManager(
`Item ${foodId} suspended: ${reason}`
);
}
End of Day Cleanup
End of Day Cleanup
Deactivate items that won’t be available tomorrow.
async function endOfDayCleanup() {
const dailySpecials = await getDailySpecials();
for (const special of dailySpecials) {
await deactivateFood(special.id);
console.log(`Deactivated daily special: ${special.name}`);
}
}
Time-Based Availability
Time-Based Availability
Deactivate items outside their serving hours.
// Deactivate breakfast at 11 AM
scheduleDaily('11:00', async () => {
const breakfastItems = [5, 6, 7, 8];
for (const id of breakfastItems) {
await deactivateFood(id);
}
console.log('Breakfast menu deactivated');
});
Automatic Stock Management
Automatic Stock Management
Integrate with inventory system.
async function checkInventory() {
const menu = await getMenu();
for (const item of menu) {
const stock = await getStockLevel(item.food_id);
if (stock <= 0 && item.status === 'ACTIVE') {
await deactivateFood(item.food_id);
notifyStaff(`Auto-deactivated: ${item.name} (no stock)`);
}
}
}
// Check every 10 minutes
setInterval(checkInventory, 600000);
What Happens
1
Status Updated
Item’s
status changes to "INACTIVE" in the database2
Hidden from Customers
Item becomes unavailable in customer apps (hidden or shown as unavailable)
3
Orders Blocked
Customers cannot add this item to their cart or order it
4
Existing Orders Unaffected
Orders already placed with this item are not affected
Deactivating an item does NOT:
- Cancel existing orders containing this item
- Prevent kitchen from preparing orders already in progress
- Remove the item from your menu permanently
Best Practices
- Notify Staff
- Track Reasons
- Batch Deactivation
- Reactivation Reminder
async function deactivateWithNotification(foodId, itemName, reason) {
await deactivateFood(foodId);
// Notify all staff
await broadcastNotification({
type: 'item_unavailable',
item: itemName,
reason: reason,
timestamp: new Date()
});
// Update POS display
updateItemStatus(foodId, 'unavailable');
}
const DEACTIVATION_REASONS = {
OUT_OF_STOCK: 'out_of_stock',
QUALITY: 'quality_issue',
EQUIPMENT: 'equipment_failure',
SCHEDULED: 'scheduled_unavailable',
DISCONTINUED: 'discontinued'
};
async function deactivateWithReason(foodId, reason) {
await deactivateFood(foodId);
await database.logDeactivation({
foodId,
reason,
timestamp: new Date(),
user: currentUser
});
}
async function deactivateMultiple(foodIds, reason) {
const results = [];
for (const id of foodIds) {
try {
await deactivateFood(id);
results.push({ id, status: 'success' });
} catch (error) {
results.push({ id, status: 'failed', error });
}
}
console.log(`Deactivated ${results.filter(r => r.status === 'success').length}/${foodIds.length} items`);
return results;
}
async function deactivateWithReminder(foodId, reactivateAt) {
await deactivateFood(foodId);
// Schedule reminder
scheduleReminder(reactivateAt, {
type: 'reactivate_item',
foodId,
message: `Consider reactivating item ${foodId}`
});
}
Integration Example
class MenuManager {
async handleOutOfStock(foodId, itemName) {
// 1. Deactivate in API
await this.deactivateFood(foodId);
// 2. Update local database
await this.updateLocalStatus(foodId, 'inactive');
// 3. Notify stakeholders
await this.notifyStaff(itemName, 'out_of_stock');
await this.notifyManager(itemName, 'needs_reorder');
// 4. Log for analytics
await this.logEvent({
type: 'item_deactivated',
foodId,
itemName,
reason: 'out_of_stock',
timestamp: new Date()
});
// 5. Update UI
this.updatePOSDisplay(foodId, 'unavailable');
}
}
Related Endpoints
Activate Food
Make item available again
Get Menu
View all menu items and their status
Integrate this endpoint with your inventory management system for real-time availability updates!
⌘I