Skip to main content

Technical Staff Management

Manage technical passes (pases técnicos) and vaccination records for technical staff members. These endpoints allow creating, updating, and deleting pass credentials and vaccination certificates required for field operations.

Create or Update Technical Pass

curl -X POST https://api.mantis.com/api/technicals/create_update_pass_technical/ \
  -H "Content-Type: application/json" \
  -d '{
    "technical_id": 123,
    "bloque": "petroecuador",
    "fecha_caducidad": "2026-12-31"
  }'
Create a new technical pass or update an existing one. Use POST to create and PUT to update.

Request Body

technical_id
integer
required
ID of the technical staff member
bloque
string
required
Block/company pass type. Valid options:
  • petroecuador - Tarjeta de Petroecuador
  • shaya - Shaya
  • consorcio_shushufindi - Consorcio Shushufindi
  • enap_sipec - ENAP SIPEC
  • orion - Tarjeta Orion
  • andes_petroleum - Andes Petroleum
  • pardalis_services - Pardalis Services
  • frontera_energy - Frontera Energy
  • gran_tierra - Gran Tierra
  • pcr - PCR
  • halliburton - Halliburton
  • gente_oil - Gente Oil
  • tribiol_gas - Tribiol Gas
  • adico - Adico
  • cuyaveno_petro - Cuyaveno Petro
  • geopark - Geopark
fecha_caducidad
string
required
Expiration date in YYYY-MM-DD format
id
integer
Pass ID (required only for PUT requests)

Response

success
boolean
Indicates if the operation was successful
message
string
Human-readable message about the operation
data
object
The created or updated pass technical record
id
integer
Pass record ID
technical_id
integer
Associated technical staff ID
bloque
string
Block/company identifier
fecha_caducidad
string
Expiration date (YYYY-MM-DD)
pass_file_url
string
URL to the uploaded pass file (PDF)
{
  "success": true,
  "message": "Pase creado",
  "data": {
    "id": 456,
    "technical_id": 123,
    "bloque": "petroecuador",
    "fecha_caducidad": "2026-12-31",
    "pass_file_url": "/media/technicals/passes/pass_123.pdf"
  }
}

Create or Update Vaccination Record

curl -X POST https://api.mantis.com/api/technicals/create_update_vaccine/ \
  -H "Content-Type: application/json" \
  -d '{
    "technical_id": 123,
    "vaccine_type": "YELLOW_FEVER",
    "application_date": "2025-03-15",
    "batch_number": "YF2025-XYZ",
    "dose_number": 1
  }'
Create a new vaccination record or update an existing one for a technical staff member.

Request Body

technical_id
integer
required
ID of the technical staff member
vaccine_type
string
required
Type of vaccine. Valid options:
  • HEPATITIS_A_B - Hepatitis A y B
  • TETANUS - Tétanos
  • TYPHOID - Tifoidea
  • YELLOW_FEVER - Fiebre Amarilla
  • INFLUENZA - Influenza
  • MEASLES - Sarampión
  • COVID - Covid-19
  • OTHER - Otra
application_date
string
required
Date vaccine was administered (YYYY-MM-DD)
batch_number
string
Vaccine batch/lot number
dose_number
integer
Dose number (e.g., 1, 2, 3) if part of a series
next_dose_date
string
Estimated date for next dose (YYYY-MM-DD)
notes
string
Additional notes or observations
id
integer
Vaccination record ID (required only for PUT requests)

Response

success
boolean
Indicates if the operation was successful
message
string
Human-readable message about the operation
data
object
The created or updated vaccination record
id
integer
Vaccination record ID
technical_id
integer
Associated technical staff ID
vaccine_type
string
Vaccine type code
vaccine_type_display
string
Human-readable vaccine type name
batch_number
string
Vaccine batch number
application_date
string
Date administered (YYYY-MM-DD)
dose_number
integer
Dose number in series
next_dose_date
string
Next dose date (YYYY-MM-DD)
notes
string
Additional notes
{
  "success": true,
  "message": "Registro de vacunacion creado",
  "data": {
    "id": 789,
    "technical_id": 123,
    "vaccine_type": "YELLOW_FEVER",
    "vaccine_type_display": "Fiebre Amarilla",
    "batch_number": "YF2025-XYZ",
    "application_date": "2025-03-15",
    "dose_number": 1,
    "next_dose_date": "2035-03-15",
    "notes": null
  }
}

Delete Technical Pass

curl -X DELETE https://api.mantis.com/api/technicals/delete_pass_technical/ \
  -H "Content-Type: application/json" \
  -d '{"id": 456}'
Soft delete one or multiple technical pass records. Records are marked as inactive but not permanently removed from the database.

Request Body

id
integer
Pass ID to delete (for single deletion with DELETE method)
ids
array
Array of pass IDs to delete (for bulk deletion with POST method)

Response

success
boolean
Indicates if the operation was successful
message
string
Human-readable message about the operation
data
object
Deletion results
id
integer
Deleted pass ID (single deletion)
technical_id
integer
Associated technical ID (single deletion)
deleted
array
Array of successfully deleted pass objects (bulk deletion)
errors
array
Array of errors encountered during bulk deletion

Delete Vaccination Record

curl -X DELETE https://api.mantis.com/api/technicals/delete_vaccine/ \
  -H "Content-Type: application/json" \
  -d '{"id": 789}'
Soft delete one or multiple vaccination records. Records are marked as inactive but not permanently removed.

Request Body

id
integer
Vaccination record ID to delete (for single deletion)
ids
array
Array of vaccination record IDs to delete (for bulk deletion)

Response

success
boolean
Indicates if the operation was successful
message
string
Human-readable message about the operation
data
object
Deletion results
id
integer
Deleted record ID (single deletion)
technical_id
integer
Associated technical ID (single deletion)
deleted
array
Array of successfully deleted record objects (bulk deletion)
errors
array
Array of errors encountered during bulk deletion

Models

PassTechnical Model

The PassTechnical model represents access passes for technical staff to work in specific oil blocks or facilities. Fields:
  • id (integer) - Primary key
  • technical (foreign key) - Reference to Technical staff member
  • bloque (string) - Block/company identifier (max 32 chars)
  • fecha_caducidad (date) - Expiration date
  • pass_file (file) - PDF file of the pass document
  • is_active (boolean) - Soft delete flag
  • created_at (datetime) - Creation timestamp
  • updated_at (datetime) - Last update timestamp
Methods:
  • get_by_technical(technical_id) - Retrieve pass for a specific technical staff member

VaccinationRecord Model

The VaccinationRecord model tracks vaccination history for technical staff members. Fields:
  • id (integer) - Primary key
  • technical (foreign key) - Reference to Technical staff member
  • vaccine_type (string) - Type of vaccine (max 50 chars)
  • batch_number (string) - Vaccine batch/lot number (max 50 chars)
  • application_date (date) - Date vaccine was administered
  • dose_number (integer) - Dose number in series (e.g., 1, 2, 3)
  • next_dose_date (date) - Estimated date for next dose
  • notes (text) - Additional notes
  • vaccine_file (file) - PDF file of vaccination certificate
  • is_active (boolean) - Soft delete flag
  • created_at (datetime) - Creation timestamp
  • updated_at (datetime) - Last update timestamp
Properties:
  • days_to_next_dose - Calculated days remaining until next dose
  • next_dose - Returns the next dose date
Methods:
  • get_all_by_technical(technical_id) - Retrieve all active vaccination records for a technical staff member, ordered by application date (descending)

Build docs developers (and LLMs) love