Magnolia 6.1 reached end of life on March 31, 2021. This branch is no longer supported, see End-of-life policy.
This page describes the category
endpoint, which can be used to interact with your external e-commerce solution's REST service.
With this endpoint, you can:
Returns a list of all categories for a given connection.
/.rest/ecommerce/v1/categories/list
Parameter | Description | Parameter type | Data type | Connector |
---|---|---|---|---|
| required The definition name. |
|
| commercetools Magento |
connectionName | required The connection name. |
|
| commercetools Magento |
Gets a list of all the categories.
curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/categories/list?definitionName=magento&connectionName=connection"
Gets a list of all the categories.
curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/categories/list?definitionName=commercetools&connectionName=connection"
Returns a category based on its ID.
/.rest/ecommerce/v1/categories/{categoryId}
Parameter | Description | Parameter type | Data type | Connector |
---|---|---|---|---|
| required The definition name. |
|
| commercetools Magento |
connectionName | required The connection name. |
|
| commercetools Magento |
categoryId | required The ID of the category. |
|
| commercetools Magento |
Gets the category with an ID of 2
.
curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/categories/2?definitionName=magento&connectionName=connection"
Gets the category with an ID of 77a188b9-9c85-4aff-ae4d-9a8fc22f19cf
.
curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/categories/77a188b9-9c85-4aff-ae4d-9a8fc22f19cf?definitionName=commercetools&connectionName=connection"
Returns a category based on the ID of a product.
/.rest/ecommerce/v1/categories/product/{productId}
Parameter | Description | Parameter type | Data type | Connector |
---|---|---|---|---|
| required The definition name. |
|
| commercetools Magento |
connectionName | required The connection name. |
|
| commercetools Magento |
productId | required commercetools: the unique ID of the product. Magento: SKU of the product. |
|
| commercetools Magento |
Gets the category corresponding to the product with an ID (SKU) of 24-MB01
.
curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/categories/product/24-MB01?definitionName=magento&connectionName=connection"
Gets the category corresponding to the product with an ID of cb292097-a8cf-4b51-8258-879d3e85036a
.
curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/categories/product/cb292097-a8cf-4b51-8258-879d3e85036a?definitionName=commercetools&connectionName=connection"
Returns a category based on the ID of the parent category.
/.rest/ecommerce/v1/categories/?parentId
Parameter | Description | Parameter type | Data type | Connector |
---|---|---|---|---|
| required The definition name. |
|
| commercetools Magento |
connectionName | required The connection name. |
|
| commercetools Magento |
parentId | required The ID of the parent category. Default is |
|
| commercetools Magento |
Gets the child category of the parent category with an ID of 3
.
curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/categories/?parentId=3&definitionName=magento&connectionName=connection"
Gets the child category of the parent category with an ID of cf94acbc-bf7c-4b45-8679-77284c5b76f9
.
curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/categories/?parentId=cf94acbc-bf7c-4b45-8679-77284c5b76f9&definitionName=commercetools&connectionName=connection"