Retrieving a category’s details

GET {{api-url}}/category/{{tenant}}/categories/{{categoryId}}?showUnpublished=false

Retrieves a specified category and its details.


Required scopes

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

Request Params

KeyDatatypeRequiredDescription
showUnpublishedbooleanIf 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. |

HEADERS

KeyDatatypeRequiredDescription
Accept-LanguagestringList of properties used to project and sort the results, separated by commas.
Possible values:
  • * - each internationalized field is returned as a map containing all available (specified in tenant configuration) translations.
  • en, en,de - each internationalized field is returned as a map containing translation specified by a header value. If translation is not supported by tenant configuration then exception is thrown. First language is the one with highest priority.
  • fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5 - each internationalized field is returned as a map containing translation specified by a header value. If translation is not supported by tenant configuration then exception is thrown. | | X-Version | string | | (Required) 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]?$ | | Accept | string | | |

RESPONSES

status: OK

{"id":"084bcaf6-66b8-4ddd-9489-65c5f6449e94","localizedName":{"de":"Getränke","en":"Beverages"},"localizedDescription":{"de":"Alkoholfreie und alkoholische Getränke","en":"Non-alcoholic and alcoholic drinks"},"localizedSlug":{"de":"Bodenpflege","en":"Beverages"},"name":"Beverages","description":"Non-alcoholic and alcoholic drinks","code":"Beverages","ecn":["123A","234B","345C"],"validity":{"from":"2022-01-05T12:44:51.871Z","to":"2025-12-05T23:59:59Z"},"position":1,"published":true,"metadata":{"version":1,"createdAt":"2022-03-11T09:05:22.461Z","modifiedAt":"2022-03-11T09:05:22.461Z"}}