Create a subcategory
POST
Creates a catalog subcategory that items can be assigned to. The name is required and must be unique. Returns 201 with the new subcategory, including its ID.
How to use it
- Send a name not already used by another subcategory.
- The subcategory is returned with its ID (201 Created), ready to assign to items.
BearerAuthheader
AuthorizationBearer <JWT>application/json- body
id?|Numeric subcategory ID; use it as subcategoryId on items.
Format
int64name*stringSubcategory name, unique across the catalog.
modifiedTime*stringTimestamp stored when the subcategory was created (ISO 8601). Renaming it does not change it.
Format
date-timeOK
*/*- response
id?|Numeric subcategory ID; use it as subcategoryId on items.
Format
int64name*stringSubcategory name, unique across the catalog.
modifiedTime*stringTimestamp stored when the subcategory was created (ISO 8601). Renaming it does not change it.
Format
date-timeExample Request
curl -X POST 'https://beta.iotoms.com/api/v1/catalog/attributes/subcategories' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "modifiedTime": "2019-08-24T14:15:22Z"}'Example Response
{ "id": 0, "name": "string", "modifiedTime": "2019-08-24T14:15:22Z"}