How to hit the DoorDash Drive API

DoorDash Drive's API at https://openapi.doordash.com/drive/v2 books Dashers to deliver your orders. Get a quote, accept it, then track the delivery.

Authentication

Drive authenticates with a short-lived JWT you sign yourself (HS256) from the developer id, key id, and signing secret in the Developer Portal — DoorDash's docs show how. Send it as Authorization: Bearer <jwt>, written {{DOORDASH_JWT}}.

Full reference: https://developer.doordash.com/en-US/api/drive

Get a delivery quote

curl -X POST https://openapi.doordash.com/drive/v2/quotes \
  -H "Authorization: Bearer {{DOORDASH_JWT}}" \
  -H "Content-Type: application/json" \
  -d '{"external_delivery_id": "posttaco-order-1", "pickup_address": "901 Market St, San Francisco, CA 94103", "pickup_phone_number": "+14155551234", "dropoff_address": "1 Dr Carlton B Goodlett Pl, San Francisco, CA 94102", "dropoff_phone_number": "+14155555678"}'
Run in PostTaco

Get a delivery

curl https://openapi.doordash.com/drive/v2/deliveries/posttaco-order-1 \
  -H "Authorization: Bearer {{DOORDASH_JWT}}"
Run in PostTaco