Service Catalog API - PUT /sn_sc/servicecatalog/items/{sys_id}/submit_guide

This method retrieves a list of items based on the needs described for an order guide.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/items/{sys_id}/submit_guide

Default URL: /api/sn_sc/servicecatalog/items/{sys_id}/submit_guide

Supported request parameters

Table 1. Parameters
Parameter 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 2. Request headers
Header Description
None
Table 3. 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 response codes .

Table 4. Status codes
Status code Description
200 Indicates that the request has completed successfully and returns a list of items depending on the needs described. If the options result in no items, then an empty array is returned.
400 Indicates that the request is invalid. Could be due to one of the following reasons:
  • User does not have access to the item.
  • Mandatory variables of one or more items have not been answered. (Only variables defined as mandatory are honored.)
500 Internal error while calculating items depending on options chosen.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/items/6690750f4f7b4200086eeed18110c761/submit_guide" \
--request PUT \
--header "Accept:application/json"\
--header "Content-Type:application/json" \
--data "{
  \"variables\":{
    \"hiring_manager\":\"6816f79cc0a8016401c5a33be04be441\",
    \"hiring_group\":\"221f3db5c6112284009f4becd3039cc9\",
    \"remote\":\"No\",
    \"standard_package\":\"No\",
    \"laptop_type\":\"developer\"
  }
}" \
--user 'admin':'admin'
{
  "result": [
    {
      "short_description": "Lenovo - Carbon x1",
      "icon": "1195c2084f889200086eeed18110c74a.iix",
      "description": "<p class=\"p1\"><font size=\"3\" color=\"#808080\"><span class=\"s1\">x1 Carbon</span></font></p>\n<p class=\"p1\"><font size=\"2\" color=\"#808080\" face=\"arial,helvetica,sans-serif\"><span class=\"s1\">The x1 Carbon is Lenovo&#39;s lightest ThinkPad yet. It provides a QHD display that fights glare and weighs less than three pounds. Ideal for most computing tasks, and highly mobile. </span></font></p>\n<p class=\"p2\"><font size=\"2\" color=\"#808080\" face=\"arial,helvetica,sans-serif\"><span class=\"s1\">Technical Specs:</span></font></p>\n<ul class=\"ul1\"><li class=\"li3\"><font size=\"2\" color=\"#808080\"><span class=\"s1\">Intel core i5 processor</span></font></li><li class=\"li3\"><font size=\"2\" color=\"#808080\"><span class=\"s1\">512GB solid state drive (SSD) </span></font></li><li class=\"li3\"><font size=\"2\" color=\"#808080\"><span class=\"s1\">Backlit keyboard</span></font></li></ul>",
      "show_price": true,
      "recurring_price": "$100.00",
      "type": "catalog_item",
      "local_currency": "USD",
      "sys_id": "04b7e94b4f7b4200086eeed18110c7fd",
      "recurring_price_currency": "USD",
      "localized_price": "$1,100.00",
      "price": "$1,100.00",
      "catalogs": [
       {
         "sys_id": "e0d08b13c3330100c8b837659bba8fb4",
         "title": "Service Catalog"
       }
      ],
      "recurring_frequency": "Annually",
      "name": "Standard Laptop",
      "localized_recurring_price": "$100.00",
      "category": {
        "sys_id": "d258b953c611227a0146101fb1be7c31",
        "title": "Hardware"
      },
      "price_currency": "USD",
      "show_quantity": false,
      "quantity": "1",
      "order": "100",
      "variables": [
        {
          "label": "Optional Software",
          "type": 0,
          "mandatory": false,
          "displayvalue": "",
          "friendly_type": "container_start",
          "render_label": true,
          "read_only": false,
          "children": [
            {
              "label": "Adobe Acrobat",
              "type": 7,
              "mandatory": false,
              "displayvalue": "false",
              "friendly_type": "check_box",
              "display_type": "CheckBox",
              "render_label": true,
              "read_only": false,
              "pricing_implications": false,
              "name": "acrobat",
              "attributes": "edge_encryption_enabled=true",
              "id": "90b72d4b4f7b4200086eeed18110c701",
              "value": false,
              "help_text": "",
              "max_length": 0
            },
            {
              "label": "Adobe Photoshop",
              "type": 7,
              "mandatory": false,
              "displayvalue": "false",
              "friendly_type": "check_box",
              "display_type": "CheckBox",
              "render_label": true,
              "read_only": false,
              "pricing_implications": false,
              "name": "photoshop",
              "attributes": "edge_encryption_enabled=true",
              "id": "a8b72d4b4f7b4200086eeed18110c701",
              "value": false,
              "help_text": "",
              "max_length": 0
            }
          ],
          "name": "optional_label",
          "attributes": "edge_encryption_enabled=true",
          "id": "10b72d4b4f7b4200086eeed18110c700",
          "value": "",
          "help_text": "",
          "max_length": 0
        },
        {
          "label": "Additional software requirements",
          "type": 2,
          "mandatory": false,
          "displayvalue": "",
          "friendly_type": "multi_line_text",
          "display_type": "Multi Line Text",
          "render_label": true,
          "read_only": false,
          "name": "Additional_software_requirements",
          "attributes": "edge_encryption_enabled=true",
          "id": "a8b72d4b4f7b4200086eeed18110c702",
          "value": "",
          "help_text": "",
          "max_length": 0
        }
      ],
      "ui_policy": [],
      "client_script": {
        "onChange": [],
        "onSubmit": [],
        "onLoad": []
      },
      "data_lookup": []
    },
    {
      "sys_id": "e1be6dcb4f7b4200086eeed18110c74c",
      "short_description": "LG IPS 27\" Monitor",
      "catalogs": [
        {
          "sys_id": "e0d08b13c3330100c8b837659bba8fb4",
          "title": "Service Catalog"
        }
      ],
      "name": "External Monitor",
      "icon": "08569a4c4f889200086eeed18110c77b.iix",
      "description": "<p><font size=\"2\"><span style=\"color: #485563;\"><br /> <font size=\"3\" color=\"#808080\">The striking design of the LG Cinema Screen incorporates an ultra-narrow bezel, so virtually all you see is picture. The viewing experience is more immersive for your favorite movies and games. Make the most of your time, with an LG Full HD LED monitor. </font></span></font></p>\n<p><font size=\"2\" color=\"#808080\">Item Specs:</font></p>\n<ul><li style=\"color: #485563;\"><font size=\"2\" color=\"#808080\">Screen Size: 27&#34;</font></li><li style=\"color: #485563;\"><font size=\"2\" color=\"#808080\">Resolution: 1920 x 1080</font></li><li style=\"color: #485563;\"><font size=\"2\" color=\"#808080\">Aspect Ratio: 16:9</font></li><li style=\"color: #485563;\"><font size=\"2\" color=\"#808080\">Brightness: 250 cd/m2</font></li><li style=\"color: #485563;\"><font size=\"2\" color=\"#808080\">Supports Split Screen</font></li></ul>",
      "show_price": false,
      "type": "catalog_item",
      "category": {
        "sys_id": "2c0b59874f7b4200086eeed18110c71f",
        "title": "Peripherals"
      },
      "show_quantity": false,
      "quantity": "1",
      "order": "200",
      "variables": [],
      "ui_policy": [],
      "client_script": {
        "onChange": [],
        "onSubmit": [],
        "onLoad": []
      },
      "data_lookup": []
    },
    {
      "sys_id": "186d917a6fab7980575967ddbb3ee4f2",
      "short_description": "New Email Creation",
      "catalogs": [
        {
          "sys_id": "e0d08b13c3330100c8b837659bba8fb4",
          "title": "Service Catalog"
        }
      ],
      "name": "New Email Account",
      "icon": "b630e97e6fab7980575967ddbb3ee4d2.iix",
      "description": "<p style=\"font-size: 13px;\"><font size=\"4\"><span style=\"color: #485563;\">Service Overview:</span></font></p>\n\t<p style=\"font-size: 13px;\"><font size=\"3\">Creation of a new email account within our Microsoft Exchange environment.  Creation of your email address will also create your Active Directory account. </font></p>\n\t<p> </p>",
      "show_price": false,
      "type": "catalog_item",
      "category": {
        "sys_id": "109f0438c6112276003ae8ac13e7009d",
        "title": "Services"
      },
      "show_quantity": false,
      "quantity": "1",
      "order": "300",
      "variables": [
        {
          "label": "Preferred Email address",
          "type": 6,
          "mandatory": true,
          "displayvalue": "",
          "friendly_type": "single_line_text",
          "display_type": "Single Line Text",
          "render_label": true,
          "read_only": false,
          "name": "new_email",
          "attributes": "edge_encryption_enabled=true",
          "id": "65865e474fbb4200086eeed18110c7dd",
          "value": "",
          "help_text": "",
          "max_length": 0
        }
      ],
      "ui_policy": [],
      "client_script": {
        "onChange": [],
        "onSubmit": [],
        "onLoad": []
      },
      "data_lookup": []
    },
    {
      "sys_id": "8b3ae7fedc1be1004ece5c08239e522b",
      "short_description": "Remote access to Internal Corporate Systems\n\t\t",
      "catalogs": [
        {
          "sys_id": "e0d08b13c3330100c8b837659bba8fb4",
          "title": "Service Catalog"
        }
      ],
      "name": "Corp VPN",
      "icon": "11dc8df74f778200086eeed18110c78e.iix",
      "description": "<p><font size=\"3\"><span style=\"color: #485563;\">Corp VPN Account</span></font></p>\n<ul><li style=\"color: #485563;\"><font size=\"2\">Corp VPN provides VPN (Virtual Private Network) access to all Internal Corporate Systems and to IP Restricted Customer Instances</font></li><li style=\"color: #485563;\"><font size=\"2\">By utilizing Corp VPN, users will be provided a similar experience to being within one of the Corporate office locations, while offsite</font></li></ul>\n<p><font size=\"2\"><span style=\"color: #485563;\"> </span></font></p>\n<p><font size=\"2\"><span style=\"color: #485563;\">Please reference the <span style=\"color: #485563;\">CORP VPN </span><span style=\"color: #485563;\">Installation</span><span style=\"color: #485563;\"> and Support Documentation</span> for instructions on installation, usage and FAQ’s. For all other questions, please contact <span style=\"color: #485563;\">IT Support.</span></span></font></p>\n<p> </p>\n<p><span style=\"font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;\"><br /><br /></span></p>",
      "show_price": false,
      "type": "catalog_item",
      "category": {
        "sys_id": "d2f7cae4c611227a018ddc481b34e099",
        "title": "Security and Access"
      },
      "show_quantity": false,
      "quantity": "1",
      "order": "600",
      "variables": [],
      "ui_policy": [],
      "client_script": {
        "onChange": [],
        "onSubmit": [],
        "onLoad": []
      },
      "data_lookup": []
    },
    {
      "sys_id": "962967674ff38200086eeed18110c7e7",
      "short_description": "Desk Set Up for New Hires or Employee Moves\n\t\t",
      "catalogs": [
        {
          "sys_id": "",
          "title": "Service Catalog"
        }
      ],
      "name": "Desk Set Up",
      "icon": "aa6b08ff4ff38200086eeed18110c7ed.iix",
      "description": "<p><font size=\"3\" face=\"arial, helvetica, sans-serif\">The facilities organization will set up your new desk with the following configuration:</font></p>\n<ul><li><font size=\"3\" face=\"arial, helvetica, sans-serif\">Docking Station</font></li><li><font size=\"3\" face=\"arial, helvetica, sans-serif\">Power Station</font></li><li><font size=\"3\" face=\"arial, helvetica, sans-serif\">Phone</font></li><li><font size=\"3\" face=\"arial, helvetica, sans-serif\">Office Chair</font></li></ul>",
      "show_price": false,
      "type": "catalog_item",
      "category": {
        "sys_id": "",
        "title": null
      },
      "show_quantity": false,
      "quantity": "1",
      "order": "900",
      "variables": [
        {
          "label": "Please describe any ergonomic requirements\n\t\t",
          "type": 2,
          "mandatory": false,
          "displayvalue": "",
          "friendly_type": "multi_line_text",
          "display_type": "Multi Line Text",
          "render_label": true,
          "read_only": false,
          "name": "ergonomic_office",
          "attributes": "edge_encryption_enabled=true",
          "id": "b0b9ab674ff38200086eeed18110c755",
          "value": "",
          "help_text": "",
          "max_length": 0
        }
      ],
      "ui_policy": [],
      "client_script": {
        "onChange": [],
        "onSubmit": [],
        "onLoad": []
      },
      "data_lookup": []
    }
  ]
}

Sample Python request

#Need to install requests package for python
#easy_install requests
import requests

# Set the request parameters
url = 'https://instance.service-now.com/api/sn_sc/v1/servicecatalog/items/6690750f4f7b4200086eeed18110c761/submit_guide'

# Eg. User name="admin", Password="admin" for this code sample.
user = 'admin'
pwd = 'admin'

# Set proper headers
headers = {"Content-Type":"application/json","Accept":"application/json"}

# Do the HTTP request
response = requests.put(url, auth=(user, pwd), headers=headers ,data="{
  \"variables\":{
    \"hiring_manager\":\"6816f79cc0a8016401c5a33be04be441\",
    \"hiring_group\":\"221f3db5c6112284009f4becd3039cc9\",
    \"remote\":\"No\",
    \"standard_package\":\"No\",
    \"laptop_type\":\"developer\"
  }
}")

# Check for HTTP codes other than 200
if response.status_code != 200:
    print('Status:', response.status_code, 'Headers:', response.headers, 'Error Response:',response.json())
    exit()

# Decode the JSON response into a dictionary and use the data
data = response.json()
print(data)
None