Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi,
Is there any currency conversion API available for Thingworx ?
I want to convert one currency value into another based on user selection(with current value of currency).
Regards,
Chahat
There isn't, but shouldn't be hard to contact an external API to do that.
I tried using the below snippet :
var URL = 'https://free.currconv.com/api/v7/convert?q=USD_PHP&compact=ultra&apiKey=eb3711cd74de3b2d3c92';
//JSON object to send
var HeaderJson = {
"Content-Type" : "application/json",
"Accept" : "application/json",
"apiKey" : "eb3711cd74de3b2d3c92"
};
//var content = "application/json";
var params = {
headers: HeaderJson /* JSON */,
url: URL/* STRING */
//content: content
};
// result: JSON
var jsonresult = Resources["ContentLoaderFunctions"].PostText(params);
It is giving an error : " Error executing service test. Message :: Received fatal alert: handshake_failure - See Script Error Log for more details."