Make a request to an external api in the catalog item

Latorre
Kilo Contributor

Hello, I'm trying to make a request to an external API and set the response in the field from catalog item.

Explaining:
My catalog item:
find_real_file.png
When the requester fills in the "CEP" field,the background makes a request to the
https://exemple.com/{CEP} api and the result would be placed in the "Endereço" field.
illustrative example:
find_real_file.png

What is the best way to do it?
 

 

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

This would be achievable with a combination of a Catalog Client Script using GlideAjax and a Script Include.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

2 REPLIES 2

Mark Roethof
Tera Patron
Tera Patron

Hi there,

This would be achievable with a combination of a Catalog Client Script using GlideAjax and a Script Include.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Thanks