products/create · update · delete ✓ CanlıÜrün kataloğunu yazar (oluştur/güncelle/sil). Alan adları products/get okuma şekliyle birebir simetriktir. Sahiplik, idempotency, hata ve echo kuralları tüm katalog yazma uçlarında ortaktır.
← API Uçları · Ortak kurallar (sahiplik/idempotency/hata/echo) · Scope: products:write.
POST /plugin-api/products/create
{
"title": "Margherita Pizza", // ZORUNLU (2..200)
"price": 185.5, // ZORUNLU (>= 0)
"category": "a0-0c", // ZORUNLU — VAR OLAN kategori id'si (categories/list)
"tax": 10, // ops — KDV % (0..100)
"active": true, // ops (default true)
"barcode": "8690000000001", // ops (<=64)
"barcodeType": "EAN13", // ops (<=32)
"languages": { "en": { "title": "Margherita" } }, // ops (<=30 dil)
"options": [ // ops (<=20 grup)
{ "title": "Boyut", "min": 1, "max": 1, "multiple": false,
"choices": [ { "title": "Orta", "price": 0 }, { "title": "Büyük", "price": 25 } ] }
],
"idempotencyKey": "prod-9af2..." // ops AMA ÖNERİLİR
}category var olmalı: geçersiz id → plugin.catalog.categoryNotFound (orphan ürün panel/QR'da görünmez).cost, recete, stock, image, rank ve web-store alanları — işletme-içidir; gönderilirse reddedilir (kütle-atama koruması).options.choices[].price = seçim ek ücreti; grup/seçim id'leri sunucu üretir.POST /plugin-api/products/update
{
"id": "79-06", // ZORUNLU — ürün id'si
"price": 199.9 // + en az 1 yazılabilir alan (create ile aynı küme)
}{ id } + en az 1 yazılabilir alan (create ile aynı küme).options gönderirseniz tam değiştirme (replace) — mevcut gruplar silinir.plugin.catalog.notOwned.POST /plugin-api/products/delete
{ "id": "79-06" }
// 200 → { "success": true, "data": { "id": "79-06", "deleted": true } }Ürünün görselleri de temizlenir. Sahiplik kontrollü (notOwned).
Okuma ucuyla (products/get) aynı kanonik obje: { id, title, category, price, tax, active, image, barcode, barcodeType, stock, languages, options[] }.