curl --request PUT \
--url https://api.topsort.com/public/v1/catalog-search-service/catalogs/categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"categories": [
{
"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
}
}
]
}
'{}Create or replace one or more categories in the catalog.
curl --request PUT \
--url https://api.topsort.com/public/v1/catalog-search-service/catalogs/categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"categories": [
{
"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
}
}
]
}
'{}A valid API key generated in Topsort's UI.
Categories to upsert. New categories will be created, and existing ones will be fully replaced with the provided data.
1 - 500 elementsShow child attributes
Unique ID of the category. Topsort treats IDs as strings, choose any format as long as it is unique within the catalog.
1Category name. Shown in Topsort UI.
1ID of the parent category. Each category can have at most one parent category, allowing categories to be organized into hierarchies.
1"bneEmHKG2yUe"
Global ID of the category. This is an optional field that can be used to link the category to other marketplaces.
"CAT-12345"
Successful Response
Was this page helpful?