Products

Add a product

Create a new product. (Simulated — the response echoes the body with a fresh `id`.)

POST/products/add
Add a product
curl --request POST \
--url https://dummyjson.com/products/add \
--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>"
}

Body

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

Response

201 · application/json

The created 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.