Package maps.fleetengine.delivery.v1

Index

DeliveryService

The Last Mile Delivery service.

BatchCreateTasks

rpc BatchCreateTasks(BatchCreateTasksRequest) returns (BatchCreateTasksResponse)

Creates and returns a batch of new Task objects.

CreateDeliveryVehicle

rpc CreateDeliveryVehicle(CreateDeliveryVehicleRequest) returns (DeliveryVehicle)

Creates and returns a new DeliveryVehicle.

CreateTask

rpc CreateTask(CreateTaskRequest) returns (Task)

Creates and returns a new Task object.

GetDeliveryVehicle

rpc GetDeliveryVehicle(GetDeliveryVehicleRequest) returns (DeliveryVehicle)

Returns the specified DeliveryVehicle instance.

GetTask

rpc GetTask(GetTaskRequest) returns (Task)

Gets information about a Task.

GetTaskTrackingInfo

rpc GetTaskTrackingInfo(GetTaskTrackingInfoRequest) returns (TaskTrackingInfo)

Returns the specified TaskTrackingInfo instance.

ListDeliveryVehicles

rpc ListDeliveryVehicles(ListDeliveryVehiclesRequest) returns (ListDeliveryVehiclesResponse)

Gets all DeliveryVehicles that meet the specified filtering criteria.

ListTasks

rpc ListTasks(ListTasksRequest) returns (ListTasksResponse)

Gets all Tasks that meet the specified filtering criteria.

SearchTasks

rpc SearchTasks(SearchTasksRequest) returns (SearchTasksResponse)

Deprecated: Use GetTaskTrackingInfo instead.

UpdateDeliveryVehicle

rpc UpdateDeliveryVehicle(UpdateDeliveryVehicleRequest) returns (DeliveryVehicle)

Writes updated DeliveryVehicle data to Fleet Engine, and assigns Tasks to the DeliveryVehicle. You cannot update the name of the DeliveryVehicle. You can update remaining_vehicle_journey_segments though, but it must contain all of the VehicleJourneySegments currently on the DeliveryVehicle. The task_ids are retrieved from remaining_vehicle_journey_segments, and their corresponding Tasks are assigned to the DeliveryVehicle if they have not yet been assigned.

UpdateTask

rpc UpdateTask(UpdateTaskRequest) returns (Task)

Updates Task data.

BatchCreateTasksRequest

The BatchCreateTask request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header. Note: If you set this field, then the header field in the CreateTaskRequest messages must either be empty, or it must match this field.

parent

string

Required. The parent resource shared by all tasks. This value must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project. The parent field in the CreateTaskRequest messages must either be empty, or it must match this field.

requests[]

CreateTaskRequest

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[]

Task

The created Tasks.

CreateDeliveryVehicleRequest

The CreateDeliveryVehicle request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

parent

string

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

delivery_vehicle_id

string

Required. The Delivery Vehicle ID must be unique and subject to the following restrictions:

  • 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 '#'.
delivery_vehicle

DeliveryVehicle

Required. The DeliveryVehicle entity to create. When creating a new delivery vehicle, you may set the following optional fields:

  • last_location
  • attributes

Note: The DeliveryVehicle's name field is ignored. All other DeliveryVehicle fields must not be set; otherwise, an error is returned.

CreateTaskRequest

The CreateTask request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

parent

string

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

task_id

string

Required. The Task ID must be unique, but it should be not a shipment tracking ID. To store a shipment tracking ID, use the tracking_id field. Note that multiple tasks can have the same tracking_id. Task IDs are subject to the following restrictions:

  • 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 '#'.
task

Task

Required. The Task entity to create. When creating a Task, the following fields are required:

  • type
  • state (must be set to OPEN)
  • tracking_id (must not be set for UNAVAILABLE or SCHEDULED_STOP tasks, but required for all other task types)
  • planned_location (optional for UNAVAILABLE tasks)
  • task_duration

Note: The Task's name field is ignored. All other Task fields must not be set; otherwise, an error is returned.

DeliveryRequestHeader

A RequestHeader contains fields common to all Delivery RPC requests.

Fields
language_code

string

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: en-US.

region_code

string

Required. CLDR region code of the region where the request originates. Field value example: US.

sdk_version

string

Version of the calling SDK, if applicable. The version format is "major.minor.patch", example: 1.1.2.

os_version

string

Version of the operating system on which the calling SDK is running. Field value examples: 4.4.1, 12.1.

device_model

string

Model of the device on which the calling SDK is running. Field value examples: iPhone12,1, SM-G920F.

sdk_type

SdkType

The type of SDK sending the request.

maps_sdk_version

string

Version of the MapSDK which the calling SDK depends on, if applicable. The version format is "major.minor.patch", example: 5.2.1.

nav_sdk_version

string

Version of the NavSDK which the calling SDK depends on, if applicable. The version format is "major.minor.patch", example: 2.1.0.

platform

Platform

Platform of the calling SDK.

manufacturer

string

Manufacturer of the Android device from the calling SDK, only applicable for the Android SDKs. Field value example: Samsung.

android_api_level

int32

Android API level of the calling SDK, only applicable for the Android SDKs. Field value example: 23.

trace_id

string

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

string

The unique name of this Delivery Vehicle. The format is providers/{provider}/deliveryVehicles/{vehicle}.

last_location

DeliveryVehicleLocation

The last reported location of the Delivery Vehicle.

navigation_status

DeliveryVehicleNavigationStatus

The Delivery Vehicle's navigation status.

current_route_segment

bytes

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 LatLngs are returned in Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path (REST) for all active Tasks assigned to the Vehicle.

There are a few cases where this field might not be used to populate Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path (REST):

  • The endpoint of the current_route_segment does not match DeliveryVehicle.remaining_vehicle_journey_segments[0].stop (gRPC) or DeliveryVehicle.remainingVehicleJourneySegments[0].stop (REST).

  • The driver app has not updated its location recently, so the last updated value for this field might be stale.

  • The driver app has recently updated its location, but the current_route_segment is stale, and points to a previous vehicle stop.

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_route_segment_end_point

LatLng

The location where the current_route_segment ends. This is not currently populated by the driver app, but you can supply it on UpdateDeliveryVehicle calls. It is either the LatLng from the upcoming vehicle stop, or the last LatLng of the current_route_segment. Fleet Engine will then do its best to interpolate to an actual VehicleStop.

This field is ignored in UpdateDeliveryVehicle calls if the current_route_segment field is empty.

remaining_distance_meters

Int32Value

The remaining driving distance for the current_route_segment. The Driver app typically provides this field, but there are some circumstances in which Fleet Engine will override the value sent by the app. For more information, see DeliveryVehicle.current_route_segment. This field is returned in Task.remaining_vehicle_journey_segments[0].driving_distance_meters (gRPC) or Task.remainingVehicleJourneySegments[0].drivingDistanceMeters (REST) for all active Tasks assigned to the Delivery Vehicle.

Fleet Engine ignores this field in UpdateDeliveryVehicleRequest if the current_route_segment field is empty.

remaining_duration

Duration

The remaining driving time for the current_route_segment. The Driver app typically provides this field, but there are some circumstances in which Fleet Engine will override the value sent by the app. For more information, see DeliveryVehicle.current_route_segment. This field is returned in Task.remaining_vehicle_journey_segments[0].driving_duration (gRPC) or Task.remainingVehicleJourneySegments[0].drivingDuration (REST) for all active tasks assigned to the Delivery Vehicle.

Fleet Engine ignores this field in UpdateDeliveryVehicleRequest if the current_route_segment field is empty.

remaining_vehicle_journey_segments[]

VehicleJourneySegment

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 ListDeliveryVehicles.

attributes[]

DeliveryVehicleAttribute

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

DeliveryVehicleType

The type of this delivery vehicle. If unset, this will default to AUTO.

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

string

The attribute's key.

value

string

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_value

string

String typed attribute value.

Note: This is identical to the value field which will eventually be deprecated. For create or update methods, either field can be used, but it's strongly recommended to use string_value. If both string_value and value are set, they must be identical or an error will be thrown. Both fields are populated in responses.

bool_value

bool

Boolean typed attribute value.

number_value

double

Double typed attribute value.

DeliveryVehicleLocation

The location, speed, and heading of a vehicle at a point in time.

Fields
location

LatLng

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 location_sensor.

horizontal_accuracy
(deprecated)

DoubleValue

Deprecated: Use latlng_accuracy instead.

latlng_accuracy

DoubleValue

Accuracy of location in meters as a radius.

heading

Int32Value

Direction the vehicle is moving in degrees. 0 represents North. The valid range is [0,360).

bearing_accuracy
(deprecated)

DoubleValue

Deprecated: Use heading_accuracy instead.

heading_accuracy

DoubleValue

Accuracy of heading in degrees.

altitude

DoubleValue

Altitude in meters above WGS84.

vertical_accuracy
(deprecated)

DoubleValue

Deprecated: Use altitude_accuracy instead.

altitude_accuracy

DoubleValue

Accuracy of altitude in meters.

speed_kmph
(deprecated)

Int32Value

Speed of the vehicle in kilometers per hour. Deprecated: Use speed instead.

speed

DoubleValue

Speed of the vehicle in meters/second

speed_accuracy

DoubleValue

Accuracy of speed in meters/second.

update_time

Timestamp

The time when location was reported by the sensor according to the sensor's clock.

server_time

Timestamp

Output only. The time when the server received the location information.

location_sensor

DeliveryVehicleLocationSensor

Provider of location data (for example, GPS).

is_road_snapped

BoolValue

Whether location is snapped to a road.

is_gps_sensor_enabled

BoolValue

Input only. Indicates whether the GPS sensor is enabled on the mobile device.

time_since_update

Int32Value

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
(deprecated)

Int32Value

Input only. Deprecated: Other signals are now used to determine if a location is stale.

raw_location

LatLng

Raw vehicle location (unprocessed by road-snapper).

raw_location_time

Timestamp

Timestamp associated with the raw location.

raw_location_sensor

DeliveryVehicleLocationSensor

Source of the raw location. Defaults to GPS.

raw_location_accuracy

DoubleValue

Accuracy of raw_location as a radius, in meters.

supplemental_location

LatLng

Supplemental location provided by the integrating app.

supplemental_location_time

Timestamp

Timestamp associated with the supplemental location.

supplemental_location_sensor

DeliveryVehicleLocationSensor

Source of the supplemental location. Defaults to CUSTOMER_SUPPLIED_LOCATION.

supplemental_location_accuracy

DoubleValue

Accuracy of supplemental_location as a radius, in meters.

road_snapped
(deprecated)

bool

Deprecated: Use is_road_snapped instead.

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.

DeliveryVehicleNavigationStatus

The vehicle's navigation status.

Enums
UNKNOWN_NAVIGATION_STATUS Unspecified navigation status.
NO_GUIDANCE The Driver app's navigation is in FREE_NAV mode.
ENROUTE_TO_DESTINATION Turn-by-turn navigation is available and the Driver app navigation has entered GUIDED_NAV mode.
OFF_ROUTE The vehicle has gone off the suggested route.
ARRIVED_AT_DESTINATION The vehicle is within approximately 50m of the destination.

GetDeliveryVehicleRequest

The GetDeliveryVehicle request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

name

string

Required. Must be in the format providers/{provider}/deliveryVehicles/{delivery_vehicle}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

GetTaskRequest

The GetTask request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

name

string

Required. Must be in the format providers/{provider}/tasks/{task}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

GetTaskTrackingInfoRequest

The GetTaskTrackingInfoRequest request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

name

string

Required. Must be in the format providers/{provider}/taskTrackingInfo/{tracking_id}. The provider must be the Google Cloud Project ID, and the tracking_id must be the tracking ID associated with the task. An example name can be providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id.

ListDeliveryVehiclesRequest

The ListDeliveryVehicles request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

parent

string

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

page_size

int32

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_token

string

Optional. A page token, received from a previous ListDeliveryVehicles call. You must provide this in order to retrieve the subsequent page.

When paginating, all other parameters provided to ListDeliveryVehicles must match the call that provided the page token.

filter

string

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 ListDeliveryVehicles are on vehicle attributes (for example, attributes.<key> = <value> or attributes.<key1> = <value1> AND attributes.<key2> = <value2>). Also, all attributes are stored as strings, so the only supported comparisons against attributes are string comparisons. In order to compare against number or boolean values, the values must be explicitly quoted to be treated as strings (for example, attributes.<key> = "10" or attributes.<key> = "true").

The maximum number of restrictions allowed in a filter query is 50. A restriction is a part of the query of the form attribute.<KEY> <COMPARATOR> <VALUE>, for example attributes.foo = bar is 1 restriction.

viewport

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_vehicles[]

DeliveryVehicle

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_page_token

string

You can pass this token in the ListDeliveryVehiclesRequest to continue to list results. When all of the results are returned, this field won't be in the response, or it will be an empty string.

total_size

int64

The total number of delivery vehicles that match the request criteria, across all pages.

ListTasksRequest

The ListTasks request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

parent

string

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

page_size

int32

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_token

string

Optional. A page token received from a previous ListTasks call. You can provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListTasks must match the call that provided the page token.

filter

string

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 Task list.

ListTasksResponse

The ListTasks response that contains the set of Tasks that meet the filter criteria in the ListTasksRequest.

Fields
tasks[]

Task

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_page_token

string

Pass this token in the ListTasksRequest to continue to list results. If all results have been returned, then this field is either an empty string, or it doesn't appear in the response.

total_size

int64

The total number of Tasks that match the request criteria, across all pages.

LocationInfo

A location with any additional identifiers.

Fields
point

LatLng

The location's coordinates.

SearchTasksRequest

Deprecated: Issue GetTaskTrackingInfoRequests to GetTaskTrackingInfo instead.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

parent

string

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

tracking_id

string

Required. The identifier of the set of related Tasks being requested. Tracking IDs are subject to the following restrictions:

  • 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 '#'.
page_size

int32

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_token

string

Optional. A page token, received from a previous SearchTasks call. You must provide this value to retrieve the subsequent page.

When paginating, all other parameters provided to SearchTasks must match the call that provided the page token.

SearchTasksResponse

The SearchTasks response. It contains the set of Tasks that meet the search criteria in the SearchTasksRequest.

Fields
tasks[]

Task

The set of Tasks for the requested tracking_id. A successful response can also be empty. An empty response indicates that no Tasks are associated with the supplied tracking_id.

next_page_token

string

Pass this token in the SearchTasksRequest to continue to list results. If all results have been returned, then this field is either an empty string, or it doesn't appear in the response.

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

string

Must be in the format providers/{provider}/tasks/{task}.

type

Type

Required. Immutable. Defines the type of the Task. For example, a break or shipment.

state

State

Required. The current execution state of the Task.

task_outcome

TaskOutcome

The outcome of the Task.

task_outcome_time

Timestamp

The timestamp that indicates when the Task's outcome was set by the provider.

task_outcome_location

LocationInfo

The location where the Task's outcome was set. This value is updated as part of UpdateTask. If this value isn't explicitly updated by the provider, then Fleet Engine populates it by default with the last known vehicle location (the raw location).

task_outcome_location_source

TaskOutcomeLocationSource

Indicates where the value of the task_outcome_location came from.

tracking_id

string

Immutable. This field facilitates the storing of an ID so you can avoid using a complicated mapping. You cannot set tracking_id for Tasks of type UNAVAILABLE and SCHEDULED_STOP. These IDs are subject to the following restrictions:

  • 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 '#'.
delivery_vehicle_id

string

Output only. The ID of the vehicle that is executing this Task. Delivery Vehicle IDs are subject to the following restrictions:

  • 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 '#'.
planned_location

LocationInfo

Immutable. The location where the Task will be completed. Optional for UNAVAILABLE Tasks, but required for all other Tasks.

task_duration

Duration

Required. Immutable. The time needed to execute a Task at this location.

target_time_window

TimeWindow

The time window during which the task should be completed.

journey_sharing_info

JourneySharingInfo

Output only. Journey sharing-specific fields. Not populated when state is CLOSED.

task_tracking_view_config

TaskTrackingViewConfig

The configuration for task tracking that specifies which data elements are visible to the end users under what circumstances.

attributes[]

TaskAttribute

A list of custom Task attributes. Each attribute must have a unique key.

JourneySharingInfo

Journey sharing specific fields.

Fields
remaining_vehicle_journey_segments[]

VehicleJourneySegment

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, Task.journey_sharing_info.remaining_vehicle_journey_segments[0] (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0] (REST), contains route information from the driver's last known location to the upcoming VehicleStop. Current route information usually comes from the driver app, except for some cases noted in the documentation for DeliveryVehicle.current_route_segment. The other segments in Task.journey_sharing_info.remaining_vehicle_journey_segments (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments (REST) are populated by Fleet Engine. They provide route information between the remaining VehicleStops.

last_location

DeliveryVehicleLocation

Indicates the vehicle's last reported location of the assigned vehicle.

last_location_snappable

bool

Indicates whether the vehicle's lastLocation can be snapped to the current_route_segment. This value is False if either last_location or current_route_segment don't exist. This value is computed by Fleet Engine. Updates from clients are ignored.

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

string

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_value

string

String typed attribute value.

bool_value

bool

Boolean typed attribute value.

number_value

double

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

string

Must be in the format providers/{provider}/taskTrackingInfo/{tracking}, where tracking represents the tracking ID.

tracking_id

string

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_location

DeliveryVehicleLocation

The vehicle's last location.

route_polyline_points[]

LatLng

A list of points which when connected forms a polyline of the vehicle's expected route to the location of this task.

remaining_stop_count

Int32Value

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_driving_distance_meters

Int32Value

The total remaining distance in meters to the VehicleStop of interest.

estimated_arrival_time

Timestamp

The timestamp that indicates the estimated arrival time to the stop location.

estimated_task_completion_time

Timestamp

The timestamp that indicates the estimated completion time of a Task.

state

State

The current execution state of the Task.

task_outcome

TaskOutcome

The outcome of attempting to execute a Task.

task_outcome_time

Timestamp

The timestamp that indicates when the Task's outcome was set by the provider.

planned_location

LocationInfo

Immutable. The location where the Task will be completed.

target_time_window

TimeWindow

The time window during which the task should be completed.

attributes[]

TaskAttribute

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_polyline_points_visibility

VisibilityOption

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_arrival_time_visibility

VisibilityOption

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_task_completion_time_visibility

VisibilityOption

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_driving_distance_visibility

VisibilityOption

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_stop_count_visibility

VisibilityOption

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_location_visibility

VisibilityOption

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_stop_count_threshold

int32

This data element is visible to the end users if the remaining stop count <= remaining_stop_count_threshold.

duration_until_estimated_arrival_time_threshold

Duration

This data element is visible to the end users if the ETA to the stop <= duration_until_estimated_arrival_time_threshold.

remaining_driving_distance_meters_threshold

int32

This data element is visible to the end users if the remaining driving distance in meters <= remaining_driving_distance_meters_threshold.

always

bool

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

bool

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_time

Timestamp

Required. The start time of the time window (inclusive).

end_time

Timestamp

Required. The end time of the time window (inclusive).

UpdateDeliveryVehicleRequest

The UpdateDeliveryVehicle request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

delivery_vehicle

DeliveryVehicle

Required. The DeliveryVehicle entity update to apply. Note: You cannot update the name of the DeliveryVehicle.

update_mask

FieldMask

Required. A field mask that indicates which DeliveryVehicle fields to update. Note that the update_mask must contain at least one field.

This is a comma-separated list of fully qualified names of fields. Example: "remaining_vehicle_journey_segments".

UpdateTaskRequest

The UpdateTask request message.

Fields
header

DeliveryRequestHeader

Optional. The standard Delivery API request header.

task

Task

Required. The Task associated with the update. The following fields are maintained by Fleet Engine. Do not update them using Task.update.

  • last_location.
  • last_location_snappable.
  • name.
  • remaining_vehicle_journey_segments.
  • task_outcome_location_source.

Note: You cannot change the value of task_outcome once you set it.

If the Task has been assigned to a delivery vehicle, then don't set the Task state to CLOSED using Task.update. Instead, remove the VehicleStop that contains the Task from the delivery vehicle, which automatically sets the Task state to CLOSED.

update_mask

FieldMask

Required. The field mask that indicates which Task fields to update. Note: The update_mask must contain at least one field.

This is a comma-separated list of fully qualified names of fields. Example: "task_outcome,task_outcome_time,task_outcome_location".

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

VehicleStop

Specifies the stop location, along with the Tasks associated with the stop. Some fields of the VehicleStop might not be present if this journey segment is part of JourneySharingInfo.

driving_distance_meters

Int32Value

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 JourneySharingInfo.

driving_duration

Duration

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 Task.remaining_vehicle_journey_segments[0].driving_duration (gRPC) or Task.remainingVehicleJourneySegments[0].drivingDuration (REST), then it may be populated with the value from DeliveryVehicle.remaining_duration (gRPC) or DeliveryVehicle.remainingDuration (REST). This provides the remaining driving duration from the driver app's latest known location rather than the driving time from the previous stop.

path[]

LatLng

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 JourneySharingInfo.

If this field is defined in the path Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path (REST), then it may be populated with the LatLngs decoded from DeliveryVehicle.current_route_segment (gRPC) or DeliveryVehicle.currentRouteSegment (REST). This provides the driving path from the driver app's latest known location rather than the path from the previous stop.

VehicleStop

Describes a point where a Vehicle stops to perform one or more Tasks.

Fields
planned_location

LocationInfo

Required. The location of the stop. Note that the locations in the Tasks might not exactly match this location, but will be within a short distance of it. This field won't be populated in the response of either a GetTask, or a SearchTasks call.

tasks[]

TaskInfo

The list of Tasks to be performed at this stop. This field won't be populated in the response of either a GetTask or SearchTasks call.

state

State

The state of the VehicleStop. This field won't be populated in the response of either a GetTask, or a SearchTasks call.

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_id

string

The Task ID. This field won't be populated in the response of either a GetTask, or a SearchTasks call. Task IDs are subject to the following restrictions:

  • 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 '#'.
task_duration

Duration

Output only. The time required to perform the Task.

target_time_window

TimeWindow

Output only. The time window during which the task should be completed. This is only set in the response to GetDeliveryVehicle.