مرجع الواجهة
مرجع الواجهة
هذا المرجع مولّد آلياً من مستند OpenAPI نفسه الذي تبنيه الواجهة، فيطابق ما يعمل فعلاً. النصوص الفنية فيه بالإنجليزية كما في المستند.
العنوان والإصدار#
كل المسارات تبدأ بـ /partner/v1 على العنوان الأساسي لبيئتك. البيئات
{baseUrl} — The base address given with your keys (sandbox or production).
المصادقة#
partnerKey · http bearer — A partner key: `lpk_test_…` (sandbox) or `lpk_live_…` (production).
الطلبات#
الهوية
Who the key is and what it may do.
الفروع
Let's Pizza branches as the key may see them (hours and zones stay in the Let's Pizza console).
المنيو
The published menu with your codes, and the mapping between Let's Pizza ids and your codes.
الطلبات
The order feed, acknowledgement, statuses, cancellations, facts (receipts, invoices, money collected) and payments.
- GET
/partner/v1/ordersThe order feed - GET
/partner/v1/orders/{id}One order of the feed - POST
/partner/v1/orders/{id}/ackAcknowledge an order - POST
/partner/v1/orders/{id}/statusReport a status - POST
/partner/v1/orders/{id}/cancelCancel an order - POST
/partner/v1/orders/{id}/eventsRecord a fact on an order - GET
/partner/v1/orders/{id}/paymentsHow an order is paid
التوفّر
What is out at a branch now, from your POS or ERP.
التقارير
Your day as Let’s Pizza counts it, and the daily reconciliation.
بيئة الاختبار
Tools that exist on the sandbox only: test orders.
إشعارات Webhook
Your own signed webhook subscriptions: events pushed to your address instead of polling.
- GET
/partner/v1/webhooksYour subscriptions - POST
/partner/v1/webhooksSubscribe an address - GET
/partner/v1/webhooks/{id}One subscription - PUT
/partner/v1/webhooks/{id}Change a subscription - DEL
/partner/v1/webhooks/{id}Remove a subscription and its log - POST
/partner/v1/webhooks/{id}/secretA new signing secret - POST
/partner/v1/webhooks/{id}/testSend a signed ping now - GET
/partner/v1/webhooks/{id}/deliveriesThe delivery log - POST
/partner/v1/webhooks/{id}/deliveries/{deliveryId}/replaySend a delivery again
وصف المستند#
The one API every outside system uses to work with Let's Pizza: ERPs, POS and kitchen systems, delivery fleets, marketplaces, accounting and analytics.
Authentication. Authorization: Bearer <key>. Keys are issued by Let’s Pizza per partner and environment: lpk_test_… works on the sandbox only, lpk_live_… on production only. Each key carries scopes, optionally a list of branches and of allowed addresses, a rate and an end date.
Conventions. JSON in UTF-8. Money is integer halalas (1 riyal = 100), VAT-inclusive. Texts are {ar, en}. Times are ISO 8601 with an offset. Every answer carries X-Request-Id; authenticated answers carry RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset. Writes require an Idempotency-Key header: a repeat with the same key and body returns the first answer.
Errors. Every refusal is a PartnerError: a stable code, a message in Arabic and English, the offending field, retryable (true only for 408/429/5xx) and the requestId.