Worlds / Logistics
DoorDash Drive API
A local DoorDash Drive with quotes, deliveries, dasher status, cancellations and refunds. Test the dispatch agent that quotes, creates and cancels on demand deliveries and handles problem orders.
- Base path
/drive/v2- Auth
- JWT bearer token built from developer id, key id and secret, the world key
- Endpoints
- 11
- Status
- Active today
This reference previews the surface the DoorDash Drive world serves in the closed beta. Paths mirror the public DoorDash Drive API; the exact subset is confirmed when your workflow is scoped.
Connect
The run gives your agent these bindings. Keep your SDK; change only where it sends requests.
| binding | meaning |
|---|---|
WORLDS_DOORDASH_DRIVE_URL | This world's origin followed by /drive/v2 |
WORLDS_API_KEY | The world key, accepted wherever DoorDash Drive expects a credential |
WORLDS_WORLD_ID | The isolated world's identity |
const base = process.env.WORLDS_DOORDASH_DRIVE_URL + "/drive/v2";
const res = await fetch(base + "/deliveries", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.WORLDS_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
external_delivery_id: "D-1001",
pickup_address: "901 Market St, San Francisco, CA 94103",
pickup_phone_number: "+14155550100",
dropoff_address: "1 Ferry Building, San Francisco, CA 94111",
dropoff_phone_number: "+14155550111",
order_value: 2500,
}),
});API reference
Quotes
Fee and ETA estimate before dispatch.
- POST
/drive/v2/quotesCreate a quote - POST
/drive/v2/quotes/{external_delivery_id}/acceptAccept a quote
Fields · 5
external_delivery_id | string | Your delivery id |
fee | integer | Fee in cents |
currency | string | Currency |
dropoff_time_estimated | datetime | Estimated dropoff |
delivery_status | string | quote |
Deliveries
Dispatch a Dasher and follow the delivery.
- POST
/drive/v2/deliveriesCreate a delivery - GET
/drive/v2/deliveries/{external_delivery_id}Get a delivery - PATCH
/drive/v2/deliveries/{external_delivery_id}Update a delivery - PUT
/drive/v2/deliveries/{external_delivery_id}/cancelCancel a delivery
Fields · 7
external_delivery_id | string | Your delivery id |
delivery_status | string | created, confirmed, enroute_to_pickup, delivered, cancelled |
tracking_url | string | Customer tracking link |
pickup_address | string | Pickup address |
dropoff_address | string | Dropoff address |
fee | integer | Fee in cents |
order_value | integer | Order value in cents |
Dasher status
Courier details once assigned.
- GET
/drive/v2/deliveries/{external_delivery_id}Get Dasher details with a delivery
Fields · 5
dasher_id | integer | Dasher id |
dasher_name | string | First name and initial |
dasher_dropoff_phone_number | string | Masked phone |
dasher_location | object | Latitude and longitude |
vehicle_make | string | Vehicle make |
Businesses and stores
Pickup businesses and their stores.
- GET
/drive/v2/businessesList businesses - POST
/drive/v2/businessesCreate a business - GET
/drive/v2/businesses/{external_business_id}/storesList stores - POST
/drive/v2/businesses/{external_business_id}/storesCreate a store
Fields · 5
external_business_id | string | Your business id |
name | string | Business name |
external_store_id | string | Your store id |
address | string | Store address |
phone_number | string | Store phone |
Test workflow
- Prepare. Select the DoorDash Drive setup for your workflow and review its starting records, including quotes, deliveries, dasher status.
- Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
- Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
- Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.
What to verify
- D-4410 confirmed from a quote that had not expired
- D-4411 cancelled before pickup
- D-4402 still picked up, not cancelled
- No order has two deliveries
- Refunds only on orders with a reported problem
Test file
A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.
# worlds/tasks.yaml · DoorDash Drive
version: 2
connector: doordash-drive
seed: doordash-drive-starter
mode: isolated
policy: >
Run lunch dispatch. Accept fresh quotes for new orders, cancel deliveries
for canceled orders only before pickup, and refund only orders reported
missing or damaged.
tasks:
- id: quote-and-accept-deliveries-for-new-orders
prompt: Quote and accept deliveries for new orders
- id: cancel-deliveries-that-are-no-longer-needed
prompt: Cancel deliveries that are no longer needed
- id: handle-late-and-missing-orders-with-the-right-refund
prompt: Handle late and missing orders with the right refund
expected:
- D-4410 confirmed from a quote that had not expired
- D-4411 cancelled before pickup
- "D-4402 still picked up, not cancelled"
- No order has two deliveries
- Refunds only on orders with a reported problem
scenarios:
- quote-expired
- cancel-not-allowed
- duplicate-external-idSee Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.
Failure conditions
Each one fires before the handler, at the same step on every run.
| condition | what the agent sees |
|---|---|
quote-expired | Accepting a quote after its expiry is rejected |
cancel-not-allowed | Cancelling a picked up delivery returns an error |
duplicate-external-id | Creating a delivery with a used external_delivery_id returns 409 |
webhook-out-of-order | DASHER_PICKED_UP arrives after DELIVERY_DELIVERED |
rate-limited | Delivery creates return 429 |
Starting data
Start each run from the same records and relationships. The overview below describes the DoorDash Drive starter; use the setup supplied for your workflow when preparing your own snapshot.
| Records | Starting setup |
|---|---|
| stores | 3 pickup locations with hours |
| deliveries | 40 across created, confirmed, picked_up, delivered and cancelled |
| quotes | Quotes with fees and expiry times |
| dashers | Dasher name, location and vehicle on active deliveries |
| refund rules | Refunds allowed for undelivered or damaged orders |
The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.
Quotes records
Quotes
Fee and ETA estimate before dispatch.
| Field | Type | Meaning / relationship |
|---|---|---|
external_delivery_id | string | Your delivery id |
fee | integer | Fee in cents |
currency | string | Currency |
dropoff_time_estimated | datetime | Estimated dropoff |
delivery_status | string | quote |
{
"external_delivery_id": "<Your delivery id>",
"fee": 1,
"currency": "<Currency>",
"dropoff_time_estimated": "<Estimated dropoff>",
"delivery_status": "<quote>"
}Deliveries records
Deliveries
Dispatch a Dasher and follow the delivery.
| Field | Type | Meaning / relationship |
|---|---|---|
external_delivery_id | string | Your delivery id |
delivery_status | string | created, confirmed, enroute_to_pickup, delivered, cancelled |
tracking_url | string | Customer tracking link |
pickup_address | string | Pickup address |
dropoff_address | string | Dropoff address |
fee | integer | Fee in cents |
order_value | integer | Order value in cents |
{
"external_delivery_id": "<Your delivery id>",
"delivery_status": "<created, confirmed, enroute_to_pickup, delivered, cancelled>",
"tracking_url": "<Customer tracking link>",
"pickup_address": "<Pickup address>",
"dropoff_address": "<Dropoff address>",
"fee": 1
}Dasher status records
Dasher status
Courier details once assigned.
| Field | Type | Meaning / relationship |
|---|---|---|
dasher_id | integer | Dasher id |
dasher_name | string | First name and initial |
dasher_dropoff_phone_number | string | Masked phone |
dasher_location | object | Latitude and longitude |
vehicle_make | string | Vehicle make |
{
"dasher_id": 1,
"dasher_name": "<First name and initial>",
"dasher_dropoff_phone_number": "<Masked phone>",
"dasher_location": {},
"vehicle_make": "<Vehicle make>"
}Businesses and stores records
Businesses and stores
Pickup businesses and their stores.
| Field | Type | Meaning / relationship |
|---|---|---|
external_business_id | string | Your business id |
name | string | Business name |
external_store_id | string | Your store id |
address | string | Store address |
phone_number | string | Store phone |
{
"external_business_id": "<Your business id>",
"name": "<Business name>",
"external_store_id": "<Your store id>",
"address": "<Store address>",
"phone_number": "<Store phone>"
}