[POST] .../v1/color/add
Creates a new color. Use this method to create a color reference record before assigning it to item variants or catalog attributes. It creates one color and returns new_id after validating that name is provided and no longer than 150 characters. The caller must have color add permission; missing body, invalid name, denied access, duplicate or storage validation failures and persistent errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | String | Required | Color name. |
Request Example
{
"name": "Black"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 8
}
}