Send customer info
This documentation will describe how to transfer customer detalils to DeliverIt for later booking of the driver using DeliverIt’s interface.
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.
{company}
/create{company}
/{order_number}
/update{company}
/{order_number}
/cancelFor 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
{company}
/createOrder info, this is if you wish to transfer the customer details into our system. You can later via our interface see the customer and order a driver for the given customer. This is used when you have your own interface for displaying order content.
No order content (items ordered, amount, etc) are not transfered.
Address longtitude and latitude are optional. If you send a dirty address, the longitude and latitude might be calulated wrongly and your customer might not get the order in time.
Path variables
The company id givin at login.
Request parameters
Your unique order number
Name of the customer
8 digit number.
Send a cleaned version of the streetname. See http://dawa.aws.dk
Zip code for the city
Any remarks for the driver?
1 = paid, 0 = unpaid. Only paid orders are shown in our interface
Will the customer pick up the order or do you need delivery. 1= Delivery, 0 = no delivery
Address longitude. DeliverIt is not responsable for the correct longitude. If you have written a wrongfull address the coordinates will be with error as well. But we do our best
Address latitude. DeliverIt is not responsable for the correct Latitude. If you have written a wrongfull address the coordinates will be with error as well. But we do our best
Request headers
Your authorization code obtained via login.
Responses
If everything is fine. Order for self pickup
Body
If everything is correct but the order is not saved
Body
Trying to access an order that is not yours.
Body
{company}
/{order_number}
/updateIf you have send customer info to DeliverIt, and you need to update the information. It could be: updating the order from paid=0 to paid=1.
Path variables
The company id provided at login
DeliverIts order number. A unique string returned upon ordering
Request parameters
your unique ordernumber
Name of the customer
8 digit number
Send a cleaned version of the street. See http://dawa.aws.dk
The city corresponding to the zip code
If there are any remarks / instructions for the driver
1 = paid, 0 = unpaid. Only paid orders will be shown in the interface
1= delivery, 0 = no delivery and the customer will pick up the order
Address longitude. DeliverIt is not responsable for the correct longitude. If you have written a wrongfull address the coordinates will be with error as well. But we do our best
Address latitude. DeliverIt is not responsable for the correct Latitude. If you have written a wrongfull address the coordinates will be with error as well. But we do our best
Request headers
The authorization string provied at login
Responses
OK
Body
true
url for cancelation
When you try to update an order and the ordernumber does not exist
Body
{company}
/{order_number}
/cancelIf you have send customer info to DeliverIt, but your end customer canceles, you can use destroy to cancel the booking of a driver.
Path variables
The company id provided at login
DeliverIts order number. A unique string returned upon ordering
Responses
Cancelation ok
Body
There are nothing wrong with the data. But there are less then 15 minutes till pickup. The driver cannot be canceled.
Body
false
false
If the database is not updated
Body
When you are trying to delete an order that is not yours.