Store Fake API for Testing CRUD Operations
A simple and developer-friendly Store API for practicing REST API workflows like GET, POST, PUT, PATCH, and DELETE. Use it to learn API basics, test apps, build demos, or practice frontend integration with realistic store product data.
Best for
Students, frontend developers, API beginners, and ecommerce app prototyping.
Supports
cURL, Fetch, Axios, Python, Ruby on Rails, and Next.js.
Base URL
http://localhost:3000/fake-api/storeBase URL
http://localhost:3000/fake-api/storeWhat is this API for?
Quick Test
http://localhost:3000/fake-api/store to retrieve a list of store items and test your API flow.Quick start example
Start with a simple GET request to fetch all store items. This is the easiest way to confirm the API is working in your app or test environment.
fetch("http://localhost:3000/fake-api/store")
.then((res) => res.json())
.then((data) => console.log(data));Store object schema
Each store item includes fields such as name, description, category, price, stock, brand, rating, and image. This structure makes it useful for ecommerce demos, admin panels, product cards, inventory tools, and frontend integration.
{
"id": "672f0eaa814c297b16f90111",
"name": "Wireless Headphones",
"description": "Bluetooth over-ear headphones with noise isolation.",
"category": "Electronics",
"price": 2999,
"stock": 25,
"brand": "Shrimo Audio",
"rating": 4.6,
"image": "https://example.com/headphones.jpg",
"createdAt": "2026-04-15T10:00:00.000Z",
"updatedAt": "2026-04-15T10:00:00.000Z"
}API reference
/storeGet all store items. Use this for product lists, catalog pages, and dashboards.
/store/:idGet one store item by ID. Use this for a detail page or edit form.
/storeCreate a new store item. Useful for admin forms and inventory creation.
/store/:idReplace an existing store item with a full updated version.
/store/:idUpdate one or more fields on an existing store item.
/store/:idDelete a store item by ID.
/storeGet all store items
What it does: Use GET when you want to read or fetch data.
When to use it: Use this when you want to display all store items in a list, catalog, or dashboard.
Request Body
No request body needed for this method.
Example Response
{
"success": true,
"count": 2,
"data": [
{
"id": "672f0eaa814c297b16f90111",
"name": "Wireless Headphones",
"description": "Bluetooth over-ear headphones with noise isolation.",
"category": "Electronics",
"price": 2999,
"stock": 25,
"brand": "Shrimo Audio",
"rating": 4.6,
"image": "https://example.com/headphones.jpg"
},
{
"id": "672f0eaa814c297b16f90112",
"name": "Smart Watch",
"description": "Fitness-focused smartwatch with heart rate tracking.",
"category": "Wearables",
"price": 4999,
"stock": 14,
"brand": "Shrimo Tech",
"rating": 4.4,
"image": "https://example.com/smartwatch.jpg"
}
]
}GET /store examples by language
cURL
curl -X GET "http://localhost:3000/fake-api/store"JavaScript (Fetch)
const getStoreItems = async () => {
const response = await fetch("http://localhost:3000/fake-api/store");
const data = await response.json();
console.log(data);
};
getStoreItems();JavaScript (Axios)
import axios from "axios";
const getStoreItems = async () => {
try {
const response = await axios.get("http://localhost:3000/fake-api/store");
console.log(response.data);
} catch (error) {
console.error("Error:", error.message);
}
};
getStoreItems();Python
import requests
response = requests.get("http://localhost:3000/fake-api/store")
data = response.json()
print(data)Ruby on Rails
require "net/http"
require "uri"
require "json"
uri = URI.parse("http://localhost:3000/fake-api/store")
response = Net::HTTP.get_response(uri)
if response.is_a?(Net::HTTPSuccess)
puts JSON.parse(response.body)
else
puts "Error: #{response.code}"
endNext.js
export default async function StorePage() {
const res = await fetch("http://localhost:3000/fake-api/store", {
cache: "no-store",
});
const result = await res.json();
return (
<div>
<h1>All Store Items</h1>
{result.data.map((item) => (
<div key={item.id}>
<h2>{item.name}</h2>
<p>{item.description}</p>
<p>₹{item.price}</p>
</div>
))}
</div>
);
}/store/:idGet one store item by ID
What it does: Use GET with an ID when you want only one item.
When to use it: Use this when you want to open one store item and show its details.
Request Body
No request body needed for this method.
Example Response
{
"success": true,
"count": 1,
"data": {
"id": "672f0eaa814c297b16f90111",
"name": "Wireless Headphones",
"description": "Bluetooth over-ear headphones with noise isolation.",
"category": "Electronics",
"price": 2999,
"stock": 25,
"brand": "Shrimo Audio",
"rating": 4.6,
"image": "https://example.com/headphones.jpg"
}
}GET /store/:id examples by language
cURL
curl -X GET "http://localhost:3000/fake-api/store/672f0eaa814c297b16f90111"JavaScript (Fetch)
const getStoreItemById = async (id) => {
const response = await fetch(`http://localhost:3000/fake-api/store/${id}`);
const data = await response.json();
console.log(data);
};
getStoreItemById("672f0eaa814c297b16f90111");JavaScript (Axios)
import axios from "axios";
const getStoreItemById = async (id) => {
try {
const response = await axios.get(`http://localhost:3000/fake-api/store/${id}`);
console.log(response.data);
} catch (error) {
console.error("Error:", error.message);
}
};
getStoreItemById("672f0eaa814c297b16f90111");Python
import requests
item_id = "672f0eaa814c297b16f90111"
response = requests.get(f"http://localhost:3000/fake-api/store/{item_id}")
print(response.json())Ruby on Rails
require "net/http"
require "uri"
require "json"
item_id = "672f0eaa814c297b16f90111"
uri = URI.parse("http://localhost:3000/fake-api/store/#{item_id}")
response = Net::HTTP.get_response(uri)
if response.is_a?(Net::HTTPSuccess)
puts JSON.parse(response.body)
else
puts "Error: #{response.code}"
endNext.js
export default async function StoreDetailsPage() {
const res = await fetch("http://localhost:3000/fake-api/store/672f0eaa814c297b16f90111", {
cache: "no-store",
});
const result = await res.json();
const item = result.data;
return (
<div>
<h1>{item.name}</h1>
<p>{item.description}</p>
<p>Price: ₹{item.price}</p>
<p>Stock: {item.stock}</p>
</div>
);
}/storeCreate a new store item
What it does: Use POST when you want to create new data.
When to use it: Use this when a user submits an admin form or adds a new product.
Request Body
{
"name": "Gaming Mouse",
"description": "Ergonomic gaming mouse with RGB lighting.",
"category": "Accessories",
"price": 1499,
"stock": 30,
"brand": "Shrimo Gear",
"rating": 4.5,
"image": "https://example.com/gaming-mouse.jpg"
}Example Response
{
"success": true,
"message": "Store item created successfully.",
"data": {
"id": "672f0eaa814c297b16f90111",
"name": "Gaming Mouse",
"description": "Ergonomic gaming mouse with RGB lighting.",
"category": "Accessories",
"price": 1499,
"stock": 30,
"brand": "Shrimo Gear",
"rating": 4.5,
"image": "https://example.com/gaming-mouse.jpg"
}
}POST /store examples by language
cURL
curl -X POST "http://localhost:3000/fake-api/store" \
-H "Content-Type: application/json" \
-d '{
"name": "Gaming Mouse",
"description": "Ergonomic gaming mouse with RGB lighting.",
"category": "Accessories",
"price": 1499,
"stock": 30,
"brand": "Shrimo Gear",
"rating": 4.5,
"image": "https://example.com/gaming-mouse.jpg"
}'JavaScript (Fetch)
const createStoreItem = async () => {
const response = await fetch("http://localhost:3000/fake-api/store", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Gaming Mouse",
description: "Ergonomic gaming mouse with RGB lighting.",
category: "Accessories",
price: 1499,
stock: 30,
brand: "Shrimo Gear",
rating: 4.5,
image: "https://example.com/gaming-mouse.jpg",
}),
});
const data = await response.json();
console.log(data);
};
createStoreItem();JavaScript (Axios)
import axios from "axios";
const createStoreItem = async () => {
try {
const response = await axios.post("http://localhost:3000/fake-api/store", {
name: "Gaming Mouse",
description: "Ergonomic gaming mouse with RGB lighting.",
category: "Accessories",
price: 1499,
stock: 30,
brand: "Shrimo Gear",
rating: 4.5,
image: "https://example.com/gaming-mouse.jpg",
});
console.log(response.data);
} catch (error) {
console.error("Error:", error.message);
}
};
createStoreItem();Python
import requests
payload = {
"name": "Gaming Mouse",
"description": "Ergonomic gaming mouse with RGB lighting.",
"category": "Accessories",
"price": 1499,
"stock": 30,
"brand": "Shrimo Gear",
"rating": 4.5,
"image": "https://example.com/gaming-mouse.jpg"
}
response = requests.post("http://localhost:3000/fake-api/store", json=payload)
print(response.json())Ruby on Rails
require "net/http"
require "uri"
require "json"
uri = URI.parse("http://localhost:3000/fake-api/store")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = false
request = Net::HTTP::Post.new(uri.request_uri, {
"Content-Type" => "application/json"
})
request.body = {
name: "Gaming Mouse",
description: "Ergonomic gaming mouse with RGB lighting.",
category: "Accessories",
price: 1499,
stock: 30,
brand: "Shrimo Gear",
rating: 4.5,
image: "https://example.com/gaming-mouse.jpg"
}.to_json
response = http.request(request)
puts JSON.parse(response.body)Next.js
async function createStoreItem() {
const response = await fetch("http://localhost:3000/fake-api/store", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Gaming Mouse",
description: "Ergonomic gaming mouse with RGB lighting.",
category: "Accessories",
price: 1499,
stock: 30,
brand: "Shrimo Gear",
rating: 4.5,
image: "https://example.com/gaming-mouse.jpg",
}),
});
return response.json();
}/store/:idReplace a store item with PUT
What it does: Use PUT when you want to update an existing item with a full new version.
When to use it: Use this when you want to replace most or all values of an existing store item.
Request Body
{
"name": "Gaming Mouse Pro",
"description": "Updated ergonomic gaming mouse with RGB lighting and faster response.",
"category": "Accessories",
"price": 1799,
"stock": 18,
"brand": "Shrimo Gear",
"rating": 4.7,
"image": "https://example.com/gaming-mouse-pro.jpg"
}Example Response
{
"success": true,
"message": "Store item updated successfully.",
"data": {
"id": "672f0eaa814c297b16f90111",
"name": "Gaming Mouse Pro",
"description": "Updated ergonomic gaming mouse with RGB lighting and faster response.",
"category": "Accessories",
"price": 1799,
"stock": 18,
"brand": "Shrimo Gear",
"rating": 4.7,
"image": "https://example.com/gaming-mouse-pro.jpg"
}
}PUT /store/:id examples by language
cURL
curl -X PUT "http://localhost:3000/fake-api/store/672f0eaa814c297b16f90111" \
-H "Content-Type: application/json" \
-d '{
"name": "Gaming Mouse Pro",
"description": "Updated ergonomic gaming mouse with RGB lighting and faster response.",
"category": "Accessories",
"price": 1799,
"stock": 18,
"brand": "Shrimo Gear",
"rating": 4.7,
"image": "https://example.com/gaming-mouse-pro.jpg"
}'JavaScript (Fetch)
const updateStoreItem = async (id) => {
const response = await fetch(`http://localhost:3000/fake-api/store/${id}`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Gaming Mouse Pro",
description: "Updated ergonomic gaming mouse with RGB lighting and faster response.",
category: "Accessories",
price: 1799,
stock: 18,
brand: "Shrimo Gear",
rating: 4.7,
image: "https://example.com/gaming-mouse-pro.jpg",
}),
});
const data = await response.json();
console.log(data);
};
updateStoreItem("672f0eaa814c297b16f90111");JavaScript (Axios)
import axios from "axios";
const updateStoreItem = async (id) => {
try {
const response = await axios.put(`http://localhost:3000/fake-api/store/${id}`, {
name: "Gaming Mouse Pro",
description: "Updated ergonomic gaming mouse with RGB lighting and faster response.",
category: "Accessories",
price: 1799,
stock: 18,
brand: "Shrimo Gear",
rating: 4.7,
image: "https://example.com/gaming-mouse-pro.jpg",
});
console.log(response.data);
} catch (error) {
console.error("Error:", error.message);
}
};
updateStoreItem("672f0eaa814c297b16f90111");Python
import requests
item_id = "672f0eaa814c297b16f90111"
payload = {
"name": "Gaming Mouse Pro",
"description": "Updated ergonomic gaming mouse with RGB lighting and faster response.",
"category": "Accessories",
"price": 1799,
"stock": 18,
"brand": "Shrimo Gear",
"rating": 4.7,
"image": "https://example.com/gaming-mouse-pro.jpg"
}
response = requests.put(f"http://localhost:3000/fake-api/store/{item_id}", json=payload)
print(response.json())Ruby on Rails
require "net/http"
require "uri"
require "json"
item_id = "672f0eaa814c297b16f90111"
uri = URI.parse("http://localhost:3000/fake-api/store/#{item_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = false
request = Net::HTTP::Put.new(uri.request_uri, {
"Content-Type" => "application/json"
})
request.body = {
name: "Gaming Mouse Pro",
description: "Updated ergonomic gaming mouse with RGB lighting and faster response.",
category: "Accessories",
price: 1799,
stock: 18,
brand: "Shrimo Gear",
rating: 4.7,
image: "https://example.com/gaming-mouse-pro.jpg"
}.to_json
response = http.request(request)
puts JSON.parse(response.body)Next.js
async function updateStoreItem(id) {
const response = await fetch(`http://localhost:3000/fake-api/store/${id}`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Gaming Mouse Pro",
description: "Updated ergonomic gaming mouse with RGB lighting and faster response.",
category: "Accessories",
price: 1799,
stock: 18,
brand: "Shrimo Gear",
rating: 4.7,
image: "https://example.com/gaming-mouse-pro.jpg",
}),
});
return response.json();
}/store/:idPartially update a store item
What it does: Use PATCH when you want to change only one or two fields.
When to use it: Use this when you only want to update stock, price, rating, or another small part of the store item.
Request Body
{
"stock": 12
}Example Response
{
"success": true,
"message": "Store item patched successfully.",
"data": {
"id": "672f0eaa814c297b16f90111",
"name": "Wireless Headphones",
"description": "Bluetooth over-ear headphones with noise isolation.",
"category": "Electronics",
"price": 2999,
"stock": 12,
"brand": "Shrimo Audio",
"rating": 4.6,
"image": "https://example.com/headphones.jpg"
}
}PATCH /store/:id examples by language
cURL
curl -X PATCH "http://localhost:3000/fake-api/store/672f0eaa814c297b16f90111" \
-H "Content-Type: application/json" \
-d '{
"stock": 12
}'JavaScript (Fetch)
const patchStoreItem = async (id) => {
const response = await fetch(`http://localhost:3000/fake-api/store/${id}`, {
method: "PATCH",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
stock: 12,
}),
});
const data = await response.json();
console.log(data);
};
patchStoreItem("672f0eaa814c297b16f90111");JavaScript (Axios)
import axios from "axios";
const patchStoreItem = async (id) => {
try {
const response = await axios.patch(`http://localhost:3000/fake-api/store/${id}`, {
stock: 12,
});
console.log(response.data);
} catch (error) {
console.error("Error:", error.message);
}
};
patchStoreItem("672f0eaa814c297b16f90111");Python
import requests
item_id = "672f0eaa814c297b16f90111"
payload = {
"stock": 12
}
response = requests.patch(f"http://localhost:3000/fake-api/store/{item_id}", json=payload)
print(response.json())Ruby on Rails
require "net/http"
require "uri"
require "json"
item_id = "672f0eaa814c297b16f90111"
uri = URI.parse("http://localhost:3000/fake-api/store/#{item_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = false
request = Net::HTTP::Patch.new(uri.request_uri, {
"Content-Type" => "application/json"
})
request.body = {
stock: 12
}.to_json
response = http.request(request)
puts JSON.parse(response.body)Next.js
async function patchStoreItem(id) {
const response = await fetch(`http://localhost:3000/fake-api/store/${id}`, {
method: "PATCH",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
stock: 12,
}),
});
return response.json();
}/store/:idDelete a store item
What it does: Use DELETE when you want to remove data.
When to use it: Use this when a user clicks a delete button and you want to remove the store item permanently.
Request Body
No request body needed for this method.
Example Response
{
"success": true,
"message": "Store item deleted successfully."
}DELETE /store/:id examples by language
cURL
curl -X DELETE "http://localhost:3000/fake-api/store/672f0eaa814c297b16f90111"JavaScript (Fetch)
const deleteStoreItem = async (id) => {
const response = await fetch(`http://localhost:3000/fake-api/store/${id}`, {
method: "DELETE",
});
const data = await response.json();
console.log(data);
};
deleteStoreItem("672f0eaa814c297b16f90111");JavaScript (Axios)
import axios from "axios";
const deleteStoreItem = async (id) => {
try {
const response = await axios.delete(`http://localhost:3000/fake-api/store/${id}`);
console.log(response.data);
} catch (error) {
console.error("Error:", error.message);
}
};
deleteStoreItem("672f0eaa814c297b16f90111");Python
import requests
item_id = "672f0eaa814c297b16f90111"
response = requests.delete(f"http://localhost:3000/fake-api/store/{item_id}")
print(response.json())Ruby on Rails
require "net/http"
require "uri"
require "json"
item_id = "672f0eaa814c297b16f90111"
uri = URI.parse("http://localhost:3000/fake-api/store/#{item_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = false
request = Net::HTTP::Delete.new(uri.request_uri)
response = http.request(request)
puts JSON.parse(response.body)Next.js
async function deleteStoreItem(id) {
const response = await fetch(`http://localhost:3000/fake-api/store/${id}`, {
method: "DELETE",
});
return response.json();
}Status codes made simple
200 OK
201 Created
400 Bad Request
404 Not Found
Best learning order
1. Start with GET /store
2. Then try POST /store
3. Then use GET /store/:id
4. Then learn PUT and PATCH
5. Finally test DELETE /store/:id
Frequently asked questions
What is a fake Store API?
A fake Store API is a sample or mock API used for testing, learning, prototyping, and frontend integration without depending on a live production backend.
Is this Store API free to use?
Yes. This Store API is designed for learning, testing, and developer practice.
Can I use this API with React or Next.js?
Yes. You can use this API with React, Next.js, JavaScript Fetch, Axios, Python requests, and other HTTP libraries.
What is the difference between PUT and PATCH?
PUT is generally used to replace the full resource with updated data, while PATCH is used to update only part of a resource, such as just the stock or price field.
Related links
Need this for a real project?
We can help you turn this workflow into a production-ready system.
Tools are useful for quick work, learning, and testing. If you need the same idea inside a real website, dashboard, CRM, portal, API, or business workflow, our team can plan, design, and build it with proper user roles, validation, performance, and long-term support.
Want to learn this properly?
Learn practical web development with guided training.
If you are a student, fresher, or developer building your skills, explore training and internship options instead of only using the tool once.
Related tools
