Get Pending Drivers
GET /admin/pending_drivers.php
Retrieve list of drivers pending approval.
Query Parameters
Response
Array of pending driver profiles
Request Example
curl -X GET "https://76.13.114.194/admin/pending_drivers.php?admin_id=1" \
-H "Accept: application/json"
Response Example
{
"success": true,
"drivers": [
{
"id": 25,
"nombre_completo": "Juan Carlos Martínez",
"email": "[email protected]",
"telefono": "+573109876543",
"fecha_solicitud": "2024-03-10T14:30:00.000Z",
"licencia": {
"numero": "12345678",
"tipo": "C1",
"fecha_expiracion": "2030-05-15T00:00:00.000Z"
},
"vehiculo": {
"marca": "Yamaha",
"modelo": "FZ-16",
"placa": "ABC123",
"tipo": "moto"
},
"aprobado": false
}
]
}
Approve Driver
POST /admin/aprobar_conductor.php
Approve a driver to start accepting trips.
Request Body
Response
Request Example
curl -X POST https://76.13.114.194/admin/aprobar_conductor.php \
-H "Content-Type: application/json" \
-d '{"conductor_id": 25}'
Response Example
{
"success": true,
"message": "Conductor aprobado exitosamente"
}
Reject Driver
POST /admin/rechazar_conductor.php
Reject a driver application with a reason.
Request Body
Rejection reasonCommon reasons:
Licencia de conducción vencida
Documentos del vehículo incompletos
SOAT vencido
Tecnomecánica vencida
Información inconsistente
Vehículo no cumple requisitos
Response
Request Example
curl -X POST https://76.13.114.194/admin/rechazar_conductor.php \
-H "Content-Type: application/json" \
-d '{
"conductor_id": 25,
"motivo": "Licencia de conducción vencida"
}'
Response Example
{
"success": true,
"message": "Conductor rechazado"
}
When a driver is rejected, they receive a notification with the rejection reason and can resubmit after addressing the issues.
Driver Verification Checklist
Administrators should verify the following before approving a driver:
Personal Information
- Full name matches ID
- Valid phone number
- Valid email address
Driver's License
- License number is valid
- License type matches vehicle type
- Not expired (check fecha_expiracion)
- Clear photos of both sides
Vehicle Documents
- SOAT (insurance) is valid and not expired
- Tecnomecánica (inspection) is current
- Tarjeta de propiedad (ownership card) is valid
- License plate matches documents
Vehicle Information
- Make, model, year are correct
- Vehicle type is appropriate for service
- Color matches photos
- Vehicle is in good condition (check photos)
Background Check
- No previous violations or complaints
- Clean driving record (if available)
- Company affiliation verified (if applicable)
Document Expiration Checks
class DriverVerification {
bool isLicenseValid(DateTime? expirationDate) {
if (expirationDate == null) return false;
return DateTime.now().isBefore(expirationDate);
}
bool isSOATValid(DateTime? expirationDate) {
if (expirationDate == null) return false;
return DateTime.now().isBefore(expirationDate);
}
bool isTecnomecanicaValid(DateTime? expirationDate) {
if (expirationDate == null) return false;
return DateTime.now().isBefore(expirationDate);
}
List<String> getVerificationIssues(ConductorProfile profile) {
final issues = <String>[];
if (!isLicenseValid(profile.license?.fechaExpiracion)) {
issues.add('Licencia de conducción vencida o no proporcionada');
}
if (!isSOATValid(profile.vehicle?.soatVencimiento)) {
issues.add('SOAT vencido o no proporcionado');
}
if (!isTecnomecanicaValid(profile.vehicle?.tecnomecanicaVencimiento)) {
issues.add('Tecnomecánica vencida o no proporcionada');
}
if (profile.vehicle?.placa == null || profile.vehicle!.placa.isEmpty) {
issues.add('Placa del vehículo no proporcionada');
}
return issues;
}
bool canApprove(ConductorProfile profile) {
return getVerificationIssues(profile).isEmpty;
}
}
Bulk Operations
For bulk approval or rejection of drivers, consider implementing a batch processing endpoint in future versions.
Error Responses
Invalid driver ID or missing rejection reason
Insufficient admin privileges
Server error during approval/rejection
See Also