Skip to main content
POST
/
products
/
{productId}
/
components
Add a component to a product (kit)
curl --request POST \
  --url https://api.example.com/products/{productId}/components \
  --header 'Content-Type: application/json' \
  --data '
{
  "componentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "quantity": 2,
  "lossPercentage": 5.5,
  "isMainItem": false,
  "displayInDescription": true,
  "affectsPrice": true
}
'
{
  "id": "exemplo_string",
  "componentId": "exemplo_string",
  "quantity": 123,
  "lossPercentage": 123,
  "isMainItem": true,
  "displayInDescription": true,
  "affectsPrice": true,
  "unitCostSnapshot": 123,
  "representationPercentage": 123,
  "component": {}
}
Adds a SIMPLE produto as a component of a KIT/MANUFACTURED produto. Nested kits (adding a KIT as component of another KIT) are forbidden.

Parâmetros de Rota (Path)

productId
string
required
UUID of the parent produto (kit)

Parâmetros da Requisição (Body)

componentId
string
UUID of the component produto (must be a SIMPLE produto, not a KIT)
quantity
number
Quantity of this component required per kit unit
lossPercentage
number
Expected loss percentage during manufacturing/assembly (0-100)
isMainItem
boolean
Flag indicating this is the main/primary item of the kit
displayInDescription
boolean
Whether to include this component in marketplace listing descriptions
affectsPrice
boolean
Whether this component cost is factored into the final kit Preço de Venda

Resposta de Sucesso

id
string
componentId
string
quantity
number
lossPercentage
number
isMainItem
boolean
displayInDescription
boolean
affectsPrice
boolean
unitCostSnapshot
number
representationPercentage
number
component
object
{
  "id": "exemplo_string",
  "componentId": "exemplo_string",
  "quantity": 123,
  "lossPercentage": 123,
  "isMainItem": true,
  "displayInDescription": true,
  "affectsPrice": true,
  "unitCostSnapshot": 123,
  "representationPercentage": 123,
  "component": {}
}

Path Parameters

productId
string
required

UUID of the parent product (kit)

Body

application/json
componentId
string
required

UUID of the component product (must be a SIMPLE product, not a KIT)

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

quantity
number
required

Quantity of this component required per kit unit

Required range: x >= 1
Example:

2

lossPercentage
number
default:0

Expected loss percentage during manufacturing/assembly (0-100)

Required range: 0 <= x <= 100
Example:

5.5

isMainItem
boolean
default:false

Flag indicating this is the main/primary item of the kit

displayInDescription
boolean
default:true

Whether to include this component in marketplace listing descriptions

affectsPrice
boolean
default:true

Whether this component cost is factored into the final kit price

Response

Component successfully added

id
string
required
componentId
string
required
quantity
number
required
lossPercentage
number
required
isMainItem
boolean
required
displayInDescription
boolean
required
affectsPrice
boolean
required
unitCostSnapshot
number
required
representationPercentage
number
required
component
object
required