Vehicle Integration
The Solicitud Transporte API provides flexible options for creating and managing vehicles: manual entry with complete data or automatic creation using an external plate information API.Overview
Two approaches for vehicle creation:- Manual Creation - Provide all vehicle data directly
- Plate API Integration - Query external plate registry and auto-populate data
Manual Vehicle Creation
Create a vehicle by providing complete information.Required Fields
- placa - Unique license plate (auto-converted to uppercase, spaces removed)
- idClaseVehiculo - Vehicle class ID (must exist and be active)
- idEstadoVehiculo - Vehicle state ID (must exist and be active)
Optional Fields
All other fields are optional but recommended for complete vehicle records:- Fuel type, default driver, assigned department
- Make, model, year, color
- Motor, chassis, and VIN numbers
- Passenger and fuel capacity
- Maintenance dates and insurance information
Plate normalization: Plates are automatically converted to uppercase with spaces removed. “p 503067” becomes “P503067”.
Reactivation
If you try to create a vehicle with a plate that was previously soft-deleted, the system automatically reactivates the existing record instead of creating a new one.
Creating Vehicles from Plate API
The platform integrates with an external plate information API to automatically retrieve and populate vehicle data.How It Works
API authentication
The system authenticates with the external plate registry API using credentials from environment variables.
Ownership verification
Validates that the vehicle belongs to your institution (configured via
PLACA_API_PROPIETARIO_FILTRO).Class mapping
Automatically maps the vehicle class from the API to your local vehicle class catalog.
Making the Request
Auto-Populated Fields
The plate API automatically provides:- Vehicle make (marca)
- Model (modelo)
- Year (anio)
- Color (color)
- Motor number (numeroMotor)
- Chassis number (numeroChasis)
- VIN number (numeroVin)
- Registration card date (fechaTarjetaCirculacion)
- Insurance policy number (numeroPolizaSeguro)
- Vehicle class (mapped to your catalog)
Ownership Validation
403 Response
Class Mapping
The vehicle class returned by the external API must exist in your local
ClaseVehiculo catalog. If the class doesn’t exist, you’ll receive a 404 Not Found error asking you to create the class first.Querying Plate Information
You can query the external plate API without creating a vehicle:Plate Format Validation
Plates must have:- At least one letter at the beginning
- At least four digits after the letters
- ✅
P503067- Valid - ✅
ABC1234- Valid - ❌
123456- Invalid (no letters) - ❌
P123- Invalid (less than 4 digits)
Updating Vehicles
Update any vehicle field after creation:cURL
All fields in the update are optional. Only provide the fields you want to change.
Managing Vehicle States
Vehicles can have different states (Active, In Maintenance, Out of Service, etc.) managed through theidEstadoVehiculo field:
cURL
Filtering and Searching
Find vehicles with powerful filters:cURL
placa- Partial plate searchmarca- Partial make searchmodelo- Partial model searchidClaseVehiculo- Filter by vehicle classidEstadoVehiculo- Filter by vehicle statebusqueda- Search across plate, make, model, and color
Use
/vehiculo/todos/lista for unpaginated results (useful for dropdowns).Deleting Vehicles
Soft-delete vehicles that are no longer in use:cURL
Integration Configuration
To enable the plate API integration, configure these environment variables:Error Handling
Common error scenarios:409 Conflict - Duplicate plate
409 Conflict - Duplicate plate
The plate already exists for an active vehicle. Use PUT to update the existing vehicle instead.
403 Forbidden - Not institution vehicle
403 Forbidden - Not institution vehicle
The vehicle doesn’t belong to your institution according to the external registry. Cannot create.
404 Not Found - Vehicle class missing
404 Not Found - Vehicle class missing
The vehicle class from the external API doesn’t exist in your catalog. Create the class first through
/clase-vehiculo endpoint.404 Not Found - Plate not found
404 Not Found - Plate not found
The plate doesn’t exist in the external registry. Use manual creation instead.
502/503/504 - External API error
502/503/504 - External API error
The external plate API is unavailable or timing out. Try again later or use manual creation.
Best Practices
Prefer plate API when available
Prefer plate API when available
Use the plate API integration to ensure data accuracy and reduce manual entry errors.
Query before creating
Query before creating
Use
/consulta-placa to preview data and verify ownership before creating a vehicle record.Maintain vehicle classes catalog
Maintain vehicle classes catalog
Keep your
ClaseVehiculo catalog synchronized with common vehicle types from the external API.Track maintenance schedules
Track maintenance schedules
Use the maintenance date fields (
fechaUltimaRevision, fechaProximoMantenimiento) to stay on top of vehicle servicing.Keep insurance current
Keep insurance current
Regularly update insurance policy information (
numeroPolizaSeguro, fechaVencimientoSeguro) to ensure compliance.Update mileage after missions
Update mileage after missions
While missions track mileage automatically, update
kilometrajeActual if the vehicle is used outside the mission system.