can't create a catalog item using REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Ankur Bawiskar I'm trying to submit a request using Postman with the API and payload below, but it's generating a cart ID instead of a request number. I've followed your instructions in the old post.
Regards,
Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Chandra31 ,
You can try like this
1. POST Method:
POST https://instancename.service-now.com/api/sn_sc/servicecatalog/items/{sys_id}/order_now
2. Path parameters
sys_id : 'sys_id_of_catalog_item'
3. Request Body
{
"sysparm_quantity": "1",
"variables": { // add varibles list here
"variable_name_1": "value_1",
"variable_name_2": "value_2"
}
}
sample response body will be like this
{
"result": {
"sys_id": "69026c96c3b33210c7311412b40131b7",
"number": "REQ0010172",
"request_number": "REQ0010172",
"parent_id": null,
"request_id": "69026c96c3b33210c7311412b40131b7",
"parent_table": "task",
"table": "sc_request"
}
}
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @Chandra31 ,
can you try this
API endpoint : POST
https://instancename.service-now.com/api/sn_sc/servicecatalog/items/:sys_id/order_now
and then define the path value pass the sys_id.
then try to trigger the API.
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Chandra31 ,
did you define the path value pass the sys_id?.
Thanks,
BK
