Let's Pizza Developersv1.0.0

Guides

Availability and sold out

When an item runs out at a branch it greys out on the site and app for that branch within seconds, and the pricing engine refuses it.

The flow#

  1. Branch → Your systemThe item runs out
  2. Your system → Let's PizzaSwitch the item off at the branchPUT …/branches/{id}/availability
  3. Let's PizzaGreyed out on site and app
  4. Let's Pizza → Your systemavailability.changed to subscribersavailability.changed

The rules#

  • Staff flags always win: an item is unavailable if your system or branch staff switched it off, and your system never clears a staff flag (counted in keptStaff).
  • Name an item by our id or by your code (with a variant when needed). An unmapped code comes back in unknown and is not applied.
  • Your flags apply only when settings.availability is true (else 403 AVAILABILITY_NOT_ENABLED), and at a branch switched on for you (else 409 BRANCH_NOT_LIVE).
  • Changes reach the website and the app at once. An order confirmed before is not touched; the branch follows the customer’s “if unavailable” instruction.

Whole list or changes#

CallWhat it meansWhen to use it
PUTEverything that is out at the branch now. Your earlier flags not listed are cleared.A periodic sync, or after your system restarts.
PATCHOnly the items listed: available: false takes one off, true puts back one you took off.The moment an item runs out or comes back.
PATCH /partner/v1/branches/{id}/availability · PartnerAvailabilityRequest
{
  "items": [
    {
      "kind": "product",
      "id": "649",
      "available": false
    }
  ]
}
200 · PartnerAvailabilityResult
{
  "branchId": "28",
  "off": 1,
  "on": 0,
  "keptStaff": 0,
  "unknown": [],
  "unavailable": [
    {
      "kind": "product",
      "id": "649"
    }
  ]
}

Event example#

availability.changed
{
  "version": 1,
  "id": "2219.availability.changed",
  "type": "availability.changed",
  "occurredAt": "2026-10-31T10:05:00.000Z",
  "branchId": "28",
  "data": {
    "branch": {
      "id": "28",
      "names": {
        "ar": "التخصصي",
        "en": "At Takhassusi"
      }
    },
    "changes": [
      {
        "kind": "product",
        "itemId": "649",
        "available": false
      }
    ]
  }
}

Endpoints used#

Anything marked “Coming soon” is not served yet; it joins the reference as soon as it ships.