pub async fn create_quote(
access_token: &str,
customer_id: &str,
create_quote_request: CreateQuoteRequest
) -> Result<(CreateQuoteResponse, String, StatusCode), UberError>
Expand description
Create a quote to check deliverability, validity and cost for delivery between two addresses.
Name | Type | Description |
customer_id | string | Unique identifier for the organization. Either UUID or starts with cus_ . |
Name | Type | Description |
dropoff_address | string | (required) Dropoff address in Street Address, City, State, Zip format |
pickup_address | string | (required) Pickup address in Street Address, City, State, Zip format |
dropoff_latitude | double | Dropoff latitude coordinate |
dropoff_longitude | double | Dropoff longitude coordinate |
dropoff_phone_number | string | Phone number of recipient |
pickup_latitude | double | Pickup latitude coordinate |
pickup_longitude | double | Pickup longitude coordinate |
pickup_phone_number | string | Phone number of sender/store |
pickup_ready_dt | timestamp (RFC 3339) | Beginning of the window when an order must be picked up. Must be less than 30 days in the future. |
pickup_deadline_dt | timestamp (RFC 3339) | End of the window when an order may be picked up. Must be at least 10 mins later than pickup_ready_dt and at least 20 minutes in the future from now. |
dropoff_ready_dt | timestamp (RFC 3339) | Beginning of the window when an order must be dropped off. Must be less than or equal to pickup_deadline_dt |
dropoff_deadline_dt | timestamp (RFC 3339) | End of the window when an order must be dropped off. Must be at least 20 mins later than dropoff_ready_dt and must be greater than or equal to pickup_deadline_dt. |
manifest_total_value | integer | Value (in US cents) of the items in the delivery. i.e.: $10.99 => 1099. |
external_store_id | string | (Optional) Unique identifier used by our Partners to reference a Store or Location |
Name | Type | Description |
created | timestamp (RFC 3339) | Date/Time at which the quote was created. |
currency | string | [DEPRECATED] Three-letter ISO currency code, in lowercase. |
currency_type | string | Three-letter ISO currency code, in uppercase. |
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. |
duration | integer | Estimated minutes for this delivery to reach dropoff |
expires | timestamp (RFC 3339) | Date/Time after which the quote will no longer be accepted. |
fee | integer | Amount in cents that will be charged if this delivery is created. |
id | string | Unique identifier for the quote (always starts with dqt_ ) |
kind | string | The type of object being described. Always “delivery_quote” |
pickup_duration | integer | Estimated minutes until a courier will arrive at the pickup. |
external_store_id | string | Unique identifier used by our Partners to reference a Store or Location |
Http Status | Code | Code Message |
400 | invalid_params | The parameters of your request were invalid. |
400 | unknown_location | The specified location was not understood. |
400 | address_undeliverable | The specified location is not in a deliverable area. |
400 | pickup_window_too_small | The pickup window needs to be at least 10 minutes long. |
400 | dropoff_deadline_too_early | The dropoff deadline needs to be at least 20 minutes after the dropoff ready time. |
400 | dropoff_deadline_before_pickup_deadline | The dropoff deadline needs to be after the pickup deadline. |
400 | dropoff_ready_after_pickup_deadline | The dropoff ready time needs to be at or before the pickup deadline. |
400 | pickup_ready_too_early | The pickup ready time cannot be in the past. |
400 | pickup_deadline_too_early | The pickup deadline time needs to be at least 20 minutes from now. |
400 | pickup_ready_too_late | The pickup ready time needs to be within the next 30 days. |
404 | customer_not_found | Customer does not exist. |
408 | request_timeout | The request timed out… |
402 | customer_suspended | Your account is passed due. Payment is required. |
422 | address_undeliverable_limited_couriers | The specified location is not in a deliverable area at this time because all couriers are currently busy. |
403 | customer_blocked | Your account is not allowed to create deliveries. |
429 | customer_limited | Your account’s limits have been exceeded. |
500 | unknown_error | An unknown error happened. |