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.
Parent Topic:REST API reference
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}
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
| 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: - true: Return the building data. - false: Don't return the building data. 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: - true: Allow employees to add invitees to the reservation. - false: Don't allow employees to add invitees to the reservation. Data type: Boolean |
| result.allow\_whole\_day | Flag that indicates whether users can reserve the reservable for the entire day. Valid values: - true: Allow users to reserve for the entire day. - false: Don't allow users to reserve for the entire day. Data type: Boolean |
| result.apply\_to\_shift | Flag that indicates whether shift-based reservations are enabled for the reservable module. Valid values: - true: Allow shift-based reservations. - false: Don't allow shift-based reservations. Data type: Boolean |
| result.browse\_by\_area\_enabled | Flag that indicates whether users are able to search for reservable modules by area.Valid values: - true: Allow users to browse reservable modules by area. - false: Don't allow users to browse reservable modules by area. 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: - true: Allow users to browse reservable modules by neighborhood. - false: Don't allow users to browse reservable modules by neighborhood. 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: - true: Allow users to browse reservable modules near a person. - false: Don't allow users to browse reservable modules near a person. Data type: Boolean |
| result.buildingTreeData | Only returned if the is_buildings_tree_data_required query parameter is set to
Each
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: - true: Building entity is available for the reservable module. - false: Building entity isn't available for the reservable module. Data type: Boolean |
| result.buildingsTreeData.children.isValid | Flag that indicates whether the associated building entity is valid for the reservable model.Valid values: - true: Building entity is valid for the reservable module. - false: Building entity isn't valid for the reservable module. 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: - true: Users can specify the number of attendees. - false: Users can't specify the display number of attendees. Data type: Boolean |
| result.display\_on\_behalf\_of | Flag that indicates whether reservations can be made on behalf of someone else. Valid values: - true: On behalf of supported. - false: On behalf of not supported. 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: - true: Able to set sensitivity. - false: Not able to set sensitivity. Defaults to normal. 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: - true: Allow users to browse reservable modules by neighborhood. - false: Don't allow users to browse reservable modules by neighborhood. 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 asbrowse_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: - true: Facet filters are enabled. - false: Facet filters aren't enabled. Data type: Boolean |
| result.enable\_group\_reservations | Flag that indicates whether users can make a group reservation.Valid values: - true: Able to make group reservations. - false: Not able to make group reservations. Data type: Boolean |
| result.enable\_ical\_generation | Flag that indicates whether users can generate an iCalendar for the reservation.Valid values: - true: iCalendar generation allowed. - false: iCalendar generation isn't allowed. 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 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 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 Data type: Array of Objects Hierarchy order:
|
| result.nbhBuildingsTreeData.children | Describes the hierarchy of the children associated with the building.Each
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: - true: Entity is available for the reservable module. - false: Entity isn't available for the reservable module. Data type: Boolean |
| result.nbhBuildingsTreeData.isValid | Flag that indicates whether the associated entity is valid for the reservable model.Valid values: - true: Entity is valid for the reservable module. - false: Entity isn't valid for the reservable module. 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: - true: Cancellation note required. - false: Cancellation note not required. 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: - true: Check for a mismatch. - false: Don't check for a mismatch. Data type: Boolean |
| result.require\_subject | Flag that indicates whether the user must enter a subject when making the reservation.Valid values: - true: Subject required. - false: Subject isn't required. 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 |
| 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: - true: Make default. - false: Don't make default. 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: - Specific unit: The search result displays every workplace item. - Container: The search result displays the parent or container of the workplace items. 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: - true: Enable map view. - false: Don't enable map view. 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"
}
}