البدء
- في Cloud POS 4U افتح «الأتمتة» من القائمة الجانبية (ضمن «الذكاء الاصطناعي») ثم تبويب «واجهات البرمجة». تحتاج إلى صلاحية إدارة الإعدادات وخطة تتضمن الوصول إلى واجهة البرمجة والأتمتة التسويقية (كلتاهما في خطة Ultimate).
- أنشئ مفتاحًا: اكتب اسمه واختر فرعه والصلاحيات التي يحتاجها فقط. انسخ المفتاح فورًا، فهو يظهر مرة واحدة فقط.
- أرسل المفتاح مع كل طلب إلى عنوان مطعمك، مثل GET /api/v1/menu.
المصادقة
أرسل المفتاح في أحد هذين الرأسين. لا يُقبل تسجيل دخول الموظفين ولا رموز الأتمتة (n8n) على /api/v1، ولا يعمل مفتاح واجهة البرمجة في أي جزء آخر من النظام.
X-API-Key: pos_…
Authorization: Bearer pos_…
- كل مفتاح مرتبط بفرع واحد: كل إجابة تخص ذلك الفرع، ويُرفض طلب أي فرع آخر.
- يمكن تحديد تاريخ انتهاء للمفتاح. ويمكنك إلغاء المفتاح أو تجديده (يتوقف المفتاح القديم فورًا).
- احفظ المفاتيح على خادمك، ولا تضع مفتاحًا في صفحة ويب أو تطبيق جوال.
العنوان الأساسي والمطعم
المطعم هو صاحب العنوان الذي تتصل به: عنوان مطعمك على Cloud POS 4U (<restaurant>.cloudpos4u.com) أو خادم النسخة المحلية. النطاقات الأخرى، مثل النطاق الخاص بموقع مطعمك، لا تقدّم واجهة البرمجة. ويعمل أيضًا الرأس X-Tenant-ID مع اسم عنوان المطعم.
https://{restaurant}.cloudpos4u.com/api/v1https://{server}/api/v1
الصلاحيات
تحتاج كل نقطة وصول إلى صلاحية واحدة. المفتاح الذي لا يملكها يحصل على 403 API_SCOPE_NOT_ALLOWED.
menu:read | قراءة قائمة طعام الفرع: الأطباق وأسعارها بعملة الفرع والفئات والتوفر. |
orders:read | قراءة طلبات الفرع وطلب واحد بمعرّفه. |
orders:write | تسعير سلة وإنشاء طلبات للفرع، دون أي صلاحية خصم أو تغيير سعر. |
tables:read | قراءة طاولات الفرع وحالتها. |
reservations:read | قراءة حجوزات الفرع. |
reservations:write | إنشاء الحجوزات وتغيير حالتها. |
reports:read | قراءة ملخص المبيعات والطلبات الجارية للفرع. |
customers:read | البحث عن عميل برقم الهاتف أو البريد الإلكتروني. |
حدود الطلبات
الحدود في الدقيقة. كل إجابة لطلب اجتاز فحص المفتاح والخطة والصلاحية تحمل الرأسين RateLimit وRateLimit-Policy؛ أما الرفض قبل ذلك (401، و403 بسبب الخطة أو الصلاحية) فلا يحملهما. عند تجاوز الحد تكون الإجابة 429 RATE_LIMITED: انتظر عدد الثواني في Retry-After.
| الطلبات لكل مفتاح | 300 |
| عمليات الكتابة لكل مفتاح (POST وPATCH) | 60 |
| الطلبات لكل مطعم بجميع مفاتيحه | 1,200 |
الأخطاء
إجابة الخطأ بصيغة JSON فيها status وmessage وcode وأحيانًا details وrequestId. اعتمد على code؛ أما message فهي للقراءة. اذكر requestId عند التواصل مع الدعم.
{
"status": 403,
"message": "This API key does not have the orders:write scope.",
"code": "API_SCOPE_NOT_ALLOWED",
"details": {
"requiredScope": "orders:write"
},
"requestId": "c0ffee12-…"
}
| الرمز | حالة HTTP | المعنى |
|---|
API_KEY_MISSING | 401 | لم يُرسل مفتاح. |
API_KEY_INVALID | 401 | المفتاح غير صحيح أو أُلغي. |
API_KEY_EXPIRED | 401 | انتهت صلاحية المفتاح. |
API_SCOPE_NOT_ALLOWED | 403 | المفتاح لا يملك الصلاحية التي تحتاجها نقطة الوصول، أو أنه رمز أتمتة متوقف. |
PLAN_FEATURE_REQUIRED | 403 | الخطة لا تتضمن ميزة تحتاجها نقطة الوصول: الوصول إلى واجهة البرمجة، أو الحجوزات لمسارات /reservations. |
PLAN_LIMIT_REACHED | 403 | تم بلوغ الحد الشهري للطلبات في الخطة (POST /orders). |
FORBIDDEN | 403 | الوحدة التي تستخدمها نقطة الوصول (الطلبات) متوقفة لدى المطعم. |
BRANCH_FORBIDDEN | 403 | ذكر الطلب فرعًا غير فرع المفتاح. |
VALIDATION_ERROR | 400 | قيمة ناقصة أو غير صالحة. بعض الإجابات تستخدم رمزًا أدق. |
NOT_FOUND | 404 | لا يوجد شيء بهذا المعرّف في فرع المفتاح. |
CONFLICT | 409 | التغيير يتعارض مع الحالة الحالية، مثل طاولة محجوزة مسبقًا. |
RATE_LIMITED | 429 | طلبات كثيرة جدًا. انتظر مدة Retry-After. |
SERVER_BUSY | 503 | تعذّر التحقق من المفتاح الآن. أعد المحاولة بعد قليل. |
إنشاء الطلبات
- يسعّر الخادم كل سطر من قائمة الفرع مع عروضه وضريبته ورسوم الخدمة. لا تُستخدم الأسعار التي ترسلها، ولا يستطيع المفتاح منح خصم أو تغيير سعر.
- استخدم POST /orders/quote لعرض الإجمالي أولًا. وأرسل الرأس Idempotency-Key مع POST /orders حتى لا تنشئ إعادة المحاولة طلبًا ثانيًا.
- يحتاج الفرع إلى وردية مفتوحة. لكل مفتاح إعداد خاص للطلبات: افتراضيًا تنتظر الطلبات حتى يقبلها الموظفون في التطبيق (Pending Approval). والمفتاح المضبوط على الإرسال مباشرة إلى المطبخ ينشئها بالحالة In Progress ما لم ترسل orderStatus بالقيمة Pending Approval. لا يمكن لـ orderStatus إلا أن يجعلها أكثر تشددًا.
الإصدارات والإيقاف
هذا هو الإصدار 1 على /api/v1. قد تُضاف حقول ونقاط وصول جديدة في أي وقت، فتجاهل الحقول التي لا تعرفها. التغيير الذي يكسر التوافق يأتي فقط في إصدار جديد يُعلن عنه قبل 6 أشهر على الأقل، وتُعلَّم العمليات القديمة بأنها متوقفة في openapi.json مع سجل تغييرات مؤرخ.
سجل التغييرات
| الإصدار | التاريخ | الوصف |
|---|
| 1.2.0 | 2026-12-01 | Orders: split bill link fields. An order split into separate checks and every check cut from it carry splitGroupId (the original order's id); a cut check carries splitFromOrderId. checkNumber is documented. A check shared between payers carries splitPlan (frozen payer shares; each share's payment lines name it). Additive: existing fields are unchanged. |
| 1.1.0 | 2026-11-30 | Reports: list the ready reports, run a ready or saved report and start / follow a background export (CSV, Excel, PDF) across the key's allowed branches (its own plus the branches chosen in Automation > APIs). Totals per currency, never added across currencies. |
| 1.0.0 | 2026-11-21 | First version: menu, orders (list, get, quote, create), tables, reservations, sales summary, live orders and customer lookup. API keys with scopes, a per-key order setting (orders wait for staff approval unless the key is set to send them to the kitchen), per-key rate limits. |
الدعم
لديك سؤال عن واجهة البرمجة أو تحتاج إلى نقطة وصول غير موجودة هنا؟ تواصل معنا واذكر requestId الخاص بالإجابة.
تواصل مع الدعمنقاط الوصول
Customers
Find a customer
الصلاحية: customers:read
The restaurant's customer with exactly this phone number or email address, or null. Send phone or email.
المعاملات
| الاسم | الموضع | النوع | مطلوب | الوصف |
|---|
phone | query | string | لا | The phone number as stored, international format, for example +971501234567. |
email | query | string | لا | The email address. |
مثال
{
"success": true,
"data": {
"id": "6f7a8b9c-0d1e-4f2a-8b3c-4d5e6f7a8b9c",
"name": "Sara Ahmed",
"phone": "+971501234567",
"email": null,
"customerTypes": [
"Regular"
],
"loyaltyPoints": 120,
"loyaltyTier": null,
"preferredLanguage": "en",
"marketingConsent": false,
"createdAt": "2026-05-02T10:00:00.000Z"
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/customers?phone=%2B971501234567" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/customers?phone=%2B971501234567", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
Menu
Orders
List orders
الصلاحية: orders:read
The orders of the key's branch, newest first, one page at a time.
المعاملات
| الاسم | الموضع | النوع | مطلوب | الوصف |
|---|
status | query | string | لا | One order status or a comma-separated list, for example In Progress,Ready. |
from | query | string | لا | First business date (YYYY-MM-DD), in the branch's own time zone and day cut-off. |
to | query | string | لا | Last business date (YYYY-MM-DD), inclusive. from and to go together; one alone means that single day. |
paymentStatus | query | string | لا | One or more of Pending, Collected, Paid, Partially Paid, Partially Refunded, Refunded, Failed, Cancelled (comma-separated), or unpaid. |
orderType | query | string | لا | One or more of Dine-in, Delivery, Takeaway, Staff Meal (comma-separated). |
limit | query | integer | لا | Page size, 1 to 200. 50 when not sent. |
offset | query | integer | لا | Orders to skip, for the next page. |
الإجابة 200 · Order
مثال
{
"success": true,
"data": [
{
"id": "3f6c1d2e-8a4b-4c5d-9e6f-7a8b9c0d1e2f",
"orderNumber": "ORD-1042",
"orderStatus": "In Progress",
"paymentStatus": "Pending",
"orderType": "Takeaway",
"orderDate": "2026-11-21T12:30:00.000Z",
"branchId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"tableId": null,
"customerDetails": {
"name": "Sara Ahmed",
"phone": "+971501234567",
"email": null,
"guests": null
},
"items": [
{
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"name": "Chicken shawarma",
"quantity": 2,
"price": "30.000000"
}
],
"bills": {
"subtotal": 28.57,
"discountAmount": 0,
"total": 28.57,
"tax": 1.43,
"taxRate": 5,
"serviceChargeAmount": 0,
"totalWithTax": 30,
"customerDeliveryFee": 0,
"tipAmount": 0,
"pricesIncludeTax": true
},
"currencySymbol": "AED",
"externalOrderId": "WEB-88213",
"notes": null
}
],
"pagination": {
"total": 1,
"limit": 50,
"offset": 0,
"hasMore": false
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/orders?status=In%20Progress%2CReady&from=2026-11-01" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/orders?status=In%20Progress%2CReady&from=2026-11-01", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
Place an order
الصلاحية: orders:write
Places an order for the key's branch. The server prices every line from the branch menu (prices you send are not used) and a key cannot give discounts or change prices. The branch needs an open shift. How the order starts is set per key in Automation > APIs: by default it waits for staff to accept it in the app (Pending Approval); a key set to send orders straight to the kitchen creates them In Progress, unless you send orderStatus Pending Approval. orderStatus can only make it stricter: In Progress from a key that waits for approval still gives Pending Approval (no error; the answer shows the real status). Send an Idempotency-Key header so a retry never creates a second order. The order counts toward the plan's monthly order limit.
المعاملات
| الاسم | الموضع | النوع | مطلوب | الوصف |
|---|
Idempotency-Key | header | string | لا | 8 to 64 letters, digits, - or _. The same key again returns the first order (200, replayed) instead of a second one. |
{
"orderType": "Takeaway",
"customerDetails": {
"name": "Sara Ahmed",
"phone": "+971501234567"
},
"externalOrderId": "WEB-88213",
"items": [
{
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"quantity": 2,
"notes": "No pickles"
}
]
}
الإجابة 201 · Order
مثال
{
"success": true,
"message": "Order created!",
"data": {
"id": "3f6c1d2e-8a4b-4c5d-9e6f-7a8b9c0d1e2f",
"orderNumber": "ORD-1042",
"orderStatus": "Pending Approval",
"paymentStatus": "Pending",
"orderType": "Takeaway",
"orderDate": "2026-11-21T12:30:00.000Z",
"branchId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"tableId": null,
"customerDetails": {
"name": "Sara Ahmed",
"phone": "+971501234567",
"email": null,
"guests": null
},
"items": [
{
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"name": "Chicken shawarma",
"quantity": 2,
"price": "30.000000"
}
],
"bills": {
"subtotal": 28.57,
"discountAmount": 0,
"total": 28.57,
"tax": 1.43,
"taxRate": 5,
"serviceChargeAmount": 0,
"totalWithTax": 30,
"customerDeliveryFee": 0,
"tipAmount": 0,
"pricesIncludeTax": true
},
"currencySymbol": "AED",
"externalOrderId": "WEB-88213",
"notes": null
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN). The plan's monthly order limit is reached (PLAN_LIMIT_REACHED, or PLAN_LIMIT_REACTIVATION).409 The change conflicts with the current state (CONFLICT, or a more specific code).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X POST "https://your-restaurant.cloudpos4u.com/api/v1/orders" \
-H "X-API-Key: $CLOUDPOS_API_KEY" \
-H "Idempotency-Key: web-88213-1" \
-H "Content-Type: application/json" \
-d '{"orderType":"Takeaway","customerDetails":{"name":"Sara Ahmed","phone":"+971501234567"},"externalOrderId":"WEB-88213","items":[{"dishId":"9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e","quantity":2,"notes":"No pickles"}]}'
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/orders", {
method: "POST",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY,
"Idempotency-Key": "web-88213-1",
"Content-Type": "application/json"
},
body: JSON.stringify({
"orderType": "Takeaway",
"customerDetails": {
"name": "Sara Ahmed",
"phone": "+971501234567"
},
"externalOrderId": "WEB-88213",
"items": [
{
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"quantity": 2,
"notes": "No pickles"
}
]
})
});
const result = await response.json();
Price a cart
الصلاحية: orders:write
Prices the lines exactly as POST /orders would (menu prices, deals, tax and service charge of the branch) and saves nothing. Use it to show the customer the total before placing the order.
{
"orderType": "Takeaway",
"items": [
{
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"quantity": 2
}
]
}
مثال
{
"success": true,
"data": {
"currency": "AED",
"decimals": 2,
"orderType": "Takeaway",
"subtotal": 28.57,
"discountAmount": 0,
"total": 28.57,
"taxRate": 5,
"tax": 1.43,
"serviceChargeRate": 0,
"serviceChargeAmount": 0,
"customerDeliveryFee": 0,
"totalWithTax": 30,
"tipAmount": 0,
"amountDue": 30,
"pricesIncludeTax": true,
"appliedDeals": [],
"lines": [
{
"index": 0,
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"quantity": 2
}
]
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).409 The change conflicts with the current state (CONFLICT, or a more specific code).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X POST "https://your-restaurant.cloudpos4u.com/api/v1/orders/quote" \
-H "X-API-Key: $CLOUDPOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"orderType":"Takeaway","items":[{"dishId":"9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e","quantity":2}]}'
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/orders/quote", {
method: "POST",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
"orderType": "Takeaway",
"items": [
{
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"quantity": 2
}
]
})
});
const result = await response.json();
Get an order
الصلاحية: orders:read
One order of the key's branch. An order of another branch answers 404.
المعاملات
| الاسم | الموضع | النوع | مطلوب | الوصف |
|---|
id | path | string | نعم | The order id. |
الإجابة 200 · Order
مثال
{
"success": true,
"data": {
"id": "3f6c1d2e-8a4b-4c5d-9e6f-7a8b9c0d1e2f",
"orderNumber": "ORD-1042",
"orderStatus": "In Progress",
"paymentStatus": "Pending",
"orderType": "Takeaway",
"orderDate": "2026-11-21T12:30:00.000Z",
"branchId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"tableId": null,
"customerDetails": {
"name": "Sara Ahmed",
"phone": "+971501234567",
"email": null,
"guests": null
},
"items": [
{
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"name": "Chicken shawarma",
"quantity": 2,
"price": "30.000000"
}
],
"bills": {
"subtotal": 28.57,
"discountAmount": 0,
"total": 28.57,
"tax": 1.43,
"taxRate": 5,
"serviceChargeAmount": 0,
"totalWithTax": 30,
"customerDeliveryFee": 0,
"tipAmount": 0,
"pricesIncludeTax": true
},
"currencySymbol": "AED",
"externalOrderId": "WEB-88213",
"notes": null
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).404 Not found in the key's branch (NOT_FOUND).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/orders/{id}" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/orders/{id}", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
Reports
POST/api/v1/reports/exportsStart a report export
الصلاحية: reports:read
Starts a background export of a ready or saved report as csv, xlsx (one sheet per currency, numbers with the currency's decimals) or pdf, with the same rules as POST /reports/run. Answers 202 with the export id; poll GET /reports/exports/{id}. At most 3 exports in progress per key and 100 a day per restaurant (429 REPORT_EXPORT_BUSY / REPORT_EXPORT_DAILY_LIMIT).
{
"templateId": "branchComparison",
"startDate": "2026-11-01",
"endDate": "2026-11-30",
"format": "xlsx",
"language": "en"
}
مثال
{
"success": true,
"data": {
"id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"status": "queued",
"format": "xlsx",
"source": "api",
"templateId": "branchComparison",
"savedReportId": null,
"fileName": null,
"sizeBytes": null,
"rowCount": null,
"createdAt": "2026-11-30T08:00:00.000Z",
"completedAt": null,
"expiresAt": null,
"error": null,
"download": null
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).409 The change conflicts with the current state (CONFLICT, or a more specific code).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X POST "https://your-restaurant.cloudpos4u.com/api/v1/reports/exports" \
-H "X-API-Key: $CLOUDPOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"templateId":"branchComparison","startDate":"2026-11-01","endDate":"2026-11-30","format":"xlsx","language":"en"}'
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reports/exports", {
method: "POST",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
"templateId": "branchComparison",
"startDate": "2026-11-01",
"endDate": "2026-11-30",
"format": "xlsx",
"language": "en"
})
});
const result = await response.json();
GET/api/v1/reports/exports/{id}Get a report export
الصلاحية: reports:read
The status of an export this key started: queued, running, done, failed (with error.code) or expired. When done, download.url is a signed link on this host that works for 15 minutes without the API key; call again for a fresh one. Files are deleted after 7 days. Another key's export answers 404.
المعاملات
| الاسم | الموضع | النوع | مطلوب | الوصف |
|---|
id | path | string | نعم | The export id from POST /reports/exports. |
مثال
{
"success": true,
"data": {
"id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"status": "done",
"format": "xlsx",
"source": "api",
"templateId": "branchComparison",
"savedReportId": null,
"fileName": "report-branchComparison-2026-11-01-2026-11-30.xlsx",
"sizeBytes": 8421,
"rowCount": 2,
"createdAt": "2026-11-30T08:00:00.000Z",
"completedAt": "2026-11-30T08:00:04.000Z",
"expiresAt": "2026-12-07T08:00:04.000Z",
"error": null,
"download": {
"url": "/api/reports/exports/5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f/file?expires=1764490504&sig=AbC123",
"expiresAt": "2026-11-30T08:15:04.000Z"
}
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).404 Not found in the key's branch (NOT_FOUND).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/reports/exports/{id}" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reports/exports/{id}", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
GET/api/v1/reports/live-ordersGet the live orders
الصلاحية: reports:read
The open orders of the key's branch right now (not completed or cancelled), newest first, at most 50. meta.truncated says when there are more.
الإجابة 200 · Order
مثال
{
"success": true,
"data": [
{
"id": "3f6c1d2e-8a4b-4c5d-9e6f-7a8b9c0d1e2f",
"orderNumber": "ORD-1042",
"orderStatus": "In Progress",
"paymentStatus": "Pending",
"orderType": "Takeaway",
"orderDate": "2026-11-21T12:30:00.000Z",
"branchId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"tableId": null,
"customerDetails": {
"name": "Sara Ahmed",
"phone": "+971501234567",
"email": null,
"guests": null
},
"items": [
{
"dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
"name": "Chicken shawarma",
"quantity": 2,
"price": "30.000000"
}
],
"bills": {
"subtotal": 28.57,
"discountAmount": 0,
"total": 28.57,
"tax": 1.43,
"taxRate": 5,
"serviceChargeAmount": 0,
"totalWithTax": 30,
"customerDeliveryFee": 0,
"tipAmount": 0,
"pricesIncludeTax": true
},
"currencySymbol": "AED",
"externalOrderId": "WEB-88213",
"notes": null
}
],
"meta": {
"limit": 50,
"truncated": false
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/reports/live-orders" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reports/live-orders", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
Run a ready or saved report
الصلاحية: reports:read
Runs a ready report (templateId) or a saved report (savedReportId) for a period of business days (each branch's time zone and day-close cut-off, at most 366 days) across the key's allowed branches, or the branchIds you send (a branch the key may not read is 403 BRANCH_FORBIDDEN). Rows and totals are per currency; amounts in different currencies are never added. Figures the key may not see answer 403 REPORT_FIELD_FORBIDDEN. A saved report needs the plan's custom report builder. The same numbers as the app.
{
"templateId": "salesSummary",
"startDate": "2026-11-01",
"endDate": "2026-11-30",
"branchIds": [
"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"
]
}
مثال
{
"success": true,
"data": {
"rows": [
{
"key": "[\"AED\",\"2026-11-01\"]",
"currency": "AED",
"dims": {
"businessDate": "2026-11-01"
},
"values": {
"netSales": 1250.5,
"saleCount": 48
}
}
],
"page": {
"page": 1,
"limit": 100,
"total": 30,
"hasMore": false
},
"totals": [
{
"currency": "AED",
"decimals": 2,
"values": {
"netSales": 38420.75,
"saleCount": 1460
}
},
{
"currency": "KWD",
"decimals": 3,
"values": {
"netSales": 912.375,
"saleCount": 210
}
}
],
"converted": null,
"templateId": "salesSummary"
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).409 The change conflicts with the current state (CONFLICT, or a more specific code).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X POST "https://your-restaurant.cloudpos4u.com/api/v1/reports/run" \
-H "X-API-Key: $CLOUDPOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"templateId":"salesSummary","startDate":"2026-11-01","endDate":"2026-11-30","branchIds":["1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"]}'
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reports/run", {
method: "POST",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
"templateId": "salesSummary",
"startDate": "2026-11-01",
"endDate": "2026-11-30",
"branchIds": [
"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"
]
})
});
const result = await response.json();
GET/api/v1/reports/sales-summaryGet the sales summary
الصلاحية: reports:read
Net sales, order counts, refunds and the payment mix of the key's branch for a period of business days, with the previous period for comparison. The same figures as the app's Home dashboard.
المعاملات
| الاسم | الموضع | النوع | مطلوب | الوصف |
|---|
period | query | string | لا | today (the default), yesterday, last7Days, last30Days, thisWeek, thisMonth, lastMonth, thisYear, all or custom. |
startDate | query | string | لا | For period=custom: the first business date (YYYY-MM-DD). |
endDate | query | string | لا | For period=custom: the last business date (YYYY-MM-DD). |
مثال
{
"success": true,
"data": {
"period": "today",
"generatedAt": "2026-11-21T15:00:00.000Z",
"ranges": [],
"current": {
"netSales": 1250.5,
"refunds": 0,
"orderCount": 48,
"settledCount": 45,
"averageCheck": 27.79,
"cancelledCount": 1
},
"previous": {
"netSales": 1100,
"orderCount": 44
},
"salesTrend": 13.68,
"ordersTrend": 9.09,
"mixedCurrency": false,
"byCurrency": [],
"recentOrders": []
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/reports/sales-summary?period=today" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reports/sales-summary?period=today", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
GET/api/v1/reports/templatesList the ready reports
الصلاحية: reports:read
The ready reports (the same as the app's Reports screen) with the figures and splits each shows, whether this key may run it, and the branches the key reads reports for: its own branch plus the branches chosen for it in Automation > APIs.
مثال
{
"success": true,
"data": {
"templates": [
{
"id": "salesSummary",
"group": "sales",
"measures": [
"grossSales",
"discounts",
"sales",
"refunds",
"netSales",
"outputTax",
"tips",
"saleCount",
"averageCheck"
],
"dimensions": [
"businessDate"
],
"allowed": true
},
{
"id": "labourVsSales",
"group": "costs",
"measures": [
"netSales",
"labour"
],
"dimensions": [
"branch",
"businessDate"
],
"allowed": false
}
],
"branchIds": [
"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"
]
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/reports/templates" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reports/templates", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
Reservations
List reservations
الصلاحية: reservations:read
The reservations of the key's branch. Needs the Reservation System plan feature (included in Ultimate).
المعاملات
| الاسم | الموضع | النوع | مطلوب | الوصف |
|---|
status | query | string | لا | One of Requested, Declined, Pending, Confirmed, Seated, Completed, Cancelled, No Show. |
from | query | string | لا | Reservations ending after this date-time (ISO 8601). |
to | query | string | لا | Reservations starting before this date-time (ISO 8601). |
مثال
{
"success": true,
"data": [
{
"id": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"reservationNumber": "RSV-0031",
"customerName": "Omar Khan",
"customerPhone": "+971551112233",
"guestCount": 4,
"startsAt": "2026-11-22T17:00:00.000Z",
"endsAt": "2026-11-22T19:00:00.000Z",
"status": "Confirmed",
"scope": "Tables",
"floorId": null,
"notes": "Window seat",
"branchId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"source": "Staff"
}
]
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN). PLAN_FEATURE_REQUIRED here can also mean the plan lacks Reservations.429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/reservations?from=2026-11-22T00%3A00%3A00Z&to=2026-11-23T00%3A00%3A00Z" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reservations?from=2026-11-22T00%3A00%3A00Z&to=2026-11-23T00%3A00%3A00Z", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
Create a reservation
الصلاحية: reservations:write
Books tables (or a whole floor) of the key's branch. Overlapping bookings of the same table are refused with 409.
{
"customerName": "Omar Khan",
"customerPhone": "+971551112233",
"guestCount": 4,
"startsAt": "2026-11-22T17:00:00Z",
"endsAt": "2026-11-22T19:00:00Z",
"tableIds": [
"7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
],
"notes": "Window seat"
}
مثال
{
"success": true,
"message": "Reservation created.",
"data": {
"id": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"reservationNumber": "RSV-0031",
"customerName": "Omar Khan",
"customerPhone": "+971551112233",
"guestCount": 4,
"startsAt": "2026-11-22T17:00:00.000Z",
"endsAt": "2026-11-22T19:00:00.000Z",
"status": "Confirmed",
"scope": "Tables",
"floorId": null,
"notes": "Window seat",
"branchId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"source": "Staff"
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN). PLAN_FEATURE_REQUIRED here can also mean the plan lacks Reservations.409 The change conflicts with the current state (CONFLICT, or a more specific code).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X POST "https://your-restaurant.cloudpos4u.com/api/v1/reservations" \
-H "X-API-Key: $CLOUDPOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"customerName":"Omar Khan","customerPhone":"+971551112233","guestCount":4,"startsAt":"2026-11-22T17:00:00Z","endsAt":"2026-11-22T19:00:00Z","tableIds":["7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f"],"notes":"Window seat"}'
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reservations", {
method: "POST",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
"customerName": "Omar Khan",
"customerPhone": "+971551112233",
"guestCount": 4,
"startsAt": "2026-11-22T17:00:00Z",
"endsAt": "2026-11-22T19:00:00Z",
"tableIds": [
"7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
],
"notes": "Window seat"
})
});
const result = await response.json();
PATCH/api/v1/reservations/{id}Change a reservation's status
الصلاحية: reservations:write
Moves a reservation to another status (for example Seated, Completed, Cancelled, No Show). A move the reservation cannot make answers 409. A guest's online booking request (Requested) can only be cancelled here; staff confirm or decline it in the app.
المعاملات
| الاسم | الموضع | النوع | مطلوب | الوصف |
|---|
id | path | string | نعم | The reservation id. |
{
"status": "Seated"
}
مثال
{
"success": true,
"data": {
"id": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"reservationNumber": "RSV-0031",
"customerName": "Omar Khan",
"customerPhone": "+971551112233",
"guestCount": 4,
"startsAt": "2026-11-22T17:00:00.000Z",
"endsAt": "2026-11-22T19:00:00.000Z",
"status": "Seated",
"scope": "Tables",
"floorId": null,
"notes": "Window seat",
"branchId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"source": "Staff"
}
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN). PLAN_FEATURE_REQUIRED here can also mean the plan lacks Reservations.404 Not found in the key's branch (NOT_FOUND).409 The change conflicts with the current state (CONFLICT, or a more specific code).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X PATCH "https://your-restaurant.cloudpos4u.com/api/v1/reservations/{id}" \
-H "X-API-Key: $CLOUDPOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"Seated"}'
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/reservations/{id}", {
method: "PATCH",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
"status": "Seated"
})
});
const result = await response.json();
Tables
List tables
الصلاحية: tables:read
The tables of the key's branch with their state and floor.
الإجابة 200 · Table
مثال
{
"success": true,
"data": [
{
"id": "7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
"tableNo": "T4",
"status": "Available",
"seats": 4,
"floor": {
"id": "5e2a9c1b-7d3f-4a5b-9c8d-0e1f2a3b4c5d",
"name": "Ground floor"
},
"currentOrderId": null
}
]
}
الأخطاء
400 The request is not valid (VALIDATION_ERROR, or a more specific code).401 No API key, or the key is not valid or has expired (API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED).403 The key lacks the scope (API_SCOPE_NOT_ALLOWED), the plan does not include a feature this endpoint needs (PLAN_FEATURE_REQUIRED), the module is switched off for the restaurant (FORBIDDEN) or the branch is not the key's (BRANCH_FORBIDDEN).429 Too many requests for the key or the restaurant (RATE_LIMITED). Wait Retry-After seconds.503 The key could not be checked just now (SERVER_BUSY). Try again in a moment.
curl
curl -X GET "https://your-restaurant.cloudpos4u.com/api/v1/tables" \
-H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/tables", {
method: "GET",
headers: {
"X-API-Key": process.env.CLOUDPOS_API_KEY
}
});
const result = await response.json();
أشكال البيانات
Customer
| الاسم | النوع | مطلوب | الوصف |
|---|
id | string | نعم | A UUID. |
name | string | null | لا | |
phone | string | null | لا | |
email | string | null | لا | |
customerTypes | array of string | لا | |
loyaltyPoints | number | لا | |
loyaltyTier | string | null | لا | |
preferredLanguage | string | null | لا | |
marketingConsent | boolean | لا | |
createdAt | string | null | لا | |
Dish
A dish as the key's branch sells it.
| الاسم | النوع | مطلوب | الوصف |
|---|
id | string | نعم | A UUID. |
name | string | نعم | |
description | string | null | لا | |
price | number | null | نعم | The branch's price in the branch currency. |
image | string | null | لا | |
categoryId | string | null | لا | |
category | object | null | لا | |
isAvailable | boolean | نعم | |
preparationTime | number | null | لا | Minutes. |
isFeatured | boolean | لا | |
Error
Every error answer. `code` is stable and machine-readable; `message` is English text for a person.
| الاسم | النوع | مطلوب | الوصف |
|---|
status | integer | نعم | |
message | string | نعم | |
code | string | لا | For example API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED, API_SCOPE_NOT_ALLOWED, PLAN_FEATURE_REQUIRED, PLAN_LIMIT_REACHED, FORBIDDEN, BRANCH_FORBIDDEN, RATE_LIMITED, VALIDATION_ERROR, NOT_FOUND, CONFLICT, SERVER_BUSY. |
details | object | لا | |
requestId | string | لا | Quote it when you contact support. |
errorStack | string | لا | Always empty in production. |
Order
An order. The fields listed are stable in v1; other fields may appear and can be ignored.
| الاسم | النوع | مطلوب | الوصف |
|---|
id | string | نعم | A UUID. |
orderNumber | string | null | لا | |
orderStatus | string (Pending Approval, In Progress, Ready, Served, On the Way, Delivered, Awaiting Payment, Completed, Cancelled) | نعم | |
paymentStatus | string | نعم | |
orderType | string (Dine-in, Delivery, Takeaway, Staff Meal) | لا | |
orderDate | string | لا | An ISO 8601 date-time (UTC). |
branchId | string | null | لا | |
tableId | string | null | لا | |
checkNumber | integer | null | لا | The check's number at its table (1, 2, 3…) when the table has several checks. |
splitGroupId | string | null | لا | Split bill: the same UUID on an order split into separate checks and on every check cut from it (the original order's id). Null when the order was never split. |
splitFromOrderId | string | null | لا | Split bill: on a check cut from another order, that order's UUID; null on the original and on orders never split. Each check has its own payments and tax invoice. |
splitPlan | object | null | لا | Split bill: payer shares of this check, frozen when saved: { version, mode (even, amount or seat), shares: [{ key, label, amount, seatKey? }] }. Amounts exclude tips and add up to the bill. Each share's payments are in the order's payment lines (settlementScope "share", settlementKey = the share's key, tipPortion = that payer's tip). One tax invoice for the order. Null when the check is not shared. |
customerDetails | object | لا | |
items | array of object | نعم | |
bills | object | نعم | |
currencySymbol | string | null | لا | The order's currency code (ISO 4217) when known. |
externalOrderId | string | null | لا | |
notes | string | null | لا | |
OrderCreate
A new order for the key's branch.
| الاسم | النوع | مطلوب | الوصف |
|---|
items | array of OrderLine | نعم | |
orderType | string (Dine-in, Delivery, Takeaway) | لا | Dine-in when not sent. |
tableId | string | لا | For Dine-in: a table id from GET /tables. |
customerDetails | object | لا | |
deliveryAddress | string | لا | Required for Delivery. |
orderStatus | string (In Progress, Pending Approval) | لا | The key's order setting decides how the order starts. The default is Pending Approval: staff accept it in the app first. A key set to send orders straight to the kitchen creates them In Progress unless you ask for Pending Approval. This field can only make it stricter: In Progress from a key that waits for approval still gives Pending Approval. |
externalOrderId | string | لا | Your own reference for the order. |
idempotencyKey | string | لا | Or the Idempotency-Key header: 8 to 64 letters, digits, - or _. Sending the same key again returns the first order instead of a second one. |
notes | string | لا | |
OrderLine
One line of an order you send. The server prices every line from the branch menu: a price you send is not used.
| الاسم | النوع | مطلوب | الوصف |
|---|
dishId | string | نعم | The dish id from GET /menu. |
quantity | number | نعم | More than 0. |
notes | string | لا | A note for the kitchen. |
OrderQuote
What the order would cost now, priced by the server exactly as POST /orders would price it. Nothing is saved. Amounts are numbers rounded to the currency's decimals.
| الاسم | النوع | مطلوب | الوصف |
|---|
currency | string | null | نعم | ISO 4217 code of the branch currency. |
decimals | integer | نعم | |
orderType | string | لا | |
subtotal | number | نعم | |
discountAmount | number | لا | |
total | number | نعم | |
taxRate | number | لا | |
tax | number | نعم | |
serviceChargeRate | number | لا | |
serviceChargeAmount | number | لا | |
customerDeliveryFee | number | لا | |
totalWithTax | number | نعم | |
tipAmount | number | لا | |
amountDue | number | نعم | |
pricesIncludeTax | boolean | لا | |
appliedDeals | array of object | لا | |
lines | array of object | نعم | |
RateLimited
429 Too Many Requests. Wait for the Retry-After header (seconds) before trying again.
| الاسم | النوع | مطلوب | الوصف |
|---|
status | integer (429) | نعم | |
code | string (RATE_LIMITED) | نعم | |
message | string | نعم | |
details | object | لا | |
ReportExport
A background report export. When status is done, download.url (on this API host, no key needed) works for 15 minutes; ask again for a fresh link. Files are kept 7 days.
| الاسم | النوع | مطلوب | الوصف |
|---|
id | string | نعم | |
status | string (queued, running, done, failed, expired) | نعم | |
format | string (csv, xlsx, pdf) | لا | |
source | string | لا | |
templateId | string | null | لا | |
savedReportId | string | null | لا | |
fileName | string | null | لا | |
sizeBytes | integer | null | لا | |
rowCount | integer | null | لا | |
createdAt | string | لا | |
completedAt | string | null | لا | |
expiresAt | string | null | لا | |
error | object | null | لا | |
download | object | null | لا | |
ReportRequest
A ready report (templateId) or a saved report (savedReportId) for a period of business days and the key's branches.
| الاسم | النوع | مطلوب | الوصف |
|---|
templateId | string | لا | A ready report id from GET /reports/templates. |
savedReportId | string | لا | A saved report the person who created the key can open. |
startDate | string | لا | The first business date (YYYY-MM-DD). At most 366 days. |
endDate | string | لا | The last business date (YYYY-MM-DD). |
branchIds | array of string | لا | Branches within the key's allowed branches; none = all of them. |
refundBasis | string (refundDay, saleDay) | لا | refundDay (default): refunds on the day they were made; saleDay: against the sale's day. |
currencyMode | string (perCurrency, converted) | لا | Totals per currency always; converted adds one total at the owner's monthly rates. |
grain | string (day, week, month) | لا | |
page | integer | لا | |
limit | integer | لا | Rows per page, at most 500. |
format | string (csv, xlsx, pdf) | لا | Exports only. |
language | string | لا | Exports only: the file's language (en, ar, ur, …). |
ReportResult
Report rows and totals PER CURRENCY: amounts in different currencies are never added together.
| الاسم | النوع | مطلوب | الوصف |
|---|
definition | object | لا | |
columns | object | لا | |
rows | array of object | نعم | |
page | object | لا | |
totals | array of object | نعم | |
converted | object | null | لا | |
warnings | array of any | لا | |
templateId | string | null | لا | |
savedReport | object | null | لا | |
labels | object | لا | |
ReportTemplates
The ready reports and whether this key may run each (a key reads sales, refunds, tax collected, payments and items; financial and staff figures need staff permissions).
| الاسم | النوع | مطلوب | الوصف |
|---|
templates | array of object | نعم | |
branchIds | array of string | لا | The branches this key reads reports for (its own first). |
Reservation
| الاسم | النوع | مطلوب | الوصف |
|---|
id | string | نعم | A UUID. |
reservationNumber | string | لا | |
customerName | string | نعم | |
customerPhone | string | null | لا | |
guestCount | integer | نعم | |
startsAt | string | نعم | An ISO 8601 date-time (UTC). |
endsAt | string | نعم | An ISO 8601 date-time (UTC). |
status | string (Requested, Declined, Pending, Confirmed, Seated, Completed, Cancelled, No Show) | نعم | |
scope | string (Tables, Floor) | لا | |
floorId | string | null | لا | |
notes | string | null | لا | |
branchId | string | لا | A UUID. |
source | string | لا | |
ReservationCreate
| الاسم | النوع | مطلوب | الوصف |
|---|
customerName | string | نعم | |
customerPhone | string | لا | |
guestCount | integer | نعم | |
startsAt | string | نعم | An ISO 8601 date-time (UTC). |
endsAt | string | نعم | An ISO 8601 date-time (UTC). |
scope | string (Tables, Floor) | لا | Tables (the default) books tableIds; Floor books a whole floor (floorId). |
tableIds | array of string | لا | |
floorId | string | لا | |
status | string (Confirmed, Pending) | لا | Confirmed when not sent. |
notes | string | لا | |
ReservationStatusUpdate
| الاسم | النوع | مطلوب | الوصف |
|---|
status | string (Pending, Confirmed, Seated, Completed, Cancelled, No Show) | نعم | |
SalesSummary
Sales of the key's branch for a period of business days (the branch's own time zone and day cut-off).
| الاسم | النوع | مطلوب | الوصف |
|---|
period | string | نعم | |
generatedAt | string | لا | An ISO 8601 date-time (UTC). |
ranges | array | null | لا | |
current | object | نعم | |
previous | object | null | لا | |
salesTrend | number | null | لا | |
ordersTrend | number | null | لا | |
mixedCurrency | boolean | لا | |
byCurrency | array of object | لا | |
recentOrders | array of object | لا | |
Table
| الاسم | النوع | مطلوب | الوصف |
|---|
id | string | نعم | A UUID. |
tableNo | string | integer | نعم | |
status | string | نعم | For example Available, Booked. |
seats | integer | null | لا | |
floor | object | null | لا | |
currentOrderId | string | null | لا | |
CustomerDishErrorMenuOrderOrderCreateOrderLineOrderQuotePaginationRateLimitedReportExportReportRequestReportResultReportTemplatesReservationReservationCreateReservationStatusUpdateSalesSummaryTable