iotoms Docs

Update a subcategory

PUT
/api/v1/catalog/attributes/subcategories/{id}

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

  1. Find the subcategory ID with List subcategories.
  2. Send the new name; only the name is changed.
  3. Items in this subcategory keep it and show the new name.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

Request Body

application/json
  1. body
id?|

Numeric subcategory ID; use it as subcategoryId on items.

Formatint64
name*string

Subcategory name, unique across the catalog.

modifiedTime*string

Timestamp stored when the subcategory was created (ISO 8601). Renaming it does not change it.

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Numeric subcategory ID; use it as subcategoryId on items.

Formatint64
name*string

Subcategory name, unique across the catalog.

modifiedTime*string

Timestamp stored when the subcategory was created (ISO 8601). Renaming it does not change it.

Formatdate-time
Example 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"}