Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · DoorDash Drive API

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.

bindingmeaning
WORLDS_DOORDASH_DRIVE_URLThis world's origin followed by /drive/v2
WORLDS_API_KEYThe world key, accepted wherever DoorDash Drive expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
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_idstringYour delivery id
feeintegerFee in cents
currencystringCurrency
dropoff_time_estimateddatetimeEstimated dropoff
delivery_statusstringquote

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_idstringYour delivery id
delivery_statusstringcreated, confirmed, enroute_to_pickup, delivered, cancelled
tracking_urlstringCustomer tracking link
pickup_addressstringPickup address
dropoff_addressstringDropoff address
feeintegerFee in cents
order_valueintegerOrder 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_idintegerDasher id
dasher_namestringFirst name and initial
dasher_dropoff_phone_numberstringMasked phone
dasher_locationobjectLatitude and longitude
vehicle_makestringVehicle 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_idstringYour business id
namestringBusiness name
external_store_idstringYour store id
addressstringStore address
phone_numberstringStore phone

Test workflow

  1. Prepare. Select the DoorDash Drive setup for your workflow and review its starting records, including quotes, deliveries, dasher status.
  2. 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.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. 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.

yaml · worlds/tasks.yaml
# 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-id

See 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.

conditionwhat the agent sees
quote-expiredAccepting a quote after its expiry is rejected
cancel-not-allowedCancelling a picked up delivery returns an error
duplicate-external-idCreating a delivery with a used external_delivery_id returns 409
webhook-out-of-orderDASHER_PICKED_UP arrives after DELIVERY_DELIVERED
rate-limitedDelivery 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.

RecordsStarting setup
stores3 pickup locations with hours
deliveries40 across created, confirmed, picked_up, delivered and cancelled
quotesQuotes with fees and expiry times
dashersDasher name, location and vehicle on active deliveries
refund rulesRefunds 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.

FieldTypeMeaning / relationship
external_delivery_idstringYour delivery id
feeintegerFee in cents
currencystringCurrency
dropoff_time_estimateddatetimeEstimated dropoff
delivery_statusstringquote
json · illustrative record shape
{
  "external_delivery_id": "<Your delivery id>",
  "fee": 1,
  "currency": "<Currency>",
  "dropoff_time_estimated": "<Estimated dropoff>",
  "delivery_status": "<quote>"
}

See quotes operations

Deliveries records

Deliveries

Dispatch a Dasher and follow the delivery.

FieldTypeMeaning / relationship
external_delivery_idstringYour delivery id
delivery_statusstringcreated, confirmed, enroute_to_pickup, delivered, cancelled
tracking_urlstringCustomer tracking link
pickup_addressstringPickup address
dropoff_addressstringDropoff address
feeintegerFee in cents
order_valueintegerOrder value in cents
json · illustrative record shape
{
  "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
}

See deliveries operations

Dasher status records

Dasher status

Courier details once assigned.

FieldTypeMeaning / relationship
dasher_idintegerDasher id
dasher_namestringFirst name and initial
dasher_dropoff_phone_numberstringMasked phone
dasher_locationobjectLatitude and longitude
vehicle_makestringVehicle make
json · illustrative record shape
{
  "dasher_id": 1,
  "dasher_name": "<First name and initial>",
  "dasher_dropoff_phone_number": "<Masked phone>",
  "dasher_location": {},
  "vehicle_make": "<Vehicle make>"
}

See dasher status operations

Businesses and stores records

Businesses and stores

Pickup businesses and their stores.

FieldTypeMeaning / relationship
external_business_idstringYour business id
namestringBusiness name
external_store_idstringYour store id
addressstringStore address
phone_numberstringStore phone
json · illustrative record shape
{
  "external_business_id": "<Your business id>",
  "name": "<Business name>",
  "external_store_id": "<Your store id>",
  "address": "<Store address>",
  "phone_number": "<Store phone>"
}

See businesses and stores operations

See the DoorDash Drive world in the catalog