Skip to main content
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": "CAT-434",
  "path": "apparel_and_accessories.clothing.dresses",
  "globalId": "CAT-12345",
  "metadata": {
    "description": "All drinks available in the marketplace.",
    "globalName": "Beers",
    "path": "Driks/Alcoholic/Beers",
    "showInStore": true
  }
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Path Parameters

category-id
string
required

ID of the category.

Minimum string length: 1

Response

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
required

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

"ahEDqV5uhjj8"

"CAT-343"

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

name
string
required

Category name. Shown in Topsort UI. Truncated to 150 characters.

Minimum string length: 1
Examples:

"Beers/Belgian"

"Sneakers"

"SALE"

parentId
string | null
deprecated

Deprecated. Use path instead. 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
Example:

"CAT-434"

path
string | null

A dot-separated string representing this category's location in the hierarchy. A child category's path is formed by appending its own identifier to its parent's path. For example, if 'clothing' has path 'apparel.clothing', its child 'dresses' would have path 'apparel.clothing.dresses'. Each segment may only contain A-Za-z0-9_.

Minimum string length: 1
Example:

"apparel_and_accessories.clothing.dresses"

globalId
string | null

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

Example:

"CAT-12345"

metadata
Metadata · object

Additional metadata for the category.

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