Decompose kit units
Decomposes kit units into its components: one stock exit (SR) of the kit and one stock entry per component warehouse with the movement type set in STOCK_TipoMovEntradaDecomporKit (ER by default). All movements are created in one transaction.
In: header
Path Parameters
Kit units to decompose. Must be greater than 0 and not above the kit stock in the warehouse.
0 < valueWarehouse the kits leave from.
Kit lot with stock in that warehouse. Required when the kit uses lots.
Kit serial numbers in stock in that warehouse. Required for kits with serial numbers, quantity values.
One entry per kit component, covering every component of the kit.
Component article code.
Warehouse that receives the component.
Existing component lot. Required when the component uses lots.
Component serial numbers not in stock yet. Required for serial components, quantity x component quantity.
Response Body
curl -X POST "https://og-tenant1.test:8003/api/v2/stocks/articles/string/kits/decompose" \
-H "Content-Type: application/json" \
-d '{
"quantity": 1,
"warehouse_id": 1,
"components": [
{
"article_id": "ART001",
"warehouse_id": 1
}
],
"components.*.article_id": "ART001",
"components.*.warehouse_id": 1
}'{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}