Aller au contenu principal

Create returnable deliveries

API: Drive

If you’re building for restaurants, see the How to Build for Restaurants Guide.

When the receiver of a delivery is unavailable, DoorDash's default action is to have the Dasher safely dispose of the delivery. If you're delivering non-perishable or higher-value goods, you can instead request that the Dasher return the delivery to the pickup location if the receiver is unavailable.

1. Create a return-to-pickup delivery

When you create a delivery, you can indicate what should occur if the receiver is unavailable by including the action_if_unavailable field in your call to the delivery creation API and setting the field's value to return_to_pickup. If you do so, contactless_dropoff must either be absent or set to false.

{
... // other fields

// valid
"contactless_dropoff": false,
"action_if_undeliverable": "return_to_pickup"

// valid
"action_if_undeliverable": "return_to_pickup"

// invalid
"contactless_dropoff": true,
"action_if_undeliverable": "return_to_pickup"
}

2. Receive return-to-pickup webhooks

If you request return-to-pickup deliveries, you should update your app to handle several new webhook events:

  • DELIVERY_RETURN_INITIALIZED
  • DASHER_CONFIRMED_RETURN_ARRIVAL
  • DELIVERY_RETURNED

You should also update your app to handle a new reason that may be sent with the CANCELLED webhook:

  • failed_to_return

Next steps