Sunteți pe pagina 1din 2

Turvo India Pvt Ltd

hello-in@turvo.com

Task
Flash Sale API

Context
Sometimes for purely promotional purposes, e-commerce platforms offer attractive
deals like 1 rupee flash sale. That kind of incentive drives a lot of interest for eg. 20k
inventory sold in 2 seconds.

Problem Statement
Implement the API’s for an e-commerce application to facilitate the below mentioned
functionalities:-
Assume an e-commerce company sells wrist watches. The company plans for a
flash sale on a certain date for a specific time interval for ’n’ number of its watches. Users
are required to register for this flash sale event beforehand to purchase the products or
browse through the flash sale page. You can assume 2 watches are on flash sale and a
10 user base for implementation purpose - but the application can handle scaling on
number of products on flash sale and user base.

How do people know something like this is happening?


Well, the email invites would go out to the company user base asking them to register
before it's closed. The same email contains link to the final landing page as well.

Purchase

For the sake of simplicity, you can assume it’s a 1-click buy i.e. a successful response
after clicking this “BUY” button confirms your purchase (don’t worry about online
payment basically).

Constraints
The following conditions holding true in your solution :
• Don’t oversell or undersell
• Only registered users allowed to make a purchase.
What to provide?
• A robust & Concurrent Java Application with Flash Sale Functionality.

Expose only the relevant REST API’s (UI part can be skipped) which can handle the
functionalities related to the mentioned Flash Sale. 

Assume Login & Registration to the e-commerce system is not required. Registration to
the flash sale API needs to be implemented.
• List of all assumptions:

For any doubt/concern feel free to have as many assumptions (pls mention it).
• Share all the relevant documents and code base in a compressed file.
• Share a readme file that includes build process, steps to run, Rest API’s & Parameters
description for the required functionalities, and important informations if any.
• ** Bonus Point on storing purchase orders so that delivery can be scheduled post
purchase.

S-ar putea să vă placă și