Get all drivers
GET/v1/drivers
Retrieves a paginated list of drivers. Supports filtering by name and supplierId.
Request
Query Parameters
Possible values: >= 1
Default value: 1
Page number (default: 1)
Possible values: >= 1 and <= 100
Default value: 10
Items per page (default: 10)
Filter by first name or last name (case-insensitive)
Filter by supplier ID
Responses
- 200
List of drivers retrieved successfully
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
data object[]required
The data of the paginated response
The ID of the driver
The supplier ID of the driver
The rating of the driver
The zone IDs of the driver
The first name of the driver
The last name of the driver
The full name of the driver
The phone of the driver
The username of the driver
The email of the driver
The home address of the driver
The city of the driver
The state of the driver
The zip code of the driver
The date of birth of the driver
The gender of the driver
The notes of the driver
The avatar of the driver
Whether the driver is active
The total number of items
The current page
The number of items per page
The total number of pages
{
"data": [
{
"_id": "672d07188234567890123456",
"supplierId": "672d07188234567890123456",
"rating": 4.5,
"zoneIds": [
"672d07188234567890123456"
],
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"phone": "+1234567890",
"username": "john.doe",
"email": "john.doe@example.com",
"homeAddress": "123 Main St",
"city": "New York",
"state": "NY",
"zipCode": "10001",
"dateOfBirth": "1990-01-01",
"gender": 0,
"notes": "This is a note",
"avatar": "https://example.com/avatar.png",
"isActive": true
}
],
"total": 100,
"page": 1,
"limit": 10,
"totalPages": 10
}