REST API Attachment while ordering the catalog item

Ramu Gajula
Kilo Explorer

Dear Experts,

One of our catalog item has a mandatory requirement of attaching a file while submitting the service request. I have problem doing it through the REST API using python. Could you please guide me or point towards a doc which tells how to attach a file while submitting a service request itself through REST API. Thank you.

 

Regards,

Ramu.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I don't think that's possible using the Cart API.

You will have to make another API call and use Attachment API and pass the RITM sysId there.

Regards
Ankur

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

View solution in original post

4 REPLIES 4

Harish KM
Kilo Patron
Kilo Patron

Hi check the below links

https://community.servicenow.com/community?id=community_question&sys_id=6b30cf61db98dbc01dcaf3231f961963

https://community.servicenow.com/community?id=community_question&sys_id=dbdfd9fa1bd50014ada243f6fe4bcbfa

https://docs.servicenow.com/bundle/sandiego-application-development/page/integrate/inbound-rest/concept/c_AttachmentAPI.html

 

Regards
Harish

Ramu Gajula
Kilo Explorer

Thanks Harish.

Unfortunately, All the docs talk about attaching the file to an existing record with a sys_id . In my case, I need to create an RITM ticket with attachment. Without the attachment, I cannot submit the order. Please help.

Regards,

Ramu.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I don't think that's possible using the Cart API.

You will have to make another API call and use Attachment API and pass the RITM sysId there.

Regards
Ankur

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

Thank you, Ankur.