Skip to main content

Overview

The Campañas Publicitarias (Advertising Campaigns) endpoint allows you to create and manage advertising campaigns that target specific vehicles within defined geographic sectors. Campaigns include budget management, vehicle type eligibility, branding specifications, and monetization schedules.

Base URL

/api/campaniaspublicitarias/

Endpoints

List All Campaigns

Retrieve a list of all advertising campaigns. Response
id_campana
integer
Unique identifier for the campaign (auto-generated)
id_empresa
integer
Foreign key to the company (Empresa) that owns this campaign
id_ciudad
integer
Foreign key to the city where the campaign operates
id_pais
integer
Foreign key to the country where the campaign operates
nombre_campana
string
Name of the campaign (max 20 characters)
correo_responsable
string
Email address of the campaign manager (max 40 characters)
id_sector
integer
Reference to the sector ID (nullable)
fecha_inicio
date
Campaign start date (format: YYYY-MM-DD)
fecha_fin
date
Campaign end date (format: YYYY-MM-DD)
fecha_fin_registro
date
Registration deadline for drivers to join the campaign (format: YYYY-MM-DD)
presupuesto
float
Total budget allocated for the campaign
nombre_responsable
string
Name of the person responsible for the campaign (max 20 characters)
tarifa_base
float
Base rate for driver compensation
tarifa_min
float
Minimum compensation rate
tarifa_max
float
Maximum compensation rate
hora_monetizable_inicio
string
Start time for monetizable hours (format: HH:MM, max 5 characters)
hora_monetizable_fin
string
End time for monetizable hours (format: HH:MM, max 5 characters)
cobro_minimo
float
Minimum charge amount
tipo_brandeo
string
Type of vehicle branding. Choices: sticker or panel led
id_talleres
json
JSON array of workshop IDs where branding can be applied
carroceria_capo
float
Rate for hood branding (default: 0.0)
carroceria_techo
float
Rate for roof branding (default: 0.0)
puerta_conductor
float
Rate for driver door branding (default: 0.0)
puerta_pasajero
float
Rate for passenger door branding (default: 0.0)
puerta_trasera_iz
float
Rate for left rear door branding (default: 0.0)
puerta_trasera_der
float
Rate for right rear door branding (default: 0.0)
puerta_maletero
float
Rate for trunk/boot branding (default: 0.0)
fecha_creacion
date
Date when the campaign was created (format: YYYY-MM-DD)
fecha_modificacion
date
Date when the campaign was last modified (format: YYYY-MM-DD)
estado
integer
Campaign status (0: inactive, 1: active)
sedan_admisible
boolean
Whether sedan vehicles are eligible for this campaign
suv_admisible
boolean
Whether SUV vehicles are eligible for this campaign
camion_admisible
boolean
Whether truck vehicles are eligible for this campaign
camioneta_admisible
boolean
Whether pickup truck vehicles are eligible for this campaign
bus_admisible
boolean
Whether bus vehicles are eligible for this campaign

Create a Campaign

Create a new advertising campaign. Request Body
id_empresa
integer
required
ID of the company creating the campaign
id_ciudad
integer
required
ID of the city for the campaign
id_pais
integer
required
ID of the country for the campaign
nombre_campana
string
required
Campaign name (max 20 characters)
correo_responsable
string
required
Email of the campaign manager (max 40 characters)
id_sector
integer
Sector ID (optional)
fecha_inicio
date
required
Campaign start date (YYYY-MM-DD)
fecha_fin
date
required
Campaign end date (YYYY-MM-DD)
fecha_fin_registro
date
required
Driver registration deadline (YYYY-MM-DD)
presupuesto
float
required
Total campaign budget
nombre_responsable
string
required
Name of campaign manager (max 20 characters)
tarifa_base
float
required
Base compensation rate
tarifa_min
float
required
Minimum compensation rate
tarifa_max
float
required
Maximum compensation rate
hora_monetizable_inicio
string
required
Monetizable hours start time (HH:MM)
hora_monetizable_fin
string
required
Monetizable hours end time (HH:MM)
cobro_minimo
float
required
Minimum charge amount
tipo_brandeo
string
required
Branding type: sticker or panel led
id_talleres
json
Array of workshop IDs (default: [])
carroceria_capo
float
Hood branding rate (default: 0.0)
carroceria_techo
float
Roof branding rate (default: 0.0)
puerta_conductor
float
Driver door branding rate (default: 0.0)
puerta_pasajero
float
Passenger door branding rate (default: 0.0)
puerta_trasera_iz
float
Left rear door branding rate (default: 0.0)
puerta_trasera_der
float
Right rear door branding rate (default: 0.0)
puerta_maletero
float
Trunk branding rate (default: 0.0)
fecha_creacion
date
required
Creation date (YYYY-MM-DD)
fecha_modificacion
date
required
Modification date (YYYY-MM-DD)
estado
integer
required
Campaign status (0 or 1)
sedan_admisible
boolean
required
Allow sedan vehicles
suv_admisible
boolean
required
Allow SUV vehicles
camion_admisible
boolean
required
Allow truck vehicles
camioneta_admisible
boolean
required
Allow pickup vehicles
bus_admisible
boolean
required
Allow bus vehicles

Retrieve a Campaign

Retrieve details of a specific campaign by ID.

Update a Campaign

Update all fields of a specific campaign. Partially update specific fields of a campaign.

Delete a Campaign

Delete a specific campaign by ID.

Example Usage

{
  "id_empresa": 1,
  "id_ciudad": 1,
  "id_pais": 1,
  "nombre_campana": "Summer Campaign",
  "correo_responsable": "[email protected]",
  "fecha_inicio": "2024-06-01",
  "fecha_fin": "2024-08-31",
  "fecha_fin_registro": "2024-05-25",
  "presupuesto": 50000.00,
  "nombre_responsable": "John Doe",
  "tarifa_base": 15.00,
  "tarifa_min": 10.00,
  "tarifa_max": 25.00,
  "hora_monetizable_inicio": "06:00",
  "hora_monetizable_fin": "22:00",
  "cobro_minimo": 5.00,
  "tipo_brandeo": "sticker",
  "id_talleres": [1, 2, 3],
  "carroceria_capo": 100.00,
  "carroceria_techo": 150.00,
  "puerta_conductor": 75.00,
  "puerta_pasajero": 75.00,
  "puerta_trasera_iz": 50.00,
  "puerta_trasera_der": 50.00,
  "puerta_maletero": 60.00,
  "fecha_creacion": "2024-05-01",
  "fecha_modificacion": "2024-05-01",
  "estado": 1,
  "sedan_admisible": true,
  "suv_admisible": true,
  "camion_admisible": false,
  "camioneta_admisible": true,
  "bus_admisible": false
}

Build docs developers (and LLMs) love