Products

Update a product

Update fields on an existing product. (Simulated by the upstream API — the response reflects the change but nothing is persisted.)

PUT/products/{id}
Update a product
curl --request PUT \
--url https://dummyjson.com/products/{id} \
--header 'Content-Type: application/json' \
--data '
{
"title": "Velu Notebook",
"description": "A dotted-grid notebook for docs notes.",
"category": "stationery",
"price": 19.99
}
'
{
"id": 0,
"title": "<string>",
"description": "<string>",
"category": "<string>",
"price": 0,
"discountPercentage": 0,
"rating": 0,
"stock": 0,
"brand": "<string>",
"thumbnail": "<string>"
}

Path Parameters

idintegerrequired
The product id.

Body

application/json
titlestringrequired
Product name.
descriptionstring
Product description.
categorystring
Category slug.
pricenumber
Price in USD.

Response

200 · application/json

The updated product.

idinteger
Unique identifier.
titlestring
Product name.
descriptionstring
Product description.
categorystring
Category slug.
pricenumber
Price in USD.
discountPercentagenumber
Discount, as a percentage.
ratingnumber
Average customer rating (0–5).
stockinteger
Units in stock.
brandstring
Brand name.
thumbnailstring
Thumbnail image URL.