Book a driver
This documentation will describe how to order a driver at an exact time using our API or how to transfer your customer details to DeliverIt for later booking of a driver.
It will also tell you how to get a detailed list of your ordered drivers including timestamps for arrival, pickup, arrival at customer and done-time.
The flow for the ordering of a driver: You enter the customer information along with the requested pickup time. If the timeslot is available, everything is fine.
If the timeslot is not available, you will receive a new time near the requested time. You need to either accept the new time or deny the new time. URLs are provided. If you don’t have a login, and you are located in Odense, Aarhus, Aalborg or Copenhagen, please contact jim@deliverit.dk or soren@deliverit.dk to receive a login.
For logging in, you must first optain a username and a password from DeliverIt. When loggin in, the door for using the system is opened up.
DeliverIt uses basic Authorization and for the rest of the pages you need to included the Authorization in the header.
Request parameters
The username, most likely an email address
The password for the user.
Request headers
Basic authoriztion
Responses
If the user is succesfully logged in
Body
The company Id. Important to keep.
if the login fails.
Body
true / false
This is to feed DeliverIt with the information for necesary to request a driver
Request parameters
First name of the customer
Last name of the customer
Streetname and number
Zip code of the city
The city
The requested time. hh:mm (18:30). You can also type the whole date: yyyy-mm-dd hh:ii
Can be applied instead of time. Used to request arrival at customer instead of arrival at restraurant.
Telephone for the customer. Avoid country codes like 0045 and +45.
If the customer has any remarks the driver needs to know
Address latitude. example: 55.3957969
Address longitude. example: 10.3912053
Request headers
Basic abcdeftghijklmnopqrstuvxyz12345=
Responses
When trying to book befor of after open hours
Body
If the trip is placed at delivery without any time alteration
Body
Can be true of false depending on weather or not the requested time is available
Time of arrival at restaurant / shop
Estimated time of arrival at end-customer
if push is true, this link is to accept the pushed time
if push is true, this link is to decline the pushed time
Url to cancel the driver. You can cancel freely untill 20 minutes before pickup time
Use this link to get the status. This is for logging purposes. (from 01/09/2018)
Our price ex. vat
Distance in meters
Link for track n trace website
{company}
/{id}
The requested time is not available, the time will be pushed to the nearest free time slot. This is to accept the new time givin.
Path variables
Request headers
Basic abcdeftghijklmnopqrstuvxyz12345=
Responses
The trip is accepted
Body
The trip is already accepted
Body
This is false since the trip is already accepted
Unauthorized access
Body
If the time limit is exceeded or the order does not exist
Body
{company}
/{id}
If the order is push, and the restaurant cannot accept the new time, use this URL to deny the new time
Path variables
Request headers
Basic abcdeftghijklmnopqrstuvxyz12345=
Responses
The order is canceled
Body
false
If an input is missing or you should not be here
Body
{company}
/{weborderId}
You can use this to cancel a order. When you create the order, the cancel url is returned to you. Use the link to cancel a order You can also get the cancel url from “get orders period”
According to the term of trade orders where the pickup time is 15 minutes or less are imposible to cancel.
Path variables
Request headers
Basic abcdeftghijklmnopqrstuvxyz12345=
Responses
OK
Body
Error
Body
Invalid credentials. If you are not logged in Can also be you are trying to cancel a order that does not belong to you
{company}
/{weborderId}
Use this URL to receive time data. You recieve the URL at the moment you book the driver.
The url will return:
- Requested pickup time
- The time the driver arrives at the restaurant
- The time the driver leaves the restaurant
- the time the driver is expected to arrive at the customer
- the time the driver actually arrives at the customer
- the time the delivery is completed.
Timeformat is YYYY-MM-DD HH:ii:ss
Path variables
Responses
Body
if null, then the driver has not arrived at restaurant
If null, then driver has not left restaurant
if null, then driver has not arrived at customer
if null, then driver has not completed the delivery
If the weborder ID does not exist or belongs to you
Body
Get open hours for authenticated restaurant.