Skip to main content
PUT
/
products
/
{productId}
/
components
/
{componentId}
Update a component of a product (kit)
curl --request PUT \
  --url https://api.example.com/products/{productId}/components/{componentId} \
  --header 'Content-Type: application/json' \
  --data '
{
  "quantity": 3,
  "lossPercentage": 2,
  "isMainItem": true,
  "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": {}
}
Updates quantity, loss percentage, or flags of an existing component.

Parâmetros de Rota (Path)

productId
string
required
UUID of the parent produto (kit)
componentId
string
required
UUID of the component record to Atualizar

Parâmetros da Requisição (Body)

quantity
number
Updated quantity of this component per kit unit
lossPercentage
number
Updated 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)

componentId
string
required

UUID of the component record to update

Body

application/json
quantity
number

Updated quantity of this component per kit unit

Required range: x >= 1
Example:

3

lossPercentage
number

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

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

2

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 price

Response

Component successfully updated

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