Skip to main content
All CollectionsAPI
Task state update

Task state update

eLogii avatar
Written by eLogii
Updated over 12 months ago

Task states can be updated using the endpoint https://api-35.elogii.com/tasks/{_id}. Where the id is the task id, which can be found in the response received when creating a task or retrieving all task information.

There are various types of task states:

  • 30: cancelled

  • 20: Failed

  • 10: pickup failed

  • 0: created/scheduled

  • 4: sorted

  • 5: loaded

  • 10: en route to pickup location

  • 20: arrived at pickup location

  • 30: completed pickup

  • 40: en route to delivery/service location

  • 50: arrived to delivery/service location

  • 60: completed

Sample request ( enroute to pickup)

Sample response

{
"_id": "66185f7917dee81726505a2e",
"uid": "T-P7D3YKUO",
"organization": "64706d34cb58b5e1345160d2",
"path": "64706d34cb58b5e1345160d2",
"type": 2,
"date": 20240412,
"allowedWeekDays": null,
"pickup": {
"location": {...........
},
"setupDuration": 0,
"serviceDuration": 56,
"configuration": {
.............
}
},
"actions": [
..........
],

},
"location": {
.........................
},
"size": {
"Weight": 0
},
"items": [],
"skills": [],
"capabilities": [],
"tags": [],
"teams": [],
"teamsExplicit": [],
"zones": [],
"assignment": {
"state": 0
}

},
"dateTimeWindows": [
{
"date": 20240412
}
]

"serviceDuration": 15,
"state": 10,
"stateText": "Pickup En Route",
"stateTimestamp": 1712877681,
"stateTimestamps": {
"created": 1712873337,
"createdISO": "2024-04-11T22:08:57.000Z",
"pickupEnRoute": 1712877681,
"pickupEnRouteISO": "2024-04-11T23:21:21.000Z",

}
}

Did this answer your question?