مرجع الواجهة
الهوية
Who the key is and what it may do.
GETThe key, its partner and settings#
/partner/v1/meAny valid key may call it: the first call to make with a new key. environment is the host’s (always the key’s own, or the key would be refused). settings say how orders, statuses, the menu and invoices flow for your system.
curl -sS "$LP_BASE_URL/partner/v1/me" \
-H "Authorization: Bearer $LP_API_KEY"الردود
200OKPartnerMe
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
RateLimit-Limit | integer | The key's requests per minute. |
RateLimit-Remaining | integer | Requests left in the current minute. |
RateLimit-Reset | integer | Seconds until the minute window resets. |
البنية
partnerobjectمطلوبالشريك الذي يملك المفتاح.
الحقول الداخلية (3)
idstringمطلوبمعرّف الشريك لدى ليتس بيتزا.
الطول: 1 – 64
namestringمطلوباسم الشريك كما يظهر في لوحة التحكم.
kindPartnerKindمطلوبنوع النظام، ويحدد الإعدادات والصلاحيات الافتراضية.
القيم:
"erp""pos""kds""delivery""marketplace""accounting""analytics""other"
keyobjectمطلوبالمفتاح الذي أُرسل في هذا الطلب.
الحقول الداخلية (8)
idstringمطلوبالطول: 1 – 64
envIntegrationModeمطلوببيئة المفتاح: الاختبار أو الإنتاج.
القيم:
"sandbox""live"labelstringمطلوباسم المفتاح الذي اختاره فريق ليتس بيتزا.
prefixstringمطلوبأول أحرف المفتاح للتمييز بين المفاتيح، وليس المفتاح نفسه.
scopesPartnerScope[]مطلوبالصلاحيات التي يحملها المفتاح.
القيم:
"branches:read""catalog:read""catalog:write""availability:write""orders:read""orders:ack""orders:status""orders:cancel""orders:events""payments:read""reports:read""webhooks:manage""mappings:write"branchesstring[]مطلوبيقبل nullالفروع التي يعمل عليها المفتاح، و null تعني كل الفروع.
ratePerMinuteintegerمطلوبعدد الطلبات المسموح بها في الدقيقة لهذا المفتاح.
expiresAtstring<date-time>مطلوبيقبل nullتاريخ انتهاء المفتاح، و null تعني بلا تاريخ انتهاء.
environmentIntegrationModeمطلوببيئة الخادم الذي أجاب، وتطابق بيئة المفتاح دائماً.
القيم:
"sandbox""live"settingsPartnerSettingsمطلوبكيف تسير الطلبات والحالات والمنيو والفواتير مع نظامك.
الحقول الداخلية (6)
ordersobjectمطلوبالحقول الداخلية (5)
deliveryOrderDeliveryمطلوبكيف تصلك الطلبات: none بلا طلبات، pull بالسحب، webhooks بالإشعارات، connector نتصل نحن بنظامك.
القيم:
"none""pull""webhooks""connector"acceptanceOrderAcceptanceمطلوبمن يقبل الطلب الجديد: lp لوحة الفرع لدينا، أو partner نظامك.
القيم:
"lp""partner"ackMinutesintegerمطلوبالدقائق التي ينتظرها الطلب تأكيد استلامك قبل تنبيه الفرع (0 بلا تنبيه).
القيمة: 0 – 120
statusesPartnerStatusTarget[]مطلوبالحالات التي يحق لنظامك إبلاغها.
القيم:
"accepted""rejected""preparing""ready""picked_up""cancelled""out_for_delivery""delivered""delivery_failed"العناصر: ≤ 9
connectorstringمطلوبيقبل nullالموصّل المستخدم عندما تكون طريقة الاستلام connector.
الطول: ≤ 40
catalogobjectمطلوبالحقول الداخلية (5)
sourcebooleanمطلوبtrue: نظامك مصدر المنيو (شريك واحد فقط يكون كذلك).
fieldsCatalogField[]مطلوبحقول المنيو التي يملكها نظامك، ويبقى الباقي (الصور والترتيب) في لوحة التحكم.
القيم:
"names""descriptions""prices""sizes""groups""options""categories""availability"العناصر: ≤ 8
publishCatalogPublishPolicyمطلوبما يحدث للمنيو المرسل: manual مراجعة يدوية، auto_prices نشر تلقائي لتغيّر الأسعار فقط، auto نشر تلقائي بعد الفحوص.
القيم:
"manual""auto_prices""auto"maxPriceChangePctintegerمطلوبأقصى نسبة تغيّر في السعر تُنشر تلقائياً.
القيمة: 0 – 100
maxRemovalsintegerمطلوبأقصى عدد أصناف يجوز أن يختفي في نشر تلقائي.
القيمة: 0 – 1000
availabilitybooleanمطلوبtrue: يُطبَّق توفّر الأصناف الذي يرسله نظامك (يوقف الأصناف فقط، ولا يلغي إيقاف الموظفين).
invoicesobjectمطلوبالحقول الداخلية (1)
issuerInvoiceIssuerمطلوبمن يُصدر الفاتورة الضريبية للعميل: lp منصتنا، أو partner نظامك.
القيم:
"lp""partner"
customerDatastringمطلوبالقيم:
"full""masked"liveBranchesstring[]مطلوبالفروع المفعّلة لنظامك، وتبقى فارغة حتى نفعّلها معك.
العناصر: ≤ 200
apiVersionstringمطلوبإصدار الواجهة.
القيم:
"v1"serverTimestring<date-time>مطلوبساعة الخادم: قارنها بساعتك قبل التحقق من التواقيع.
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
مثال الرد
{
"partner": {
"id": "ptn_01JD5ZB2",
"name": "Business Central (EDM)",
"kind": "erp"
},
"key": {
"id": "key_01JD5ZC9",
"env": "sandbox",
"label": "EDM sandbox",
"prefix": "lpk_test_Ab3d",
"scopes": [
"branches:read",
"catalog:read",
"catalog:write",
"availability:write",
"orders:read",
"orders:ack",
"orders:status",
"orders:cancel",
"orders:events",
"payments:read",
"reports:read",
"webhooks:manage",
"mappings:write"
],
"branches": null,
"ratePerMinute": 600,
"expiresAt": null
},
"environment": "sandbox",
"settings": {
"orders": {
"delivery": "pull",
"acceptance": "partner",
"ackMinutes": 3,
"statuses": [
"accepted",
"rejected",
"preparing",
"ready",
"picked_up",
"cancelled"
],
"connector": null
},
"catalog": {
"source": false,
"fields": [
"names",
"prices",
"sizes",
"groups",
"options",
"categories",
"availability"
],
"publish": "manual",
"maxPriceChangePct": 20,
"maxRemovals": 5
},
"availability": true,
"invoices": {
"issuer": "lp"
},
"customerData": "full",
"liveBranches": [
"28"
]
},
"apiVersion": "v1",
"serverTime": "2026-11-19T19:30:12.000+03:00"
}POSTOAuth 2.0 access token (client credentials)#
/partner/v1/oauth/tokenFor systems that prefer OAuth to a fixed key. grant_type=client_credentials, client_id = your key’s id (the key.id of GET /me), client_secret = the key; in a JSON or form body, or in HTTP Basic. The answer is a bearer token lpt_… valid for one hour (never past the key’s own end) with the key’s scopes: send it as Authorization: Bearer exactly like the key. A revoked key stops its tokens at once. Refusals carry detail.error (invalid_client, unsupported_grant_type, invalid_request).
curl -sS -X POST "$LP_BASE_URL/partner/v1/oauth/token" \
-H "Content-Type: application/json" \
--data '{
"grant_type": "client_credentials",
"client_id": "key_01JD5ZC9",
"client_secret": "lpk_test_…"
}'جسم الطلب PartnerTokenRequest
grant_typestringمطلوبالطول: ≤ 40
client_idstringمطلوبالطول: 1 – 64
client_secretstringمطلوبالطول: 10 – 200
scopestringاختياريالطول: ≤ 500
الردود
200OKPartnerTokenResponse
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
RateLimit-Limit | integer | The key's requests per minute. |
RateLimit-Remaining | integer | Requests left in the current minute. |
RateLimit-Reset | integer | Seconds until the minute window resets. |
البنية
access_tokenstringمطلوبtoken_typestringمطلوبالقيم:
"Bearer"expires_inintegerمطلوبالقيمة: ≥ 1
scopestringمطلوب
400INVALID_REQUEST (detail.error: invalid_request, unsupported_grant_type)PartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
401UNAUTHENTICATED (detail.error: invalid_client), KEY_ENVIRONMENT_MISMATCHPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
429RATE_LIMITEDPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
مثال الرد
{
"access_token": "lpt_…",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "branches:read catalog:read catalog:write availability:write orders:read orders:ack orders:status orders:cancel orders:events payments:read reports:read webhooks:manage mappings:write"
}GETYour request log#
/partner/v1/logsEvery request of your keys in this environment (refusals included), newest first, kept 30 days; never a body. nextBefore pages back. Quote a requestId to support.
curl -sS "$LP_BASE_URL/partner/v1/logs" \
-H "Authorization: Bearer $LP_API_KEY"المعاملات
| الاسم | الموضع | النوع | الوصف |
|---|---|---|---|
before | query | integer | |
limit | query | integer |
الردود
200OKPartnerRequestLogPage
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
RateLimit-Limit | integer | The key's requests per minute. |
RateLimit-Remaining | integer | Requests left in the current minute. |
RateLimit-Reset | integer | Seconds until the minute window resets. |
البنية
itemsPartnerRequestLogRow[]مطلوبالحقول الداخلية (12)
idintegerمطلوبالقيمة: ≥ 1
requestIdstringمطلوبkeyIdstringمطلوبيقبل nullالطول: 1 – 64
keyPrefixstringمطلوبيقبل nullenvIntegrationModeمطلوبالقيم:
"sandbox""live"methodstringمطلوبpathstringمطلوبstatusintegerمطلوبerrorCodestringمطلوبيقبل nulldurationMsintegerمطلوبالقيمة: ≥ 0
ipstringمطلوبيقبل nullatstring<date-time>مطلوب
nextBeforeintegerمطلوبيقبل null
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
X-Request-Id | string | The id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end. |
مثال الرد
{
"items": [
{
"id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
"requestId": "req_01JD7Q8W3K2M",
"keyId": "string",
"keyPrefix": "string",
"env": "sandbox",
"method": "string",
"path": "string",
"status": 0,
"errorCode": "string",
"durationMs": 0,
"ip": "string",
"at": "2026-11-19T19:30:12+03:00"
}
],
"nextBefore": 0
}