Accounting API
Exchange Rates
Convert Amount
this api endpoint (post) (post) converts an amount if the request succeeds, it will return an exchange rate object docid 7lnasjpbyb2xppxz0dx8o body parameters from appendix docid\ kfbmx4q3dxjtduqf75yx1 the base currency to appendix docid\ kfbmx4q3dxjtduqf75yx1 the currency to convert the amount to price amount decimal the amount to convert require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/exchange/convert") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" data = { from "eur", to "gbp", amount 100 } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/exchange/convert' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{"from" "eur", "to" "gbp", "amount" 100 }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { from "eur", to "gbp", amount 100 }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/exchange/convert", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "amount" 100 0, "converted amount" 85, "from" "eur", "to" "gbp", "exchange rate" { "id" 2403, "from" "eur", "to" "gbp", "rate" 0 854917, "created at" "2019 10 15 12 00 53 +0000", "updated at" "2021 07 27 12 00 33 +0000" } }