Ir al contenido
Maple

Bookings

Replaces the booking configuration while preserving menu objects.

Esta página aún no está disponible en tu idioma.

POSThttps://api.maple.inc/v1/locations/{locationId}/booking_configurationAPI key

Replaces the booking configuration while preserving menu objects. Requires bookings:configure, a location grant, and the bookings-public-api rollout flag. An identical document is a content-addressed no-op. Provider-managed locations are unsupported. A location without a connection can be configured, but publishing does not enable bookings or change its rollout flags. Send the revision you read as expected_revision so a configuration changed since (a manager editing it in the Maple dashboard, or another app) answers 409 stale_configuration instead of being overwritten.

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.

  • timeZone string required

  • currency string required

  • areas object[] required

  • areas[].poolId string required

  • areas[].name string required

  • areas[].kind string or null

  • areas[].units object[] required

  • areas[].units[].unitId string required

  • areas[].units[].label string or null

  • areas[].units[].seats object required

  • areas[].units[].seats.min integer or null

  • areas[].units[].seats.max integer or null

  • areas[].units[].tags string[] or null

  • areas[].combinations object[] or null

  • areas[].combinations[].unitIds string[] required

  • areas[].combinations[].seats object required

  • areas[].combinations[].seats.min integer or null

  • areas[].combinations[].seats.max integer or null

  • turnBands object[] required

  • turnBands[].minGuests integer or null

  • turnBands[].maxGuests integer or null

  • turnBands[].minutes integer required

    At least 1.

  • shifts object[] required

  • shifts[].day string required

    One of MON, TUE, WED, THU, FRI, SAT, SUN.

  • shifts[].start string required

  • shifts[].end string required

  • pacing object or null

  • pacing.intervalMinutes integer required

    At least 1.

  • pacing.maxCovers integer required

    At least 1.

  • pacing.enforcement string required

    One of hard, soft.

  • bookingPolicy object or null

  • bookingPolicy.minLeadMinutes integer or null

  • bookingPolicy.maxHorizonDays integer or null

  • bookingPolicy.slotAlignment string or null

  • bookingPolicy.autoConfirm boolean or null

  • cancellationPolicy object or null

  • cancellationPolicy.requiresCardOnFile boolean required

  • cancellationPolicy.tiers object[] required

  • cancellationPolicy.tiers[].withinHoursBeforeStart integer required

    At least 0.

  • cancellationPolicy.tiers[].basis string required

    One of flat, percent_of_subtotal, full.

  • cancellationPolicy.tiers[].flatAmountMinor integer or null

  • cancellationPolicy.tiers[].percentBps integer or null

  • cancellationPolicy.rescheduleCutoffHours number or null

  • cancellationPolicy.policyText string or null

  • closedDates string[] or null

  • expected_revision string or null

    The revision you read. The publish is refused with 409 stale_configuration if the configuration changed since (for example, a manager edited it in the Maple dashboard). null = you expect no configuration yet. Omit to replace it unconditionally.

Responses

200 OK

  • timeZone string required

  • currency string required

  • areas object[] required

  • areas[].poolId string required

  • areas[].name string required

  • areas[].kind string or null

  • areas[].units object[] required

  • areas[].units[].unitId string required

  • areas[].units[].label string or null

  • areas[].units[].seats object required

  • areas[].units[].seats.min integer or null

  • areas[].units[].seats.max integer or null

  • areas[].units[].tags string[] or null

  • areas[].combinations object[] or null

  • areas[].combinations[].unitIds string[] required

  • areas[].combinations[].seats object required

  • areas[].combinations[].seats.min integer or null

  • areas[].combinations[].seats.max integer or null

  • turnBands object[] required

  • turnBands[].minGuests integer or null

  • turnBands[].maxGuests integer or null

  • turnBands[].minutes integer required

    At least 1.

  • shifts object[] required

  • shifts[].day string required

    One of MON, TUE, WED, THU, FRI, SAT, SUN.

  • shifts[].start string required

  • shifts[].end string required

  • pacing object or null

  • pacing.intervalMinutes integer required

    At least 1.

  • pacing.maxCovers integer required

    At least 1.

  • pacing.enforcement string required

    One of hard, soft.

  • bookingPolicy object or null

  • bookingPolicy.minLeadMinutes integer or null

  • bookingPolicy.maxHorizonDays integer or null

  • bookingPolicy.slotAlignment string or null

  • bookingPolicy.autoConfirm boolean or null

  • cancellationPolicy object or null

  • cancellationPolicy.requiresCardOnFile boolean required

  • cancellationPolicy.tiers object[] required

  • cancellationPolicy.tiers[].withinHoursBeforeStart integer required

    At least 0.

  • cancellationPolicy.tiers[].basis string required

    One of flat, percent_of_subtotal, full.

  • cancellationPolicy.tiers[].flatAmountMinor integer or null

  • cancellationPolicy.tiers[].percentBps integer or null

  • cancellationPolicy.rescheduleCutoffHours number or null

  • cancellationPolicy.policyText string or null

  • closedDates string[] or null

  • revision string required

    Content revision of the configuration. Send it back as expected_revision to publish safely.

  • object string required

    Always booking_configuration.

  • location_id string required

  • version_id string required

  • published_at string required

  • livemode boolean required

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.