Accounting API
Taxes
Duplicate Tax
this api endpoint (post) (post) duplicates an existing tax rate if the request succeeds, it returns the newly created tax object docid\ ss8eayx qbyxxlmry9 rk permissions taxes edit and taxes create webhook event tax events docid\ jslcolrwrmjjnfzwp4ajz path parameters id the id of the tax to duplicate require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/taxes/duplicate/00b8af22 f9f9 41f9 a71f dc8710af876f") 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" response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/taxes/duplicate/00b8af22 f9f9 41f9 a71f dc8710af876f' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'post', headers myheaders }; fetch("https //api tamio com/v2/taxes/duplicate/00b8af22 f9f9 41f9 a71f dc8710af876f", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "tax" { "object" "tax", "id" "64305b0e 92f4 46b9 b2da fa27615c3821", "rate" 12 0, "amount" 0 0, "label" "copy of custom shipping tax", "active" false, "country" null, "type" "shipping tax", "applies to" "all shippings", "postcodes" null, "states" null, "payments" null } }