Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Esteban-Mendez-j/Proyecto-Docker/llms.txt

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

The candidates API manages job-seeker profiles on the platform. Candidates store their personal details, education level, skills, work experience, and a CV document that is required before applying to any vacancy. Companies can also retrieve a candidate’s profile when reviewing an application.

CandidatoDTO fields

CandidatoDTO extends UsuarioDTO and inherits the base user fields listed below in addition to its own. Inherited from UsuarioDTO
idUsuario
integer
Unique user ID.
nombre
string
required
First name. Max 50 characters.
correo
string
required
Email address (unique). Max 100 characters.
contrasena
string
Password. Required on creation only. Max 15 characters. Not returned on reads.
telefono
string
Phone number (unique). Max 15 characters.
descripcion
string
Personal bio or summary. Max 400 characters.
imagen
string
Profile image file path. Required on creation. Max 255 characters.
fechaRegistro
string (ISO date)
Account registration date.
fechaInicioSesion
string (ISO date)
Date of last login.
isActive
boolean
Whether the account is active.
roles
string[]
Roles assigned to the user (e.g. ["CANDIDATO"]).
comentarioAdmin
string
Administrative note on the account.
CandidatoDTO-specific fields
apellido
string
required
Last name. Max 20 characters.
identificacion
string
National identification number (unique). Max 11 characters.
nivelEducativo
string
Highest education level (e.g. "Universitario", "Técnico"). Max 30 characters.
experiencia
string
Years of professional experience (e.g. "3"). Max 4 characters.
aptitudes
string[]
List of skills. Used by the ML model to rank vacancy matches.
curriculo
string
File path to the uploaded CV (PDF). Must be present before applying to any vacancy. Max 225 characters.
Path to an optional personal presentation video. Max 255 characters.

Endpoints

Get candidate profile

Returns the full profile of a candidate, including their education history and work history. When idUsuario is not supplied, the ID is extracted from the JWT token. Companies can pass nPostulacion to view the profile of an applicant — the server verifies that the application belongs to the specified user before returning data.
GET /api/candidatos/perfil
The jwtToken cookie is required when idUsuario is not provided in the query string. If neither is present the server returns 401 Unauthorized.
Query parameters
idUsuario
integer
User ID of the candidate to retrieve. When omitted, the ID is read from the JWT token.
nPostulacion
integer
Application ID. When provided along with a company token, the server validates that the application belongs to the candidate before serving the profile.
Response
{
  "candidato": { /* CandidatoDTO */ },
  "estudios": [ /* EstudioDTO[] */ ],
  "historialLaboral": [ /* HistorialLaboralDTO[] */ ]
}
Error responses:
  • 401 — No session token provided or token expired.
  • 403 — Company tried to access a profile not linked to one of their applications.
  • 404 — Candidate not found.
Example
curl -X GET "https://api.searchjobs.dev/api/candidatos/perfil" \
  -H "Cookie: jwtToken=<candidate-token>"
Viewing an applicant’s profile as a company:
curl -X GET "https://api.searchjobs.dev/api/candidatos/perfil?idUsuario=3&nPostulacion=12" \
  -H "Cookie: jwtToken=<company-token>"

Create candidate profile

Creates a new candidate record. Typically called automatically during the registration flow.
POST /api/candidatos/add
Request bodyapplication/jsonCandidatoDTO Required fields: nombre, apellido, correo, imagen.
{
  "nombre": "Ana",
  "apellido": "Torres",
  "correo": "ana.torres@email.com",
  "contrasena": "secret123",
  "imagen": "/uploads/usuarios/3/foto.jpg",
  "identificacion": "12345678901",
  "nivelEducativo": "Universitario",
  "experiencia": "2",
  "aptitudes": ["Java", "Spring Boot", "SQL"]
}
Response
{
  "status": 201,
  "mensaje": "Usuario creado con exito!"
}

Get candidate by ID

Returns the raw CandidatoDTO for a specific user ID. Used for populating edit forms.
GET /api/candidatos/edit/{idUsuario}
Path parameters
idUsuario
integer
required
User ID of the candidate.
ResponseCandidatoDTO object.

Update candidate profile

Updates candidate data including an optional profile image and a required CV file. Uses multipart/form-data to support file uploads. If an image or CV already exists, the server deletes the old file before saving the new one.
PUT /api/candidatos/edit/{idUsuario}
Path parameters
idUsuario
integer
required
User ID of the candidate to update. Must match candidatoDTO.idUsuario in the request body.
Request partsmultipart/form-data
candidato
JSON (CandidatoDTO)
required
Updated candidate data serialised as JSON.
img
file
Optional new profile image. When provided, replaces any existing image.
pdf
file
required
The candidate’s CV in PDF format. Must be provided on every update call.
Response
{
  "status": 200,
  "mensaje": "Candidato actualizado correctamente."
}
On error:
{
  "status": 400,
  "mensaje": "Error al guardar la imagen."
}
Example
curl -X PUT "https://api.searchjobs.dev/api/candidatos/edit/3" \
  -H "Cookie: jwtToken=<candidate-token>" \
  -F 'candidato={"idUsuario":3,"nombre":"Ana","apellido":"Torres","correo":"ana@email.com","imagen":"/uploads/3/foto.jpg","nivelEducativo":"Universitario","experiencia":"3","aptitudes":["Java","Docker"]};type=application/json' \
  -F "img=@nueva_foto.jpg" \
  -F "pdf=@cv_ana.pdf"

Delete candidate

Permanently removes a candidate record from the system.
DELETE /api/candidatos/delete/{idCandidato}
Path parameters
idCandidato
integer
required
ID of the candidate to delete.
Response204 No Content. Example
curl -X DELETE "https://api.searchjobs.dev/api/candidatos/delete/3" \
  -H "Cookie: jwtToken=<admin-token>"

Build docs developers (and LLMs) love