Skip to main content

Overview

The Vehicles API provides endpoints for managing vehicles, their certifications, and access passes for different operational blocks.

Vehicle Certifications

Create or Update Vehicle Certification

curl -X POST https://api.mantis.com/api/vehicles/cert_vehicle/ \
  -H "Content-Type: application/json" \
  -d '{
    "vehicle_id": 1,
    "name": "INSPECCION VOLUMETRICA",
    "date_start": "2024-01-01",
    "date_end": "2025-01-01",
    "description": "Annual volumetric inspection"
  }'
Manage vehicle certifications including volumetric inspections, thickness measurements, safety inspections, and hydrostatic tests.

Request Body

vehicle_id
integer
required
ID of the vehicle to certify
name
string
required
Type of certification. Valid options:
  • INSPECCION VOLUMETRICA - Volumetric Inspection
  • MEDICION DE ESPESORES - Thickness Measurement
  • INSPECCION DE SEGURIDAD - Safety Inspection
  • PRUEBA HIDROSTATICA - Hydrostatic Test
date_start
string
required
Certification start date in YYYY-MM-DD format
date_end
string
required
Certification expiration date in YYYY-MM-DD format. Must be after date_start
description
string
Optional description or notes about the certification
id
integer
Required for PUT requests. ID of the certification to update

Response

success
boolean
Indicates if the operation was successful
message
string
Success or error message
data
object
id
integer
Certification ID
vehicle_id
integer
Associated vehicle ID
vehicle_plate
string
Vehicle license plate number
name
string
Certification type code
name_display
string
Human-readable certification type
date_start
string
Start date in ISO format
date_end
string
End date in ISO format
description
string
Certification description
created_at
string
Timestamp when certification was created
updated_at
string
Timestamp when certification was last updated
{
  "success": true,
  "message": "Certificación de vehículo creada exitosamente",
  "data": {
    "id": 1,
    "vehicle_id": 1,
    "vehicle_plate": "ABC-123",
    "name": "INSPECCION VOLUMETRICA",
    "name_display": "Inspección Volumétrica",
    "date_start": "2024-01-01",
    "date_end": "2025-01-01",
    "description": "Annual volumetric inspection",
    "created_at": "2024-01-01T10:00:00Z",
    "updated_at": "2024-01-01T10:00:00Z"
  }
}

Delete Vehicle Certification

DELETE
curl -X DELETE https://api.mantis.com/api/vehicles/cert_vehicle/1/
Soft-deletes a vehicle certification by marking it as inactive.

Path Parameters

pk
integer
required
ID of the certification to delete

Vehicle Passes

Create or Update Vehicle Pass

curl -X POST https://api.mantis.com/api/vehicles/pass_vehicle/ \
  -H "Content-Type: application/json" \
  -d '{
    "vehicle_id": 1,
    "bloque": "PETROECUADOR",
    "fecha_caducidad": "2024-12-31"
  }'
Manage vehicle access passes for operational blocks.

Request Body

vehicle_id
integer
required
ID of the vehicle
bloque
string
required
Operational block name. Valid options:
  • PETROECUADOR
  • SHAYA
  • CONSORCIO SHUSHUFINDI
  • ENAP SIPEC
  • ORION
  • ANDES PETROLEUM
  • PARDALIS SERVICES
  • FRONTERA ENERGY
  • GRAN TIERRA
  • PCR
  • HALLIBURTON
  • GENTE OIL
  • TRIBIOL GAS
  • ADICO
  • CUYAVENO PETRO
  • GEOPARK
fecha_caducidad
string
required
Pass expiration date in YYYY-MM-DD format
id
integer
Required for PUT requests. ID of the pass to update

Response

success
boolean
Indicates if the operation was successful
message
string
Success or error message
data
object
id
integer
Pass ID
vehicle_id
integer
Associated vehicle ID
vehicle_plate
string
Vehicle license plate number
bloque
string
Operational block name
fecha_caducidad
string
Pass expiration date
pass_file_url
string
URL to the pass document file (if uploaded)
created_at
string
Timestamp when pass was created
updated_at
string
Timestamp when pass was last updated
{
  "success": true,
  "message": "Pase de vehículo creado exitosamente",
  "data": {
    "id": 1,
    "vehicle_id": 1,
    "vehicle_plate": "ABC-123",
    "bloque": "PETROECUADOR",
    "fecha_caducidad": "2024-12-31",
    "pass_file_url": "/media/vehicles/passes/pass_123.pdf",
    "created_at": "2024-01-01T10:00:00Z",
    "updated_at": "2024-01-01T10:00:00Z"
  }
}

Delete Vehicle Pass

DELETE
curl -X DELETE https://api.mantis.com/api/vehicles/pass_vehicle/1/
Soft-deletes a vehicle pass by marking it as inactive.

Path Parameters

pk
integer
required
ID of the pass to delete

Available Vehicles

Get Available Vehicles

GET
curl https://api.mantis.com/api/vehicles/avaliables/
Retrieves all active vehicles with their complete information including passes and certifications.

Response

data
array
Array of vehicle objects with complete details
id
integer
Vehicle ID
brand
string
Vehicle brand (e.g., “CHEVROLET”, “TOYOTA”)
model
string
Vehicle model
type_vehicle
string
Vehicle type: CAMION, VACUUM, CAMIONETA, PLATAFORMA, or AUTO
year
integer
Vehicle year
no_plate
string
License plate number (unique)
status_vehicle
string
Vehicle status: DISPONIBLE, EN MANTENIMIENTO, or STANBY
status_cert_oper
string
Certification status: VIGENTE, VENCIDO, NO APLICA, POR VENCER, EN TRAMITE, or RECHAZADO
date_cert_oper
string
Operation certificate issue date
due_date_cert_oper
string
Operation certificate expiration date
date_matricula
string
Registration date
due_date_matricula
string
Registration expiration date
date_mtop
string
MTOP (Ministry of Transport) date
due_date_mtop
string
MTOP expiration date
date_technical_review
string
Technical review date
due_date_technical_review
string
Technical review expiration date
nro_poliza
string
Insurance policy number
insurance_company
string
Insurance company name
insurance_expiration_date
string
Insurance expiration date
insurance_issue_date
string
Insurance issue date
serial_number
string
Vehicle serial number
engine_number
string
Engine number
chassis_number
string
Chassis number
passes
array
Array of vehicle passes
id
integer
Pass ID
bloque
string
Operational block name
fecha_caducidad
string
Pass expiration date
certifications
array
Array of vehicle certifications
id
integer
Certification ID
name
string
Certification type code
name_display
string
Human-readable certification name
date_start
string
Certification start date
date_end
string
Certification expiration date
description
string
Certification description
notes
string
Additional notes
created_at
string
Creation timestamp
updated_at
string
Last update timestamp
is_active
boolean
Whether the vehicle is active
{
  "data": [
    {
      "id": 1,
      "brand": "CHEVROLET",
      "model": "D-MAX",
      "type_vehicle": "CAMIONETA",
      "year": 2022,
      "no_plate": "ABC-123",
      "status_vehicle": "DISPONIBLE",
      "status_cert_oper": "VIGENTE",
      "date_cert_oper": "2024-01-01",
      "due_date_cert_oper": "2025-01-01",
      "nro_poliza": "POL-12345",
      "insurance_company": "Seguros Sucre",
      "insurance_expiration_date": "2024-12-31",
      "serial_number": "SN123456",
      "engine_number": "EN789012",
      "chassis_number": "CH345678",
      "passes": [
        {
          "id": 1,
          "bloque": "PETROECUADOR",
          "fecha_caducidad": "2024-12-31"
        }
      ],
      "certifications": [
        {
          "id": 1,
          "name": "INSPECCION VOLUMETRICA",
          "name_display": "Inspección Volumétrica",
          "date_start": "2024-01-01",
          "date_end": "2025-01-01",
          "description": "Annual inspection"
        }
      ],
      "created_at": "2023-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z",
      "is_active": true
    }
  ]
}

Vehicle Model Fields

Vehicles in Mantis support the following data fields:

Basic Information

  • brand - Vehicle brand/manufacturer
  • model - Vehicle model
  • type_vehicle - Type (CAMION, VACUUM, CAMIONETA, PLATAFORMA, AUTO)
  • year - Manufacturing year
  • no_plate - License plate (unique identifier)
  • chasis - Chassis information
  • color - Vehicle color
  • owner_transport - Owner name (default: “PEISOL”)

Status Fields

  • status_vehicle - Operational status (DISPONIBLE, EN MANTENIMIENTO, STANBY)
  • status_cert_oper - Certification status (VIGENTE, VENCIDO, NO APLICA, POR VENCER, EN TRAMITE, RECHAZADO)

Certification Dates

  • date_cert_oper - Operation certificate issue date
  • due_date_cert_oper - Operation certificate expiration date
  • date_matricula - Registration date
  • due_date_matricula - Registration expiration date
  • date_mtop - MTOP certification date
  • due_date_mtop - MTOP expiration date
  • date_technical_review - Technical review date
  • due_date_technical_review - Technical review expiration date
  • date_satellite - Satellite system installation date
  • due_date_satellite - Satellite system expiration date

Insurance Information

  • nro_poliza - Insurance policy number
  • insurance_company - Insurance provider name
  • insurance_expiration_date - Policy expiration date
  • insurance_issue_date - Policy issue date

Identification Numbers

  • serial_number - Vehicle serial number
  • engine_number - Engine identification number
  • chassis_number - Chassis identification number

File Attachments

  • vehicle_image - Vehicle photo (image file)
  • poliza_file - Insurance policy document (PDF)
  • matricula_file - Registration document (PDF)
  • rev_tec_file - Technical review document (PDF)

Error Responses

All endpoints may return the following error responses:
{
  "success": false,
  "error": "El campo vehicle_id es requerido"
}

Build docs developers (and LLMs) love