Inventory API
Categories
Retrieve Category
this api endpoint ( get get ) retrieves a category by id if the request succeeds, it will return a category object docid\ ghdgklvkr09tcebqg9ilu path parameters id the id of the category to retrieve require "uri" require "net/http" url = uri("https //api tamio com/v2/categories/retrieve/6e2fa1c1 35c1 416c 9b5c ea277f6ae390") 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 }; fetch("https //api tamio com/v2/categories/retrieve/6e2fa1c1 35c1 416c 9b5c ea277f6ae390", 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/categories/retrieve/6e2fa1c1 35c1 416c 9b5c ea277f6ae390' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'import requests url = "https //api tamio com/v2/categories/retrieve/6e2fa1c1 35c1 416c 9b5c ea277f6ae390" payload={} headers = { 'accept' 'application/json', 'authorization' 'bearer your token here' } response = requests request("get", url, headers=headers, data=payload) print(response text) { "status" 200, "category" { "id" "0298df64 16c4 4b42 b1c4 b9d5c8678685", "image" null, "parent id" "e6df3338 8a59 4096 b515 02e61ba97846", "slug" "washing machines", "icon" "star", "object" "category", "status" true, "name" "washing machines", "created at" 1667837076, "asset id" null, "config" { "en" { "description" null, "slug" "washing machines", "seo description" null, "seo title" null, "title" "washing machines" } }, "number of subcategories" 0, "number of products" 0, "path" "61fab71e c65f 4a02 90ff f424c6cabc69/e6df3338 8a59 4096 b515 02e61ba97846", "label path" "electronics/appliances" } }