Design a REST API for E-commerce
Design a RESTful API for an e-commerce platform that handles products, orders, customers, and payments.
Functional Requirements
- Product catalog with categories, search, and filtering
- Shopping cart management
- Order placement and tracking
- Customer authentication and profiles
- Payment processing integration
- Inventory management
Non-Functional Requirements
- Handle 10,000+ requests per second
- Sub-100ms response times for reads
- Strong consistency for orders and payments
- API versioning strategy
- Rate limiting and throttling
Questions to Consider
- How do you design resource hierarchies and relationships?
- What pagination strategy works best for large collections?
- How do you handle partial updates vs full replacements?