Skip to main content
PUT
https://www.xn--dkkango-n2a.com/api/integrations
/
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>'
{
  "status": false,
  "error": "yetkisiz erişim"
}

Overview

Deactivates a specific menu item, making it unavailable for customers to order (e.g., out of stock, discontinued).

Path Parameters

food_id
integer
required
Food/product ID from the menu

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/foods/status-passive/1 \
  -H 'Access-Token: your-access-token'

Success Response (200)

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

Error Responses

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

Use Cases

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`);
  }
}
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}`
  );
}
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}`);
  }
}
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');
});
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 database
2

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
It only prevents new orders from being placed.

Best Practices

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');
}

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');
  }
}
Integrate this endpoint with your inventory management system for real-time availability updates!