Get a category
curl --request GET \
--url https://api.salesive.com/api/v1/categories/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salesive.com/api/v1/categories/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salesive.com/api/v1/categories/{id}', 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.salesive.com/api/v1/categories/{id}",
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.salesive.com/api/v1/categories/{id}"
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.salesive.com/api/v1/categories/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/categories/{id}")
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{
"status": 200,
"success": true,
"message": "Category retrieved",
"data": {
"_id": "6651ab12cd34ef56ab78cd90",
"name": "Electronics",
"slug": "electronics",
"description": "Phones, audio and accessories",
"image": "https://cdn.example.com/c/electronics.png",
"deleted": false,
"deletedAt": null,
"shop": "664f0e2a1c2b3d4e5f6a7b8c",
"createdAt": "2026-04-10T12:00:00.000Z",
"updatedAt": "2026-06-01T08:00:00.000Z",
"id": "6651ab12cd34ef56ab78cd90",
"productCount": 24
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Category not found",
"data": null
}Categories
Get a category
Retrieve a single category by id, including its item count. Requires the READ_CATEGORIES scope.
GET
/
categories
/
{id}
Get a category
curl --request GET \
--url https://api.salesive.com/api/v1/categories/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salesive.com/api/v1/categories/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salesive.com/api/v1/categories/{id}', 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.salesive.com/api/v1/categories/{id}",
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.salesive.com/api/v1/categories/{id}"
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.salesive.com/api/v1/categories/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/categories/{id}")
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{
"status": 200,
"success": true,
"message": "Category retrieved",
"data": {
"_id": "6651ab12cd34ef56ab78cd90",
"name": "Electronics",
"slug": "electronics",
"description": "Phones, audio and accessories",
"image": "https://cdn.example.com/c/electronics.png",
"deleted": false,
"deletedAt": null,
"shop": "664f0e2a1c2b3d4e5f6a7b8c",
"createdAt": "2026-04-10T12:00:00.000Z",
"updatedAt": "2026-06-01T08:00:00.000Z",
"id": "6651ab12cd34ef56ab78cd90",
"productCount": 24
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Category not found",
"data": null
}Returns one category within the store, including a
productCount of the catalog items assigned to it (products, foods and services). The store is bound to your app token server-side — never send a shop id.Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.
Path Parameters
The category id.
Response
The requested category.
Standard Salesive response envelope. The operation-specific payload is carried in data.
Was this page helpful?

