Skip to navigation

Set a menu's schedule

Partner key + restaurant key. Replaces the whole schedule (the same fields as the restaurant dashboard, but unknown fields, also on a row, give 422); an empty list removes it. Times are HH:MM in Europe/Oslo, and endsAt must be after startsAt on the same day. When the windows of two menus overlap, the menu’s priority (set with PATCH …/menus/{menuId}) decides; priority on a schedule row is stored but not used. Among the active menus inside their date period: when one or more have a schedule window right now, only those are shown (the highest priority; equal priority shows all), also instead of the default menu. Otherwise the default menu is shown, also when it has a schedule of its own and is outside it. A menu with a schedule that is not the default is therefore shown only inside its windows, and the main menu must be the default to be shown the rest of the time. With no active default menu, all active menus are shown outside the windows. isLiveNow says whether the menu is shown right now. GET /api/v1/menu is CDN-cached (s-maxage=30, stale-while-revalidate=300, at most 330 seconds), so the website can show the old menu for up to six minutes.

Authentication

AuthorizationBearer

The partner key (lbp_test_… or lbp_live_…), sent as Authorization: Bearer lbp_… and created in LettBestilt Partner under Partner key. It belongs to the whole partner, not to a restaurant, and only works against /api/v1/partner. Server to server only: a request with an Origin header is rejected with 403 FORBIDDEN, and the key must never be in a browser. A TEST key sees and creates only sandboxes; LIVE keys work once LettBestilt Partner is open. A suspended or archived partner, a revoked key and a restaurant key (lbs_…) here give 401 UNAUTHORIZED; an expired key gives 401 KEY_EXPIRED.

X-LettBestilt-Restaurant-Keystring

The restaurant’s own key (lbs_test_… or lbs_live_…) for calls about one restaurant in the partner API, sent together with the partner key. The key must have full access (scope *, otherwise 403 INSUFFICIENT_SCOPE), belong to a restaurant the partner owns and be in the same environment as the partner key. A restaurant that does not exist, belongs to another partner or does not match the key always gives the same 404 RESTAURANT_NOT_FOUND. Older keys without an environment in the prefix (lbs_<random>) are not accepted here; rotate them in LettBestilt Partner.

Path parameters

slugstringRequired

The restaurant’s slug. It must match the restaurant key in X-LettBestilt-Restaurant-Key.

menuIdstringRequired

The menu’s id.

Request

This endpoint expects an object.
scheduleslist of objectsRequired

The whole schedule; an empty list removes it. The same fields as the restaurant dashboard, but unknown fields on the rows give 422.

Response

The menu with the new schedule.
dataobject

A menu in list form. Among the active menus inside their date period: when one or more have a schedule window right now, only those are shown (the highest priority; equal priority shows all), also instead of the default menu. Otherwise the default menu is shown, also when it has a schedule of its own and is outside it. A menu with a schedule that is not the default is therefore shown only inside its windows, and the main menu must be the default to be shown the rest of the time. With no active default menu, all active menus are shown outside the windows. isLiveNow says whether the menu is shown right now. Menu has no updatedAt: a change that collides with a concurrent change gives 409 CHANGED.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error