Professional Documents
Culture Documents
Drive API Documentation
Drive API Documentation
Overview
Welcome to the DoorDash Developer platform. Using this API, you can leverage our on-demand
logistics platform to deliver your goods quickly and easily without the hassle of staffing your own
delivery fleet.
A delivery is created in a scheduled state with the event "delivery_created". The end state is
either "delivered" or "cancelled". Notable events changes delivery state and/or dasher state.
Authentication
We will be using stateful token based API keys for authenticating clients
CURL example:
curl -H "Authorization: Bearer ${apikey}" -v https://api.doordash.com/drive/v1/deliveries/${id}
Interface
Estimate Object
{
"id": 1,
"fee": 1000,
"currency": "USD",
"pickup_time": "" // if not provided. this is the latest possible pickup time
}
Delivery Object
{
"id": 1000,
"external_order_id": "ABC123" ,
"pickup_address": {
"street": "470 Olive Ave",
"unit": "10",//optional
"city": "Palo Alto",
"state": "CA",
"zip_code": "94306"
},
"pickup_instructions": "Please go to the loading zone in the back!",
"dropoff_address": {
"street": "565 Stanford Ave",
"unit": "10",//optional
"city": "Palo Alto",
"state": "CA",
"zip_code": "94306"
},
"dropoff_instructions": "Ring bell when here.",
"quoted_pickup_time": "2017-01-01T00:30:00+00:00",
"actual_pickup_time": null, // populated for active orders
"quoted_delivery_time": "2017-01-01T01:00:00+00:00",
"actual_delivery_time": null, // populated for completed orders
"order_value": 10000, // in cents
"fee": 1000, // in cents
"tip": 1000, // in cents
"currency": "USD",
"customer": {
"first_name": "Alex",
"last_name": "Grover",
"email": "alex@doordash.com",
"phone_number": "+19258908560 ext. 1000",
"business_name": "DoorDash"
},
"dasher": { // null for unassigned deliveries
"id": 100,
"first_name": "Rohit",
"last_name": "Rag",
"phone_number": "+12345678900", // masked, only valid before dropoff
"location": {
"lat": 123.45,
"lng": -37.91
}
},
"rating": { // can be null
"id": 40,
"rating": 1,
"comments": "test"
}
}
Rating Object
{
"id": 100,
"rating": 5, // out of 5
"comments": "Very polite and professional!"
}
Error Object
HTTP Status Code (200, 201, 400, 403, 404)
{"field_errors":[{"field":"dropoff_address","error":"Invalid dropoff address"}]}
Estimates
Also used for service area check.
POST /estimates
Sample Response
{ <estimate object> }
Possible Errors
400, "DoorDash does not serve the pickup area"
400, "Delivery is too far"
400, "Order value is too small"
400, "DoorDash is not open at pickup/delivery time"
400, "Pickup time too close to delivery time"
400, "Pickup time too far from delivery time"
400, "Invalid <param>"
Validations
Pre-validation for a delivery
POST /validations
Sample Response
HTTP 200/OK
{ "valid": true }
{"valid": false,"errors": [["phone_number","Phone number provided does not seem to be a valid
one"],["delivery_time","Delivery time must be at least 40 minutes in the future"]]}
Pagination (source)
&limit=100 - change page size. Valid values are between 1 and 100. Defaults to 10.
Request a delivery
POST /deliveries/
Sample Response
HTTP 201/CREATED
{ <delivery object> }
Possible Errors
400, "Delivery is too far"
400, "Order value is too small"
400, "Invalid <param>"
400, "DoorDash is not open at pickup/delivery time"
400, "Pickup time too close to delivery time"
400, "Pickup time too far from delivery time"
View a Delivery
GET /deliveries/<delivery_id>/
Sample Response
HTTP 200/OK
{ <delivery object> }
Possible Errors
404, "Delivery does not exist"
Update/Edit a Delivery
PATCH /deliveries/<delivery_id>/
Reschedule
This is allowed up to 2 hours before the scheduled pickup time.
The quoted_delivery_time has to be a valid delivery time (the stores delivery hours).
The quoted_pickup_time is optional because we calculate it based on the delivery time. When
specified, this has to be within 35 minutes of our calculated quoted_pickup_time, otherwise we
will use our calculation.
Example:
{
"quoted_delivery_time": "2017-01-02T01:00:00+00:00",
"quoted_pickup_time": "2017-01-02T00:30:00+00:00" // optional, will be recalculated if not
provided
"first_name": "Test",
"last_name": "Tester",
"business_name": "Doordash Test",
"customer_phone_number": "6086092247",
"dropoff_special_instructions": "Use the front door on Market Street"
}
Sample Response
HTTP 200/OK
{ <delivery object> }
Possible Errors
404, "Delivery does not exist"
400, "Unable to reschedule within 2 hours of pickup"
400, "DoorDash does not serve the pickup area"
400, "Pickup time too close to delivery time"
400, "Pickup time too far from delivery time"
400, "Phone number provided does not seem to be a valid one"
400, "Invalid <param>"
Cancel a Delivery
PUT /deliveries/<delivery_id>/cancel/
Sample Response
{
"cancelled_at": "2017-05-29T19:00:00.000Z"
}
Possible Errors
400, "Delivery already confirmed by restaurant
400, "Delivery can not be cancelled so close to estimated pickup time"
Ratings
View Existing Rating
GET /deliveries/<delivery_id>/rating/
Sample Response
HTTP 200/OK
{ <rating object> }
Possible Errors
404, "Rating does not exist"
Rate a Dasher
PUT /deliveries/<delivery_id>/rating/
Put Body Parameters
{
"rating": 5, // out of 5
"comments": "This is a test" // optional
}
Sample Response
HTTP 200/OK, HTTP 201/CREATED
{ <rating object> }
Possible Errors
404, "Delivery does not exist"
400, Invalid <param>
Webhooks
We send out the following events : and their meanings
delivery_created
dasher_confirmed: the dasher confirmed to do the delivery
dasher_confirmed_store_arrival: the dasher confirmed he has arrived at the pick up
location
dasher_picked_up: the driver has picked up the delivery items
dasher_confirmed_consumer_arrival: the dasher confirmed he has arrived at the drop off
location
dasher_dropped_off: the dasher had dropped off the delivery at destination.
delivery_cancelled: the delivery has been cancelled
The field delivery is the same format with the what the API returns when you call delivery create.
It has an additional field in "delivery.state" which can be "created", "assigned",
"dasher_confirmed_at_store", "picked_up", "delivered", "cancelled".
Billing
Billing will be handled monthly through invoicing.