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](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials.md.txt)

## 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](https://developers.google.com/maps/documentation/javascript/quick-reference.md.txt) 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](https://developers.google.com/maps/documentation/android-sdk/quick-reference.md.txt) 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](https://developers.google.com/maps/documentation/ios-sdk/quick-reference.md.txt) 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](https://developers.google.com/maps/documentation/route-optimization/quick-reference.md.txt) 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-ID` HTTP 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 in `related_ids` when reporting the transaction.
- **Get started:** [Set up Fleet Engine Service](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet.md.txt)
- **Reference:** [Fleet Engine Service reference](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference.md.txt)
- **Policies:** [Fleet Engine Service policies](https://developers.google.com/maps/documentation/mobility/services/terms.md.txt)
- **Release notes:** [Fleet Engine Service release notes](https://developers.google.com/maps/documentation/mobility/services/resources/relnotes_fleet_engine.md.txt)

**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](https://developers.google.com/maps/documentation/mobility/driver-sdk/quick-reference-android.md.txt), [Driver SDK for iOS](https://developers.google.com/maps/documentation/mobility/driver-sdk/quick-reference-ios.md.txt), [Consumer SDK for Android](https://developers.google.com/maps/documentation/mobility/journey-sharing/quick-reference-android.md.txt), [Consumer SDK for iOS](https://developers.google.com/maps/documentation/mobility/journey-sharing/quick-reference-ios.md.txt), [JavaScript Consumer SDK](https://developers.google.com/maps/documentation/mobility/journey-sharing/quick-reference-js.md.txt), [Route Optimization API](https://developers.google.com/maps/documentation/route-optimization/quick-reference.md.txt)

## 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_FOUND` on 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](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/troubleshoot.md.txt).
- **Problem:** `DEADLINE_EXCEEDED` errors occur when a request takes longer than the client library's default timeout. **Fix:** Adjust the RPC retry settings (for example, `setTotalTimeout` on `VehicleServiceSettings` in the Java client). See [/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/troubleshoot](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/troubleshoot.md.txt).
- **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](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/troubleshoot.md.txt).
- **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 `ReportBillableTrip` and the Mobility Billing API from a few days before until a few days after migration, compare request counts in Cloud Logging, then remove `ReportBillableTrip` calls. See [/maps/documentation/mobility/services/terms/billing/odrd-lmfs-migration](https://developers.google.com/maps/documentation/mobility/services/terms/billing/odrd-lmfs-migration).

## Fleet Engine Service: legacy and deprecated features

- **`UpdateVehicleLocation` method:** Decommissioned since 2024-05-01. **Replacement:** `UpdateVehicle` in `VehicleService`. **Symptom:** Deprecated 2024-02-01; decommissioned May 2024.
- **`SearchFuzzedVehicles` method:** Decommissioned since 2024-05-01. **Replacement:** `SearchVehicles` in `VehicleService`. **Symptom:** Deprecated 2024-02-01; decommissioned May 2024.
- **`SearchTasks` method:** Decommissioned since 2024-05-01. **Replacement:** `GetTaskTrackingInfo` in `DeliveryService`. **Symptom:** Deprecated 2024-02-01; decommissioned May 2024.
- **`ReportBillableTrip` after 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 API `reportBillableEvent`. **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](https://developers.google.com/maps/documentation/mobility/services/terms/billing/odrd-lmfs-migration).

## What you can do with Fleet Engine Service

See the guides linked below for each task, or compare across products in the
[Capabilities Explorer](https://developers.google.com/maps/documentation/capabilities-explorer.md.txt).

- [Report billable Fleet Engine trip usage.](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.billableTrips/report.md.txt)
- [Create and return a new Fleet Engine trip.](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/trips/create-trip.md.txt)
- [Return information about a Fleet Engine trip.](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/trips/retrieve-trips-directly.md.txt)
- [Return a list of all Fleet Engine trips for a specified vehicle.](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/trips/find-trip.md.txt)
- [Update trip data for a Fleet Engine trip.](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/trips/update-trip.md.txt)
- [Instantiate a new vehicle in Fleet Engine associated with an on-demand rideshare or deliveries provider.](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles/create.md.txt)
- [Return a vehicle from the Fleet Engine service.](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/vehicles/on-demand-get-vehicle.md.txt)
- [Return a paginated list of vehicles in Fleet Engine associated with a provider that match the specified criteria.](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/vehicles/on-demand-list-vehicle.md.txt)
- [Return a list of vehicles in Fleet Engine that match the specified criteria.](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles/search.md.txt)
- [Update vehicle data for a vehicle in Fleet Engine.](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles/update.md.txt)
- [Update vehicle attributes for a vehicle in Fleet Engine.](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles/updateAttributes.md.txt)
- [Return trip information for a vehicle from the Fleet Engine service.](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/trips/retrieve-trips-directly.md.txt)