emfasemfas
Category Trees{treeId}

Update Category Tree

Creates a new category tree or updates an existing one (upsert). Returns 201 if created, 200 if updated.

PATCH
/category-trees/{treeId}
Authorization<token>

API key authentication using Bearer token format. Use: Bearer

In: header

Path Parameters

treeIdstring

Category tree identifier

Category tree data

name?string

Display name for the category tree. If omitted when creating, defaults to the identifier from the URL.

Response Body

curl -X PATCH "https://api.emfas.ai/v1/category-trees/string" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "result": {
    "id": "a1b2c3",
    "name": "Electronics"
  }
}
{
  "result": {
    "id": "a1b2c3",
    "name": "Electronics"
  }
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}