Zum Hauptinhalt springen
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
  }
}

Autorisierungen

Authorization
string
header
erforderlich

A valid API key generated in Topsort's UI.

Pfadparameter

category-id
string
erforderlich

ID of the category.

Minimum string length: 1

Antwort

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
erforderlich

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
Beispiele:

"ahEDqV5uhjj8"

"CAT-343"

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

name
string
erforderlich

Category name. Shown in Topsort UI.

Minimum string length: 1
Beispiele:

"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
Beispiel:

"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.

Beispiel:

"CAT-12345"

metadata
Metadata · object

Additional metadata for the category.

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