Skip to main content
PUT
https://www.xn--dkkango-n2a.com/api/integrations
/
foods
/
status-active
/
{food_id}
Activate Food Item
curl --request PUT \
  --url https://www.xn--dkkango-n2a.com/api/integrations/foods/status-active/{food_id} \
  --header 'Access-Token: <api-key>'
{
  "status": false,
  "error": "yetkisiz erişim"
}

Overview

Activates a specific menu item, making it available for customers to order.

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

Success Response (200)

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

Error Responses

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

Use Cases

Reactivate item when ingredients are back in stock.
async function restockItem(foodId, itemName) {
  await activateFood(foodId);
  
  notifyStaff(`${itemName} is back in stock and available`);
  logInventoryChange(foodId, 'activated');
}
Activate special menu items for the day.
async function enableDailySpecials() {
  const specials = [
    { id: 15, name: 'Lunch Special' },
    { id: 16, name: 'Chef\'s Choice' }
  ];
  
  for (const special of specials) {
    await activateFood(special.id);
    console.log(`Activated: ${special.name}`);
  }
}
Activate items based on time of day.
// Activate breakfast items at 7 AM
scheduleDaily('07:00', async () => {
  const breakfastItems = [5, 6, 7, 8];
  for (const id of breakfastItems) {
    await activateFood(id);
  }
});

// Deactivate breakfast items at 11 AM
scheduleDaily('11:00', async () => {
  const breakfastItems = [5, 6, 7, 8];
  for (const id of breakfastItems) {
    await deactivateFood(id);
  }
});
Activate multiple items at once.
async function activateCategory(categoryName) {
  const menu = await getMenu();
  const items = menu.filter(item => 
    item.category.name === categoryName
  );
  
  for (const item of items) {
    await activateFood(item.food_id);
  }
  
  console.log(`Activated ${items.length} items in ${categoryName}`);
}

What Happens

1

Status Updated

Item’s status changes to "ACTIVE" in the database
2

Visible to Customers

Item becomes visible and orderable in customer apps
3

Orders Accepted

Customers can add this item to their cart and place orders
Changes take effect immediately - customers will see the item as available right away.

Best Practices

async function safeActivate(foodId) {
  // Check inventory first
  const inStock = await checkInventory(foodId);
  
  if (inStock) {
    await activateFood(foodId);
    return true;
  } else {
    console.warn('Cannot activate - out of stock');
    return false;
  }
}
Use this endpoint in combination with your inventory management system for automatic availability updates.