Update Product
Update an existing product.
Endpoint
PUT /api/products/update/?id={id}Request Body
Include only the fields you want to update.
See Create Product for field details.
Example
json
{
"name": "Updated T-shirt",
"price": {
"salePrice": 18
},
"status": "PUBLISH",
"images": [
{
"src": "https://cdn.example.com/tshirt-new.jpg",
"title": "T-shirt New"
}
],
"options": [
{
"name": "Size",
"style": "SIZE",
"values": [
{ "value1": "M" },
{ "value1": "L" }
]
}
]
}Response
json
{
"status": "success",
"data": {
"_id": "string",
"name": "Updated T-shirt",
...
}
}