Category Tree Resources

Read Category Trees

Deprecated

Retrieving a category tree

get

Retrieves a category tree.

Note: By default, only published categories are retrieved.

Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]{2,15}$
Responses
chevron-right
200

The request was successful. The category tree is returned.

application/json
get
/category/{tenant}/categories/categoryTree

Retrieving the category trees

get

Retrieves the category trees.


Additional scope info

  • category.category_read_unpublished - Only required if the response should contain unpublished categories.

Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Example: saasdev2
Query parameters
showUnpublishedbooleanOptional

If set to true, not published categories are retrieved as well. Possible values:

  • true
  • false

Note: To get unpublished categories you need to have category.category_read_unpublished scope.

Default: falseExample: true
categoryIdsstring[]Optional

List of category IDs. If provided, the response returns only the category trees that include at least one of the specified categories.

Example: ["d9e4fdd0-e671-4968-9ba1-a5533a7f3b02","0f1056cc-b4b4-488b-9f95-245f6b542702"]
Header parameters
X-VersionstringRequired

To use this endpoint you have to add X-Version header with proper value to your request.

Note: The header value has to match following regular expression: ^v[1-9][0-9]?$

Example: v2Pattern: ^v[1-9][0-9]?$
Responses
chevron-right
200

The request was successful. The category tree is returned.

application/json
get
/category/{tenant}/category-trees

Searching for category trees

post

Searches for category trees.


Additional scope info

  • category.category_read_unpublished - Only required if the response should contain unpublished categories.

Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Example: saasdev2
Query parameters
showUnpublishedbooleanOptional

If set to true, not published categories are retrieved as well. Possible values:

  • true
  • false

Note: To get unpublished categories you need to have category.category_read_unpublished scope.

Default: falseExample: true
Header parameters
Content-LanguagestringOptional

The Content-Language request HTTP header defines language(s) that can be used in the payload. Request body may contain only translations that are matching the languages specified in the header. Possible values:

  • * - request body may contain translations for all languages specified in tenant configuration. This is also the default behaviour if the header is not set.
  • en, en,de, fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5 - request body may contain only translations for languages specified in the header (if they are available in tenant configuration).

Note: For category requests, localized fields (such as localizedName, localizedDescription, localizedSlug) must always be provided as maps of language codes to values, regardless of the Content-Language header value.

Default: *Example: `*`, `en`, `en,de,fr`, `en-EN`, `fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7`
X-VersionstringRequired

To use this endpoint you have to add X-Version header with proper value to your request.

Note: The header value has to match following regular expression: ^v[1-9][0-9]?$

Example: v2Pattern: ^v[1-9][0-9]?$
Body
categoryIdsstring[]Required

List of category IDs. If provided, the response returns only the category trees that include at least one of the specified categories.

Responses
chevron-right
200

The request was successful. The category tree is returned.

application/json
post
/category/{tenant}/category-trees/search

Retrieving a specific category tree

get

Retrieves a category tree for a root category with a given id.

Note: You can retrieve a category tree only for a root category. It is not possible to get a category tree for a category that lies lower in the hierarchy.


Additional scope info

  • category.category_read_unpublished - Only required if the response should contain unpublished categories.

Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Example: saasdev2
categoryIdstringRequired

A unique identifier of a root category, generated when the category is created.

Example: 12a24ba108-e6fd-4139-b831-5ac5fded6d34
Query parameters
showUnpublishedbooleanOptional

If set to true, not published categories are retrieved as well. Possible values:

  • true
  • false

Note: To get unpublished categories you need to have category.category_read_unpublished scope.

Default: falseExample: true
Header parameters
Content-LanguagestringOptional

The Content-Language request HTTP header defines language(s) that can be used in the payload. Request body may contain only translations that are matching the languages specified in the header. Possible values:

  • * - request body may contain translations for all languages specified in tenant configuration. This is also the default behaviour if the header is not set.
  • en, en,de, fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5 - request body may contain only translations for languages specified in the header (if they are available in tenant configuration).

Note: For category requests, localized fields (such as localizedName, localizedDescription, localizedSlug) must always be provided as maps of language codes to values, regardless of the Content-Language header value.

Default: *Example: `*`, `en`, `en,de,fr`, `en-EN`, `fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7`
X-VersionstringRequired

To use this endpoint you have to add X-Version header with proper value to your request.

Note: The header value has to match following regular expression: ^v[1-9][0-9]?$

Example: v2Pattern: ^v[1-9][0-9]?$
Responses
chevron-right
200

The request was successful. The category tree is returned.

application/json
get
/category/{tenant}/category-trees/{categoryId}

Last updated

Was this helpful?