Passer au contenu principal
GET
/
public
/
v1
/
catalog-search-service
/
catalogs
/
categories
/
{category-id}
Get Category
curl --request GET \
  --url https://api.topsort.com/public/v1/catalog-search-service/catalogs/categories/{category-id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "name": "<string>",
  "parentId": "bneEmHKG2yUe",
  "globalId": "CAT-12345",
  "metadata": {
    "associatedProducts": 100,
    "description": "All drinks available in the marketplace.",
    "globalName": "Beers",
    "path": "Driks/Alcoholic/Beers",
    "showInStore": true
  }
}

Autorisations

Authorization
string
header
requis

A valid API key generated in Topsort's UI.

Paramètres de chemin

category-id
string
requis

ID of the category.

Minimum string length: 1

Réponse

Successful Response

Categories provide a way to organize your catalog.

Products always belong to at least one category, but can belong to more. Categories can be organized into hierarchies.

id
string
requis

Unique ID of the category. Topsort treats IDs as strings, choose any format as long as it is unique within the catalog.

Minimum string length: 1
Exemples:

"ahEDqV5uhjj8"

"CAT-343"

"52c8c83c-2f4f-4873-87a0-1ccd88273b27"

name
string
requis

Category name. Shown in Topsort UI.

Minimum string length: 1
Exemples:

"Beers/Belgian"

"Sneakers"

"SALE"

parentId
string | null

ID of the parent category. Each category can have at most one parent category, allowing categories to be organized into hierarchies.

Minimum string length: 1
Exemple:

"bneEmHKG2yUe"

globalId
string | null

Global ID of the category. This is an optional field that can be used to link the category to other marketplaces.

Exemple:

"CAT-12345"

metadata
Metadata · object

Additional metadata for the category.

Exemple:
{
"associatedProducts": 100,
"description": "All drinks available in the marketplace.",
"globalName": "Beers",
"path": "Driks/Alcoholic/Beers",
"showInStore": true
}