ربط نظام الكاشير
نظام الكاشير يرسل الطلب لنا وقت الفاتورة، ويطبع الكود على الفاتورة، ولما يخلّص المطبخ يرسل «جاهز»، وجوال العميل يرن. المفتاح من الإعدادات ← ربط الكاشير (الباقة الاحترافية).
الطلبات (للمبرمج)
Base URL: your site · Auth: Authorization: Bearer nk_live_… · JSON · 600 requests/min per key.
# 1. Branch codes
GET /api/v1/branches
→ { "branches": [ { "code": "k7f2q1", "name": "Olaya", "active": true } ] }
# 2. New order (on receipt print). Same externalRef twice → same ticket.
POST /api/v1/tickets
{ "branch": "k7f2q1", "number": "242", "externalRef": "pos-order-9182", "customerName": "Sara" }
→ 201 { "ticket": { "id": "…", "number": "242", "status": "waiting", "url": "https://…/t/AbC123xYz9" } }
Print ticket.url as a QR code on the receipt.
# 3. Kitchen done → the customer's phone rings
POST /api/v1/tickets/{id}/ready
POST /api/v1/branches/{code}/ready { "number": "242" } # if you only know the receipt number
# Other
POST /api/v1/tickets/{id}/ring # ring again
POST /api/v1/tickets/{id}/complete # picked up
POST /api/v1/tickets/{id}/cancel
GET /api/v1/tickets/{id}
Errors: { "error": "invalid|unauthorized|forbidden|not_found|duplicate_number|plan_limit|rate_limited", "message": "…" }curl -X POST https://<your-site>/api/v1/tickets \
-H "Authorization: Bearer nk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"branch":"k7f2q1","number":"242","externalRef":"pos-9182"}'فودكس
الربط المباشر مع فودكس قريباً. للحين تقدر تستخدم الـ API أعلاه، أو الإدخال اليدوي من لوحة الكاشير.