ingredients/create · update · delete ✓ CanlıMalzeme/stok kartlarını yazar (oluştur/güncelle/sil). Alan adları ingredients/list okuma şekliyle simetriktir. Sahiplik/idempotency/hata/echo kuralları katalog yazma ile ortaktır.
← API Uçları · Ortak kurallar · Scope: ingredients:write.
POST /plugin-api/ingredients/create
{
"title": "Mozzarella", // ZORUNLU (2..100)
"unit": "kg", // ZORUNLU (<=32; kg/lt/adet…)
"alert": 5, // ops — düşük-stok eşiği (>= 0)
"tax": 10, // ops — KDV % (0..100)
"idempotencyKey": "ing-1" // ops
}stock (envanter hareketiyle değişir), ort (maliyet) ve depo kırılımı API'ye kapalı. Yeni malzeme stok 0 ile oluşur.POST /plugin-api/ingredients/update
{ "id": "x9-01", "alert": 10 } // {id} + title/unit/alert/tax'tan en az biri{ id } + title/unit/alert/tax'tan en az biri. Sahiplik kontrollü (notOwned).
POST /plugin-api/ingredients/delete
{ "id": "x9-01" }
// 200 → { "success": true, "data": { "id": "x9-01", "deleted": true } }Sahiplik kontrollü.
ingredients/list ile aynı şekil: { id, title, unit, stock, alert, tax }.