GET /plugin-api/products/list ✓ CanlıMağazanın tüm ürün kataloğunu döndürür (menü senkronu için). Aktif VE pasif ürünlerin hepsi gelir; eklenti active alanına göre kendisi filtreler. Tek ürünü id ile çekmek için products/get.
← API Uçları · ortak kurallar (base, auth, hata zarfı) orada.
GET {RESTOMENUM_BASE}/plugin-api/products/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 (serverId.pluginId.secret).products:read (yoksa plugin.scope.denied).data ürün dizisidir; her öğe products/get ile aynı kanonik şekildir.
// opsiyonlu ürün
{
"id": "3b5d-f6d0",
"title": "Menemen",
"category": "a0-62",
"price": 19,
"tax": 0,
"active": true,
"image": "https://d37x2wx7jj7xm7.cloudfront.net/server/SM9M.../original.jpeg",
"barcode": "",
"barcodeType": "Product",
"stock": 59,
"options": [
{
"title": "", "min": 0, "max": 99, "multiple": true,
"choices": [
{ "id": 1661781517624, "title": "Sade", "price": 0 },
{ "id": 1661781517374, "title": "Peynir", "price": 1 },
{ "id": 1661781517278, "title": "Kavurma", "price": 5 },
{ "id": 1661781517482, "title": "Sucuk", "price": 2 }
]
}
]
}// opsiyonsuz ürün (options:[], farklı host'taki görsel olduğu gibi kalır)
{
"id": "3b5d-54fc",
"title": "Kahvaltı Tabağı",
"category": "a0-62",
"price": 37.5,
"tax": 0,
"active": true,
"image": "https://res.cloudinary.com/.../ezhdzw5n5y8rl8r8jbup.jpg",
"options": []
}{ "success": true, "data": [ /* yukarıdaki ürün objeleri */ ] }price sayı, ₺ (tam/ondalık) · tax KDV/vergi oranı (%) · image CDN URL'i veya null · stock negatif olabilir · options[].min/max bazı kayıtlarda string gelebilir (ikisine de hazır ol) · choices[].id number · languages obje (yoksa alan gelmeyebilir). Dayanıklı parse et.tax, barcode, barcodeType hiç gelmez; options[] objesi id/title/min/max taşımayabilir ve choices[].id olmayabilir (yalnız title+price). Bu alanları her zaman var sayma — ?. / varsayılan ile oku (ör. tax ?? 0, choice.id ?? choice.title).| Alan | Tip | Açıklama |
|---|---|---|
| id | string | Ürün id'si (products/get?id= ile aynı) |
| title | string | Ürün adı |
| category | string | Kategori id'si (görünen ad değil) |
| price | number | Birim fiyat (₺) |
| tax | number | KDV/vergi oranı (%) |
| active | boolean | Satışta mı |
| image | string | null | Görsel CDN URL'i; yoksa null |
| barcode | string | Barkod (boş olabilir) |
| barcodeType | string | Barkod tipi |
| stock | number | Stok adedi (negatif olabilir) |
| languages | object | Dil çevirileri (yoksa dönmeyebilir) |
| options[] | array | { title, min, max, multiple, choices[]{id,title,price} } |
truncated: true + total: N eklenir. truncated yoksa liste eksiksizdir. (Restoran ölçeğinde pratikte bu sınıra ulaşılmaz.){ "success": true, "data": [ /* 2000 ürün */ ], "truncated": true, "total": 2143 }cost (maliyet) ve recete (reçete / BOM) ASLA dönmez — restoranın ticari sırrıdır; eklenti erişemez.Görsel: Restomenum S3 → CDN'e çevrilir; başka host'taki görseller (ör. cloudinary) olduğu gibi kalır. Öneri: katalog seyrek değişir → listeyi kendi tarafında cache'le, her event'te çağırma.
| message | Anlam |
|---|---|
| plugin.scope.denied | products:read onaylı değil |
| unauthorized (HTTP 401) | Geçersiz/eksik install key |