VehicleType


Catálogo global de tipos de vehículo (moto = 1, carro = 2, wagon = 3, van = 4, autobús = 5, camión = 6, cisterna = 7, limusina = 8, funerario = 9, a pie = 10, bici = 11, patineta = 12, barco = 20, avión = 30, helicóptero = 31, ambulancia = 40). code es el valor estable que referencian los ServiceProfile.

Estructura de Datos

Atributo Tipo Descripción
id int
name string Nombre del tipo de vehículo
code int Código estable del tipo de vehículo
is_enabled bool Si el tipo está disponible
created_at datetime\|null
updated_at datetime\|null
allLogs ApiLog>
logs ApiLog>
serviceProfiles ServiceProfile> Perfiles de repartidor que usan este tipo de vehículo
{
    "id": 1,
    "name": "Moto",
    "code": 1,
    "is_enabled": true,
    "created_at": "2023-07-07 13:36:35",
    "updated_at": "2023-07-07 13:36:35"
}

Endpoints

Insertar VehicleType

Crear tipo de vehículo

Agrega un VehicleType al catálogo global (name, code, is_enabled).

Método URI Cabeceras
POST /vehicle-types Authorization
{
    "name": "required|string|max:255",
    "code": "required|integer|unique:vehicle_types,code",
    "is_enabled": "boolean"
}

Listar VehicleType

{info} Soporta: Paginación Filters Carga dinámica

Listar tipos de vehículo

Catálogo global de VehicleType.

Método URI Cabeceras
GET /vehicle-types N/A

Mostrar VehicleType

{info} Soporta: Carga dinámica

Mostrar tipo de vehículo

Devuelve el VehicleType por su id.

Método URI Cabeceras
GET /vehicle-types/{vehicleTypeId} N/A

Actualizar VehicleType

Actualizar tipo de vehículo

Modifica name / is_enabled del VehicleType.

Método URI Cabeceras
PATCH /vehicle-types/{vehicleTypeId} Authorization
{
    "name": "string|max:255",
    "is_enabled": "boolean"
}

Eliminar VehicleType

Eliminar tipo de vehículo

Borra el VehicleType del catálogo global.

Método URI Cabeceras
DELETE /vehicle-types/{vehicleTypeId} Authorization

Relaciones