Update StopStatus

Trip Management’s Update StopStatus API lets you update the status (arrived, completed and canceled) of a given stop in the trip.

POST /trip/stopStatus

Request Fields

FieldDescriptionTypeRequired
tripIdThe alkTripId returned when you planned the trip.
Note: If no trip is found with the given alkTripId, then an error message will be returned. If the tmsTripId in your planning system is also supplied in the body of this request, then the alkTripId will be ignored irrespective of whether it is valid or not and the trip corresponding to the provided tmsTripId will be updated. In this case, if no trip is found with the given tmsTripId, then an error message will be returned.
integerYes if tmsTripId is not supplied.
tmsTripIdThe tmsTripId of your previously generated route.
Note: Even if tripId, which is the alkTripId, is also supplied with this request, it will be ignored and only trip corresponding to the given tmsTripId will be updated. If no trip is found with the given tmsTripId, then an error message will be returned.
stringYes if tripId is not supplied.
stopIdThe position of the stop in the stop array. This number should be the same as the stopSequence of the stop.
You may use Get Trip API to get the current position of the stop
integerYes
stopStateThe status that the stop is being updated to. Arrived = 1, Completed/Departed = 2, Canceled = 3integerYes
actualArrivalTimeThe date and time of arrival. The value must be in ISO-8601 format.dateYes, if the stopState is Arrived(1). No, otherwise
actualDepartureTimeThe date and time of departure. The value must be in ISO-8601 format.dateYes, if the stopState is Completed(2). No, otherwise
arrivalStatusThe state at which the stop was arrived. OnTime = 1, AtRisk = 2, Late = 3, Early = 4, NotViable = 5, TooEarly = 6integerYes, if the stopState is Arrived(1). No, otherwise
stopDurationNumber of minutes spent at the stop. This is the difference between actual arrival and departure timeintegerNo

Sample Requests

{
  "tripId": 136,
  "stopId": 0,
  "stopState": 1,
  "actualArrivalTime": "2017-09-06T19:05:16+00:00",
  "arrivalStatus": 2
}
{
  "tripId": 136,
  "stopId": 0,
  "stopState": 2,
  "actualDepartureTime": "2017-09-06T19:37:16+00:00",
  "stopDuration": 32
}

Sample Response

{
  "success": true,
  "message": null
}