Transition Fleet Task Instant
POST/fleet-task-instant/:id/transition
Transition the Fleet Task Instant to other status
Transitioning Fleet Task Instant To DRAFT
Status
DRAFT
status meaning that the fleet task instant is not yet ready to be scheduled or started.
- Create a fleet task instant
- Send a
POST
request to the/fleet_task_instant/{id}/transition
endpoint with the following body:
{
"status": "DRAFT"
}
- The fleet task instant will be transitioned to
DRAFT
status. - You cannot transition a fleet task instant to
DRAFT
when:- The fleet task instant is already in
DRAFT
status. - The fleet task instant is in
SCHEDULED
status. - The fleet task instant is in
STARTED
status. - The fleet task instant is in
ENDED
status. - The fleet task instant is in
CANCELED
status.
- The fleet task instant is already in
Transitioning Fleet Task Instant To SCHEDULED
Status
SCHEDULED
status meaning that the fleet task instant is assigned to a vehicle and ready to be started.
-
Create a fleet task instant
-
You must assigned a vehicle to the fleet task instant before transitioning it to
SCHEDULED
status.If you have not assigned a vehicle, you can do so by following these steps:
- Send a
PATCH
request to the/fleet_task_instant/{id}
endpoint to update the vehicle with the following body:
- Send a
{
"vehicle_id": 12345
}
-
If you have already assigned a vehicle, you can transition the fleet task instant to
STARTED
status by following these steps:Send a
POST
request to the/fleet_task_instant/{id}/transition
endpoint with the following body:
{
"status": "SCHEDULED"
}
- The fleet task instant will be transitioned to
SCHEDULED
status. - You can change the fleet task instant data while in
SCHEDULED
status. - You cannot transition a fleet task instant to
SCHEDULED
when:- The fleet task instant is already in
SCHEDULED
status. - The fleet task instant is in
STARTED
status. - The fleet task instant is in
ENDED
status. - The fleet task instant is in
CANCELED
status.
- The fleet task instant is already in
Transitioning Fleet Task Instant To STARTED
Status
STARTED
status meaning that the fleet task instant is in progress and the vehicle is on its way to the planned locations.
There are two ways to transition a fleet task instant to STARTED
status:
- Fleet task instant manually transitioned to
STARTED
by the user - Fleet task instant automatically transitioned to
STARTED
by the system
Transitioning Fleet Task Instant To STARTED
Status Manually
-
Create a fleet task instant
-
You must assigned a vehicle to the fleet task instant before transitioning it to
STARTED
status.If you have not assigned a vehicle, you can do so by following these steps:
- Send a
PATCH
request to the/fleet_task_instant/{id}
endpoint to update the vehicle with the following body:
- Send a
{
"vehicle_id": 12345
}
-
If you have already assigned a vehicle, you can transition the fleet task instant to
STARTED
status by following these steps:Send a
POST
request to the/fleet_task_instant/{id}/transition
endpoint with the following body:
{
"status": "STARTED"
}
- The fleet task instant will be transitioned to
STARTED
status. - You cannot change the fleet task instant data while in
STARTED
status. - You cannot transition a fleet task instant to
STARTED
when:- The fleet task instant is already in
STARTED
status. - The fleet task instant is in
ENDED
status. - The fleet task instant is in
CANCELED
status.
- The fleet task instant is already in
Transitioning Fleet Task Instant To STARTED
Status Automatically
- Create a fleet task instant
- You can update the
auto_start_type
field in the fleet task instant toGEOFENCE
like this:
{
"auto_start_type": "GEOFENCE"
}
- Then you can transition the fleet task instant to
SCHEDULED
status by following these steps:- Send a
POST
request to the/fleet_task_instant/{id}/transition
endpoint with the following body:
- Send a
{
"status": "SCHEDULED"
}
- Or you can doing it at once when transitioning the fleet task instant to
SCHEDULED
status by following these steps:
{
"status": "SCHEDULED",
"fields": {
"auto_start_type": "GEOFENCE"
}
}
- The vehicle in the fleet task instant that is already in
SCHEDULED
status andauto_start_type
isGEOFENCE
will be automatically tracked by the system. - When the vehicle enters the first point geofence in the fleet task instant, the system will automatically transition the fleet task instant to
STARTED
status.
Transitioning Fleet Task Instant To ENDED
Status
ENDED
status meaning that the fleet task instant has been completed.
There are two ways to transition a fleet task instant to ENDED
status:
- Fleet task instant automatically transitioned to
ENDED
by the system - Fleet task instant manually transitioned to
ENDED
by the user
Transitioning Fleet Task Instant To ENDED
Status Automatically
- Create a fleet task instant
- The vehicle in the fleet task instant that is already in
STARTED
status will be automatically tracked by the system. - When there are no point with
END
type in the fleet task instant:- If all points in the fleet task instant are in
VISITED
status, the system will automatically transition the fleet task instant toENDED
status.
- If all points in the fleet task instant are in
- When there are point with
END
type in the fleet task instant:- If all points in the fleet task instant are in
VISITED
status, except for the point withEND
type - Then if the vehicle visiting the
END
point, the system will automatically transition the fleet task instant toENDED
status.
- If all points in the fleet task instant are in
- You cannot change the fleet task instant data if it already in
ENDED
status.
Transitioning Fleet Task Instant To ENDED
Status Manually
- Create a fleet task instant
- The fleet task instant must be in
STARTED
status before transitioning it toENDED
status. You cannot transition a fleet task instant toENDED
unless it is inSTARTED
status. - Send a
POST
request to the/fleet_task_instant/{id}/transition
endpoint with the following body:
{
"status": "ENDED"
}
- The fleet task instant will be transitioned to
ENDED
status. - You cannot change the fleet task instant data if it already in
ENDED
status. - This will happen to the points in the fleet task instant when manually transitioned to
ENDED
status:- When there are some points that are still in
VISITING
status, the system will automatically transition them toVISITED
status. - When there are some points that are still in
WILL_VISITED
orMISSED_VISIT
status, the system will automatically transition them toNOT_VISITED
status. - Points that are already in
VISITED
status will remain inVISITED
status.
- When there are some points that are still in
Transitioning Fleet Task Instant To CANCELED
Status
CANCELED
status meaning that the fleet task instant has been canceled and will not be completed.
- Create a fleet task instant
- You can only transition a fleet task instant to
CANCELED
when:- The fleet task instant is in
DRAFT
status. - The fleet task instant is in
SCHEDULED
status. - The fleet task instant is in
STARTED
status.
- The fleet task instant is in
- Send a
POST
request to the/fleet_task_instant/{id}/transition
endpoint with the following body:
{
"status": "CANCELED",
"fields": {
"reason": "canceled by customer"
}
}
- The
reason
field is required when transitioning the fleet task instant toCANCELED
status. - The fleet task instant will be transitioned to
CANCELED
status. - You cannot change the fleet task instant data if it already in
CANCELED
status.
Note
- After creating a fleet task instant, the fleet task instant will not be shown in the list of fleet task instants.
- To make it visible, you can transition the fleet task instant to other statuses like
DRAFT
,SCHEDULED
, orSTARTED
Request
Responses
- 200
- 400
- 401
- 403
- 404
OK
Bad Request
Unauthorized
Forbidden
Not Found