New Assign Template or Group
/v2/routes/assignTemplateOrGroup
Assigns a route to a vehicle, using a designated route template or route group
Parameters
data
The parameter of this endpoint is it's payload, and is decribed bellow
{
"vehicleId": 0,
"assignType": "once",
"templateOrGroupId": 0,
"weekDays": [
"sunday"
],
"timestamp": "2024-09-12T15:49:29.361Z",
"duration": 0,
"routeName": "string",
"sendTo": true,
"departStepID": 0,
"arriveStepID": 0,
"freeField1": "string",
"freeField2": "string",
"freeField3": "string"
}
Field | Description | ||||||||||||||||
vehicleId | The vehicle to which a new route should be assigned.
|
||||||||||||||||
assignType | Defines the type of assignment:
|
||||||||||||||||
templateOrGroupId | The ID of the template or group of routes.
|
||||||||||||||||
weekDays | The set of days on which the route get's assigned to the vehicle:
assignType is assigned to week |
||||||||||||||||
timestamp | The timestamp of the Plan Departure of the first step of the route.
|
||||||||||||||||
duration | A number of seconds that will be added to the specified timestamp in order to determine the timestamp for the plan departure of the route execution
|
||||||||||||||||
routeName | * This field is not being used. The name of the assigned route is always the name of the route template being used. |
||||||||||||||||
sendTo | The terminal to which the route should be send to. Possible options are:
|
||||||||||||||||
departStepID | The ID of the step in the route to consider as the departure step
|
||||||||||||||||
arriveStepID | The ID of the step in the route to consider as the arrival step
|
||||||||||||||||
freeField1 | Field of free aditional text
|
||||||||||||||||
freeField2 | Field of free aditional text
|
||||||||||||||||
freeField2 | Field of free aditional text
|
Response Body
[ <Assignments IDs> ]
The response is an array of the IDs of the assignments that were created by the endpoint.
Response HTTP Codes
200 - OK
- The route was assigned to the vehicle with success
400 - BadRequest
- The parameter was not provided, or
- A validation error occurred
401 - Unauthorized
- The provided credentials are not valid
403 - Forbidden
- The user has no permission to view routes
404 - Not found
- The specified vehicle could not be found, or
- The specified route template could not be found