https://dummyapi-backend.onrender.com/api
CodeSmash โ†—

๐Ÿ›๏ธProducts โ€“ Docs

The products endpoint provides 200 products across 24 categories with prices, ratings, stock levels, and images. Perfect for building e-commerce prototypes.

Base URL: https://dummyapi-backend.onrender.com/api
GET

Get all products. Supports ?limit&skip&sortBy&order.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/products

?limit?skip?sortBy?order
fetch('https://dummyapi-backend.onrender.com/api/products')
.then(res => res.json())
.then(console.log);
GET

Get a single product by ID.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/products/:id

fetch('https://dummyapi-backend.onrender.com/api/products/:id')
.then(res => res.json())
.then(console.log);
GET

Get all product categories.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/products/categories

fetch('https://dummyapi-backend.onrender.com/api/products/categories')
.then(res => res.json())
.then(console.log);
GET

Get products by category slug.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/products/category/:name

fetch('https://dummyapi-backend.onrender.com/api/products/category/:name')
.then(res => res.json())
.then(console.log);
POST

Create a new product (demo).

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/products

fetch('https://dummyapi-backend.onrender.com/api/products', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({})
})
.then(res => res.json())
.then(console.log);
PUT

Update a product.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/products/:id

fetch('https://dummyapi-backend.onrender.com/api/products/:id', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({})
})
.then(res => res.json())
.then(console.log);
DELETE

Delete a product.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/products/:id

fetch('https://dummyapi-backend.onrender.com/api/products/:id', {
method: 'DELETE',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({})
})
.then(res => res.json())
.then(console.log);