GET /plugin-api/ingredients/list ✓ CanlıMağazanın malzeme/stok kataloğunu (reçete malzemeleri, envanter) döner. Stok/envanter eklentileri için. Snapshot; değişiklikler için ingredient.* event'leri.
← API Uçları · ortak kurallar (base, auth, hata zarfı) orada.
GET {RESTOMENUM_BASE}/plugin-api/ingredients/list
Authorization: Bearer {serverId}.{pluginId}.{secret} // install API key (token exchange)https://sandbox.plugins.restomenum.app, Production https://plugins.restomenum.app (API Uçları).Authorization: Bearer <apiKey> — token exchange'teki install API key.ingredients:read (envanter; satış/menü scope'larından ayrı).{
"success": true,
"data": [
{ "id": "ab-12", "title": "Domates", "unit": "kg", "stock": 42, "alert": 5, "tax": 1 },
{ "id": "cd-34", "title": "Zeytinyağı", "unit": "lt", "stock": 8, "alert": 10, "tax": 1 }
],
"truncated": false
}truncated: true → 2000 üstü malzeme var (sayfa sınırı; restoran ölçeğinde pratikte ulaşılmaz).| Alan | Tip | Açıklama |
|---|---|---|
| id | string | Malzeme id'si |
| title | string | Malzeme adı |
| unit | string | Birim (kg, lt, adet…) |
| stock | number | Toplam stok miktarı |
| alert | number | Düşük-stok uyarı eşiği |
| tax | number | Vergi/KDV oranı |
ort (ortalama MALİYET = ticari sır) ASLA dönmez (ürün cost/recete gibi). stocks (depo-bazlı kırılım) ve storages (iç depo yapısı) dönmez — yalnız toplam stock.data yalnız ingredients:read onaylıysa dolu; yoksa {}.
| message | HTTP | Anlam |
|---|---|---|
| plugin.scope.denied | 200 | ingredients:read onaylı değil |
| unauthorized | 401 | Geçersiz/eksik install key |