Status field added to driver scope
Drivers public API
- Extended Drivers public API responses with readonly
statusfield. - Possible values:
pendingactivateddeactivated
- The order of sorting the driver list has been changed so that drivers with the status pending come first, followed by activated, and then deactivated.
Example of get drivers list API response:
Request:
GET <base_url>/carriers/<carrier_id>/drivers/
Response:
{
"meta": {
"code": 200,
"request_id": "05281e87-d992...f88063f2fcf3"
},
"data": [
{
"id": 1,
"name": "Dispatch",
"phone": "+12010000001",
"email": "newdriveremail@email.com",
"truck_capacity": 5,
"status": "activated"
},
...
],
"pagination": {
"previous": null,
"next": null
}
}
Example of get driver by ID API response:
Request:
GET <base_url>/drivers/<driver_id>/
Response:
{
"meta": {
"code": 200,
"request_id": "460a3ada-2192...e152716a33a8"
},
"data": {
"id": 1,
"name": "Dispatch",
"phone": "+12010000001",
"email": "newdriveremail@email.com",
"truck_capacity": 5,
"status": "activated"
}
}