Service Catalog API

The Service Catalog API lets you access Service Catalog configuration and actions from within the Service Portal.

Service Catalog API - DELETE /sn_sc/servicecatalog/cart/{cart_item_id}

This method deletes the items in the cart for a given sys_id.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/cart/{cart_item_id}

Default URL: /api/sn_sc/servicecatalog/cart/{cart_item_id}

Supported request parameters

Table 1. Parameters
Parameter Description
cart_item_id Represents the sys_id of the item in the cart.

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
204 Indicates that the request completed successfully and the given item is deleted from the cart.
400 Indicates that either the given cart_item_id is invalid or the user does not have access to the cart item.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/cart/1f4cc597db21120064301150f0b8f5fc" \
--request DELETE \
--header "Accept:application/json" \
--user 'admin':'admin'
None

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/cart/1f4cc597db21120064301150f0b8f5fc'

# 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.delete(url, auth=(user, pwd), headers=headers  )

# Check for HTTP codes other than 204
if response.status_code != 204: 
    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

Service Catalog API - DELETE /sn_sc/servicecatalog/cart/{sys_id}/empty

This method deletes the cart and contents of the cart for a given user role and sys_id.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/cart/{sys_id}/empty

Default URL: /api/sn_sc/servicecatalog/cart/{sys_id}/empty

Supported request parameters

Table 5. Parameters
Parameter Description
sys_id Indicates the sys_id of the cart to empty.

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 6. Request headers
Header Description
None
Table 7. 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 8. Status codes
Status code Description
204 Indicates that the request completed successfully and the items in the cart are successfully checked out.
400 Indicates an error for one of the following reasons:
  • Invalid CartId.
  • User does not have admin/catalog_admin role, and trying to empty another user cart.

User roles

Table 9. User roles to delete cart and cart contents
Role Description
admin/catalog_admin A user with this role can empty any user cart.
admin A user with this role can delete the cart after all the contents of the cart are deleted.
catalog_admin A user with this role can delete all the items in the cart.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/cart/checkout" \
--request DELETE \
--header "Accept:application/json" \
--user 'admin':'admin'
None

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/cart/checkout '

# 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.delete(url, auth=(user, pwd), headers=headers  )

# Check for HTTP codes other than 204
if response.status_code != 204: 
    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

Service Catalog API - GET /sn_sc/servicecatalog/cart

This method retrieves the default list of cart contents, cart details, and price shown on the two-step checkout page.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/cart

Default URL: /api/sn_sc/servicecatalog/cart

Supported request parameters

Table 10. 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 11. Request headers
Header Description
None
Table 12. 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 13. Status codes
Status code Description
200 Indicates that the request completed successfully. If there is no item in the cart, it returns cart basic information and pricing for user. If cart contains any items, then the information about the items and their individual pricing is also included.
400 Indicates that the cart is empty and cannot check out.

Response body

Following are JSON or XML response values for two-step checkout page details.

Table 14. Response body values
Parameter Description
cart_id Specifies the sys_id of the cart.
subtotal_price Specifies the subtotal of the cart.
subtotal_recurring_frequency Specifies the recurring frequency subtotal of the cart.
subtotal_recurring_price Specifies the recurring price subtotal of the cart.
total_title Specifies the title for total field on page.
show_subtotal_price Specifies Boolean value to show or not show subtotal price.
subtotal_title Specifies the title for subtotal field on page.
monthly, weekly, daily Array of item details classified by recurring frequencies of the items in the cart.
  • subtotal_price: Specifies the subtotal of the frequency block.
  • subtotal_recurring_frequency:Specifies the recurring frequency subtotal of the frequency block.
  • subtotal_recurring_price: Specifies the recurring price subtotal of the frequency block.
  • total_title: Title for total field on the frequency block.
items Array consisting of details of all the items in the cart.
  • catalog_item_id: sys_id of the item in the cart.
  • variables:Object consisting of all the variable names and corresponding values for the item in the cart.
  • quantity: Quantity of the item in the cart.
  • localized_price: Price of the item in local currency.
  • price: Price of the item.
  • localized_recurring_price: Recurring price of the item in local currency.
  • recurring_price: Recurring price of the item.
  • recurring_frequency: Recurring frequency of the item.
  • item_name: Name of the item in the cart.
  • cart_item_id:sys_id of the item in the cart.
  • delivery_time:Delivery time of the item.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/cart" \
--request GET \
--header "Accept:application/json" \
--user 'admin':'admin'

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/cart '

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

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

# Do the HTTP request
response = requests.get(url, auth=(user, pwd), headers=headers  )

# 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)
<?xml version="1.0" encoding="UTF-8" ?>
<result>
    <cart_id>e7a44997db21120064301150f0b8f517</cart_id>
    <subtotal_price>$1,599.98</subtotal_price>
    <subtotal_recurring_frequency>Monthly</subtotal_recurring_frequency>
    <subtotal_recurring_price>$58.00</subtotal_recurring_price>
    <total_title>Total</total_title>
    <monthly>
        <subtotal_price>$1,599.98</subtotal_price>
        <subtotal_recurring_frequency>Monthly</subtotal_recurring_frequency>
        <subtotal_recurring_price>$58.00</subtotal_recurring_price>
        <total_title>Total</total_title>
        <items>
            <catalog_item_id>0d08837237153000158bbfc8bcbe5d02</catalog_item_id>
            <variables>
                <Monthly data allowance>500MB</Monthly data allowance>
                <Storage>64GB</Storage>
                <Color>Black</Color>
                <Allocated carrier>AT & T Mobility</Allocated carrier>
                <Contract duration>18 Months</Contract duration>
            </variables>
            <quantity>2</quantity>
            <localized_price>$799.99</localized_price>
            <price>$799.99</price>
            <recurring_frequency>Monthly</recurring_frequency>
            <localized_recurring_price>$30.00</localized_recurring_price>
            <recurring_price>$29.00</recurring_price>
            <item_name>Apple iPhone 5</item_name>
            <cart_item_id>1f4cc597db21120064301150f0b8f5fc</cart_item_id>
            <delivery_time>2 Days</delivery_time>
        </items>
        <show_subtotal_price>true</show_subtotal_price>
        <subtotal_title>Subtotal</subtotal_title>
    </monthly>
    <show_subtotal_price>true</show_subtotal_price>
    <subtotal_title>Subtotal</subtotal_title>
</result>

Service Catalog API - GET /sn_sc/servicecatalog/cart/delivery_address/{user_id}

This method retrieves the shipping address of the requested user.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/cart/delivery_address/{user_id}

Default URL: /api/sn_sc/servicecatalog/cart/delivery_address/{user_id}

Supported request parameters

Table 15. Parameters
Parameter Description
user_id Indicates sys_id of the user, whose shipping address is retrieved.

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
None
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 response codes .

Table 18. Status codes
Status code Description
200 Specifies the request completed successfully and returns the shipping address of the user.
400 Specifies that the user id is invalid.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/cart/delivery_address/62826bf03710200044e0bfc8bcbe5df1" \
--request GET \
--header "Accept:application/json" \
--user 'admin':'admin'
{
    "result": "\nBrasilia, \nBrasil"
}

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/cart/delivery_address/62826bf03710200044e0bfc8bcbe5df1'

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

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

# Do the HTTP request
response = requests.get(url, auth=(user, pwd), headers=headers  )

# 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)
<?xml version="1.0" encoding="UTF-8" ?>
<result>
Brasilia, 
Brasil
</result>

Service Catalog API - GET /sn_sc/servicecatalog/catalogs

This method retrieves a list of catalogs to which the user has access.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/catalogs

Default URL: /api/sn_sc/servicecatalog/catalogs

Supported request parameters

Table 19. Parameters
Parameter Description
sysparm_limit Specify the number of entities in the response. This value applies to categories and items.
sysparm_text Specify query text for search support. (Required)
sysparm_view Specify the device to display the item (desktop, mobile, or both).

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 20. Request headers
Header Description
None
Table 21. 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 22. Status codes
Status code Description
200 Indicates that the request completed successfully. If a valid query returned no results, the response body contains only an empty result array.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/servicecatalog/catalogs?sysparm_limit=10" \
--request GET \
--header "Accept:application/json" \
--user 'admin':'admin'
{
  "result": [
    {
      "title": "Technical Catalog",
      "sys_id": "742ce428d7211100f2d224837e61036d",
      "has_categories": true,
      "has_items": true,
      "description": "Products and services for the IT department",
      "desktop_image": "7a7c8271475211002ee987e8dee4906d.iix"
    },
    {
      "title": "Service Catalog",
      "sys_id": "e0d08b13c3330100c8b837659bba8fb4",
      "has_categories": true,
      "has_items": true,
      "description": "Service Catalog - IT Now",
      "desktop_image": "adbcc271475211002ee987e8dee49001.iix"
    }
  ]
}

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/catalogs?sysparm_limit=10'

# 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.get(url, auth=(user, pwd), headers=headers )

# 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)

Service Catalog API - GET /sn_sc/servicecatalog/catalogs/{sys_id}

This method retrieves all the information about a requested catalog.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/catalogs/{sys_id}

Default URL: /api/sn_sc/servicecatalog/catalogs/{sys_id}

Supported request parameters

Table 23. Parameters
Parameter Description
sysparm_view Defines the device that displays the Item:
  • Desktop(desktop)
  • Mobile(mobile)
  • Desktop and Mobile(both)

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 24. Request headers
Header Description
None
Table 25. 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 26. Status codes
Status code Description
200 Indicates that the request has completed successfully and returns all the details of the catalog.
400 Indicates that request is invalid for one of the following reasons:
  • User does not have access to the catalog.
  • Invalid sys_id.
500 Internal error occurred while executing the request.

Response body values

Following are JSON or XML response parameters for a request completed successfully. The response consists of details of the catalog item.

Table 27. Response parameters
Parameter Description
title Title of the catalog.
sys_id SysId of the catalog.
has_categories Returns true if the catalog has any categories created in it otherwise returns false.
categories A list of categories with the following details for each category:
  • title: title of the category.
  • description:description about the category.
  • sys_id: sysId of the category.
  • header_image: header image of the category.
has_items Returns true if the catalog has any items associated with it otherwise returns false.
description Description about the catalog.
desktop_image The source of the image used to display with catalog.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/servicecatalog/catalogs/e0d08b13c3330100c8b837659bba8fb4" \
    --request GET \
    --header "Accept:application/json" \
    --user 'admin':'admin'

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/servicecatalog/catalogs/e0d08b13c3330100c8b837659bba8fb4'

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

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

    # Do the HTTP request
    response = requests.get(url, auth=(user, pwd), headers=headers )

    # 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)
<?xml version="1.0" encoding="UTF-8"?>
 <response>
   <result>
      <sys_id>e0d08b13c3330100c8b837659bba8fb4</sys_id>
         <desktop_image>adbcc271475211002ee987e8dee49001.iix</desktop_image>
          <has_categories />
          <description>Service Catalog - IT Now</description>
          <categories>
             <header_image />
             <sys_id>e15706fc0a0a0aa7007fc21e1ab70c2f</sys_id>
             <description>Your IT gateway. Report issues and submit requests.</description>
             <title>Can We Help You?</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>95fc11615f1211001c9b2572f2b477c6</sys_id>
             <description>Services offered by different departments in the organization</description>
             <title>Departmental Services</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>900682363731300054b6a3549dbe5d5f</sys_id>
             <description>Desktop computers for your work area.</description>
             <title>Desktops</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>d2f716fcc611227a015a142fa0b262c1</sys_id>
             <description>Order new furniture, and fixtures, or request for
      		furniture to be repaired. Cubicle modifications can also be ordered
      		here</description>
             <title>Furniture and Decor</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>d258b953c611227a0146101fb1be7c31</sys_id>
             <description>Order from a variety of hardware to meet your business
      		needs, including phones, tablets and laptops.</description>
             <title>Hardware</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>d2f83003c611227a01a81bd5bd54b1aa</sys_id>
             <description>Request for cleaning services to be performed</description>
             <title>Janitorial</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>59f586f23731300054b6a3549dbe5db7</sys_id>
             <description>Laptop computers for mobile workers.</description>
             <title>Laptops</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>d2f86388c611227a002209db6966d5ad</sys_id>
             <description>Request for a shared office equipment to be repaired</description>
             <title>Maintenance and Repair</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>d68eb4d637b1300054b6a3549dbe5db2</sys_id>
             <description>Cell phones to meet your business needs.</description>
             <title>Mobiles</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>abbcbbbf47700200e90d87e8dee49041</sys_id>
             <description>Standard change templates relating to network related changes: Adding new switches, upgrading IOS etc</description>
             <title>Network Standard Changes</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>109cdff8c6112276003b17991a09ad65</sys_id>
             <description>Office services such as printing, supplies requisition
      		and document shipping and delivery.</description>
             <title>Office</title>
         </categories>
         <categories>
            <header_image />
            <sys_id>2c0b59874f7b4200086eeed18110c71f</sys_id>
            <description>End user peripherals such as mobile phone cases, dongles,
      	  and cables</description>
            <title>Peripherals</title>
         </categories>
         <categories>
             <header_image />
             <sys_id>5d643c6a3771300054b6a3549dbe5db0</sys_id>
             <description>A range of printers for office installation, providing
      	  different feature sets.</description>
             <title>Printers</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>91a9e0510a0a3c7401d20d86782fc9a0</sys_id>
             <description>Quick access to other company information and portals.</description>
             <title>Quick Links</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>496a3a7e0a0a0bc00089b39df14eb56e</sys_id>
             <description>Delegate your roles to another user or group</description>
             <title>Role Delegation</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>d2f7cae4c611227a018ddc481b34e099</sys_id>
             <description>Security related services including badge and keys
      	  requisitions</description>
             <title>Security and Access</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>b3ecbbbf47700200e90d87e8dee49081</sys_id>
             <description>Standard change templates related to servers and attached storage. Reboot server, increase size of storage LUN etc</description>
             <title>Server Standard Changes</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>109f0438c6112276003ae8ac13e7009d</sys_id>
             <description>Document production services. Create and produce
      		high-quality, professional documents.</description>
             <title>Services</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>2809952237b1300054b6a3549dbe5dd4</sys_id>
             <description>A range of software products available for installation
      		on your corporate laptop or desktop computer.</description>
             <title>Software</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>b0fdfb01932002009ca87a75e57ffbe9</sys_id>
             <description>Standard Change Template Library</description>
             <title>Standard Changes</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>b06546f23731300054b6a3549dbe5dd8</sys_id>
             <description>A range of tablet devices for employees in the field.</description>
             <title>Tablets</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>00728916937002002dcef157b67ffb6d</sys_id>
             <description>Propose a new Standard Change Template. Modify or Retire an existing  Standard Change Template.</description>
             <title>Template Management</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>c3d3e02b0a0a0b12005063c7b2fa4f93</sys_id>
             <description>The most commonly requested items from the service
      		catalog over the previous 7 days.</description>
             <title>Top Requests</title>
          </categories>
          <categories>
             <header_image />
             <sys_id>566c3007c3413000ed4860eb5bba8f7e</sys_id>
             <description>null</description>
             <title>Virtual Resources</title>
         </categories>
          <title>Service Catalog</title>
          <has_items />
   </result>
</response>

Service Catalog API - GET /sn_sc/servicecatalog/catalogs/{sys_id}/categories

This method retrieves a list of categories for a catalog.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/catalogs/{sys_id}/categories

Default URL: /api/sn_sc/servicecatalog/catalogs/{sys_id}/categories

Supported request parameters

Table 28. Parameters
Parameter Description
sysparam_top_level_only Gets only those categories whose parent is a catalog.
sysparam_limit Number of categories in the result.
sysparam_view Specify the device to display the item (desktop, mobile, or both).
sysparam_offset Offset to set the query window.

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 29. Request headers
Header Description
None
Table 30. 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 31. Status codes
Status code Description
200 Returns a list of categories in a catalog. If the query results in no categories then an empty array is returned.
400 Indicates that the request is invalid and catalog sys_id is invalid.
500 Internal error.

Sample cURL request and response

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/catalogs/e0d08b13c3330100c8b837659bba8fb4/categories?sysparm_limit=10&sysparm_offset=12;rel="first" \
--request GET \
--header "Accept:application/json" \
--user 'admin':'admin'
{
  "result": [
    {"title": "Desktops",
      "description": "Desktop computers for your work area.",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "1bface31475211002ee987e8dee49095.iix",
      "sys_id": "900682363731300054b6a3549dbe5d5f"
    },
    {"title": "Furniture and Decor",
      "description": "Order new furniture, and fixtures, or request for\n\t\t\tfurniture to be repaired. Cubicle modifications can also be ordered\n\t\t\there\n\t\t",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "",
      "sys_id": "d2f716fcc611227a015a142fa0b262c1"
    },
    {"title": "Hardware",
      "description": "Order from a variety of hardware to meet your business\n\t\t\tneeds, including phones, tablets and laptops.",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "c4b933e9471211002ee987e8dee49064.iix",
      "sys_id": "d258b953c611227a0146101fb1be7c31"
    },
    {"title": "Janitorial",
      "description": "Request for cleaning services to be performed\n\t\t",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "",
      "sys_id": "d2f83003c611227a01a81bd5bd54b1aa"
    },
    {"title": "Laptops",
      "description": "Laptop computers for mobile workers.",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "ec5b0271475211002ee987e8dee49042.iix",
      "sys_id": "59f586f23731300054b6a3549dbe5db7"
    },
    {"title": "Maintenance and Repair",
      "description": "Request for a shared office equipment to be repaired\n\t\t",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "",
      "sys_id": "d2f86388c611227a002209db6966d5ad"
    },
    {"title": "Mobiles",
      "description": "Cell phones to meet your business needs.",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "ff6b0271475211002ee987e8dee490d2.iix",
      "sys_id": "d68eb4d637b1300054b6a3549dbe5db2"
    },
    {"title": "Network Standard Changes",
      "description": "Standard change templates relating to network related changes: Adding new switches, upgrading IOS etc",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "",
      "sys_id": "abbcbbbf47700200e90d87e8dee49041"
    },
    {"title": "Office",
      "description": "Office services such as printing, supplies requisition\n\t\t\tand document shipping and delivery.",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "498b0271475211002ee987e8dee490ea.iix",
      "sys_id": "109cdff8c6112276003b17991a09ad65"
    },
    {"title": "Peripherals",
      "description": "End user peripherals such as mobile phone cases, dongles,\n\t\t\tand cables",
      "full_description": null,
      "icon": "",
      "header_icon": "",
      "homepage_image": "a39f470c4fc89200086eeed18110c7df.iix",
      "sys_id": "2c0b59874f7b4200086eeed18110c71f"
    }
  ]
}

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/catalogs/e0d08b13c3330100c8b837659bba8fb4/categories?sysparm_limit=10&sysparm_offset=12;rel="next"'
url = 'https://instance.service-now.com/api/sn_sc/v1/servicecatalog/catalogs/e0d08b13c3330100c8b837659bba8fb4/categories?sysparm_limit=10&sysparm_offset=20;rel="last"'

# 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.get(url, auth=(user, pwd), headers=headers )

# 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

Service Catalog API - GET /sn_sc/servicecatalog/categories/{sys_id}

This method retrieves all the information about a requested category.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/categories/{sys_id}

Default URL: /api/sn_sc/servicecatalog/categories/{sys_id}

Supported request parameters

Table 32. Parameters
Parameter Description
sysparm_view Defines the device that displays the Item:
  • Desktop(desktop)
  • Mobile(mobile)
  • Desktop and Mobile(both)

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 33. Request headers
Header Description
None
Table 34. 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 35. Status codes
Status code Description
200 Indicates that the request has completed successfully and returns all the details of the category.
400 Indicates that request is invalid for one of the following reasons:
  • User does not have access to the category.
  • Invalid sys_id.
500 Internal error occurred while executing the request.

Response body values

Following are JSON or XML response parameters for a request completed successfully. The response consists of details of the category.

Table 36. Response parameters
Parameter Description
title Title of the category.
sys_id SysId of the category.
icon The source of the small icon displayed beside the category name, when the category is listed as a subcategory.
header_icon The source of the icon displayed beside the category header, when the category is listed at the top-level category.
description Short description about the category.
full_description Full description about the category.
homepage_image The HomePageImage source of the category.
mobile_image The image source used for the category in mobiles.
child_categories The list of categories that belong to this category. Each object in the list gives the sys_id and title of the category that belong to this category.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/servicecatalog/categories/b0fdfb01932002009ca87a75e57ffbe9" \
      --request GET \
      --header "Accept:application/json" \
      --user 'admin':'admin'
{
        "result": {
          "title": "Standard Changes",
          "description": "Standard Change Template Library",
          "full_description": null,
          "icon": "",
          "header_icon": "",
          "homepage_image": "",
          "sys_id": "b0fdfb01932002009ca87a75e57ffbe9",
          "child_categories": [
            {
              "sys_id": "abbcbbbf47700200e90d87e8dee49041",
              "title": "Network Standard Changes"
            },
            {
              "sys_id": "b3ecbbbf47700200e90d87e8dee49081",
              "title": "Server Standard Changes"
            },
            {
              "sys_id": "00728916937002002dcef157b67ffb6d",
              "title": "Template Management"
            }
          ]}
      }

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/servicecatalog/categories/b0fdfb01932002009ca87a75e57ffbe9'

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

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

        # Do the HTTP request
        response = requests.get(url, auth=(user, pwd), headers=headers )

        # 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)
<?xml version="1.0" encoding="UTF-8"?>
      <response>
       <result>
          <sys_id>b0fdfb01932002009ca87a75e57ffbe9</sys_id>
          <full_description>null</full_description>
          <header_icon />
          <homepage_image />
          <icon />
          <description>Standard Change Template Library</description>
          <child_categories>
             <sys_id>abbcbbbf47700200e90d87e8dee49041</sys_id>
             <title>Network Standard Changes</title>
          </child_categories>
          <child_categories>
             <sys_id>b3ecbbbf47700200e90d87e8dee49081</sys_id>
             <title>Server Standard Changes</title>
          </child_categories>
          <child_categories>
             <sys_id>00728916937002002dcef157b67ffb6d</sys_id>
             <title>Template Management</title>
          </child_categories>
          <title>Standard Changes</title>
       </result>
      </response>

Service Catalog API - GET /sn_sc/servicecatalog/items

This method retrieves a list of catalogs and a list of items for each catalog.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/items

Default URL: /api/sn_sc/servicecatalog/items

Supported request parameters

Table 37. Parameters
Parameter Description
sysparm_category Specify the category sys_id of the item.
sysparm_type Specify the type of item. For example, Record Producer, Order Guide. This field is used by the item-search to search specified item types.
sysparm_limit Specify the number of entities in the response. This value applies to categories and items.
sysparm_text Specify query text for search support. (Required)
sysparm_offset Specify the offset used for pagination.
sysparm_catalog Specify the catalog sys_id of the item.
sysparm_view Defines the device that displays the Item:
  • Desktop (desktop)
  • Mobile (mobile)
  • Desktop and Mobile (both)

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 38. Request headers
Header Description
None
Table 39. 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 40. Status codes
Status code Description
200 Returns a list of catalogs and items available. If a valid query results in no items, then the response body contains only an empty result array.
500 Internal error.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/servicecatalog/items?sysparm_limit=2" \
--request GET \
--header "Accept:application/json" \
--user 'admin':'admin'
{
  "result": [
    {
      "sys_id": "0034e2559f90120066dabde8132e7054",
      "short_description": null,
      "catalogs": [
        {
          "sys_id": "0b22fd2ad7021100b9a5c7400e610319",
          "title": "Admin Home"
        }
      ],
      "name": "ITSM Guided Setup",
      "icon": "images/nav_bult.gif",
      "description": "",
      "show_price": false,
      "type": "catalog_item",
      "category": {
        "sys_id": "fc000d749f10120066dabde8132e7091",
        "title": "Guided Setup"
      }
    },
    {
      "sys_id": "011f117a9f3002002920bde8132e7020",
      "short_description": null,
      "catalogs": [
        {
          "sys_id": "e0d08b13c3330100c8b837659bba8fb4",
          "title": "Service Catalog"
        }
      ],
      "name": "Retire a Standard Change Template",
      "icon": "images/icons/catalog_item.gifx",
      "description": "<p class=\"p1\"><font size=\"2\"><span class=\"s1\">Request an existing Standard Change Template is made unavailable when it is no longer required or no longer acceptable as a Standard Change.  This will be confirmed by your Change Management team.</span></font></p>",
      "show_price": false,
      "type": "record_producer",
      "category": {
        "sys_id": "00728916937002002dcef157b67ffb6d",
        "title": "Template Management"
      }
    }
  ]
}

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?sysparm_limit=10'

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

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

# Do the HTTP request
response = requests.get(url, auth=(user, pwd), headers=headers )

# 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)
<?xml version="1.0" encoding="UTF-8”?>
<response>
  <result>
    <sys_id>011f117a9f3002002920bde8132e7020</sys_id>
    <short_description>null</short_description>
    <catalogs><sys_id>e0d08b13c3330100c8b837659bba8fb4</sys_id><title>Service Catalog</title></catalogs>
    <name>Retire a Standard Change Template</name>
    <icon>images/icons/catalog_item.gifx</icon>
    <description>&lt;p class=&quot;p1&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;s1&quot;&gt;
      Request an existing Standard Change Template is made unavailable when it is no longer required or no 
      longer acceptable as a Standard Change.  This will be confirmed by your Change Management team.&lt;
      /span&gt;&lt;/font&gt;&lt;/p&gt;</description>
    <show_price>false</show_price>
    <type>record_producer</type>
    <category><sys_id>00728916937002002dcef157b67ffb6d</sys_id><title>Template Management</title></category>
  </result>
</response>

Service Catalog API - GET /sn_sc/servicecatalog/items/{sys_id}

This method retrieves the catalog item with the specified sys_id.

URL format

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

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

Supported request parameters

Table 41. Parameters
Parameter Description
sysparm_view Defines the device that displays the Item:
  • Desktop(desktop)
  • Mobile(mobile)
  • Desktop and Mobile(both)

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 42. Request headers
Header Description
None
Table 43. 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 44. Status codes
Status code Description
200 Indicates that the request has completed successfully and returns the details of the catalog item.
400 Indicates that request is invalid for one of the following reasons:
  • User does not have access to the catalog item.
  • Invalid sys_id.
500 Internal error occurred while executing the request.

Request body

The API accepts these JSON or XML elements in the request body.

Table 45. Elements accepted in the request body
Element Description
None

Response body

The API returns these JSON or XML elements in the response body to describe the catalog item.

Table 46. Elements returned in the response body
Element Description
name Name of the catalog Item.
sys_id SysID of the catalog item.
type Item type can be:
  • catalog item
  • record producer item
  • order guide
short_description Text on the service catalog homepage or search results page, or the title on the order form of the catalog item.
description Full description of catalog item.
icon Path of the image that appears as an icon beside the catalog item.
category List of categories that the item belongs and each category title and sys_id of the category.
show_price A Boolean value, if true, returns the following details.
  • price
  • localized_price
  • recurring_price
  • localized_recurring_price
  • recurring_frequency
  • local_currency
  • price_currency
  • recurring_price_currency
catalogs List of all the catalogs the item belongs and each catalog title and sys_id of the catalog.
variables List of all the variables of the catalog item.
ui_policy List of all Catalog UI policies defined on the catalog item.
client_script List of all the catalog client scripts defined on the catalog item.
data_lookup Array of data lookups defined on the catalog item.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/servicecatalog/items/0cf7477237153000158bbfc8bcbe5dec" \
  --request GET \
  --header "Accept:application/json" \
  --user 'admin':'admin'
  "result": {
  "short_description": "Google Nexus 7",
  "icon": "images/service_catalog/generic_small.gifx",
  "description": "\n<h3>Google Nexus 7 Black Wi-Fi 16GB Tablet, Model NEXUS7ASUS1B16</h3>\n<p style=\"margin-bottom: 0px;\"><b>Key Features:</b></p>\n<li>The world&#39;s 1st Android™ 4.1 Jelly Bean tablet</li>\n<li>World’s first 7” quad-core tablet delivers an advanced multimedia experience with up to 9.5* hours of battery life</li>\n<li>World&#39;s best NFC experience on a tablet with a textured tactile design for enhanced comfort measuring just 10.45mm thin and 340g light</li>\n<li>ASUS TruVivid technology with Corning® Fit Glass for improved color clarity and scratch resistance</li>\n<li>178 wide-viewing angle IPS display ensures unrivaled visual acuity</li>\n",
  "show_price": true,
  "recurring_price": "$10.00",
  "type": "catalog_item",
  "local_currency": "USD",
  "sys_id": "0cf7477237153000158bbfc8bcbe5dec",
  "recurring_price_currency": "USD",
  "localized_price": "$199.99",
  "price": "$199.99",
  "catalogs": [
    {
      "sys_id": "e0d08b13c3330100c8b837659bba8fb4",
       "title": "Service Catalog"
     }
  ],
  "recurring_frequency": "Weekly",
  "name": "Google Nexus 7",
  "localized_recurring_price": "$10.00",
  "category": {
    "sys_id": "b06546f23731300054b6a3549dbe5dd8",
    "title": "Tablets"
  },
  "price_currency": "USD",
  "categories": [
    {
      "sys_id": "d258b953c611227a0146101fb1be7c31",
      "active": true,
      "category": {
        "sys_id": "b06546f23731300054b6a3549dbe5dd8",
        "active": true,
        "title": "Tablets"
       },
        "title": "Hardware"
    }
  ],
  "variables": [],
  "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/servicecatalog/items/0cf7477237153000158bbfc8bcbe5dec'

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

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

  # Do the HTTP request
  response = requests.get(url, auth=(user, pwd), headers=headers )

  # 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)
<?xml version="1.0" encoding="UTF-8"?>
<response>
 <result>
    <short_description>Google Nexus 7</short_description>
    <icon>images/service_catalog/generic_small.gifx</icon>
    <description>&lt;h3&gt;Google Nexus 7 Black Wi-Fi 16GB Tablet, Model NEXUS7ASUS1B16&lt;/h3&gt;
&lt;p style="margin-bottom: 0px;"&gt;&lt;b&gt;Key Features:&lt;/b&gt;&lt;/p&gt;
&lt;li&gt;The world&amp;#39;s 1st Android™ 4.1 Jelly Bean tablet&lt;/li&gt;
&lt;li&gt;World’s first 7” quad-core tablet delivers an advanced multimedia experience with up to 9.5* hours of battery life&lt;/li&gt;
&lt;li&gt;World&amp;#39;s best NFC experience on a tablet with a textured tactile design for enhanced comfort measuring just 10.45mm thin and 340g light&lt;/li&gt;
&lt;li&gt;ASUS TruVivid technology with Corning® Fit Glass for improved color clarity and scratch resistance&lt;/li&gt;
&lt;li&gt;178 wide-viewing angle IPS display ensures unrivaled visual acuity&lt;/li&gt;</description>
    <show_price />
    <recurring_price>$10.00</recurring_price>
    <type>catalog_item</type>
    <local_currency>USD</local_currency>
    <sys_id>0cf7477237153000158bbfc8bcbe5dec</sys_id>
    <recurring_price_currency>USD</recurring_price_currency>
    <localized_price>$199.99</localized_price>
    <client_script />
    <price>$199.99</price>
    <catalogs>
       <sys_id>e0d08b13c3330100c8b837659bba8fb4</sys_id>
       <title>Service Catalog</title>
    </catalogs>
    <recurring_frequency>Weekly</recurring_frequency>
    <name>Google Nexus 7</name>
    <localized_recurring_price>$10.00</localized_recurring_price>
    <categories>
       <sys_id>d258b953c611227a0146101fb1be7c31</sys_id>
       <active />
       <category>
          <sys_id>b06546f23731300054b6a3549dbe5dd8</sys_id>
          <active />
          <title>Tablets</title>
       </category>
       <title>Hardware</title>
    </categories>
    <category>
       <sys_id>b06546f23731300054b6a3549dbe5dd8</sys_id>
       <title>Tablets</title>
    </category>
    <price_currency>USD</price_currency>
 </result>
</response>

Service Catalog API - GET /sn_sc/servicecatalog/wishlist

This method retrieves list of items from the user's wish list.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/wishlist

Default URL: /api/sn_sc/servicecatalog/wishlist

Supported request parameters

Table 47. 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 48. Request headers
Header Description
None
Table 49. 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 50. Status codes
Status code Description
200 Indicates that the request completed successfully. Returns the user's list of wish list items.
500 Internal error.

Sample cURL request

curl "http://localhost/api/sn_sc/servicecatalog/wishlist" \
        --request GET \
        --header "Accept:application/json" \
        --user 'admin':'admin'
{
        "result": {
        "cart_id": "02a559a7c3b02200d68d3b0ac3d3ae5d",
        "items": [
        {
        "catalog_item_id": "04b7e94b4f7b4200086eeed18110c7fd",
        "variables": {
        "Adobe Photoshop": "",
        "Adobe Acrobat": "",
        "Optional Software": "",
        "Additional software requirements": ""
        },
        "quantity": "1",
        "localized_price": "$1,100.00",
        "price": "$1,100.00",
        "recurring_frequency": "Annually",
        "localized_recurring_price": "$100.00",
        "recurring_price": "$100.00",
        "item_name": "Standard Laptop &",
        "cart_item_id": "d31be364c3012200d68d3b0ac3d3aecf",
        "delivery_time": "5 Days"
        }
        ]
        }
        }

Sample Python request

#Need to install requests package for python
        #easy_install requests
        import requests
        
        # Set the request parameters
        url = 'http://localhost/api/sn_sc/servicecatalog/wishlist'
        
        # 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.get(url, auth=(user, pwd), headers=headers )
        
        # 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)
<?xml version="1.0" encoding="UTF-8”?>
        <response>
          <result>
            <cart_id>02a559a7c3b02200d68d3b0ac3d3ae5d</cart_id>     
            <items>        
              <catalog_item_id>04b7e94b4f7b4200086eeed18110c7fd</catalog_item_id>
              <variables>
                <Adobe Photoshop></Adobe Photoshop>
                <Adobe Acrobat></Adobe Acrobat>
                <Optional Software></Optional Software>
                <Additional software requirements></Additional software requirements>
                </variables>         
              <quantity>1</quantity>         
              <localized_price>$1,100.00</localized_price>         
              <price>$1,100.00</price>        
              <recurring_frequency>Annually</recurring_frequency>        
              <localized_recurring_price>$100.00</localized_recurring_price>         
              <recurring_price>$100.00</recurring_price>         
              <item_name>Standard Laptop &amp;</item_name>        
              <cart_item_id>d31be364c3012200d68d3b0ac3d3aecf</cart_item_id>         
              <delivery_time>5 Days</delivery_time>
            </items>
        </result>
        </response>

Service Catalog API - GET /sn_sc/servicecatalog/wishlist/{cart_item_id}

This method retrieves the details of the specified item stored in the wish list cart.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/wishlist/{cart_item_id}

Default URL: /api/sn_sc/servicecatalog/wishlist/{cart_item_id}

Supported request parameters

Table 51. 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 52. Request headers
Header Description
None
Table 53. 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 54. Status codes
Status code Description
200 Indicates that the request completed successfully. Returns details of the specific item in the wish list.
400 Indicates a failed request. Incorrect cart item id or the item does not exist in the wish list.

Sample cURL request

curl "http://localhost/api/sn_sc/servicecatalog/wishlist/d31be364c3012200d68d3b0ac3d3aecf" \
        --request GET \
        --header "Accept:application/json" \
        --user 'admin':'admin'
{
        "result": {
        "catalog_item_id": "04b7e94b4f7b4200086eeed18110c7fd",
        "variables": {
        "Adobe Photoshop": "",
        "Adobe Acrobat": "",
        "Optional Software": "",
        "Additional software requirements": ""
        },
        "quantity": "1",
        "localized_price": "$1,100.00",
        "price": "$1,100.00",
        "recurring_frequency": "Annually",
        "localized_recurring_price": "$100.00",
        "recurring_price": "$100.00",
        "item_name": "Standard Laptop &",
        "cart_item_id": "d31be364c3012200d68d3b0ac3d3aecf",
        "delivery_time": "5 Days"
        }
        }

Sample Python request

#Need to install requests package for python
        #easy_install requests
        import requests
        
        # Set the request parameters
        url = 'http://localhost/api/sn_sc/servicecatalog/wishlist/d31be364c3012200d68d3b0ac3d3aecf'
        
        # 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.get(url, auth=(user, pwd), headers=headers )
        
        # 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)
<?xml version="1.0" encoding="UTF-8”?>
        <response>
          <result>
            <catalog_item_id>04b7e94b4f7b4200086eeed18110c7fd</catalog_item_id>
            <quantity>1</quantity>
            <variables>
              <Adobe Photoshop></Adobe Photoshop>
              <Adobe Acrobat></Adobe Acrobat>
              <Optional Software></Optional Software>
              <Additional software requirements></Additional software requirements> 
            </variables>
            <localized_price>$1,100.00</localized_price>
            <price>$1,100.00</price>
            <recurring_frequency>Annually</recurring_frequency>
            <localized_recurring_price>$100.00</localized_recurring_price>
            <recurring_price>$100.00</recurring_price>
            <item_name>Standard Laptop &amp;</item_name>
            <cart_item_id>d31be364c3012200d68d3b0ac3d3aecf</cart_item_id>
            <delivery_time>5 Days</delivery_time>
        </result>
        </response>

Service Catalog API - POST /sn_sc/servicecatalog/cart/{cart_item_id}

This method edits and updates any item in the cart.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/cart/{cart_item_id}

Default URL: /api/sn_sc/servicecatalog/cart/{cart_item_id}

Supported request parameters

Table 55. 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 56. Request headers
Header Description
None
Table 57. 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 58. Status codes
Status code Description
201 Indicates that the request completed successfully and that the item is added to the cart.
400 Following three errors can occur:
  • Invalid quantity value:Indicates that either the sysparm_quantity parameter is not provided or contains invalid value.
  • Security constraints prevent ordering of Item:Indicates that either the Item ID specified in the path parameters is either invalid or the user does not have access to the item.
  • Mandatory Variables are required:Indicates that one or more of the mandatory variable values is not provided in the request.

Request and Response body

Table 59. Request body parameters
Parameter Description
sysparm_quantity Specifies the quantity of the item to update the cart (required parameter).
variables Object consisting of all variable names and their corresponding valid values. Provide values for all the mandatory variables.
Table 60. Response body parameters
Parameter Description
cart_id Specifies the sys_id of the cart.
subtotal_price Specifies the subtotal of the cart.
subtotal_recurring_frequency Specifies the recurring frequency subtotal of the cart.
subtotal_recurring_price Specifies the recurring price subtotal of the cart.
total_title Specifies the title for total field on page.
show_subtotal_price Specifies Boolean value to show or not show subtotal price.
subtotal_title Specifies the title for subtotal field on page.
monthly, weekly, daily Array of item details classified by recurring frequencies of the items in the cart.
  • subtotal_price: Specifies the subtotal of the frequency block.
  • subtotal_recurring_frequency:Specifies the recurring frequency subtotal of the frequency block.
  • subtotal_recurring_price: Specifies the recurring price subtotal of the frequency block.
  • total_title: Title for total field on the frequency block.
items Array consisting of details of all the items in the cart.
  • catalog_item_id: sys_id of the item in the cart.
  • variables:Object consisting of all the variable names and corresponding values for the item in the cart.
  • quantity: Quantity of the item in the cart.
  • localized_price: Price of the item in local currency.
  • price: Price of the item.
  • localized_recurring_price: Recurring price of the item in local currency.
  • recurring_price: Recurring price of the item.
  • recurring_frequency: Recurring frequency of the item.
  • item_name: Name of the item in the cart.
  • cart_item_id:sys_id of the item in the cart.
  • delivery_time:Delivery time of the item.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/cart/183f0297db21120064301150f0b8f5fe" \
--request POST \
--header "Accept:application/json" \
--user 'admin':'admin'
{
   "result":{
      "cart_id":"616ebdb8db71120076861150f0b8f552",
      "subtotal_price":"$9,599.88",
      "subtotal_recurring_frequency":"Monthly",
      "subtotal_recurring_price":"$348.00",
      "total_title":"Total",
      "monthly":{
         "subtotal_price":"$9,599.88",
         "subtotal_recurring_frequency":"Monthly",
         "subtotal_recurring_price":"$348.00",
         "total_title":"Total",
         "items":[
        {
            "catalog_item_id":"0d08837237153000158bbfc8bcbe5d02",
            "variables":{
                "Monthly data allowance":"500MB",
                "Storage":"16GB",
                "Color":"Black",
                "Allocated carrier":"AT & T Mobility",
                "Contract duration":"18 Months"
            },
               "quantity":"12",
               "localized_price":"$799.99",
               "price":"$799.99",
               "recurring_frequency":"Monthly",
               "localized_recurring_price":"$30.00",
               "recurring_price":"$29.00",
               "item_name":"Apple iPhone 5",
               "cart_item_id":"a21ffdb0db71120076861150f0b8f560",
               "delivery_time":"2 Days"			//	Check this
            }
         ],
         "show_subtotal_price":"true",
         "subtotal_title":"Subtotal"
      },
      "show_subtotal_price":"true",
      "subtotal_title":"Subtotal"
   }
}

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/cart/183f0297db21120064301150f0b8f5fe'

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

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

# Do the HTTP request
response = requests.post(url, auth=(user, pwd), headers=headers  )

# Check for HTTP codes other than 201
if response.status_code != 201: 
    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)
<?xml version="1.0" encoding="UTF-8" ?>
<root>
    <result>
        <cart_id>616ebdb8db71120076861150f0b8f552</cart_id>
        <subtotal_price>$9,599.88</subtotal_price>
        <subtotal_recurring_frequency>Monthly</subtotal_recurring_frequency>
        <subtotal_recurring_price>$348.00</subtotal_recurring_price>
        <total_title>Total</total_title>
        <monthly>
            <subtotal_price>$9,599.88</subtotal_price>
            <subtotal_recurring_frequency>Monthly</subtotal_recurring_frequency>
            <subtotal_recurring_price>$348.00</subtotal_recurring_price>
            <total_title>Total</total_title>
            <items>
                <catalog_item_id>0d08837237153000158bbfc8bcbe5d02</catalog_item_id>
                <variables>
                    <Monthly data allowance>500MB</Monthly data allowance>
                    <Storage>16GB</Storage>
                    <Color>Black</Color>
                    <Allocated carrier>AT & T Mobility</Allocated carrier>
                    <Contract duration>18 Months</Contract duration>
                </variables>
                <quantity>12</quantity>
                <localized_price>$799.99</localized_price>
                <price>$799.99</price>
                <recurring_frequency>Monthly</recurring_frequency>
                <localized_recurring_price>$30.00</localized_recurring_price>
                <recurring_price>$29.00</recurring_price>
                <item_name>Apple iPhone 5</item_name>
                <cart_item_id>a21ffdb0db71120076861150f0b8f560</cart_item_id>
                <delivery_time>2 Days</delivery_time>
            </items>
            <show_subtotal_price>true</show_subtotal_price>
            <subtotal_title>Subtotal</subtotal_title>
        </monthly>
        <show_subtotal_price>true</show_subtotal_price>
        <subtotal_title>Subtotal</subtotal_title>
    </result>
</root>

Service Catalog API - POST /sn_sc/servicecatalog/cart/checkout

This method retrieves the checkout cart details based on the two-step checkout process enabled or disabled. If the user enables two-step checkout, the method returns cart order status and all the information required for two-step checkout. If the user disables two-step checkout, the method checks out the cart and returns the request number and request order ID.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/cart/checkout

Default URL: /api/sn_sc/servicecatalog/cart/checkout

Supported request parameters

Table 61. 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 62. Request headers
Header Description
None
Table 63. 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 64. Status codes
Status code Description
200 Indicates that the request completed successfully. Returns the cart status with the checkout status of the items in the cart.
400 Indicates that the cart is empty and cannot check out.

Request body

The API accepts these JSON or XML elements in the request body.

Table 65. Elements accepted in the request body
Element Description
None

Response body

If two-step checkout is enabled, the API returns these JSON or XML elements in the response body to describe the order status page.

Table 66. Elements returned in the response body for two-step checkout
Element Description
cart_id Specifies the sys_id of the cart.
subtotal_price Specifies the subtotal of the cart.
subtotal_recurring_frequency Specifies the recurring frequency subtotal of the cart.
subtotal_recurring_price Specifies the recurring price subtotal of the cart.
total_title Specifies the title for total field on page.
subtotal_price Specifies the subtotal of the current frequency block.
subtotal_recurring_frequency Specifies the recurring frequency subtotal of the current frequency block.
subtotal_recurring_price Specifies the recurring price subtotal of the current frequency block
total_title Specifies the title for total field on the current frequency block.
items Array consisting of details of all the items in the cart.
  • catalog_item_id: sys_id of the item in the cart.
  • variables:Object consisting of all the variable names and corresponding values for the item in the cart.
  • quantity: Quantity of the item in the cart.
  • localized_price: Price of the item in local currency.
  • price: Price of the item.
  • localized_recurring_price: Recurring price of the item in local currency.
  • recurring_price: Recurring price of the item.
  • recurring_frequency: Recurring frequency of the item.
  • item_name: Name of the item in the cart.
  • cart_item_id:sys_id of the item in the cart.
  • delivery_time:Delivery time of the item.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/servicecatalog/cart/checkout" \
--request POST \
--header "Accept:application/json" \
--user 'admin':'admin'
<!-- This example response is returned when two-step checkout is disabled -->
{
    "result": {
        "request_number": "REQ0010009",
        "request_id": "6e240197db21120064301150f0b8f5be"
    }
}

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/servicecatalog/cart/checkout'

# 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.post(url, auth=(user, pwd), headers=headers  )

# 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)
<!-- This example response is returned when two-step checkout is enabled -->
<?xml version="1.0" encoding="UTF-8" ?>
<root>
    <result>
        <cart_id>616ebdb8db71120076861150f0b8f552</cart_id>
        <subtotal_price>$9,599.88</subtotal_price>
        <subtotal_recurring_frequency>Monthly</subtotal_recurring_frequency>
        <subtotal_recurring_price>$348.00</subtotal_recurring_price>
        <total_title>Total</total_title>
        <delivery_address>
Brasilia, 
Brasil</delivery_address>
        <special_instructions></special_instructions>
        <requested_for_user>System Administrator</requested_for_user>
        <monthly>
            <subtotal_price>$9,599.88</subtotal_price>
            <subtotal_recurring_frequency>Monthly</subtotal_recurring_frequency>
            <subtotal_recurring_price>$348.00</subtotal_recurring_price>
            <total_title>Total</total_title>
            <items>
                <catalog_item_id>0d08837237153000158bbfc8bcbe5d02</catalog_item_id>
                <variables>
                    <Monthly data allowance>500MB</Monthly data allowance>
                    <Storage>16GB</Storage>
                    <Color>Black</Color>
                    <Allocated carrier>AT & T Mobility</Allocated carrier>
                    <Contract duration>18 Months</Contract duration>
                </variables>
                <quantity>12</quantity>
                <localized_price>$799.99</localized_price>
                <price>$799.99</price>
                <recurring_frequency>Monthly</recurring_frequency>
                <localized_recurring_price>$30.00</localized_recurring_price>
                <recurring_price>$29.00</recurring_price>
                <item_name>Apple iPhone 5</item_name>
                <cart_item_id>a21ffdb0db71120076861150f0b8f560</cart_item_id>
                <delivery_time>2 Days</delivery_time>
            </items>
            <show_subtotal_price>true</show_subtotal_price>
            <subtotal_title>Subtotal</subtotal_title>
        </monthly>
        <show_subtotal_price>true</show_subtotal_price>
        <subtotal_title>Subtotal</subtotal_title>
    </result>
</root>

Service Catalog API - POST /sn_sc/servicecatalog/cart/submit_order

This method checks out the user cart, whether two-step parameter is enabled or disabled.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/cart/submit_order

Default URL: /api/sn_sc/servicecatalog/cart/submit_order

Supported request parameters

Table 67. 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 68. Request headers
Header Description
None
Table 69. 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 70. Status codes
Status code Description
200 Indicates that the request completed successfully and the items in the cart are successfully checked out.
400 Indicates that the user cart is empty.

Request body

The API accepts these JSON or XML elements in the request body.

Table 71. Elements accepted in the request body
Element Description
None

Response body

The API returns these JSON or XML elements in the response body.

Table 72. Response body values
Parameter Description
request_number Number of the request generated.
request_id sys_id of the order request generated.

Sample cURL request

curl "https://instance.service-now.com /api/sn_sc/v1/servicecatalog/cart/submit_order " \
--request POST \
--header "Accept:application/json" \
--user 'admin':'admin'
{
    "result": {
        "request_number": "REQ0010010",
        "request_id": "f89ed597db21120064301150f0b8f5ff"
    }
}

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/cart/submit_order '

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

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

# Do the HTTP request
response = requests.post(url, auth=(user, pwd), headers=headers  )

# 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)
<?xml version="1.0" encoding="UTF-8" ?>
<result>
    <request_number>REQ0010010</request_number>
    <request_id>f89ed597db21120064301150f0b8f5ff</request_id>
</result>

Service Catalog API - POST /sn_sc/servicecatalog/items/{sys_id}/add_to_cart

This method adds an item to the cart of the current user.

URL format

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

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

Supported request parameters

Table 73. 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 74. Request headers
Header Description
None
Table 75. 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 76. Status codes
Status code Description
200 Indicates that the request completed successfully and the item is added to the cart. And the response contains all the details of the items currently in the cart.
400 The following errors can occur:
  • Invalid quantity value:Indicates that either the sysparm_quantity parameter is not provided or contains invalid value.
  • Security constraints prevent ordering of Item:Indicates that either the Cart Item ID specified in the path parameters is either invalid or the user does not have access to the item.
  • Mandatory Variables are required:Indicates that one or more of the mandatory variable values is not provided in the request.

Request body

The API requires these JSON or XML elements in the request body to specify the content of the item you want to add to the cart.

Table 77. Elements required in the request body
Element Description
sysparm_quantity Specifies the quantity of the item to be added to the cart. It is mandatory to provide this parameter and make sure that it is a non-negative number.
variables Object consisting of all variable names and their corresponding valid values. Provide values for all the mandatory variables, as shown in the following example.

Response body

The API returns these JSON or XML elements in the response body to describe the contents of the cart.

Table 78. Elements returned in the response body
Element Description
cart_id Specifies the sys_id of the cart.
subtotal Specifies the subtotal of the items.
items Array consisting of details of all the items in the cart.
catalog_item_id Specifies the sys_id of the item in the cart.
quantity Specifies the quantity of the item in the cart.
localized_price Specifies the price of the item in local currency of the user.
price Specifies the price of the item.
localized_recurring_price Specifies the recurring price of the item in local currency of the user.
recurring_price Specifies the recurring price of the item.
item_name Specifies the name of the item in the cart.
cart_item_id Specifies the sys_id of the item in the cart.

Sample cURL request and response

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/items/0d08837237153000158bbfc8bcbe5d02/add_to_cart" \
--request POST \
--header "Accept:application/json" \
--user 'admin':'admin'
{
   "result":{
      "cart_id":"0951c597db21120064301150f0b8f5cf",
      "subtotal":"$1,599.98",
      "items":[
         {
            "catalog_item_id":"0d08837237153000158bbfc8bcbe5d02",
            "quantity":"2",
            "localized_price":"$799.99",
            "price":"$799.99",
            "recurring_frequency":"Monthly",
            "localized_recurring_price":"$30.00",
            "recurring_price":"$29.00",
            "item_name":"Apple iPhone 5",
            "cart_item_id":"ac61c597db21120064301150f0b8f5f9"
         }
      ]
   }
}

Sample Python request and response

#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/0d08837237153000158bbfc8bcbe5d02/add_to_cart'

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

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

# Do the HTTP request
response = requests.post(url, auth=(user, pwd), headers=headers  )

# 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)
<?xml version="1.0" encoding="UTF-8"?>
<response>
    <result>
        <cart_id>818245d7db21120064301150f0b8f5ba</cart_id>
        <subtotal>$1,599.98</subtotal>
        <items>
            <catalog_item_id>0d08837237153000158bbfc8bcbe5d02</catalog_item_id>
            <quantity>2</quantity>
            <localized_price>$799.99</localized_price>
            <price>$799.99</price>
            <recurring_frequency>Monthly</recurring_frequency>
            <localized_recurring_price>$30.00</localized_recurring_price>
            <recurring_price>$29.00</recurring_price>
            <item_name>Apple iPhone 5</item_name>
            <cart_item_id>ab82c597db21120064301150f0b8f5fa</cart_item_id>
        </items>
    </result>
</response>

Service Catalog API - POST /sn_sc/servicecatalog/items/{sys_id}/add_to_wishlist

This method adds an item to the wish list cart.

URL format

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

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

Supported request parameters

Table 79. 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 80. Request headers
Header Description
None
Table 81. 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 82. Status codes
Status code Description
200 Indicates that the request completed successfully. The item is added to wish list.
400 Indicates a failed request. Invalid request data or the user cannot add item to the wish list.

Sample cURL request

curl "http://localhost/api/sn_sc/servicecatalog/items/04b7e94b4f7b4200086eeed18110c7fd/add_to_wishlist" \
        --request POST \
        --header "Accept:application/json" \
        --header "Content-Type:application/json" \
        --data "{\"sysparm_quantity\":\"1\"}" \
        --user 'admin':'admin'
      
{
        "result": {
        "cart_id": "02a559a7c3b02200d68d3b0ac3d3ae5d",
        "items": [
        {
        "catalog_item_id": "04b7e94b4f7b4200086eeed18110c7fd",
        "variables": {
        "Adobe Photoshop": "",
        "Adobe Acrobat": "",
        "Optional Software": "",
        "Additional software requirements": ""
        },
        "quantity": "1",
        "localized_price": "$1,100.00",
        "price": "$1,100.00",
        "recurring_frequency": "Annually",
        "localized_recurring_price": "$100.00",
        "recurring_price": "$100.00",
        "item_name": "Standard Laptop &",
        "cart_item_id": "d31be364c3012200d68d3b0ac3d3aecf",
        "delivery_time": "5 Days"
        }
        ]
        }
        }

Sample Python request

#Need to install requests package for python
        #easy_install requests
        import requests
        
        # Set the request parameters
        url = 'http://localhost/api/sn_sc/servicecatalog/items/04b7e94b4f7b4200086eeed18110c7fd/add_to_wishlist'
        
        # 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.post(url, auth=(user, pwd), headers=headers ,data="{\"sysparm_quantity\":\"1\"}")
        
        # 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)
<?xml version="1.0" encoding="UTF-8”?>
        <response>
          <result>
            <cart_id>02a559a7c3b02200d68d3b0ac3d3ae5d</cart_id>
            <items>
              <variables>  
                <Adobe Photoshop></Adobe Photoshop>  
                <Adobe Acrobat></Adobe Acrobat>  
                <Optional Software></Optional Software>  
                <Additional software requirements></Additional software requirements>
              </variables>
            <catalog_item_id>04b7e94b4f7b4200086eeed18110c7fd</catalog_item_id>         
            <quantity>1</quantity>         
            <localized_price>$1,100.00</localized_price>         
            <price>$1,100.00</price>        
            <recurring_frequency>Annually</recurring_frequency>        
            <localized_recurring_price>$100.00</localized_recurring_price>  
            <recurring_price>$100.00</recurring_price>         
            <item_name>Standard Laptop</item_name>        
            <cart_item_id>d31be364c3012200d68d3b0ac3d3aecf</cart_item_id>         
            <delivery_time>5 Days</delivery_time>
          </items>
        </result>
        </response>

Service Catalog API - POST /sn_sc/servicecatalog/items/{sys_id}/checkout_guide

This method retrieves an array of contents requested for checkout.

URL format

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

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

Supported request parameters

Table 83. 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 84. 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 85. Status codes
Status code Description
200 Indicates that the request has completed successfully.
  • Is not two-step: Items are added to cart and cart contents are returned.
  • Is two-step: Returns the request number and request sys_id after checkout.
400 Indicates that the request is invalid. Could be due to one of the following reasons:
  • One or more items sent do not exist.
  • User does not have access to one or more of the items.
  • Mandatory variables of one or more items have not been answered. (Only variables defined as mandatory are honored.)
  • Quantity value is sent and is not a positive integer.
500 Service error. Internal error during checkout.

Request body

The API requires these JSON or XML elements in the request body to specify a checkout guide.

Table 86. Elements required in the request body
Element Description
Items Array of items requested for checkout. Each item is a JSON object with the following parameters:
  • sys_id: ID of the item, which is a required parameter.
  • variables: JSON object of variable name value pairs.
  • sysparam_quantity: Quantity of item. If not specified, the default value is 1.

Response body

If two-step verification is false, the API returns these JSON or XML elements in the response body to describe the order status.

Table 87. Elements returned in the response body when two-step checkout is false
Element Description
cart_id Specifies the sys_id of the cart.
subtotal_price Specifies the subtotal of the cart.
subtotal_recurring_frequency Specifies the recurring frequency subtotal of the cart.
subtotal_recurring_price Specifies the recurring price subtotal of the cart.
total_title Specifies the title for total field on page.
subtotal_price Specifies the subtotal of the current frequency block.
subtotal_recurring_frequency Specifies the recurring frequency subtotal of the current frequency block.
subtotal_recurring_price Specifies the recurring price subtotal of the current frequency block
total_title Specifies the title for total field on the current frequency block.
items Array consisting of details of all the items in the cart.
  • catalog_item_id: sys_id of the item in the cart.
  • variables:Object consisting of all the variable names and corresponding values for the item in the cart.
  • quantity: Quantity of the item in the cart.
  • localized_price: Price of the item in local currency.
  • price: Price of the item.
  • localized_recurring_price: Recurring price of the item in local currency.
  • recurring_price: Recurring price of the item.
  • recurring_frequency: Recurring frequency of the item.
  • item_name: Name of the item in the cart.
  • cart_item_id:sys_id of the item in the cart.
  • delivery_time:Delivery time of the item.

If two-step verification is true, the API returns these JSON or XML elements in the response body to describe the request.

Table 88. Elements returned in the response body when two-step checkout is true
Element Description
request_number Specifies the request record number.
request_id Specifies the sys_id of the request.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/v1/servicecatalog/items/6690750f4f7b4200086eeed18110c761/checkout_guide" \
--request POST \
--header "Accept:application/json"\
--header "Content-Type:application/json" \
--data "{\"items\":[{
  \"sys_id\":\"04b7e94b4f7b4200086eeed18110c7fd\",
  \"variables\":{
    \"acrobat\":\"true\",
    \"Additional_software_requirements\":\"MS Office 2007\"
  },
  \"sysparm_quantity\":\"3\"
},
{
  \"sys_id\":\"e1be6dcb4f7b4200086eeed18110c74c\"
},
{
  \"sys_id\":\"186d917a6fab7980575967ddbb3ee4f2\",
  \"variables\":{
    \"new_email\":\"abel.tuter@example.com\"
  }
},
{
  \"sys_id\":\"8b3ae7fedc1be1004ece5c08239e522b\"
},
{
  \"sys_id\":\"962967674ff38200086eeed18110c7e7\",
  \"variables\":{
    \"ergonomic_office\":\"Office chair should have lumbar support\"
  }
}]}" \
--user 'admin':'admin'
<!--Case-1: if two-step is false:-->
{
  "result": {
    "cart_id": "0d8c7a32c3211200d68d3b0ac3d3aeba",
    "subtotal_price": "$3,350.00",
    "subtotal_recurring_frequency": "",
    "subtotal_recurring_price": "$300.00",
    "total_title": "Total",
    "monthly": {
      "subtotal_price": "$50.00",
      "subtotal_recurring_frequency": "Monthly",
      "subtotal_recurring_price": "$0.00",
      "total_title": "Total",
      "items": [
        {
          "catalog_item_id": "90af095bcd38798071a208d710d1b64f",
          "variables": {},
          "quantity": "1",
          "localized_price": "$50.00",
          "price": "$50.00",
          "recurring_frequency": "Monthly",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "Belkin iPad Mini Case",
          "cart_item_id": "cb6e485fc3211200d68d3b0ac3d3ae35",
          "delivery_time": "2 Days"
        }
      ],
      "show_subtotal_price": "true",
      "subtotal_title": "Subtotal"
    },
    "none": {
      "subtotal_price": "-",
      "subtotal_recurring_frequency": "",
      "subtotal_recurring_price": "$0.00",
      "total_title": "Total",
      "items": [
        {
          "catalog_item_id": "186d917a6fab7980575967ddbb3ee4f2",
          "variables": {
            "Preferred Email address": "abel.tuter@example.com"
          },
          "quantity": "1",
          "localized_price": "$0.00",
          "price": "$0.00",
          "recurring_frequency": "",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "New Email Account",
          "cart_item_id": "17c5241fc3211200d68d3b0ac3d3ae7f",
          "delivery_time": "global.Workflow"
        },
        {
          "catalog_item_id": "8b3ae7fedc1be1004ece5c08239e522b",
          "variables": {},
          "quantity": "1",
          "localized_price": "$0.00",
          "price": "$0.00",
          "recurring_frequency": "",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "Corp VPN",
          "cart_item_id": "97c5241fc3211200d68d3b0ac3d3ae7f",
          "delivery_time": "2 Days"
        },
        {
          "catalog_item_id": "e1be6dcb4f7b4200086eeed18110c74c",
          "variables": {},
          "quantity": "1",
          "localized_price": "$0.00",
          "price": "$0.00",
          "recurring_frequency": "",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "External Monitor",
          "cart_item_id": "d3c5241fc3211200d68d3b0ac3d3ae7f",
          "delivery_time": "2 Days"
        },
        {
          "catalog_item_id": "962967674ff38200086eeed18110c7e7",
          "variables": {
            "Please describe any ergonomic requirements\n\t\t": "Office chair should have lumbar support"
          },
          "quantity": "1",
          "localized_price": "$0.00",
          "price": "$0.00",
          "recurring_frequency": "",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "Desk Set Up",
          "cart_item_id": "d7c5241fc3211200d68d3b0ac3d3ae7f",
          "delivery_time": "5 Days"
        }
      ],
      "show_subtotal_price": "false",
      "subtotal_title": "Subtotal"
    },
    "yearly": {
      "subtotal_price": "$3,300.00",
      "subtotal_recurring_frequency": "Annually",
      "subtotal_recurring_price": "$300.00",
      "total_title": "Total",
      "items": [
        {
          "catalog_item_id": "04b7e94b4f7b4200086eeed18110c7fd",
          "variables": {
            "Adobe Photoshop": "",
            "Adobe Acrobat": "true",
            "Optional Software": "",
            "Additional software requirements": "MS Office 2007"
          },
          "quantity": "3",
          "localized_price": "$1,100.00",
          "price": "$1,100.00",
          "recurring_frequency": "Annually",
          "localized_recurring_price": "$100.00",
          "recurring_price": "$100.00",
          "item_name": "Standard Laptop",
          "cart_item_id": "9fc5241fc3211200d68d3b0ac3d3ae7e",
          "delivery_time": "5 Days"
        }
      ],
      "show_subtotal_price": "true",
      "subtotal_title": "Subtotal"
    },
    "show_subtotal_price": "true",
    "subtotal_title": "Subtotal"
  }
}

Case-2: if two-step is true:
{
  "result": {
    "request_number": "REQ0010001",
    "request_id": "82a7e89fc3211200d68d3b0ac3d3ae0a"
  }
}

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/checkout_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.post(url, auth=(user, pwd), headers=headers ,data="{\"items\":[{
  \"sys_id\":\"04b7e94b4f7b4200086eeed18110c7fd\",
  \"variables\":{
    \"acrobat\":\"true\",
    \"Additional_software_requirements\":\"MS Office 2007\"
  },
  \"sysparm_quantity\":\"3\"
},
{
  \"sys_id\":\"e1be6dcb4f7b4200086eeed18110c74c\"
},
{
  \"sys_id\":\"186d917a6fab7980575967ddbb3ee4f2\",
  \"variables\":{
    \"new_email\":\"abel.tuter@example.com\"
  }
},
{
  \"sys_id\":\"8b3ae7fedc1be1004ece5c08239e522b\"
},
{
  \"sys_id\":\"962967674ff38200086eeed18110c7e7\",
  \"variables\":{
    \"ergonomic_office\":\"Office chair should have lumbar support\"
  }
}]}")

# 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)
Case-1: if two-step is false:
{
  "result": {
    "cart_id": "0d8c7a32c3211200d68d3b0ac3d3aeba",
    "subtotal_price": "$3,350.00",
    "subtotal_recurring_frequency": "",
    "subtotal_recurring_price": "$300.00",
    "total_title": "Total",
    "monthly": {
      "subtotal_price": "$50.00",
      "subtotal_recurring_frequency": "Monthly",
      "subtotal_recurring_price": "$0.00",
      "total_title": "Total",
      "items": [
        {
          "catalog_item_id": "90af095bcd38798071a208d710d1b64f",
          "variables": {},
          "quantity": "1",
          "localized_price": "$50.00",
          "price": "$50.00",
          "recurring_frequency": "Monthly",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "Belkin iPad Mini Case",
          "cart_item_id": "cb6e485fc3211200d68d3b0ac3d3ae35",
          "delivery_time": "2 Days"
        }
      ],
      "show_subtotal_price": "true",
      "subtotal_title": "Subtotal"
    },
    "none": {
      "subtotal_price": "-",
      "subtotal_recurring_frequency": "",
      "subtotal_recurring_price": "$0.00",
      "total_title": "Total",
      "items": [
        {
          "catalog_item_id": "186d917a6fab7980575967ddbb3ee4f2",
          "variables": {
            "Preferred Email address": "abel.tuter@example.com"
          },
          "quantity": "1",
          "localized_price": "$0.00",
          "price": "$0.00",
          "recurring_frequency": "",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "New Email Account",
          "cart_item_id": "17c5241fc3211200d68d3b0ac3d3ae7f",
          "delivery_time": "global.Workflow"
        },
        {
          "catalog_item_id": "8b3ae7fedc1be1004ece5c08239e522b",
          "variables": {},
          "quantity": "1",
          "localized_price": "$0.00",
          "price": "$0.00",
          "recurring_frequency": "",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "Corp VPN",
          "cart_item_id": "97c5241fc3211200d68d3b0ac3d3ae7f",
          "delivery_time": "2 Days"
        },
        {
          "catalog_item_id": "e1be6dcb4f7b4200086eeed18110c74c",
          "variables": {},
          "quantity": "1",
          "localized_price": "$0.00",
          "price": "$0.00",
          "recurring_frequency": "",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "External Monitor",
          "cart_item_id": "d3c5241fc3211200d68d3b0ac3d3ae7f",
          "delivery_time": "2 Days"
        },
        {
          "catalog_item_id": "962967674ff38200086eeed18110c7e7",
          "variables": {
            "Please describe any ergonomic requirements\n\t\t": "Office chair should have lumbar support"
          },
          "quantity": "1",
          "localized_price": "$0.00",
          "price": "$0.00",
          "recurring_frequency": "",
          "localized_recurring_price": "$0.00",
          "recurring_price": "$0.00",
          "item_name": "Desk Set Up",
          "cart_item_id": "d7c5241fc3211200d68d3b0ac3d3ae7f",
          "delivery_time": "5 Days"
        }
      ],
      "show_subtotal_price": "false",
      "subtotal_title": "Subtotal"
    },
    "yearly": {
      "subtotal_price": "$3,300.00",
      "subtotal_recurring_frequency": "Annually",
      "subtotal_recurring_price": "$300.00",
      "total_title": "Total",
      "items": [
        {
          "catalog_item_id": "04b7e94b4f7b4200086eeed18110c7fd",
          "variables": {
            "Adobe Photoshop": "",
            "Adobe Acrobat": "true",
            "Optional Software": "",
            "Additional software requirements": "MS Office 2007"
          },
          "quantity": "3",
          "localized_price": "$1,100.00",
          "price": "$1,100.00",
          "recurring_frequency": "Annually",
          "localized_recurring_price": "$100.00",
          "recurring_price": "$100.00",
          "item_name": "Standard Laptop",
          "cart_item_id": "9fc5241fc3211200d68d3b0ac3d3ae7e",
          "delivery_time": "5 Days"
        }
      ],
      "show_subtotal_price": "true",
      "subtotal_title": "Subtotal"
    },
    "show_subtotal_price": "true",
    "subtotal_title": "Subtotal"
  }
}

Case-2: if two-step is true:
{
  "result": {
    "request_number": "REQ0010001",
    "request_id": "82a7e89fc3211200d68d3b0ac3d3ae0a"
  }
}

Service Catalog API - POST /sn_sc/servicecatalog/items/{sys_id}/submit_producer

This method creates a record and returns the Table API relative path and redirect url to access the created record.

URL format

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

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

Supported request parameters

Table 89. Parameters
Parameter Description
sysparm_view Specifies the device that displays the Item:
  • Desktop(desktop)
  • Mobile(mobile)
  • Desktop and Mobile(both)

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 90. Request headers
Header Description
None
Table 91. 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 92. Status codes
Status code Description
200 Indicates successful request and returns the response object consisting of Table API and url to access the created record.
404 Requested resource cannot be found.
400 Request is not processed due to incorrect request message.
500 Internal error.

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/servicecatalog/items/3f1dd0320a0a0b99000a53f7604a2ef9/submit_producer" \
--request POST \
--header "Accept:application/json"\
--header "Content-Type:application/json" \
--data "{'variables':{'urgency':'2','comments':'This is sample incident'}}" \
--user 'admin':'admin'
{
"result": {
"record": "api/now/table/incident/1584f89767211200f579794717415a79,
"redirect_url": "incident.do?sys_id=1584f89767211200f579794717415a79&sysparm_view=ess"
}
}

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/servicecatalog/items/3f1dd0320a0a0b99000a53f7604a2ef9/submit_producer'
# Eg. User name="admin", Password="admin" for this code sample.
user = admin'
pwd = admin'

# Set proper headers
headers = {"Content-Type":"application/xml","Accept":"application/xml}
response = requests.post(url, auth=(user, pwd), headers=headers ,data="{'variables':{'urgency':'2','comments':'This is sample incident'}}")
# 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)
<?xml version="1.0" encoding="UTF-8"?>
  <response>
    <result>
<record>api/now/table/incident/6db6f89767211200f579794717415a7a</record>
<redirect_url>incident.do?sys_id=6db6f89767211200f579794717415a7a&amp;sysparm_view=ess</redirect_url>
</result>
</response>

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 93. 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 94. Request headers
Header Description
None
Table 95. 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 96. 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.

Request body

The API requires these JSON or XML elements in the request body to specify a submit guide.

Table 97. Elements required in the request body
Element Description
Variables Array of variables requested for an item. Each variable is a JSON object consisting of variable name and value pairs.

Response body

The API returns these JSON or XML elements in the response body to describe the matching catalog items.

Table 98. Elements returned in the response body
Element Description
name Name of the catalog Item.
sys_id SysID of the catalog item.
type Item type can be:
  • catalog item
  • record producer item
  • order guide
short_description Text on the service catalog homepage or search results page, or the title on the order form of the catalog item.
description Full description of catalog item.
icon Path of the image that appears as an icon beside the catalog item.
category List of categories that the item belongs and each category title and sys_id of the category.
show_price A Boolean value, if true, returns the following details.
  • price
  • localized_price
  • recurring_price
  • localized_recurring_price
  • recurring_frequency
  • local_currency
  • price_currency
  • recurring_price_currency
catalogs List of all the catalogs the item belongs and each catalog title and sys_id of the catalog.
variables List of all the variables of the catalog item.
ui_policy List of all Catalog UI policies defined on the catalog item.
client_script List of all the catalog client scripts defined on the catalog item.
data_lookup Array of data lookups defined on the catalog item.

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