Cómo establecer un tiempo mínimo de reserva anticipada
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Cómo establecer un tiempo mínimo de reserva anticipada
Hay muchos casos en los que un comercio desea que se reserven servicios o horarios específicos con un tiempo mínimo de anticipación. Se pueden configurar a nivel del servicio o de la disponibilidad. Si se establece en ambos, se usará la configuración a nivel de la disponibilidad.
Definición del nivel de servicio
A nivel del servicio, el campo se llama rules.min_advance_booking. Este campo se debe establecer en la cantidad de segundos antes de la hora de inicio de la reserva que se debe realizar. Por ejemplo, si la reserva siempre se debe realizar 1 hora antes de la hora de inicio, este campo se establecerá en 3,600 (por lo que se puede reservar una reserva para las 3 p.m. hasta las 2 p.m.). Esto se aplicaría a
todos los horarios de ese servicio (a menos que se anule con la definición a nivel del horario).
[null,null,["Última actualización: 2025-07-26 (UTC)"],[[["\u003cp\u003eMerchants can set a minimum advance booking time for services or specific time slots.\u003c/p\u003e\n"],["\u003cp\u003eService-level settings use \u003ccode\u003erules.min_advance_booking\u003c/code\u003e to define the minimum booking time in seconds before the start time.\u003c/p\u003e\n"],["\u003cp\u003eSlot-level settings use \u003ccode\u003escheduling_rule_overrides.last_bookable_sec\u003c/code\u003e to define the last bookable time for a specific slot using an EPOCH timestamp.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to implement booking window validation on the booking server to handle edge cases and prevent bookings outside the allowed timeframe, responding with \u003ccode\u003eSLOT_UNAVAILABLE\u003c/code\u003e if necessary.\u003c/p\u003e\n"]]],["Merchants can set a minimum advance booking time for services or slots. At the service level, `rules.min_advance_booking` defines the minimum seconds before the start time a booking can be made. At the slot level, `scheduling_rule_overrides.last_bookable_sec` specifies the last bookable time via an epoch timestamp. If both are set, the slot-level rule takes precedence. Merchants must also validate booking windows on requests and reject those out of bounds with a `SLOT_UNAVAILABLE` error.\n"],null,["# Set a minimum advanced booking time\n\nSetting a minimum advanced booking time\n---------------------------------------\n\nThere are many cases in which a merchant would like specific services or\nslots to be booked a minimum time in advance. These can be set at either the\nservice level and/or at the availability level. If it is set at both, the\nsetting at the availability level will be used.\n\n### Service level definition\n\nAt the\n[service level the field is called `rules.min_advance_booking`](/actions-center/verticals/reservations/e2e/reference/feeds/services-feed#SchedulingRules-definition). This field\nshould be set to the number of seconds in advance of the reservation start\ntime that the booking needs to be made. For example if the booking always\nneeds to be made 1 hour before the start time this field would be set to\n3600 (so a booking for 3pm can be booked up until 2pm). This would apply to\nall slots for that service (unless overridden by [slot level definition](#slot-level)). \n\n### JSON\n\n```json\n\"service\": [\n {\n \"rules\": {\n \"min_advance_booking\": 3600\n }\n }\n]\n```\n\n### Slot level definition\n\nAt the\n[availability slot level the field is called\n`scheduling_rule_overrides.last_bookable_sec`](/actions-center/verticals/reservations/e2e/reference/feeds/availability-feed#Availability-definition). This\nfield is the last time (EPOCH timestamp) that the specific slot can be booked.\nThis would apply to each individual slot where this was specified. \n\n### JSON\n\n```json\n\"service_availability\": [\n {\n \"availability\": {\n \"scheduling_rule_overrides\": {\n \"last_bookable_sec\": 1468081800\n }\n }\n }\n]\n```\n| **Warning** : Implementing advance booking limit in feeds does not prevent you from having to check if the booking is within the allowed booking window and handle it [`BookingFailure`](/actions-center/verticals/reservations/e2e/reference/booking-server-api-rest/e2e-definitions/bookingfailure-definition) `SLOT_UNAVAILABLE`. There might be edge cases (such as a stall browser tab) where a [`CreateBooking`](/actions-center/verticals/reservations/e2e/reference/booking-server-api-rest/e2e-methods/createbooking-method) might be sent outside of the booking window. Upon receiving a [`CreateBooking`](/actions-center/verticals/reservations/e2e/reference/booking-server-api-rest/e2e-methods/createbooking-method), your system must confirm that the booking occurs within the allowed booking window and, if it's not, respond with `CreateBookingResponse.booking_failure = SLOT_UNAVAILABLE`."]]