Eklentinin Restomenum'dan veri okuduğu / işlem yaptığı HTTP uçları. Etkileşimler (event, action, iframe) yalnızca bir id taşır; dolu veriyi bu API'lerden çekersiniz. Liste zamanla genişler.
GET {RESTOMENUM_BASE}/plugin-api/<kaynak>/<aksiyon>
Authorization: Bearer <apiKey> // kurulumdaki (OAuth exchange) install API key{RESTOMENUM_BASE} ortama göre değişir — geliştirmede sandbox, canlıda production:
| Ortam | Base URL |
|---|---|
| Dev / Sandbox | https://sandbox.plugins.restomenum.app |
| Production | https://plugins.restomenum.app |
{RESTOMENUM_BASE}/plugin-api/… altında (yukarıdaki tablo).Authorization: Bearer <apiKey> — token exchange'te alınan install API key.plugin.scope.denied.customer alanları customers:read + consent ile dolu gelir; yoksa webhook ile aynı kuralla kırpılır.// başarı
{ "success": true, "data": { … } }
// hata
{ "success": false, "message": "<kod>" }Ortak hata kodları: plugin.scope.denied (gerekli scope yok), plugin.<kaynak>.notFound (kayıt yok). Uça özel kodlar ilgili sayfada listelenir.
| Method | Uç | Açıklama | Scope |
|---|---|---|---|
| GET | /plugin-api/packets/get | Paket detayı (dolu order: ürünler, müşteri, adres, toplam) | orders:read |
| GET | /plugin-api/packets/open | Açık paket/delivery hesapları (özet): packetId, kanal, tutar, ürün adedi. Detay: packets/get?packetId=. | orders:read |
| POST | /plugin-api/packets/create | Yeni paket/sipariş oluştur (yazma ucu). Sepet ürün id'leriyle; fiyat Restomenum kaydından. idempotencyKey ile retry-güvenli. Ayrı write limit (20/dk). | orders:write |
| POST | /plugin-api/packets/update | Paketin sınırlı alanlarını güncelle (allowlist: status[label]/note/paymentNote/invoice*/customer.address|phone). Kapanış/iptal tetiklemez. | orders:write |
| POST | /plugin-api/packets/update-orders | Paket kalemlerini (cart) DEĞİŞTİR (full replace). total ürün kaydından yeniden hesaplanır. paid > yeni total → reddedilir (success:false). | orders:write |
| POST | /plugin-api/packets/update-payments | Paket ödemelerini DEĞİŞTİR (full replace). paid yeniden hesaplanır (price>0). paid > total → reddedilir (success:false). update-orders ile eş zamanlı çağırma. | orders:write |
| GET | /plugin-api/tables/get | Masa detayı (dolu order — packets/get ile aynı kanonik şekil). table.close gate target.id ile çekilir. | orders:read |
| GET | /plugin-api/tables/layout | Masa yerleşimi (floor plan): bölümler + masa adları. Ücret/grid alanları dönmez. Masa = bölüm+ad. | orders:read |
| GET | /plugin-api/tables/open | Açık masa hesapları (özet): tableId, tutar (total/paid/indirim), ürün adedi. Detay: tables/get?id=. | orders:read |
| POST | /plugin-api/tables/update-orders | Masa kalemlerini DEĞİŞTİR (full replace). total kuver dahil yeniden hesap; timer ürün desteklenmez. (yakında) | orders:write |
| POST | /plugin-api/tables/update-payments | Masa ödemelerini DEĞİŞTİR (full replace). Ödeme doğrulaması packets ile birebir (unknown_payment_method). (yakında) | orders:write |
| GET | /plugin-api/products/get | Ürün detayı (id ile). fiyat, KDV, görsel, barkod, stok, seçenek/choice ağacı. cost/recete dönmez. | products:read |
| GET | /plugin-api/products/list | Tüm ürün kataloğu (aktif+pasif). Max 2000 (aşılırsa truncated+total). cost/recete dönmez. | products:read |
| GET | /plugin-api/categories/list | Tüm ürün kategorileri (aktif+pasif). id, title, image, color, rank. Ürün category ile eşleşir. Max 500. | products:read |
| GET | /plugin-api/categories/get?id= | Tek kategori detayı (id ile). Şekil categories/list öğesiyle aynı. category.* event id'sini zenginleştir. | products:read |
| GET | /plugin-api/payment-methods/list | Tanımlı ödeme yöntemleri (Nakit/Kredi Kartı…): id, title, description, cash, noreport. users dönmez. | payment_methods:read |
| GET | /plugin-api/ingredients/list | Malzeme/stok kataloğu (envanter): id, title, unit, stock, alert, tax. ort(maliyet)/stocks/storages dönmez. | ingredients:read |
| GET | /plugin-api/customers/get?customerId= | Müşteri detayı (PII). Detay sayfası yakında eklenecek. | customers:read |
| GET | /plugin-api/users/get | Personel (kullanıcı) listesi [{ id, name }] — name yalnız PII consent ile. Max 200, cache'le. pincode/yetki/e-posta/mesai dönmez. | users:read |
| POST | /plugin-api/products/{create,update,delete} | Ürün katalog yazma. Sahiplik: yalnız kendi oluşturduğunu düzenler/siler. category var olmalı; cost/stock/image yazılamaz. | products:write |
| POST | /plugin-api/categories/{create,update,delete} | Kategori katalog yazma (products:write; ayrı scope yok). delete: kategori boş olmalı (categoryNotEmpty). | products:write |
| POST | /plugin-api/payment-methods/{create,update,delete} | Ödeme yöntemi tanımı yazma. Sahiplik kontrollü. Personel ataması panelden (API'de yazılamaz). | payment_methods:write |
| POST | /plugin-api/ingredients/{create,update,delete} | Malzeme/stok kartı yazma. Sahiplik kontrollü. stock/ort yazılamaz; yeni kart stok 0. | ingredients:write |