Skip to main content
POST
Convert Item To Kit Item

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Scopes

items.write
oauth2-authorization-code

Grants permission to create and modify item data.

items.write
oauth2-client-credentials

Grants permission to create and modify item data.

Headers

Idempotency-Key
string

Optional, client-generated key for deduplicating repeated write requests. A repeated request with the same key returns the originally recorded result instead of executing the effect again.

Required string length: 1 - 255
x-tenant-id
string<uuid>
required

The tenant ID for the target ERP instance.

Path Parameters

itemId
string<uuid>
required

Unique ID of the item that is converted into a kit.

Example:

"b45f6432-2462-4c6f-b00f-1d9d01000000"

Body

application/json

Request model for ConvertItemToKitItem command endpoint. Route parameters bind from the route, query parameters from the query string, everything else from the body.

components
object[]
required

The component items the kit consists of after the conversion. At least one component is required - it is what makes the item a kit. Components are stored in the order they are sent unless a component carries an explicit "position". The same component item may appear only once.

Response

The item was successfully converted into a kit.

Converts an existing standard item into a kit, so that selling one unit of it consumes a fixed set of component items from then on. The full component list is mandatory, because a standard item has no component list to fall back on - supplying at least one component is what makes the item a kit. The item keeps its ID, but the conversion resets several settings and converting back does not restore them: the suppliers are removed, because a kit has no suppliers; stock management is switched off first, which clears the per-warehouse minimum and maximum stock levels written through "PATCH /v2/items/{itemId}/warehouse-constraints" and switches "allowNegativeStock" off; and divisible stock is switched off. An item that tracks best-before dates, batches or serial numbers is not converted at all (409). The kit's stock management is then derived from its components - it is stock-managed as soon as one component is - so read the item after the conversion to see the resulting settings. There is no direct reverse operation: removing the last component with "DELETE /v2/items/{itemId}/kit-items/components/{componentItemId}" or "DeleteKitItemComponent" dissolves the kit and turns the item back into a standard item. Because an item that is itself a kit is never an eligible component, kits cannot be nested. Use "POST /v2/items/{itemId}/kit-items/components" or "AddKitItemComponent" to add a further component to a kit that already exists. - Response

itemId
string<uuid>
required

Unique ID of the converted item. Unchanged - a kit keeps the ID it had as a standard item.

Example:

"b45f6432-2462-4c6f-b00f-1d9d01000000"

components
object[]
required

The components as they were stored, in their effective order. Worth reading for the effective position of each component, which differs from the requested one when a requested position was out of bounds and got clamped.