FakeStore Mock API Documentation
API Base URL: https://fake-store-api.mock.beeceptor.com
This API provides a mocked e-commerce backend with realistic JSON data for products, users, carts, and orders, designed for testing and demo projects.
Prepared by:
Md. Ebrahim Hossain
SQA Engineer at Achieve Test Prep (Newark, US)
Source API: Mocked by Beeceptor
Base URL
The mock API endpoint is:
https://fake-store-api.mock.beeceptor.com
Note: All documented endpoints start with `/api` relative to the base URL.
Product Operations
1. Get All Products
/api/products
Status Code: 200
Request (N/A)
No headers or body required.
GET /api/products HTTP/1.1
Response (200 OK - Excerpt)
HTTP/1.1 200 OK [ { "product_id": 1, "name": "Smartphone", "price": 599.99, "category": "Electronics", "reviews": [ { "user_id": 1, "rating": 5 ... } ] }, ... 8 more products ... ]
User Operations
1. Get All Registered Users
/api/users
Status Code: 200
Request (N/A)
No headers or body required.
GET /api/users HTTP/1.1
Response (200 OK - List of Users)
HTTP/1.1 200 OK [ { "user_id": 1, "username": "john_doe", "email": "john@example.com" ... }, { "user_id": 2, "username": "jane_smith", ... } ... 3 more users ... ]
Cart Operations
1. Get Shopping Carts
/api/carts
Status Code: 200
Mocks a list of shopping carts. Only one cart is returned in this example to represent the logged-in user's cart.
Request (N/A)
GET /api/carts HTTP/1.1
Response (200 OK - Single Cart)
HTTP/1.1 200 OK [ { "cart_id": 1, "user_id": 1, "items": [ { "product_id": 1, "quantity": 2 }, { "product_id": 3, "quantity": 1 } ] } ]
Order Operations
1. Get All Orders
/api/orders
Status Code: 200
Request (N/A)
GET /api/orders HTTP/1.1
Response (200 OK - List of Orders)
HTTP/1.1 200 OK [ { "order_id": 1, "user_id": 1, "total_price": 849.97, "status": "Shipped" ... }, { "order_id": 2, "user_id": 2, "total_price": 1149.98, "status": "Delivered" ... } ... 3 more orders ... ]
2. Check Order Status
/api/orders/status?order_id={order_id}
Status Code: 200
Request Example (Order ID 1)
GET /api/orders/status?order_id=1 HTTP/1.1
Response (200 OK - Order Details)
HTTP/1.1 200 OK { "order_id": 1, "user_id": 1, "status": "Shipped", "total_price": 849.97, "items": [ { "product_id": 1, "quantity": 2 }, { "product_id": 3, "quantity": 1 } ] }
3. Create or Update Order (PUT)
/api/orders
Status Code: 200
Note: The request data is typically sent in headers, as per the mocked API's unique documentation structure, though PUT requests usually use a body.
Request (Headers Provided by Mock API)
# Mock API specifies data via headers:
-H "user_id: 1"
-H "items: [ { product_id: 1, quantity: 2 }, { product_id: 3, quantity: 1 } ]"
PUT /api/orders HTTP/1.1
Response (200 OK - Confirmation)
HTTP/1.1 200 OK { "order_id": 6, "status": "Placed", "message": "Order successfully placed." }