cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
812
Views
0
Helpful
1
Replies

Passing Variable to Make REST Call URL

Nehru Becirovic
Level 1
Level 1

I am making customer script that calls on a different API to query their Data Base and return some Client information.  

 

So far I have that working but the problem is it only works if I hard code the phone number in the URL (client lookup is done by phone number).  I have created a Get Call Contact Info to collect the incoming number and I'm storing that in a String Variable.  My question is how do I pass that variable to the URL?

 

This is what the URL looks like right now and as you can see I'm manually putting in the number.

 

"https://ppjs.legalserver.org/matter/api/caller_id_search/?number=904123456&output_format=xml"

 

 

1 Reply 1

Chintan Gajjar
Level 8
Level 8

Try

"https://ppjs.legalserver.org/matter/api/caller_id_search/?number="+ clid +"&output_format=xml" in URL where clid is the string variable holds calling number.

 

or pass it as a parameter

where

URL = "https://ppjs.legalserver.org/matter/api/caller_id_search/"

and parameters are

"number"=clid

"output_format"="XML"

 

do some normal debugging and see if you are getting the request in correct format, i am not sure if "?" is what goes into URL or not but try with having it and not having it.