iotoms Docs

Update a color

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

Replaces a product color, identified by its numeric ID, with the name, status and modified time in the body. The response is the bare object, without the standard {status, message, data} envelope.

How to use it

  1. Get the color ID from List colors.
  2. Send the full color with the new name (unique and not blank) and status; fields left out fall back to their defaults.
  3. Items that use this color show the new name.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

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 PUT 'https://beta.iotoms.com/api/v1/catalog/attributes/colors/0' \  -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"}