Index
DeliveryService
(interface)BatchCreateTasksRequest
(message)BatchCreateTasksResponse
(message)CreateDeliveryVehicleRequest
(message)CreateTaskRequest
(message)DeliveryRequestHeader
(message)DeliveryRequestHeader.Platform
(enum)DeliveryRequestHeader.SdkType
(enum)DeliveryVehicle
(message)DeliveryVehicle.DeliveryVehicleType
(enum)DeliveryVehicleAttribute
(message)DeliveryVehicleLocation
(message)DeliveryVehicleLocationSensor
(enum)DeliveryVehicleNavigationStatus
(enum)GetDeliveryVehicleRequest
(message)GetTaskRequest
(message)GetTaskTrackingInfoRequest
(message)ListDeliveryVehiclesRequest
(message)ListDeliveryVehiclesResponse
(message)ListTasksRequest
(message)ListTasksResponse
(message)LocationInfo
(message)Task
(message)Task.JourneySharingInfo
(message)Task.State
(enum)Task.TaskOutcome
(enum)Task.TaskOutcomeLocationSource
(enum)Task.Type
(enum)TaskAttribute
(message)TaskTrackingInfo
(message)TaskTrackingViewConfig
(message)TaskTrackingViewConfig.VisibilityOption
(message)TimeWindow
(message)UpdateDeliveryVehicleRequest
(message)UpdateTaskRequest
(message)VehicleJourneySegment
(message)VehicleStop
(message)VehicleStop.State
(enum)VehicleStop.TaskInfo
(message)
DeliveryService
The Last Mile Delivery service.
BatchCreateTasks |
---|
Creates and returns a batch of new |
CreateDeliveryVehicle |
---|
Creates and returns a new |
CreateTask |
---|
Creates and returns a new |
GetDeliveryVehicle |
---|
Returns the specified |
GetTask |
---|
Gets information about a |
GetTaskTrackingInfo |
---|
Returns the specified |
ListDeliveryVehicles |
---|
Gets all |
ListTasks |
---|
Gets all |
UpdateDeliveryVehicle |
---|
Writes updated |
UpdateTask |
---|
Updates |
BatchCreateTasksRequest
The BatchCreateTask
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. Note: If you set this field, then the header field in the |
parent |
Required. The parent resource shared by all tasks. This value must be in the format |
requests[] |
Required. The request message that specifies the resources to create. Note: You can create a maximum of 500 tasks in a batch. |
BatchCreateTasksResponse
The BatchCreateTask
response message.
Fields | |
---|---|
tasks[] |
The created Tasks. |
CreateDeliveryVehicleRequest
The CreateDeliveryVehicle
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
parent |
Required. Must be in the format |
delivery_ |
Required. The Delivery Vehicle ID must be unique and subject to the following restrictions:
|
delivery_ |
Required. The
Note: The DeliveryVehicle's |
CreateTaskRequest
The CreateTask
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
parent |
Required. Must be in the format |
task_ |
Required. The Task ID must be unique, but it should be not a shipment tracking ID. To store a shipment tracking ID, use the
|
task |
Required. The Task entity to create. When creating a Task, the following fields are required:
Note: The Task's |
DeliveryRequestHeader
A RequestHeader contains fields common to all Delivery RPC requests.
Fields | |
---|---|
language_ |
The BCP-47 language code, such as en-US or sr-Latn. For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none is specified, the response may be in any language, with a preference for English if such a name exists. Field value example: |
region_ |
Required. CLDR region code of the region where the request originates. Field value example: |
sdk_ |
Version of the calling SDK, if applicable. The version format is "major.minor.patch", example: |
os_ |
Version of the operating system on which the calling SDK is running. Field value examples: |
device_ |
Model of the device on which the calling SDK is running. Field value examples: |
sdk_ |
The type of SDK sending the request. |
maps_ |
Version of the MapSDK which the calling SDK depends on, if applicable. The version format is "major.minor.patch", example: |
nav_ |
Version of the NavSDK which the calling SDK depends on, if applicable. The version format is "major.minor.patch", example: |
platform |
Platform of the calling SDK. |
manufacturer |
Manufacturer of the Android device from the calling SDK, only applicable for the Android SDKs. Field value example: |
android_ |
Android API level of the calling SDK, only applicable for the Android SDKs. Field value example: |
trace_ |
Optional ID that can be provided for logging purposes in order to identify the request. |
Platform
The platform of the calling SDK.
Enums | |
---|---|
PLATFORM_UNSPECIFIED |
The default value. This value is used if the platform is omitted. |
ANDROID |
The request is coming from Android. |
IOS |
The request is coming from iOS. |
WEB |
The request is coming from the web. |
SdkType
Possible types of SDK.
Enums | |
---|---|
SDK_TYPE_UNSPECIFIED |
The default value. This value is used if the sdk_type is omitted. |
CONSUMER |
The calling SDK is Consumer. |
DRIVER |
The calling SDK is Driver. |
JAVASCRIPT |
The calling SDK is JavaScript. |
DeliveryVehicle
The DeliveryVehicle
message. A delivery vehicle transports shipments from a depot to a delivery location, and from a pickup location to the depot. In some cases, delivery vehicles also transport shipments directly from the pickup location to the delivery location.
Note: gRPC and REST APIs use different field naming conventions. For example, the DeliveryVehicle.current_route_segment
field in the gRPC API and the DeliveryVehicle.currentRouteSegment
field in the REST API refer to the same field.
Fields | |
---|---|
name |
The unique name of this Delivery Vehicle. The format is |
last_ |
The last reported location of the Delivery Vehicle. |
navigation_ |
The Delivery Vehicle's navigation status. |
current_ |
The encoded polyline specifying the route that the navigation recommends taking to the next waypoint. Your driver app updates this when a stop is reached or passed, and when the navigation reroutes. These There are a few cases where this field might not be used to populate
In these cases, Fleet Engine populates this field with a route from the most recently passed VehicleStop to the upcoming VehicleStop to ensure that the consumer of this field has the best available information on the current path of the Delivery Vehicle. |
current_ |
The location where the This field is ignored in |
remaining_ |
The remaining driving distance for the Fleet Engine ignores this field in |
remaining_ |
The remaining driving time for the Fleet Engine ignores this field in |
remaining_ |
The journey segments assigned to this Delivery Vehicle, starting from the Vehicle's most recently reported location. This field won't be populated in the response of |
attributes[] |
A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have at most 100 attributes, and each attribute must have a unique key. |
type |
The type of this delivery vehicle. If unset, this will default to |
DeliveryVehicleType
The type of delivery vehicle.
Enums | |
---|---|
DELIVERY_VEHICLE_TYPE_UNSPECIFIED |
The value is unused. |
AUTO |
An automobile. |
TWO_WHEELER |
A motorcycle, moped, or other two-wheeled vehicle |
BICYCLE |
Human-powered transport. |
PEDESTRIAN |
A human transporter, typically walking or running, traveling along pedestrian pathways. |
DeliveryVehicleAttribute
Describes a vehicle attribute as a key-value pair. The "key:value" string length cannot exceed 256 characters.
Fields | |
---|---|
key |
The attribute's key. |
value |
The attribute's value. |
Union field delivery_vehicle_attribute_value . The attribute's value, can be in string, bool, or double type. delivery_vehicle_attribute_value can be only one of the following: |
|
string_ |
String typed attribute value. Note: This is identical to the |
bool_ |
Boolean typed attribute value. |
number_ |
Double typed attribute value. |
DeliveryVehicleLocation
The location, speed, and heading of a vehicle at a point in time.
Fields | |
---|---|
location |
The location of the vehicle. When it is sent to Fleet Engine, the vehicle's location is a GPS location. When you receive it in a response, the vehicle's location can be either a GPS location, a supplemental location, or some other estimated location. The source is specified in |
horizontal_accuracy |
Deprecated: Use |
latlng_ |
Accuracy of |
heading |
Direction the vehicle is moving in degrees. 0 represents North. The valid range is [0,360). |
bearing_accuracy |
Deprecated: Use |
heading_ |
Accuracy of |
altitude |
Altitude in meters above WGS84. |
vertical_accuracy |
Deprecated: Use |
altitude_ |
Accuracy of |
speed_kmph |
Speed of the vehicle in kilometers per hour. Deprecated: Use |
speed |
Speed of the vehicle in meters/second |
speed_ |
Accuracy of |
update_ |
The time when |
server_ |
Output only. The time when the server received the location information. |
location_ |
Provider of location data (for example, |
is_ |
Whether |
is_ |
Input only. Indicates whether the GPS sensor is enabled on the mobile device. |
time_ |
Input only. Time (in seconds) since this location was first sent to the server. This will be zero for the first update. If the time is unknown (for example, when the app restarts), this value resets to zero. |
num_stale_updates |
Input only. Deprecated: Other signals are now used to determine if a location is stale. |
raw_ |
Raw vehicle location (unprocessed by road-snapper). |
raw_ |
Timestamp associated with the raw location. |
raw_ |
Source of the raw location. Defaults to |
raw_ |
Accuracy of |
supplemental_ |
Supplemental location provided by the integrating app. |
supplemental_ |
Timestamp associated with the supplemental location. |
supplemental_ |
Source of the supplemental location. Defaults to |
supplemental_ |
Accuracy of |
road_snapped |
Deprecated: Use |
DeliveryVehicleLocationSensor
The sensor or methodology used to determine the location.
Enums | |
---|---|
UNKNOWN_SENSOR |
The sensor is unspecified or unknown. |
GPS |
GPS or Assisted GPS. |
NETWORK |
Assisted GPS, cell tower ID, or WiFi access point. |
PASSIVE |
Cell tower ID or WiFi access point. |
ROAD_SNAPPED_LOCATION_PROVIDER |
A location determined by the mobile device to be the most likely road position. |
CUSTOMER_SUPPLIED_LOCATION |
A customer-supplied location from an independent source. Typically, this value is used for a location provided from sources other than the mobile device running Driver SDK. If the original source is described by one of the other enum values, use that value. Locations marked CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's last_location.supplemental_location_sensor . |
FLEET_ENGINE_LOCATION |
A location calculated by Fleet Engine based on the signals available to it. Output only. This value will be rejected if it is received in a request. |
FUSED_LOCATION_PROVIDER |
Android's Fused Location Provider. |
CORE_LOCATION |
The location provider on Apple operating systems. |
GetDeliveryVehicleRequest
The GetDeliveryVehicle
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
name |
Required. Must be in the format |
GetTaskRequest
The GetTask
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
name |
Required. Must be in the format |
GetTaskTrackingInfoRequest
The GetTaskTrackingInfoRequest
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
name |
Required. Must be in the format |
ListDeliveryVehiclesRequest
The ListDeliveryVehicles
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
parent |
Required. Must be in the format |
page_ |
Optional. The maximum number of vehicles to return. The service may return fewer than this number. If you don't specify this number, then the server determines the number of results to return. |
page_ |
Optional. A page token, received from a previous When paginating, all other parameters provided to |
filter |
Optional. A filter query to apply when listing delivery vehicles. See http://aip.dev/160 for examples of the filter syntax. If you don't specify a value, or if you specify an empty string for the filter, then all delivery vehicles are returned. Note that the only queries supported for The maximum number of restrictions allowed in a filter query is 50. A restriction is a part of the query of the form |
viewport |
Optional. A filter that limits the vehicles returned to those whose last known location was in the rectangular area defined by the viewport. |
ListDeliveryVehiclesResponse
The ListDeliveryVehicles
response message.
Fields | |
---|---|
delivery_ |
The set of delivery vehicles that meet the requested filtering criteria. When no filter is specified, the request returns all delivery vehicles. A successful response can also be empty. An empty response indicates that no delivery vehicles were found meeting the requested filter criteria. |
next_ |
You can pass this token in the |
total_ |
The total number of delivery vehicles that match the request criteria, across all pages. |
ListTasksRequest
The ListTasks
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
parent |
Required. Must be in the format |
page_ |
Optional. The maximum number of Tasks to return. The service may return fewer than this value. If you don't specify this value, then the server determines the number of results to return. |
page_ |
Optional. A page token received from a previous When paginating, all other parameters provided to |
filter |
Optional. A filter query to apply when listing Tasks. See http://aip.dev/160 for examples of filter syntax. If you don't specify a value, or if you filter on an empty string, then all Tasks are returned. For information about the Task properties that you can filter on, see List tasks. |
ListTasksResponse
The ListTasks
response that contains the set of Tasks that meet the filter criteria in the ListTasksRequest
.
Fields | |
---|---|
tasks[] |
The set of Tasks that meet the requested filtering criteria. When no filter is specified, the request returns all tasks. A successful response can also be empty. An empty response indicates that no Tasks were found meeting the requested filter criteria. |
next_ |
Pass this token in the |
total_ |
The total number of Tasks that match the request criteria, across all pages. |
LocationInfo
A location with any additional identifiers.
Fields | |
---|---|
point |
The location's coordinates. |
Task
A Task in the Delivery API represents a single action to track. In general, there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.
Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info
field in the gRPC API and the Task.journeySharingInfo
field in the REST API refer to the same field.
Fields | |
---|---|
name |
Must be in the format |
type |
Required. Immutable. Defines the type of the Task. For example, a break or shipment. |
state |
Required. The current execution state of the Task. |
task_ |
The outcome of the Task. |
task_ |
The timestamp that indicates when the |
task_ |
The location where the |
task_ |
Indicates where the value of the |
tracking_ |
Immutable. This field facilitates the storing of an ID so you can avoid using a complicated mapping. You cannot set
|
delivery_ |
Output only. The ID of the vehicle that is executing this Task. Delivery Vehicle IDs are subject to the following restrictions:
|
planned_ |
Immutable. The location where the Task will be completed. Optional for |
task_ |
Required. Immutable. The time needed to execute a Task at this location. |
target_ |
The time window during which the task should be completed. |
journey_ |
Output only. Journey sharing-specific fields. Not populated when state is |
task_ |
The configuration for task tracking that specifies which data elements are visible to the end users under what circumstances. |
attributes[] |
A list of custom Task attributes. Each attribute must have a unique key. |
JourneySharingInfo
Journey sharing specific fields.
Fields | |
---|---|
remaining_ |
Tracking information for the stops that the assigned vehicle will make before it completes this Task. Note that this list can contain stops from other tasks. The first segment, |
last_ |
Indicates the vehicle's last reported location of the assigned vehicle. |
last_ |
Indicates whether the vehicle's lastLocation can be snapped to the |
State
The state of a Task. This indicates the Tasks's progress.
Enums | |
---|---|
STATE_UNSPECIFIED |
Default. Used for an unspecified or unrecognized Task state. |
OPEN |
Either the Task has not yet been assigned to a delivery vehicle, or the delivery vehicle has not yet passed the Task 's assigned vehicle stop. |
CLOSED |
When the vehicle passes the vehicle stop for this Task. |
TaskOutcome
The outcome of attempting to execute a Task. When TaskState
is closed, TaskOutcome
indicates whether it was completed successfully.
Enums | |
---|---|
TASK_OUTCOME_UNSPECIFIED |
The Task outcome before its value is set. |
SUCCEEDED |
The Task completed successfully. |
FAILED |
Either the Task couldn't be completed, or it was cancelled. |
TaskOutcomeLocationSource
The identity of the source that populated the task_outcome_location
.
Enums | |
---|---|
TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED |
The task outcome before it is set. |
PROVIDER |
The provider-specified the task_outcome_location . |
LAST_VEHICLE_LOCATION |
The provider didn't specify the task_outcome_location , so Fleet Engine used the last known vehicle location. |
Type
The type of Task.
Enums | |
---|---|
TYPE_UNSPECIFIED |
Default, the Task type is unknown. |
PICKUP |
A pickup Task is the action taken for picking up a shipment from a customer. Depot or feeder vehicle pickups should use the SCHEDULED_STOP type. |
DELIVERY |
A delivery Task is the action taken for delivering a shipment to an end customer. Depot or feeder vehicle dropoffs should use the SCHEDULED_STOP type. |
SCHEDULED_STOP |
A scheduled stop Task is used for planning purposes. For example, it could represent picking up or dropping off shipments from feeder vehicles or depots. It shouldn't be used for any shipments that are picked up or dropped off from an end customer. |
UNAVAILABLE |
A Task that means the Vehicle is not available for service. For example, this can happen when the driver takes a break, or when the vehicle is being refueled. |
TaskAttribute
Describes a task attribute as a key-value pair. The "key:value" string length cannot exceed 256 characters.
Fields | |
---|---|
key |
The attribute's key. Keys may not contain the colon character (:). |
Union field task_attribute_value . The attribute's value, can be in string, bool, or double type. If none are set the TaskAttribute string_value will be stored as the empty string "". task_attribute_value can be only one of the following: |
|
string_ |
String typed attribute value. |
bool_ |
Boolean typed attribute value. |
number_ |
Double typed attribute value. |
TaskTrackingInfo
The TaskTrackingInfo
message. The message contains task tracking information which will be used for display. If a tracking ID is associated with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's TaskTrackingInfo to select.
Fields | |
---|---|
name |
Must be in the format |
tracking_ |
Immutable. The tracking ID of a Task. * Must be a valid Unicode string. * Limited to a maximum length of 64 characters. * Normalized according to Unicode Normalization Form C. * May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'. |
vehicle_ |
The vehicle's last location. |
route_ |
A list of points which when connected forms a polyline of the vehicle's expected route to the location of this task. |
remaining_ |
Indicates the number of stops the vehicle remaining until the task stop is reached, including the task stop. For example, if the vehicle's next stop is the task stop, the value will be 1. |
remaining_ |
The total remaining distance in meters to the |
estimated_ |
The timestamp that indicates the estimated arrival time to the stop location. |
estimated_ |
The timestamp that indicates the estimated completion time of a Task. |
state |
The current execution state of the Task. |
task_ |
The outcome of attempting to execute a Task. |
task_ |
The timestamp that indicates when the Task's outcome was set by the provider. |
planned_ |
Immutable. The location where the Task will be completed. |
target_ |
The time window during which the task should be completed. |
attributes[] |
The custom attributes set on the task. |
TaskTrackingViewConfig
The configuration message that defines when a data element of a Task should be visible to the end users.
Fields | |
---|---|
route_ |
The field that specifies when route polyline points can be visible. If this field is not specified, the project level default visibility configuration for this data will be used. |
estimated_ |
The field that specifies when estimated arrival time can be visible. If this field is not specified, the project level default visibility configuration for this data will be used. |
estimated_ |
The field that specifies when estimated task completion time can be visible. If this field is not specified, the project level default visibility configuration for this data will be used. |
remaining_ |
The field that specifies when remaining driving distance can be visible. If this field is not specified, the project level default visibility configuration for this data will be used. |
remaining_ |
The field that specifies when remaining stop count can be visible. If this field is not specified, the project level default visibility configuration for this data will be used. |
vehicle_ |
The field that specifies when vehicle location can be visible. If this field is not specified, the project level default visibility configuration for this data will be used. |
VisibilityOption
The option message that defines when a data element should be visible to the end users.
Fields | |
---|---|
Union field visibility_option . The specific visibility option chosen. visibility_option can be only one of the following: |
|
remaining_ |
This data element is visible to the end users if the remaining stop count <= remaining_stop_count_threshold. |
duration_ |
This data element is visible to the end users if the ETA to the stop <= duration_until_estimated_arrival_time_threshold. |
remaining_ |
This data element is visible to the end users if the remaining driving distance in meters <= remaining_driving_distance_meters_threshold. |
always |
If set to true, this data element is always visible to the end users with no thresholds. This field cannot be set to false. |
never |
If set to true, this data element is always hidden from the end users with no thresholds. This field cannot be set to false. |
TimeWindow
A time range.
Fields | |
---|---|
start_ |
Required. The start time of the time window (inclusive). |
end_ |
Required. The end time of the time window (inclusive). |
UpdateDeliveryVehicleRequest
The UpdateDeliveryVehicle
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
delivery_ |
Required. The |
update_ |
Required. A field mask that indicates which This is a comma-separated list of fully qualified names of fields. Example: |
UpdateTaskRequest
The UpdateTask
request message.
Fields | |
---|---|
header |
Optional. The standard Delivery API request header. |
task |
Required. The Task associated with the update. The following fields are maintained by Fleet Engine. Do not update them using
Note: You cannot change the value of If the Task has been assigned to a delivery vehicle, then don't set the Task state to CLOSED using |
update_ |
Required. The field mask that indicates which Task fields to update. Note: The This is a comma-separated list of fully qualified names of fields. Example: |
VehicleJourneySegment
Represents a Vehicle’s travel segment - from its previous stop to the current stop. If it is the first active stop, then it is from the Vehicle’s current location to this stop.
Fields | |
---|---|
stop |
Specifies the stop location, along with the |
driving_ |
Output only. The travel distance from the previous stop to this stop. If the current stop is the first stop in the list of journey segments, then the starting point is the vehicle's location recorded at the time that this stop was added to the list. This field might not be present if this journey segment is part of |
driving_ |
Output only. The travel time from the previous stop to this stop. If the current stop is the first stop in the list of journey segments, then the starting point is the Vehicle's location recorded at the time that this stop was added to the list. If this field is defined in the path |
path[] |
Output only. The path from the previous stop to this stop. If the current stop is the first stop in the list of journey segments, then this is the path from the vehicle's current location to this stop at the time that the stop was added to the list. This field might not be present if this journey segment is part of If this field is defined in the path |
VehicleStop
Describes a point where a Vehicle stops to perform one or more Task
s.
Fields | |
---|---|
planned_ |
Required. The location of the stop. Note that the locations in the |
tasks[] |
The list of |
state |
The state of the |
State
The current state of a VehicleStop
.
Enums | |
---|---|
STATE_UNSPECIFIED |
Unknown. |
NEW |
Created, but not actively routing. |
ENROUTE |
Assigned and actively routing. |
ARRIVED |
Arrived at stop. Assumes that when the Vehicle is routing to the next stop, that all previous stops have been completed. |
TaskInfo
Additional information about the Task performed at this stop.
Fields | |
---|---|
task_ |
The Task ID. This field won't be populated in the response of a
|
task_ |
Output only. The time required to perform the Task. |
target_ |
Output only. The time window during which the task should be completed. This is only set in the response to |