Update a category
PUT
Renames a product category; only name is applied. Returns the category directly (no status/message envelope), or 404 if it does not exist.
How to use it
- Get the category's ID from List categories.
- Send the new name; it must stay unique. Only the name is changed.
- The response is the updated category itself; 404 if the ID does not exist.
BearerAuthheader
AuthorizationBearer <JWT>id*integerID of the record.
Format
int64application/json- body
id?|Unique numeric ID of the category. Set by the server; omit it when creating.
Format
int64name*stringCategory name. Required, must not be blank, and must be unique.
modifiedTime*stringTime the category was created (ISO 8601 date-time). Set by the server; renaming the category does not change it.
Format
date-timeOK
*/*- response
id?|Unique numeric ID of the category. Set by the server; omit it when creating.
Format
int64name*stringCategory name. Required, must not be blank, and must be unique.
modifiedTime*stringTime the category was created (ISO 8601 date-time). Set by the server; renaming the category does not change it.
Format
date-timeExample Request
curl -X PUT 'https://beta.iotoms.com/api/v1/catalog/attributes/categories/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"}