List categories
curl --request GET \
--url https://playground.runa.io/v2/product/categories \
--header 'X-Api-Key: <api-key>'import requests
url = "https://playground.runa.io/v2/product/categories"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://playground.runa.io/v2/product/categories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://playground.runa.io/v2/product/categories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://playground.runa.io/v2/product/categories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://playground.runa.io/v2/product/categories")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://playground.runa.io/v2/product/categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"categories": [
{
"code": "beauty-and-lifestyle"
},
{
"code": "booksellers"
},
{
"code": "department-stores"
},
{
"code": "electricals"
},
{
"code": "entertainment"
},
{
"code": "experiences"
},
{
"code": "fashion"
},
{
"code": "food-and-drink"
},
{
"code": "home-and-diy"
},
{
"code": "jewellers"
},
{
"code": "leisure-and-sports"
},
{
"code": "mens-fashion"
},
{
"code": "prepaid-card"
},
{
"code": "supermarkets"
},
{
"code": "toys-and-games"
},
{
"code": "travel"
},
{
"code": "womens-fashion"
}
]
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}List categories
Get a list of all possible product categories
GET
/
product
/
categories
List categories
curl --request GET \
--url https://playground.runa.io/v2/product/categories \
--header 'X-Api-Key: <api-key>'import requests
url = "https://playground.runa.io/v2/product/categories"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://playground.runa.io/v2/product/categories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://playground.runa.io/v2/product/categories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://playground.runa.io/v2/product/categories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://playground.runa.io/v2/product/categories")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://playground.runa.io/v2/product/categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"categories": [
{
"code": "beauty-and-lifestyle"
},
{
"code": "booksellers"
},
{
"code": "department-stores"
},
{
"code": "electricals"
},
{
"code": "entertainment"
},
{
"code": "experiences"
},
{
"code": "fashion"
},
{
"code": "food-and-drink"
},
{
"code": "home-and-diy"
},
{
"code": "jewellers"
},
{
"code": "leisure-and-sports"
},
{
"code": "mens-fashion"
},
{
"code": "prepaid-card"
},
{
"code": "supermarkets"
},
{
"code": "toys-and-games"
},
{
"code": "travel"
},
{
"code": "womens-fashion"
}
]
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}{
"type": "not-found",
"message": "The requested resource was not found",
"help": "Please check the resource ID and try again."
}Returns a list of all possible product categories, these correspond to the
categories field in the list products and get product details endpoints.Authorizations
Headers
The dated version of the API, if not specified a default is used. See API versioning for more information.
Response
A list of all possible product categories
Show child attributes
Show child attributes
Example:
[ { "code": "beauty-and-lifestyle" }, { "code": "booksellers" }, { "code": "department-stores" }, { "code": "electricals" }, { "code": "entertainment" }, { "code": "experiences" }, { "code": "fashion" }, { "code": "food-and-drink" }, { "code": "home-and-diy" }, { "code": "jewellers" }, { "code": "leisure-and-sports" }, { "code": "mens-fashion" }, { "code": "prepaid-card" }, { "code": "supermarkets" }, { "code": "toys-and-games" }, { "code": "travel" }, { "code": "womens-fashion" } ]
Was this page helpful?
⌘I