Create Category
Create a new category. You can create either a main category (by omittingparentId) or a subcategory (by providing a parentId).
Endpoint
Request Body
The category name
Detailed description of the category
ID of the parent category. Omit this field or set to null to create a main category
Whether the category should be active upon creation
Response
Returns the created category object with aLocation header pointing to the new resource.
Unique identifier for the newly created category
The category name
Detailed description of the category
ID of the parent category (null for main categories)
Whether the category is currently active
List of product IDs (empty for new categories)
List of subcategory IDs (empty for new categories)
Status Codes
201- Category successfully created400- Invalid request body or validation error