iotoms Docs

Create a style

POST
/api/v1/catalog/attributes/styles

Creates a style and returns it with status 201. The response is the bare object, without the standard {status, message, data} envelope.

How to use it

  1. Send a unique, non-blank name for the style.
  2. The style is created with a server-assigned ID and returned with status 201; it can now be assigned to items.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
id?|

Numeric style ID; use it as styleId on items.

Formatint64
name*string

Style name, unique across the catalog.

modifiedTime*string

When the style was last changed (ISO 8601 timestamp).

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Numeric style ID; use it as styleId on items.

Formatint64
name*string

Style name, unique across the catalog.

modifiedTime*string

When the style was last changed (ISO 8601 timestamp).

Formatdate-time
Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/catalog/attributes/styles' \  -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"}