Update a subcategory
PUT
Renames a catalog subcategory by id; only name is changed. Returns the updated subcategory, or 404 if it does not exist.
How to use it
- Find the subcategory ID with List subcategories.
- Send the new name; only the name is changed.
- Items in this subcategory keep it and show the new name.
BearerAuthheader
AuthorizationBearer <JWT>id*integerID of the record.
Format
int64application/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 PUT 'https://beta.iotoms.com/api/v1/catalog/attributes/subcategories/0' \ -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"}