Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to order Catalog Items from REST API Explorer?

bUnAi
Giga Contributor

Hi,

I am trying to order a Service Catalog item using REST API Explorer.

But I don't know how to set values ​​in REST API Explorer.

So please let me know what value to enter in "Path parameters" and so on.

 

Regards,

bunai

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

please check below steps:

1) from left nav open REST API Explorer

2) from namespace select -> sn_sc

3) select buy item API

4) give sys_id of the catalog item

5) give body as RAW JSON; ensure you give your variable names; I have given group with value as group sys_id

{
        'sysparm_id': 'a96250e407d01410540bf2508c1ed014',
        'sysparm_quantity': '1',
        'variables':{
        'test': 'hello',
        'group': 'd625dccec0a8016700a222a0f7900d06'
        }

}

Buy Item (POST) -> give sys_id of the catalog item in the URL

https://instanceName.service-now.com/api/sn_sc/servicecatalog/items/a96250e407d01410540bf2508c1ed014/order_now

Request Body: highlighted in bold is sys_id of catalog item

find_real_file.png

find_real_file.png

 

 

 

find_real_file.png

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

12 REPLIES 12

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

please check below steps:

1) from left nav open REST API Explorer

2) from namespace select -> sn_sc

3) select buy item API

4) give sys_id of the catalog item

5) give body as RAW JSON; ensure you give your variable names; I have given group with value as group sys_id

{
        'sysparm_id': 'a96250e407d01410540bf2508c1ed014',
        'sysparm_quantity': '1',
        'variables':{
        'test': 'hello',
        'group': 'd625dccec0a8016700a222a0f7900d06'
        }

}

Buy Item (POST) -> give sys_id of the catalog item in the URL

https://instanceName.service-now.com/api/sn_sc/servicecatalog/items/a96250e407d01410540bf2508c1ed014/order_now

Request Body: highlighted in bold is sys_id of catalog item

find_real_file.png

find_real_file.png

 

 

 

find_real_file.png

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi,

Thank you for your detailed explanation!
I would like to ask you in addition. Where should I describe "5)"?

 

Regards,

bunai

Hi,

missed that screenshot; refer here

find_real_file.png

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi,

Thank you for your quick response!

I understand!

By the way, could you tell me how to set the variable of the Catalog Item when inputting it to the Builder?

I'm sorry to ask you many questions!

 

Regard,

bunai