Crear conductor
POST
/drivers
const url = 'https://api.dev.lade.com.mx/drivers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"teamId":"550e8400-e29b-41d4-a716-446655440000","name":"Pedro López","phone":"+5212345678901","licenseNumber":"ABC123456","licenseExpiry":"2025-12-31"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dev.lade.com.mx/drivers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "name": "Pedro López", "phone": "+5212345678901", "licenseNumber": "ABC123456", "licenseExpiry": "2025-12-31" }'Registra un nuevo conductor para el equipo
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
teamId
required
string format: uuid
name
required
string
phone
string
licenseNumber
string
licenseExpiry
string
curp
string
rfc
string
birthDate
string
address
object
street
string
extNumber
string
intNumber
string
neighborhood
string
city
string
state
string
country
string
zipCode
string
certifications
Array<string>
salary
number
Example
{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "name": "Pedro López", "phone": "+5212345678901", "licenseNumber": "ABC123456", "licenseExpiry": "2025-12-31"}Responses
Sección titulada «Responses»Conductor creado
Media typeapplication/json
object
id
string format: uuid
teamId
string format: uuid
name
string
phone
string
photoUrl
string
status
Estado del conductor
string
licenseNumber
string
licenseExpiry
string
curp
string
rfc
string
birthDate
string
medicalExpiry
string
bloodType
string
emergencyContact
string
certifications
Array<string>
salary
number
address
object
street
string
extNumber
string
intNumber
string
neighborhood
string
city
string
state
string
country
string
zipCode
string
createdAt
string format: date-time
username
Usuario autogenerado para login en la app de conductores (ver POST /teams/{teamId}/drivers/{driverId}/access)
string
appAccessStatus
Estado de la cuenta del conductor en el pool de Cognito de la app móvil
string
allergies
string
Example
{ "status": "DISPONIBLE", "address": { "country": "Mexico" }, "appAccessStatus": "NONE"}Solicitud inválida
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Validation failed", "field": "email", "message": "Invalid email format"}No autenticado
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Unauthorized", "message": "Invalid or expired token"}Sin permisos
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Forbidden", "message": "You don't have permission to access this resource"}