مرجع الواجهة
التوفّر
What is out at a branch now, from your POS or ERP.
PUTYour unavailable items at a branch (whole list)#
/partner/v1/branches/{id}/availabilityScope availability:write. Everything your system says is out at this branch now, by our id or your code: your earlier flags not listed are cleared. A flag branch staff set is never cleared by you (keptStaff). Changes reach the website and the app at once.
curl -sS -X PUT "$LP_BASE_URL/partner/v1/branches/28/availability" \
-H "Authorization: Bearer $LP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
--data '{
"items": [
{
"kind": "product",
"id": "649",
"available": false
}
]
}'المعاملات
| الاسم | الموضع | النوع | الوصف |
|---|---|---|---|
id * | path | string | The Let's Pizza branch id. |
Idempotency-Key * | header | string | Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED. |
جسم الطلب PartnerAvailabilityRequest
itemsPartnerAvailabilityItem[]مطلوبالعناصر: ≤ 2000
الحقول الداخلية (5)
kindstringمطلوبالقيم:
"product""option"idstringاختياريالطول: 1 – 64
codestringاختياريالطول: 1 – 50
variantstringاختياريالطول: 1 – 50
availablebooleanمطلوب
الردود
200OKPartnerAvailabilityResult
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
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. |
البنية
branchIdstringمطلوبالطول: 1 – 64
offintegerمطلوبالقيمة: ≥ 0
onintegerمطلوبالقيمة: ≥ 0
keptStaffintegerمطلوبالقيمة: ≥ 0
unknownstring[]مطلوبunavailableobject[]مطلوبالحقول الداخلية (2)
kindstringمطلوبالقيم:
"product""option"idstringمطلوبالطول: 1 – 64
400INVALID_REQUEST (field, detail.issues), IDEMPOTENCY_KEY_REQUIREDPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
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 (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. |
403AVAILABILITY_NOT_ENABLED, BRANCH_NOT_ALLOWED, SCOPE_REQUIRED, PARTNER_SUSPENDED, IP_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. |
409BRANCH_NOT_LIVE: your integration is not switched on at this branch yetPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
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. |
مثال الرد
{
"branchId": "28",
"off": 1,
"on": 0,
"keptStaff": 0,
"unknown": [],
"unavailable": [
{
"kind": "product",
"id": "649"
}
]
}PATCHChange availability at a branch#
/partner/v1/branches/{id}/availabilityScope availability:write. Only the items listed: available: false takes one off, true puts back one you took off.
curl -sS -X PATCH "$LP_BASE_URL/partner/v1/branches/28/availability" \
-H "Authorization: Bearer $LP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
--data '{
"items": [
{
"kind": "product",
"id": "649",
"available": false
}
]
}'المعاملات
| الاسم | الموضع | النوع | الوصف |
|---|---|---|---|
id * | path | string | The Let's Pizza branch id. |
Idempotency-Key * | header | string | Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED. |
جسم الطلب PartnerAvailabilityRequest
itemsPartnerAvailabilityItem[]مطلوبالعناصر: ≤ 2000
الحقول الداخلية (5)
kindstringمطلوبالقيم:
"product""option"idstringاختياريالطول: 1 – 64
codestringاختياريالطول: 1 – 50
variantstringاختياريالطول: 1 – 50
availablebooleanمطلوب
الردود
200OKPartnerAvailabilityResult
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
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. |
البنية
branchIdstringمطلوبالطول: 1 – 64
offintegerمطلوبالقيمة: ≥ 0
onintegerمطلوبالقيمة: ≥ 0
keptStaffintegerمطلوبالقيمة: ≥ 0
unknownstring[]مطلوبunavailableobject[]مطلوبالحقول الداخلية (2)
kindstringمطلوبالقيم:
"product""option"idstringمطلوبالطول: 1 – 64
400INVALID_REQUEST (field, detail.issues), IDEMPOTENCY_KEY_REQUIREDPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
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 (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. |
403AVAILABILITY_NOT_ENABLED, BRANCH_NOT_ALLOWED, SCOPE_REQUIRED, PARTNER_SUSPENDED, IP_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. |
409BRANCH_NOT_LIVE: your integration is not switched on at this branch yetPartnerError
الترويسات
| الاسم | النوع | الوصف |
|---|---|---|
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. |
مثال الرد
{
"branchId": "28",
"off": 1,
"on": 0,
"keptStaff": 0,
"unknown": [],
"unavailable": [
{
"kind": "product",
"id": "649"
}
]
}