Skip to main content

Get Active Driver Assignments API

This API endpoint retrieves a list of active driver assignments. It fetches trip and driver details for assignments that are not in a completed status (specifically excluding 'delivery closed', 'order closed', and 'cancelled').

Endpoint​

GET /driverassignment/active/{userId}/{authKey}

Path Parameters​

ParameterTypeDescription
userIdStringThe ID of the authenticated user making the request.
authKeyStringThe authentication key for the user, used for validation.

Request​

Method: GET Content-Type: N/A

No request body is required.

Response​

Content-Type: text/plain (returns a JSON string)

The response is a JSON object containing a data array with the active driver assignments.

Response Schema​

{
"data": [
{
"trip_id": "string",
"driver_name": "string",
"truckNo": "string"
}
]
}

Key Response Fields​

data Array Items​

FieldTypeDescription
trip_idStringThe unique identifier for the trip.
driver_nameStringThe name of the assigned driver.
truckNoStringThe truck number assigned to the trip.

Errors​

Status CodeDescription
401 UnauthorizedReturned if the userId and authKey combination is invalid or missing.

Notes​

  • This API specifically filters out driver assignments where the status is STATUS_DELIVERY_CLOSED, STATUS_JOB_CLOSED, or STATUS_CANCELLED.