Ir al contenido
Maple

Bookings

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.

PUThttps://api.maple.inc/v1/locations/{locationId}/booking_blackoutsAPI key

Replaces 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

  • locationId string path required

Request body

application/json, required.

  • blackout_dates object[] required

    The location’s whole list, at most 100 ranges. An empty list clears every blackout.

  • blackout_dates[].start_date string required

    First blocked day, venue-local YYYY-MM-DD.

  • blackout_dates[].end_date string required

    Last blocked day, inclusive, venue-local YYYY-MM-DD.

  • blackout_dates[].start_time string or null

    Venue-local HH:MM the block starts on start_date; omit or null to block from the start of the day.

  • blackout_dates[].end_time string or null

    Venue-local HH:MM the block ends on end_date, inclusive; omit or null to block through the end of the day.

  • blackout_dates[].reason string or null

    A note for the venue’s staff, at most 200 characters.

  • expected_revision string or null

    The blackout_dates_revision (or revision) you last read. A list changed since answers 409 stale_blackout_dates and nothing is written. Omit it to replace the list regardless.

Responses

200 OK

  • object string required

    Always booking_blackouts.

  • location_id string required

  • blackout_dates object[] required

    In start order.

  • blackout_dates[].start_date string required

    First blocked day, venue-local YYYY-MM-DD.

  • blackout_dates[].end_date string required

    Last blocked day, inclusive, venue-local YYYY-MM-DD.

  • blackout_dates[].start_time string or null required

    Venue-local HH:MM the block starts on start_date; null blocks from the start of that day.

  • blackout_dates[].end_time string or null required

    Venue-local HH:MM the block ends on end_date, inclusive; null blocks through the end of that day.

  • blackout_dates[].reason string or null required

    The venue’s note, e.g. “Private event”.

  • revision string required

    The list’s revision. Send it as expected_revision on your next write to refuse one that would overwrite a change made since.

Errors

  • 400 Bad request DeveloperApiBadRequest

  • 401 Unauthorized DeveloperApiUnauthorized

  • 403 Forbidden DeveloperApiForbidden

  • 404 Not found DeveloperApiNotFound

  • 409 Conflict DeveloperApiConflict

  • 422 Unprocessable DeveloperApiUnprocessable

  • 429 Too many requests DeveloperApiRateLimited

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.