Bookings
Replace booking blackout dates
Replaces the location’s whole list of blackout windows: days or part-days when it takes no reservations, such as a private event.
Esta página aún no está disponible en tu idioma.
https://api.maple.inc/v1/locations/{locationId}/booking_blackoutsAPI keyReplaces the location’s whole list of blackout windows: days or part-days when it takes no reservations, such as a private event. Maple enforces them for native and provider-managed locations alike: availability omits the slots, and a quote taken earlier is refused when held, booked, or used for a change (409 slot_unavailable natively, 422 date_blocked for provider-managed locations). Existing bookings inside a new window are not cancelled, and walk-ins and waitlist seating are not blocked: a blackout stops reservations only. The venue edits the same list in its dashboard: read blackout_dates and blackout_dates_revision on the booking profile, and send the revision as expected_revision so a list changed since answers 409 stale_blackout_dates instead of being overwritten. Invalid ranges answer 400 invalid_blackout_dates. Requires bookings:configure.
Authorization
Send your API key as Authorization: Bearer <key>: mpk_test_… against the sandbox (https://api.staging.maple.inc/v1), mpk_live_… against production. See Authentication. The samples read the key from MAPLE_KEY and the base URL from MAPLE_BASE, as set up in the Quickstart.
Parameters
locationIdstring required
Request body
application/json, required.
-
blackout_datesobject[] requiredThe location’s whole list, at most 100 ranges. An empty list clears every blackout.
-
blackout_dates[].start_datestring requiredFirst blocked day, venue-local
YYYY-MM-DD. -
blackout_dates[].end_datestring requiredLast blocked day, inclusive, venue-local
YYYY-MM-DD. -
blackout_dates[].start_timestring or nullVenue-local
HH:MMthe block starts onstart_date; omit or null to block from the start of the day. -
blackout_dates[].end_timestring or nullVenue-local
HH:MMthe block ends onend_date, inclusive; omit or null to block through the end of the day. -
blackout_dates[].reasonstring or nullA note for the venue’s staff, at most 200 characters.
-
expected_revisionstring or nullThe
blackout_dates_revision(orrevision) you last read. A list changed since answers 409stale_blackout_datesand nothing is written. Omit it to replace the list regardless.
Responses
200 OK
-
objectstring requiredAlways
booking_blackouts. -
location_idstring required -
blackout_datesobject[] requiredIn start order.
-
blackout_dates[].start_datestring requiredFirst blocked day, venue-local
YYYY-MM-DD. -
blackout_dates[].end_datestring requiredLast blocked day, inclusive, venue-local
YYYY-MM-DD. -
blackout_dates[].start_timestring or null requiredVenue-local
HH:MMthe block starts onstart_date; null blocks from the start of that day. -
blackout_dates[].end_timestring or null requiredVenue-local
HH:MMthe block ends onend_date, inclusive; null blocks through the end of that day. -
blackout_dates[].reasonstring or null requiredThe venue’s note, e.g. “Private event”.
-
revisionstring requiredThe list’s revision. Send it as
expected_revisionon your next write to refuse one that would overwrite a change made since.
Errors
-
400Bad request -
401Unauthorized -
403Forbidden -
404Not found -
409Conflict -
422Unprocessable -
429Too many requests
Every error body names the error in _tag, explains it in message, and says where to report it in feedback. See Errors.
A 429 also sends Retry-After: Seconds to wait before retrying; also returned as retry_after in the body.