Miscellaneous

Here you can find descriptions for miscellaneous requests such as getting the price befor ordering.
Get price
GET /api/v1/request/price

Using this endpoint you can request the price. You need to be logged in and have the coordinates ready for the destination.

Request parameters

longitude
integer required

The longitude of the destination

latitude
integer required

The latitude of the destination.

Responses

400 Missing latitude

You will get this error if you dont send the latitude

Body
Object
error
boolean
Example:
true
message
string
Example:
Please send me the latitude
400 Missing longitude

You will get this error if you dont send the longitude

Body
Object
error
boolean
Example:
true
message
string
Example:
Please send me the latitude
200 OK

Everything goes well

Body
Object
error
boolean

Should be false

distance_in_km
number

The distance from the restaurant to the endcustomer

Example:
7.57
estimated_delivery_time_in_minutes
integer

Testimated time to go from the restaurant to the endconsumer

Example:
16
price_ex_vat
integer

The price without VAT

Example:
70
Create restaurant
POST /api/admin/create/customer

Authentication

Open

Use this to create your customers who needs delivery directly in DeliverIt’s system.

You need: special agreement with DeliverIt. Upon this you will receive bearer token.

Request parameters

firstname
string required

Firstname of the owner

lastname
string required

Lastname of the owner

email
string required

Email for the restaurant. This will be used as username

company
string required

Restaurant name

address
string required

Pickup address

Example:
Vestergade 65
zip
string required

Zip code

Example:
5000
city
string required

City

Example:
Odense C
deliveritcity
string optional

For internal use. 1= odense, 2=Aarhus, 3=aalborg, 4=Copenhagen

latitude
string optional

Latitude of the pickup address. It is prefered you send this along

longitude
string optional

Longitude of the pickup address. It is prefered you send this along

password
string optional

desired password for logging in the restaurant

opstart
string optional

Expected startup november 24th 2018 ( YYYY-MM-DD )

Example:
2018-11-24
test
boolean optional

1= test, the user will not be saved. 0 (or blank) = user will be saved.

Responses

201 Created

if test = 1 the HTTP code will be 200

Body
Object
error
boolean
Example:
false
msg
string
Example:
Perfect
pass
string
Example:
8JS5N
company
string
Example:
modojodo
username
string
Example:
j@deliverit.dk
400 Error

If required fieds are missing

Body
Object
error
boolean
Example:
true
msg
Object

Field and error displayed here