TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Zapiony/PUCE_UZDI_2026/llms.txt
Use this file to discover all available pages before exploring further.
adolescente resource is the core entity of the UZDI system. Every case file, socio-educational measure, and contextual record in the platform is anchored to an adolescent profile. It maps directly to the adolescente.adolescente table in PostgreSQL and is populated via TypeORM with eager-loaded catalogue relations (nationality, civil status, ethnicity, canton, and GDO).
Base path: /api/v1/adolescente
Role requirements
All endpoints are protected by theRolesGuard. The following roles apply across all five operations:
| Operation | Allowed roles |
|---|---|
GET /api/v1/adolescente | ADMINISTRADOR, SUPERADMINISTRADOR, TRABAJADOR_SOCIAL, PSICOLOGO, EDUCADOR, JURIDICO |
GET /api/v1/adolescente/:id | All authenticated users |
POST /api/v1/adolescente | ADMINISTRADOR, SUPERADMINISTRADOR |
PATCH /api/v1/adolescente/:id | ADMINISTRADOR, SUPERADMINISTRADOR |
DELETE /api/v1/adolescente/:id | ADMINISTRADOR, SUPERADMINISTRADOR |
A valid JWT must be sent in every request via the
Authorization: Bearer <token> header. Obtain a token via POST /api/v1/auth/login before calling any endpoint in this group.Endpoints
GET /api/v1/adolescente
Returns the full list of adolescent profiles ordered by insertion time. Catalogue associations (nacionalidad, estadoCivil, etnia, canton, gdo) are resolved eagerly and embedded in each object.
Response — 200 OK
Returns an array ofAdolescente objects.
Internal primary key (
adlc_id in the database).National identity document number. Unique across all profiles. Maximum 20 characters.
Given name(s) of the adolescent. Maximum 100 characters.
Family name(s) of the adolescent. Maximum 100 characters.
Date of birth in
YYYY-MM-DD ISO format.Biological sex code. One of
"M" (Masculino), "F" (Femenino), or "O" (Otro).Educational level name. Free-text, maximum 100 characters. Optional.
Number of children. Integer ≥ 0. Defaults to
0.Recidivism flag. Stored as
CHAR(1) ('V'/'F') in PostgreSQL; serialised as a JSON boolean via the BooleanVF transformer. Defaults to false.Date the adolescent entered the UZDI system in
YYYY-MM-DD format.Indicates whether the adolescent is a child of a person deprived of liberty (PPL). Stored as
CHAR(1) ('V'/'F'). Defaults to false.Free-text observations. Maximum 255 characters. Optional.
Eagerly resolved catalogue reference. Contains
id: number and nombre: string.Eagerly resolved catalogue reference. Contains
id: number and nombre: string.Eagerly resolved catalogue reference. Contains
id: number and nombre: string.Eagerly resolved canton reference. Contains
id: number and nombre: string.Eagerly resolved GDO (Grado de Organización) reference. Contains
id: number and nombre: string. Nullable.Server-set creation timestamp. Not writable via POST or PATCH.
Server-set last-modification timestamp. Not writable via POST or PATCH.
POST /api/v1/adolescente
Creates a new adolescent profile. The request body is validated byValidationPipe (whitelist + forbidNonWhitelisted) and sanitised by SanitizationPipe (DOMPurify). All FK fields must reference existing catalogue rows.
Request body
National identity document number. 1–20 characters, must be unique.
Given name(s). 1–100 characters. HTML is stripped by the sanitisation pipe.
Family name(s). 1–100 characters. HTML is stripped by the sanitisation pipe.
Date of birth. Must be a valid ISO 8601 date string, e.g.
"2007-03-15".Biological sex. Must be exactly one of
"M", "F", or "O".Entry date into the system. Must be a valid ISO 8601 date string, e.g.
"2024-01-10".Foreign key to the
nacionalidad catalogue. Must be an integer.Foreign key to the
estado_civil catalogue. Must be an integer.Foreign key to the
etnia catalogue. Must be an integer.Foreign key to the
canton catalogue. Must be an integer.Educational level name. 0–100 characters. Optional.
Number of children. Integer ≥ 0. Defaults to
0 if omitted.Recidivism flag. Accepts JSON
true or false. Defaults to false if omitted.Child-of-PPL flag. Accepts JSON
true or false. Defaults to false if omitted.Free-text remarks. 0–255 characters. Optional.
Foreign key to the
gdo catalogue. Integer. Optional — omit if no GDO applies.Response — 201 Created
Returns the savedAdolescente object with the generated id, all eagerly resolved catalogue relations, and the server-set fcCrea timestamp. Fields are identical to those described in the GET response above.
GET /api/v1/adolescente/:id
Retrieves a single adolescent profile by its numeric primary key.| Path parameter | Type | Description |
|---|---|---|
id | number | The adlc_id of the adolescent to retrieve. |
Response — 200 OK
Returns the matchingAdolescente object with the same shape as the list response. Returns null if no record is found for the given id (TypeORM findOne behaviour — no 404 is thrown at scaffolding level).
PATCH /api/v1/adolescente/:id
Partially updates an existing adolescent profile. Only fields included in the request body are modified — all other fields retain their current values. The body is validated byUpdateAdolescenteDto, which extends CreateAdolescenteDto with all properties made optional (PartialType).
| Path parameter | Type | Description |
|---|---|---|
id | number | The adlc_id of the adolescent to update. |
Request body
All fields from the POST body are accepted but every field is optional. Send only the fields you wish to change. Validation constraints (lengths, allowed values, FK types) remain identical.Response — 200 OK
Returns a TypeORMUpdateResult object with an affected count indicating how many rows were modified.
DELETE /api/v1/adolescente/:id
Removes an adolescent record from the database. At the current scaffolding stage this executes a hardDELETE via repository.delete(id). A soft-delete / deactivation flag may be introduced when domain business logic is formalised.
| Path parameter | Type | Description |
|---|---|---|
id | number | The adlc_id of the adolescent to remove. |
Response — 200 OK
Returns a TypeORMDeleteResult with an affected count.