WSD Reservable Module API
The Workplace Service Delivery (WSD) Reservable Module API provides endpoints to retrieve details of a reservable module from a ServiceNow instance.
A reservable module groups similar types of workplace items. Employees can view these similar items in a single category. For example, a room is a reservable module and it contains similar workplace items such as meeting rooms, conference rooms, and other rooms.
To access this API, the caller must have the sn_wsd_core.workplace_user role and the Workplace
Reservation Management (sn_wsd_rsv) plugin must be activated. This API runs in the
sn_wsd_rsv namespace.
For additional information on Workplace Reservation Management, see Workplace Reservation Management.
WSD Reservable Module - GET /sn_wsd_rsv/reservable_module/{sys_id}
Returns the details for a specified reservable module.
URL format
Versioned URL: /api/sn_wsd_rsv/{api_version}/reservable_module/{sys_id}
Default URL: /api/sn_wsd_rsv/reservable_module/{sys_id}
Supported request 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 | Sys_id of the reversable module record to retrieve. Data type: String Table: Reservable Module [sn_wsd_rsv_reservable_module] |
| Name | Description |
|---|---|
| is_buildings_tree_data_required | Flag that indicates whether to return the building data associated with the reservable model. Valid values:
Data type: Boolean Default: false |
| neighborhood | Only available if the Space Management (sn_wsd_spc_mgmt_neighborhood) plugin is activated. Sys_id of the neighborhood record to use in the encoded query. For additional information on neighborhood space reservations, see Create neighborhood reservations. The endpoint checks if the neighborhood is valid and then retrieves the data required for the browse-by-neighborhood path. Data type: String |
| 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.
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: application/json or application/xml.
Default: application/json |
| 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.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
| Name | Description |
|---|---|
| results | Details for the requested reservable module. Data type: Object |
| result.allow_invitees | Flag that indicates whether employees are able to add invitees to the reservation. Valid values:
Data type: Boolean |
| result.allow_whole_day | Flag that indicates whether users can reserve the reservable for the entire day. Valid values:
Data type: Boolean |
| result.apply_to_shift | Flag that indicates whether shift-based reservations are enabled for the reservable module. Valid values:
Data type: Boolean |
| result.browse_by_area_enabled | Flag that indicates whether users are able to search for reservable modules by area. Valid values:
Data type: Boolean |
| result.browse_by_neighborhood_enabled | Only available if the Space Management - sn_wsd_spc_mgmt plugin is installed. Flag that indicates whether users are able to search in the reservable modules by neighborhood. Valid values:
Data type: Boolean |
| result.browse_near_a_person_enabled | Flag that indicates whether users are able to search for reservable modules located by a specified person. Valid values:
Data type: Boolean |
| result.buildingTreeData | Only returned if the is_buildings_tree_data_required query parameter is set to true. Hierarchy of the buildings associate with the reservable module. Hierarchy order:
Each children[ ] node reflects a different building level/hiearchy:
Data type: Array of Objects |
| result.buildingsTreeData.children | Details on the site, campus, or building associated with the reservable module. Each of the parameters in all children[ ] nodes are the same. They just apply to different building entities and are
only described one time in this section.Data type: Array of Objects |
| result.buildingsTreeData.children.data | Details about the building entity. Data type: Object |
| result.buildingsTreeData.children.data.sys_id | Sys_id of the associated building entity. Data type: String |
| result.buildingsTreeData.children.data.table | Name of the table in which the building entity record identified in the sys_id is
located. Data type: String |
| result.buildingsTreeData.children.data.timezone | Details about the time zone of the building
entity. |
| result.buildingsTreeData.children.data.timezone.displayValue | Display value in the record for the time zone. Data type: String |
| result.buildingsTreeData.children.data.timezone.value | Internal value in the record for the time zone. Data type: String |
| result.buildingsTreeData.children.isSelectable | Flag that indicates whether the associated building entity is available (selectable) for the reservable model. Valid values:
Data type: Boolean |
| result.buildingsTreeData.children.isValid | Flag that indicates whether the associated building entity is valid for the reservable model. Valid values:
Data type: Boolean |
| result.buildingsTreeData.children.label | Name of the building entity. Data type: String |
| result.buildingsTreeData.children.uId | Sys_id of the associated building entity record. Data type: String |
| result.buildingSysIds | List of sys_ids of the buildings associated
with the reservable module. Data type: Array of Strings |
| result.checkin_before_minutes | Amount of time before a reservation starts that a user can check into their reservation. Unit: Minutes Data type: Number |
| result.display_number_of_attendees | Flag that indicates whether users can specify the number of attendees in the reservation. Valid values:
Data type: Boolean |
| result.display_on_behalf_of | Flag that indicates whether reservations can be made on behalf of someone else. Valid values:
Data type: Boolean |
| result.display_sensitivity | Flag that indicates whether users can set the sensitivity of the reservation, such as normal or private. Valid values:
Data type: Boolean |
| result.display_value | Display value of the reservable
module. Data type: String |
| result.enable_browse_by_area | Flag that indicates whether users are able to search for reservable modules by area. Same as browse_by_area_enabled. Valid values:
Data type: Boolean |
| result.enable_browse_by_neighborhood | Flag that indicates whether users are able to search for reservable modules by neighborhood. Valid values:
Data type: Boolean |
| result.enable_browse_near_a_person | Flag that indicates whether users are able to search for reservable modules located by a specified person. Same as
browse_near_a_person_enabled. Valid values:
Data type: Boolean |
| result.enable_facet_filter | Flag that indicates whether facet filtering on workplace items is enabled. When enabled, the filter options that appear are based on the search results. Only the items that are
available in the generated search result are available to users for selection in the filter. Valid values:
Data type: Boolean |
| result.enable_group_reservations | Flag that indicates whether users can make a group reservation. Valid values:
Data type: Boolean |
| result.enable_ical_generation | Flag that indicates whether users can generate an iCalendar for the reservation. Valid values:
Data type: Boolean |
| result.font_awesome_icon | Name of the font icon attached to the
reservable module. Data type: String |
| result.inline_title | Inline title of the reservable module. The
title appears in line with the descriptive text on the Workplace service
portal. Data type: String |
| result.layout_mapping | Details about the structure of the layout mapping of locations. Use this data to lay out the information in the UI. Data type: Object |
| result.layout_mapping.body | Placeholder for mapping the front-end UI data. Data type: Array of Objects |
| result.layout_mapping.body.field | Placeholder for mapping the
front-end UI data. Data type: String |
| result.layout_mapping.body.field_to_display | Placeholder for
mapping the front-end UI data. Data type: String |
| result.layout_mapping.body.icon | Placeholder for mapping the
front-end UI data. Data type: String |
| result.layout_mapping.body.label | Placeholder for mapping the
front-end UI data. Data type: String |
| result.layout_mapping.description | Placeholder for mapping the
front-end UI data. Description of the layout mapping. Data type: Array |
| result.layout_mapping.image | Placeholder for mapping the front-end
UI data. Data type: String |
| result.layout_mapping.subtitle | Placeholder for mapping the
front-end UI data. Data type: Array |
| result.layout_mapping.subtitle_asc | Placeholder for mapping the
front-end UI data. Data type: Array |
| result.layout_mapping.title | Placeholder for mapping the front-end
UI data. Data type: Array |
| result.max_days_in_future | Maximum number of the days in the future
that a user can reserve the reservable module. Data type: Number |
| result.max_occurrences | Maximum number of recurring reservation
occurrences if recurring reservations are available for the reservable module. Data type: Number |
| result.name | Name of the reservable module. Data type: String |
| result.nbhBuildingIds | Only returned if the Space Management plugin is installed, the browse_by_neighborhood_enabled parameter is set to true, and the
neighborhood parameter is passed in the query parameters. List of sys_ids of the buildings associated with the reservable module and configured for the neighborhood. Data type: Array of Strings |
| result.nbhBuildingsData | Only returned if the Space Management plugin is installed, the browse_by_neighborhood_enabled parameter is set to true, and the
neighborhood parameter is passed in the query parameters. List of sys_ids of the buildings associated with the reservable module and configured for the neighborhood. Each building element also contains a list of sys_ids of the corresponding floors available for the building. For example: Data type: Array of Objects Table: Records associated with the building sys_ids are located in the Building [sn_wsd_core_building] table. Records associated with the floor sys_ids are located in the Floor [sn_wsd_core_floor] table. |
| result.nbhBuildingsTreeData | Only returned if the Space Management plugin is installed, the browse_by_neighborhood_enabled parameter is set to true, and the
neighborhood parameter is passed in the query parameters. Hierarchy of the buildings associate with the reservable module and neighborhood. Data type: Array of Objects Hierarchy order:
|
| result.nbhBuildingsTreeData.children | Describes the hierarchy of the children associated with the building. Each children[] node reflects a different building level/hierarchy:
Data type: Array of Objects The parameters in the |
| result.nbhBuildingsTreeData.data | Details about the associated entity; region, site, campus, or building. Data type: Object |
| result.nbhBuildingsTreeData.data.sysId | Sys_id of the associated entity record. Data type: String |
| result.nbhBuildingsTreeData.data.table | Table in which the associated record is located. Data type: String |
| result.nbhBuildingsTreeData.data.timezone | Information about the time zone in which the associated entity resides. Data type: Object |
| result.nbhBuildingsTreeData.data.timezone.displayValue | Time zone value to use in a user interface. Data type: String |
| result.nbhBuildingsTreeData.data.timezone.value | Internal time zone value. Data type: String |
| result.nbhBuildingsTreeData.isSelectable | Flag that indicates whether the associated entity is available (selectable) for the reservable model. Valid values:
Data type: Boolean |
| result.nbhBuildingsTreeData.isValid | Flag that indicates whether the associated entity is valid for the reservable model. Valid values:
Data type: Boolean |
| result.nbhBuildingsTreeData.label | Name of the reservable view. Data type: String |
| result.nbhBuildingsTreeData.uId | Sys_id of the associated entity. Data type: String |
| result.override_approval_policy | Option to specify how to implement the approval policy. Choices:
Data type: String |
| result.require_cancel_notes | Flag that indicates whether users must enter a cancellation note before cancelling a reservable module. Valid values:
Data type: Boolean |
| result.require_cc_dept_check | Flag that indicates whether to check if there's a cost center or department mismatch between the workspace item and the logged in user. Valid values:
Data type: Boolean |
| result.require_subject | Flag that indicates whether the user must enter a subject when making the reservation. Valid values:
Data type: Boolean |
| result.reservable_columns | List of the columns of a reservable. Data type: Array Table: Workplace Location [sn_wsd_core_workplace_location] |
| result.reservable_container_field | Level of the container, such as
a group of desks in a specific area. Data type: String |
| result.reservable_filter | Filter conditions used to filter out
reservable items in the associated Reservable table. Reservable table is a field in
the Reservable Module [sn_wsd_rsv_reservable_module] table. These filter conditions
were applied to the table contained in the field Reservable table. Data type: String |
| result.reservable_quantity_field | Reservable quantity of all the spaces. The quantity is used when assigning neighbourhood spaces to an area. For additional information, see Assign neighborhood spaces to an area. Data type: String |
| result.reservable_table | Table that contains the reservable
workplace items. Data type: String |
| result.reservable_type | Type of the reservable item, such as
location. Data type: String |
| result.reservable_views | Details about the different views associated with the reservable module, such as card view or schedule view. Data type: Object Table: Reservable View [sn_wsd_rsv_reservable_view] |
| result.reservable_views.iconClass | Icon class of the reservable
view. Data type: String |
| result.reservable_views.isDefault | Flag that indicates whether to make this reservable view the default for reservable modules. Valid values:
Data type: Boolean |
| result.reservable_views.label | Name of the reservable view. Data type: String |
| result.reservable_views.order | Order in which the views are
displayed for the reservable module in the UI. The lower order number come first in
the UI. In case of the same order number, it is assigned random ordering. Data type: Number |
| result.reservable_views.type | Backend name of the reservable view.
Used for internal processing. Data type: String |
| result.reservation_paths | Reservation paths associated with the reservable modules such as Browse all, Browse near a person. Data type: Array of Objects |
| result.reservation_paths.displayValue | Display value for the
reservation path, such as "Browse near a person". Data type: String |
| result.reservation_paths.value | Internal value for the reservation
path, such as "browse_near_a_person". Data type: String |
| result.search_limit | Maximum number of search results to return
when a user searches for a workplace location. Data type: Number |
| result.selection_type | Type of selection to display in the search results. Can be one of the following options:
Data type: String |
| result.short_description | Brief description of the reservable
module. Data type: String |
| result.show_map_view | Flag that indicates whether to enable the map view for reservable modules. Valid values:
Data type: Boolean |
| result.sys_id | Sys_id of the reservable module. Data type: String |
| result.timeSlots | Details about the time slots associated for a reservable module. Data type: Array of Objects |
| result.timeSlots.name | Name of the time slot. Data type: String |
| result.timeSlots.short_description | Brief description of the time
slot. Data type: String |
| result.timeSlots.slot_end | End time of the time slot. Data type: String |
| result.timeSlots.slot_start | Start time of the slot. Data type: String |
| result.timeSlots.sys_id | Sys_id of the time slot record. Data type: String Table: Time Slot [sn_wsd_rsv_time_slot] |
| result.title | Title of the reservable module. Data type: String |
| result.virtual_meeting_provider | Details about the virtual provider associated with the reservable module. Data type: Object |
| result.virtual_meeting_provider.display_value | Display value of the
virtual meeting provider. Data type: String |
| result.virtual_meeting_provider.sys_id | Sys_id of the virtual
meeting provider. Data type: String |
cURL request
This code example shows how to request a reservable module with the buildings tree data.
curl "http://instance.servicenow.com/api/sn_wsd_rsv/reservable_module/5db44502dbb650106c731dcd13961937&is_buildings_tree_data_required=true" \
--request GET \
--header "Accept:application/json" \
--user "username":"password"
Response body:
{
"result": {
"sys_id": "5db44502dbb650106c731dcd13961937", "name": "Desks",
"title": "Desks",
"inline_title": "desk",
"font_awesome_icon": "fa-desktop",
"reservable_table": "sn_wsd_core_space",
"reservable_filter": "active=true^is_reservable=true^location_type=5f017383eb512010b89bfdfc9c5228c8^building.is_reservable=true^floor.is_reservable=true^EQ",
"short_description": "Reserve a single desks",
"reservable_type": "location",
"require_subject": null,
"require_cancel_notes": false,
"virtual_meeting_provider": {
"sys_id": "e33d9e6853c201103cf7ddeeff7b1205",
"display_value": "Template"
},
"allow_invitees": null,
"display_number_of_attendees": null,
"display_on_behalf_of": null,
"display_sensitivity": null,
"max_days_in_future": "90",
"allow_whole_day": "1",
"selection_type": "unit",
"reservable_container_field": null,
"reservable_quantity_field": null,
"apply_to_shift": null,
"max_occurrences": "90",
"enable_facet_filter": false,
"search_limit": 10000,
"enable_ical_generation": null,
"enable_group_reservations": null,
"enable_browse_near_a_person": "1",
"enable_browse_by_area": "1",
"enable_browse_by_neighborhood": "1",
"show_map_view": false,
"require_cc_dept_check": false,
"display_value": "Desks",
"browse_near_a_person_enabled": true,
"browse_by_area_enabled": true,
"browse_by_neighborhood_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": [
{
"sys_id": "d5331cf2dbb5f01038e42b24ca961906",
"name": "All day",
"short_description": "8am - 6pm",
"slot_start": "08:00",
"slot_end": "18:00"
},
{
"sys_id": "de131cf2dbb5f01038e42b24ca961931",
"name": "Before noon",
"short_description": "8am - 12pm",
"slot_start": "08:00",
"slot_end": "12:00"
},
{
"sys_id": "6e99ab5ddbb930102e8e853e68961929",
"name": "After noon",
"short_description": "1pm - 6pm",
"slot_start": "13:00",
"slot_end": "18:00"
}
],
"buildingSysIds": [
"9e0364cedb3650106c731dcd1396192b"
],
"buildingsTreeData": [
{
"isValid": true,
"label": "Europe",
"uId": "2d626c4edb3650106c731dcd1396194b",
"isSelectable": false,
"children": [
{
"isValid": true,
"label": "Western Europe",
"uId": "b17220cedb3650106c731dcd1396197a",
"isSelectable": false,
"children": [
{
"isValid": true,
"label": "Amsterdam Campus",
"uId": "44d2e0cedb3650106c731dcd13961988",
"isSelectable": false,
"children": [
{
"isValid": true,
"label": "AMS-B1",
"uId": "9e0364cedb3650106c731dcd1396192b",
"isSelectable": true,
"children": [],
"data": {
"sysId": "9e0364cedb3650106c731dcd1396192b",
"table": "sn_wsd_core_building",
"timezone": {
"value": "Europe/Amsterdam",
"displayValue": "Europe/Amsterdam"
}
}
}
],
"data": {
"sysId": "44d2e0cedb3650106c731dcd13961988",
"table": "sn_wsd_core_campus",
"timezone": null
}
}
],
"data": {
"sysId": "b17220cedb3650106c731dcd1396197a",
"table": "sn_wsd_core_site",
"timezone": null
}
}
],
"data": {
"sysId": "2d626c4edb3650106c731dcd1396194b",
"table": "sn_wsd_core_region",
"timezone": null
}
}
],
"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"
},
{
"value": "browse_near_a_person",
"displayValue": "Browse near a person"
},
{
"value": "browse_by_area",
"displayValue": "Browse by area"
}
],
"override_approval_policy": "never_required"
}
}