iotoms Docs

Create a color

POST
/api/v1/catalog/attributes/colors

Creates a product color that can then be assigned to items. The name is required and must be unique. Returns the new color with status 201, as a bare object without the standard envelope.

How to use it

  1. Send a unique, non-blank name and optionally a status (defaults to "active").
  2. The color is created with a server-assigned ID and can be assigned to items.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
id?|

Color ID. Set by the server; use it in the URL of Get, Update and Delete a color.

Formatint64
name*string

Color name shown on items, e.g. "Navy". Required, and must be unique across the merchant's colors.

status*string

Free-text status for the color. Defaults to "active".

modifiedTime*string

When the color was last changed, ISO 8601. Defaults to the current time if not sent.

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Color ID. Set by the server; use it in the URL of Get, Update and Delete a color.

Formatint64
name*string

Color name shown on items, e.g. "Navy". Required, and must be unique across the merchant's colors.

status*string

Free-text status for the color. Defaults to "active".

modifiedTime*string

When the color was last changed, ISO 8601. Defaults to the current time if not sent.

Formatdate-time
Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/catalog/attributes/colors' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "status": "string",  "modifiedTime": "2019-08-24T14:15:22Z"}'
Example Response
{  "id": 0,  "name": "string",  "status": "string",  "modifiedTime": "2019-08-24T14:15:22Z"}