Ecommerce Mock API Template

Model a shopping experience with product listings, cart mutations, checkout confirmation, inventory limits, and order tracking.

Endpoint set

GET /api/products
GET /api/products/prd_100
POST /api/cart/items
POST /api/checkout
GET /api/orders/ord_204

Example response

{
  "id": "prd_100",
  "name": "Mock API Hoodie",
  "price": 6400,
  "currency": "USD",
  "inventory": 12
}

Include out-of-stock, empty cart, declined payment, invalid coupon, and order-not-found responses so the storefront can handle real buying conditions.

Internal links

Create ecommerce mock endpoints

Use these examples to create live mocks on HttpStatus.

Create Free Mock API