نقاط النهاية والصلاحيات
| الطلب | الصلاحية |
|---|---|
GET /places |
أي ربط بالمكان |
GET /places/{place_id} |
أي ربط بالمكان |
PATCH /places/{place_id}/ordering |
orders:write |
ما هو المكان
المكان هو ما يجده العميل على الخريطة: الفرع الرئيسي للتاجر، أو أحد فروعه. كل ربط من مستوى place يخص مكانا واحدا، وكل ربط يسمح بقراءة مكانه.
قائمة الأماكن
GET /places
aurmap GET '/v1/places?limit=50'{
"data": [
{ "place_id": "plc_9q3w7e", "merchant_id": "mer_5r8k2d", "name": { "ar": "الريحان - العليا", "en": "Al Rayhan - Olaya" }, "link_id": "lnk_2h6j4n" }
],
"next_cursor": null
}مكان واحد
GET /places/{place_id}
aurmap GET /v1/places/plc_9q3w7e{
"place_id": "plc_9q3w7e",
"merchant_id": "mer_5r8k2d",
"name": { "ar": "الريحان - العليا", "en": "Al Rayhan - Olaya" },
"timezone": "Asia/Riyadh",
"country": "SA",
"location": { "lat": 24.6995, "lng": 46.6850 },
"public_url": "https://aurmap.com/p/al-rayhan-olaya",
"ordering": {
"accepting_orders": true,
"paused_until": null,
"fulfilment": ["pickup"],
"payment_methods": ["card", "cash"],
"accept_window_minutes": 5
},
"menu": { "version": 42, "hash": "9f2c4be1d07a65e3c1f8a2b4d6e8f0a1b3c5d7e9f1a3b5c7d9e1f3a5b7c9d1e3", "source": "this_link" }
}| الحقل | الوصف |
|---|---|
timezone |
المنطقة الزمنية للمكان. تحسب من موقعه، ولا تختار يدويا |
ordering.accepting_orders |
هل يستقبل المكان طلبات الآن |
ordering.paused_until |
وقت عودة الطلبات بعد إيقاف مؤقت |
ordering.fulfilment |
طرق الاستلام. عند الإطلاق pickup فقط |
ordering.payment_methods |
card و/أو cash |
ordering.accept_window_minutes |
مهلة قبول الطلب، من 2 إلى 15 دقيقة، والافتراضي 5 |
menu.source |
this_link إذا كانت قائمتك هي مصدر المكان |
إيقاف الطلبات مؤقتا
PATCH /places/{place_id}/ordering بصلاحية orders:write.
المطبخ مزدحم؟ أوقف الطلبات الجديدة دون أن يختفي المكان من الخريطة.
aurmap PATCH /v1/places/plc_9q3w7e/ordering '{"accepting_orders":false,"paused_until":"2026-10-14T13:30:00Z","reason":"busy"}'{
"place_id": "plc_9q3w7e",
"ordering": { "accepting_orders": false, "paused_until": "2026-10-14T13:30:00Z", "fulfilment": ["pickup"], "payment_methods": ["card", "cash"], "accept_window_minutes": 5 }
}- إذا أرسلت
paused_untilتعود الطلبات تلقائيا في ذلك الوقت. - بدونه يبقى الإيقاف حتى ترسل
"accepting_orders": true. - مهلة القبول تحددها أنت: أرسل
accept_window_minutesبين 2 و15 دقيقة. الافتراضي 5. القيمة خارج ذلك ترد400 VALIDATION_FAILED.
await aurmap('PATCH', '/v1/places/plc_9q3w7e/ordering', {
accepting_orders: false,
paused_until: new Date(Date.now() + 30 * 60 * 1000).toISOString(),
reason: 'busy',
});aurmap('PATCH', '/v1/places/plc_9q3w7e/ordering', [
'accepting_orders' => false,
'paused_until' => gmdate('Y-m-d\TH:i:s\Z', time() + 1800),
'reason' => 'busy',
]);ما يصلك عند التغيير
| الحدث | متى |
|---|---|
place.updated |
تغير الاسم أو الموقع أو أوقات الدوام أو المنطقة الزمنية |
place.ordering_changed |
إيقاف أو عودة، تغير مهلة القبول أو طرق الدفع، من أي طرف |
أوقات الدوام يحددها التاجر في حسابه. جداول قائمتك تحدد ما يطلب داخل تلك الأوقات.