Skip to content

Handle HTTP request to fetch the shopping cart of the user #3

@EmadAghaei

Description

@EmadAghaei

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions