Booking Policies API

Written By Sam Walton (Super Administrator)

Updated at February 14th, 2024

Applies To Version R2023.00 (1.20) or later

 

The Booking Policy API is available for customers at the following end point:

 https://dataentryapi.ibss.(server_name).iconics.cloud/v2/{0}/BookingPolicies

It primarily consists of the following data fragments to make up the policy rules.
 

Booking Slots

The booking slots are defined by one or more BookableTime objects, and optionally some ExcludedDates objects.

Bookable Time

The BookableTime definition is an array containing one or multiple complex entries, made up out of 3 elements:

  • Days: an array specifying at which days the space is available between the specified StartTime and EndTime. Supported values:
    • "1" = Monday
    • "2" = Tuesday
    • "3" = Wednesday
    • "4" = Thursday
    • "5" = Friday
    • "6" = Saturday
    • "7" = Sunday
  • StartTime: the start time specified as 24 hour clock (local time)
  • EndTime: the end time specified as 24 hour clock (local time) 

Example

1  {
2 "BookableTime": [{
3  "Days": ["1", "2", "3", "4", "5"],
4 "StartTime": "08:00",
5 "EndTime": "12:00"
6 },
7 {
8  "Days": ["1", "2", "3"],
9 "StartTime": "14:00",
10  "EndTime": "18:00"
11 }
12 ]
13 }

Default Behaviours

  • If the BookableTime element is missing, no bookable times will be available
  • If the BookableTime element is empty, no bookable times will be available
  • Any day values that are not between 1 and 7 (inclusive) will be ignored. If there are no valid values remaining after ignoring the incorrect values, the entry will be ignored, other entries in the array may still be processed.
  • If StartTime does not contain a valid value, it will default to 00:00
  • If StartTime is missing, it will default to 00:00
  • If EndTime does not contain a valid value, it will default to 23:59
  • If EndTime is missing, it will default to 23:59
  • If StartTime is greater than EndTime, the entry will be ignored, other entries in the array may still be processed.

ExcludedDates

The ExcludedDates definition is an array containing one or multiple complex entries, which define when the BookableTime slots are not available, these entries are made up out of 4 elements:

  • StartDate: the start date specified in iso format (yyyy-MM-dd)
  • EndDate: the end date specified in iso format (yyyy-MM-dd)
  • StartTime: the start time specified as 24 hour clock (local time)
  • EndTime: the end time specified as 24 hour clock (local time) 

Example

1 {
2 "ExcludedDates": [{
3 "StartDate": "2022-12-23",
4 "EndDate": "2023-01-03",
5 "StartTime": "00:00",
6 "EndTime": "23:59"
7 }]
8 }

Default Behaviours

  • If the ExcludedDates element is missing, no exclusions will be applied
  • If the ExcludedDates element is empty, no exclusions will be applied
  • If StartDate does not contain a valid date, the entry will be ignored, other entries in the array may still be processed.
  • If EndDate does not contain a valid date, the entry will be ignored, other entries in the array may still be processed.
  • If StartDate is greater than EndDate, the entry will be ignored, other entries in the array may still be processed.
  • If StartTime is missing, it will default to 00:00
  • If StartTime does not contain a valid value, it will default to 00:00
  • If StartTime is missing, it will default to 00:00
  • If EndTime does not contain a valid value, it will default to 23:59
  • If EndTime is missing, it will default to 23:59
  • If StartDate is the same as EndDate and StartTime is greater than EndTime, the entry will be ignored, other entries in the array may still be processed.

Booking Starts

The BookingStart definition is a complex element containing two sub-elements:

  • SpecificMinutes: an array of specific minutes at which a booking can start
  • SpecificTimes: an array of specific times at which a booking can start

Example

1 {
2 "BookingStart": {
3 "SpecificMinutes": ["0", "15", "30", "45"],
4 "SpecificTimes": ["11:00", "11:45", "12:30", "13:15"]
5 }
6 }

Default Behaviours

  • If the BookingStart element is missing, meetings can start at any time (within the bookable time boundaries)
  • If the BookingStart element is empty, meetings can start at any time (within the bookable time boundaries)
  • If the SpecificMinutes element is present but empty and the SpecificTimes element is missing, meetings can start at any time (within the bookable time boundaries)
  • If the SpecificTimes element is present but empty and the SpecificMinutes element is missing, meetings can start at any time (within the bookable time boundaries)
  • If the SpecificTimes and SpecificMinutes element are present but both are empty, meetings can start at any time (within the bookable time boundaries)
  • All values in the SpecificMinutes element that are less than "0" or more than "59" will be ignored
  • All values in the SpecificTimes element that are less than "00:00" or more than "23:59" will be ignored
  • If both SpecificMinutes and SpecificTimes are present and have valid values, the values in SpecificMinutes will be used

Booking Duration

The BookingDuration definition is a complex element containing three sub-elements:

  • Minimum: the minimum duration in minutes for a booking
  • Maximum: the maximum duration in minutes for a booking
  • Fixed: an array of specific durations that are supported for a booking

Example

1 {
2 "BookingDuration": {
3 "Minimum": 0,
4 "Maximum": 240,
5 "Fixed": ["15", "20", "30", "45"]
6 }
7 }

Default Behaviours

  • If the BookingDuration element is missing, meetings can have any duration
  • If the BookingDuration element is empty, meetings can have any duration
  • If the Minimum is less than "0", it will assume a value of “0”
  • If the Minimum is missing, it will assume a value of "0", unless Fixed is provided
  • If the Maximum is more than "1439", it will assume a value of "1439" (= 23 hours 59 minutes)
  • If the Maximum is missing, it will assume a value of "1439", unless Fixed is provided
  • The values in the Fixed array must be between "0" and "1439" any other values will be ignore
  • If there is at least one valid value in the Fixed array, the values from the Fixed array are used, even if Minimum or Maximum are specified as well.

Booking Horizon

The BookingHorizon definition is a complex element containing two sub-elements:

  • Minimum: the minimum number of days between now and booking date
  • Maximum: the maximum number of days between now and booking date

Today is 0 days into the future, so if you want to make bookings for today, Minimum must be 0, if you only want bookings for today, both Minimum and Maximum must be 0

Example

1 {
2 "BookingHorizon": {
3 "Minimum": "0",
4 "Maximum": "90"
5 }
6 }

Default Behaviours

  • If the BookingHorizon element is missing, meetings can booked for any time between now and 1 year from now
  • If the BookingHorizon element is empty, meetings can booked for any time between now and 1 year from now
  • If the Minimum is less than "0", it will assume a value of “0”
  • If the Minimum is missing, it will assume a value of “0”
  • If the Maximum is more than "1825", it will assume a value of "1825" (= 5 years)
  • If the Maximum is missing, it will assume a value of “1825”

Arrival Policies

  • The ArrivalPolicies definition is a complex element containing three sub-elements:
  • AutoCheckin: when set to true it will automatically check the user in at the start of the booking
  • EarlyCheckin: the number of minutes before the booking start that a user can check in to the space
  • AutoCancellation: the number of minutes after the booking should have started after which a booking will cancelled (to make the space available to others)

Example

1 {
2 "ArrivalPolicies": {
3 "AutoCheckin": true,
4 "EarlyCheckin": 15,
5 "AutoCancellation": 15
6 }
7 }

Default Behaviours

  • If the ArrivalPolicies element is missing or empty than,
    • AutoCheckin will be false
    • EarlyCheckin will be 0
    • AutoCancellation will be 15
  • If the AutoCheckin is missing, it will assume false
  • If the EarlyCheckin is missing, it will assume a value of 0
  • If the EarlyCheckin is 0 or less, it will assume a value of 0
  • If the AutoCancellation is missing, it will assume a value of 15
  • If the AutoCancellation is 0 or less, it will assume a value of 0

Approval Policies

The ApprovalPolicies definition is a complex element containing three sub-elements:

  • ApprovalRequired: when set to true bookings will require approval
  • AutoRejectionAfter: the minimum number of days before the booking starts the booking needs to be approved
  • ApprovalGroups: an array of group ids that can approve bookings covered by this booking policy

Example

1 {
2 "ApprovalPolicies": {
3 "ApprovalRequired": true,
4 "AutoRejectionAfter": 15,
5 "ApprovalGroups": ["AAD Group 1 ID", "Okta Group 2 ID"]
6 }
7 }

Default Behaviours

  • If the ArrivalPolicies element is missing or empty than there will be no approval required
  • If the ApprovalRequired is missing, it will assume false
  • If the AutoRejectionAfter is missing, it will assume a value of 0
  • If the ApprovalGroups is missing or empty and ApprovalRequired is set to true, the bookings cannot be approved