How to add an attachment to a cart item using scripted REST API

mkirby528
Mega Contributor

I have created a REST API to add items and to cart and configure variables using the Cart API. I am wondering if it is possible to attach an attachment to an item via this API. On the service catalog, I have added a variable that uses a UI page to add an attachment to the item, but I am wondering if it is possible to add an attachment to an item using an API. Thanks!

1 ACCEPTED SOLUTION

mkirby528
Mega Contributor

I seem to have figured it out. While I wasn't able to directly add the attachment in my scripted API, I was able to return the RITM sys_id and use the Attachment REST api to post the attachment to that item in the sn_req_item table.

View solution in original post

5 REPLIES 5

Hi @mkirby528 ,

Can you please elaborate on how you achieved this? 

I have a requirement where i need to place an order for a catalog item using scripted rest api...

I am passing the values of catalog item variables as json through postman and a ritm is generated for same(i.e: order is successfully placed).

However there is also an attachment that is to be sent while placing an order. This is'nt working for me.

Can you please let me know your steps. Seems my requirement is similar to yours.

TIA!