Accounting API
Taxes
Create Shipping Tax
this api endpoint (post) (post) creates a shipping tax if the request succeeds it returns a tax object docid\ ss8eayx qbyxxlmry9 rk permissions taxes create webhook event tax events docid\ jslcolrwrmjjnfzwp4ajz body parameters label string the label of the tax rate applies to string the possible values are all shippings and selected shippings rate decimal the tax rate percentage not required if amount is provided amount decimal the fixed tax amount not required if rate is provided active boolean this attribute shows whether the tax rate is currently enabled the default value is false shippings array of strings the shipping ids that you like this tax rate to apply to required if condition is set to selected shippings require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/taxes/shipping tax/create") 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 = { rate 12, label "custom shipping tax", applies to "all shipping" } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/taxes/shipping tax/create' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{ "rate" 12, "label" "custom shipping tax", "applies to" "all shippings" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { country "de", rate 12, label "custom shipping tax", applies to "all shipping" }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/taxes/shipping tax/create", 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" "custom shipping tax", "active" false, "country" null, "type" "shipping tax", "applies to" "all shippings", "postcodes" null, "states" null, "payments" null } }