Use case: a Web API for an e-commerce site
So far, in this book, we’ve taken you through the process of building a front-end application for an e-commerce site. We used an AI assistant to help us with the front-end application. Now, we will build a Web API for the e-commerce site.
In the previous section, we used an AI assistant to help us create a Flask app. Now, we will use the AI assistant to help us create a Web API for an e-commerce site.
Step 1: Create a Web API for an e-commerce site
Let’s plan this task first. Based on previous chapters, the e-commerce site has the following features:
- Product catalog: Containing the products we aim to sell.
- Shopping cart: With a shopping cart, we can add products to the cart, remove products from the cart, and update the quantity of products in the cart. Once we’re happy with the products in the cart, we can check out and have the products paid for and shipped.
- A checkout process: In...