routing-api-v2.json (1.0)

Download OpenAPI specification:Download

Routing

BuildRoutes

Request Body schema:
stopKeys
required
Array of integers or null <int32>
loadType
required
integer <int32>
branchKey
required
integer <int32>
loadDate
required
string <date-time>
name
required
string or null
profileKey
required
integer <int32>
truckKey
required
integer <int32>

Responses

Request samples

Content type
{
  • "stopKeys": [
    ],
  • "loadType": 0,
  • "branchKey": 0,
  • "loadDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "profileKey": 0,
  • "truckKey": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "resourceUrl": "string"
}

CreateRoute

Request Body schema:
branchKey
integer <int32>
loadDate
string <date-time>
name
string or null
profileKey
integer <int32>
truckKey
integer <int32>

Responses

Request samples

Content type
{
  • "branchKey": 0,
  • "loadDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "profileKey": 0,
  • "truckKey": 0
}

Response samples

Content type
application/json
{
  • "name": "RT-1234-W",
  • "key": 1234,
  • "number": 1,
  • "branchKey": 1,
  • "legs": [
    ],
  • "plan": {
    },
  • "actual": {
    },
  • "dispatch": {
    },
  • "config": {
    }
}

DeleteRoute

path Parameters
key
required
string
query Parameters
unloadStops
boolean
Default: "true"

Determines whether or not existing stops on the route will be unloaded before the route is deleted. If this is set to false, then any stops present on the route will also be deleted.

Responses

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

FinalizeRoutes

Request Body schema: application/json
routeKeys
Array of integers

Responses

Request samples

Content type
application/json
{
  • "routeKeys": [
    ]
}

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

GeocodeOrder

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "routeKey": 0,
  • "accountKey": 0,
  • "shipToKey": 0,
  • "terminal": true,
  • "sequence": 0,
  • "leg": 0,
  • "plan": {
    },
  • "actual": {
    },
  • "estimated": {
    },
  • "status": {
    },
  • "config": {
    },
  • "location": {
    },
  • "orders": [
    ]
}

GetAvailableTruckMasters

query Parameters
branchKey
integer
loadDate
string
profileKey
integer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

InvertRoute

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

InvertRoutes

query Parameters
keys
Array of integers <int32>

Responses

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

LoadOrder

NOTE: Consolidated load-stop and load-order. The services should be able to determine, based on stopKey, whether a stop is unloaded or not. The services can also easily determine the source route (if not unloaded).

path Parameters
key
required
string
Request Body schema: application/json
routeKey
integer

Responses

Request samples

Content type
application/json
{
  • "routeKey": 0
}

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

MoveStop

path Parameters
key
required
string
Request Body schema: application/json
routeKey
integer
leg
integer
sequence
integer

Responses

Request samples

Content type
application/json
{
  • "routeKey": 0,
  • "leg": 0,
  • "sequence": 0
}

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

MoveStopAsync

path Parameters
key
required
string
query Parameters
routeKey
integer
leg
integer
sequence
integer
Request Body schema: application/json
routeKey
integer
leg
integer
sequence
integer

Responses

Request samples

Content type
application/json
{
  • "routeKey": 0,
  • "leg": 0,
  • "sequence": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "resourceUrl": "string"
}

OptimizeBetweenAsync

Request Body schema: application/json
routeKeys
Array of integers
saveToDb
boolean

Responses

Request samples

Content type
application/json
{
  • "routeKeys": [
    ],
  • "saveToDb": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "resourceUrl": "string"
}

OptimizeWithin

Request Body schema: application/json
routeIds
Array of integers
saveToDb
boolean

Responses

Request samples

Content type
application/json
{
  • "routeIds": [
    ],
  • "saveToDb": true
}

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

RescheduleRoute

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

SuggestRoutes

path Parameters
key
required
string
Request Body schema: application/json
routeKeys
Array of integers

Responses

Request samples

Content type
application/json
{
  • "routeKeys": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

RenameRoute

path Parameters
key
required
string
Request Body schema: application/json
routeName
string

Responses

Request samples

Content type
application/json
{
  • "routeName": "string"
}

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

SyncRoutes

Request Body schema: application/json
routeKeys
Array of integers

Responses

Request samples

Content type
application/json
{
  • "routeKeys": [
    ]
}

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

TrimFakeOrders

NOTE: response type was ApiSolutionStats but should be RouteUpdateResult

Request Body schema: application/json
routeKeys
Array of integers

Responses

Request samples

Content type
application/json
{
  • "routeKeys": [
    ]
}

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

Unload

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

UnloadAsync

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "resourceUrl": "string"
}

UnloadRoute

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

ChangeStartTime

path Parameters
key
required
string
Request Body schema: application/json
startDate
string
startTime
string

Given in HH:mm format

Responses

Request samples

Content type
application/json
{
  • "startDate": "string",
  • "startTime": "string"
}

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

get-routing-v2-route-key

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "name": "RT-1234-W",
  • "key": 1234,
  • "number": 1,
  • "branchKey": 1,
  • "legs": [
    ],
  • "plan": {
    },
  • "actual": {
    },
  • "dispatch": {
    },
  • "config": {
    }
}

put-routing-v2-route-key

Updates a route plan, its child stops, and its configuration.

This call will add/update/unload stops as necessary. Please note that the system will make a best effort to match stops up with existing stops, adding or deleting stops as it needs to. However, it is advised that callers do not rely upon existing stop ID's to remain consistent after this call is made.

Passing the truck details is optional, but be aware that if planned information does not match what was generated with the truck, then the route plan details will change if the route is re-calculated later.

Orders are explicitly matched to stops via their order ID. If any orders that are present on a current operational stop or route are not assigned to a stop on that route via this call, those orders will be moved to the unloaded order pool. If an order is assigned to a stop but is already loaded on another route, that order will be moved to the target route as a result of this call.

This call will return an error if:

a) Any order IDs supplied do not exist within our system. b) Any orders are applied to multiple stops at once within a single call.

path Parameters
key
required
string
Request Body schema: application/json
id
string
key
integer
branchKey
integer
Array of objects
object
object (RoutePlan)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "key": 0,
  • "branchKey": 0,
  • "stops": [
    ],
  • "config": {
    },
  • "plan": {
    }
}

Response samples

Content type
application/json
{
  • "name": "RT-1234-W",
  • "key": 1234,
  • "number": 1,
  • "branchKey": 1,
  • "legs": [
    ],
  • "plan": {
    },
  • "actual": {
    },
  • "dispatch": {
    },
  • "config": {
    }
}

FinalizeRoute

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "branchKey": 0,
  • "loadedStops": [
    ],
  • "operationId": "string",
  • "routesDeleted": [
    ],
  • "routesUpdated": [
    ],
  • "unloadedStops": [
    ],
  • "stopsDeleted": [
    ]
}

Your GET endpoint

query Parameters
branchKey
integer
startDate
string <date-time>
endDate
string <date-time>
routeKeys
Array of integers

Pulls route information for the specified keys. This invalidates most other query parameters.

routeNumber
string
routeName
string
driverId
string
dateKind
string
Enum: "planned_start" "load_date" "modified_date"
loginStatus
string
Enum: "logged_in" "logged_off" "preassigned" "unassigned"
skipEmpty
boolean

Responses

Response samples

Content type
application/json
[
  • {
    }
]

put-routing-v2-routes

Updates a route plan, its child stops, and its configuration.

This call will add/update/unload stops as necessary. Please note that the system will make a best effort to match stops up with existing stops, adding or deleting stops as it needs to. However, it is advised that callers do not rely upon existing stop ID's to remain consistent after this call is made.

Passing the truck details is optional, but be aware that if planned information does not match what was generated with the truck, then the route plan details will change if the route is re-calculated later.

Orders are explicitly matched to stops via their order ID. If any orders that are present on a current operational stop or route are not assigned to a stop on that route via this call, those orders will be moved to the unloaded order pool. If an order is assigned to a stop but is already loaded on another route, that order will be moved to the target route as a result of this call.

This call will return an error if:

a) Any order IDs supplied do not exist within our system. b) Any orders are applied to multiple stops at once within a single call.

Request Body schema: application/json
Array
id
string
key
integer
branchKey
integer
Array of objects
object
object (RoutePlan)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

post-routing-v2-routes

Request Body schema: application/json
Array
id
string
required
object
Array of objects
object (RoutePlan)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

post-routing-v2-route

Creates a new route with the appropriate explicit specification. For creating a new, empty route based on a specific truck profile & master, please see CreateRoute.

If no plan is provided (it can be omitted), the route will be automatically built and calculated once all information is validated. If plan information is provided, this will not be necessary.

If a Route Plan is provided, Stop level plans must also be provided (if stops are provided).

Request Body schema: application/json
id
string
required
object
Array of objects
object (RoutePlan)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "config": {
    },
  • "stops": [
    ],
  • "plan": {
    }
}

Response samples

Content type
application/json
{
  • "name": "RT-1234-W",
  • "key": 1234,
  • "number": 1,
  • "branchKey": 1,
  • "legs": [
    ],
  • "plan": {
    },
  • "actual": {
    },
  • "dispatch": {
    },
  • "config": {
    }
}

UpdateRouteConfigBase

path Parameters
key
required
string
Request Body schema:
routeConfigName
string
eqCode
string
oneWay
boolean
redispatch
boolean
earlyStart
string
lateStart
string
normalStart
string
latefinish
string
startDate
string
endDate
string
zone
integer
hourlyCost
number
distanceCost
number
dropCost
number
unitCost
number
fixedCost
number
preTrip
integer
postTrip
integer
turnTime
integer
unloadPerformance
number
amStart
string
amEnd
string
amMultiplier
number
pmStart
string
pmEnd
string
pmMultiplier
number
unloadHourCost
number
waitHourCost
number
layoverCost
number
maxWorkTime
number
targetWorkTime
number
maxDriveTime
number
minLayoverTime
number
workDay
number
minHoursRemainingForRedispatch
integer
maxLayovers:
integer
maxDriveTimeBeforeLayover
number
breakStart1
number
breakDuration1
number
breakStart2
number
breakDuration2
number
breakStart3
number
breakDuration3
number
Array of objects
Array of objects
Array of objects
Array of objects

Responses

Request samples

Content type
{
  • "routeConfigName": "string",
  • "eqCode": "string",
  • "oneWay": true,
  • "redispatch": true,
  • "earlyStart": "string",
  • "lateStart": "string",
  • "normalStart": "string",
  • "latefinish": "string",
  • "startDate": "string",
  • "endDate": "string",
  • "zone": 0,
  • "hourlyCost": 0,
  • "distanceCost": 0,
  • "dropCost": 0,
  • "unitCost": 0,
  • "fixedCost": 0,
  • "preTrip": 0,
  • "postTrip": 0,
  • "turnTime": 0,
  • "unloadPerformance": 0,
  • "amStart": "string",
  • "amEnd": "string",
  • "amMultiplier": 0,
  • "pmStart": "string",
  • "pmEnd": "string",
  • "pmMultiplier": 0,
  • "unloadHourCost": 0,
  • "waitHourCost": 0,
  • "layoverCost": 0,
  • "maxWorkTime": 0,
  • "targetWorkTime": 0,
  • "maxDriveTime": 0,
  • "minLayoverTime": 0,
  • "workDay": 0,
  • "minHoursRemainingForRedispatch": 0,
  • "maxLayovers:": 0,
  • "maxDriveTimeBeforeLayover": 0,
  • "breakStart1": 0,
  • "breakDuration1": 0,
  • "breakStart2": 0,
  • "breakDuration2": 0,
  • "breakStart3": 0,
  • "breakDuration3": 0,
  • "overTimeCosts": [
    ],
  • "breakTimes": [
    ],
  • "volumes": [
    ],
  • "userFields": [
    ]
}

GetRouteConfigBase

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "driverProperties": {
    },
  • "vehicleProperties": {
    },
  • "routingProperties": {
    },
  • "name": "string",
  • "routeConfigProfileKey": 0,
  • "id": 0,
  • "UserFields": [
    ]
}

delete-v2-route-config-key

path Parameters
key
required
string

Responses

GetRouteConfigBase

path Parameters
key
required
string
configName
required
string

Responses

Response samples

Content type
application/json
{
  • "driverProperties": {
    },
  • "vehicleProperties": {
    },
  • "routingProperties": {
    },
  • "name": "string",
  • "routeConfigProfileKey": 0,
  • "id": 0,
  • "UserFields": [
    ]
}

GetRouteConfigs

path Parameters
key
required
string
query Parameters
offset
integer
limit
integer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

CreateRouteConfigBase

Request Body schema: application/json
routeConfigName
string
eqCode
string
oneWay
boolean
redispatch
boolean
earlyStart
string
lateStart
string
normalStart
string
latefinish
string
startDate
string
endDate
string
zone
integer
hourlyCost
number
distanceCost
number
dropCost
number
unitCost
number
fixedCost
number
preTrip
integer
postTrip
integer
turnTime
integer
unloadPerformance
number
amStart
string
amEnd
string
amMultiplier
number
pmStart
string
pmEnd
string
pmMultiplier
number
unloadHourCost
number
waitHourCost
number
layoverCost
number
maxWorkTime
number
targetWorkTime
number
maxDriveTime
number
minLayoverTime
number
workDay
number
minHoursRemainingForRedispatch
integer
maxLayovers:
integer
maxDriveTimeBeforeLayover
number
breakStart1
number
breakDuration1
number
breakStart2
number
breakDuration2
number
breakStart3
number
breakDuration3
number
Array of objects
Array of objects
Array of objects
Array of objects
branchKey
integer
profileKey
integer

Responses

Request samples

Content type
application/json
{
  • "routeConfigName": "string",
  • "eqCode": "string",
  • "oneWay": true,
  • "redispatch": true,
  • "earlyStart": "string",
  • "lateStart": "string",
  • "normalStart": "string",
  • "latefinish": "string",
  • "startDate": "string",
  • "endDate": "string",
  • "zone": 0,
  • "hourlyCost": 0,
  • "distanceCost": 0,
  • "dropCost": 0,
  • "unitCost": 0,
  • "fixedCost": 0,
  • "preTrip": 0,
  • "postTrip": 0,
  • "turnTime": 0,
  • "unloadPerformance": 0,
  • "amStart": "string",
  • "amEnd": "string",
  • "amMultiplier": 0,
  • "pmStart": "string",
  • "pmEnd": "string",
  • "pmMultiplier": 0,
  • "unloadHourCost": 0,
  • "waitHourCost": 0,
  • "layoverCost": 0,
  • "maxWorkTime": 0,
  • "targetWorkTime": 0,
  • "maxDriveTime": 0,
  • "minLayoverTime": 0,
  • "workDay": 0,
  • "minHoursRemainingForRedispatch": 0,
  • "maxLayovers:": 0,
  • "maxDriveTimeBeforeLayover": 0,
  • "breakStart1": 0,
  • "breakDuration1": 0,
  • "breakStart2": 0,
  • "breakDuration2": 0,
  • "breakStart3": 0,
  • "breakDuration3": 0,
  • "overTimeCosts": [
    ],
  • "breakTimes": [
    ],
  • "volumes": [
    ],
  • "userFields": [
    ],
  • "branchKey": 0,
  • "profileKey": 0
}

Get Fields

Responses

Response samples

Content type
application/json
{
  • "volumeFields": [
    ],
  • "userFields": [
    ]
}

GetRouteConfigProfiles

query Parameters
branchKey
integer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

GetRouteConfigProfile

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "branchId": 0
}

UpdateRouteConfigProfile

path Parameters
key
required
string
Request Body schema: application/json
id
integer
name
string
branchId
integer

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "branchId": 0
}

DeleteRouteConfigProfile

path Parameters
key
required
string

Responses

CreateRouteConfigProfile

Request Body schema: application/json
id
integer
name
string
branchId
integer

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "branchId": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "branchId": 0
}

Tasks

/Tasks/v1/{taskId}

path Parameters
taskId
required
string

Responses

Response samples

Content type
application/json
{
  • "errorCode": 0,
  • "payload": { }
}

TruckProfiles

GetTruckProfiles

query Parameters
branchKey
integer <int32>

Responses

Response samples

Content type
application/json
[
  • {
    }
]