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 POSTrequest to the/fleet_task_instant/{id}/transitionendpoint with the following body:
{
  "status": "DRAFT"
}
- The fleet task instant will be transitioned to DRAFTstatus.
- You cannot transition a fleet task instant to DRAFTwhen:- The fleet task instant is already in DRAFTstatus.
- The fleet task instant is in SCHEDULEDstatus.
- The fleet task instant is in STARTEDstatus.
- The fleet task instant is in ENDEDstatus.
- The fleet task instant is in CANCELEDstatus.
 
- 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 SCHEDULEDstatus.If you have not assigned a vehicle, you can do so by following these steps: - Send a PATCHrequest 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 STARTEDstatus by following these steps:Send a POSTrequest to the/fleet_task_instant/{id}/transitionendpoint with the following body:
{
  "status": "SCHEDULED"
}
- The fleet task instant will be transitioned to SCHEDULEDstatus.
- You can change the fleet task instant data while in SCHEDULEDstatus.
- You cannot transition a fleet task instant to SCHEDULEDwhen:- The fleet task instant is already in SCHEDULEDstatus.
- The fleet task instant is in STARTEDstatus.
- The fleet task instant is in ENDEDstatus.
- The fleet task instant is in CANCELEDstatus.
 
- 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 STARTEDby the user
- Fleet task instant automatically transitioned to STARTEDby 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 STARTEDstatus.If you have not assigned a vehicle, you can do so by following these steps: - Send a PATCHrequest 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 STARTEDstatus by following these steps:Send a POSTrequest to the/fleet_task_instant/{id}/transitionendpoint with the following body:
{
  "status": "STARTED"
}
- The fleet task instant will be transitioned to STARTEDstatus.
- You cannot change the fleet task instant data while in STARTEDstatus.
- You cannot transition a fleet task instant to STARTEDwhen:- The fleet task instant is already in STARTEDstatus.
- The fleet task instant is in ENDEDstatus.
- The fleet task instant is in CANCELEDstatus.
 
- 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_typefield in the fleet task instant toGEOFENCElike this:
{
  "auto_start_type": "GEOFENCE"
}
- Then you can transition the fleet task instant to SCHEDULEDstatus by following these steps:- Send a POSTrequest to the/fleet_task_instant/{id}/transitionendpoint with the following body:
 
- Send a 
{
  "status": "SCHEDULED"
}
- Or you can doing it at once when transitioning the fleet task instant to SCHEDULEDstatus by following these steps:
{
  "status": "SCHEDULED",
  "fields": {
    "auto_start_type": "GEOFENCE"
  }
}
- The vehicle in the fleet task instant that is already in SCHEDULEDstatus andauto_start_typeisGEOFENCEwill 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 STARTEDstatus.
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 ENDEDby the system
- Fleet task instant manually transitioned to ENDEDby 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 STARTEDstatus will be automatically tracked by the system.
- When there are no point with ENDtype in the fleet task instant:- If all points in the fleet task instant are in VISITEDstatus, the system will automatically transition the fleet task instant toENDEDstatus.
 
- If all points in the fleet task instant are in 
- When there are point with ENDtype in the fleet task instant:- If all points in the fleet task instant are in VISITEDstatus, except for the point withENDtype
- Then if the vehicle visiting the ENDpoint, the system will automatically transition the fleet task instant toENDEDstatus.
 
- If all points in the fleet task instant are in 
- You cannot change the fleet task instant data if it already in ENDEDstatus.
Transitioning Fleet Task Instant To ENDED Status Manually
- Create a fleet task instant
- The fleet task instant must be in STARTEDstatus before transitioning it toENDEDstatus. You cannot transition a fleet task instant toENDEDunless it is inSTARTEDstatus.
- Send a POSTrequest to the/fleet_task_instant/{id}/transitionendpoint with the following body:
{
  "status": "ENDED"
}
- The fleet task instant will be transitioned to ENDEDstatus.
- You cannot change the fleet task instant data if it already in ENDEDstatus.
- This will happen to the points in the fleet task instant when manually transitioned to ENDEDstatus:- When there are some points that are still in VISITINGstatus, the system will automatically transition them toVISITEDstatus.
- When there are some points that are still in WILL_VISITEDorMISSED_VISITstatus, the system will automatically transition them toNOT_VISITEDstatus.
- Points that are already in VISITEDstatus will remain inVISITEDstatus.
 
- 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 CANCELEDwhen:- The fleet task instant is in DRAFTstatus.
- The fleet task instant is in SCHEDULEDstatus.
- The fleet task instant is in STARTEDstatus.
 
- The fleet task instant is in 
- Send a POSTrequest to the/fleet_task_instant/{id}/transitionendpoint with the following body:
{
  "status": "CANCELED",
  "fields": {
    "reason": "canceled by customer"
  }
}
- The reasonfield is required when transitioning the fleet task instant toCANCELEDstatus.
- The fleet task instant will be transitioned to CANCELEDstatus.
- You cannot change the fleet task instant data if it already in CANCELEDstatus.
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