Inventory API
Warehouses
Duplicate Warehouse
this api endpoint (post) (post) duplicates an existing warehouse if the request succeeds, it returns the newly created warehouse object docid\ oxaq9ei5e3b7o2zu7hqdb otherwise, it will return an error permissions warehouses create webhook event warehouse events docid h8x uzdalbmhdw4hczur path parameters id the id of the warehouse to duplicate require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/warehouses/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/warehouses/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/warehouses/duplicate/00b8af22 f9f9 41f9 a71f dc8710af876f", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "warehouse" { "id" "00b8af22 f9f9 41f9 a71f dc8710af876f", "custom id" null, "label" "my warehouse", "object" "warehouse", "address" "awesome street 4", "city" "frankfurt", "postcode" null, "email" "john doe\@tamio com", "country" "my", "state" null, "telephone" null, "areas served" \[ "de" ], "products" 0, "variants" 0 } }