Create a complete e-commerce API with products, shopping cart, orders, and payment processing. Perfect for building online store frontends.
First, create a new project in Mock API Builder:
ecommerce-api)Create a comprehensive product schema with pricing, inventory, and images:
| Field | Type | Description |
|---|---|---|
price | String | Current product price |
compareAtPrice | String/Null | Original price (for sale items) |
stock | Number | Available inventory |
rating | Float | Average customer rating (3.0-5.0) |
images | Array | Product image URLs |
/productsList products with advanced filtering, sorting, and search:
| Parameter | Description |
|---|---|
category | Filter by category |
minPrice | Minimum price filter |
maxPrice | Maximum price filter |
inStock | Show only in-stock items |
sort | Sort by: price, rating, name, created |
search | Search in name/description |
/products/:idGet full product details including all images, specifications, and reviews:
/cartRetrieve current cart with items and totals:
/cart/itemsAdd product to cart:
/cart/items/:productIdUpdate item quantity:
/cart/items/:productIdRemove item from cart:
/ordersCreate order from cart (checkout):
/ordersGet order history with status filtering:
Order Status Values: pending, processing, shipped, delivered, cancelled
/orders/:idGet complete order details with tracking:
/categoriesGet all product categories with counts:
/products/:id/reviewsGet product reviews and ratings:
/products/:id/reviewsSubmit a product review:
Complete React component with shopping cart:
You've built a complete e-commerce backend API with:
This API provides everything you need to build a production-ready e-commerce frontend. Add payment processing with Stripe or PayPal for a complete solution!