Skip to main content
POST
Converts a stock item back into a standard item, so that its stock is no longer managed in warehouses.

Authorizations

Authorization
string
header
required

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

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 stock item that is converted back into a standard item.

Example:

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

Body

application/json

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

writeOffExistingStock
boolean

Determines what happens when the item still has stock. When false or omitted, the conversion is rejected with HTTP 409 and the stock is left untouched. When true, the existing stock is written off as part of the conversion. Defaults to false, so stock is never written off implicitly.

Response

The stock item was successfully converted back into a standard item.

Converts a stock item back into a standard item, so that its stock is no longer managed in warehouses. The item keeps its ID and all other properties. Three settings are reset as part of the transition and converting back does not restore them: the per-warehouse minimum and maximum stock levels written through PATCH /v2/items/{itemId}/warehouse-constraints are cleared, allowNegativeStock is switched off, and includeSupplierStock is switched off on every supplier of the item. Use POST /v2/items/{itemId}/stock-items/convert for the opposite direction. - Response

itemId
string<uuid>
required

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

Example:

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

stockWrittenOff
boolean
required

Indicates whether existing stock was written off as part of the conversion. Only ever true when writeOffExistingStock was true and the item actually had stock; false otherwise. The caller cannot derive this from the request alone, because a stock item that has no stock is converted without anything being written off.