Ir al contenido

Actualizar vehículo

PUT
/teams/{teamId}/vehicles/{vehicleId}
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

teamId
required
string format: uuid

ID del equipo (UUID)

vehicleId
required
string format: uuid

ID del vehículo (UUID)

Media typeapplication/json
object
plate
string
>= 1 characters <= 20 characters
brand
string
<= 50 characters
model
string
<= 50 characters
year
integer
<= 2100
vin
string
<= 17 characters
type
string
<= 50 characters
imageUrl
string
<= 500 characters
capacity
string
<= 50 characters
fuelType
string
<= 50 characters
insuranceNumber
string
<= 50 characters
insuranceExpiry
string
<= 20 characters
registrationExpiry
string
<= 20 characters
lastMaintenance
string
<= 20 characters
nextMaintenance
string
<= 20 characters
mileage
integer
<= 9999999
notes
string
<= 1000 characters
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"
}

Vehículo actualizado

Media typeapplication/json
object
id
string format: uuid
teamId
string format: uuid
plate
string
brand
string
nullable
model
string
nullable
year
integer
vin
string
nullable <= 17 characters
type
string
nullable
imageUrl
string
nullable
capacity
string
nullable
fuelType
string
nullable
status

Estado del vehículo

string
Allowed values: DISPONIBLE EN_USO MANTENIMIENTO FUERA_DE_SERVICIO
insuranceNumber
string
nullable
insuranceExpiry
string
nullable
registrationExpiry
string
nullable
lastMaintenance
string
nullable
nextMaintenance
string
nullable
mileage
integer
notes
string
nullable
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"
}