Skip to main content

· 2 min read
Brian Quach

Webhooks are a critical part of a successful on-demand delivery integration. They enable DoorDash to inform your integration about delivery updates, like when the Dasher has arrived at the pickup location or where they are along their route in real time. This real-time information lets you keep both the sender and receiver of the delivery up-to-date with precisely what’s happening.

It can be challenging to develop and test the part of your integration that receives and handles webhooks. How can you confirm that DoorDash sent a webhook that you were expecting to receive? How can you confirm that your application parsed the webhook details correctly?

We’re introducing Event Logs to answer exactly those kinds of questions. Event Logs is a new view in the Developer Portal that shows a history of all the webhooks sent to your integration. Each log includes the endpoint to which the webhook was sent, the HTTP response code DoorDash received from that endpoint, and the full body of the webhook that DoorDash sent. You can search for all the webhooks for a particular delivery ID or inspect all of the webhooks that were sent in a specific date range.

A screenshot of the Event Logs view in the Developer Portal

Enroute webhooks & other Drive API updates

Alongside the new Event Logs, we’ve also brought some new features to the Drive API:

  • enroute webhooks can now be enabled for your integration, so you can receive frequent updates on the Dasher’s location
  • The new dasher_allowed_vehicles field enables you to specify the transportation methods that a driverDasher can use to make the delivery: "car", "bicycle" and/or "walking"
  • You can use the items field to provide more detail about what’s in the delivery; this detail can be seen by Dashers as they’re making the deliveries and by the receiver of the delivery on the tracking page

Event Logs and all of these new features are ready to use today! Check out the Event Logs view in the Developer Portal, and see the Drive API docs for more details on the new Drive API features.

· 4 min read
Eva Zhang

This post originally appeared on the Postman blog. Check it out here.

With unpredictable shipping delays and wait times, today’s consumer is looking for everything from same-day solutions for last-minute needs. From dry clean pickup during business trips to dog food purchases for furry friends, the various use cases for same-day delivery are growing. In this blog post, we’ll look into Drive, the best-kept secret at DoorDash.

An illustration showing a DoorDash driver on a scooter driving through a portal

Drive is a white label delivery API that allows businesses of all sizes to easily enable local fulfillment without the hassle of staffing their own delivery fleet. With a single API call, DoorDash Drive integration partners can request a delivery, which gets fulfilled by the DoorDash Dasher network.

Making Developers Productive

Bobby Abraham manages Developer Strategy & Operations at DoorDash and is primarily focused on working with partner development teams to onboard developers onto Drive. In an effort to make the developer experience immersive and seamless, Bobby decided to leverage the power of the Postman API Network. He created a DoorDash Public Workspace that would allow DoorDash to tap into Postman’s 20 million registered users in a central place. Here, Drive could get easy access to and be discovered by API consumers and API producers, providing merchants a cost-effective way to deliver products directly to customers on demand.

I thought the Postman Public API Network would be a great way to spread awareness of DoorDash Drive and provide a delightful experience for our developers. The Postman team was great in helping us understand how to optimize our documentation to serve our developer partners better. Bobby Abraham, Developer Strategy & Operations at DoorDash

After Joining Postman API Network

Since landing their Public Workspace on Postman API Network, the DoorDash team observed a significant decrease in development time for its partners. Developers can now make their first API call the same day they signup for Drive, and many partners have finished development in less than a week. This significantly decreases the time to first call (TTFC) partly due to the API-first design approach and in-depth documentation provided by the Postman API platform.

How to Get Started

Let’s look at how you can get started using the Drive API Postman Collection.

Setting Up

  1. Go to DoorDash Public Workspace to select a collection that matches the API you’d like to use. Then, fork the collection into your Postman workspace by clicking the button below.
A screenshot of the Postman fork collection dialog
  1. Once you have the fork of the collection, you’ll need to add a DoorDash Developer Access Key to your Environment. Go to DoorDash Developer Portal to create an account and an access key on the portal; make sure to leave the pop-up with the essential details open.

  2. Navigate to the left sidebar, click Environment, then click the + symbol. And name your environment “Drive sandbox.”

  3. Paste in the “developer_id,” “key_id,” and “signing_secret” values that you generated in step 2. Leave “JWT” blank.

A screenshot of the Postman environment screen
  1. In the upper right, next to the little Eyeball, click the dropdown and select the “Drive sandbox” environment you just created.
A screenshot of the Postman environment picker

Create a delivery (without hailing real Dashers)

Now you can create a delivery by making a request to Drive API using Postman. On the left sidebar, click Collections, then expand the Door Dash Drive collection that you forked and click Create a Delivery request. Click the Body tab to see the request that will be sent. Then click Send to create the delivery in the Drive sandbox environment.

A screenshot of the Postman request screen

Get the latest status of your delivery

In the left sidebar, click the Get Delivery Status request. Ensure that the URL of the request contains the external delivery ID “D-12345” you want to get, then click Send.

A screenshot of the Postman request screen

Wrapping up

If you’ve made it this far, you are ready to start adding delivery capabilities to your app and help your business reach an entirely new market!

Join the Postman API Network and share your APIs to 20M+ users in the world’s largest public API hub or book a call with one of Postman API Network Evangelists to learn more.

· 2 min read
Ruirui Yang

Beer, wine, and even to-go cocktails are becoming an incredibly common addition to delivery menus for both restaurants and other verticals like grocery and convenience. Adding alcoholic drinks is a great way to boost your average order size and grow your delivery business. DoorDash Developer and the Drive API make it easy to start your own alcohol delivery business or add alcohol to your existing deliveries.

Get started with alcohol delivery

If you already have an active Drive API integration, submit a support ticket and ask for alcohol delivery to be enabled. One of our operators will reach out within a few business days with a brief legal addendum for you to sign. Once that’s signed, you can create an alcohol delivery just like you’d create a standard delivery. Just add/update a few fields in the body of your request to the create delivery API:

"order_contains": {
"alcohol": true
},
"action_if_undeliverable": "return_to_pickup",
"contactless_dropoff": false

If you’re new to Drive, get started using our tutorials for Postman, Node.js, or direct API calls. Then, follow the alcohol delivery how-to guide.

Compliance is key

For all of the deliveries done through DoorDash’s network of Dashers, and especially for deliveries of regulated items like alcohol, we work hard to comply with local laws. Our product prompts Dashers to scan the customer’s ID and, in some jurisdictions, to collect the customer’s signature before delivery. Our Drive product only allows alcohol deliveries in jurisdictions where alcohol delivery is legally permissible, but it is your responsibility to ensure that you (or the merchants using your services) have the required retail alcohol licenses, and that you are only requesting delivery of the types of alcohol that are allowed under your license and local laws.

Next steps

Jump into alcohol delivery using our alcohol delivery how-to guide. We can’t wait to see the businesses you build and grow using Drive and alcohol deliveries.

· 2 min read
Kavya Vishwanath

Goods are commonly delivered by a business–a merchant that owns a collection of stores–and from a store: a physical location that prepares the goods for delivery. Accordingly, DoorDash maintains a data model of businesses and stores. This model helps us make faster and more accurate deliveries by ensuring that we have the right store location before a delivery is requested and allowing us to store additional information about how a Dasher can correctly locate a store. Now, in both the Drive and Drive (classic) APIs, you can create businesses and stores and then create deliveries for those stores.

Using businesses & stores

Using businesses and stores in your Drive API integration is straightforward: just create a business and create a store(s) underneath it using calls to the business & store APIs. Then, when creating a delivery or requesting a delivery quote, provide the pickup_external_business_id and pickup_external_store_id that you used when creating the business and store.

POST /drive/v2/deliveries

{
"external_delivery_id": "D-1763",
// other fields

"pickup_external_business_id": "b-234-dzs",
"pickup_external_store_id": "s-475-fnr",
}

When you create a delivery that provides business and store IDs, the store's address and contact details are used, so you don't have to provide them in every delivery request. Additionally, by creating stores in advance, you can verify that DoorDash's address resolution system saved the correct address for your store, which helps Dashers get to the right pickup location every time. Creating businesses and stores for your deliveries also lays the groundwork for getting access to future delivery capabilities that require additional, business-level configuration, like delivery for alcohol and prescriptions.

When you're ready to start using businesses and stores:

Drive (classic) user?

For Drive (classic) users who've previously managed stores using external forms or auto-onboarding, we're making it easier to manage the businesses and stores that you need in order to make deliveries. Your account manager or point of contact at DoorDash will be in touch with more details soon, but if you want to get a head start, use the upgrade guide that's right for your scenario:

· 2 min read
Jon Collette

Software development is more fun with teammates! Since launching DoorDash Developer, many of our early adopters have told us that they want to be able to share important information about their integration with DoorDash–things like simulated deliveries and access keys–with members of their team. I'm excited to announce that you can now do just that, with Organizations.

Organizations contain your members

You can see and add members on the Organization page in the Developer Portal. At launch, you can add up to 49 other people to collaborate with you. All you need to add a new member is their email address.

A screenshot of the organization members page in the Developer Portal

Organizations contain your billing and business details

Previously, DoorDash Developer combined your personal details with the details about your business: your business name, how you pay for deliveries, etc. Now, Organization Settings holds all these details, so everyone on your team can manage them.

Get started

If you're already using DoorDash Developer, head to the Organization page in the Developer Portal to add your first member!

If you're new to DoorDash Developer, sign up in just a few steps.

· 2 min read
Alex Mullans

Over the past few months, we've been hard at work unlocking new scenarios and adding new features to the DoorDash Drive API. With return-to-pickup, you can now deliver non-perishable and high-value goods that need to be returned to you if the customer is unavailable. If you use OAuth to protect your internet-facing endpoints, Drive and Drive (classic) can now send webhooks authenticated with OAuth. And, with invoiced billing support, you can choose to receive a monthly invoice for your deliveries, rather than paying upfront with a credit card.

Return to pickup

In the event a customer is unavailable to receive a food delivery, DoorDash first tries all available methods to reach the customer but, if we're not successful, the Dasher will dispose of the delivery. For higher-value goods and non-perishable goods, it's often preferable to have the delivery returned to its pickup location if the customer is unavailable. Now, you can, by creating "return-to-pickup" delivery using the Drive API!

Read the return to pickup how-to guide for more details, or just use the action_if_undeliverable=return_to_pickup field when you call the delivery creation API

OAuth webhooks

Previously, DoorDash could only send webhooks to unauthenticated endpoints and endpoints protected by HTTP Basic authentication. We heard from many of you that your IT and Security teams preferred to protect all internet-facing endpoints with OAuth instead. So, we've added OAuth as a new option for webhook authentication. Learn more in the webhooks how-to guide.

A screenshot of the modal for creating a new webhook endpoint

Invoiced billing

If you're a platform business that serves a variety of merchants, each with their own customers, you might like the ability to pass on charges, like DoorDash's delivery fees, to those merchants. Previously, the Drive API charged you (the developer) for each delivery as you created them. Now, you can request to receive a monthly invoice that can be paid by credit card or ACH transfer. Submit a support request to get started.

· 3 min read
Alex Mullans

The Drive APIs bring the power of DoorDash’s same-day local delivery to your application. You can build an app, using any programming language and runtime you want, to deliver goods from you to your customers–or from your customers back to you! Your application calls the APIs, and Dashers deliver your goods. Now, to make it even faster to add delivery to your application, we’re introducing SDKs for common languages, starting with JavaScript.

The new DoorDash Node.js SDK takes care of the boilerplate work of using our API, like setting up the authentication token and making HTTP requests. SDKs generally make it faster to use an API because they take care of this boilerplate work so you can get right to the task you’re trying to achieve–say, creating a delivery and requesting a Dasher. They can also help you write code more quickly because your code editor can provide inline documentation and autocomplete suggestions.

In the screenshot below, the code on the left creates a delivery using the Create Delivery API directly; the code on the right, using the DoorDash Node.js SDK.

A screenshot comparing JavaScript code calling the APIs directly vs. using the DoorDash Node.js SDK

Install the SDK to get started

Getting started with our Node.js SDK is easy: just run npm i --save @doordash/sdk to install it from npm and then reference it in your application.

The SDK's readme contains snippets showing you how to use the SDK in both JavaScript and TypeScript. If you don’t have the access key details needed to create the client, you can create them in the Developer Portal.

Note: You must be using the new Drive APIs, not the Drive (Classic) APIs, to use the DoorDash Node.js SDK.

Examples of using the SDK

Here’s a simple example of creating a delivery in JavaScript:

import { DoorDashClient } from '@doordash/sdk'
import { v4 as uuidv4 } from 'uuid'

const client = new DoorDashClient({
developer_id: '{your developer_id}',
key_id: '{your key_id}',
signing_secret: '{your signing_secret}',
})

const response = await client.createDelivery({
external_delivery_id: uuidv4(),
pickup_address: '1000 4th Ave, Seattle, WA, 98104',
pickup_phone_number: '+1(650)5555555',
dropoff_address: '1201 3rd Ave, Seattle, WA, 98101',
dropoff_phone_number: '+1(650)5555555',
})

And here’s one in TypeScript:

import {
DeliveryResponse,
DoorDashAuthorizationError,
DoorDashClient,
DoorDashResponse,
} from '@doordash/sdk'

import { v4 as uuidv4 } from 'uuid'

const client = new DoorDashClient({
developer_id: '{your developer_id}',
key_id: '{your key_id}',
signing_secret: '{your signing_secret}',
})

client
.createDelivery({
external_delivery_id: uuidv4(),
pickup_address: '1000 4th Ave, Seattle, WA, 98104',
pickup_phone_number: '+1(650)5555555',
dropoff_address: '1201 3rd Ave, Seattle, WA, 98101',
dropoff_phone_number: '+1(650)5555555',
})
.then((response: DoorDashResponse<DeliveryResponse>) => {
// do something
})
.catch((err: any) => {
// handle error
})

As the DoorDash Developer community grows, we expect to create more SDKs in additional languages. Bookmark our blog to stay updated.

· 2 min read
Alex Mullans

We commonly hear from DoorDash customers that they love being able to track their delivery in the DoorDash app: “Has the Dasher arrived yet?” “How far away are they?” “Are there any problems?” We've also heard from developers using the DoorDash Drive APIs that it’s important for you to be able to answer those questions in the apps you’re building.

We’re excited to announce that you can now use webhooks in apps that use the Drive API. (If you’re using Drive Classic, webhooks are already supported.) Webhooks enable near-real-time information flow from DoorDash and our Dashers to your application and your customers. With webhooks, you can enable real-time scenarios like a map view showing your customers how far away their Dasher is, push notifications telling your customers the latest status of their order, and much more. You can get this information flowing in just a few hours of dev time, using the same skills and techniques you use to call the Drive API.

An animation of code being written to receive a webhook event and print a message

Configure webhooks in the Developer Portal

To set up your webhook endpoint, visit the webhooks page in the Developer Portal. Then, click the plus symbol and fill in the details of the endpoint in your app that will receive the webhooks from DoorDash.

A screenshot of the webhooks page in the DoorDash Developer Portal

Webhook events for the entire delivery journey

At launch, the Drive API provides webhooks for events like DASHER_CONFIRMED–when a Dasher has accepted your delivery and is on the way to pickup–and DASHER_DROPPED_OFF–when the delivery is complete. Visit the webhooks docs to see all of the webhooks your app should be prepared to receive.

Get started

When you’re ready to jump in with webhooks, just visit the webhooks page in the Developer Portal to get started. If you’re new to DoorDash Developer, you can also learn more in the DoorDash Developer introduction.

· 3 min read
Bethany Christy

With DoorDash Developer, any company, big or small, can now easily offer local delivery to their customers.

The Developer Portal is a tool designed to empower developers to explore and build to DoorDash’s Drive fulfillment API seamlessly.

In just a few minutes, you can create a developer account and start testing code in our sandbox environment. Once you’ve completed development and a demo, and reviewed the demo with the DoorDash team, you’ll be able to generate production credentials within the Portal and can start requesting Dashers to fulfill deliveries for your business.

To help you get started, here are a few FAQs from our users.

Doordash

What are the differences between DoorDash Drive and DoorDash Marketplace?

DoorDash Marketplace (i.e. the DoorDash App) allows customers to find your business and place orders. DoorDash Drive allows you to offer delivery on your own platform, such as your own app or website. The order details are communicated to DoorDash Drive via API, and a Dasher will handle pickup and delivery for you.

What countries does DoorDash Drive operate in?

During this beta period, the standard DoorDash Drive API only allows for deliveries within the US. If your business operates in Canada or Australia, you will need to build to the Drive (classic) API. Note that Drive (classic) is only available to a limited group of users. Please reach out via the Support page if you need support for CAN/AUS deliveries and are not using Drive (classic).

Who can create a Developer account?

Anyone with an email address can sign up as a DoorDash Developer! Our Developer Portal is designed to streamline the integration process for anyone looking to leverage DoorDash fulfillment in their business, from single retail brands to enterprise-level merchant services platforms.

How much does delivery through DoorDash Drive cost?

The fee for deliveries requested through our standard Drive API is dynamic, based on the distance between pickup and dropoff. Deliveries within 5 miles incur a base rate of $9.75. For deliveries beyond 5 miles, the fee is an additional $0.75 per mile up to a maximum of 15 miles. This rate takes into account that tips are optional.

For developers building to our legacy API (i.e. Drive classic), DoorDash charges a flat $7.00 fee per delivery, plus all tips paid by the end user. Tips are paid directly to the Dasher and are required in the UI for all developers building to this API. This rate assumes that DoorDash is either the exclusive delivery provider for your business, or that DoorDash has the right of first refusal on all deliveries. Note that Drive (classic) is only available to a limited group of users.

Do you have rate limits?

The limit is set to approx. 300 requests in a 60 second period. If you are planning to conduct any load/resiliency tests, please reach out to the DoorDash team via the Support page at least 3 days in advance. Failure to notify DoorDash of load testing may result in the disabling of your API credentials.

· 3 min read
Patrick Simonson

If you’re looking to find new revenue streams for your business, look no further than local delivery. Businesses like yours are adding local delivery to reach new customers, and offering convenient solutions for existing customers.

Doordash

Reach new customers with local delivery

The needs of restaurants and small businesses continue to change in a post-pandemic world. In fact, 65% of restaurants say they were able to increase profits during COVID-19 by offering delivery via DoorDash.

With unpredictable shipping delays and wait times, today’s consumer is looking for same-day solutions to a wide variety of challenges. From a little black dress for an impromptu date night to dog food for Sparky, the various use cases for same-day delivery are growing.

So let’s break down the benefits of adding local delivery:

  • Instantly add same-day delivery options. No need to hire your own fleet of drivers. You can quickly enable local delivery by integrating your point-of-sale system or website with DoorDash.
  • Compete with big-box retailers. You don’t need to be a multi-billion dollar business to offer same-day delivery. Now your customers will be able to shop local while still getting their items delivered in a timely fashion.
  • Reach new customers. With local delivery, you’ll be able to reach a new market, such as people without a car, people working from home, and busy parents.
  • Provide same-day solutions for your existing customers. Your regulars will thank you for an option to have their items delivered, giving them more time back in their day.

You can now leverage DoorDash’s network of over 200,000 drivers

Oftentimes, businesses are hesitant to add delivery to their existing model. Hiring drivers, managing a fleet of vehicles and organizing deliveries can be a headache.

With DoorDash Developer, any company, big or small, can now easily offer local delivery to their customers. Our straightforward integration works whether you’re looking for 1 delivery a week or hundreds of deliveries a day.

No headaches, no complicated processes, just streamlined delivery from your store to your customers.

Plus, pricing is straightforward.

The fee for deliveries requested through our standard Drive API is dynamic, based on the distance between pickup and dropoff. Deliveries within 5 miles incur a base rate of $9.75. For deliveries beyond 5 miles, the fee is an additional $0.75 per mile up to a maximum of 15 miles. This rate takes into account that tips are optional.

For developers building to our legacy API (i.e. Drive classic), DoorDash charges a flat $7.00 fee per delivery, plus all tips paid by the end user. Tips are paid directly to the Dasher and are required in the UI for all developers building to this API. This rate assumes that DoorDash is either the exclusive delivery provider for your business, or that DoorDash has the right of first refusal on all deliveries. Note that Drive (classic) is only available to a limited group of users.