Page Summary
-
Route new shipments by initiating a state change using a
POSTrequest to the specified endpoint. -
The request body must contain the shipment details in JSON format adhering to the
Shipmentobject structure. -
A successful response includes the routed shipment, affected paths, and generated line rotations if any.
-
Generated line rotations, if created during routing, represent internal state changes and are less constrained.
-
These rotations detail arrival and departure times for hubs involved in the shipment route using
DateTimeobjects.
Route a new shipment. Akin to creation, this operation implies a state change.
HTTP request
POST https://middlemileoptimization.googleapis.com/v1/{parent=networks/*}/shipments:route
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The parent, the network within which the shipment must be routed. Format: "networks/{network}" |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"shipment": {
object ( |
| Fields | |
|---|---|
shipment |
Required. The shipment to route. |
Response body
The response message for shipments.route method.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "shipment": { object ( |
| Fields | |
|---|---|
shipment |
The shipment that was just created. |
paths[] |
The paths that were changed due to routing the shipment. This field includes at least one entry, the path for the shipment that had to be routed. It may contain more paths for other shipments, reflecting internal state changes. |
lines[] |
The line rotations that were created while routing the shipment. It may be empty or contain rotations for other shipments, reflecting internal state changes. |
GeneratedLineAndRotation
One rotation of a line that is generated by this API and not the API customer. It is inherently less constrained, and could use any vehicle (unless the API customer decides otherwise in subsequent calls).
| JSON representation |
|---|
{ "arrivalTimes": { string: { object ( |
| Fields | |
|---|---|
arrival |
Output only. Map between hub IDs and times. This map is supposed to have the same keys (minus the source hub, with no arrival time). An object containing a list of |
departure |
Output only. Map between hub IDs and times. This map is supposed to have the same keys (minus the destination hub, with no departure time). An object containing a list of |