تخطي إلى المحتوى

المطورون · API v1

طوّر إضافة لـ DigiMenu

قدّم طلبًا للوصول إلى API مع شرح الغرض من الاستخدام. بعد موافقة DigiMenu يمكنك الاتصال بإذن المطعم. يشرح هذا الدليل التقديم والتثبيت والتفاصيل التقنية.

آخر تحقق: 27 سبتمبر 202617 عملية

كيف تعمل الإضافات؟

يتطلب الوصول إلى API تقديم طلب وموافقة DigiMenu لكل تطبيق. وضّح غرض التطبيق وسبب حاجته إلى API والبيانات التي سيستخدمها. لا يمكن التثبيت أو الحصول على رموز الوصول أو استخدام Webhooks قبل الموافقة، حتى في وضع TEST. الاشتراك أو الوصول إلى لوحة المطور لا يحل محل هذه الموافقة.

يعمل تطبيقك على خادمك. يمنح مسؤول المطعم الإذن في DigiMenu، ثم يتصل تطبيقك بـ API باستخدام رمز OAuth الخاص بذلك التثبيت ويتلقى Webhooks موقّعة. لا ترفع ملفات الكود أو ZIP إلى خوادم DigiMenu.

عنوان API الأساسي: https://api.digimenu.us/api/v1. يستخدم وضعا TEST وLIVE العنوان نفسه. يقيّد TEST التثبيت بمؤسسة المطور فقط؛ ولا يوفر قاعدة بيانات منفصلة أو وهمية. استخدم مطعمًا مخصصًا للاختبار.

  • يمكنك قراءة القوائم والطاولات وعرض الطلبات وتطوير تكاملات التوصيل.
  • لا تتضمن API نقاط نهاية لتعديل القوائم أو المنتجات، أو إنشاء الطلبات، أو إدارة المخزون وCRM، أو تحصيل المدفوعات وردّها. بعض ميزات تطبيقات DigiMenu غير متاحة لتطبيقات الجهات الخارجية.
  • يعمل التطبيق النموذجي على Node.js 22.18+ دون حزم إضافية، ويشمل اتصال OAuth وقراءة القائمة وتجديد الرموز واستقبال Webhooks الموقّعة.

حساب المطور المستقل

قدّم طلبًا على developers.digimenu.us دون حساب مطعم أو اشتراك. أكّد بريدك ووضّح بياناتك أو شركتك وغرض التطبيق والبيانات المطلوبة. بعد اعتماد المطور يمكنك تقديم تطبيق، ويُراجع كل تطبيق بصورة منفصلة. موافقة الحساب وحدها لا تمنح الوصول إلى API.

أنشئ بيئة اختبار معزولة من إعدادات التطبيق المعتمد. لا تستخدم جداول العملاء وتدعم قراءة قوائم وطاولات وطلبات نموذجية وتغيير حالة توصيل الطلب. لا تحاكي OAuth أو المندوبين أو Webhooks. مفتاح sandbox_ صالح 24 ساعة ولا يعمل على /api/v1 الفعلي. تعيد إعادة التعيين البيانات النموذجية وتلغي المفتاح القديم.

HTTP · sandbox
GET https://api.digimenu.us/api/admin/developer-sandbox/v1/menu
Authorization: Bearer SANDBOX_TOKEN

للاستخدام الفعلي انقل التطبيق المعتمد إلى LIVE. يجب أن يمنح مسؤول المطعم إذنًا منفصلًا عبر OAuth أدناه. حساب المطور المستقل لا يمنح دخول لوحة المطعم. تعليق حساب المطور يوقف وصول تطبيقاته ومفاتيح الاختبار الحالية أيضًا.

تسجيل التطبيق واختباره

افتح developers.digimenu.us بحسابك المستقل المعتمد. يمكن للمطورين بحساب منشأة متابعة استخدام panel.digimenu.us/gelistirici، الذي يتطلب تفعيل Developer & Platform في المؤسسة. تنطبق إعدادات التطبيق أدناه على اللوحتين.

  • أنشئ مسودة طلب للوصول إلى API. اشرح الغرض والبيانات المطلوبة في 40–2000 حرف. لا يمنح clientId الناتج صلاحية الوصول بمفرده.
  • سجّل عنوان إعادة توجيه HTTPS مطابقًا تمامًا، مثل https://app.example/callback. لا تُقبل أحرف البدل أو بيانات الدخول أو أجزاء URL التي تبدأ بـ #. يجب أن تتطابق الشرطة المائلة النهائية أيضًا.
  • اختر menu:read وorders:read وwebhooks:manage للتطبيق النموذجي. تحقّق من الصلاحيات الممنوحة في كل استجابة للرموز.
  • احفظ الغرض وعناوين إعادة التوجيه والصلاحيات، ثم أرسل الطلب للمراجعة. بعد موافقة DigiMenu يمكنك إنشاء client_secret اختياري. إذا أنشأته، يصبح إرساله إلزاميًا عند استبدال الرمز وتجديده، ويُعرض مرة واحدة فقط.
  • بعد الموافقة، امنح الإذن لمطعم اختبار تابع لمؤسستك في وضع TEST. استخدم نطاق HTTPS خاصًا بك أو نفق HTTPS لعناوين العودة وWebhooks. لا يمكن تسجيل عناوين إعادة توجيه HTTP على localhost.
starter.env
APP_ORIGIN=https://eklenti.example
CLIENT_ID=YOUR_CLIENT_ID
SCOPES="menu:read orders:read webhooks:manage"
# Only if a secret was created:
# CLIENT_SECRET=YOUR_CLIENT_SECRET
# Set after registering the webhook receiver:
# WEBHOOK_SECRET=YOUR_WEBHOOK_SECRET
PORT=8787
INBOX_DIR=./webhook-inbox
Terminal
node --env-file=starter.env digimenu-starter.mjs
# HTTPS proxy/tunnel → http://127.0.0.1:8787
# Open https://eklenti.example/connect

النموذج مخصص للتطوير: تُحفظ الجلسات والرموز في الذاكرة وتحتاج إلى إعادة التفويض بعد إعادة التشغيل، وتُكتب أحداث Webhooks على القرص المحلي. قبل التشغيل الفعلي أضف تسجيل دخول المستخدمين، وتخزينًا دائمًا ومشفّرًا للرموز، وربط المؤسسات بالتثبيتات، وطابور مهام دائمًا وسياسة للاحتفاظ بالبيانات. لا تضف starter.env إلى Git.

OAuth وPKCE

استخدام PKCE S256 إلزامي لجميع العملاء. أنشئ code_verifier وstate جديدين لكل محاولة اتصال واربطهما بجلسة المستخدم على الخادم. يجب أن يكون طول verifier بين 43 و128 حرفًا. تحقّق من state قبل استبدال رمز التفويض. رمز التفويض صالح للاستخدام مرة واحدة ولمدة 60 ثانية.

Node.js
import { randomBytes, createHash } from 'node:crypto';
const verifier = randomBytes(32).toString('base64url');
const state = randomBytes(32).toString('base64url');
const challenge = createHash('sha256').update(verifier).digest('base64url');
// Store verifier + state in this user's server session before redirecting.
const url = new URL('https://panel.digimenu.us/yetkilendir');
url.search = new URLSearchParams({
  client_id: process.env.CLIENT_ID,
  redirect_uri: 'https://eklenti.example/callback',
  scope: 'menu:read orders:read webhooks:manage',
  code_challenge: challenge,
  code_challenge_method: 'S256',
  state,
}).toString();

بعد الموافقة، يتلقى عنوان العودة code وstate؛ وعند الرفض يتلقى error=access_denied وstate. لا تجمع رمز تسجيل الدخول إلى لوحة التحكم. احصل على رموز التطبيق عبر الطلب الموضح أدناه. لا يُدعم نوع التفويض client_credentials.

HTTP
POST https://api.digimenu.us/api/v1/oauth/token
Content-Type: application/json

{
  "grant_type": "authorization_code",
  "client_id": "YOUR_CLIENT_ID",
  "code": "CODE_FROM_CALLBACK",
  "redirect_uri": "https://eklenti.example/callback",
  "code_verifier": "ORIGINAL_VERIFIER"
}
200 · JSON
{
  "access_token": "ACCESS_TOKEN",
  "refresh_token": "REFRESH_TOKEN",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "menu:read orders:read webhooks:manage"
}

تجديد الرموز وإزالة التطبيق

رمز الوصول صالح لساعة واحدة، ورمز التجديد لمدة 60 يومًا. اعتمد قيمة expires_in. يعيد كل تجديد زوجًا جديدًا من access_token وrefresh_token؛ احفظهما معًا في عملية ذرّية. نفّذ التجديد بالتتابع لكل تثبيت. إعادة استخدام رمز تجديد قديم تلغي عائلة رموز التجديد الخاصة بذلك التثبيت.

HTTP
POST https://api.digimenu.us/api/v1/oauth/token
Content-Type: application/json

{
  "grant_type": "refresh_token",
  "client_id": "YOUR_CLIENT_ID",
  "refresh_token": "LATEST_REFRESH_TOKEN"
}

أضف client_secret إلى الطلب إذا كان مهيّأً. إذا فُقد رد التجديد، فلا تعاود استخدام الرمز القديم دون تحقق؛ أعد الاتصال عبر OAuth. لا تكرر إرسال الرمز في حلقة عند invalid_grant.

إزالة التطبيق من اللوحة توقف الوصول إلى API. عند APP_REVOKED أو APP_NOT_INSTALLED أوقف المزامنة واطلب من المطعم إعادة التفويض. تُحل مشكلة SUBSCRIPTION_REQUIRED من قسم الفوترة لدى المطعم، ولا يعالجها تجديد الرمز.

الصلاحيات والوصول إلى البيانات

يرتبط كل رمز وصول بمطعم واحد وتثبيت واحد. احفظ الأذونات والرموز لكل مطعم على حدة باستخدام installationId وrestaurantId. الصلاحيات مستقلة؛ orders:write لا يتضمن orders:read.

  • menu:read — الفئات والمنتجات النشطة دون صلاحية تعديل القائمة.
  • orders:read — قائمة الطلبات وتفاصيلها، دون أسعار البنود أو سجلات الدفع أو جدول العملاء.
  • orders:write — انتقالات الحالة في مرحلة التوصيل فقط، دون عمليات الدفع أو المطبخ أو الإلغاء.
  • tables:read — معرّف الطاولة النشطة واسمها ورقمها، دون مفاتيح QR أو معلومات الإشغال.
  • deliveries:read / deliveries:write — قراءة رحلات المندوب المعيّنة وتنفيذها. منح write ينشئ سجل مندوب خاصًا بالتثبيت.
  • customers:read — لا يتيح نقطة نهاية /customers. يتطلب عرض العنوان التفصيلي للطلب هذه الصلاحية وإسناد الطلب إلى مندوب تطبيقك معًا.
  • webhooks:manage — إدارة عناوين استقبال التطبيق وسجلات التسليم. يتطلب استقبال الأحداث أيضًا orders:read أو deliveries:read.

الطلبات وتقسيم النتائج وإعادة المحاولة

cURL
curl 'https://api.digimenu.us/api/v1/orders?channel=DELIVERY&limit=25' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json'

القيمة الافتراضية لقوائم الطلبات وتسليم Webhooks هي limit=25، والنطاق 1–100. أرسل nextCursor باسم cursor في الطلب التالي، وتوقف عند null. يعيد /tables و/webhooks مصفوفات مباشرة. يعيد /menu كائن restaurant/categories دون غلاف data.

تستخدم التواريخ ISO 8601. قيمة price في القائمة بوحدة العملة الرئيسية (149.90)، وdeliveryFeeMinor بوحدتها الصغرى (14990). لا تتضمن هذه الاستجابات حقل العملة؛ حدّد عملة المطعم بصورة منفصلة. قد تشير null إلى بيانات غير متوفرة أو غير منطبقة.

يُطبّق Idempotency-Key على /orders/{id}/transitions فقط: ذاكرة مؤقتة للاستجابة لكل تثبيت مدتها خمس دقائق داخل ذاكرة العملية. استخدم مفتاحًا مختلفًا لكل طلب وعملية ومحتوى. لا تستمر الحماية بعد إعادة التشغيل ولا تشمل جميع طلبات POST. عند فشل شبكة غير واضح، اقرأ الحالة الحالية قبل إعادة عمليات الكتابة الأخرى.

إعداد Webhooks والتحقق من التوقيع

يرتبط المستقبِل بالتطبيق لا بالمطعم؛ لا تسجّل مستقبِلًا جديدًا لكل تثبيت. استخدم عنوان HTTPS عامًا على المنفذ 443. لا تُقبل العناوين المحلية أو الخاصة أو عمليات إعادة التوجيه. تحقّق من التوقيع باستخدام بايتات الطلب الأصلية قبل تحليل JSON.

HTTP
POST https://api.digimenu.us/api/v1/webhooks
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json

{
  "url": "https://eklenti.example/webhooks",
  "events": ["order.created", "order.paid"]
}

تعرض استجابة 201 قيمة secret مرة واحدة فقط. احفظها بأمان. إنشاء المستقبِل ليس عملية محمية من التكرار؛ إذا فُقدت الاستجابة فتحقّق أولًا عبر GET /webhooks قبل المحاولة مجددًا. إذا فُقد المفتاح فعطّل المستقبِل القديم وأنشئ آخر.

Headers
X-Digimenu-Signature: t=1790467200,v1=<64-character-hex-hmac>
X-Digimenu-Event-Id: <event-uuid>
X-Digimenu-Event-Type: order.created

HMAC-SHA256(secret, timestamp + "." + rawBody)
JSON · example
{
  "id": "00000000-0000-4000-8000-000000000001",
  "type": "order.created",
  "createdAt": "2026-09-27T00:00:00.000Z",
  "restaurantId": "restaurant_example",
  "installationId": "installation_example",
  "data": { "orderId": "order_example", "channel": "TAKEAWAY" }
}

قارن التوقيعات بزمن ثابت، وارفض الطوابع الزمنية التي تتجاوز ±300 ثانية. يجب أن يطابق id في المحتوى الموقّع قيمة X-Digimenu-Event-Id. احفظ هذا المعرّف دائمًا لاستبعاد التكرار، وطابق restaurantId/installationId مع سجلات التثبيت لديك.

أعد استجابة 2xx خلال 10 ثوانٍ بعد حفظ الحدث في تخزين دائم. عند فشل التسليم تُجرى حتى 6 محاولات إجمالًا، بفواصل انتظار 30 و120 و600 و1800 و7200 ثانية قبل الإعادة؛ وقد يتأخر التنفيذ حسب عمل المعالج. وجود 20 سجل تسليم بحالة FAILED يعطّل المستقبِل تلقائيًا.

لا يُضمن ترتيب الأحداث أو وصول كل حدث مرة واحدة فقط. اقرأ حالة الطلب الحالية عبر GET /orders/{id}. راجع المحاولات عبر GET /webhooks/{id}/deliveries. لا توجد نقطة نهاية عامة لإعادة الإرسال أو إعادة التفعيل.

قائمة الأحداث

  • order.created — إنشاء طلب للاستلام أو التوصيل. data: orderId, channel. يتطلب orders:read؛ وليس مضمونًا في جميع مسارات طلبات الطاولات.
  • order.paid — اكتمال تسوية دفع طلب القناة. data: orderId. يتطلب orders:read.
  • delivery.ready — إسناد إلى شبكة مندوبين خارجية. data: orderId, runId وتفاصيل التوصيل. يتطلب deliveries:read. تحقّق من الرحلة المعيّنة عبر API، ولا تكتب بيانات التوصيل الحساسة في السجلات.
  • delivery.picked_up / delivery.delivered / delivery.failed — data: orderId, runId, status. يتطلب deliveries:read.
  • delivery.assigned — اسم حدث محجوز يُقبل عند التسجيل؛ لا يوجد مسار ينتجه في الإصدار الحالي. لا تجعل سير العمل يعتمد على انتظاره.

تكامل المندوبين

ثبّت التطبيق بصلاحيات deliveries:read وdeliveries:write وwebhooks:manage. أضف orders:read لتفاصيل الطلب وcustomers:read لبيانات الاتصال الخاصة بالطلب المعيّن. بعد إسناد المطعم لعملية توصيل، اقرأ الرحلة باستخدام runId من delivery.ready.

HTTP · sequence
GET /api/v1/deliveries/{runId}
POST /api/v1/deliveries/{runId}/depart
POST /api/v1/deliveries/{runId}/pings
{ "lat": 41.01, "lng": 28.97 }

POST /api/v1/deliveries/orders/{orderId}/delivered
{ "code": "CUSTOMER_DELIVERY_CODE" }

# Alternative when delivery fails:
POST /api/v1/deliveries/orders/{orderId}/failed
{ "reason": "CUSTOMER_ABSENT" }

يتحقق تأكيد التسليم من حداثة الموقع والقرب من العنوان وطريقة الإثبات التي اختارها المطعم. يتطلب CODE رمز العميل. يتطلب PHOTO/SIGNATURE سجل رفع صادرًا من DigiMenu، لكن v1 العامة لا توفر نقطة نهاية لرفع الإثبات. لذلك لا يمكن إكمال هذين المسارين باستخدام v1 وحدها.

على تطبيقات المندوبين استخدام /deliveries. المسار العام /orders/{id}/transitions لا يجري فحوص GPS أو إثبات التسليم. يحدد pings الرحلة النشطة من المندوب المصادق عليه؛ ولا يمكن استخدام runId لاختيار رحلة أخرى.

الشاشات المضمّنة

توفّر لوحة المطور embeddedUrl وembeddedOrigin. تعمل الشاشة داخل iframe معزول؛ فلا تعتمد على ملفات الارتباط أو الوصول إلى الجلسة أو DOM الصفحة الأم. لا تُرسل الرموز عبر رسائل iframe. ابدأ بتطبيق HTTPS مستقل.

جسر الشاشات المضمّنة ليس عقد تكامل مستقرًا بعد. يجب اختبار إعداد sandbox الحالي للـ iframe والمراسلة المحددة بـ origin معًا من البداية إلى النهاية. لا تفترض وصول restaurantId/locale/theme أو رسائل تغيير الارتفاع تلقائيًا. اختبر هذا المسار مع الدعم قبل التشغيل الفعلي.

الأخطاء والحدود

حدود كل تثبيت هي 30 طلبًا كل 10 ثوانٍ و5000 طلب في كل نافذة ساعة UTC، إضافة إلى حد عام قدره 600 طلب في الدقيقة لكل IP. حد نقطة نهاية الرموز 30 طلبًا في الدقيقة لكل IP. بعد 429 استخدم انتظارًا متزايدًا مع تأخير عشوائي، ولا تفترض وجود Retry-After في كل استجابة.

API · 403
{ "code": "insufficient_scope", "requiredScope": "orders:read", "message": "..." }
OAuth · 400
{ "error": "invalid_grant", "error_description": "..." }
  • 400 — تحقّق من الأنواع والحالات المسموحة والحقول المطلوبة. تُرفض حقول المحتوى غير المعروفة. قد تأتي أخطاء التحقق أيضًا بصيغة statusCode/message/error.
  • 401 — عند APP_UNAUTHENTICATED جدّد الرمز المنتهي. يتطلب APP_REVOKED / APP_NOT_INSTALLED إعادة التفويض. عند OAuth invalid_client تحقّق من client_id وclient_secret المهيّأ.
  • 403 — insufficient_scope أو SUBSCRIPTION_REQUIRED أو قيد متعلق بالمندوب أو الإثبات. تكرار الطلبات لا يعالج نقص الصلاحية.
  • 404 — المورد غير موجود أو خارج نطاق المطعم أو المندوب المرتبط بالرمز.
  • 409 — INVALID_TRANSITION: اقرأ حالة الطلب الحالية قبل اختيار الانتقال التالي.
  • 429 — rate_limited / quota_exceeded أو تجاوز الحد العام. أبطئ الطابور؛ عند استنفاد الحصة الساعية انتظر نافذة الساعة UTC التالية.
  • 5xx أو فشل الشبكة — أعد طلبات القراءة بعدد محدود. تحقّق من نتيجة عمليات الكتابة قبل إعادتها.

المراجعة والنشر

يُنشأ التطبيق بحالة DRAFT ووضع TEST. يمكن تعديل عناوين إعادة التوجيه والصلاحيات والوصف في DRAFT أو REJECTED. سجّل عنوان إعادة توجيه واحدًا وصلاحية واحدة على الأقل ثم أرسل للمراجعة IN_REVIEW. بعد الموافقة تصبح الحالة APPROVED؛ بعدها انقل التطبيق إلى LIVE عبر إجراء النشر. تواصل مع الدعم لتعديل إعدادات تطبيق معتمد لاحقًا.

  • اختبر الموافقة والرفض وقيمة state غير الصحيحة ورمز التفويض المنتهي.
  • تأكد من بقاء رموز وسجلات مطعمَي اختبار منفصلة.
  • اختبر تجديد الرموز وفقد الاستجابة وإزالة التطبيق من اللوحة.
  • اختبر Webhooks ذات المحتوى المعدّل أو الوقت المنتهي أو المكررة أو الواردة بترتيب مختلف.
  • أضف عددًا محدودًا من المحاولات عند 429 والأخطاء المؤقتة، ومعالجة للتكرار في عمليات الكتابة.
  • زوّد الدعم بغرض التطبيق وصلاحياته وخطوات الاختبار وعناوين HTTPS وبيانات التواصل. لا ترسل مفاتيح سرية أو رموز المستخدمين.

تمت مطابقة المرجع مع تنفيذ v1 الحالي في 27 سبتمبر 2026. راجع ملف OpenAPI الحالي قبل استخدام نقاط نهاية أو حقول جديدة. اقبل حقول الاستجابة غير المعروفة وسجّل أنواع الأحداث غير المعروفة دون إيقاف التطبيق.

مرجع نقاط النهاية

افتح العملية للاطلاع على المعلمات ومحتوى الطلب وحقول الاستجابة وحالات HTTP. أوصاف المخطط بالإنجليزية لتتطابق مع OpenAPI. توضح الأمثلة بنية البيانات ولا تتضمن بيانات مطعم حقيقية.

17 / 17 عملية

GET/healthحالة الخدمة

الصلاحية: متاح للجميع

استجابة ناجحة · 200

مثال الاستجابة
{
  "status": "ok",
  "service": "api-v1",
  "ts": "2026-09-27T00:00:00.000Z"
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ok"
      ]
    },
    "service": {
      "type": "string",
      "enum": [
        "api-v1"
      ]
    },
    "ts": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "status",
    "service",
    "ts"
  ]
}

200 Success

POST/oauth/tokenاستبدال الرمز / تجديده

الصلاحية: متاح للجميع

JSON only in these examples. No client_credentials grant. PKCE S256 is mandatory, even for confidential clients. Serialize refresh operations per installation; old refresh-token reuse revokes the refresh family.

محتوى الطلب · application/json

JSON Schema
{
  "type": "object",
  "properties": {
    "grant_type": {
      "type": "string",
      "enum": [
        "authorization_code",
        "refresh_token"
      ]
    },
    "client_id": {
      "type": "string",
      "maxLength": 200
    },
    "client_secret": {
      "type": "string",
      "description": "Required if a client secret has been configured.",
      "maxLength": 200
    },
    "code": {
      "type": "string",
      "description": "Required for authorization_code; single use, valid for 60 seconds.",
      "maxLength": 200
    },
    "redirect_uri": {
      "type": "string",
      "description": "Required for authorization_code. Exact registered URL.",
      "maxLength": 500,
      "format": "uri"
    },
    "code_verifier": {
      "type": "string",
      "description": "Required for authorization_code. Original PKCE verifier.",
      "minLength": 43,
      "maxLength": 128
    },
    "refresh_token": {
      "type": "string",
      "description": "Required for refresh_token grant.",
      "maxLength": 200
    }
  },
  "required": [
    "grant_type",
    "client_id"
  ]
}

استجابة ناجحة · 200

مثال الاستجابة
{
  "access_token": "example",
  "refresh_token": "example",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "example"
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "access_token": {
      "type": "string"
    },
    "refresh_token": {
      "type": "string"
    },
    "token_type": {
      "type": "string",
      "enum": [
        "Bearer"
      ]
    },
    "expires_in": {
      "type": "integer",
      "example": 3600
    },
    "scope": {
      "type": "string",
      "description": "Space-separated granted permissions."
    }
  },
  "required": [
    "access_token",
    "refresh_token",
    "token_type",
    "expires_in",
    "scope"
  ]
}

200 Success400 invalid_request / invalid_grant401 invalid_client403 access_denied: app application requires DigiMenu approval, including TEST mode429 30 requests per minute per IP

GET/meمعلومات التثبيت

الصلاحية: رمز تطبيق صالح

استجابة ناجحة · 200

مثال الاستجابة
{
  "installationId": "example",
  "appId": "example",
  "restaurantId": "example",
  "scopes": [
    "menu:read"
  ],
  "mode": "TEST",
  "restaurant": {
    "slug": "example",
    "name": "example"
  }
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "installationId": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "restaurantId": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "menu:read",
          "orders:read",
          "orders:write",
          "tables:read",
          "deliveries:read",
          "deliveries:write",
          "customers:read",
          "webhooks:manage"
        ]
      }
    },
    "mode": {
      "type": "string",
      "enum": [
        "TEST",
        "LIVE"
      ]
    },
    "restaurant": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "name"
      ],
      "nullable": true
    }
  },
  "required": [
    "installationId",
    "appId",
    "restaurantId",
    "scopes",
    "mode",
    "restaurant"
  ]
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

GET/menuقراءة القائمة

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

No pagination. Does not expose recipe cost, inventory, variants or internal preparation data.

استجابة ناجحة · 200

مثال الاستجابة
{
  "restaurant": {
    "slug": "example",
    "name": "example"
  },
  "categories": [
    {
      "id": "example",
      "name": "example",
      "order": 0,
      "products": [
        {
          "id": "example",
          "name": "example",
          "description": null,
          "price": 0,
          "isActive": true,
          "order": 0,
          "allergens": null
        }
      ]
    }
  ]
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "restaurant": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "name"
      ]
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer"
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "price": {
                  "type": "number",
                  "description": "Major currency units, not minor units. Currency is not included in this response."
                },
                "isActive": {
                  "type": "boolean"
                },
                "order": {
                  "type": "integer"
                },
                "allergens": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "price",
                "isActive",
                "order",
                "allergens"
              ]
            }
          }
        },
        "required": [
          "id",
          "name",
          "order",
          "products"
        ]
      }
    }
  },
  "required": [
    "restaurant",
    "categories"
  ]
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

GET/tablesعرض الطاولات

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

Returns a bare array. Does not expose QR secrets, sessions or occupancy.

استجابة ناجحة · 200

مثال الاستجابة
[
  {
    "id": "example",
    "name": "example",
    "tableNumber": 0
  }
]
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "tableNumber": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "name",
      "tableNumber"
    ]
  }
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

GET/ordersعرض الطلبات

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

المعلمةالموضع / النوعالوصف
limitquery / integerPage size.
{"type":"integer","minimum":1,"maximum":100,"default":25}
cursorquery / stringPass the previous nextCursor unchanged. Stop when null.
{"type":"string","maxLength":64}
channelquery / stringOrder channel.
{"type":"string","enum":["TABLE","TAKEAWAY","DELIVERY"]}
statusquery / stringUse a known order status, e.g. OUT_FOR_DELIVERY; omit for all statuses.
{"type":"string","maxLength":40}

استجابة ناجحة · 200

مثال الاستجابة
{
  "data": [
    {
      "id": "example",
      "shortId": "example",
      "channel": "TABLE",
      "status": "example",
      "createdAt": "2026-09-27T00:00:00.000Z",
      "scheduledFor": null,
      "deliveryAddress": {},
      "deliveryFeeMinor": null,
      "items": [
        {
          "name": "example",
          "quantity": 0,
          "note": null
        }
      ],
      "courierRef": null
    }
  ],
  "nextCursor": null
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "shortId": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "TABLE",
              "TAKEAWAY",
              "DELIVERY"
            ]
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "scheduledFor": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveryAddress": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "Coarse locality with contactRedacted=true by default. Exact address/contact is returned only with customers:read AND assignment to this app’s courier."
          },
          "deliveryFeeMinor": {
            "type": "integer",
            "description": "Minor currency units; currency not included.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer"
                },
                "note": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "name",
                "quantity",
                "note"
              ]
            }
          },
          "courierRef": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "shortId",
          "channel",
          "status",
          "createdAt",
          "scheduledFor",
          "deliveryAddress",
          "deliveryFeeMinor",
          "items",
          "courierRef"
        ]
      }
    },
    "nextCursor": {
      "type": "string",
      "nullable": true
    }
  },
  "required": [
    "data",
    "nextCursor"
  ]
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

GET/orders/{id}تفاصيل الطلب

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

المعلمةالموضع / النوعالوصف
id *path / stringResource identifier.
{"type":"string"}

استجابة ناجحة · 200

مثال الاستجابة
{
  "id": "example",
  "shortId": "example",
  "channel": "TABLE",
  "status": "example",
  "createdAt": "2026-09-27T00:00:00.000Z",
  "scheduledFor": null,
  "deliveryAddress": {},
  "deliveryFeeMinor": null,
  "items": [
    {
      "name": "example",
      "quantity": 0,
      "note": null
    }
  ],
  "courierRef": null
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "shortId": {
      "type": "string"
    },
    "channel": {
      "type": "string",
      "enum": [
        "TABLE",
        "TAKEAWAY",
        "DELIVERY"
      ]
    },
    "status": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "scheduledFor": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "deliveryAddress": {
      "type": "object",
      "nullable": true,
      "additionalProperties": true,
      "description": "Coarse locality with contactRedacted=true by default. Exact address/contact is returned only with customers:read AND assignment to this app’s courier."
    },
    "deliveryFeeMinor": {
      "type": "integer",
      "description": "Minor currency units; currency not included.",
      "nullable": true
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name",
          "quantity",
          "note"
        ]
      }
    },
    "courierRef": {
      "type": "string",
      "nullable": true
    }
  },
  "required": [
    "id",
    "shortId",
    "channel",
    "status",
    "createdAt",
    "scheduledFor",
    "deliveryAddress",
    "deliveryFeeMinor",
    "items",
    "courierRef"
  ]
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

POST/orders/{id}/transitionsتحديث مرحلة التوصيل

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

ASSIGNED_TO_COURIER → OUT_FOR_DELIVERY → DELIVERED or DELIVERY_FAILED. Same status is a no-op. This generic route does not run courier GPS/proof checks: courier apps should use /deliveries. No payment, kitchen, cancel, create-order or refund operation is exposed.

المعلمةالموضع / النوعالوصف
id *path / stringResource identifier.
{"type":"string"}
Idempotency-Keyheader / stringOptional. Unique per installation AND operation. A response is cached for 5 minutes in one process; not durable across restarts. Never reuse for another order or body.
{"type":"string"}

محتوى الطلب · application/json

JSON Schema
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "OUT_FOR_DELIVERY",
        "DELIVERED",
        "DELIVERY_FAILED"
      ]
    }
  },
  "required": [
    "status"
  ]
}

استجابة ناجحة · 201

مثال الاستجابة
{
  "id": "example",
  "shortId": "example",
  "channel": "TABLE",
  "status": "example",
  "createdAt": "2026-09-27T00:00:00.000Z",
  "scheduledFor": null,
  "deliveryAddress": {},
  "deliveryFeeMinor": null,
  "items": [
    {
      "name": "example",
      "quantity": 0,
      "note": null
    }
  ],
  "courierRef": null
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "shortId": {
      "type": "string"
    },
    "channel": {
      "type": "string",
      "enum": [
        "TABLE",
        "TAKEAWAY",
        "DELIVERY"
      ]
    },
    "status": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "scheduledFor": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "deliveryAddress": {
      "type": "object",
      "nullable": true,
      "additionalProperties": true,
      "description": "Coarse locality with contactRedacted=true by default. Exact address/contact is returned only with customers:read AND assignment to this app’s courier."
    },
    "deliveryFeeMinor": {
      "type": "integer",
      "description": "Minor currency units; currency not included.",
      "nullable": true
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name",
          "quantity",
          "note"
        ]
      }
    },
    "courierRef": {
      "type": "string",
      "nullable": true
    }
  },
  "required": [
    "id",
    "shortId",
    "channel",
    "status",
    "createdAt",
    "scheduledFor",
    "deliveryAddress",
    "deliveryFeeMinor",
    "items",
    "courierRef"
  ]
}

201 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation409 INVALID_TRANSITION429 Rate or hourly quota exceeded

GET/webhooksعرض مستقبِلي Webhooks

الصلاحية: webhooks:manage

App-wide, not restaurant-specific. Register once per app, not once per installation.

استجابة ناجحة · 200

مثال الاستجابة
[
  {
    "id": "example",
    "url": "https://eklenti.example/webhooks",
    "events": [
      "order.created"
    ],
    "active": true,
    "disabledAt": null,
    "createdAt": "2026-09-27T00:00:00.000Z"
  }
]
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "url": {
        "type": "string",
        "format": "uri"
      },
      "events": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "order.created",
            "order.paid",
            "delivery.ready",
            "delivery.assigned",
            "delivery.picked_up",
            "delivery.delivered",
            "delivery.failed"
          ]
        }
      },
      "active": {
        "type": "boolean"
      },
      "disabledAt": {
        "type": "string",
        "format": "date-time",
        "nullable": true
      },
      "createdAt": {
        "type": "string",
        "format": "date-time"
      }
    },
    "required": [
      "id",
      "url",
      "events",
      "active",
      "disabledAt",
      "createdAt"
    ]
  }
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

POST/webhooksإنشاء مستقبِل Webhook

الصلاحية: webhooks:manage

No idempotency-key support. Check GET /webhooks before retrying a create after a network timeout; a duplicate request creates another endpoint. Secret is returned once.

محتوى الطلب · application/json

JSON Schema
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Public HTTPS URL on port 443; credentials, redirects and private hosts are rejected.",
      "format": "uri",
      "maxLength": 2048
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "order.created",
          "order.paid",
          "delivery.ready",
          "delivery.assigned",
          "delivery.picked_up",
          "delivery.delivered",
          "delivery.failed"
        ],
        "maxLength": 64
      },
      "minItems": 1
    }
  },
  "required": [
    "url",
    "events"
  ]
}

استجابة ناجحة · 201

مثال الاستجابة
{
  "id": "example",
  "url": "https://eklenti.example/webhooks",
  "events": [
    "order.created"
  ],
  "active": true,
  "disabledAt": null,
  "createdAt": "2026-09-27T00:00:00.000Z",
  "secret": "example"
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "order.created",
          "order.paid",
          "delivery.ready",
          "delivery.assigned",
          "delivery.picked_up",
          "delivery.delivered",
          "delivery.failed"
        ]
      }
    },
    "active": {
      "type": "boolean"
    },
    "disabledAt": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "secret": {
      "type": "string",
      "description": "Signing secret; returned once at creation."
    }
  },
  "required": [
    "id",
    "url",
    "events",
    "active",
    "disabledAt",
    "createdAt",
    "secret"
  ]
}

201 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

DELETE/webhooks/{id}تعطيل مستقبِل Webhook

الصلاحية: webhooks:manage

Soft disable; repeating for your already-disabled endpoint succeeds. No public re-enable endpoint: register a new endpoint and store its new secret.

المعلمةالموضع / النوعالوصف
id *path / stringResource identifier.
{"type":"string"}

استجابة ناجحة · 200

مثال الاستجابة
{
  "id": "example",
  "active": false
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "active": {
      "type": "boolean",
      "enum": [
        false
      ]
    }
  },
  "required": [
    "id",
    "active"
  ]
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

GET/webhooks/{id}/deliveriesسجلات تسليم Webhooks

الصلاحية: webhooks:manage

المعلمةالموضع / النوعالوصف
id *path / stringResource identifier.
{"type":"string"}
limitquery / integerPage size.
{"type":"integer","minimum":1,"maximum":100,"default":25}
cursorquery / stringPass the previous nextCursor unchanged. Stop when null.
{"type":"string","maxLength":64}

استجابة ناجحة · 200

مثال الاستجابة
{
  "data": [
    {
      "id": "example",
      "eventType": "example",
      "status": "PENDING",
      "attempts": 0,
      "responseCode": null,
      "lastError": null,
      "createdAt": "2026-09-27T00:00:00.000Z"
    }
  ],
  "nextCursor": null
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "DELIVERED",
              "FAILED"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "responseCode": {
            "type": "integer",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "eventType",
          "status",
          "attempts",
          "responseCode",
          "lastError",
          "createdAt"
        ]
      }
    },
    "nextCursor": {
      "type": "string",
      "nullable": true
    }
  },
  "required": [
    "data",
    "nextCursor"
  ]
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

GET/deliveries/{runId}رحلة المندوب

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

Requires a courier installation created by granting deliveries:write. Reads only that installation’s courier runs.

المعلمةالموضع / النوعالوصف
runId *path / stringResource identifier.
{"type":"string"}

استجابة ناجحة · 200

مثال الاستجابة
{
  "id": "example",
  "status": "example",
  "startedAt": null,
  "completedAt": null,
  "routeDistanceMeters": null,
  "routeDurationSeconds": null,
  "orders": [
    {
      "id": "example",
      "status": "example"
    }
  ],
  "location": {
    "lat": 0,
    "lng": 0,
    "at": "2026-09-27T00:00:00.000Z"
  }
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "startedAt": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "completedAt": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "routeDistanceMeters": {
      "type": "integer",
      "nullable": true
    },
    "routeDurationSeconds": {
      "type": "integer",
      "nullable": true
    },
    "orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ]
      }
    },
    "location": {
      "type": "object",
      "properties": {
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "lat",
        "lng",
        "at"
      ],
      "nullable": true
    }
  },
  "required": [
    "id",
    "status",
    "startedAt",
    "completedAt",
    "routeDistanceMeters",
    "routeDurationSeconds",
    "orders",
    "location"
  ]
}

200 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

POST/deliveries/{runId}/departبدء الرحلة

الصلاحية: deliveries:write

ASSIGNED → ON_ROUTE. Moves assigned orders to OUT_FOR_DELIVERY. A second depart fails with INVALID_RUN_STATE; reconcile GET before retrying.

المعلمةالموضع / النوعالوصف
runId *path / stringResource identifier.
{"type":"string"}

استجابة ناجحة · 201

مثال الاستجابة
{
  "ok": true,
  "orders": 0
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "orders": {
      "type": "integer"
    }
  },
  "required": [
    "ok",
    "orders"
  ]
}

201 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

POST/deliveries/{runId}/pingsإرسال الموقع

الصلاحية: deliveries:write

The implementation resolves the active run from the authenticated courier and does not use runId to select a run. Send your assigned active run ID. Pings may be dropped with stored=false / THROTTLED; do not immediately retry.

المعلمةالموضع / النوعالوصف
runId *path / stringResource identifier.
{"type":"string"}

محتوى الطلب · application/json

JSON Schema
{
  "type": "object",
  "properties": {
    "lat": {
      "type": "number",
      "minimum": -90,
      "maximum": 90
    },
    "lng": {
      "type": "number",
      "minimum": -180,
      "maximum": 180
    },
    "accuracyM": {
      "type": "number"
    },
    "headingDeg": {
      "type": "number"
    },
    "speedMps": {
      "type": "number"
    },
    "recordedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "lat",
    "lng"
  ]
}

استجابة ناجحة · 201

مثال الاستجابة
{
  "stored": true,
  "requeried": true
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "stored": {
          "type": "boolean",
          "enum": [
            true
          ]
        },
        "requeried": {
          "type": "boolean"
        }
      },
      "required": [
        "stored",
        "requeried"
      ]
    },
    {
      "type": "object",
      "properties": {
        "stored": {
          "type": "boolean",
          "enum": [
            false
          ]
        },
        "reason": {
          "type": "string",
          "enum": [
            "THROTTLED"
          ]
        }
      },
      "required": [
        "stored",
        "reason"
      ]
    }
  ]
}

201 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

POST/deliveries/orders/{orderId}/deliveredتأكيد التسليم

الصلاحية: deliveries:write

Requires assigned order OUT_FOR_DELIVERY, fresh GPS near drop-off, and restaurant-selected proof. CODE requires code; PHOTO/SIGNATURE require a platform-issued upload unavailable through public v1. Do not treat these modes as a complete external-only integration.

المعلمةالموضع / النوعالوصف
orderId *path / stringResource identifier.
{"type":"string"}

محتوى الطلب · application/json

JSON Schema
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Required when the restaurant uses CODE proof mode.",
      "maxLength": 16
    },
    "proofRef": {
      "type": "string",
      "description": "PHOTO/SIGNATURE require a platform-issued upload. The public v1 API has no proof-upload endpoint; do not submit an arbitrary URL.",
      "maxLength": 500
    }
  },
  "required": []
}

استجابة ناجحة · 201

مثال الاستجابة
{
  "ok": true
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    }
  },
  "required": [
    "ok"
  ]
}

201 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

POST/deliveries/orders/{orderId}/failedالإبلاغ عن تعذّر التسليم

الصلاحية: deliveries:write

Requires an assigned OUT_FOR_DELIVERY order. No general idempotency header support; reconcile order state after an ambiguous response.

المعلمةالموضع / النوعالوصف
orderId *path / stringResource identifier.
{"type":"string"}

محتوى الطلب · application/json

JSON Schema
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "enum": [
        "CUSTOMER_ABSENT",
        "WRONG_ADDRESS",
        "CUSTOMER_REJECTED",
        "OTHER"
      ]
    },
    "note": {
      "type": "string",
      "description": "Accepted by validation; currently not persisted by the delivery service.",
      "maxLength": 200
    }
  },
  "required": [
    "reason"
  ]
}

استجابة ناجحة · 201

مثال الاستجابة
{
  "ok": true
}
جميع حقول الاستجابة وأنواعها
JSON Schema
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    }
  },
  "required": [
    "ok"
  ]
}

201 Success400 Invalid request or resource state401 Missing/expired token, revoked installation, or app removed403 APP_APPROVAL_REQUIRED (including TEST), missing scope, inactive subscription or delivery restriction404 Resource not found within the installation429 Rate or hourly quota exceeded

دعم التكامل

أرسل معرّف التطبيق ونقطة النهاية ورمز الخطأ. لا ترسل رموز الوصول أو المفاتيح السرية.

support@digimenu.us