Vehiculos Admisibles Campana API
Manage the relationship between vehicles and advertising campaigns. This table tracks which vehicles are eligible/admitted for specific campaigns.Vehicle-Campaign Relationship Object
Unique identifier for the relationship (auto-generated primary key)
Foreign key reference to Vehiculo (the eligible vehicle)
Foreign key reference to CampanaPublicitaria (the advertising campaign)
GET /api/vehiculosadmisiblescampana
Retrieve all vehicle-campaign eligibility relationships.Query Parameters
Filter by vehicle ID to see all campaigns a vehicle is eligible for
Filter by campaign ID to see all vehicles eligible for a campaign
Response
GET /api/vehiculosadmisiblescampana/campana/
Retrieve all vehicles eligible for a specific campaign with full vehicle details.Path Parameters
The ID of the advertising campaign
Response
GET /api/vehiculosadmisiblescampana/vehiculo/
Retrieve all campaigns that a specific vehicle is eligible for.Path Parameters
The ID of the vehicle
Response
POST /api/vehiculosadmisiblescampana
Add a vehicle to a campaign’s eligible vehicles list.Request Body
ID of the vehicle to make eligible
ID of the campaign
Request Example
Response
DELETE /api/vehiculosadmisiblescampana/
Remove a vehicle from a campaign’s eligible vehicles list.Path Parameters
The ID of the vehicle-campaign relationship to delete
Response
Campaign Vehicle Eligibility Rules
Campaigns define which vehicle categories are eligible through boolean flags:Whether sedans are eligible for the campaign
Whether SUVs are eligible for the campaign
Whether trucks (camion) are eligible for the campaign
Whether pickup trucks are eligible for the campaign
Whether buses are eligible for the campaign
Eligibility Check Example
Before adding a vehicle to a campaign, verify that the vehicle’s category matches the campaign’s admissible types:Use Cases
1. Register Vehicle for Campaign
When a driver wants to participate in a campaign, create a relationship between their vehicle and the campaign:2. List All Available Vehicles for Campaign
Get all vehicles that can participate in a specific campaign:3. Check Driver’s Active Campaigns
Find all campaigns a driver’s vehicle is enrolled in:Related Endpoints
- Vehiculos - Vehicle information and categories
- CampanaPublicitaria - Advertising campaign details
- IngresoConductorCampana - Driver campaign registration