Skip to content

Catalog Category — Detail

Returns a single category record by ID, including the full translations array (every locale present in the database) and the list of filterable attribute IDs configured for the category.

This is the read endpoint to call when an admin needs the complete metadata for a category — e.g. when opening the edit form in the Catalog → Categories UI.

Endpoint

EndpointMethodAuthentication
/api/admin/catalog/categories/{id}GETAdmin Bearer token

{id} must be a positive integer. Non-numeric values are rejected by a route requirement (\d+) — this prevents the {id} segment from matching the /tree path of the tree endpoint.

Path Parameter

ParameterTypeRequiredDescription
idintegerYesThe numeric category ID

Response Shape

The response is a single JSON object (not wrapped in { data }) with the following fields:

FieldTypeDescription
idintegerCategory ID
positionintegerDisplay order position
statusinteger1 = enabled, 0 = disabled
parentIdinteger|nullParent category ID; null for root nodes
displayModestring|nullCategory display mode (e.g. products_and_description)
logoUrlstring|nullStorage URL for the category logo; null if not set
bannerUrlstring|nullStorage URL for the category banner; null if not set
namestring|nullCategory name in the current app locale
slugstring|nullURL slug in the current app locale
descriptionstring|nullCategory description in the current app locale
localestring|nullApp locale used for the top-level name/slug/description fields
createdAtstring|nullISO 8601 creation timestamp
updatedAtstring|nullISO 8601 last-update timestamp
translationsarrayAll locale translations (see below)
filterableAttributeIdsarray|nullInteger IDs of attributes configured as filterable for this category

translations[] item shape

Each entry in the translations array corresponds to one locale row in category_translations:

FieldTypeDescription
localestringLocale code (e.g. en, fr)
namestring|nullCategory name in this locale
slugstring|nullURL slug in this locale
descriptionstring|nullDescription in this locale
metaTitlestring|nullSEO meta title in this locale
metaDescriptionstring|nullSEO meta description in this locale
metaKeywordsstring|nullSEO meta keywords in this locale

Errors

HTTPDetail
401Unauthenticated.
404{"type": "/errors/404", "title": "Not Found", "status": 404, "detail": "Category not found."}

A non-numeric {id} also returns 404. The route constrains the segment to digits, which is what keeps /catalog/categories/tree routing to the tree endpoint instead of being read as an id.

Working With This Endpoint

  • translations carries one entry per stored locale row, not just the requested one, so a multi-locale store returns them all. Unset text fields come back as the empty string "", not null.
  • The top-level name, slug, and description duplicate the requested locale's entry. They are a shortcut, not extra data — locale tells you which entry they came from.
  • filterableAttributeIds is a flat integer array. [] means none are configured; it is the layered-navigation attribute set for this category, not the products' attributes.
  • The response is a bare object, unlike the listing, which wraps rows in { data, meta }.

Released under the MIT License.