Paginated Driver List
Retrieves a paginated list of active drivers with support for multiple filters.
Endpoint
Query Parameters
Records per page (minimum: 1, maximum: 100)
Filter by full name (partial match)
Filter by DUI number (partial match)
Filter by department ID (exact match)
Filter by availability status ID (exact match)
General search across name, DUI, email, and phone number
Response
Indicates if the operation was successful
Pagination information and driver records Array of driver objects with profile and detail information
Total number of records matching the filter
Example Request
GET /motorista?pagina= 1 & por_pagina = 10 & idDepartamento = 1 & busqueda = MARTINEZ
Example Response
{
"success" : true ,
"message" : "Listado de motoristas obtenido exitosamente" ,
"data" : {
"registros" : [
{
"idPerfil" : 123 ,
"nombreCompleto" : "JUAN CARLOS MARTINEZ LOPEZ" ,
"email" : "[email protected] " ,
"telefono" : "7777-8888" ,
"dui" : "12345678-9" ,
"departamento" : "San Salvador" ,
"disponibilidad" : "Disponible" ,
"numeroLicencia" : "A-12345" ,
"vencimientoLicencia" : "2026-12-31"
}
],
"pagina" : 1 ,
"porPagina" : 10 ,
"total" : 1 ,
"totalPaginas" : 1
}
}
Status Codes
200: List retrieved successfully
500: Internal server error
Complete Driver List (Non-Paginated)
Retrieves all active drivers without pagination. Useful for populating dropdowns and select components.
Endpoint
GET /motorista/todos/lista
Query Parameters
Filter by full name (partial match)
Filter by DUI number (partial match)
Filter by department ID (exact match)
Filter by availability status ID (exact match)
General search across multiple fields
Response
Indicates if the operation was successful
Array of all active driver records matching the filters
Example Request
GET /motorista/todos/lista?idDisponibilidad= 1
Example Response
{
"success" : true ,
"message" : "Listado completo de motoristas obtenido exitosamente" ,
"data" : [
{
"idPerfil" : 123 ,
"nombreCompleto" : "JUAN CARLOS MARTINEZ LOPEZ" ,
"dui" : "12345678-9" ,
"disponibilidad" : "Disponible"
},
{
"idPerfil" : 124 ,
"nombreCompleto" : "MARIA ELENA RODRIGUEZ GARCIA" ,
"dui" : "98765432-1" ,
"disponibilidad" : "Disponible"
}
]
}
Status Codes
200: List retrieved successfully
500: Internal server error
Filter Combinations
You can combine multiple filters to narrow down results:
# By department and availability
GET /motorista?idDepartamento= 1 & idDisponibilidad = 2
# By name and DUI
GET /motorista?nombre=MARTINEZ & dui = 12345
# General search with pagination
GET /motorista?busqueda= 7777 & pagina = 1 & por_pagina = 20
Use Cases
Paginated endpoint : Use for main driver listing pages with navigation
Complete list endpoint : Use for dropdown menus, autocomplete fields, and multi-select components
Filters : Apply specific filters to find drivers by department, availability, or search terms