The Workplace Service Delivery (WSD) Recurring Reservation API provides endpoints for managing reservations that occur at the same time, but have different dates.

To access this API, the caller must have the sn_wsd_core.workplace_user role and the Workplace Safety Management (sn_wsd_core) and Workplace Reservation Management (sn_wsd_rsv) plugins must be activated.

This API runs in the sn_wsd_rsv namespace.

For additional information on Workplace Reservation Management, see Workplace Reservation Management.

WSD Recurring Reservation - GET /api/sn_wsd_rsv/recurring_reservation/list/{parent_id}

Returns the specified recurring reservation.

If more than six recurring meeting occurrences are available for the reservation, you can paginate through the occurrences using the query parameters. You can also specify occurrence records not to return.

URL format

Versioned URL: /api/sn_wsd_rsv/{api_version}/recurring_reservation/list/{parent_id}

Default URL: /api/sn_wsd_rsv/recurring_reservation/list/{parent_id}

Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form.

Supported request parameters

Table 1. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

parent_id Sys_id of the recurring parent reservation record.

When a recurring reservation is created, one recurring parent record and one or more child reservation records are created. Reservation records contain a field called reservation_subtype, that indicates the type of reservation record. For recurring parent records, this field is set to "Recurring parent". For child records, this field is set to "Occurrence".

Within a child record, the sys_id of the associated recurring parent record is in the source_reservation field.

Data type: String

Table: Workplace Reservation [sn_wsd_rsv_reservation]

Table 2. Query parameters
Name Description
end_index When paginating through a recurring record set, the zero-based record number at which to stop returning occurrence records.
Note: If the number of recurring occurrences is less than six the endpoint returns all of the occurrences, otherwise it returns the first six occurrences. To retrieve the occurrences beyond six, you must pass the end_index parameter accordingly.

Data type: Number

occurrence_sys_id Sys_id of an occurrence record in the recurring series not to return.

Data type: String

Table: Workplace Reservation [sn_wsd_rsv_reservation]

start_index When paginating through a recurring record set, the zero-based record number at which to start returning occurrence records.

Data type: Number

Default: 0

Table 3. Request body parameters
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 4. Request headers
Header Description
Accept Data format of the request body. Supported types: application/json, application/xml or, text/xml.

Default: application/json

Table 5. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters

Example: cURL request

The following code example shows how to retrieve a specific recurring reservation.

curl "https://instance.servicenow.com/api/sn_wsd_rsv/recurring_reservation/list/d98a381587b789506342b846dabb3563" \
--request GET \
--header "Accept:application/json" \
--user "username": "password"

Return results:

{
  "result": {
    "reservations": [
      {
        "sys_id": "198a381587b789506342b846dabb3565",
        "number": "WRES0001247",
        "location": {
          "sys_id": "fe1f744edb7650106c731dcd139619ca",
          "name": "Aspen",
          "description": "A room with large windows, dark leather seats and a large wooden table.",
          "display_value": "Aspen",
          "capacity": 16,
          "label_value": "Room name",
          "email": null,
          "reservable_module": {
            "sys_id": "c31241cedb7650106c731dcd13961917",
            "name": "Meeting rooms",
            "title": "Meeting rooms",
            "inline_title": "meeting room"
          },
          "region": {
            "sys_id": "3752ac8edb3650106c731dcd139619e0",
            "display_value": "Americas",
            "active": true
          },
          "site": {
            "sys_id": "628eec06db7650106c731dcd139619dd",
            "display_value": "North America",
            "active": true
          },
          "campus": {
            "sys_id": "82b2a0cedb3650106c731dcd139619e9",
            "display_value": "California Campus",
            "active": true
          },
          "building": {
            "sys_id": "94e264cedb3650106c731dcd13961919",
            "display_value": "CAL-B1",
            "active": true,
            "timezone": {
              "value": "US/Pacific",
              "displayValue": "US/Pacific"
            }
          },
          "floor": {
            "sys_id": "2f554296dbba10106c731dcd139619ed",
            "display_value": "Floor 2",
            "active": true
          },
          "area": {
            "sys_id": "",
            "display_value": "",
            "active": false
          },
          "reservation": {
            "sys_id": "198a381587b789506342b846dabb3565",
            "number_of_attendees": 1,
            "state": {
              "value": "confirmed",
              "display_value": "Confirmed"
            },
            "requested_for": {
              "sys_id": "2de07e1887cb89106342b846dabb35fe",
              "name": "Workplace User",
              "user_name": "workplace_user"
            },
            "number": "WRES0001247",
            "active": true
          },
          "number_of_attendees": 1,
          "state": {
            "value": "confirmed",
            "display_value": "Confirmed"
          },
          "number": "WRES0001247",
          "requested_for": {
            "sys_id": "2de07e1887cb89106342b846dabb35fe",
            "name": "Workplace User",
            "user_name": "workplace_user"
          }
        },
        "start": "2022-06-11T13:00:00Z",
        "end": "2022-06-11T14:00:00Z",
        "sys_created_on": "2022-05-30T07:06:37Z",
        "sys_updated_on": "2022-05-30T07:06:40Z",
        "source_reservation": {
          "sys_id": "d98a381587b789506342b846dabb3563",
          "display_value": "WRES0001246",
          "name": "WRES0001246"
        },
        "check_in_state": {
          "value": "not_required",
          "display_value": "Not required"
        },
        "external_id": null,
        "external_ical": null,
        "active": true,
        "state": {
          "value": "confirmed",
          "display_value": "Confirmed"
        },
        "sensitivity": {
          "value": "normal",
          "display_value": "Normal"
        },
        "reservation_type": {
          "value": "space",
          "display_value": "Space"
        },
        "reservation_subtype": {
          "value": "occurrence",
          "display_value": "Occurrence"
        },
        "reservation_purpose": {
          "value": "meeting",
          "display_value": "Meeting"
        },
        "attendees": null,
        "number_of_attendees": 1,
        "is_parent": false,
        "subject": "Rec 1",
        "virtual_meeting": null,
        "recording_details": [],
        "sync_state": {
          "value": "not_required",
          "display_value": "Synchronization not required"
        },
        "sub_source": {
          "value": "servicenow_workplace_service_delivery",
          "display_value": "ServiceNow Workplace Service Delivery"
        },
        "last_updated_sub_source": {
          "value": "servicenow_workplace_service_delivery",
          "display_value": "ServiceNow Workplace Service Delivery"
        },
        "reservable_module": {
          "sys_id": "c31241cedb7650106c731dcd13961917",
          "name": "Meeting rooms",
          "title": "Meeting rooms",
          "inline_title": "meeting room",
          "font_awesome_icon": "fa-building",
          "reservable_table": "sn_wsd_core_room",
          "reservable_filter": "active=true^is_reservable=true^building!=6c0364cedb3650106c731dcd13961927^building.is_reservable=true^floor.is_reservable=true^EQ",
          "short_description": "Reserve a meeting room",
          "reservable_type": "location",
          "require_subject": "1",
          "require_cancel_notes": true,
          "virtual_meeting_provider": {
            "sys_id": "e33d9e6853c201103cf7ddeeff7b1205",
            "display_value": "Template"
          },
          "allow_invitees": "1",
          "display_number_of_attendees": "1",
          "display_on_behalf_of": "1",
          "display_sensitivity": "1",
          "max_days_in_future": "180",
          "allow_recurring": "1",
          "allow_whole_day": "1",
          "require_whole_day": null,
          "selection_type": "unit",
          "reservable_container_field": null,
          "reservable_quantity_field": null,
          "apply_to_shift": null,
          "max_occurrences": "180",
          "enable_facet_filter": false,
          "search_limit": 10000,
          "enable_ical_generation": "1",
          "enable_group_reservations": null,
          "enable_browse_near_a_person": "1",
          "enable_browse_by_area": "1",
          "enable_floor_search": "1",
          "display_value": "Meeting rooms",
          "browse_near_a_person_enabled": true,
          "browse_by_area_enabled": true,
          "reservable_columns": [
            "sys_id",
            "external_id",
            "email",
            "name",
            "title",
            "description",
            "image",
            "number",
            "site",
            "campus",
            "building",
            "floor",
            "area",
            "capacity",
            "reservable_quantity",
            "location_type",
            "order",
            "requires_check_in",
            "is_reservable"
          ],
          "layout_mapping": {
            "title": [
              "name"
            ],
            "description": [
              "description"
            ],
            "subtitle": [
              "campus",
              "building",
              "floor",
              "area"
            ],
            "subtitle_asc": [
              "area",
              "floor",
              "building",
              "campus"
            ],
            "image": "image",
            "body": [
              {
                "label": "Capacity",
                "icon": "fa-users",
                "field": "capacity",
                "field_to_display": ""
              },
              {
                "label": "Standard services",
                "icon": "fa-check",
                "field": "standard_services",
                "field_to_display": "name"
              },
              {
                "label": "Reservable purposes",
                "icon": "fa-tags",
                "field": "reservable_purposes",
                "field_to_display": "name"
              }
            ]
          },
          "timeSlots": [],
          "buildingSysIds": [
            "4703a4cedb3650106c731dcd13961945",
            "6c0364cedb3650106c731dcd13961927",
            "94e264cedb3650106c731dcd13961919",
            "9e0364cedb3650106c731dcd1396192b"
          ],
          "reservable_views": [
            {
              "type": "card",
              "label": "Card view",
              "iconClass": "fa-th-large",
              "isDefault": true,
              "order": "1"
            },
            {
              "type": "schedule",
              "label": "Schedule view",
              "iconClass": "fa-calendar-o",
              "isDefault": false,
              "order": "2"
            }
          ],
          "checkin_before_minutes": 30,
          "reservation_paths": [
            {
              "value": "browse_all",
              "displayValue": "Browse all",
              "availableFor": true
            },
            {
              "value": "browse_favorites",
              "displayValue": "Browse favorites",
              "availableFor": false
            },
            {
              "value": "browse_near_a_person",
              "displayValue": "Browse near a person",
              "availableFor": true
            },
            {
              "value": "browse_by_area",
              "displayValue": "Browse by area",
              "availableFor": true
            }
          ],
          "override_approval_policy": "never_required"
        },
        "notification_recipients": null,
        "notification_custom_message": null,
        "opened_by": {
          "sys_id": "2de07e1887cb89106342b846dabb35fe",
          "value": "2de07e1887cb89106342b846dabb35fe",
          "displayValue": "Workplace User",
          "display_value": "Workplace User",
          "name": "Workplace User",
          "user_name": "workplace_user",
          "table": "sys_user",
          "avatar": null,
          "initials": "WU",
          "email": "workplace_user@example.com",
          "label": ""
        },
        "requested_for": {
          "sys_id": "2de07e1887cb89106342b846dabb35fe",
          "value": "2de07e1887cb89106342b846dabb35fe",
          "displayValue": "Workplace User",
          "display_value": "Workplace User",
          "name": "Workplace User",
          "user_name": "workplace_user",
          "table": "sys_user",
          "avatar": null,
          "initials": "WU",
          "email": "workplace_user@example.com",
          "label": ""
        },
        "edit_restriction": {
          "value": "no_restriction",
          "display_value": "No restriction"
        },
        "source": {
          "value": "servicenow",
          "display_value": "Workplace Services"
        },
        "source_reservation_requester": {
          "sys_id": "2de07e1887cb89106342b846dabb35fe",
          "name": "Workplace User",
          "user_name": "workplace_user"
        },
        "source_icon": {
          "classNames": "fa fa-calendar-check-o",
          "tooltip": "Reservation is confirmed",
          "imgSrc": ""
        },
        "shift": null,
        "recurring_pattern": {
          "duration": "3600000",
          "repeats": "daily",
          "options": {
            "count": 3,
            "daysOfWeek": "",
            "every": 1,
            "endDate": "2022-06-13 14:00:00",
            "endDateGdt": {}
          },
          "label": "Repeats daily, 3 times",
          "startDate": "2022-06-11 13:00:00",
          "startDateGdt": "{}",
          "amountOfDates": "3"
        },
        "reservationAcl": {
          "write": {
            "record": true,
            "fields": {
              "subject": true,
              "sensitivity": true,
              "requested_for": true,
              "number_of_attendees": true,
              "location": true
            },
            "allFields": true
          },
          "read": true
        }
      }
    ],
    "occurencesTotalCount": "1"
  }
}

WSD Recurring Reservation - PATCH /api/sn_wsd_rsv/recurring_reservation/cancel_series/{sys_id}

Cancels an entire specified recurring series reservation or a specific meeting occurrence within the series.

Note: You cannot delete multiple meeting occurrences in a single call.

URL format

Versioned URL: /api/sn_wsd_rsv/{api_version}/recurring_reservation/cancel_series/{sys_id}

Default URL: /api/sn_wsd_rsv/recurring_reservation/cancel_series/{sys_id}

Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form.

Supported request parameters

Table 7. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

sys_id To cancel the entire series, pass the sys_id of the recurring parent reservation record.

To cancel a specific occurrence of the series, pass the sys_id of the occurrence of the series.

The recurring parent record has the column reservation_subtype set to Recurring parent. Individual occurrence records have the reservation_subtype field set to Occurrence.

To get the details of recurring parent reservation from the occurrence record, refer to the sys_id of the source_reservation field of the occurrence record.

Data type: String

Table: Workplace Reservation [sn_wsd_rsv_reservation]

Table 8. Query parameters
Name Description
cancel_notes Reason for cancelling the reservation.

Data Type: String

Table 9. Request body parameters
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 10. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/xml.

Default: application/json

Content-Type Data format of the request body. Only supports application/json.
Table 11. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters

Example: cURL request

The following code example shows how to cancel an entire recurring reservation.

curl "https://instance.servicenow.com/api/sn_wsd_rsv/recurring_reservation/cancel_series/f64983a347274550003a4587746d43b8" \
--request PATCH \
--header "Accept:application/json" \ 
--header "Content-Type:application/json" \ 
--user "username":"password"

Return results:

{
  "result": {
    "failedToCancelOccurrenceReservations": [],
    "successCanceledOccurrences": [
      "cb4983a347274550003a4587746d43bd",
      "cf4983a347274550003a4587746d43ba"
    ],
    "user_msg": "Your Recurring reservation has been canceled successfully!",
    "seriesId": "f64983a347274550003a4587746d43b8",
    "success": true
  }
}

WSD Recurring Reservation - POST /api/sn_wsd_rsv/recurring_reservation/create_series

Creates workplace reservations for the same time but different dates, such as weekly, monthly, or every other week.

URL format

Versioned URL: /api/sn_wsd_rsv/{api_version}/recurring_reservation/create_series

Default URL: /api/sn_wsd_rsv/recurring_reservation/create_series

Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form.

Supported request parameters

Table 13. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 14. Query parameters
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 16. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/xml.

Default: application/json

Content-Type Data format of the request body. Only supports application/json.
Table 17. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters

Example: cURL request

The following code example shows how to create a daily recurring reservation for two consecutive days.

curl "https://instance.servicenow.com/api/sn_wsd_rsv/recurring_reservation/create_series" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{
    \"reservation\": {
        \"reservable_module\": \"5db44502dbb650106c731dcd13961937\",
        \"subject\": \"Test-123\",
        \"reservation_purpose\": \"meeting\",
        \"timezone\": \"US/Pacific\",
        \"requested_for\": \"6816f79cc0a8016401c5a33be04be441\",
        \"location\": \"6a11a94adb7210106c731dcd1396194e\",
        \"attendees\": \"6816f79cc0a8016401c5a33be04be441\",
        \"is_private\": false
    },
    \"recurringPattern\": {
        \"duration\": 3600000,
        \"repeats\": \"daily\",
        \"options\": {
            \"count\": 2,
            \"daysOfWeek\": \"\",
            \"every\": 1
        },
        \"label\": \"Repeats daily, 2 times\",
        \"startDate\": \"2023-01-12T12:00:00Z\"
    }
}" \

Return results:

{
  "result": {
    "isValid": true,
    "parent": "1e5f65ca87586550cfaa99b73cbb3513",
    "successfulReservations": [
      {
        "inserted": true,
        "collision": false,
        "sys_id": "9e5f65ca87586550cfaa99b73cbb3517",
        "error": null,
        "start": "2023-01-13T12:00:00Z",
        "end": "2023-01-13T13:00:00Z"
      }
    ],
    "unSuccessfulReservations": [
      {
        "inserted": true,
        "collision": true,
        "sys_id": "5e5f65ca87586550cfaa99b73cbb3515",
        "error": null,
        "start": "2023-01-12T12:00:00Z",
        "end": "2023-01-12T13:00:00Z"
      }
    ]
  }
}