---
title: "Create a colour bar item"
method: POST
path: "/v1/locations/{locationId}/colour-bar-items"
tags: ["Colour bar items"]
---

# Create a colour bar item

`POST /v1/locations/{locationId}/colour-bar-items`

## Request

- Base URL: `https://api.cliento.com`
- URL: `https://api.cliento.com/v1/locations/{locationId}/colour-bar-items`
- Auth: HTTP bearer

Adds an item to a colour bar range. It starts with no stock. Send an `Idempotency-Key` so that a repeat of the call does not add the item twice. A shade the range already holds, or a barcode that another item or a product of the location has, is refused with `duplicate`.

## Path parameters

- `locationId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- ColourBarItemCreate
  - `articleNumber` string
  - `eans` string[]: The item's own barcodes. A barcode that another item or a product of the location has is refused.
  - `listPrice` string: The list price of one pack, VAT excluded, when the item differs from its range.
  - `name` string: What the item is called. Required when there is no `shade`.
  - `packSize` integer: Grams in one pack, when the item differs from its range.
  - `rangeId` string, required: The range the item belongs to.
  - `shade` string: The shade of a colour, at most 50 characters. A range holds a shade once.
  - `strengthPercent` string: The strength of a developer in per cent, greater than 0, at most 100.

## Response `201`

Created

- ColourBarItem: Represents one thing a location mixes from at its colour bar: one shade of a colour, one strength of a developer, one tub of bleach. Belongs to a colour bar range and to the range's location. Holds its own balance in the location's stock, counted in packs, and how much has been taken from the pack that is open. It is not a product: it is never sold at a point of sale.
  - `articleNumber` string: The supplier's article number, as read from a delivery note.
  - `catalogueEans` string[], required: Read-only. Those of `eans` that the item has from the article in a supplier's catalogue it was made from. They are not the item's own and cannot be removed from it. Can be empty.
  - `createdAt` string, date-time, required
  - `eans` string[], required: The item's barcodes: its own, and those in `catalogueEans`. Can be empty.
  - `gramsLeft` integer: Read-only. Grams left in all the item's packs together. Left out when the item has no pack size.
  - `id` string, required: Colour bar item id.
  - `listPrice` string: The list price of one pack, VAT excluded, where the item differs from its range. Left out when the item follows the range's `listPrice`.
  - `listPriceInUse` string: Read-only. The list price that applies: the item's own, otherwise its range's.
  - `locationId` string, required
  - `name` string, required: What the item is called. An item without a name of its own is called by its `shade`, and follows it when the shade is changed.
  - `openLeft` integer: Read-only. Grams left in the open pack. Left out when no pack is open or the item has no pack size.
  - `openUsed` integer, required: Read-only. Grams taken from the open pack. `0` when no pack is open.
  - `packSize` integer: Grams in one pack, where the item differs from its range. Left out when the item follows the range's `packSize`.
  - `packSizeInUse` integer: Read-only. The pack size that applies: the item's own, otherwise its range's. Left out for an item used a whole pack at a time.
  - `packs` integer, required: Read-only. The packs in stock, the open one included. Never negative.
  - `rangeId` string, required: The range the item belongs to. Set when the item is created.
  - `shade` string: The shade of a colour, as the supplier writes it.
  - `strengthPercent` string: The strength of a developer in per cent, as a decimal string.
  - `unopenedPacks` integer, required: Read-only. The packs that are not opened.
  - `updatedAt` string, date-time, required: When the item last changed, which includes its stock and its own barcodes.

## Other responses

- `default`: Any failure. See the Errors section.

---

[API](https://skmtc.dev/cliento/apis/cliento-api.md) · [All operations](https://skmtc.dev/cliento/apis/cliento-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cliento/apis/cliento-api/revisions/29ca811bc061?raw)
