The Workplace Service Delivery (WSD) Extra Service API provides endpoints to retrieve extra services, such as location layouts and standard services of a workplace location.

To access this API, the caller must have the sn_wsd_core.workplace_user role.

This API runs in the sn_wsd_rsv namespace. To access this API the Workplace Reservation Management (sn_wsd_rsv) plugin must be activated.

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

WSD Extra Service Request - PATCH /api/sn_wsd_rsv/wsd_extra_service_request/reservation/{sys_id}

Returns the extra service requests that are associated to a single reservation.

Note: This endpoint does not work for group or multi reservations.

URL format

Versioned URL: /api/sn_wsd_rsv/{api_version}/wsd_extra_service_request/reservation/{sys_id}

Default URL: /api/sn_wsd_rsv/wsd_extra_service_request/reservation/{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 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

sys_id Sys_id of the reservation record for which to return the extra service request details.

Data type: String

Table: Workplace Reservation [sn_wsd_rsv_reservation]

Table 2. Query parameters
Name Description
None
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 response body. Supported types: application/json or application/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

This code example shows how to request the details of the extra services or workplace service items for a reservation.

curl "http://instance.servicenow.com/api/sn_wsd_rsv/wsd_extra_service_request/reservation/383e36c1536f01103cf7ddeeff7b1245" \
--request GET \
--header "Accept:application/json" \
--user "username": "password"

Return results:

{
  "result": {
    "reservationId": "383e36c1536f01103cf7ddeeff7b1245",
    "serviceTimes": {
      "startPreparation": "2022-05-17T11:45:00ZZ",
      "endPreparation": "2022-05-17T12:00:00ZZ",
      "startCleanup": "2022-05-17T13:00:00ZZ",
      "endCleanup": "2022-05-17T13:15:00ZZ"
    },
    "reservableId": "02000d4edb7650106c731dcd13961914",
    "serviceCategories": {
      "50723fbf07100110c9b36b6e0ad300b4": {
        "serviceTimes": {
          "startPreparation": "2022-05-17T11:45:00Z",
          "endPreparation": "2022-05-17T12:00:00Z",
          "startCleanup": "2022-05-17T13:00:00Z",
          "endCleanup": "2022-05-17T13:15:00Z"
        },
        "flexibleServices": [
          {
            "requestId": "743eb605536f01103cf7ddeeff7b126b",
            "category": "50723fbf07100110c9b36b6e0ad300b4",
            "categoryComment": "test2",
            "subCategory": {
              "value": "chair_layout",
              "display_value": "Chair layout"
            },
            "categoryFriendlyName": "Space arrangement",
            "servicePrice": 0,
            "serviceItemImage": "4c6a0d7107600110c9b36b6e0ad300fc.iix",
            "currencyCode": "GBP",
            "totalPrice": 0,
            "flexibleServiceId": "21e2c08407600110c9b36b6e0ad3007c",
            "flexibleServiceName": "Theater Style",
            "deliveryTime": "2022-05-17 12:00:00",
            "comment": "test1",
            "quantity": 1,
            "capacity": 1,
            "quantityEnabled": false,
            "capacityEnabled": true,
            "maxCapacity": null,
            "state": {
              "value": "2",
              "display_value": "Work in Progress"
            },
            "serviceTimes": {
              "startPreparation": "2022-05-17T11:45:00Z",
              "endPreparation": "2022-05-17T12:00:00Z",
              "startCleanup": "2022-05-17T13:00:00Z",
              "endCleanup": "2022-05-17T13:15:00Z"
            }
          }
        ],
        "comment": "test2",
        "categoryFriendlyName": "Space arrangement",
        "categoryCurrencyCode": "GBP"
      }
    }
  }
}

WSD Extra Service Request - PATCH /api/sn_wsd_rsv/wsd_extra_service_request/submit

Adds an new or updates an existing extra service request to a specified single reservation.

Note: This endpoint does not work for group or multi reservations.

URL format

Versioned URL: /api/sn_wsd_rsv/{api_version}/wsd_extra_service_request/submit

Default URL: /api/sn_wsd_rsv/wsd_extra_service_request/submit

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

Table 8. 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 10. Request headers
Header Description
Accept Data format of the request body. Supported types: application/json, application/xml or, text/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 add an extra service item request to a reservation.

curl "http://instance.servicenow.com/api/sn_wsd_rsv/wsd_extra_service_request/submit" \
--request POST \
--header "Accept:application/json" \
--header "Concept-Type:application/json" \
--user 'username':'password'

Return results:

{
  "result": {
    "reservationId": "2dc2efdf531701103cf7ddeeff7b1227",
    "reservableId": "02000d4edb7650106c731dcd13961914",
    "extraServiceRequests": [
      {
        "requestId": "bea46dbc53e701103cf7ddeeff7b1236",
        "flexibleServiceId": "e2ecf7b307500110c9b36b6e0ad30033"
      }
],
    "success": true
  }
}