Actualizar vehículo
PUT
/teams/{teamId}/vehicles/{vehicleId}
const url = 'https://api.dev.lade.com.mx/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/vehicles/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"plate":"example","brand":"example","model":"example","year":1,"vin":"example","type":"example","imageUrl":"example","capacity":"example","fuelType":"example","insuranceNumber":"example","insuranceExpiry":"example","registrationExpiry":"example","lastMaintenance":"example","nextMaintenance":"example","mileage":1,"notes":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.dev.lade.com.mx/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/vehicles/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "plate": "example", "brand": "example", "model": "example", "year": 1, "vin": "example", "type": "example", "imageUrl": "example", "capacity": "example", "fuelType": "example", "insuranceNumber": "example", "insuranceExpiry": "example", "registrationExpiry": "example", "lastMaintenance": "example", "nextMaintenance": "example", "mileage": 1, "notes": "example" }'Actualiza información de un vehículo
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»teamId
required
string format: uuid
ID del equipo (UUID)
vehicleId
required
string format: uuid
ID del vehículo (UUID)
Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
plate
string
brand
string
model
string
year
integer
vin
string
type
string
imageUrl
string
capacity
string
fuelType
string
insuranceNumber
string
insuranceExpiry
string
registrationExpiry
string
lastMaintenance
string
nextMaintenance
string
mileage
integer
notes
string
Examplegenerated
{ "plate": "example", "brand": "example", "model": "example", "year": 1, "vin": "example", "type": "example", "imageUrl": "example", "capacity": "example", "fuelType": "example", "insuranceNumber": "example", "insuranceExpiry": "example", "registrationExpiry": "example", "lastMaintenance": "example", "nextMaintenance": "example", "mileage": 1, "notes": "example"}Responses
Sección titulada «Responses»Vehículo actualizado
Media typeapplication/json
object
id
string format: uuid
teamId
string format: uuid
plate
string
brand
string
model
string
year
integer
vin
string
type
string
imageUrl
string
capacity
string
fuelType
string
status
Estado del vehículo
string
insuranceNumber
string
insuranceExpiry
string
registrationExpiry
string
lastMaintenance
string
nextMaintenance
string
mileage
integer
notes
string
createdAt
string format: date-time
Example
{ "status": "DISPONIBLE"}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"}Recurso no encontrado
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Not found", "message": "Resource not found"}