Inventory API
Shippings
Duplicate Shipping
this api endpoint (post) (post) duplicates an existing shipping method if the request succeeds it returns a shipping object docid 5za enkucyxmck0padqau permissions shipping create webhook event shipping events docid\ now4znvtojwapfhlwflaj path parameters id the id of the shipping to duplicate require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/shippings/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/shippings/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/shippings/duplicate/00b8af22 f9f9 41f9 a71f dc8710af876f", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "shipping" { "object" "shipping", "id" "c8006b68 6619 4b3f 844c 7025ffaa5b3b", "label" "new shipping method", "currency" "eur", "destination" \[ "worldwide" ], "price" 12, "has bundling" true, "postcodes" \[], "states" \[], "sites" \[], "active" true, "bundling rules" \[ { "cost rule" "unit", "type" "range", "max" 100, "cost" 100, "from" 1, "to" 5 }, { "cost rule" "fixed", "type" "max", "max" 5, "cost" 80 } ] } }