Get Processed Route/Schedule List API
Require Authentication
This API is used to get processed route/schedule list for the company based on combination of deviceID and token.
URL
api/routes/processedlist
Required parameter (POST)
- deviceID
- token
Optional parameter (POST)
All optional parameters use POST method.
- maintenanceScheduleID «contains maintenanceScheduleID that will be looked for. Value must exist in Get Available Routes/Schedules»
Optional parameter (GET)
All optional parameters use GET method. So it should be embedded in the URL, e.g: api/projects/list?q=project&o=projectName
- q «contains keyword that want to be looked for. Keyword will search maintenanceScheduleName field only»
- dmin «filter data by minimum processTime»
- dmax «filter data by maximum processTime»
- s «used to filter data by executed process status. Value must be "alreadyrun" or "norun"»
- o «used to sort data, contains field name. Available value: processTime, estimateDurationSeconds, estimateDistanceMeters. Default value: processTime»
- ot «used to sort data, contains sort type. Available value: asc, desc. Default value: asc»
- per_page «indicates how many data that will be displayed in each call. Value must be a number between 1 to 500. Default value: none (unlimited result)»
- offset «indicates the first data index that will be displayed in each call. Value must be a number with minimum value is 0. Default value: 0»
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2",
"maintenanceScheduleID": 2489
}
Possible return HTTP status code
- 200
- 400
- 401
- 404
- 405
Return message
{
"status": "success",
"message": {
"current_parameter": "?offset=0",
"next_parameter": "",
"previous_parameter": "",
"start": 0,
"total": 2,
"lists": [
{
"maintenanceScheduleName": "pagi sore",
"maintenanceScheduleProcessID": 5949,
"maintenanceScheduleID": 2489,
"estimateDurationSeconds": 1396,
"estimateDistanceMeters": 5913,
"processTime": 1669946905,
"previewOnly": "N",
"startLatitude": -6.154994010925,
"startLongitude": 106.80372619629,
"startAddress1": "",
"startAddress2": "",
"startCity": "",
"startState": "",
"startCountry": "",
"startPostcode": "",
"endLatitude": -6.164274215698,
"endLongitude": 106.80966949463,
"endAddress1": "",
"endAddress2": "",
"endCity": "",
"endState": "",
"endCountry": "",
"endPostcode": "",
"executionData": {
"departureTime": 1669946880,
"completedTime": 1669985792,
"startLatitude": -6.154994010925,
"startLongitude": 106.80372619629,
"startAddress1": "",
"startAddress2": "",
"startCity": "",
"startState": "",
"startCountry": "",
"startPostcode": "",
"endLatitude": -6.164274215698,
"endLongitude": 106.80966949463,
"endAddress1": "",
"endAddress2": "",
"endCity": "",
"endState": "",
"endCountry": "",
"endPostcode": "",
"driverNote": "",
"createdDate": 1669985676,
"updatedDate": 1669985676,
"createdByUserID": 90,
"updatedByUserID": 90,
"processStatus": "completed",
"vehicleID": 17
}
},
{
"maintenanceScheduleName": "pagi sore",
"maintenanceScheduleProcessID": 5958,
"maintenanceScheduleID": 2489,
"estimateDurationSeconds": 1396,
"estimateDistanceMeters": 5913,
"processTime": 1669985763,
"previewOnly": "N",
"startLatitude": -6.154994010925,
"startLongitude": 106.80372619629,
"startAddress1": "",
"startAddress2": "",
"startCity": "",
"startState": "",
"startCountry": "",
"startPostcode": "",
"endLatitude": -6.164274215698,
"endLongitude": 106.80966949463,
"endAddress1": "",
"endAddress2": "",
"endCity": "",
"endState": "",
"endCountry": "",
"endPostcode": "",
"executionData": {
"departureTime": 1669985792,
"completedTime": 1669986432,
"startLatitude": -6.154994010925,
"startLongitude": 106.80372619629,
"startAddress1": "",
"startAddress2": "",
"startCity": "",
"startState": "",
"startCountry": "",
"startPostcode": "",
"endLatitude": -6.164274215698,
"endLongitude": 106.80966949463,
"endAddress1": "",
"endAddress2": "",
"endCity": "",
"endState": "",
"endCountry": "",
"endPostcode": "",
"driverNote": "",
"createdDate": 1669986327,
"updatedDate": 1669986327,
"createdByUserID": 90,
"updatedByUserID": 90,
"processStatus": "completed",
"vehicleID": 17
}
}
]
}
}