E-Commerce APIs
Mock data for online stores including products, categories, users, carts, and orders.
Auth
Login User
Mock login endpoint. Accepts username and password.
{
"username": "johndoe",
"password": "password123"
}Products
Get all products
Fetch a list of all products. Supports pagination (?limit=10&skip=0).
Get single product
Fetch details of a single product by its ID.
Add a product
Simulate adding a new product.
{
"title": "New Smartphone",
"price": 699,
"stock": 50,
"category": "smartphones"
}Update a product
Simulate updating a product.
{
"price": 899,
"stock": 40
}Delete a product
Simulate deleting a product.
Get product categories
Fetch a list of all available product categories.
Users
Get all users
Fetch a paginated list of mock users.
Get single user
Fetch details of a single user by their ID.
Add a user
Simulate adding a new user.
{
"firstName": "Alice",
"lastName": "Wonderland",
"email": "[email protected]"
}Update a user
Simulate updating a user.
{
"lastName": "Smith"
}Delete a user
Simulate deleting a user.
Carts
Get all carts
Fetch mock shopping carts. Can filter by user via ?userId=1.
Get single cart
Fetch a specific cart by ID.
Add a cart
Simulate adding a new cart.
{
"userId": 3,
"products": [
{
"id": 4,
"quantity": 2
}
]
}Update a cart
Simulate updating a cart.
{
"products": [
{
"id": 4,
"quantity": 5
}
]
}Delete a cart
Simulate deleting a cart.
Orders
Get all orders
Fetch mock orders. Can filter by user via ?userId=1.
Get single order
Fetch a specific order by ID.
Create an order
Simulate creating a new order.
{
"userId": 1,
"cartId": 1,
"totalAmount": 2133,
"shippingAddress": {
"city": "New York",
"zipCode": "10001"
}
}