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": "bneEmHKG2yUe",
  "globalId": "CAT-12345",
  "metadata": {
    "associatedProducts": 100,
    "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.

Minimum string length: 1
Exemplos:

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

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

Exemplo:

"CAT-12345"

metadata
Metadata · object

Additional metadata for the category.

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