Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CLINTONARMANDO/apiregistropendientes/llms.txt

Use this file to discover all available pages before exploring further.

The Employees API manages the internal workforce — technicians, supervisors, and administrators — who execute and coordinate field work orders. Each employee is associated with a cargo (job title/position). Cargos are managed through a separate set of sub-endpoints on the same base path.
All endpoints require a valid Bearer token. Include Authorization: Bearer <token> in every request header.

Employees

Create an employee

POST /api/empleados Creates a new active employee record.
nombre
string
required
First name of the employee.
apellidoPaterno
string
required
Paternal surname.
apellidoMaterno
string
required
Maternal surname.
telefono
string
Contact phone number.
correo
string
Work email address.
cargoId
number
required
ID of the cargo (position) to assign. Use GET /api/empleados/cargos to retrieve valid IDs.
fechaIngreso
string
required
Start date in YYYY-MM-DD format (e.g., 2026-01-15).
curl --request POST \
  --url 'https://your-api.example.com/api/empleados' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "nombre": "Luis",
    "apellidoPaterno": "Torres",
    "apellidoMaterno": "Quispe",
    "telefono": "999111222",
    "correo": "ltorres@empresa.pe",
    "cargoId": 2,
    "fechaIngreso": "2026-03-01"
  }'

Response

id
number
Unique employee ID.
nombre
string
First name.
apellidoPaterno
string
Paternal surname.
apellidoMaterno
string
Maternal surname.
telefono
string
Phone number.
correo
string
Email address.
cargo
object
Assigned position.
fechaIngreso
string
Hire date in YYYY-MM-DD format.
vigente
boolean
true if the record is active.

List active employees

GET /api/empleados Returns all employees where vigente = true.
curl --request GET \
  --url 'https://your-api.example.com/api/empleados' \
  --header 'Authorization: Bearer <token>'

Update an employee

PUT /api/empleados/{id} Updates an existing employee’s information.
id
number
required
The numeric ID of the employee to update.
All request body fields from Create an employee are accepted. Only the fields you include are updated.
curl --request PUT \
  --url 'https://your-api.example.com/api/empleados/5' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "telefono": "988776655",
    "cargoId": 3
  }'

Delete an employee

DELETE /api/empleados/{id} Soft-deletes an employee by setting vigente = false. The record is preserved in the database.
id
number
required
The numeric ID of the employee to deactivate.
Deactivating an employee does not unassign them from pending work orders. Reassign open work orders before deactivating.
curl --request DELETE \
  --url 'https://your-api.example.com/api/empleados/5' \
  --header 'Authorization: Bearer <token>'

Cargos (Job Positions)

Cargos represent job titles or positions within the organization. Every employee must be assigned a cargo.

Create a cargo

POST /api/empleados/cargo Creates a new job position.
nombre
string
required
Position name (e.g., Técnico de Campo).
descripcion
string
Description of the responsibilities for this position.
curl --request POST \
  --url 'https://your-api.example.com/api/empleados/cargo' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "nombre": "Técnico de Campo",
    "descripcion": "Responsable de instalaciones y mantenimiento en campo"
  }'

List active cargos

GET /api/empleados/cargos Returns all job positions where vigente = true.
curl --request GET \
  --url 'https://your-api.example.com/api/empleados/cargos' \
  --header 'Authorization: Bearer <token>'

Update a cargo

PUT /api/empleados/cargo/{id} Updates an existing job position.
id
number
required
The numeric ID of the cargo to update.
nombre
string
Updated position name.
descripcion
string
Updated description.
curl --request PUT \
  --url 'https://your-api.example.com/api/empleados/cargo/2' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "nombre": "Técnico Senior",
    "descripcion": "Técnico con experiencia en configuraciones avanzadas"
  }'

Delete a cargo

DELETE /api/empleados/cargo/{id} Soft-deletes a job position by setting vigente = false.
id
number
required
The numeric ID of the cargo to deactivate.
Do not deactivate a cargo that still has active employees assigned to it. Reassign those employees first.
curl --request DELETE \
  --url 'https://your-api.example.com/api/empleados/cargo/2' \
  --header 'Authorization: Bearer <token>'

Build docs developers (and LLMs) love