Service catalog POST API Parameters

amu
Tera Contributor

I am using OOB Service catalog Rest API : 

POST https://nmldev.service-now.com/api/sn_sc/servicecatalog/items/{sys_id}/order_now

to create request in ServiceNow. As part of the payload we are passing below parameters. 

 

"sysparm_item_guid": "",
"get_portal_messages": "true",
"sysparm_no_validation": "true",
"engagement_channel": "sp",
"referrer": null

        "sysparm_quantity": "1",

 

Can anyone explain why we need these parameters as part of the payload. What is the relevance of these parameters.

 

1 REPLY 1

Prabu Velayutha
Mega Sage
Mega Sage

@amu This is an Service Catalog instance API not a direct table API, it is designed as scripted Rest API and it comes out of box for Service Catalog, CMDB etc, some of the validations are added as mandatory to verify the quality of data such as quantity and other mandatory fields. You can review this Scripted rest API code used  by the Service catalog instance API from Scripted Rest API module and check the respective method in your case it is Buy item method and Script used for validation. refer the screenshot below.

 

PrabuVelayutha_0-1693346411080.png

 

PrabuVelayutha_2-1693346456288.png

 

PrabuVelayutha_4-1693346565473.png

 

If my response helps to solve your issue. Kindly mark it as helpful & correct.