Inventory API
Warehouses
List All Warehouses
this api endpoint ( get get ) retrieves all your warehouses the response is paginated; therefore, you should use the 'page' parameter for navigating through the results in subsequent requests on successful completion, it returns an array of warehouse object docid\ oxaq9ei5e3b7o2zu7hqdb the number of available results and the flags used for filtering permissions warehouses view query parameters page fetch the results from a specific page it defaults to 1 per page the number of results to fetch per page the maximum is 50, and if it defaults to 10 sort by an optional identifier used for sorting results available options are email , label , country , address , city , telephone , postcode and state product id optional identified used for filtering results it will return the warehouses that contain this product (or any of its variants) countries ( appendix docid\ kfbmx4q3dxjtduqf75yx1 ) ( example ?countries=de,ro ) a list of country codes to use for filtering if provided, it will return the warehouses located in the requested countries from appendix docid\ kfbmx4q3dxjtduqf75yx1 start date used for filtering (the date the warehouse was created) to appendix docid\ kfbmx4q3dxjtduqf75yx1 end date used for filtering (the date the warehouse was created) order determines in which order the results are returned the available options are asc (ascending) and desc (descending) the default value is desc require "uri" require "net/http" url = uri("https //api tamio com/v2/warehouses/list?page=1\&per page=10") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read body var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api tamio com/v2/warehouses/list?page=1\&per page=10", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));curl location request get 'https //api tamio com/v2/warehouses/list?page=1\&per page=10' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'{ "status" 200, "warehouses" \[ { "id" "e2ff273d 6b4f 4b2b 9b8f 968d4a3c976d", "custom id" "cus1234567", "label" "frankfurt warehouse", "address" "awesome street 1", "object" "warehouse", "city" "frankfurt", "postcode" "abc123", "email" "warehouse\@tamio com", "country" "de", "state" null, "telephone" "+123456789", "areas served" \[ "de", "ro", "us" ], "products" 0, "variants" 0 } ], "total results" 1, "page" 1, "per page" 10, "sort by" null, "filter" null }