-
Notifications
You must be signed in to change notification settings - Fork 0
Description
A user may want to see his/her shopping cart, generating an HTTP request for fetching the shopping cart. Shopping cart contains all items that the user added before. The handler search among shopping carts of users and finds the user's shopping cart. Each user has only one shopping cart, if the handler finds more than one or zero shopping cart for the user it should return a meaningful response with a description. The user logged in the system and tried to fetch shopping cart, the handler should store a log from the items that the user added to the shopping cart for future item recommendations. An example JSON log object is { id: Number, userId: String, itemId: Number, action: String, date: String, adtType: String}. The handler may make use of a 3rd party persistence library. If any of the input arguments are empty or null, a 400 response should be returned with a description.
Important notes: The endpoint address is "/fetchShoppingCart", the URL query parameter is: "userId"