Describe the solution you'd like
[Level 2] Create a REST API, with the “/coupon/” service where the item_ids list and the amount coupon can be sent and return the items that the user would to buy.
Additional context
● There are users who have thousands of items in favorites.
● This api would need to scale to support traffic up to 100K rpm.
● Users usually mark the same items as favorites.
Describe the solution you'd like [Level 2] Create a REST API, with the “/coupon/” service where the item_ids list and the amount coupon can be sent and return the items that the user would to buy.
POST → /coupon/
Body
{ "item_ids": ["MLA1", "MLA2", "MLA3", "MLA4", "MLA5"], "amount": 500 }
Response
{ "item_ids": ["MLA1", "MLA2", "MLA4", "MLA5"], "total": 480 }
Additional context ● There are users who have thousands of items in favorites. ● This api would need to scale to support traffic up to 100K rpm. ● Users usually mark the same items as favorites.
The price of the items can be consulted through the API: https://api.mercadolibre.com/items