Inventory API
Warehouses
Update Warehouse
this api endpoint (post) (post) updates an existing warehouse if the request succeeds, it returns a warehouse object docid\ oxaq9ei5e3b7o2zu7hqdb permissions warehouses edit webhook event warehouse events docid h8x uzdalbmhdw4hczur path parameters id the id of the warehouse to update body parameters label string the label of the warehouse address string the street address of the warehouse areas served array of strings ( appendix docid\ kfbmx4q3dxjtduqf75yx1 ) the countries served by this warehouse country string ( appendix docid\ kfbmx4q3dxjtduqf75yx1 ) a two letter country code (iso 3166) that represents the warehouse country email string the contact email of the warehouse city string the city where the warehouse is located at state string the state where the warehouse is located postcode string the postcode of the warehouse telephone string the warehouse's primary phone number custom id string a custom id that you can use as a reference in your system require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/warehouses/update/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" data = { label 'my warehouse', address 'awesome street 4', country 'de', city 'frankfurt', areas served \['de'], email 'john doe\@tamio com' } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/warehouses/update/00b8af22 f9f9 41f9 a71f dc8710af876f' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{"label" "my warehouse","address" "awesome street 4","email" "john doe\@plugnpaid com","country" "de","areas served" \["de"],"city" "frankfurt"}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { label 'my warehouse', address 'awesome street 4', country 'de', city 'frankfurt', areas served \['de'], email 'john doe\@tamio com' }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/warehouses/update/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" "de", "state" null, "telephone" null, "areas served" \[ "de" ], "products" 0, "variants" 0 } }