Inventory API
Categories
List all Categories
this api endpoint ( get get ) retrieves all your categories 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 category object docid\ ghdgklvkr09tcebqg9ilu the number of available results and the flags used for filtering 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 category id category id an optional identifier used for filtering results if provided, it will return the subcategories that are located in this category product id an optional identifier used for filtering results if provided, it will return the categories that are associated with the product filter optional text used for filtering products by title 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/categories/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 }; fetch("https //api tamio com/v2/categories/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/categories/list?page=1\&per page=10' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'import requests url = "https //api tamio com/v2/categories/list?page=1\&per page=10" payload={} headers = { 'accept' 'application/json', 'authorization' 'bearer your token here' } response = requests request("get", url, headers=headers, data=payload) print(response text) { "status" 200, "categories" \[ { "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, "seo description" null, "seo title" null, "slug" "washing machines", "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" } ], "total results" 1, "page" 1, "per page" 10, "sort by" null, "filter" null }