asyncapi: 2.6.0 info: title: DoorDash Drive Delivery Webhooks description: >- DoorDash Drive sends webhook notifications for delivery status updates, enabling near-real-time information flow from DoorDash and Dashers to partner applications. Webhooks support scenarios like map views showing customers how far away their Dasher is and push notifications about order status. DoorDash sends each webhook event up to 3 times, retrying if it receives a response other than 200 OK or no response at all. Webhook payloads contain all available delivery details at the time of sending. Fields that are empty or unavailable are omitted. All time fields are sent as ISO-8601 date-times in UTC. version: '2.0' contact: name: DoorDash Developer Support url: https://developer.doordash.com/en-US/ servers: partnerWebhook: url: '{webhook_url}' protocol: https description: >- The partner-provided HTTPS webhook endpoint. Must be protected with authentication. DoorDash supports Basic Auth and OAuth for webhook endpoint security. security: - basicAuth: [] variables: webhook_url: description: >- The HTTPS URL of the partner's webhook endpoint. channels: /webhook: description: >- DoorDash sends delivery status update events to this channel whenever a delivery progresses through its lifecycle. publish: operationId: receiveDeliveryWebhook summary: Receive delivery status webhooks description: >- Receives webhook notifications from DoorDash about delivery status changes. Partners must respond with 200 OK to acknowledge receipt. message: oneOf: - $ref: '#/components/messages/DasherConfirmed' - $ref: '#/components/messages/DasherConfirmedPickupArrival' - $ref: '#/components/messages/DasherConfirmedDropoffArrival' - $ref: '#/components/messages/DasherDroppedOff' - $ref: '#/components/messages/DeliveryReturnInitialized' - $ref: '#/components/messages/DasherConfirmedReturnArrival' - $ref: '#/components/messages/DeliveryReturned' - $ref: '#/components/messages/DeliveryCancelled' - $ref: '#/components/messages/DeliveryBatched' components: securitySchemes: basicAuth: type: http scheme: basic description: >- Basic authentication for webhook endpoint security. oauth2: type: oauth2 description: >- OAuth 2.0 authentication for webhook endpoint security. flows: clientCredentials: tokenUrl: '' scopes: {} messages: DasherConfirmed: name: DASHER_CONFIRMED title: Dasher Confirmed summary: >- A Dasher has accepted the delivery and is on the way to the pickup location. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' DasherConfirmedPickupArrival: name: DASHER_CONFIRMED_PICKUP_ARRIVAL title: Dasher Confirmed Pickup Arrival summary: >- The Dasher has confirmed arrival at the pickup location and is attempting to pick up the delivery. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' DasherConfirmedDropoffArrival: name: DASHER_CONFIRMED_DROPOFF_ARRIVAL title: Dasher Confirmed Dropoff Arrival summary: >- The Dasher has confirmed arrival at the dropoff location. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' DasherDroppedOff: name: DASHER_DROPPED_OFF title: Dasher Dropped Off summary: >- The Dasher has dropped off the delivery at the dropoff location and the delivery is complete. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' DeliveryReturnInitialized: name: DELIVERY_RETURN_INITIALIZED title: Delivery Return Initialized summary: >- The Dasher was unable to deliver to the dropoff location and has contacted support to arrange a return-to-pickup delivery. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' DasherConfirmedReturnArrival: name: DASHER_CONFIRMED_RETURN_ARRIVAL title: Dasher Confirmed Return Arrival summary: >- The Dasher has confirmed arrival at the pickup location to return the delivery. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' DeliveryReturned: name: DELIVERY_RETURNED title: Delivery Returned summary: >- The delivery has been returned successfully to the pickup location. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' DeliveryCancelled: name: DELIVERY_CANCELLED title: Delivery Cancelled summary: >- The delivery has been cancelled. When the reason is failed_to_return, the delivery was unable to be returned. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' DeliveryBatched: name: DELIVERY_BATCHED title: Delivery Batched summary: >- The delivery has been assigned to a batch and will only be assigned to the same Dasher as all other deliveries with the matching force_batch_id. payload: $ref: '#/components/schemas/DeliveryWebhookPayload' schemas: DeliveryWebhookPayload: type: object properties: external_delivery_id: type: string description: >- The unique external delivery ID. event_type: type: string description: >- The type of delivery event. enum: - DASHER_CONFIRMED - DASHER_CONFIRMED_PICKUP_ARRIVAL - DASHER_CONFIRMED_DROPOFF_ARRIVAL - DASHER_DROPPED_OFF - DELIVERY_RETURN_INITIALIZED - DASHER_CONFIRMED_RETURN_ARRIVAL - DELIVERY_RETURNED - DELIVERY_CANCELLED - DELIVERY_BATCHED delivery_status: type: string description: >- The current status of the delivery. fee: type: integer description: >- The delivery fee in cents. currency: type: string description: >- The currency code. tip: type: integer description: >- The tip amount in cents. order_value: type: integer description: >- The total order value in cents. pickup_address: type: string description: >- The pickup address. pickup_business_name: type: string description: >- The business name at the pickup location. pickup_time_estimated: type: string format: date-time description: >- The estimated pickup time in UTC ISO-8601 format. pickup_time_actual: type: string format: date-time description: >- The actual pickup time. Only included after pickup occurs. dropoff_address: type: string description: >- The dropoff address. dropoff_time_estimated: type: string format: date-time description: >- The estimated dropoff time in UTC ISO-8601 format. dropoff_time_actual: type: string format: date-time description: >- The actual dropoff time. Only included after dropoff occurs. dropoff_contact_given_name: type: string description: >- The first name of the dropoff contact. dropoff_contact_family_name: type: string description: >- The last name of the dropoff contact. dasher_id: type: integer description: >- The assigned Dasher's ID. dasher_name: type: string description: >- The assigned Dasher's first name. dasher_phone_number: type: string description: >- The assigned Dasher's phone number. dasher_location_lat: type: number format: double description: >- The Dasher's current latitude. dasher_location_lng: type: number format: double description: >- The Dasher's current longitude. tracking_url: type: string format: uri description: >- A URL for tracking the delivery. cancellation_reason: type: string description: >- The reason for cancellation. Only present for DELIVERY_CANCELLED events. force_batch_id: type: string description: >- The batch identifier. Only present for DELIVERY_BATCHED events. contains_alcohol: type: boolean description: >- Whether the order contains alcohol. created_at: type: string format: date-time description: >- When the delivery was created. updated_at: type: string format: date-time description: >- When the delivery was last updated.