Create Service Catalog Item through REST

David32
Kilo Explorer

Hey Everyone,

I am new to ServiceNow and playing around in the Persona Developer Instance of the Demo environment that they provide. I am looking into the REST options provided in the API and I do not see an option for creating an Item under the Service Catalog option.

I see that you can GET items using /api/sn_sc/servicecatalog/items  or add items to cart, checkout items and submit the order. Is there an API call for creating a Service Catalog Item? Do I have to POST to /now/table/{tableName} ? if so, which table?

I don't know if helps, but I am using POSTMAN along with the ServiceNow REST API for all my testing/playing around.

Thanks

6 REPLIES 6

SanjivMeher
Kilo Patron
Kilo Patron

I don't think you can add a catalog item using that API. All the API exposed are for ordering a request or adding to cart or checking out a cart. But creating a Service Catalog is link creating a new functionality, which shouldn't be allowed through REST API. Because a catalog has lot of configuration such as workflow, variables, scripts etc.


Please mark this response as correct or helpful if it assisted you with your question.

David32
Kilo Explorer

I noticed that I can add an Item when I POST to  https://myinstance.service-now.com/api/now/v1/table/sc_ic_item_staging in a JSON format. From there though, it looks like I need to manually promote it in order for it to show up in the Catalog section. I am guessing it is because of what you said and it is tied into workflows and such.

Yes. If you use table api, you can insert a record to sc_cat_item table. I see a different table in your api though.

But is that a requirement, because we don't usually create a catalog item using integrations. It can mess up you Catalog, if you allow it to be created from integration.


Please mark this response as correct or helpful if it assisted you with your question.

David32
Kilo Explorer

The thought process behind all this was this:

 

1. Use third party application to "design/built" an item

2. Item is approved in third party application

3 Send item JSON through REST API to ServiceNow to place the item in the Service Catalog. 

 

Thats basically what I want to do in a nutshell.

 

I think if I can get the Item into ServiceNow I'll be happy