Saltar para o conteúdo 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": "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
  }
}

Autorizações

Authorization
string
header
obrigatório

A valid API key generated in Topsort's UI.

Parâmetros de caminho

category-id
string
obrigatório

ID of the category.

Minimum string length: 1

Resposta

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
obrigatório

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

"ahEDqV5uhjj8"

"CAT-343"

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

name
string
obrigatório

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

Minimum string length: 1
Exemplos:

"Beers/Belgian"

"Sneakers"

"SALE"

parentId
string | null
obsoleto

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

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

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

Exemplo:

"CAT-12345"

metadata
Metadata · object

Additional metadata for the category.

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