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 1. Parameters
Parameter Description


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
Table 3. Response headers
Header Description

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
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 5. 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 6. 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 "" \
--request POST \
--header "Accept:application/json" \
--user 'admin':'admin'
                "Monthly data allowance":"500MB",
                "Allocated carrier":"AT & T Mobility",
                "Contract duration":"18 Months"
               "item_name":"Apple iPhone 5",
               "delivery_time":"2 Days"			//	Check this

Sample Python request

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

# Set the request parameters
url = ''

# 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 =, 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())

# Decode the JSON response into a dictionary and use the data
data = response.json()
<?xml version="1.0" encoding="UTF-8" ?>
                    <Monthly data allowance>500MB</Monthly data allowance>
                    <Allocated carrier>AT & T Mobility</Allocated carrier>
                    <Contract duration>18 Months</Contract duration>
                <item_name>Apple iPhone 5</item_name>
                <delivery_time>2 Days</delivery_time>