Rest API for creating REQ and RITM

Amar121
Tera Contributor

Hi All,

 

I am trying to integrate servicenow with Java Application. The use case is once a user submit a request in the new built portal , it should trigger/call Service now APIs to create REQ ticket with associated RITMs in servicenow instance and return the response with ticket number and RITM.

 

Can anyone help me which REST API should be called to make the interaction and to create the tickets.

 

Thanks

 

3 REPLIES 3

AmishRanjan2
Mega Guru

Hi @Amar ,

You may use sn_sc service catalog api and use buy item http method to fulfill your requirement. You may use rest api explorer to give it a try. 

 

Best Regards,
Amish Ranjan

Thanks @AmishRanjan2 

 Could you help me which APIS to call from these and seq. I don't have much idea about servicenow.

/sn_sc/servicecatalog/cart/submit_order

/sn_sc/servicecatalog/items/{sys_id}/add_to_cart

or /sn_sc/servicecatalog/items/{sys_id}/submit_producer

 

Usecase is to create REQ and RITM tickets from 3rd party application in Servicenow where user can submit one req for multiple software/tool installationwith multiple RITMs.

 

We would be creating new catalog in service now. How to make sure each of these request goes to that catalog only or do we need to create new orderguide for this. I am new in servicenow .So don't have much knowledge.

 

Any java Rest API example?

 

Amar121
Tera Contributor

I am actually confused. I am not able to find a single Rest API that returns REQ and RITM in single JSON response.

Please correct me if my understanding is correct on below API Calls:

->/sn_sc/servicecatalog/items/{sys_id}/submit_producer  

or do I need to call

/sn_sc/servicecatalog/items/{sys_id}/add_to_cart  and then /sn_sc/servicecatalog/cart/submit_order ??

 

Usecase is like to create different RITM request for different software installation with  one REST API call.

Also do we have any sample Java Code REST API to help.