Download OpenAPI specification:Download
The Category Service allows you to manage your store's categories and resources assigned to them.
Key Features:
Note:
When X-Version
header is required use v2
, otherwise the header is not necessary.
Retrieves a list of categories for a given tenant.
category.category_read_unpublished
Note: Only required if the response should contain unpublished categories.
The request was successful. The categories are returned.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
[- {
- "id": "string",
- "parentId": "string",
- "localizedName": {
- "property1": "string",
- "property2": "string"
}, - "localizedDescription": {
- "property1": "string",
- "property2": "string"
}, - "localizedSlug": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "description": "string",
- "code": "string",
- "ecn": [
- "string"
], - "Validity": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "position": 0,
- "published": true,
- "supercategoriesIds": [
- "string"
], - "mixins": { },
- "Metadata": {
- "version": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z"
}, - "media": [
- {
- "id": "345-12345",
- "contentType": "image/jpeg",
- "metadata": {
- "createdAt": "2022-12-06T06:54:36.834Z"
}, - "customAttributes": {
- "id": "345-54353",
- "height": 1234,
- "width": 1024,
- "sizeKB": 5,
- "type": "jpg",
- "name": "ima.jpg"
}
}
]
}
]
Creates a new category. Creating category as a root may be achieved by adding the 'parentId' field with a 'root' value or by not providing the 'parentId' in the payload.
category.category_create
category.category_publish
Note: The category.category_publish
scope is only required if you want to publish the category when creating it.
The category has been successfully created.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Duplicated ECN value - given ECN is already assigned to another category
{- "parentId": "056bcaf6-66b8-4ddd-9489-65c5f6449e74",
- "localizedName": {
- "en": "Floor Care",
- "de": "Bodenpflege"
}, - "localizedDescription": {
- "en": "Floor Care",
- "de": "Bodenpflege"
}, - "localizedSlug": {
- "en": "Floor-Care",
- "de": "Bodenpflege"
}, - "ecn": [
- "AX6784",
- "123078",
- "SJUIOKM"
], - "validity": {
- "from": "2022-01-05T12:44:51.871Z",
- "to": "2022-12-05T23:59:59.000Z"
}, - "position": 5,
- "published": true,
- "mixins": { }
}
{- "id": "084bcaf6-66b8-4ddd-9489-65c5f6449e94"
}
Retrieves a list of categories.
category.category_read_unpublished
Note: Only required if the response should contain unpublished categories.
The request was successful. The categories are returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
[- {
- "id": "{categoryId}",
- "parentId": "38118",
- "name": "Test category for docs",
- "description": "Category created for documentation purposes.",
- "position": 17,
- "published": true,
- "media": null
}
]
Retrieves a specified category and its details using the category ID.
Note: If you want to retrieve the category details using the code
, you can do this by using the GET endpoint for retrieving a list of categories with the code
query parameter.
category.category_read_unpublished
Note: Only required if the response should contain unpublished categories.
The request was successful. The category is returned.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
{- "id": "string",
- "parentId": "string",
- "localizedName": {
- "property1": "string",
- "property2": "string"
}, - "localizedDescription": {
- "property1": "string",
- "property2": "string"
}, - "localizedSlug": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "description": "string",
- "code": "string",
- "ecn": [
- "string"
], - "Validity": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "position": 0,
- "published": true,
- "supercategoriesIds": [
- "string"
], - "mixins": { },
- "Metadata": {
- "version": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z"
}, - "media": [
- {
- "id": "345-12345",
- "contentType": "image/jpeg",
- "metadata": {
- "createdAt": "2022-12-06T06:54:36.834Z"
}, - "customAttributes": {
- "id": "345-54353",
- "height": 1234,
- "width": 1024,
- "sizeKB": 5,
- "type": "jpg",
- "name": "ima.jpg"
}
}
]
}
Fully updates a specified category by replacing existing information or creating a new one if the is no category with given id Version specified in the 'metadata' field must be the same as in the database. The version can be omitted but then optimistic locking will not be enabled. Category-to-root promotion may be achieved by adding the 'parentId' field with the 'root' value or by excluding the 'parentId' from the payload.
category.category_update
category.category_publish
Note: The category.category_publish
scope is only required if you want to publish the category when updating it.category.category_unpublish
Note: Only required if you want to unpublish the category when updating it.The category has been successfully created
The category has been successfully updated
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
Duplicated ECN value - given ECN is already assigned to another category
{- "parentId": "084bcaf6-66b8-4ddd-9489-65c5f6449e94",
- "localizedName": {
- "en": "Floor Care",
- "de": "Bodenpflege"
}, - "localizedDescription": {
- "en": "Floor Care",
- "de": "Bodenpflege"
}, - "localizedSlug": {
- "en": "Floor Care",
- "de": "Bodenpflege"
}, - "ecn": [
- "AX6784",
- "123078",
- "SJUIOKM"
], - "validity": {
- "from": "2022-01-05T12:44:51.871Z",
- "to": "2022-12-05T23:59:59.000Z"
}, - "position": 5,
- "published": true,
- "mixins": { },
- "metadata": {
- "version": 1
}
}
{- "id": "084bcaf6-66b8-4ddd-9489-65c5f6449e94"
}
Deletes a specified category.
category.category_delete
The category was successfully deleted.
Request was logically incorrect. Details will be provided in the response payload.
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
{ }
Partially updates a specified category. Version specified in the 'metadata' field must be the same as in the database. Category-to-root promotion may be achieved by adding 'parentId' field with the 'root' value.
category.category_update
category.category_publish
Note: The category.category_publish
scope is only required if you want to publish the category when creating it.category.category_unpublish
Note: Only required if you want to unpublish the category when updating it.The category has been successfully updated
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
Duplicated ECN value - given ECN is already assigned to another category
{- "localizedName": {
- "en": "Floor Care Liquids"
}, - "localizedSlug": {
- "en": "Floor-Care-Liquids"
}, - "position": 3,
- "published": true,
- "metadata": {
- "version": 1
}
}
{ }
Retrieves a list of parents for a specified category. Parents are sorted in ascending order from root to leaf by default.
If there are unpublished categories in the category tree, then if the parameter showUnpublished=false
is used,
unpublished category parents will be omitted in the response.
category.category_read_unpublished
Note: Only required if the response should contain unpublished categories.
The request was successful. The category parents are returned.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
[- {
- "id": "string",
- "parentId": "string",
- "localizedName": {
- "property1": "string",
- "property2": "string"
}, - "localizedDescription": {
- "property1": "string",
- "property2": "string"
}, - "localizedSlug": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "description": "string",
- "code": "string",
- "ecn": [
- "string"
], - "Validity": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "position": 0,
- "published": true,
- "supercategoriesIds": [
- "string"
], - "mixins": { },
- "Metadata": {
- "version": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z"
}, - "media": [
- {
- "id": "345-12345",
- "contentType": "image/jpeg",
- "metadata": {
- "createdAt": "2022-12-06T06:54:36.834Z"
}, - "customAttributes": {
- "id": "345-54353",
- "height": 1234,
- "width": 1024,
- "sizeKB": 5,
- "type": "jpg",
- "name": "ima.jpg"
}
}
]
}
]
Retrieves a list of subcategories for a specified category.
If there are unpublished categories in the category tree, then when the showUnpublished=false
parameter is used, only subcategories up to the last published subcategory will be shown.
category.category_read_unpublished
Note: Only required if the response should contain unpublished categories.
The request was successful. The category subcategories are returned.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
[- {
- "id": "string",
- "parentId": "string",
- "localizedName": {
- "property1": "string",
- "property2": "string"
}, - "localizedDescription": {
- "property1": "string",
- "property2": "string"
}, - "localizedSlug": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "description": "string",
- "code": "string",
- "ecn": [
- "string"
], - "Validity": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "position": 0,
- "published": true,
- "supercategoriesIds": [
- "string"
], - "mixins": { },
- "Metadata": {
- "version": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z"
}, - "media": [
- {
- "id": "345-12345",
- "contentType": "image/jpeg",
- "metadata": {
- "createdAt": "2022-12-06T06:54:36.834Z"
}, - "customAttributes": {
- "id": "345-54353",
- "height": 1234,
- "width": 1024,
- "sizeKB": 5,
- "type": "jpg",
- "name": "ima.jpg"
}
}
]
}
]
Assigns resources to a specified category in bulk. Assignments that do not exist will be created and existing ones will be updated.
category.category_update
required | object |
Multi-status.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
[- {
- "ref": {
- "id": "1639265"
}
}, - {
- "ref": {
- "id": "1639266"
}
}
]
[- {
- "assignmentId": "e243dc9e-a3f6-4573-bb01-a8ae21d2d4ae",
- "productId": "123456",
- "index": 0,
- "code": 201,
- "status": "CREATED"
}, - {
- "assignmentId": "e333dc9e-a3f6-4573-bb01-a8ae21d2d443",
- "productId": "234567",
- "index": 1,
- "code": 201,
- "status": "CREATED"
}
]
Assigns resources to a specified category.
category.category_update
required | object |
Multi-status.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
[- {
- "ref": {
- "id": "1639265",
- "type": "PRODUCT"
}
}, - {
- "ref": {
- "id": "1639266",
- "type": "PRODUCT"
}
}
]
[- {
- "assignmentId": "e243dc9e-a3f6-4573-bb01-a8ae21d2d4ae",
- "productId": "123456",
- "index": 0,
- "code": 201,
- "status": "CREATED"
}, - {
- "assignmentId": "e333dc9e-a3f6-4573-bb01-a8ae21d2d443",
- "productId": "234567",
- "index": 1,
- "code": 201,
- "status": "CREATED"
}
]
Retrieves resources (such as products) assigned to a specified category. Localized name field contains resource (product) name. This information is attached to assignment asynchronously and will be visible in the response while getting it.
category.category_read_unpublished
Note: Only required if the category has not been published.
The request was successful. The category assignments are returned.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
[- {
- "id": "d7d1745d-6b46-40a7-87d8-ecb60b8260f6",
- "categoryId": "d7d1745d-6b46-40a7-87d8-ecb60b8260f5",
- "ref": {
- "id": "521266ca-a411-4550-a7ab-aeeb4ce74133",
- "type": "PRODUCT",
- "localizedName": {
- "en": "product name"
}
}
}
]
Assigns a resource to a specified category.
category.category_update
required | object Assignment reference. |
The resource has been successfully assigned to the category.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
{- "ref": {
- "id": "1639265",
- "type": "PRODUCT"
}
}
{- "id": "e243dc9e-a3f6-4573-bb01-a8ae21d2d4ae"
}
Deletes all assignments for a specified category.
category.category_update
Assignments has been successfully deleted
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
{- "code": 403,
- "status": "Forbidden",
- "message": "You need a scope for this action.",
- "details": [
- "Required scope(s): category.category_update"
]
}
Deletes an assignment from a specified category.
category.category_update
Assignment has been successfully deleted.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
{- "code": 400,
- "status": "Bad Request",
- "message": "Assignment reference validation failed",
- "details": [
- "Please provide a valid assignment reference id"
]
}
Creates or Updates an assignment of a resource to a specified category. If any assignment with given categoryId and referenceId does not exist then a new assignment is created.
category.category_update
The resource has been successfully assigned to the category.
The resource assignment to the category has been updated.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
{- "id": "e243dc9e-a3f6-4573-bb01-a8ae21d2d4ae"
}
Deletes an assignment from a specified category.
category.category_update
Assignment has been successfully deleted.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
{- "code": 400,
- "status": "Bad Request",
- "message": "Assignment reference validation failed",
- "details": [
- "Please provide a valid assignment reference id"
]
}
Retrieves a list of categories for which the reference id is assigned.
category.category_read_unpublished
Note: Only required if the category has not been published.
The request was successful. The categories for given reference id are returned.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Reference with the specified reference id does not exist
[- {
- "id": "string",
- "parentId": "string",
- "localizedName": {
- "property1": "string",
- "property2": "string"
}, - "localizedDescription": {
- "property1": "string",
- "property2": "string"
}, - "localizedSlug": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "description": "string",
- "code": "string",
- "ecn": [
- "string"
], - "Validity": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "position": 0,
- "published": true,
- "supercategoriesIds": [
- "string"
], - "mixins": { },
- "Metadata": {
- "version": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z"
}, - "media": [
- {
- "id": "345-12345",
- "contentType": "image/jpeg",
- "metadata": {
- "createdAt": "2022-12-06T06:54:36.834Z"
}, - "customAttributes": {
- "id": "345-54353",
- "height": 1234,
- "width": 1024,
- "sizeKB": 5,
- "type": "jpg",
- "name": "ima.jpg"
}
}
]
}
]
Deletes all assignments for a specified referenceId, e.g. all assignments for a given productId.
category.category_update
Assignments has been successfully deleted
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Assignment with given referenceId does not exist
{ }
Retrieves a category tree.
Note: By default, only published categories are retrieved.
No specific scopes are required.
The request was successful. The category tree is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "id": "38118",
- "name": "ProductRoot",
- "code": "productroot",
- "description": "{\"type\":\"ProductRoot\"}",
- "position": 55555,
- "published": true,
- "subcategories": [
- {
- "id": "38119",
- "parentId": "38118",
- "name": "Fruits & Vegetables",
- "code": "fruits-&-vegetables",
- "description": "Fresh and tasty fruits and vegetables.",
- "position": 0,
- "published": true,
- "subcategories": [
- {
- "id": "38120",
- "parentId": "38119",
- "name": "Fruit",
- "code": "fruit",
- "position": 0,
- "published": true
}
]
}
]
}
Retrieves the category trees.
category.category_read_unpublished
Note: Only required if the response should contain unpublished categories.
The request was successful. The category tree is returned.
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
[- {
- "id": "46124ba108-e6fd-4139-b831-5ac5fded6d52",
- "localizedName": {
- "en": "ProductRoot"
}, - "code": "productroot",
- "localizedSlug": {
- "en": "productroot"
}, - "localizedDescription": {
- "en": "ProductRoot"
}, - "position": 55555,
- "published": true,
- "subcategories": [
- {
- "id": "12a24ba108-e6fd-4139-b831-5ac5fded6d34",
- "parentId": "46124ba108-e6fd-4139-b831-5ac5fded6d52",
- "localizedName": {
- "en": "Fruits & Vegetables"
}, - "code": "fruits-&-vegetables",
- "localizedSlug": {
- "en": "fruits-&-vegetables"
}, - "localizedDescription": {
- "en": "Fresh and tasty fruits and vegetables."
}, - "position": 0,
- "published": true,
- "subcategories": [
- {
- "id": "12a24ba108-e6fd-4139-b831-5ac5fded6d34",
- "parentId": "34a24ba108-e6fd-4139-b831-5ac5fded6dae",
- "localizedName": {
- "en": "Fruit"
}, - "code": "fruit",
- "localizedSlug": {
- "en": "fruit"
}, - "position": 0,
- "published": true
}
]
}
]
}
]
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.
category.category_read_unpublished
Note: Only required if the response should contain unpublished categories.
The request was successful. The category tree is returned.
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category tree with specified id does not exist
{- "id": "46124ba108-e6fd-4139-b831-5ac5fded6d52",
- "localizedName": {
- "en": "ProductRoot"
}, - "code": "productroot",
- "localizedSlug": {
- "en": "productroot"
}, - "localizedDescription": {
- "en": "ProductRoot"
}, - "position": 55555,
- "published": true,
- "subcategories": [
- {
- "id": "12a24ba108-e6fd-4139-b831-5ac5fded6d34",
- "parentId": "46124ba108-e6fd-4139-b831-5ac5fded6d52",
- "localizedName": {
- "en": "Fruits & Vegetables"
}, - "code": "fruits-&-vegetables",
- "localizedSlug": {
- "en": "fruits-&-vegetables"
}, - "localizedDescription": {
- "en": "Fresh and tasty fruits and vegetables."
}, - "position": 0,
- "published": true,
- "subcategories": [
- {
- "id": "12a24ba108-e6fd-4139-b831-5ac5fded6d34",
- "parentId": "34a24ba108-e6fd-4139-b831-5ac5fded6dae",
- "localizedName": {
- "en": "Fruit"
}, - "code": "fruit",
- "localizedSlug": {
- "en": "fruit"
}, - "position": 0,
- "published": true
}
]
}
]
}