API reference
Branches
Let's Pizza branches as the key may see them (hours and zones stay in the Let's Pizza console).
GETThe branches the key may act on#
GET
/partner/v1/branchesScope branches:read. live = your flows run at that branch; externalCode = your code for it once mapped.
curl -sS "$LP_BASE_URL/partner/v1/branches" \
-H "Authorization: Bearer $LP_API_KEY"Responses
200OKPartnerBranchList
Headers
| Name | Type | Description |
|---|---|---|
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. |
Schema
itemsPartnerBranch[]requiredThe branches the key may act on.
Child attributes (8)
idstringrequiredThe branch's Let's Pizza id; stable.
length 1 – 64
namesLocalizedrequiredThe branch name in Arabic and English.
Child attributes (2)
arstringrequiredenstringrequired
phonestringrequiredThe branch phone, in international format.
locationobjectrequiredWhere the branch is.
Child attributes (2)
latnumberrequiredlngnumberrequired
fulfilmentobjectrequiredHow the branch serves orders.
Child attributes (2)
deliverybooleanrequiredpickupbooleanrequired
pausedbooleanrequiredClosed by staff now, whatever the hours say.
livebooleanrequiredYour flows run at this branch.
externalCodestringrequirednullableYour code for this branch, from the mappings; null until mapped.
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError
Headers
| Name | Type | Description |
|---|---|---|
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
Headers
| Name | Type | Description |
|---|---|---|
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
Headers
| Name | Type | Description |
|---|---|---|
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
Headers
| Name | Type | Description |
|---|---|---|
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. |
Example response
{
"items": [
{
"id": "28",
"names": {
"ar": "التخصصي",
"en": "At Takhassusi"
},
"phone": "+966550920955",
"location": {
"lat": 24.684674035598,
"lng": 46.67496908366
},
"fulfilment": {
"delivery": true,
"pickup": true
},
"paused": false,
"live": true,
"externalCode": "STORE-28"
}
]
}