Free REST API for Testing and Learning

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/store

Base URL

http://localhost:3000/fake-api/store

What is this API for?

Use this API to practice CRUD operations with store items or products. CRUD stands for Create, Read, Update, and Delete.

Quick Test

Send a GET request to 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.

javascript
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.

json
{
  "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

GET/store

Get all store items. Use this for product lists, catalog pages, and dashboards.

GET/store/:id

Get one store item by ID. Use this for a detail page or edit form.

POST/store

Create a new store item. Useful for admin forms and inventory creation.

PUT/store/:id

Replace an existing store item with a full updated version.

PATCH/store/:id

Update one or more fields on an existing store item.

DELETE/store/:id

Delete a store item by ID.

GET/store

Get 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

json
{
  "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"
    }
  ]
}
Simple note: GET requests only read data. They do not create, update, or delete anything.

GET /store examples by language

cURL

bash
curl -X GET "http://localhost:3000/fake-api/store"

JavaScript (Fetch)

javascript
const getStoreItems = async () => {
  const response = await fetch("http://localhost:3000/fake-api/store");
  const data = await response.json();

  console.log(data);
};

getStoreItems();

JavaScript (Axios)

javascript
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

python
import requests

response = requests.get("http://localhost:3000/fake-api/store")
data = response.json()

print(data)

Ruby on Rails

ruby
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}"
end

Next.js

javascript
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>
  );
}
GET/store/:id

Get 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

json
{
  "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"
  }
}
Simple note: The ID identifies the exact store item you want to retrieve.

GET /store/:id examples by language

cURL

bash
curl -X GET "http://localhost:3000/fake-api/store/672f0eaa814c297b16f90111"

JavaScript (Fetch)

javascript
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)

javascript
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

python
import requests

item_id = "672f0eaa814c297b16f90111"
response = requests.get(f"http://localhost:3000/fake-api/store/{item_id}")

print(response.json())

Ruby on Rails

ruby
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}"
end

Next.js

javascript
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>
  );
}
POST/store

Create 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

json
{
  "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

json
{
  "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"
  }
}
Simple note: POST usually requires a request body containing the new data you want to save.

POST /store examples by language

cURL

bash
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)

javascript
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)

javascript
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

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

ruby
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

javascript
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();
}
PUT/store/:id

Replace 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

json
{
  "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

json
{
  "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"
  }
}
Simple note: Think of PUT as a full update. It is best when you are sending all major fields again.

PUT /store/:id examples by language

cURL

bash
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)

javascript
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)

javascript
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

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

ruby
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

javascript
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();
}
PATCH/store/:id

Partially 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

json
{
  "stock": 12
}

Example Response

json
{
  "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"
  }
}
Simple note: PATCH is ideal for lightweight updates such as changing only stock or price.

PATCH /store/:id examples by language

cURL

bash
curl -X PATCH "http://localhost:3000/fake-api/store/672f0eaa814c297b16f90111" \
  -H "Content-Type: application/json" \
  -d '{
    "stock": 12
  }'

JavaScript (Fetch)

javascript
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)

javascript
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

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

ruby
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

javascript
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();
}
DELETE/store/:id

Delete 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

json
{
  "success": true,
  "message": "Store item deleted successfully."
}
Simple note: DELETE usually only needs the resource ID in the URL.

DELETE /store/:id examples by language

cURL

bash
curl -X DELETE "http://localhost:3000/fake-api/store/672f0eaa814c297b16f90111"

JavaScript (Fetch)

javascript
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)

javascript
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

python
import requests

item_id = "672f0eaa814c297b16f90111"
response = requests.delete(f"http://localhost:3000/fake-api/store/{item_id}")

print(response.json())

Ruby on Rails

ruby
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

javascript
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

The request worked successfully and data was returned.

201 Created

A new store item was created successfully.

400 Bad Request

The request body is missing required fields or contains invalid data.

404 Not Found

The store item with that ID does not exist.

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.