REST API Request for Catalog Item

snowblind
Tera Expert

Hi,

How do I submit a request for a catalog item via REST?  Here's why I tried:

$> curl -v -u 'snowid:snowpass' --header "Content-Type: application/json" --request POST --data-binary @Internal-SSL-Certificate-Request.json https://company.service-now.com/api/sn_sc/servicecatalog/items/cdf6d374c3d0fd90cc253bee05013113/submit_producer

That yields:

{"error":{"message":"Record Producer does not exists","detail":""},"status":"failure"}

 

1 ACCEPTED SOLUTION

That endpoint works fine with a GET, both with the GUI and curl.  That's how I know my credentials are okay.

 

The issue turns out to be that I should be using a different endpoint than the docs and GUI suggest.  For the record, this is how to order a catalog item with curl:

 

curl -v -u 'id:pass' --header "Content-Type: application/json" --request POST --data-binary @Internal-SSL-Certificate-Request.json 

 

View solution in original post

8 REPLIES 8

Sainath N
Mega Sage
Mega Sage

@snowblind : Below is the HI article that explains the steps in detail for this use case.

 

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

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Those are the steps I followed.  That didn't work.

@snowblind : Please make sure that the sys_id is correct and the service account you are using has sufficient privileges to take the action. Try to see if it works for any other catalog (just to test API call)

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Danish Bhairag2
Tera Sage
Tera Sage

Hi @snowblind ,

 

Please try this link

https://www.servicenow.com/community/itsm-forum/how-to-submit-a-record-producer-via-rest-api-explore...

 

Also make sure u have provided correct sys I'd of the record producer/catalog item

 

Thanks,

Danish