Most staffed buildings in NY have a doorman that (among other duties) is in charge of scanning incoming mail and packages that are delivered to residents in the building to:
In our simplified scenario, a resident is defined by their full name and email. We assume that an email is a unique identifier for a resident (and that each individual has only one email address).
In the context of a dummy “Daisy Backoffice”, your goal is to implement a new service to notify users on all of their pending packages.
To complete the assignment we provide you with two API endpoints:
Packages - a service that returns data for packages
{
"result": {
"packages": [{
"id": "1",
"type": "Medium",
"carrier": "Amazon",
"recipient": {
"name": "John",
"email": "john@gmail.com"
}
}]
}
}
Notifications - a service that knows how to send notifications to users
Endpoint: POST https://hook.integromat.com/qru1b8pse4hcr12ojiyala2wigym8h4y
Data sent to this endpoint should be in JSON format and have the following structure:
{
"notify":[
{
"email":"user1@gmail.com", // Email of the user we want to notify
"content":"STRING CONTAINING THE NOTIFICATION CONTENT"
},
{
"email":"user2@gmail.com",
"content":"ANOTHER STRING WITH NOTIFICATION CONTENT"
}
]
}
Response: a string describing how many notifications has been sent
The goal of this assignment is to get an app with a ‘sleek’ feeling while keeping a clean code and good a clear app architecture beneath the surface.