How to Add 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-dependant.

Service-level cancellation windows can be enabled by specifying min_advance_online_canceling in the service feed:

JSON

    {
  "metadata": { [...] },
  "service": [
    {
      [...],
      "rules": {
        "min_advance_online_canceling": 86400
      }
    }
  ]
}
 

Slot-dependant cancellation windows can be enabled by returning the last_online_cancellable_sec field in CheckAvailability responses. For example:

JSON

    /v3/CheckAvailability Response JSON:
{
slot {[...]},
count_available: 1,
last_online_cancellable_sec: 1552930200
}
 

If both a service level and a slot level cancellation window are set, the slot level will take effect.