Bookings
Publish booking configuration
Replaces the booking configuration while preserving menu objects.
Esta página aún no está disponible en tu idioma.
https://api.maple.inc/v1/locations/{locationId}/booking_configurationAPI keyReplaces 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
locationIdstring required
Request body
application/json, required.
-
timeZonestring required -
currencystring required -
areasobject[] required -
areas[].poolIdstring required -
areas[].namestring required -
areas[].kindstring or null -
areas[].unitsobject[] required -
areas[].units[].unitIdstring required -
areas[].units[].labelstring or null -
areas[].units[].seatsobject required -
areas[].units[].seats.mininteger or null -
areas[].units[].seats.maxinteger or null -
areas[].units[].tagsstring[] or null -
areas[].combinationsobject[] or null -
areas[].combinations[].unitIdsstring[] required -
areas[].combinations[].seatsobject required -
areas[].combinations[].seats.mininteger or null -
areas[].combinations[].seats.maxinteger or null -
turnBandsobject[] required -
turnBands[].minGuestsinteger or null -
turnBands[].maxGuestsinteger or null -
turnBands[].minutesinteger requiredAt least 1.
-
shiftsobject[] required -
shifts[].daystring requiredOne of
MON,TUE,WED,THU,FRI,SAT,SUN. -
shifts[].startstring required -
shifts[].endstring required -
pacingobject or null -
pacing.intervalMinutesinteger requiredAt least 1.
-
pacing.maxCoversinteger requiredAt least 1.
-
pacing.enforcementstring requiredOne of
hard,soft. -
bookingPolicyobject or null -
bookingPolicy.minLeadMinutesinteger or null -
bookingPolicy.maxHorizonDaysinteger or null -
bookingPolicy.slotAlignmentstring or null -
bookingPolicy.autoConfirmboolean or null -
cancellationPolicyobject or null -
cancellationPolicy.requiresCardOnFileboolean required -
cancellationPolicy.tiersobject[] required -
cancellationPolicy.tiers[].withinHoursBeforeStartinteger requiredAt least 0.
-
cancellationPolicy.tiers[].basisstring requiredOne of
flat,percent_of_subtotal,full. -
cancellationPolicy.tiers[].flatAmountMinorinteger or null -
cancellationPolicy.tiers[].percentBpsinteger or null -
cancellationPolicy.rescheduleCutoffHoursnumber or null -
cancellationPolicy.policyTextstring or null -
closedDatesstring[] or null -
expected_revisionstring or nullThe
revisionyou read. The publish is refused with 409stale_configurationif 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
-
timeZonestring required -
currencystring required -
areasobject[] required -
areas[].poolIdstring required -
areas[].namestring required -
areas[].kindstring or null -
areas[].unitsobject[] required -
areas[].units[].unitIdstring required -
areas[].units[].labelstring or null -
areas[].units[].seatsobject required -
areas[].units[].seats.mininteger or null -
areas[].units[].seats.maxinteger or null -
areas[].units[].tagsstring[] or null -
areas[].combinationsobject[] or null -
areas[].combinations[].unitIdsstring[] required -
areas[].combinations[].seatsobject required -
areas[].combinations[].seats.mininteger or null -
areas[].combinations[].seats.maxinteger or null -
turnBandsobject[] required -
turnBands[].minGuestsinteger or null -
turnBands[].maxGuestsinteger or null -
turnBands[].minutesinteger requiredAt least 1.
-
shiftsobject[] required -
shifts[].daystring requiredOne of
MON,TUE,WED,THU,FRI,SAT,SUN. -
shifts[].startstring required -
shifts[].endstring required -
pacingobject or null -
pacing.intervalMinutesinteger requiredAt least 1.
-
pacing.maxCoversinteger requiredAt least 1.
-
pacing.enforcementstring requiredOne of
hard,soft. -
bookingPolicyobject or null -
bookingPolicy.minLeadMinutesinteger or null -
bookingPolicy.maxHorizonDaysinteger or null -
bookingPolicy.slotAlignmentstring or null -
bookingPolicy.autoConfirmboolean or null -
cancellationPolicyobject or null -
cancellationPolicy.requiresCardOnFileboolean required -
cancellationPolicy.tiersobject[] required -
cancellationPolicy.tiers[].withinHoursBeforeStartinteger requiredAt least 0.
-
cancellationPolicy.tiers[].basisstring requiredOne of
flat,percent_of_subtotal,full. -
cancellationPolicy.tiers[].flatAmountMinorinteger or null -
cancellationPolicy.tiers[].percentBpsinteger or null -
cancellationPolicy.rescheduleCutoffHoursnumber or null -
cancellationPolicy.policyTextstring or null -
closedDatesstring[] or null -
revisionstring requiredContent revision of the configuration. Send it back as
expected_revisionto publish safely. -
objectstring requiredAlways
booking_configuration. -
location_idstring required -
version_idstring required -
published_atstring required -
livemodeboolean required
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.