Set Cancellation Windows

How to Add Cancellation Windows

Cancellation windows define when the cancellation button is activate. This means the cancellation function will be inoperable in user confirmation emails and will disappear from all other surfaces.

Cancellation windows can be enabled in two ways: service-level and slot-level. The processes for specifying windows at these levels are discussed below.

If both a service-level and a slot-level cancellation window are set, the slot-level window will take effect. If neither are set, the cancellation window defaults to the start of the time slot (i.e. the user can be cancelled at the last minute).

Service level definition

Service-level cancellation windows can be enabled by specifying rules.min_advance_online_canceling in the Service feed. 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 can only be cancelled up until 24h before the start time this field would be set to 86400 (so a booking for 3pm can only be cancelled until 3pm the previous day). This would apply to all slots for that service (unless overridden by slot level definition).

JSON

{
  "service": [
    {
      "rules": {
        "min_advance_online_canceling": 86400
      }
    }
  ]
}

Slot level definition

At the availability slot level the field is called scheduling_rule_overrides.last_online_cancellable_sec. This field is the last time (EPOCH timestamp) that the specific slot can be cancelled. This would apply to each individual slot where this was specified.

JSON

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