Microservices Classroomnotes 08/Jan/2022

Lets Create Basket API

  • This basket api will be a shopping cart where you will be adding items
  • The BasketAPI will be the projects name and lets create it using Django Rest Framework, Backend databases can be postgres/mysql
  • The following will be the Models
  • BasketItem
    • Id
    • ProductId
    • ProductName
    • UnitPrice
    • Quantity
    • DiscountAmount
    • EffectivePrice
  • CustomerBasket
    • BuyerId
    • list[BasketItems] (One to many relationship)
  • The Following Will be API requests
  • POST /api/v1/basket/items => Add item to the basket
  • GET /api/v1/basket/items => Get All items from the basket
  • PUT /api/v1/basket/items/ => Update the Quanity
  • DELETE /api/v1/basket/items/ => Delete the Item from basket

  • Refer Here for the BasketApi Repository and Refer Here for the changeset

  • We will continue building basket API

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner