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 companies API manages employer profiles on the platform. A company profile stores contact details, branding assets, sector information, and aggregated statistics about the company’s vacancy and hiring activity. Most write operations require the authenticated company’s session cookie.

EmpresaDTO fields

EmpresaDTO extends UsuarioDTO and inherits the base user fields in addition to its own company-specific properties. Inherited from UsuarioDTO
idUsuario
integer
Unique user ID.
nombre
string
required
Company display name. Max 50 characters.
correo
string
required
Contact email address (unique). Max 100 characters.
contrasena
string
Password. Required on creation only. Max 15 characters. Not returned on reads.
telefono
string
Contact phone number (unique). Max 15 characters.
descripcion
string
Company description or about text. 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 company account is active.
roles
string[]
Roles assigned to the user (e.g. ["EMPRESA"]).
comentarioAdmin
string
Administrative note on the account.
EmpresaDTO-specific fields
nit
string
Company tax identification number (NIT, unique). Max 9 characters.
sectorEmpresarial
string
Industry or business sector (e.g. "Tecnología", "Salud"). Max 50 characters.
sitioWeb
string
Company website URL. Max 255 characters.
Path to an optional company presentation video. Max 500 characters.
isVerified
boolean
Whether the company has been verified by a SearchJobs administrator.
numeroVacantes
integer
Total number of vacancies ever created by this company.
numeroVacantesActivas
integer
Number of currently active vacancies.
candidatosAceptados
integer
Total number of candidates accepted across all vacancies.
porcentajeAceptacion
number
Acceptance rate as a percentage (candidatosAceptados / totalApplications * 100).

Endpoints

Get company profile

Returns the profile of a company. When idUsuario is not provided, the ID is extracted from the JWT token so a company can retrieve its own profile.
GET /api/empresas/perfil
Requires a valid jwtToken cookie. If the resolved ID does not correspond to an existing company, the server returns 401 Unauthorized.
Query parameters
idUsuario
integer
User ID of the company to retrieve. When omitted, the authenticated user’s ID is used.
Response
{
  "empresa": {
    "idUsuario": 5,
    "nombre": "Acme Corp",
    "correo": "hr@acme.com",
    "nit": "900123456",
    "sectorEmpresarial": "Tecnología",
    "sitioWeb": "https://acme.com",
    "imagen": "/uploads/5/logo.jpg",
    "isVerified": true,
    "numeroVacantes": 12,
    "numeroVacantesActivas": 4,
    "candidatosAceptados": 8,
    "porcentajeAceptacion": 22.5
  }
}
Error responses:
  • 401 — Token missing, invalid, or does not belong to a registered company.
  • 404 — Company not found for the supplied idUsuario.
Example
curl -X GET "https://api.searchjobs.dev/api/empresas/perfil" \
  -H "Cookie: jwtToken=<company-token>"
Viewing another company’s profile by ID:
curl -X GET "https://api.searchjobs.dev/api/empresas/perfil?idUsuario=5" \
  -H "Cookie: jwtToken=<company-token>"

Create company

Registers a new company account in the system. Typically called during the sign-up flow.
POST /api/empresas/add
Request bodyapplication/jsonEmpresaDTO Required fields: nombre, correo, imagen.
{
  "nombre": "Acme Corp",
  "correo": "hr@acme.com",
  "contrasena": "securepass",
  "imagen": "/uploads/5/logo.jpg",
  "nit": "900123456",
  "sectorEmpresarial": "Tecnología",
  "sitioWeb": "https://acme.com",
  "descripcion": "Empresa de software especializada en soluciones cloud."
}
Response
{
  "status": 201,
  "mensaje": "Empresa creada con exito!"
}
On validation error:
{
  "status": 400
}

Get company by ID

Returns the raw EmpresaDTO for a specific company. Used for pre-populating edit forms.
GET /api/empresas/edit/{idEmpresa}
Path parameters
idEmpresa
integer
required
The user ID of the company to retrieve.
ResponseEmpresaDTO object. Example
curl -X GET "https://api.searchjobs.dev/api/empresas/edit/5" \
  -H "Cookie: jwtToken=<company-token>"

Update company profile

Updates a company’s information, optionally replacing the profile image. Uses multipart/form-data to support file uploads. The server identifies the company from the JWT token, not from the path variable.
PUT /api/empresas/edit/{idUsuario}
Requires a valid jwtToken cookie. The user ID is resolved from the token — the {idUsuario} path variable is present for routing but the authoritative source is the token claim.
Path parameters
idUsuario
integer
required
User ID of the company to update.
Request partsmultipart/form-data
empresa
JSON (EmpresaDTO)
required
Updated company data serialised as JSON. Validated against the update group constraints (NIT uniqueness check is skipped for the current owner).
img
file
Optional new profile image. When provided, the previous image file is deleted and replaced.
Response
{
  "status": 200,
  "mensaje": "Candidato actualizado correctamente."
}
The success message reads “Candidato actualizado correctamente.” — this is a known copy-paste issue in the source code. The company profile was still updated correctly despite the message text.
On image upload error:
{
  "status": 400,
  "mensaje": "Error al guardar la imagen."
}
On server error:
{
  "status": 400,
  "mensaje": "Error al actualizar el candidato."
}
Example
curl -X PUT "https://api.searchjobs.dev/api/empresas/edit/5" \
  -H "Cookie: jwtToken=<company-token>" \
  -F 'empresa={"nombre":"Acme Corp","correo":"hr@acme.com","nit":"900123456","sectorEmpresarial":"Tecnología","sitioWeb":"https://acme.com","imagen":"/uploads/5/logo.jpg"};type=application/json' \
  -F "img=@nuevo_logo.png"

Delete company

Permanently removes a company and its associated data from the system.
DELETE /api/empresas/delete/{idEmpresa}
Path parameters
idEmpresa
integer
required
ID of the company to delete.
Response204 No Content. Example
curl -X DELETE "https://api.searchjobs.dev/api/empresas/delete/5" \
  -H "Cookie: jwtToken=<admin-token>"

Build docs developers (and LLMs) love