Method: networks.shipments.route

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

string

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 (Shipment)
  }
}
Fields
shipment

object (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 (Shipment)
  },
  "paths": [
    {
      object (Path)
    }
  ],
  "lines": [
    {
      object (GeneratedLineAndRotation)
    }
  ]
}
Fields
shipment

object (Shipment)

The shipment that was just created.

paths[]

object (Path)

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

object (GeneratedLineAndRotation)

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 (DateTime)
    },
    ...
  },
  "departureTimes": {
    string: {
      object (DateTime)
    },
    ...
  }
}
Fields
arrivalTimes

map (key: string, value: object (DateTime))

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 "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

departureTimes

map (key: string, value: object (DateTime))

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 "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.