Determine Assignment Restrictions
POST
https://routecloud.telogis.com/v1/assignment_restrictions.- Authentication required.
- Request body: assignment_restrictions_request.
- Response body: If
wait=1
specified, returns the task result (see below). Otherwise, returns a task_redirect_response.
Determines which jobs are un-routable prior to a full build. If it is not possible to place a job on a route in the build step, it is placed in the unrouted_jobs list.
Query Parameters
wait=1
- Optional. Wait until theassignment_restrictions
completes before returning the result. See Retrieving API Results.
Status Codes
200
- Success.302
- Ifwait=1
was provided and theassignment_restrictions
result is not yet available, a redirect is sent instead of a normal result every 15 seconds to refresh the HTTP timeout. See Retrieving API Results.400
- The input problem is invalid. The response is an error_response.401
- Authentication required.429
- Exceeded usage limits.
assignment_restrictions_request
The assignment_restrictions_request
type inherits all fields from problem.
Name | Type | Description |
---|---|---|
custom | custom | Inherited. User-supplied custom fields that are returned unmodified in the response. These have no effect on optimization. |
drivers | driver[] | Inherited. If specified, the drivers involved in this assignment validation. |
id | string | Inherited. An identifier for the request. See Request IDs. |
jobs | job[] | Inherited. The jobs to assign to routes. |
markers | marker[] | Inherited. The markers involved in this assignment validation. If defined here, markers can be referenced by id elsewhere; for example, job.location. |
name | string | Inherited. A name for the request. See Request IDs. |
return_request | boolean | Optional. Defines if the original request, with calculated values, is returned as the response. If not, a Assignment Restrictions Response is returned. See Full vs Partial Responses. Defaults to false . |
routes | route[] | Inherited. The routes to put jobs on. |
schedules | schedule[] | Inherited. If specified, applies recurring schedule constraints to the jobs. |
settings | settings | Inherited. The settings to apply during the assignment validation. |
vehicles | vehicle[] | The vehicles involved in this optimization problem. If defined here, vehicles can be referenced by id elsewhere; for example, route.vehicle. |
{
"id": "request+1234567",
"name": "territory1",
"routes": [
{ "id": "route0", "start_time": "08:30", "max_working_time": "09:00", "location": "-43.552723, 172.634758" },
{ "id": "route1", "start_time": "08:30", "max_working_time": "09:00", "location": "-43.552723, 172.634758" }
],
"jobs": [
{ "id": "job0", "time_on_site": "00:10", "location": "-43.549062, 172.642059" },
{ "id": "job1", "time_on_site": "00:10", "location": "-43.544839, 172.628252", "required_vehicle_attributes":["Carrier"] },
{ "id": "job2", "time_on_site": "00:15", "location": "-43.551746, 172.610160" },
{ "id": "job3", "time_on_site": "00:18", "location": "-43.522026, 172.630837" },
{ "id": "job4", "time_on_site": "00:20", "location": "-43.511665, 172.598252" }
],
"settings": {
"time_windows_as_hard_constraint": true
}
}
An example assignment_restrictions request.
assignment_restrictions_response
The assignment_restrictions_response
type inherits all fields from problem_response.
Name | Type | Description |
---|---|---|
custom | custom | Inherited. User-supplied custom fields that were sent in the request. |
unrouted_jobs | stop_response[] | Inherited. Jobs that are not routed. |
{
"unrouted_jobs": [
{
"id": "job1",
"job": "job1",
"assignment_restrictions": [
{
"data": {
"attributes": {
"string_array_data": [
"Carrier",
"Carrier"
]
},
"vehicles": {
"string_array_data": [
null,
null
]
}
},
"type": "missing_vehicle_attributes"
}
]
}
]
}
An example assignment_restrictions response.