Setting a minimum advanced booking time

Setting a minimum advanced booking time

There are many cases in which a merchant would like specific services or slots to be booked a minimum time in advance. These can be set at either the service level and/or at the availability level. If it is set at both, the setting at the availability level will be used.

At the service level the field is called min_advance_booking. This field should be set to the number of seconds in advance of the reservation start time that the booking needs to be made. For example if the booking always needs to be made 1 hour before the start time this field would be set to 3600 (so a booking for 3pm can be booked up until 2pm).

JSON

     "service": [
    {
      "rules": {
        "min_advance_booking": 3600
      }
    }
  ]
 

At the availability slot level the field is called last_bookable_sec. This field is the last time (in seconds) that the specific slot can be booked.

JSON

    "service_availability": [
    {
      "availability": {
        "scheduling_rule_overrides": {
          "last_bookable_sec": 1468081800
         }
      }
    }
  ]