[go: up one dir, main page]

100% found this document useful (1 vote)
236 views43 pages

Drive API Playbook (NA)

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 43

INTEGRATION PLAYBOOK

Updated: July 2021

CONFIDENTIAL
Fulfillment Integrations

API Integration Overview

● API Overview

● Delivery Simulator

● FAQ & Resources

● Invoicing

● Merchant Onboarding

● Appendix

CONFIDENTIAL 2
Fulfillment Integrations

API Overview

CONFIDENTIAL 3
Fulfillment Integrations

Order Flow

1. Order Placed 3. Delivery Response 5. Customer Notified 7. Goods delivered


Customer Places DoorDash confirms, Customer receives Dasher picks up goods
Order into online provides delivery “ID”, SMS and tracking URL and delivers to
ordering system quoted pickup and once dashers customer
delivery time. assigned.

2. Delivery request 4. Dasher claims 6. Lifecycle Updates 8. Partner invoiced


Call API with delivery info. Dasher claims the Updates throughout DoorDash invoices
Wait for DD response order and heads to delivery lifecycle via merchant monthly
before charging customer store. webhook.
card. Average response
time < 2000ms p95
CONFIDENTIAL 4
Overview:
Integration Timeline

Phase I: Scoping Phase II: Dev Work Phase III: Testing GO LIVE
● Introduce technical teams ● Coordinate with Integration Partner ● E2E Demo ● API support
● Share API documentation developers to provide integration support ● Review API, order, dispatch flows ● Additional
TASKS

● Create and issue test API Key ● Test for valid responses ● Issue the production API Key requests
● Grant delivery simulator access ● Track and address API errors ● Live test production environment
● Share contract templates ● Onboard restaurant partners

Launch Date
TIMELINE

1 week 4 weeks 6 weeks


Integration Partner is equipped DoorDash will prepare an Live testing
to begin dev work E2E testing call concludes

CONFIDENTIAL
Fulfillment Integrations

Points of Emphasis
● Estimates Endpoint - required for integration. Estimates call should occur in the beginning of the customer journey, eg customer
clicks “Order Delivery” at which time delivery address is requested and sent (along with store pickup address) to the /estimates
endpoint for coverage validation.
● ASAP vs. Scheduled Deliveries: we highly recommend passing pickup_time for ASAP orders and delivery_time for scheduled
deliveries.
● External_business_name: Used for platform partners representing multiple restaurant partners. Name of restaurant concept, eg
“McDonald’s”. For onboarding franchise groups, external_business_name = {legal entity name}. This field is not required in testing,
but is required in production.
● Pickup_business_name (applies when DoorDash invoices Merchant): Field used when external_business_name is not name of
restaurant, i.e. onboarding franchise groups. When onboarding franchise locations, external_business_name = {franchisee business
name} and pickup_business_name = {restaurant name}. When passed in the API request, pickup_business_name is displayed to
dashers and customers in SMS notifications.
● Order_value: food subtotal required for validation/delivery. Passed in cents, ie $10 = 1000, value must be [0,300000] i.e. $3k limit
● Pickup/Delivery Time: in your request, you will specify either pickup_time or delivery_time, not both. Requested times need to be
formatted to ISO 8601 guidelines. Ex: 2020-04-15T12:00:33Z.
● External_delivery_id: order reference ID which will be included in DoorDash invoicing file (monthly)
● External_store_id: store reference ID which will be included in DoorDash invoicing file (monthly)
● Driver_reference_tag: order ID dashers should reference when picking up from store (not required) - also shows up in DD portal
● Customer Phone Number: python library used to validate phone number: https://pypi.org/project/phonenumbers/
● Retries: Please retry all 500 response status codes as the error could be transient. We recommend up to 3 retries with some
exponential backoff delay between requests.
6
CONFIDENTIAL
Fulfillment Integrations

External Business Name & Pickup Business Name


External_Business_Name: is a field used for grouping stores under a single parent group. Each distinct pickup address included with
a single external_business_name value will create a parent grouping for those pickup addresses which represent individual store
locations. Ex: external_business_name = “McDonald’s” and each pickup address represents a store. This business/store grouping is
only visible to DoorDash. When DoorDash invoices the merchant, we invoice each external_business_name individually. This field is
required in production and each one should represent a single brand.

Franchised businesses: when working with restaurants that have franchisees, corporate stores are onboarded under their own
external_business_name and franchisees are onboarded under separate names (generally legal business name). This allows
DoorDash to invoice corporate and franchisees individually.

Pickup_business_name: is a field that allows you to specify a more specific name for the restaurant or store. Most commonly, this is
used when external_business_name = legal business name/name of franchise business. When pickup_business_name is stated in
the request, we use that as the restaurant reference in our communication with customers and dashers. Details below:

SMS notifications: DoorDash defaults to using external_business_name as the “restaurant name” we reference in our SMS alerts to
customers. Ex: “Your order from {external_business_name} is being delivered by DoorDash”. When external_business_name is not
used, or does not equal name of the actual restaurant, i.e. “McDonald’s”, we highly recommend using pickup_business_name to
supply the name of the restaurant.

7
CONFIDENTIAL
Fulfillment Integrations

Integration Checklist
Required for Certification:
1. End-to-End Order Demo - screenshare taking DoorDash team through test order. Required before issuing production key.
2. Estimates Call - validated during e2e demo
3. Preselected Tips - validated during e2e demo
4. Store Selection Logic - how are you selecting pickup location based on customer address. Are you configuring radius on your
platform? - validate/discuss during e2e demo
5. Customer phone number shared with merchant - Restaurants will need access to customer phone number should they need to
interact with support.
6. Supply DD with dev support email for API changes and outage alerts

Optional:
1. Provide DD with a single endpoint for webhooks (NOTE: only 1 endpoint can be configured per developer)

CONFIDENTIAL 8
API Flow
Fulfillment Integrations

Delivery Simulator

DoorDash will provide access to our simulated environment to test the integration. When logged in as a developer, you can:

● URL: doordash.com/drive/portal/simulator
● Create a test delivery. We recommend testing one delivery at a time.
● Transition the delivery through the happy path - create, driver claims, picks up, drops off.
● Receive webhooks for these events if an endpoint is configured.
● Have access to our web-hosted API documentation once logged into the Drive Portal Simulator.

CONFIDENTIAL 10
Fulfillment Integrations

POST Estimates Endpoint


The Estimates endpoint is used to:

● Check availability of Dashers for a given time. - valid response will return quoted pickup/delivery time.
● Give the end consumer a sense of how quickly they can get a delivery.
● Check whether a particular combination of pickup and delivery address can be serviced
● Time Format: always in UTC.

Calling estimates endpoint is required. Estimates typically occur at beginning of customer ordering experience when a customer selects
“Order Now”. Integration partner prompts customer to enter delivery address and assigns to nearest pickup location offering delivery. Two
address are included in estimates call.

Required fields:

1. External_business_name
2. pickup/dropoff address
3. Pickup or delivery time
4. Order_value between 0 and 300000 (in cents)

CONFIDENTIAL 11
Fulfillment Integrations

POST Validations Endpoint


The Validations endpoint should precede the delivery request. This call is not required, but is recommended. The validations
call validates coverage, dasher availability and customer personal and order information.

The Validation call will catch any errors with customer phone number, order subtotal, address coverage, pickup/delivery time.

Time Format: UTC

Required fields:

1. External_business_name
2. Pickup_business_name: if working with franchise groups or external_business_name is not customer-facing brand
name
3. Pickup/dropoff address + phone numbers
4. Pickup or delivery time
5. Order_value between 0 and 300000 (in cents)
6. Tip (in cents)
7. Customer name and phone number

CONFIDENTIAL 12
Fulfillment Integrations

POST Delivery Creation


The deliveries endpoint is used to request a delivery when you have all required customer/order information and customer has “placed”
their order.

● ASAP Orders: send through requested pickup_time for arrival accuracy. Online ordering system should reference item make
times when sending asap requests. If pickup_time is sent with short notice, eg 5 minutes from current time, DoorDash will provide
earliest available pickup_time.
● Scheduled Orders: send requested delivery_time for delivery time accuracy
● Time Format: UTC.

Required Fields: If not specified, all other fields in API documentation are optional

1. External_business_name
2. pickup/dropoff address
3. Pickup phone number: Dasher can only be reached from this number
4. Pickup or delivery time
5. Order_value between 0 and 300000 (in cents)
6. Tip (in cents)
7. Customer Name and phone number: Dasher can only be reached from this number

CONFIDENTIAL 13
Fulfillment Integrations

PUT Cancel Delivery


Once within 2 hours of quoted pickup time, deliveries cannot be cancelled in the API. Restaurants will need to cancel the order
by contacting DoorDash merchant support.

CONFIDENTIAL 14
Fulfillment Integrations

Webhooks

DoorDash can support a single URL endpoint for staging and production environments, respectively. Please send endpoint to
your DoorDash contact to configure endpoint.

Overview: Summary of default status events. These are the events you will receive for all deliveries once an endpoint has been
configured with your developer account.

● Delivery_created
● Dasher_confirmed
● Dasher_confirmed_store_arrival
● Dasher_picked_up
● Dasher_confirmed_consumer_arrival
● Dasher_dropped_off

Included fields in event payload: “driver_reference_tag”, “external_store_id”

Enroute Status Events: includes dasher lat/long coordinates every 30 seconds. Must contact DoorDash to have enabled.

CONFIDENTIAL 15
Fulfillment Integrations

Integration Checklist
Required for Certification:
1. End-to-End Order Demo - screenshare taking DoorDash team through test order. Required before issuing production key.
2. Estimates Call - validated during e2e demo
3. Preselected Tips - validated during e2e demo
4. Store Selection Logic - how are you selecting pickup location based on customer address. Are you configuring radius on your
platform? - validate/discuss during e2e demo
5. Customer phone number shared with merchant - Restaurants will need access to customer phone number should they need to
interact with support.
6. Supply DD with dev support email for API changes and outage alerts
7. All required fields are passed in requests (e.g. external_business_name)

Optional:
1. Provide DD with a single endpoint for webhooks (NOTE: only 1 endpoint can be configured per developer)

CONFIDENTIAL 16
Fulfillment Integrations

Certification Call
Prior to issuing a production key, DoorDash and integration partner will conduct an end-to-end demo of the integration, accomplishing
the following:

1. Delivery Enablement within merchant system (how does a merchant enable delivery on your platform)

2. Steps for onboarding in API (merchant sign-up, communication between all 3 parties, collateral distribution, etc.)

3. Live demo in staging site - integration partner takes DoorDash team through test delivery, illustrating when API calls are being

executed and discussing order transmission to merchant partner.

4. Order flow (order placed, order received, dispatching, support, cancellation, etc)

5. Discussing other operational best-practices and reviewing any technical related specifications

CONFIDENTIAL 17
Fulfillment Integrations

Production Credentials

After the certification call, provided that all integration requirements are met, the DoorDash team will provision production
credentials.

● Important Note: We will create 1 API key per Integration Partner

● Depending on the established billing arrangement, DoorDash may provision a unique key for each country that the
Integration Partner operates in.

CONFIDENTIAL 18
Fulfillment Integrations

API Errors
Common Errors:

● Pickup or Dropoff Address - outside coverage


○ Ex: “Dropoff address not within service area” <- this address is not covered by DoorDash
○ Ex: “DoorDash does not serve this area”
● Unavailable Pickup/Delivery Time
○ Ex: “DoorDash is not open for delivery at requested pickup time” <- DoorDash is not operational at this time
○ Ex: “The earliest dasher pickup time is 6:30am on the selected date” <- specifies earliest pickup time
● Phone Number
○ Ex: “Phone number provided does not seem to be a valid one”
● Order_Value
○ Ex: “Please enter subtotal $_ or greater”
● Duplicate Delivery Request
○ Ex: “Delivery has been placed” <- if you’re using the same external_delivery_id for a duplicate request, DoorDash will
flag and return initial delivery confirmation “ID” in payload

Please retry all 500 response status codes as the error could be transient. We recommend up to 3 retries with some exponential
backoff delay between requests.

CONFIDENTIAL 19
Fulfillment Integrations

Delivery Simulator

CONFIDENTIAL 20
Fulfillment Integrations

CONFIDENTIAL 21
Fulfillment Integrations

CONFIDENTIAL 22
Fulfillment Integrations

FAQ & Resources

CONFIDENTIAL 23
Fulfillment Integrations

FAQ
● How is radius determined? Radius is set at consumer level. DoorDash does not guarantee radius for any store.
● What phone number format is used? E.164
● Do you support oAuth2 as an authentication mechanism for our endpoint URL for the webhook? Not currently
● Do you pass ratings object? No, not currently
● Is vehicle type provided in response? No
● UTC vs. Local Time Zones: UTC is 8 hours ahead of PST, 9 MST, 10 CST and 11 EST
● Do you tax delivery fees? Only in Canada. DoorDash pays federal tax on deliveries in Canada. The “Fee” returned in
estimates/delivery call will be combined fee + tax. Delivery Fee and tax will be separated in invoice.
● How will I be notified of service disruption? Please provide a dev support email to DoorDash to receive status alerts around
outages.
● Can I get access to the Drive portal for my restaurant partners? No, we can only provision portal access to the restaurant owner
and their staff.

Urgent API needs should be sent to drive-api-support@doordash.com


For general questions, please contract drive-integrations@doordash.com

CONFIDENTIAL 24
Fulfillment Integrations

Resources

Resources (can be shared with merchant partners):

● DoorDash Support Guidelines for restaurant/store operators - Link


● Refund Matrix - Link
● DoorDash Drive Portal Overview (US merchants), (Canada)
● Customer SMS Notifications - Link
● Sample Invoice (Link), Sample invoice CSV (Link)
● For developers: Urgent API needs should be sent to drive-api-support@doordash.com
● For general questions, please contract drive-integrations@doordash.com

CONFIDENTIAL 25
Fulfillment Integrations

Onboarding & Invoicing

CONFIDENTIAL 26
Fulfillment Integrations

Merchant Onboarding
Merchants and their stores can be onboarded following the below instructions:

DoorDash Invoices Middleware Partners:

1. DoorDash will provide Middleware Partner with standard pricing during negotiations. If merchants are onboarding under standard
pricing terms, no further contract required. If Merchant wants to negotiate custom pricing, partner must contact DoorDash for
assistance.
2. Once pricing confirmed, Middleware Partner will onboard merchant by specifying restaurant name in external_business_name field.
This MUST be the name of the restaurant for 100% of requests. If a brand has 50 stores, you should use the same value for this field for
all requests. Reach out to your DoorDash contact with questions.
3. You can specify an external_store_id if desired. Please include in the initial estimates call for all stores as this will create the store
mapping with DoorDash.

DoorDash Invoices Merchant:

1. Merchant must sign contract with DoorDash before onboarding in the API
2. Once contract signed, please coordinate onboarding with DoorDash representative
3. For corporate owned partners, external_business_name = restaurant name, eg “Burger King”. Franchise groups that need to be billed
separately from corporate MUST be onboarded under a different external_business_name. External_business_name should =
franchise legal business name. In this scenario, you MUST include name of restaurant in pickup_business_name field

CONFIDENTIAL 27
DoorDash Drive

Merchant Onboarding

DoorDash Invoices Middleware Partners: DoorDash Invoices Merchant:


1. If the merchant is onboarding under standard 1. Merchant signs contract with DoorDash.

pricing terms, no contract is needed. 2. DoorDash team creates and activates business entity under

2. Middleware Partner can begin sending API the terms laid out in the contract.

requests, specifying the restaurant name in 3. DD team sends the business name to Middleware Partner.

external_business_name field. 4. Mx can start sending orders as long as the

3. This triggers creation of a new business entity external_business_name used in all API requests matches

for the external_business_name specified in the business name provided in Step 3.

the request.

28
Fulfillment Integrations

Invoicing

DoorDash provides invoicing on monthly basis and we support two invoicing options:

1. DoorDash invoices Middleware Partner


a. DoorDash will invoice Middleware Partner for all executed delivery fees and tips
b. DoorDash will provide refunds as adjustments. Refunds should be credited back to merchant partners
c. With standard pricing, Middleware Partner can onboard
2. Doordash invoices Merchant Partner
a. DoorDash will invoice merchant directly for all executed delivery fees and tips
b. DoorDash will sign individual contracts with all merchant partners
c. DoorDash will provide merchant with invoice statement and delivery file on monthly cadence

CONFIDENTIAL 29
Fulfillment Integrations

Store Creation

Once a business has been onboarded, the developer will control store onboarding

1. Stores are created in the API, not by DoorDash


2. You can create a store by invoking the estimates (recommended) or delivery creation API
3. Once you’ve submitted the request, the store will appear in the portal (if you have access)

CONFIDENTIAL 30
Fulfillment Integrations

Appendix

CONFIDENTIAL 31
Fulfillment Integrations

Load Testing

● Please contact the Drive team at least 4 business days prior to their planned load test.
○ Note that a request does not automatically mean the load test is authorized.
● When requesting a load test, please specify (these are all in the intake form):
○ Dates and times they expect to run.
■ Avoid Fridays and Saturdays, as well as 2 - 8pm Pacific.
■ Limit testing period to 2 hours.
○ What target loads are expected
○ Which endpoint(s) are being tested
○ Contact details for the individuals managing the test.
● Important Notes:
○ Please plan for the fact that each delivery created during the test will result in ~15 webhooks.
○ DooDash may temporarily disable the API key if we find the test is causing system instability.
○ All developer accounts are allowed 5qps across all APIs. (~300 deliveries created per minute). We
will allow for load testing up to 2x of average volume if a request is made with the required notice.

CONFIDENTIAL 32
Fulfillment Integrations

Drive Portal

The Drive web portal is generally used by store operators to manage delivery operations. Within the delivery
simulator, you’ll be able to navigate to the Active/Order History tabs to see the Drive Web Portal view.

● Active orders: orders currently scheduled for delivery in the future.


● Order history: Previously completed orders.
● Orders can be filtered by store and by date range.
● Employees can be configured with access to subsets of stores by an administrator level user.

CONFIDENTIAL 33
Fulfillment Integrations

CONFIDENTIAL 34
Fulfillment Integrations

CONFIDENTIAL 35
Fulfillment Integrations

CONFIDENTIAL 36
Fulfillment Integrations

CONFIDENTIAL 37
Confidential

Customer Text Messages

38
Confidential
DoorDash Drive

Step 1:

Initial Notification

ADD IMAGE HERE Customers receive the initial delivery


Right click on rectangle
> Replace Image
notification with a tracking link when the
dasher has accepted the order.

39
Confidential
DoorDash Drive

Tracking Page:

Tracking Page

ADD IMAGE HERE Clicking on the link provided will direct


Right click on rectangle
> Replace Image
customers to a tracking page which
provides dasher contact information and
location

40
Confidential
DoorDash Drive

Step 2:

Pick-up Notification

ADD IMAGE HERE Customers receive a second notification


Right click on rectangle
> Replace Image
when the dasher is approaching with
their order

41
Confidential
DoorDash Drive

Step 3:

Ratings

ADD IMAGE HERE Customers receive the final notification


Right click on rectangle
> Replace Image
once the order has been marked
delivered. Here, they have the option to
rate the delivery experience

42
Confidential
DoorDash Drive

CONFIDENTIAL 43

You might also like