How to send REST API call to create RITM of catalog form?

Hritik
Tera Expert

Hi Community,

Good Days !!

PFB:

 

My requirement: To create a RITM for a Item that I have made, via REST API Call. 

I also need to send the variables values via API only. 

Hritik_0-1688636248818.png

 

 

So, I am confused in what table should I send the payload? Usually when we submit the catalog item form it creates records in "sc_request" table, which is linked to "sc_req_item".

 

How can we send the payload for custom variables on the form as well? it is stored in whole different table.

 

Kindly advice me with the solution.

 

 

Thanks in Advance,

Hritik.

4 REPLIES 4

Hemanth M1
Giga Sage
Giga Sage

Hi @Hritik ,

 

Use Service catalog api in the rest api explored and from the endpoint 

reference : https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0686272

 

or you can also use cart api if its a custom endpoint (scripted rest api)

ex: 

var cart = new Cart();
var item = cart.addItem(‘ sys id of the Catalog item’);
cart.setVariable(item, “variable name”, variable value);
var req = cart.placeOrder();

 

 

Please accept if this helps

 

Thank you,

Hemanth

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Ankur Bawiskar
Tera Patron
Tera Patron

@Hritik 

you can create after insert BR on RITM table and pick the variable values and send those in payload

OR

you can use flow designer in that RITM table and use REST Step

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

Hi @Ankur Bawiskar 

 

Would you be able to guide me with the BR and payload?

 

I am trying to send the API payload from different application to SNOW that will create RITM with dynamic values of fields of form sent by third party too.

@Hritik 

there are numerous community blogs/questions regarding this which should help you.

I would suggest you start from your side and it will be learning for you as well.

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