iotoms Docs

Create a subcategory

POST
/api/v1/catalog/attributes/subcategories

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

  1. Send a name not already used by another subcategory.
  2. The subcategory is returned with its ID (201 Created), ready to assign to items.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

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 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"}