Saltar al contenido principal

Group deliveries using stores

API: Drive

This doc covers the Drive API. If you're using the Drive (classic) API, see the how-to guide for using businesses & stores with Drive (classic).

1. Prerequisites

Make sure you've created an access key and generated a JWT.

2. Map your data model to DoorDash's data model

DoorDash uses businesses to represent a legal entity or owner and stores to represent a single location that makes deliveries (learn more in the business & store reference guide). If your system has a similar two-tier data model, you can create a business for each legal entity and as many stores as needed under that entity. If your system has a one-tier data model, you can just create a business and a single store for each corresponding store in your data model.

3. Create a business

Create a business using an external identifier of your choice. We recommend using the same identifier that you use to represent the business in your own systems to make it easier to troubleshoot issues.

HTTP POST /developer/v1/businesses

"external_business_id": "a0720d55-7cbe-41ce-8185-58285b7985cd",
"name": "Neighborhood Deli",
"description": "Neighborhood deli that has great sandwiches and coffee",
"activation_status": "active"

4. Create a store

Create a store, or as many stores as needed, under the business you created in the last step.

HTTP POST /developer/v1/businesses/{{external-business-id}}/stores

"external_store_id": "ed178ef3-b486-4ce8-8baa-5bc9f0f3fa4a",
"name": "Neighborhood Deli #10",
"phone_number": "+12065551212",
"address": "901 Market Street, 6th Floor, San Francisco, CA, 94103"

5. Create a delivery

Once you've created a business and a store, you can associate deliveries with those stores by providing the external IDs of the business and the store. DoorDash will then take pickup delivery details, such as pickup_address and pickup_phone_number, from the store's configuration. When you create a delivery for a store, you don't need to pass these fields in the request body.

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",

Next steps

Now that you know how to use businesses and stores, you can: