table.created ✓ CanlıDine-in bir masa GERÇEKTEN açıldığında (bir masaya ilk sipariş eklendiğinde) eklentinin webhookUrl'ine async (fire-and-forget) imzalı POST edilir. Açılış SONRASI bir bildirimdir.
packet.created; müşterisiz masa açılışı → table.created.events: ["table.created"] + events:subscribe.customer alanı (varsa) PII'dır → customers:read + tenant consent yoksa maskelenir.POST {webhookUrl}
Content-Type: application/json
X-Restomenum-Signature: t=<unixSec>,v1=<HMAC_SHA256(webhookSecret, "<t>.<rawBody>")>
X-Restomenum-Event: table.created
X-Restomenum-Delivery: <deliveryId>"<t>.<rawBody>"), ±5 dk replay toleransı — bkz. imza şeması.X-Restomenum-Event: table.created, X-Restomenum-Delivery: <id>.id ile dedup (at-least-once → aynı id tekrar gelebilir).2xx → tamam; 5xx/timeout → retry → tükenirse dead-letter.| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
| id | string | ✓ | Idempotency anahtarı. Aynı id tekrar gelebilir → dedup et. |
| type | string | ✓ | table.created |
| version | string | ✓ | Envelope şema versiyonu ("1"). |
| tenantId | string | ✓ | Restoran (tenant) id. |
| occurredAt | number | ✓ | Açılış zamanı (unix ms). |
| data | object | ✓ | Event'e özel gövde (aşağıda). |
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
| tableId | string | ✓ | Masa id'si — tables/get?id= ile aynı. |
| tableName | string | ✓ | Masanın görünen adı (ör. "Masa 1"). |
| docNo | number | ✓ | Adisyon/belge no. |
| desing | string | – | Bölüm (salon/alan) adı (ör. "Bahçe") — tables/get'teki desing ile aynı. |
| location | string | – | Masanın görünen adı (ör. "Masa 1") — genelde tableName ile aynı. |
| personCount | number | – | Kişi sayısı (girilmemişse 0). |
| customer | object | null | – | PII — müşteri atanmamış masa açılışında null; doluysa yalnız customers:read + consent ile gelir, aksi halde maskelenir. |
| orders[] | array | ✓ | Açılış kalemleri: id, title, quantity, options[], extra, discount, note, lineTotal. options = string array (seçenek adları); lineTotal'ı Restomenum hesaplar. |
| total | number | ✓ | Adisyon toplamı (kuver dahil). |
| paid | number | ✓ | Ödenen tutar (açılışta genelde 0). |
| totalDiscount | number | – | Toplam indirim. |
{
"id": "evt_<uuid>",
"type": "table.created",
"version": "1",
"tenantId": "<tenantId>",
"occurredAt": 1781000000000,
"data": {
"tableId": "masa-1",
"tableName": "Masa 1",
"docNo": 12,
"desing": "Bahçe",
"location": "Masa 1",
"personCount": 2,
"customer": null,
"orders": [
{ "id": "masa-1-ab", "title": "Menemen", "quantity": 2, "options": [], "extra": 0, "discount": 0, "note": "", "lineTotal": 38 }
],
"total": 38,
"paid": 0,
"totalDiscount": 0
}
}