Skip to content

The service app instantly connects you with trusted erranders to do your grocery shopping. So you can be more productive every day. There are two services running behind this to make process seamless. Orderer is the main web application which places the order and dispatcher dispatches all the assembled grocery items and send email

Notifications You must be signed in to change notification settings

VimleshS/run-my-errands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

run-my-errands

The service app instantly connects you with trusted erranders to do your grocery shopping. So you can be more productive every day. There are two services running behind this to make process seamless. Orderer is the main web application which places the order and dispatcher dispatches all the assembled grocery items and send email

How this service works?

Request to authenticate and generate token

Authorize youself with email and password, this will generate a token send it back to server in authorization header for authenticated api calls

curl -XPOST 'https://runaerrander.herokuapp.com/authenticate' -H 'Content-Type: application/json' -d '
{
    "email": "john.doe@gmail.com",
    "password": "mysecretpassword"
}
'

Response

{"token":"dfdfdf"}

Upload your grocery list

curl -XPOST 'https://runaerrander.herokuapp.com/uploadlist' \
-H 'authorization: bearer dfdfdf' \
-H 'Content-Type: application/json' -d '
{
    "id": 1,
    "total": 110,
    "groceries": [{
        "name": "Item1",
        "quantity": 50
    }, {
        "name": "Item2",
        "quantity": 60
    }]
}
'

A sample response

{
"id": 1,
"email": "john.doe@gmail.com",
"total": 110,
"groceries": [{
  "name": "Item1",
  "quantity": 50
}, {
  "name": "Item2",
  "quantity": 60
}],
"message": "Order processed and forwarded for dispatching"
}

You will receive a dispatch notification on your email.

Note

There is no validation of JSON request, be assured that you are using correct well formed json request

About

The service app instantly connects you with trusted erranders to do your grocery shopping. So you can be more productive every day. There are two services running behind this to make process seamless. Orderer is the main web application which places the order and dispatcher dispatches all the assembled grocery items and send email

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages