- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2018 11:08 AM
Hi Everyone,
I'm working on a project where I need to make a REST API call to add an item to the cart and then check out the item. I'm using the REST API Explorer to build the call, but keep getting 400 Bad Request.
I thought the sys_id needed is the sys_id of the catalog item but is it something else?
I'm still relatively new to ServiceNow so the answer may be obvious and I'm just missing it.
Thanks!
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2018 12:51 PM
Did you set all the variables needed to add that item to cart? In the request body, under the raw tab, you can build it.
Take a look at these, it'll show you how.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2018 11:13 AM
Can you check the response body? It should show why its failing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2018 12:40 PM
It says....
{
"error": {
"message": "Invalid Quantity value",
"detail": ""
},
"status": "failure"
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2018 12:51 PM
Did you set all the variables needed to add that item to cart? In the request body, under the raw tab, you can build it.
Take a look at these, it'll show you how.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 01:42 PM
Thanks, Nitesh. I didn't realize I needed to add my variables in the raw.