setLocationSpecialHours
Replace a location's upcoming special dates — holidays, early closes, full-day closures (ONE-2727). The list you send replaces all special dates from today forward; past dates are untouched. Propagates to every storefront at the location, asynchronously.
The LOCATION tier is the only special-hours tier this API models (ONE-2751). OneTablet also carries brand-at-location overrides internally, and a storefront's effective special dates are the union of the two with the more-closed schedule winning on a shared date — but that tier has no operation here, in either direction, so nothing on this contract reads or writes it. If it is ever published it arrives as a matched read and write pair, announced in the changelog.
dates is required and must be non-empty UNLESS wipeAll: true, which deliberately clears every upcoming special date instead. See SetLocationSpecialHoursRequest's own doc comment.
⚠️ SCOPE: OWNER-ONLY, which is NARROWER THAN THE READS. Only a locationId your organization OWNS — one whose Location.organizationId from fetchLocations equals your own organization id. If you operate a brand out of somebody else's host kitchen, fetchLocations shows you that kitchen and fetchStoreHours reports its hours, but you may NOT write them: a location-hours write is not brand-scoped, it moves the schedule for every brand trading there, including the host's. Ask the host to make the change.
A locationId that is not yours — whether another organization's outright or a host kitchen you merely operate in — is INDISTINGUISHABLE from one that does not exist at all. All of them are the same 404 {"message":"Not Found"}, and never a write. The body is deliberately bare: anything that told the cases apart would let you enumerate locations you cannot see. The rule above is the explanation the body does not carry, so check organizationId on the location from fetchLocations against your own organization id before you write.
Request
- locationIdstring
The
Locationto write special hours for. Required. - datesSpecialDate[]
The desired COMPLETE set of special hours for the location, replacing every upcoming date not present in it. Required and must be non-empty unless
wipeAll: true. See the class doc comment. - wipeAllboolean
Deliberately clear every upcoming special date. ADDITIVE to the published contract — absent is the pre-existing behavior (send
dates). See the class doc comment.
{
"locationId": "00000000-0000-0000-0000-000000000000",
"dates": [
{
"date": "<date>",
"closed": true,
"opensAt": "<opensAt>",
"closesAt": "<closesAt>"
}
],
"wipeAll": true
}Responses
- datesSpecialDate[]
The location's special dates as persisted after this call.
About Stores
The places you operate and the brands you operate there.
OneTablet models a restaurant business in three layers, and every other section of this API assumes them. A brand is a menu concept — what a customer sees on a delivery app. A location is a physical address with a kitchen in it. A store is one storefront: a single brand, at a single location, on a single platform — so a location running two brands on three platforms has six stores, each with its own menu, hours and pause state.
The directory reads join on IDS, never on display names: every store carries its location.id and brand.id, and a location carries the id of each brand it runs.
Start here — a location carries the timezone that every schedule, report window and business day elsewhere on this API is interpreted in.
EVERY operation here is a READ, org-scoped to the organization your api key resolves to: nothing in this section mutates, and nothing here calls out to a delivery platform live (ONE-2618).
Whether a storefront is currently taking orders is NOT here — fetchStoreStatuses, pauseStores, unpauseStores and the store.status.changed webhook live in StoreStatusApi under /management/store-status (ONE-2736). This section answers "what do I operate"; that one answers "is it open right now, and does the platform agree".