Cancel Delivery
POSThttps://api.uber.com/v1/customers/{customer_id}/deliveries/{delivery_id}/cancel
Cancel an ongoing or previously scheduled delivery.
¶ Request Path Parameters
Name | Type | Description |
---|---|---|
customer_id | string | Unique identifier for the organization. Either UUID or starts with `cus_`. |
delivery_id | string | Unique identifier for the delivery. Always starts with `del_`. |
¶ Response Body Parameters
Name | Type | Description |
---|---|---|
complete | boolean | Flag indicating if the delivery is ongoing. |
courier | CourierInfo | Information about the courier. Only present when a delivery is in progress. |
courier_imminent | boolean | Flag indicating if the courier is close to the pickup or dropoff location. |
created | timestamp (RFC 3339) | Date/Time at which the delivery was created. |
currency | string | Three-letter ISO currency code, in lowercase. |
dropoff | WaypointInfo | Dropoff details. |
dropoff_deadline | timestamp (RFC 3339) | When a delivery must be dropped off. This is the end of the dropoff window. |
dropoff_eta | timestamp (RFC 3339) | Estimated drop-off time. |
dropoff_ready | timestamp (RFC 3339) | When a delivery is ready to be dropped off. This is the start of the dropoff window. |
fee | integer | Amount in cents ( ¹/₁₀₀ of currency unit ) that will be charged if this delivery is created. |
id | string | Unique identifier for the delivery (`del_` + tokenize(uuid)). |
kind | string | The type of object being described. Always “delivery”. |
live_mode | boolean | Flag that indicates if this is live mode or test mode. |
manifest | ManifestInfo | A detailed description of what the courier will be delivering. |
manifest_items | ManifestItem[] | List of items being delivered. |
pickup | WaypointInfo | The pickup details for the delivery. |
pickup_deadline | timestamp (RFC 3339) | When a delivery must be picked up by. This is the end of the pickup window. |
pickup_eta | timestamp (RFC 3339) | Estimated time the courier will arrive at the pickup location. |
pickup_ready | timestamp (RFC 3339) | When a delivery is ready to be picked up. This is the start of the pickup window. |
quote_id | string | ID for the Delivery Quote if one was provided when creating this Delivery. |
related_deliveries | RelatedDelivery[] | A collection describing other jobs that share an association. |
status | string | The current status of the delivery. ALLOWED VALUES:
|
tip | integer | Amount in cents ( ¹/₁₀₀ of currency unit ) that will be paid to the courier as a tip. |
tracking_url | string | This url can be used to track the courier during the delivery. |
undeliverable_action | string | If a delivery was undeliverable, this field will contain the resulting action taken by the courier. |
undeliverable_reason | string | If a delivery was undeliverable, this field will contain the reason why it was undeliverable. |
updated | timestamp (RFC 3339) | Date/Time at which the delivery was last updated. |
uuid | string | Alternative delivery identifier. “Id” field should be used for any identification purposes. “uuid” field is equally unique but loses contextual information (i.e. nothing in this identifier points out that it relates to a delivery). “uuid” is case-sensitive. Value for the “uuid” field is UUID v4 with ‘-’ characters removed. |
return | WaypointInfo | The return details for the delivery. |
¶ Response Body Parameters - CourierInfo
Name | Type | Description |
---|---|---|
name | string | Courier’s first name and last initial. |
rating | float | [DEPRECATED] Courier’s rating on a scale of 1.0 to 5.0. |
vehicle_type | string | The type of vehicle the courier is using. Currently support bicycle, car, van, truck, scooter, motorcycle, and walker. |
phone_number | string | The courier’s phone number. This is a masked phone number that can only receive calls or SMS from the dropoff phone number. |
location | LatLng | A latitude and longitude indicating courier’s location. |
img_href | string | A URL to courier’s profile image. |
¶ CourierInfo - LatLng
Name | Type | Description |
---|---|---|
lat | double | Latitude. |
lng | double | Longitude. |
¶ Response Body Parameters - WaypointInfo
Name | Type | Description |
---|---|---|
name | string | Display name of the person/merchant at the waypoint. |
phone_number | string | The masked phone number of the waypoint. |
address | string | The address of the waypoint. |
detailed_address | Address | Structured address of the waypoint. |
notes | string | Additional instructions at the waypoint location. |
seller_notes | string | Delivery instructions provided by the seller for the courier at the waypoint location. |
courier_notes | string | When a picture is requested as proof-of-delivery, this field contains the notes provided by the courier (e.g. where the items were left). |
location | LatLng | Geographic location (Latitude, Longitude) associated with the waypoint. |
verification | VerificationProof | Details about different verifications that have/will occur at this waypoint and any associated proof. |
verification_requirements | VerificationRequirement | Details about the verification steps that have/must be taken at this waypoint. |
external_store_id | string | Unique identifier used by our Partners to reference a Store or Location |
¶ WaypointInfo - Address
Name | Type | Description |
---|---|---|
street_address_1 | string | |
street_address_2 | string | |
city | string | |
state | string | |
zip_code | string | |
country | string | |
sublocality_level_1 | string |
¶ WaypointInfo - LatLng
Name | Type | Description |
---|---|---|
lat | double | Latitude. |
lng | double | Longitude. |
¶ WaypointInfo - VerificationProof
Name | Type | Description |
---|---|---|
signature | SignatureProof | Signature information captured. |
barcodes | BarcodeRequirement[] | Barcode values/types that were scanned. |
picture | PictureProof | Picture captured at the waypoint. |
identification | IdentificationProof | Identification information or scanning information captured. |
pin_code | PincodeProof | Pin entry data available after delivery completes. |
completion_location | LatLng | The geographic location (Latitude, Longitude) where the job completes. |
¶ VerificationProof - SignatureProof
Name | Type | Description |
---|---|---|
image_url | string | The url of the signature image. |
signer_name | string | The name of the person who signed for the package. |
signer_relationship | string | The relationship of the person who signed for the package to the intended recipient. |
¶ VerificationProof - BarcodeRequirement
Name | Type | Description |
---|---|---|
value | string | String value encoded in the barcode. |
type | string | Type of barcode. Valid values: “CODE39”, “CODE39_FULL_ASCII”, “CODE128”, “QR”. |
scan_result | BarcodeScanResult | [optional] barcode scan result |
¶ VerificationProof - PictureProof
Name | Type | Description |
---|---|---|
image_url | string | The url of the image taken at the waypoint. |
¶ VerificationProof - IdentificationProof
Name | Type | Description |
---|---|---|
min_age_verified | boolean | Flag if ID was successfully verified/scanned. |
¶ VerificationProof - PincodeProof
Name | Type | Description |
---|---|---|
entered | string | Value entered during pin verification. |
¶ WaypointInfo - VerificationRequirement
Name | Type | Description |
---|---|---|
signature | boolean | [DEPRECATED] Flag for if a signature is required at this waypoint. signature_requirement should be used instead. |
signature_requirement | SignatureRequirement | Signature requirement spec to indicate that a signature must be collected at this waypoint. |
barcodes | BarcodeRequirement[] | Barcode values/types that must be scanned at the waypoint. Number of elements in the array is equal to the number of barcodes that must be scanned. |
pincode | PincodeRequirement | Pincode requirement spec to indicate a delivery requires pincode confirmation upon delivery. |
identification | IdentificationRequirement | Identification scanning/verification requirements for this waypoint. |
picture | boolean |
¶ VerificationRequirement - SignatureRequirement
Name | Type | Description |
---|---|---|
enabled | boolean | Flag for if a signature is required at this waypoint. |
collect_signer_name | boolean | Flag for if the signer’s name is required at this waypoint. |
collect_signer_relationship | boolean | Flag for if the signer’s relationship to the intended recipient is required at this waypoint. |
¶ VerificationRequirement - BarcodeRequirement
Name | Type | Description |
---|---|---|
value | string | String value encoded in the barcode. |
type | string | Type of barcode. Valid values: “CODE39”, “CODE39_FULL_ASCII”, “CODE128”, “QR”. |
scan_result | BarcodeScanResult | [optional] barcode scan result |
¶ VerificationRequirement - PincodeRequirement
Name | Type | Description |
---|---|---|
enabled | bool | When set to true in POST requests, the delivery will require pincode entry at handoff. |
value | string | The pincode that the customer must present at dropoff. This is a read-only field available in GET requests that will contain the internally generated pincode. |
¶ VerificationRequirement - IdentificationRequirement
Name | Type | Description |
---|---|---|
min_age | integer | Minimum age that must be verified for this delivery. |
¶ VerificationRequirement - BarcodeScanResult
Name | Type | Description |
---|---|---|
outcome | enum | [optional] barcode scan result. Possible values: INVALID, SUCCESS, SKIPPED |
timestamp | timestamp (RFC 3339) | [optional] timestamp when the barcode was scanned or skipped |
¶ Response Body Parameters - ManifestInfo
Name | Type | Description |
---|---|---|
reference | string | Reference that identifies the manifest. |
description | string | [DEPRECATED] A detailed description of what the courier will be delivering. It is better to consume the description of each item in `ManifestItem.name`. |
total_value | integer | Value in cents ( ¹/₁₀₀ of currency unit ) of the items in the delivery. i.e.: $10.99 => 1099. |
¶ Response Body Parameters - ManifestItem
Name | Type | Description |
---|---|---|
name | string | (optional) Description of item. |
quantity | integer | (required) Quantity of items. |
size | string | (optional) Approximate size of item. Options are small , medium , large , or xlarge .If nothing is specified, small will be applied by default. |
dimensions | Dimensions | (optional) Struct that contains dimensions. |
price | integer | (optional) Price in cents ( ¹/₁₀₀ of currency unit ). |
weight | integer | (optional) Weight in grams. |
¶ ManifestItem - Dimensions
Name | Type | Description |
---|---|---|
length | integer | [optional] Length in centimeters |
height | integer | [optional] Height in centimeters |
depth | integer | [optional] Depth in centimeters |
¶ Response Body Parameters - RelatedDelivery
Name | Type | Description |
---|---|---|
id | string | Unique identifier for the delivery. |
relationship | string | Indicating the nature of the delivery identified in related_deliveries. “original” for the forward leg of the trip, and “returned” for the return leg of the trip. |
¶ Endpoint Specific Errors
Http Status Code | Code | Message |
---|---|---|
400 | noncancelable_delivery | Delivery cannot be cancelled. |
404 | customer_not_cound | Customer does not exist. |
404 | delivery_not_found | The requested delivery does not exist. |
408 | request_timeout | The request timed out. |
500 | unknown_error | An unknown error happened. |
503 | service_unavailable | Service is currently unavailable. |