للمطورين

مرجع واجهة برمجة Cloud POS 4U

يتيح الإصدار 1 من واجهة برمجة Cloud POS 4U لموقعك أو تطبيقك أو نظامك الإداري قراءة قائمة الطعام والطلبات والطاولات والحجوزات والمبيعات لفرع ما، وإنشاء الطلبات والحجوزات. وهو جزء من ميزة الوصول إلى واجهة البرمجة في خطة Ultimate وفي تراخيص النسخة المحلية التي تتضمنها.

تنزيل openapi.jsonOpenAPI 3.1.0 · v1.2.0

البدء

  1. في Cloud POS 4U افتح «الأتمتة» من القائمة الجانبية (ضمن «الذكاء الاصطناعي») ثم تبويب «واجهات البرمجة». تحتاج إلى صلاحية إدارة الإعدادات وخطة تتضمن الوصول إلى واجهة البرمجة والأتمتة التسويقية (كلتاهما في خطة Ultimate).
  2. أنشئ مفتاحًا: اكتب اسمه واختر فرعه والصلاحيات التي يحتاجها فقط. انسخ المفتاح فورًا، فهو يظهر مرة واحدة فقط.
  3. أرسل المفتاح مع كل طلب إلى عنوان مطعمك، مثل 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/v1
  • https://{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_MISSING401لم يُرسل مفتاح.
API_KEY_INVALID401المفتاح غير صحيح أو أُلغي.
API_KEY_EXPIRED401انتهت صلاحية المفتاح.
API_SCOPE_NOT_ALLOWED403المفتاح لا يملك الصلاحية التي تحتاجها نقطة الوصول، أو أنه رمز أتمتة متوقف.
PLAN_FEATURE_REQUIRED403الخطة لا تتضمن ميزة تحتاجها نقطة الوصول: الوصول إلى واجهة البرمجة، أو الحجوزات لمسارات /reservations.
PLAN_LIMIT_REACHED403تم بلوغ الحد الشهري للطلبات في الخطة (POST /orders).
FORBIDDEN403الوحدة التي تستخدمها نقطة الوصول (الطلبات) متوقفة لدى المطعم.
BRANCH_FORBIDDEN403ذكر الطلب فرعًا غير فرع المفتاح.
VALIDATION_ERROR400قيمة ناقصة أو غير صالحة. بعض الإجابات تستخدم رمزًا أدق.
NOT_FOUND404لا يوجد شيء بهذا المعرّف في فرع المفتاح.
CONFLICT409التغيير يتعارض مع الحالة الحالية، مثل طاولة محجوزة مسبقًا.
RATE_LIMITED429طلبات كثيرة جدًا. انتظر مدة Retry-After.
SERVER_BUSY503تعذّر التحقق من المفتاح الآن. أعد المحاولة بعد قليل.

إنشاء الطلبات

  • يسعّر الخادم كل سطر من قائمة الفرع مع عروضه وضريبته ورسوم الخدمة. لا تُستخدم الأسعار التي ترسلها، ولا يستطيع المفتاح منح خصم أو تغيير سعر.
  • استخدم POST /orders/quote لعرض الإجمالي أولًا. وأرسل الرأس Idempotency-Key مع POST /orders حتى لا تنشئ إعادة المحاولة طلبًا ثانيًا.
  • يحتاج الفرع إلى وردية مفتوحة. لكل مفتاح إعداد خاص للطلبات: افتراضيًا تنتظر الطلبات حتى يقبلها الموظفون في التطبيق (Pending Approval). والمفتاح المضبوط على الإرسال مباشرة إلى المطبخ ينشئها بالحالة In Progress ما لم ترسل orderStatus بالقيمة Pending Approval. لا يمكن لـ orderStatus إلا أن يجعلها أكثر تشددًا.

تقسيم النتائج إلى صفحات

يعيد GET /orders صفحة واحدة: limit (من 1 إلى 200، و50 إن لم يُرسل) وoffset. ويعطي الكائن pagination القيم total وlimit وoffset وhasMore.

الإصدارات والإيقاف

هذا هو الإصدار 1 على /api/v1. قد تُضاف حقول ونقاط وصول جديدة في أي وقت، فتجاهل الحقول التي لا تعرفها. التغيير الذي يكسر التوافق يأتي فقط في إصدار جديد يُعلن عنه قبل 6 أشهر على الأقل، وتُعلَّم العمليات القديمة بأنها متوقفة في openapi.json مع سجل تغييرات مؤرخ.

سجل التغييرات

الإصدارالتاريخالوصف
1.2.02026-12-01Orders: 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.02026-11-30Reports: 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.02026-11-21First 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

GET/api/v1/customers

Find a customer

الصلاحية: customers:read

The restaurant's customer with exactly this phone number or email address, or null. Send phone or email.

المعاملات

الاسمالموضعالنوعمطلوبالوصف
phonequerystringلاThe phone number as stored, international format, for example +971501234567.
emailquerystringلاThe email address.

الإجابة 200 · Customer

مثال
{
  "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

GET/api/v1/menu

Get the branch menu

الصلاحية: menu:read

The dishes the key's branch sells now, with the branch's own price (in the branch currency) and availability, and the categories they belong to. A dish with no price in the branch currency is left out, as on the branch's tills.

المعاملات

الاسمالموضعالنوعمطلوبالوصف
categoryquerystringلاOnly the dishes of this category id.

الإجابة 200 · Menu

مثال
{
  "success": true,
  "data": {
    "branchId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
    "dishes": [
      {
        "id": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
        "name": "Chicken shawarma",
        "description": "With garlic sauce",
        "price": 15,
        "image": null,
        "categoryId": "5e2a9c1b-7d3f-4a5b-9c8d-0e1f2a3b4c5d",
        "category": {
          "id": "5e2a9c1b-7d3f-4a5b-9c8d-0e1f2a3b4c5d",
          "name": "Wraps"
        },
        "isAvailable": true,
        "preparationTime": 10,
        "isFeatured": false
      }
    ],
    "categories": [
      {
        "id": "5e2a9c1b-7d3f-4a5b-9c8d-0e1f2a3b4c5d",
        "name": "Wraps"
      }
    ]
  }
}

الأخطاء

  • 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/menu" \
  -H "X-API-Key: $CLOUDPOS_API_KEY"
JavaScript (fetch)
const response = await fetch("https://your-restaurant.cloudpos4u.com/api/v1/menu", {
  method: "GET",
  headers: {
      "X-API-Key": process.env.CLOUDPOS_API_KEY
  }
});
const result = await response.json();

Orders

GET/api/v1/orders

List orders

الصلاحية: orders:read

The orders of the key's branch, newest first, one page at a time.

المعاملات

الاسمالموضعالنوعمطلوبالوصف
statusquerystringلاOne order status or a comma-separated list, for example In Progress,Ready.
fromquerystringلاFirst business date (YYYY-MM-DD), in the branch's own time zone and day cut-off.
toquerystringلاLast business date (YYYY-MM-DD), inclusive. from and to go together; one alone means that single day.
paymentStatusquerystringلاOne or more of Pending, Collected, Paid, Partially Paid, Partially Refunded, Refunded, Failed, Cancelled (comma-separated), or unpaid.
orderTypequerystringلاOne or more of Dine-in, Delivery, Takeaway, Staff Meal (comma-separated).
limitqueryintegerلاPage size, 1 to 200. 50 when not sent.
offsetqueryintegerلا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();
POST/api/v1/orders

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-Keyheaderstringلا8 to 64 letters, digits, - or _. The same key again returns the first order (200, replayed) instead of a second one.

محتوى الطلب OrderCreate

{
  "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();
POST/api/v1/orders/quote

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.

محتوى الطلب OrderCreate

{
  "orderType": "Takeaway",
  "items": [
    {
      "dishId": "9b1d7c3e-2f4a-4b6c-8d0e-1f2a3b4c5d6e",
      "quantity": 2
    }
  ]
}

الإجابة 200 · OrderQuote

مثال
{
  "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/api/v1/orders/{id}

Get an order

الصلاحية: orders:read

One order of the key's branch. An order of another branch answers 404.

المعاملات

الاسمالموضعالنوعمطلوبالوصف
idpathstringنعم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/exports

Start 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).

محتوى الطلب ReportRequest

{
  "templateId": "branchComparison",
  "startDate": "2026-11-01",
  "endDate": "2026-11-30",
  "format": "xlsx",
  "language": "en"
}

الإجابة 202 · ReportExport

مثال
{
  "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.

المعاملات

الاسمالموضعالنوعمطلوبالوصف
idpathstringنعمThe export id from POST /reports/exports.

الإجابة 200 · ReportExport

مثال
{
  "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-orders

Get 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();
POST/api/v1/reports/run

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.

محتوى الطلب ReportRequest

{
  "templateId": "salesSummary",
  "startDate": "2026-11-01",
  "endDate": "2026-11-30",
  "branchIds": [
    "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
    "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"
  ]
}

الإجابة 200 · ReportResult

مثال
{
  "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-summary

Get 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.

المعاملات

الاسمالموضعالنوعمطلوبالوصف
periodquerystringلاtoday (the default), yesterday, last7Days, last30Days, thisWeek, thisMonth, lastMonth, thisYear, all or custom.
startDatequerystringلاFor period=custom: the first business date (YYYY-MM-DD).
endDatequerystringلاFor period=custom: the last business date (YYYY-MM-DD).

الإجابة 200 · SalesSummary

مثال
{
  "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/templates

List 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.

الإجابة 200 · ReportTemplates

مثال
{
  "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

GET/api/v1/reservations

List reservations

الصلاحية: reservations:read

The reservations of the key's branch. Needs the Reservation System plan feature (included in Ultimate).

المعاملات

الاسمالموضعالنوعمطلوبالوصف
statusquerystringلاOne of Requested, Declined, Pending, Confirmed, Seated, Completed, Cancelled, No Show.
fromquerystringلاReservations ending after this date-time (ISO 8601).
toquerystringلاReservations starting before this date-time (ISO 8601).

الإجابة 200 · Reservation

مثال
{
  "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();
POST/api/v1/reservations

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.

محتوى الطلب ReservationCreate

{
  "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"
}

الإجابة 201 · Reservation

مثال
{
  "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.

المعاملات

الاسمالموضعالنوعمطلوبالوصف
idpathstringنعمThe reservation id.

محتوى الطلب ReservationStatusUpdate

{
  "status": "Seated"
}

الإجابة 200 · Reservation

مثال
{
  "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

GET/api/v1/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

الاسمالنوعمطلوبالوصف
idstringنعمA UUID.
namestring | nullلا
phonestring | nullلا
emailstring | nullلا
customerTypesarray of stringلا
loyaltyPointsnumberلا
loyaltyTierstring | nullلا
preferredLanguagestring | nullلا
marketingConsentbooleanلا
createdAtstring | nullلا

Dish

A dish as the key's branch sells it.

الاسمالنوعمطلوبالوصف
idstringنعمA UUID.
namestringنعم
descriptionstring | nullلا
pricenumber | nullنعمThe branch's price in the branch currency.
imagestring | nullلا
categoryIdstring | nullلا
categoryobject | nullلا
isAvailablebooleanنعم
preparationTimenumber | nullلاMinutes.
isFeaturedbooleanلا

Error

Every error answer. `code` is stable and machine-readable; `message` is English text for a person.

الاسمالنوعمطلوبالوصف
statusintegerنعم
messagestringنعم
codestringلا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.
detailsobjectلا
requestIdstringلاQuote it when you contact support.
errorStackstringلاAlways empty in production.

Menu

الاسمالنوعمطلوبالوصف
branchIdstring | nullنعم
dishesarray of Dishنعم
categoriesarray of objectنعم

Order

An order. The fields listed are stable in v1; other fields may appear and can be ignored.

الاسمالنوعمطلوبالوصف
idstringنعمA UUID.
orderNumberstring | nullلا
orderStatusstring (Pending Approval, In Progress, Ready, Served, On the Way, Delivered, Awaiting Payment, Completed, Cancelled)نعم
paymentStatusstringنعم
orderTypestring (Dine-in, Delivery, Takeaway, Staff Meal)لا
orderDatestringلاAn ISO 8601 date-time (UTC).
branchIdstring | nullلا
tableIdstring | nullلا
checkNumberinteger | nullلاThe check's number at its table (1, 2, 3…) when the table has several checks.
splitGroupIdstring | 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.
splitFromOrderIdstring | 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.
splitPlanobject | 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.
customerDetailsobjectلا
itemsarray of objectنعم
billsobjectنعم
currencySymbolstring | nullلاThe order's currency code (ISO 4217) when known.
externalOrderIdstring | nullلا
notesstring | nullلا

OrderCreate

A new order for the key's branch.

الاسمالنوعمطلوبالوصف
itemsarray of OrderLineنعم
orderTypestring (Dine-in, Delivery, Takeaway)لاDine-in when not sent.
tableIdstringلاFor Dine-in: a table id from GET /tables.
customerDetailsobjectلا
deliveryAddressstringلاRequired for Delivery.
orderStatusstring (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.
externalOrderIdstringلاYour own reference for the order.
idempotencyKeystringلا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.
notesstringلا

OrderLine

One line of an order you send. The server prices every line from the branch menu: a price you send is not used.

الاسمالنوعمطلوبالوصف
dishIdstringنعمThe dish id from GET /menu.
quantitynumberنعمMore than 0.
notesstringلا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.

الاسمالنوعمطلوبالوصف
currencystring | nullنعمISO 4217 code of the branch currency.
decimalsintegerنعم
orderTypestringلا
subtotalnumberنعم
discountAmountnumberلا
totalnumberنعم
taxRatenumberلا
taxnumberنعم
serviceChargeRatenumberلا
serviceChargeAmountnumberلا
customerDeliveryFeenumberلا
totalWithTaxnumberنعم
tipAmountnumberلا
amountDuenumberنعم
pricesIncludeTaxbooleanلا
appliedDealsarray of objectلا
linesarray of objectنعم

Pagination

الاسمالنوعمطلوبالوصف
totalintegerنعم
limitintegerنعم
offsetintegerنعم
hasMorebooleanنعم

RateLimited

429 Too Many Requests. Wait for the Retry-After header (seconds) before trying again.

الاسمالنوعمطلوبالوصف
statusinteger (429)نعم
codestring (RATE_LIMITED)نعم
messagestringنعم
detailsobjectلا

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.

الاسمالنوعمطلوبالوصف
idstringنعم
statusstring (queued, running, done, failed, expired)نعم
formatstring (csv, xlsx, pdf)لا
sourcestringلا
templateIdstring | nullلا
savedReportIdstring | nullلا
fileNamestring | nullلا
sizeBytesinteger | nullلا
rowCountinteger | nullلا
createdAtstringلا
completedAtstring | nullلا
expiresAtstring | nullلا
errorobject | nullلا
downloadobject | nullلا

ReportRequest

A ready report (templateId) or a saved report (savedReportId) for a period of business days and the key's branches.

الاسمالنوعمطلوبالوصف
templateIdstringلاA ready report id from GET /reports/templates.
savedReportIdstringلاA saved report the person who created the key can open.
startDatestringلاThe first business date (YYYY-MM-DD). At most 366 days.
endDatestringلاThe last business date (YYYY-MM-DD).
branchIdsarray of stringلاBranches within the key's allowed branches; none = all of them.
refundBasisstring (refundDay, saleDay)لاrefundDay (default): refunds on the day they were made; saleDay: against the sale's day.
currencyModestring (perCurrency, converted)لاTotals per currency always; converted adds one total at the owner's monthly rates.
grainstring (day, week, month)لا
pageintegerلا
limitintegerلاRows per page, at most 500.
formatstring (csv, xlsx, pdf)لاExports only.
languagestringلاExports only: the file's language (en, ar, ur, …).

ReportResult

Report rows and totals PER CURRENCY: amounts in different currencies are never added together.

الاسمالنوعمطلوبالوصف
definitionobjectلا
columnsobjectلا
rowsarray of objectنعم
pageobjectلا
totalsarray of objectنعم
convertedobject | nullلا
warningsarray of anyلا
templateIdstring | nullلا
savedReportobject | nullلا
labelsobjectلا

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).

الاسمالنوعمطلوبالوصف
templatesarray of objectنعم
branchIdsarray of stringلاThe branches this key reads reports for (its own first).

Reservation

الاسمالنوعمطلوبالوصف
idstringنعمA UUID.
reservationNumberstringلا
customerNamestringنعم
customerPhonestring | nullلا
guestCountintegerنعم
startsAtstringنعمAn ISO 8601 date-time (UTC).
endsAtstringنعمAn ISO 8601 date-time (UTC).
statusstring (Requested, Declined, Pending, Confirmed, Seated, Completed, Cancelled, No Show)نعم
scopestring (Tables, Floor)لا
floorIdstring | nullلا
notesstring | nullلا
branchIdstringلاA UUID.
sourcestringلا

ReservationCreate

الاسمالنوعمطلوبالوصف
customerNamestringنعم
customerPhonestringلا
guestCountintegerنعم
startsAtstringنعمAn ISO 8601 date-time (UTC).
endsAtstringنعمAn ISO 8601 date-time (UTC).
scopestring (Tables, Floor)لاTables (the default) books tableIds; Floor books a whole floor (floorId).
tableIdsarray of stringلا
floorIdstringلا
statusstring (Confirmed, Pending)لاConfirmed when not sent.
notesstringلا

ReservationStatusUpdate

الاسمالنوعمطلوبالوصف
statusstring (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).

الاسمالنوعمطلوبالوصف
periodstringنعم
generatedAtstringلاAn ISO 8601 date-time (UTC).
rangesarray | nullلا
currentobjectنعم
previousobject | nullلا
salesTrendnumber | nullلا
ordersTrendnumber | nullلا
mixedCurrencybooleanلا
byCurrencyarray of objectلا
recentOrdersarray of objectلا

Table

الاسمالنوعمطلوبالوصف
idstringنعمA UUID.
tableNostring | integerنعم
statusstringنعمFor example Available, Booked.
seatsinteger | nullلا
floorobject | nullلا
currentOrderIdstring | nullلا

CustomerDishErrorMenuOrderOrderCreateOrderLineOrderQuotePaginationRateLimitedReportExportReportRequestReportResultReportTemplatesReservationReservationCreateReservationStatusUpdateSalesSummaryTable