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#
- Branch → Your systemThe item runs out
- Your system → Let's PizzaSwitch the item off at the branch
PUT …/branches/{id}/availability - Let's PizzaGreyed out on site and app
- Let's Pizza → Your systemavailability.changed to subscribers
availability.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.availabilityis 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#
| Call | What it means | When to use it |
|---|---|---|
PUT | Everything that is out at the branch now. Your earlier flags not listed are cleared. | A periodic sync, or after your system restarts. |
PATCH | Only the items listed: available: false takes one off, true puts back one you took off. | The moment an item runs out or comes back. |
{
"items": [
{
"kind": "product",
"id": "649",
"available": false
}
]
}{
"branchId": "28",
"off": 1,
"on": 0,
"keptStaff": 0,
"unknown": [],
"unavailable": [
{
"kind": "product",
"id": "649"
}
]
}Event example#
{
"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.
- PUT
/partner/v1/branches/{id}/availabilitySwitch items off and on at a branchavailability:writeAvailable - PATCH
/partner/v1/branches/{id}/availabilityChange only the items listedavailability:writeAvailable - GET
/partner/v1/catalogThe published menu with your codescatalog:readAvailable - POST
/partner/v1/webhooksA new subscriptionwebhooks:manageAvailable