Fleet Engine is a backend service that models your real-world vehicle fleet and provides routing, ETA, traffic, and status updates for on-demand trips and scheduled tasks. It uses location and route data from the Driver SDK and works with the Consumer SDK and other Google Maps Platform APIs.
Fleet Engine Service: key facts
- Product: Fleet Engine Service
- Also known as: Fleet Engine, Fleet Engine API, Local Rides and Deliveries API
- Category: Routes
- Platform: Web service (REST)
- Runs on: Server (backend code)
- Launch stage: GA
- Lifecycle: Active
- Overview: Fleet Engine Service overview
Fleet Engine Service: when to use it
Use Fleet Engine Service when:
- You need a backend that models vehicles and on-demand trips (pickup, waypoints, drop-off), including multi-destination, back-to-back, or shared trips.
- You need to model scheduled delivery or service tasks assigned to vehicles and track their stops, outcomes, and ETAs.
- You need to search or list vehicles in a region to match them to requested rides.
- You need consumer trip or shipment tracking and fleet operator tracking fed by Driver SDK location updates.
Don't use Fleet Engine Service when:
- You need to show live GPS markers or asset paths on a web map from your own database or stream, without Fleet Engine trip or task orchestration. Use Maps JavaScript API instead.
- You need to show live markers or paths from your own data in an Android app, without Fleet Engine trip or task orchestration. Use Maps SDK for Android instead.
- You need to show live markers or paths from your own data in an iOS app, without Fleet Engine trip or task orchestration. Use Maps SDK for iOS instead.
- You need to compute optimized fleet-wide route plans; Fleet Engine only takes route plans from a solver you provide. Use Route Optimization API instead.
Fleet Engine Service: setup
- Service to enable:
fleetengine.googleapis.com - Authentication: Service account, JSON Web Token (JWT), OAuth 2.0
- Usage attribution: Optional beta feature: set the
X-Goog-Maps-Experience-IDHTTP header to the Mobility Transaction ID (or a related ID, such as a session ID) on calls to Mobility package services; separate multiple IDs with commas. Pass any related IDs inrelated_idswhen reporting the transaction. - Get started: Set up Fleet Engine Service
- Reference: Fleet Engine Service reference
- Policies: Fleet Engine Service policies
- Release notes: Fleet Engine Service release notes
Official Fleet Engine Service packages:
- maven:
com.google.maps:google-maps-fleetengine - maven:
com.google.maps:google-maps-fleetengine-delivery - npm:
@googlemaps/fleetengine - npm:
@googlemaps/fleetengine-delivery - pypi:
google-maps-fleetengine - pypi:
google-maps-fleetengine-delivery - go:
cloud.google.com/go/maps
Fleet Engine Service: related products
- Often used with: Driver SDK for Android, Driver SDK for iOS, Consumer SDK for Android, Consumer SDK for iOS, JavaScript Consumer SDK, Route Optimization API
Fleet Engine Service: common mistakes
- Problem: Requests to Fleet Engine can fail occasionally, and after a failure, entities such as vehicles may no longer exist (
NOT_FOUNDon update). Fix: Implement retries with backoff (client libraries retry by default), and recreate missing vehicles or tasks in their current state. See /maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/troubleshoot. - Problem:
DEADLINE_EXCEEDEDerrors occur when a request takes longer than the client library's default timeout. Fix: Adjust the RPC retry settings (for example,setTotalTimeoutonVehicleServiceSettingsin the Java client). See /maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/troubleshoot. - Problem:
PERMISSION_DENIED(HTTP 403) when the JWT is missing the correct claims or the signing service account lacks the required Fleet Engine IAM role (for example, "JWT does not contain a matching scope for requested trip"). Fix: Check service account roles and make sure the JWT claims include scopes for the vehicle, trip, or task being accessed. See /maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/troubleshoot. - Problem: When migrating from On-Demand Rides and Deliveries to any Mobility package, or from Last Mile Fleet Solution to Mobility Activate or Optimize, Mobility Billing API requests return HTTP 202 until migration is complete and don't result in billing. Fix: Call both Fleet Engine
ReportBillableTripand the Mobility Billing API from a few days before until a few days after migration, compare request counts in Cloud Logging, then removeReportBillableTripcalls. See /maps/documentation/mobility/services/terms/billing/odrd-lmfs-migration.
Fleet Engine Service: legacy and deprecated features
UpdateVehicleLocationmethod: Decommissioned since 2024-05-01. Replacement:UpdateVehicleinVehicleService. Symptom: Deprecated 2024-02-01; decommissioned May 2024.SearchFuzzedVehiclesmethod: Decommissioned since 2024-05-01. Replacement:SearchVehiclesinVehicleService. Symptom: Deprecated 2024-02-01; decommissioned May 2024.SearchTasksmethod: Decommissioned since 2024-05-01. Replacement:GetTaskTrackingInfoinDeliveryService. Symptom: Deprecated 2024-02-01; decommissioned May 2024.ReportBillableTripafter migrating to a Mobility package (On-Demand Rides and Deliveries to any package, or Last Mile Fleet Solution to Activate or Optimize): Legacy. Replacement: Mobility Billing APIreportBillableEvent. Symptom: Contract-specific, not an API deprecation. After migration, calls can return "Invalid Contract: This project [...] is not authorized to use FleetEngine.". See the migration guide.
What you can do with Fleet Engine Service
See the guides linked below for each task, or compare across products in the Capabilities Explorer.
- Report billable Fleet Engine trip usage.
- Create and return a new Fleet Engine trip.
- Return information about a Fleet Engine trip.
- Return a list of all Fleet Engine trips for a specified vehicle.
- Update trip data for a Fleet Engine trip.
- Instantiate a new vehicle in Fleet Engine associated with an on-demand rideshare or deliveries provider.
- Return a vehicle from the Fleet Engine service.
- Return a paginated list of vehicles in Fleet Engine associated with a provider that match the specified criteria.
- Return a list of vehicles in Fleet Engine that match the specified criteria.
- Update vehicle data for a vehicle in Fleet Engine.
- Update vehicle attributes for a vehicle in Fleet Engine.
- Return trip information for a vehicle from the Fleet Engine service.