curl --request GET \
--url https://api.sentralbee.app/v1/products/categories/{category} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sentralbee.app/v1/products/categories/{category}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sentralbee.app/v1/products/categories/{category}', 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://api.sentralbee.app/v1/products/categories/{category}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.sentralbee.app/v1/products/categories/{category}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sentralbee.app/v1/products/categories/{category}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sentralbee.app/v1/products/categories/{category}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Kaftan",
"slug": "kaftan",
"position": 123,
"product_count": 123,
"parent": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_slug": "men",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}Get a category
Resolve a single category by its slug or its id. When the path segment is a
UUID an id match wins over a same-shaped slug.
curl --request GET \
--url https://api.sentralbee.app/v1/products/categories/{category} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sentralbee.app/v1/products/categories/{category}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sentralbee.app/v1/products/categories/{category}', 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://api.sentralbee.app/v1/products/categories/{category}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.sentralbee.app/v1/products/categories/{category}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sentralbee.app/v1/products/categories/{category}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sentralbee.app/v1/products/categories/{category}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Kaftan",
"slug": "kaftan",
"position": 123,
"product_count": 123,
"parent": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_slug": "men",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Workspace API key. The workspace is derived from the key.
Path Parameters
The category's slug, or its UUID.
Response
The category
A product category. The taxonomy is one level deep: parent is null for a
top-level category and set on a child, and a child never has children of its own.
"Kaftan"
URL slug, unique per workspace. Address the category by this or by its id.
"kaftan"
Sort position within the taxonomy (ascending; ties broken by name).
Distinct products in this category and its children — a product in both a parent and its child counts once. Counts raw membership, so it includes products a storefront wouldn't show (drafts, hidden).
Parent category id. Null for a top-level category.
Parent category slug. Absent for a top-level category.
"men"

