{"openapi":"3.0.1","info":{"title":"Endpoints"},"servers":[{"url":"https://api-third-party-gtm-pp.grubhub.com","description":"preprod"},{"url":"https://api-third-party-gtm.grubhub.com","description":"prod"}],"tags":[{"name":"Models","description":"# IncreaseTipRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/IncreaseTipRequest\"/>\n\n# PublicApiError \n <SchemaDefinition schemaRef=\"#/components/schemas/PublicApiError\"/>\n\n# RefundRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/RefundRequest\"/>\n\n# PhoneContactDetails \n <SchemaDefinition schemaRef=\"#/components/schemas/PhoneContactDetails\"/>\n\n# ProxyPhoneNumberRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/ProxyPhoneNumberRequest\"/>\n\n# PhoneBridge \n <SchemaDefinition schemaRef=\"#/components/schemas/PhoneBridge\"/>\n\n# ResponseWrapperProxyPhoneNumberResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ResponseWrapperProxyPhoneNumberResponse\"/>\n\n# ProxyPhoneNumberResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ProxyPhoneNumberResponse\"/>\n\n# com.grubhub.pos.generic.delivery.fulfillment.common.model.PickupVerification \n <SchemaDefinition schemaRef=\"#/components/schemas/com.grubhub.pos.generic.delivery.fulfillment.common.model.PickupVerification\"/>\n\n# UpdateDeliveryDropoffLocationRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/UpdateDeliveryDropoffLocationRequest\"/>\n\n# CancelDeliveryRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/CancelDeliveryRequest\"/>\n\n# RefundAmount \n <SchemaDefinition schemaRef=\"#/components/schemas/RefundAmount\"/>\n\n# ProgressRefundRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/ProgressRefundRequest\"/>\n\n# ProgressDeliveryRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/ProgressDeliveryRequest\"/>\n\n# ResponseWrapperProgressDeliveryResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ResponseWrapperProgressDeliveryResponse\"/>\n\n# ProgressDeliveryResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ProgressDeliveryResponse\"/>\n\n# EmulateDeliveryStatusUpdateWebhookRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/EmulateDeliveryStatusUpdateWebhookRequest\"/>\n\n# Assigned \n <SchemaDefinition schemaRef=\"#/components/schemas/Assigned\"/>\n\n# Canceled \n <SchemaDefinition schemaRef=\"#/components/schemas/Canceled\"/>\n\n# CourierAtDropoff \n <SchemaDefinition schemaRef=\"#/components/schemas/CourierAtDropoff\"/>\n\n# CourierAtPickup \n <SchemaDefinition schemaRef=\"#/components/schemas/CourierAtPickup\"/>\n\n# Created \n <SchemaDefinition schemaRef=\"#/components/schemas/Created\"/>\n\n# Delivered \n <SchemaDefinition schemaRef=\"#/components/schemas/Delivered\"/>\n\n# InTransit \n <SchemaDefinition schemaRef=\"#/components/schemas/InTransit\"/>\n\n# PickedUp \n <SchemaDefinition schemaRef=\"#/components/schemas/PickedUp\"/>\n\n# PickupVerification \n <SchemaDefinition schemaRef=\"#/components/schemas/PickupVerification\"/>\n\n# ProofOfDelivery \n <SchemaDefinition schemaRef=\"#/components/schemas/ProofOfDelivery\"/>\n\n# ReturnArrived \n <SchemaDefinition schemaRef=\"#/components/schemas/ReturnArrived\"/>\n\n# ReturnCompleted \n <SchemaDefinition schemaRef=\"#/components/schemas/ReturnCompleted\"/>\n\n# ReturnInitiated \n <SchemaDefinition schemaRef=\"#/components/schemas/ReturnInitiated\"/>\n\n# Unassigned \n <SchemaDefinition schemaRef=\"#/components/schemas/Unassigned\"/>\n\n# ClientData \n <SchemaDefinition schemaRef=\"#/components/schemas/ClientData\"/>\n\n# Delivery \n <SchemaDefinition schemaRef=\"#/components/schemas/Delivery\"/>\n\n# DeliveryEvent \n <SchemaDefinition schemaRef=\"#/components/schemas/DeliveryEvent\"/>\n\n# DropoffImageDetails \n <SchemaDefinition schemaRef=\"#/components/schemas/DropoffImageDetails\"/>\n\n# EstimatedEventTimes \n <SchemaDefinition schemaRef=\"#/components/schemas/EstimatedEventTimes\"/>\n\n# GeoLocation \n <SchemaDefinition schemaRef=\"#/components/schemas/GeoLocation\"/>\n\n# PickupVerificationDetails \n <SchemaDefinition schemaRef=\"#/components/schemas/PickupVerificationDetails\"/>\n\n# ResponseWrapperAcceptQuoteResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ResponseWrapperAcceptQuoteResponse\"/>\n\n# AcceptQuoteResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/AcceptQuoteResponse\"/>\n\n# DeliveryAddress \n <SchemaDefinition schemaRef=\"#/components/schemas/DeliveryAddress\"/>\n\n# Charges \n <SchemaDefinition schemaRef=\"#/components/schemas/Charges\"/>\n\n# DeliverySizing \n <SchemaDefinition schemaRef=\"#/components/schemas/DeliverySizing\"/>\n\n# DropoffLocation \n <SchemaDefinition schemaRef=\"#/components/schemas/DropoffLocation\"/>\n\n# DropoffPreferences \n <SchemaDefinition schemaRef=\"#/components/schemas/DropoffPreferences\"/>\n\n# Item \n <SchemaDefinition schemaRef=\"#/components/schemas/Item\"/>\n\n# ItemSizing \n <SchemaDefinition schemaRef=\"#/components/schemas/ItemSizing\"/>\n\n# ItemDimensions \n <SchemaDefinition schemaRef=\"#/components/schemas/ItemDimensions\"/>\n\n# ItemWeight \n <SchemaDefinition schemaRef=\"#/components/schemas/ItemWeight\"/>\n\n# NotificationPreferences \n <SchemaDefinition schemaRef=\"#/components/schemas/NotificationPreferences\"/>\n\n# PickupLocation \n <SchemaDefinition schemaRef=\"#/components/schemas/PickupLocation\"/>\n\n# SubItem \n <SchemaDefinition schemaRef=\"#/components/schemas/SubItem\"/>\n\n# TimePreferences \n <SchemaDefinition schemaRef=\"#/components/schemas/TimePreferences\"/>\n\n# QuoteRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/QuoteRequest\"/>\n\n# Quote \n <SchemaDefinition schemaRef=\"#/components/schemas/Quote\"/>\n\n# ResponseWrapperQuoteResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ResponseWrapperQuoteResponse\"/>\n\n# QuoteResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/QuoteResponse\"/>\n\n# Courier \n <SchemaDefinition schemaRef=\"#/components/schemas/Courier\"/>\n\n# ResponseWrapperDeliveryStatusResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ResponseWrapperDeliveryStatusResponse\"/>\n\n# DeliveryStatusResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/DeliveryStatusResponse\"/>\n\n# ResponseWrapperServiceAreaResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ResponseWrapperServiceAreaResponse\"/>\n\n# ServiceAreaResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/ServiceAreaResponse\"/>\n\n# DeliveryArea \n <SchemaDefinition schemaRef=\"#/components/schemas/DeliveryArea\"/>\n\n# Feature \n <SchemaDefinition schemaRef=\"#/components/schemas/Feature\"/>\n\n# Geometry \n <SchemaDefinition schemaRef=\"#/components/schemas/Geometry\"/>\n\n# Properties \n <SchemaDefinition schemaRef=\"#/components/schemas/Properties\"/>\n\n"}],"paths":{"/delivery/daas/v1/{deliveryId}/tip":{"post":{"tags":["Delivery Updates"],"summary":"Increase courier tip","description":"Updates the courier tip for a delivery to the requested value. Tips may only be increased.","operationId":"updateCourierTip","parameters":[{"name":"deliveryId","in":"path","description":"The UUID of the delivery associated with the tip update.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncreaseTipRequest"}}},"required":true},"responses":{"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"400":{"description":"Invalid courier tip update","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"tip_decrease_not_allowed","message":"Requested tip amount must be higher than existing tip amount."}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"200":{"description":"Courier tip updated","content":{"application/json":{"example":{}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/{deliveryId}/refund":{"post":{"tags":["Delivery Refunds"],"summary":"Request a delivery refund","description":"Submits a refund request for a delivery. Invoking this endpoint begins the asynchronous process of accepting or rejecting the refund request.","operationId":"requestRefund","parameters":[{"name":"deliveryId","in":"path","description":"The UUID of the delivery associated with the refund request.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}},"required":true},"responses":{"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"202":{"description":"Delivery refund request accepted","content":{"application/json":{"example":{}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/{deliveryId}/proxy":{"post":{"tags":["Delivery Status"],"summary":"Create proxy courier phone number","description":"Generates a proxy number that temporarily substitutes the courier's true phone number. The proxy number can be used to call or text the courier as if it were their true phone number.","operationId":"createProxyPhoneNumber","parameters":[{"name":"deliveryId","in":"path","description":"The delivery UUID associated with the proxy phone number request.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyPhoneNumberRequest"}}},"required":true},"responses":{"200":{"description":"Proxy phone number generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseWrapperProxyPhoneNumberResponse"},"example":{"response":{"phone_bridge":{"expiration_time":"1970-01-01T00:00:00.000Z","caller":{"phone_number":"+15555555555"},"courier_phone_proxy":{"phone_number":"+17777777777"}}}}}}},"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Failed to get the masked phone number because partnerId: 00000000-0000-0000-0000-000000000000 does not have access to the deliveryId: 00000000-0000-0000-0000-000000000000"}]}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"CONFLICT","message":"Failed to get the masked phone number for the deliveryId: 00000000-0000-0000-0000-000000000000 and sourcePhoneNumber: +15555555555"}]}}}}}}},"/delivery/daas/v1/{deliveryId}/pickupVerification":{"post":{"tags":["Delivery Updates"],"summary":"Update pickup verification","description":"Provide the pickup verification info for a delivery. To be used after the delivery has been created and before pickup.","operationId":"updatePickupVerification","parameters":[{"name":"deliveryId","in":"path","description":"The UUID of the delivery being updated.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/com.grubhub.pos.generic.delivery.fulfillment.common.model.PickupVerification"}}},"required":true},"responses":{"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"400":{"description":"Invalid pickup verification","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"INVALID","message":"Invalid capture method provided"}]}}}},"200":{"description":"Pickup verification updated","content":{"application/json":{"example":{}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/{deliveryId}/pickupReady":{"post":{"tags":["Delivery Updates"],"summary":"Update delivery to pickup ready","description":"Provide a signal that indicates the delivery is ready for pickup.","operationId":"pickupReady","parameters":[{"name":"deliveryId","in":"path","description":"The UUID of the delivery being updated.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Delivery marked as pickup ready","content":{"application/json":{"example":{}}}},"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/{deliveryId}/dropoff":{"post":{"tags":["Delivery Updates"],"summary":"Update delivery information","description":"Updates the dropoff information for a delivery. Only available before delivery has been picked up.","operationId":"updateDeliveryDropoffLocation","parameters":[{"name":"deliveryId","in":"path","description":"The UUID of the delivery being updated.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeliveryDropoffLocationRequest"}}},"required":true},"responses":{"400":{"description":"Invalid delivery dropoff information update","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"invalid_delivery_status","message":"Delivery is in an invalid state to update dropoff location."}]}}}},"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"200":{"description":"Delivery dropoff information updated","content":{"application/json":{"example":{}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/{deliveryId}/cancel":{"post":{"tags":["Delivery Updates"],"summary":"Cancel a delivery","description":"Requests the cancellation of a delivery.","operationId":"cancelDelivery","parameters":[{"name":"deliveryId","in":"path","description":"The UUID of the delivery being canceled.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDeliveryRequest"}}},"required":true},"responses":{"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"200":{"description":"Delivery cancelled","content":{"application/json":{"example":{}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/test/{deliveryId}/refund":{"post":{"tags":["Delivery Tests"],"summary":"Progress a test refund","description":"Progresses the test refund to either an accepted or reject state.","operationId":"progressRefund","parameters":[{"name":"deliveryId","in":"path","description":"The UUID of the test delivery associated with the refund.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressRefundRequest"}}},"required":true},"responses":{"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"200":{"description":"Refund successfully progressed.","content":{"application/json":{"example":{}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/test/{deliveryId}/deliveryState":{"post":{"tags":["Delivery Tests"],"summary":"Progress a test delivery","description":"Progresses the test delivery to the given delivery state. Returns the expected progression time to the delivery state","operationId":"progressDelivery","parameters":[{"name":"deliveryId","in":"path","description":"The UUID of the test delivery.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressDeliveryRequest"}}},"required":true},"responses":{"200":{"description":"Delivery successfully progressed to given delivery state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseWrapperProgressDeliveryResponse"},"example":{"response":{"expected_progression_time":"1970-01-01T00:00:00.000Z"}}}}},"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/test/webhook/emulateStatusUpdateWebhook":{"post":{"tags":["Delivery Webhooks Emulation"],"summary":"Emulate a delivery status update webhook","description":"Emulates a delivery status update webhook for the partner. It is meant just for testing purposes.","operationId":"emulateStatusUpdateWebhook","parameters":[{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmulateDeliveryStatusUpdateWebhookRequest"}}},"required":true},"responses":{"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"202":{"description":"Delivery status update webhook successfully triggered","content":{"application/json":{"example":{}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}}}}},"/delivery/daas/v1/test/webhook/emulateRefundUpdateWebhook":{"post":{"tags":["Delivery Webhooks Emulation"],"summary":"Emulate a delivery refund update webhook","description":"Emulates a delivery refund update webhook for the partner. It is meant just for testing purposes.","operationId":"emulateRefundUpdateWebhook","parameters":[{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"202":{"description":"Delivery refund update webhook successfully triggered","content":{"application/json":{"example":{}}}}}}},"/delivery/daas/v1/quote/{quoteId}/accept":{"post":{"tags":["Delivery Quotes"],"summary":"Accept delivery quote","description":"Accepts the delivery quote for the given quote id.","operationId":"acceptDeliveryQuote","parameters":[{"name":"quoteId","in":"path","description":"The UUID of the quote being accepted.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"8d6a50e5-d8bf-4149-8f30-6c8481270e02"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Delivery quote accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseWrapperAcceptQuoteResponse"},"example":{"response":{"delivery":{"delivery_id":"00000000-0000-0000-0000-000000000000","events":[{"event_type":"CREATED","event_time":"1970-01-01T00:00:00.000Z"}],"estimated_event_times":{"picked_up":"1970-01-01T00:00:00.000Z","dropped_off":"1970-01-01T00:00:00.000Z"}}}}}}},"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"400":{"description":"Delivery quote expired","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_QUOTE_EXPIRED","message":"Delivery quote with id=00000000-0000-0000-0000-000000000000 is expired"}]}}}},"404":{"description":"Delivery quote not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/quote":{"post":{"tags":["Delivery Quotes"],"summary":"Request delivery quotes","description":"Returns one or more delivery quotes for the given request.","operationId":"requestDeliveryQuote","parameters":[{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"x-gh-daas-test","in":"header","description":"Denotes if you're placing a request for a test, ensuring that the resulting delivery will only be progressed by test endpoint requests. This can be used either in testing environments or in production. The resulting delivery cannot be progressed in production.","required":false,"style":"simple","explode":false,"schema":{"type":"boolean","default":false},"example":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}},"required":true},"responses":{"200":{"description":"Delivery quotes generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseWrapperQuoteResponse"},"example":{"response":{"quotes":[{"quote_id":"00000000-0000-0000-0000-000000000000","cost_amount":500,"return_fee":100,"expiration":"1970-01-01T00:00:00.000Z","estimated_pickup_time":"1970-01-01T00:00:00.000Z","estimated_dropoff_time":"1970-01-01T00:00:00.000Z"}]}}}}},"400":{"description":"Error generating delivery quotes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"preferred_pickup_time_invalid","message":"Preferred pickup time cannot be in the past."}]}}}},"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}}}}},"/delivery/daas/v1/{deliveryId}":{"get":{"tags":["Delivery Status"],"summary":"Get delivery status","description":"Returns all status update events, courier information, and dropoff details for a delivery. Does not include any quote information.","operationId":"getStatus","parameters":[{"name":"deliveryId","in":"path","description":"The UUID associated with the delivery statuses being retrieved.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Delivery status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseWrapperDeliveryStatusResponse"},"example":{"response":{"delivery":{"delivery_id":"00000000-0000-0000-0000-000000000000","events":[{"type":"CANCELED","timestamp":"1970-01-01T00:00:00.000Z","source":"GRUBHUB","reason_code":"DELIVERY_CANCELLATION_OTHER_REASON","reason_comment":"Test cancellation"},{"type":"PROOF_OF_DELIVERY","timestamp":"1970-01-01T00:00:00.000Z","dropoff_image_details":{"photo_url":"http://www.grubhub.com/example.png","photo_capture_time":"1970-01-01T00:00:00.000Z","photo_capture_location":{"lat":0,"lng":0},"photo_expiration_time":"1970-01-01T00:00:00.000Z"}},{"type":"DELIVERED","timestamp":"1970-01-01T00:00:00.000Z","dropoff_image_details":{"photo_url":"http://www.grubhub.com/example.png","photo_capture_time":"1970-01-01T00:00:00.000Z","photo_capture_location":{"lat":0,"lng":0},"photo_expiration_time":"1970-01-01T00:00:00.000Z"}},{"type":"COURIER_AT_DROPOFF","timestamp":"1970-01-01T00:00:00.000Z"},{"type":"IN_TRANSIT","timestamp":"1970-01-01T00:00:00.000Z"},{"type":"PICKED_UP","timestamp":"1970-01-01T00:00:00.000Z"},{"type":"COURIER_AT_PICKUP","timestamp":"1970-01-01T00:00:00.000Z"},{"type":"ASSIGNED","timestamp":"1970-01-01T00:00:00.000Z"},{"type":"CREATED","timestamp":"1970-01-01T00:00:00.000Z"}],"estimated_event_times":{"picked_up":"1970-01-01T00:00:00.000Z","dropped_off":"1970-01-01T00:00:00.000Z"},"client_data":{"external_id":"ABC123","external_merchant_id":"MERCHANT_123","external_source":"RELAY_123","reference_number":"123XYZ4567ABC890"}},"courier":{"name":"Nick","delivery_method":"CAR","location":{"lat":0,"lng":0}}}}}}},"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}},"404":{"description":"Delivery not found","content":{"application/json":{"example":{"errors":[{"code":"DELIVERY_NOT_FOUND","message":"Delivery not found with id=00000000-0000-0000-0000-000000000000"}]}}}}}}},"/delivery/daas/v1/servicearea":{"get":{"tags":["Delivery Service Areas"],"summary":"Get delivery service areas","description":"Returns all active delivery service areas.","operationId":"getServiceAreas","parameters":[{"name":"X-GH-PARTNER-KEY","in":"header","description":"The Grubhub-provided partner key.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Delivery service areas retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseWrapperServiceAreaResponse"},"example":{"response":{"delivery_areas":[{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"Example Service Area"},"geometry":{"type":"Polygon","coordinates":[[[-122.03121852874756,37.33165280502906],[-122.03121852874756,37.44188398726656],[-121.88121852874755,37.44188398726656],[-121.88121852874755,37.33165280502906],[-122.03121852874756,37.33165280502906]]]}}]}]}}}}},"500":{"description":"Unexpected internal error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FAILED","message":"Internal Server Error"}]}}}},"403":{"description":"Request Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiError"}},"example":{"errors":[{"code":"REQUEST_FORBIDDEN","message":"Request forbidden"}]}}}}}}}},"components":{"schemas":{"IncreaseTipRequest":{"required":["tip"],"type":"object","properties":{"tip":{"minimum":0,"type":"integer","description":"The total tip amount the courier receives, formatted as cents.","format":"int32","example":500}},"description":"A request for when a diner decides to increase a courier tip. Can be performed within 24 hours after delivery."},"PublicApiError":{"required":["code","message"],"type":"object","properties":{"code":{"type":"string","description":"A code representing the type of error that occurred."},"message":{"type":"string","description":"A detailed description of the error that occurred."}},"description":"An error returned by the delivery API."},"RefundRequest":{"required":["refund_code"],"type":"object","properties":{"refund_details":{"maxLength":512,"minLength":0,"type":"string","description":"Additional comment about the refund.","example":"The store canceled the order."},"refund_code":{"type":"string","description":"The refund code.","enum":["MISSED_DROPOFF_ETA","WRONG_ADDRESS_DELIVERY","INCOMPLETE_DELIVERY","INCOMPLETE_DELIVERY_CONTENTS","POOR_DELIVERY_EXPERIENCE","OTHER"]},"photo_attachment_url":{"maxLength":512,"minLength":0,"type":"string","description":"The photo attachment url for the refund request.","example":"https://example.com/photo.jpg"}},"description":"The request information for a refund."},"PhoneContactDetails":{"required":["phone_number"],"type":"object","properties":{"phone_number":{"pattern":"^\\+\\d{11}$","type":"string","description":"A E.164 formatted phone number. Only 11-digits are supported.","example":"+16145552332"}},"description":"The phone contact details."},"ProxyPhoneNumberRequest":{"required":["caller"],"type":"object","properties":{"caller":{"$ref":"#/components/schemas/PhoneContactDetails"}},"description":"A request used to create a phone bridge between a caller and courier."},"PhoneBridge":{"required":["caller","courier_phone_proxy","expiration_time"],"type":"object","properties":{"expiration_time":{"type":"string","description":"The expiration time of the proxy phone number. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-03-14T19:22:51.999Z"},"caller":{"$ref":"#/components/schemas/PhoneContactDetails"},"courier_phone_proxy":{"$ref":"#/components/schemas/PhoneContactDetails"}},"description":"The phone bridge details used to connect a caller to a courier."},"ResponseWrapperProxyPhoneNumberResponse":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/ProxyPhoneNumberResponse"},"errors":{"type":"array","description":"A list of errors returned.","items":{"$ref":"#/components/schemas/PublicApiError"}}}},"ProxyPhoneNumberResponse":{"required":["phone_bridge"],"type":"object","properties":{"phone_bridge":{"$ref":"#/components/schemas/PhoneBridge"}},"description":"A response containing the phone bridge details used to connect to a courier."},"com.grubhub.pos.generic.delivery.fulfillment.common.model.PickupVerification":{"required":["capture_method","verification_code"],"type":"object","properties":{"capture_method":{"type":"string","description":"The method used to capture the pickup verification code.","enum":["QR_SCAN"]},"verification_code":{"type":"string","description":"The verification code provided by the partner."}},"description":"Pickup verification provided by the partner."},"UpdateDeliveryDropoffLocationRequest":{"type":"object","properties":{"instructions":{"maxLength":500,"minLength":0,"type":"string","description":"Dropoff instructions to apply to delivery","example":"Leave at door - ring doorbell."},"phone":{"pattern":"^\\+\\d{11}$","type":"string","description":"A E.164 formatted dropoff contact phone number.","example":"+16145552332"}},"description":"A request for when a diner decides to update dropoff location information for a delivery. Only allowed before the courier has left the pickup location."},"CancelDeliveryRequest":{"required":["cancel_code"],"type":"object","properties":{"cancel_code":{"type":"string","description":"Codes for reasons why a delivery was canceled.","example":"CUSTOMER_REFUSED_DELIVERY","enum":["CUSTOMER_CONTENTS_ISSUE","CUSTOMER_DELIVERY_DELAYED","CUSTOMER_ORDER_CHANGED","CUSTOMER_OTHER_REASON","CUSTOMER_REFUSED_DELIVERY","EXTERNAL_PARTNER_OTHER_REASON","EXTERNAL_SYSTEM_FAILURE","MERCHANT_OTHER_REASON","MERCHANT_PICKUP_DELAYED"]},"comment":{"maxLength":256,"minLength":0,"type":"string","description":"Additional detail about the cancellation.","example":"Customer does not want to accept their delivery."}},"description":"A request to cancel a delivery."},"RefundAmount":{"required":["contents_value","delivery_fee","tip"],"type":"object","properties":{"delivery_fee":{"minimum":0,"type":"integer","description":"The amount of the refund requested to be taken from the delivery fee, formatted as cents.","format":"int32","example":100},"tip":{"minimum":0,"type":"integer","description":"The amount of the refund requested to be taken from the tip, formatted as cents.","format":"int32","example":333},"contents_value":{"minimum":0,"type":"integer","description":"The amount of the refund requested to be taken from the contents value, formatted as cents.","format":"int32","example":542},"return_fee":{"minimum":0,"type":"integer","description":"The amount of the refund requested to be taken from the return fee, formatted as cents.","format":"int32","example":200}},"description":"The amount of the refund requested, broken down into various categories."},"ProgressRefundRequest":{"required":["decision"],"type":"object","properties":{"decision":{"type":"string","description":"The refund request decision.","enum":["ACCEPTED","REJECTED"]},"reason":{"maxLength":512,"minLength":0,"type":"string","description":"The reason code associated with the refund decision.","example":"DriverMissedDropoffEta","default":"DriverMissedDropoffEta"},"description":{"maxLength":512,"minLength":0,"type":"string","description":"Additional details about the refund decision.","example":"Driver was 30 minutes late to the dropoff location."},"refund_amounts":{"$ref":"#/components/schemas/RefundAmount"}},"description":"The request information for progressing a test refund."},"ProgressDeliveryRequest":{"required":["delivery_state"],"type":"object","properties":{"delivery_state":{"type":"string","description":"The subset of delivery states that a partner can progress a delivery to.","enum":["ASSIGNED","UNASSIGNED","COURIER_AT_PICKUP","PICKED_UP","IN_TRANSIT","COURIER_AT_DROPOFF","DELIVERED","CANCELED"]},"speed_mph":{"minimum":0,"type":"integer","description":"The speed (in mph) at which the courier should move to the given delivery state. If no value is provided, the default speed of 30 mph will be used.","format":"int32","example":30,"default":30}},"description":"The request information for progressing a test delivery."},"ResponseWrapperProgressDeliveryResponse":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/ProgressDeliveryResponse"},"errors":{"type":"array","description":"A list of errors returned.","items":{"$ref":"#/components/schemas/PublicApiError"}}}},"ProgressDeliveryResponse":{"required":["expected_progression_time"],"type":"object","properties":{"expected_progression_time":{"type":"string","description":"The expected timestamp at which the delivery will be progressed to the requested state. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-05-28T00:00:00Z"}},"description":"The response information of a delivery progression request."},"EmulateDeliveryStatusUpdateWebhookRequest":{"type":"object","properties":{"external_delivery_id":{"maxLength":256,"minLength":0,"type":"string","description":"The external ID of the delivery to trigger the webhook for"}},"description":"The request information for emulating a delivery status update webhook."},"Assigned":{"required":["timestamp","type"],"type":"object","description":"An event indicating the delivery has been assigned.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"Canceled":{"required":["timestamp","type"],"type":"object","description":"An event indicating that the delivery was canceled.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"},{"type":"object","properties":{"source":{"type":"string","description":"Types of actors who may update a delivery.","example":"CLIENT","enum":["CLIENT","GRUBHUB"]},"reason_code":{"type":"string","description":"Codes for reasons why a delivery was canceled.","example":"CUSTOMER_OTHER_REASON","enum":["MERCHANT_NOT_READY_FOR_PICKUP","MERCHANT_UNABLE_TO_FULFILL_ORDER","MERCHANT_CLOSED","MERCHANT_PICKUP_DELAYED","MERCHANT_ITEM_MISSING","MERCHANT_OTHER_REASON","EXTERNAL_SYSTEM_FAILURE","CUSTOMER_CONTENTS_ISSUE","CUSTOMER_ORDER_CHANGED","CUSTOMER_REFUSED_DELIVERY","CUSTOMER_DELIVERY_DELAYED","CUSTOMER_OTHER_REASON","ORDER_PICKED_UP_BY_ANOTHER_DRIVER","DRIVER_UNABLE_TO_FINISH_DELIVERY","UNABLE_TO_ASSIGN_DRIVER","EXTERNAL_PARTNER_OTHER_REASON","DELIVERY_CANCELLATION_OTHER_REASON","UNKNOWN"]},"reason_comment":{"type":"string","description":"Additional detail about the cancellation.","example":"Customer no longer wants delivery."}}}]},"CourierAtDropoff":{"required":["timestamp","type"],"type":"object","description":"An event indicating the assigned courier has arrived at the delivery's dropoff location.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"CourierAtPickup":{"required":["timestamp","type"],"type":"object","description":"An event indicating the assigned courier has arrived at the delivery's pickup location.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"Created":{"required":["timestamp","type"],"type":"object","description":"An event representing the creation of a delivery.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"Delivered":{"required":["timestamp","type"],"type":"object","description":"An event indicating the delivery has been successfully delivered.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"},{"type":"object","properties":{"dropoff_image_details":{"description":"Use `dropoff_image_details` in the `ProofOfDelivery` event instead.","deprecated":true,"allOf":[{"$ref":"#/components/schemas/DropoffImageDetails"}]}}}]},"InTransit":{"required":["timestamp","type"],"type":"object","description":"An event indicating the assigned courier has departed the restaurant with the delivery.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"PickedUp":{"required":["timestamp","type"],"type":"object","description":"An event indicating the delivery has been picked up by the assigned courier.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"PickupVerification":{"required":["timestamp","type"],"type":"object","description":"An event containing pickup verification information.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"},{"type":"object","properties":{"pickup_verification_details":{"$ref":"#/components/schemas/PickupVerificationDetails"}}}]},"ProofOfDelivery":{"required":["timestamp","type"],"type":"object","description":"An event containing proof of delivery information.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"},{"type":"object","properties":{"dropoff_image_details":{"$ref":"#/components/schemas/DropoffImageDetails"}}}]},"ReturnArrived":{"required":["timestamp","type"],"type":"object","description":"An event indicating the courier has arrived back at the pickup location with the portion of the delivery's contents being returned.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"ReturnCompleted":{"required":["timestamp","type"],"type":"object","description":"An event indicating that the necessary portion of the delivery's contents have been successfully returned to the pickup location.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"ReturnInitiated":{"required":["timestamp","type"],"type":"object","description":"An event indicating the delivery is in-transit back to the pickup location in order to return some portion of the delivery's contents.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"},{"type":"object","properties":{"return_reason":{"type":"string","description":"The reason the delivery's contents are being returned.","example":"DINER_MISSING_ID"}}}]},"Unassigned":{"required":["timestamp","type"],"type":"object","description":"An event indicating the delivery has been unassigned. An unassigned delivery may still be reassigned to another driver later.","allOf":[{"$ref":"#/components/schemas/DeliveryEvent"}]},"ClientData":{"type":"object","properties":{"external_id":{"maxLength":128,"minLength":0,"type":"string","description":"A stored correlation id that isn't used by Grubhub's platform.","example":"ABC123"},"external_merchant_id":{"maxLength":128,"minLength":0,"type":"string","description":"A client-provided merchant identifier.","example":"MERCHANT_123"},"external_source":{"maxLength":128,"minLength":0,"type":"string","description":"The external source API from which the delivery came from.","example":"RELAY_123"},"reference_number":{"type":"string","description":"An external delivery identifier that is used by Grubhub's platform for display purposes.","example":"123XYZ4567ABC890"}},"description":"Client metadata associated with a delivery."},"Delivery":{"required":["delivery_id","estimated_event_times","events"],"type":"object","properties":{"delivery_id":{"type":"string","description":"A unique identifier of this delivery.","format":"uuid","example":"0ec346bd-635a-4a07-8f35-44962a8bcc5b"},"events":{"type":"array","description":"A history of notable events that have occurred for this delivery.","items":{"$ref":"#/components/schemas/DeliveryEvent"}},"estimated_event_times":{"$ref":"#/components/schemas/EstimatedEventTimes"},"client_data":{"$ref":"#/components/schemas/ClientData"}},"description":"The information and historical events associated with a delivery."},"DeliveryEvent":{"required":["timestamp","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this event.","example":"PICKED_UP","enum":["CREATED","ASSIGNED","UNASSIGNED","COURIER_AT_PICKUP","PICKED_UP","IN_TRANSIT","COURIER_AT_DROPOFF","DELIVERED","PROOF_OF_DELIVERY","RETURN_INITIATED","RETURN_ARRIVED","RETURN_COMPLETED","PICKUP_VERIFICATION","CANCELED"]},"timestamp":{"type":"string","description":"The time at which this event occurred. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-05-28T00:00:00Z"}},"description":"An event during the course of a single delivery's lifecycle.","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Created"},{"$ref":"#/components/schemas/Assigned"},{"$ref":"#/components/schemas/Unassigned"},{"$ref":"#/components/schemas/CourierAtPickup"},{"$ref":"#/components/schemas/PickedUp"},{"$ref":"#/components/schemas/InTransit"},{"$ref":"#/components/schemas/CourierAtDropoff"},{"$ref":"#/components/schemas/Delivered"},{"$ref":"#/components/schemas/ProofOfDelivery"},{"$ref":"#/components/schemas/PickupVerification"},{"$ref":"#/components/schemas/ReturnInitiated"},{"$ref":"#/components/schemas/ReturnArrived"},{"$ref":"#/components/schemas/ReturnCompleted"},{"$ref":"#/components/schemas/Canceled"}]},"DropoffImageDetails":{"required":["photo_capture_location","photo_capture_time","photo_expiration_time","photo_url"],"type":"object","properties":{"photo_url":{"type":"string","description":"A URL to the dropoff photo taken by the driver upon completing the delivery.","example":"http://www.grubhub.com/example.png"},"photo_capture_time":{"type":"string","description":"The timestamp at which the dropoff photo was captured. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-05-28T00:00:00Z"},"photo_capture_location":{"$ref":"#/components/schemas/GeoLocation"},"photo_expiration_time":{"type":"string","description":"The timestamp when the dropoff photo will expire. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-05-28T00:00:00Z"}}},"EstimatedEventTimes":{"required":["dropped_off","picked_up"],"type":"object","properties":{"picked_up":{"type":"string","description":"The estimated pickup time, or the actual pickup time if the pickup has already occurred. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-05-28T00:00:00Z"},"dropped_off":{"type":"string","description":"The estimated drop-off time, or the actual drop-off time if the pickup has already occurred. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-05-28T00:00:00Z"}},"description":"The latest known estimates for the delivery pickup and dropoff times. Will be the actual times if the event has already occurred."},"GeoLocation":{"required":["lat","lng"],"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the location.","format":"double","example":41.88320791307697},"lng":{"type":"number","description":"The longitude of the location.","format":"double","example":-87.63142796027925}},"description":"The last known location of the courier."},"PickupVerificationDetails":{"type":"object","properties":{"result":{"type":"string","description":"The result of pickup verification process.","enum":["SUCCESS","FAILURE","UNKNOWN"]},"capture_method":{"type":"string","description":"The method used to capture the pickup verification code.","enum":["QR_SCAN","PHOTO"]},"failure_reason":{"type":"string","description":"The reason for the verification failure, if applicable."},"attempts_count":{"type":"integer","description":"The number of verification attempts made.","format":"int32"},"photo_url":{"type":"string","description":"A URL to the pickup verification photo, if applicable."}}},"ResponseWrapperAcceptQuoteResponse":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/AcceptQuoteResponse"},"errors":{"type":"array","description":"A list of errors returned.","items":{"$ref":"#/components/schemas/PublicApiError"}}}},"AcceptQuoteResponse":{"type":"object","properties":{"delivery":{"$ref":"#/components/schemas/Delivery"}},"description":"The response information for a quote acceptance request."},"DeliveryAddress":{"required":["city","country_area","country_code","postal_code","street_address"],"type":"object","properties":{"country_code":{"maxLength":8,"minLength":0,"type":"string","description":"The ISO-3166 country code of the address.","example":"US"},"country_area":{"maxLength":64,"minLength":0,"type":"string","description":"The country area or state of the address.","example":"IL"},"city":{"maxLength":64,"minLength":0,"type":"string","description":"The city of the address.","example":"Chicago"},"street_address":{"maxItems":5,"minItems":1,"type":"array","description":"The street address details of the address.","example":["123 Washington Lane"],"items":{"maxLength":128,"minLength":0,"type":"string"}},"postal_code":{"maxLength":16,"minLength":0,"type":"string","description":"The postal code of the address.","example":"60642"},"company_name":{"maxLength":128,"minLength":0,"type":"string","description":"The company name of the address.","example":"Fake Savings and Loans Co."}},"description":"The information associated with an address."},"Charges":{"required":["contents_value","tip"],"type":"object","properties":{"tip":{"minimum":0,"type":"integer","description":"The tip amount the courier receives, formatted as cents.","format":"int32","example":200},"contents_value":{"minimum":0,"type":"integer","description":"The amount the items being delivered are worth minus taxes, formatted as cents.","format":"int32","example":200}},"description":"The charges associated with a delivery."},"DeliverySizing":{"type":"object","properties":{"weight":{"type":"string","description":"The weight category of a delivery.\n\n**STANDARD** <= 15 lbs\n\n**HEAVY** > 15 lbs","example":"STANDARD","enum":["STANDARD","HEAVY"]},"dimensions":{"type":"string","description":"The size category of a delivery based on its dimensions.\n\n**SMALL** - single item, may be carried in one hand\n\n**MEDIUM** - requires a bag, may be carried in one hand\n\n**LARGE** - may require two hands\n\n**EXTRA_LARGE** - may require multiple trips or equipment","example":"MEDIUM","enum":["SMALL","MEDIUM","LARGE","EXTRA_LARGE"]}},"description":"Information about delivery-level sizing."},"DropoffLocation":{"required":["address","name","phone"],"type":"object","properties":{"name":{"maxLength":128,"minLength":0,"type":"string","description":"The name of the merchant or individual at the location.","example":"Bob's Burgers"},"address":{"$ref":"#/components/schemas/DeliveryAddress"},"phone":{"pattern":"^\\+\\d{11}$","type":"string","description":"A E.164 formatted phone number. Only 11-digits are supported.","example":"+16145552332"},"instructions":{"maxLength":500,"minLength":0,"type":"string","description":"Instructions for the courier while at the location.","example":"Leave at front door."},"geo_location":{"$ref":"#/components/schemas/GeoLocation"}},"description":"The information associated with a dropoff location."},"DropoffPreferences":{"type":"object","properties":{"handoff_options":{"maxItems":1,"uniqueItems":true,"type":"array","description":"Options indicating how dropoff should be performed.","items":{"type":"string","enum":["CONTACTLESS"]}}},"description":"Preferences for how the delivery dropoff should be handled."},"Item":{"required":["name"],"type":"object","properties":{"name":{"maxLength":256,"minLength":0,"type":"string","description":"The name of the item being delivered.","example":"Cheeseburger"},"description":{"maxLength":256,"minLength":0,"type":"string","description":"The description of the item.","example":"Burger patty topped with cheese."},"quantity":{"minimum":1,"type":"integer","description":"The quantity of the item.","format":"int32"},"sub_items":{"type":"array","description":"Subitems included with the item.","items":{"$ref":"#/components/schemas/SubItem"}},"item_sizing":{"$ref":"#/components/schemas/ItemSizing"}},"description":"The information associated with a delivery item."},"ItemSizing":{"type":"object","properties":{"weight":{"$ref":"#/components/schemas/ItemWeight"},"dimensions":{"$ref":"#/components/schemas/ItemDimensions"}},"description":"Information about item-level sizing"},"ItemDimensions":{"required":["depth","height","unit","width"],"type":"object","properties":{"unit":{"type":"string","description":"Unit of measurement","example":"INCHES","enum":["INCHES","FEET"]},"width":{"type":"number","description":"Width of the item","format":"double","example":10.0},"height":{"type":"number","description":"Height of the item","format":"double","example":5.0},"depth":{"type":"number","description":"Depth of the item","format":"double","example":3.0}},"description":"Dimensions of the item"},"ItemWeight":{"required":["unit","weight"],"type":"object","properties":{"unit":{"type":"string","description":"Unit of measurement","example":"POUNDS","enum":["POUNDS"]},"weight":{"type":"number","description":"Weight of the item","format":"double","example":5.0}},"description":"Weight of the item"},"NotificationPreferences":{"type":"object","properties":{"send_dropoff_contact_notifications":{"type":"boolean","description":"Whether to send notifications to the dropoff contact for this delivery - defaults to sending notifications.","default":true}},"description":"Notification-related preferences for the delivery request"},"PickupLocation":{"required":["address","brand_name","name","phone"],"type":"object","properties":{"name":{"maxLength":128,"minLength":0,"type":"string","description":"The name of the merchant or individual at the location.","example":"Bob's Burgers"},"address":{"$ref":"#/components/schemas/DeliveryAddress"},"phone":{"pattern":"^\\+\\d{11}$","type":"string","description":"A E.164 formatted phone number. Only 11-digits are supported.","example":"+16145552332"},"instructions":{"maxLength":500,"minLength":0,"type":"string","description":"Instructions for the courier while at the location.","example":"Leave at front door."},"geo_location":{"$ref":"#/components/schemas/GeoLocation"},"brand_name":{"maxLength":128,"minLength":0,"type":"string","description":"The name of the requesting brand. This must be consistent across all deliveries for the same brand.","example":"Inspire"},"sub_brand_name":{"maxLength":128,"minLength":0,"type":"string","description":"The name of the requesting individual brand, NOT the aggregator. This must be consistent across all deliveries for the same brand.","example":"Dunkin Donuts"},"location_grouping_id":{"maxLength":128,"minLength":0,"type":"string","description":"A reference identifier for grouping locations.","example":"loc-group-123"},"location_grouping_name":{"maxLength":128,"minLength":0,"type":"string","description":"A reference name for grouping locations.","example":"All NY Stores"}},"description":"The information associated with a pickup location."},"SubItem":{"required":["name"],"type":"object","properties":{"name":{"maxLength":64,"minLength":0,"type":"string","description":"The name of the subitem.","example":"Add cheese"},"description":{"maxLength":128,"minLength":0,"type":"string","description":"The description of the subitem.","example":"Single slice of American cheese."},"quantity":{"minimum":0,"type":"integer","description":"The quantity of this subitem, if applicable.","format":"int32","default":0}},"description":"The information associated with a delivery subitem."},"TimePreferences":{"type":"object","properties":{"pickup_time":{"type":"string","description":"The preferred pickup time for the courier. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-03-14T19:22:51.999Z"},"dropoff_time":{"type":"string","description":"The preferred dropoff time for the courier. Formatted as an ISO-8601 timestamp.","format":"date-time","example":"2024-03-14T19:22:51.999Z"}},"description":"The preferred pickup or dropoff time for the courier. Only use one of them."},"QuoteRequest":{"required":["charges","dropoff","pickup","time_preferences"],"type":"object","properties":{"pickup":{"$ref":"#/components/schemas/PickupLocation"},"dropoff":{"$ref":"#/components/schemas/DropoffLocation"},"items":{"type":"array","description":"A collection of items describing what is included in the delivery.","items":{"$ref":"#/components/schemas/Item"}},"charges":{"$ref":"#/components/schemas/Charges"},"time_preferences":{"$ref":"#/components/schemas/TimePreferences"},"dropoff_preferences":{"$ref":"#/components/schemas/DropoffPreferences"},"client_data":{"$ref":"#/components/schemas/ClientData"},"notification_preferences":{"$ref":"#/components/schemas/NotificationPreferences"},"pickup_verification":{"$ref":"#/components/schemas/com.grubhub.pos.generic.delivery.fulfillment.common.model.PickupVerification"},"delivery_sizing":{"$ref":"#/components/schemas/DeliverySizing"},"tags":{"uniqueItems":true,"type":"array","description":"Tags that can be applied to a delivery to assist with categorization, pricing and filtering.","items":{"type":"string","description":"Tags that can be applied to a delivery to assist with categorization, pricing and filtering.","example":"FOOD","enum":["FOOD","FLORAL","GROCERY"]}}},"description":"A request for delivery fulfillment quotes."},"Quote":{"required":["cost_amount","estimated_dropoff_time","estimated_pickup_time","expiration","quote_id","return_fee"],"type":"object","properties":{"quote_id":{"type":"string","description":"The unique identifier for this quote. This must be referenced when accepting the quote.","format":"uuid","example":"0ec346bd-635a-4a07-8f35-44962a8bcc5b"},"cost_amount":{"minimum":0,"type":"integer","description":"The cost of the delivery, formatted in cents.","format":"int32"},"estimated_pickup_time":{"type":"string","description":"The courier's estimated pickup time of the delivery. Formatted as an ISO-8601 timestamp.","format":"date-time"},"estimated_dropoff_time":{"type":"string","description":"The courier's estimated dropoff time of the delivery. Formatted as an ISO-8601 timestamp.","format":"date-time"},"return_fee":{"minimum":0,"type":"integer","description":"The return fee of the delivery, formatted in cents.","format":"int32"},"expiration":{"type":"string","description":"When the quote expires and new quote must be requested. Formatted as an ISO-8601 timestamp.","format":"date-time"}},"description":"The information associated with a delivery fulfillment quote."},"ResponseWrapperQuoteResponse":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/QuoteResponse"},"errors":{"type":"array","description":"A list of errors returned.","items":{"$ref":"#/components/schemas/PublicApiError"}}}},"QuoteResponse":{"type":"object","properties":{"quotes":{"type":"array","description":"A list of delivery options to select from.","items":{"$ref":"#/components/schemas/Quote"}}},"description":"The response information of a delivery fulfillment quote request."},"Courier":{"required":["delivery_method","location","name"],"type":"object","properties":{"name":{"type":"string","description":"The display name of the courier assigned to a delivery.","example":"Nick"},"delivery_method":{"type":"string","description":"Means of transportation by which a courier may be delivering.","example":"CAR","enum":["CAR","BIKE","SCOOTER","WALK","UNKNOWN"]},"location":{"$ref":"#/components/schemas/GeoLocation"}},"description":"A courier."},"ResponseWrapperDeliveryStatusResponse":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/DeliveryStatusResponse"},"errors":{"type":"array","description":"A list of errors returned.","items":{"$ref":"#/components/schemas/PublicApiError"}}}},"DeliveryStatusResponse":{"required":["delivery"],"type":"object","properties":{"delivery":{"$ref":"#/components/schemas/Delivery"},"courier":{"$ref":"#/components/schemas/Courier"},"tracking_url":{"type":"string","description":"The url for the delivery tracking UI."}},"description":"Information about the status of a delivery."},"ResponseWrapperServiceAreaResponse":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/ServiceAreaResponse"},"errors":{"type":"array","description":"A list of errors returned.","items":{"$ref":"#/components/schemas/PublicApiError"}}}},"ServiceAreaResponse":{"required":["delivery_areas"],"type":"object","properties":{"delivery_areas":{"type":"array","description":"The list of delivery areas that are currently active.","items":{"$ref":"#/components/schemas/DeliveryArea"}}},"description":"The response information for delivery service areas."},"DeliveryArea":{"required":["features","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of delivery area.","example":"FeatureCollection"},"features":{"type":"array","description":"The list of features that make up the delivery area.","items":{"$ref":"#/components/schemas/Feature"}}},"description":"The delivery area information."},"Feature":{"required":["geometry","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of feature.","example":"Feature"},"properties":{"$ref":"#/components/schemas/Properties"},"geometry":{"$ref":"#/components/schemas/Geometry"}},"description":"The feature information of the delivery area."},"Geometry":{"required":["coordinates","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of geometric shape of the delivery area.","example":"Polygon"},"coordinates":{"type":"array","description":"The coordinates of the delivery area.","example":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]],"items":{"type":"array","description":"The coordinates of the delivery area.","example":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]],"items":{"type":"array","description":"The coordinates of the delivery area.","example":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]],"items":{"type":"number","description":"The coordinates of the delivery area.","format":"double"}}}}},"description":"The geometry of the delivery area."},"Properties":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"The name of the delivery area.","example":"CHICAGO-IL"}},"description":"The properties of the delivery area."}}}}