Ir al contenido

Vehículos de la organización

GET
/api/v1/vehicles
curl --request GET \
--url 'https://notiauto.co/api/v1/vehicles?per_page=20' \
--header 'X-API-Key: <X-API-Key>'

Requiere el scope vehicles.read. Nota: data es el paginador serializado, así que los elementos vienen en data.data.

per_page
integer
default: 20

Elementos por página (por defecto 20)

Listado paginado

Media typeapplication/json
object
success
boolean
data

Paginador de Laravel; los vehículos están en data.data.

object
data
Array<object>
object
id
integer
description
string
plate
string
type_vehicle
string
marca
string
linea
string
modelo
string
color
string
tipo_servicio
string
estado_del_vehiculo
string
soat
DocumentStatus

Estado de un SOAT o una revisión tecnomecánica.

object
is_valid
boolean
expiration_date
string format: date
nullable
entidad_expide
string
rtm
DocumentStatus

Estado de un SOAT o una revisión tecnomecánica.

object
is_valid
boolean
expiration_date
string format: date
nullable
entidad_expide
string
active_infractions
integer
total_infractions
integer
created_at
string format: date-time
meta
PaginationMeta
object
current_page

Top-level OpenAPI document: info, servers, the API-key scheme, shared schemas and the endpoints that live in routes/api.php as closures rather than on a controller.

Everything here describes what the code actually returns, including the paginator-inside-data shape of the list endpoints — that is the published contract and consumers depend on it.

integer
total
integer
per_page
integer
last_page
integer
Example
{
"success": true,
"data": {
"data": [
{
"id": 12,
"description": "Camión de reparto",
"plate": "ABC123",
"type_vehicle": "CAMION",
"marca": "CHEVROLET",
"linea": "NPR",
"modelo": "2020",
"color": "BLANCO",
"tipo_servicio": "Particular",
"estado_del_vehiculo": "ACTIVO",
"soat": {
"is_valid": true,
"expiration_date": "2027-01-15",
"entidad_expide": "SEGUROS DEL ESTADO"
},
"rtm": {
"is_valid": true,
"expiration_date": "2027-01-15",
"entidad_expide": "SEGUROS DEL ESTADO"
},
"active_infractions": 1,
"total_infractions": 3
}
]
},
"meta": {
"current_page": 1,
"total": 42,
"per_page": 20,
"last_page": 3
}
}

API key ausente o inválida

Media typeapplication/json
Error
object
success
boolean
message
string
Example
{
"success": false,
"message": "API key inválida o expirada."
}

La key no tiene el scope requerido

Media typeapplication/json
Error
object
success
boolean
message
string
Example
{
"success": false,
"message": "API key inválida o expirada."
}