Aller au contenu principal

Self-delivery order updates

Prerequisites

This feature is built for merchants utilizing our self-delivery offering. You must have successfully built out the ability to ingest the self-delivery orders as outlined here

Overview

DoorDash has enhanced our self-delivery offering to allow merchants with an in-house fleet to provide status updates once an order is out for delivery. This includes both status updates and location tracking.

Get Started

Step 1: Identify endpoint

Identify the order events endpoint

PATCH https://openapi.doordash.com/marketplace/api/v1/orders/{id}/events/{event_type}

Step 2: Understand the event types

Self-delivery order event updates can have the following event types: ORDER_READY_FOR_PICKUP, ORDER_PICKED_UP, ORDER_IS_ARRIVING, and ORDER_DELIVERED

Event TypeDescription
ORDER_READY_FOR_PICKUPSent when in-store operators are finished preparing the order and is ready for pickup by the in-house courier.
ORDER_PICKED_UPSent when the courier has picked up the order and left the store.
ORDER_IS_ARRIVINGSent when the courier is approxiamtely 400 meters from the desired delivery location.
ORDER_DELIVEREDSent when the order has been dropped off

Step 3: Understand the possible webhook fields

merchant_supplied_id: (required) When a merchant initially confirms a self-delivery order, they pass their internal order id in the merchant_supplied_id field. This is the same value that we send back in the payload.

latitude: (optional) Used to share the couriers latitude. DoorDash will utilize this value to share courier location updates with customers.

longitude: (optional) Used to share the couriers longitude. DoorDash will utilize this value to share courier location updates with customers.

maskedPhoneNumber: (optional) Masked phone number value that will be passed to the customer to allow contact from customer to courier.

firstName: (required) The couriers first name.

isBatched: (optional) Inform DoorDash if the order has been batched. Will allow DoorDash to communicate to customer that a courier is completing a nearby delivery.

Step 4: Implement

Route order to the endpoint using the specified format.

Update with status ORDER_READY_FOR_PICKUP or ORDER_DELIVERED

    {
"merchant_supplied__id": "0nb24d02-e25f-4acb-aeb0-e387b1335791"
}

Update with status ORDER_PICKED_UP or ORDER_IS_ARRIVING

   {
"delivery_details": {
"latitude": 40.73528589964759,
"longitude": -73.99417110394303,
"is_batched": false,
"courier_details": {
"masked_phone_number": "+18888888888",
"first_name": "Driver Name"
}
}
}

FAQ

  1. How often can I send courier location updates?

    • DoorDash can accept location updates every 30 seconds.
  2. What event type should be used to send courier location updates?

    • You can continue to use the ORDER_PICKED_UP to update courier locations after the order has been picked up until the courier is close enough to the customer to send the ORDER_IS_ARRIVING event type.