Let's Pizza Developersv1.0.0

API reference

Availability

What is out at a branch now, from your POS or ERP.

PUTYour unavailable items at a branch (whole list)#

PUT/partner/v1/branches/{id}/availability

Scope 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.

Authentication
Partner key in the Authorization header
Scopes required
availability:write
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
    }
  ]
}'

Parameters

NameInTypeDescription
id *pathstringThe Let's Pizza branch id.
Idempotency-Key *headerstringYour 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.

Request body PartnerAvailabilityRequest

  • itemsPartnerAvailabilityItem[]required

    items ≤ 2000

    Child attributes (5)
    • kindstringrequired

      Values: "product""option"

    • idstringoptional

      length 1 – 64

    • codestringoptional

      length 1 – 50

    • variantstringoptional

      length 1 – 50

    • availablebooleanrequired

Responses

200OKPartnerAvailabilityResult

Headers

NameTypeDescription
X-Request-IdstringThe 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-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

Schema

  • branchIdstringrequired

    length 1 – 64

  • offintegerrequired

    value ≥ 0

  • onintegerrequired

    value ≥ 0

  • keptStaffintegerrequired

    value ≥ 0

  • unknownstring[]required
  • unavailableobject[]required
    Child attributes (2)
    • kindstringrequired

      Values: "product""option"

    • idstringrequired

      length 1 – 64

400INVALID_REQUEST (field, detail.issues), IDEMPOTENCY_KEY_REQUIREDPartnerError

Headers

NameTypeDescription
X-Request-IdstringThe 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

Headers

NameTypeDescription
X-Request-IdstringThe 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

Headers

NameTypeDescription
X-Request-IdstringThe 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

Headers

NameTypeDescription
X-Request-IdstringThe 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

NameTypeDescription
X-Request-IdstringThe 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

NameTypeDescription
X-Request-IdstringThe 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

200 · PartnerAvailabilityResult
{
  "branchId": "28",
  "off": 1,
  "on": 0,
  "keptStaff": 0,
  "unknown": [],
  "unavailable": [
    {
      "kind": "product",
      "id": "649"
    }
  ]
}

PATCHChange availability at a branch#

PATCH/partner/v1/branches/{id}/availability

Scope availability:write. Only the items listed: available: false takes one off, true puts back one you took off.

Authentication
Partner key in the Authorization header
Scopes required
availability:write
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
    }
  ]
}'

Parameters

NameInTypeDescription
id *pathstringThe Let's Pizza branch id.
Idempotency-Key *headerstringYour 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.

Request body PartnerAvailabilityRequest

  • itemsPartnerAvailabilityItem[]required

    items ≤ 2000

    Child attributes (5)
    • kindstringrequired

      Values: "product""option"

    • idstringoptional

      length 1 – 64

    • codestringoptional

      length 1 – 50

    • variantstringoptional

      length 1 – 50

    • availablebooleanrequired

Responses

200OKPartnerAvailabilityResult

Headers

NameTypeDescription
X-Request-IdstringThe 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-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

Schema

  • branchIdstringrequired

    length 1 – 64

  • offintegerrequired

    value ≥ 0

  • onintegerrequired

    value ≥ 0

  • keptStaffintegerrequired

    value ≥ 0

  • unknownstring[]required
  • unavailableobject[]required
    Child attributes (2)
    • kindstringrequired

      Values: "product""option"

    • idstringrequired

      length 1 – 64

400INVALID_REQUEST (field, detail.issues), IDEMPOTENCY_KEY_REQUIREDPartnerError

Headers

NameTypeDescription
X-Request-IdstringThe 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

Headers

NameTypeDescription
X-Request-IdstringThe 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

Headers

NameTypeDescription
X-Request-IdstringThe 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

Headers

NameTypeDescription
X-Request-IdstringThe 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

NameTypeDescription
X-Request-IdstringThe 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

NameTypeDescription
X-Request-IdstringThe 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

200 · PartnerAvailabilityResult
{
  "branchId": "28",
  "off": 1,
  "on": 0,
  "keptStaff": 0,
  "unknown": [],
  "unavailable": [
    {
      "kind": "product",
      "id": "649"
    }
  ]
}