- [HTTP request](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/batchOptimizeTours#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/batchOptimizeTours#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/batchOptimizeTours#body.request_body)
  - [JSON representation](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/batchOptimizeTours#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/batchOptimizeTours#body.response_body)
- [Authorization scopes](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/batchOptimizeTours#body.aspect)
- [IAM Permissions](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/batchOptimizeTours#body.aspect_1)

Optimizes vehicle tours for one or more `OptimizeToursRequest` messages as a batch.

This method is a Long Running Operation (LRO). The inputs for optimization (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` messages) are read from and written to Cloud Storage in user-specified format. Like the `projects.optimizeTours` method, each `OptimizeToursRequest` contains a `ShipmentModel` and returns an `OptimizeToursResponse` containing `ShipmentRoute` fields, which are a set of routes to be performed by vehicles minimizing the overall cost.

The user can poll `operations.get` to check the status of the LRO:

If the LRO `done` field is false, then at least one request is still being processed. Other requests may have completed successfully and their results are available in Cloud Storage.

If the LRO's `done` field is true, then all requests have been processed. Any successfully processed requests will have their results available in Cloud Storage. Any requests that failed will not have their results available in Cloud Storage. If the LRO's `error` field is set, then it contains the error from one of the failed requests.

### HTTP request

`POST https://routeoptimization.googleapis.com/v1/{parent=projects/*}:batchOptimizeTours`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Target project and location to make a call. Format: - `projects/{project-id}` - `projects/{project-id}/locations/-` Regional `{location-id}` values are not supported. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "modelConfigs": [ { object (`https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/AsyncModelConfig`) } ] } ``` |

| Fields ||
|---|---|
| `modelConfigs[]` | ``object (`https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/AsyncModelConfig`)`` Required. Input/Output information each purchase model, such as file paths and data formats. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `routeoptimization.operations.create`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).