Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BladimirGS/judicial-backend/llms.txt

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

The flat statistical report endpoint returns a paginated, row-level list of appeal statistics produced by the PA_SEL_PCF_EstadisticaApelaciones stored procedure. Each record in the response corresponds to a single appeal event enriched with reception month, entry month, and sala assignment data. This projection is useful for raw data analysis, audit exports, and feeding tabular reports where every individual record is required.
At least one filter parameter must be provided. Requests without any of idSala, idNomenclatura, idApelacion, fechaInicio, or fechaFin will receive a 400 Bad Request response. Filter validation is enforced by EstadisticaFiltrosDTO.tieneFiltros().

Endpoint

GET /api/estadisticas/plano
Authentication: Authorization: Bearer <token>

Query parameters

page
integer
default:1
Page number for pagination. Starts at 1.
limit
integer
default:10
Number of statistical records per page.
idSala
integer
Filter results to a specific sala (court division). Accepts the numeric ID of the sala.
idNomenclatura
integer
Filter results to a specific nomenclatura classification. Accepts the numeric ID of the nomenclatura.
idApelacion
integer
Filter results to a specific appeal type. Accepts the numeric ID of the appeal type.
fechaInicio
string (date)
Start of the date range filter applied to appeal reception timestamps. ISO 8601 format: YYYY-MM-DD.
fechaFin
string (date)
End of the date range filter applied to appeal reception timestamps. ISO 8601 format: YYYY-MM-DD.

Response 200

status
string
required
"success"
message
string
required
Human-readable result description, e.g. "Reporte plano obtenido exitosamente".
data
object
required
Paginated result envelope.

EstadisticaDto fields

idApelacion
integer
required
Numeric ID of the appeal type associated with this record.
sala
string
required
Name of the sala handling this appeal (e.g. "Sala Penal 1").
tramite
string
required
Internal processing code for the appeal.
folioOficialia
string
required
Officialia folio identifier for this appeal record.
nomenclatura
string
required
Nomenclature classification label.
folioToca
string
required
Toca (appeal folio) number assigned to the case.
apelacion
string
required
Name of the appeal type.
tipoApelacion
string | null
Appeal sub-type classification. May be null if not categorized.
tipoEscrito
string
required
Type of the written submission filed (e.g. "Escrito de apelación").
fechaHoraRecepcion
string (date-time)
required
Full ISO 8601 timestamp of when the appeal was received by the court.
fechaHoraIngresoJuzgado
string (date-time) | null
Full ISO 8601 timestamp of when the appeal was entered into the juzgado system. May be null for legacy records.
juzgadoOrigen
string
required
Name of the originating trial court.
mesRecep
string
required
Human-readable month name of the reception date (e.g. "Enero", "Febrero").
añoRecep
integer
required
Four-digit year of the reception date (e.g. 2024).
mesIngreso
string | null
Human-readable month name of the juzgado entry date. null if fechaHoraIngresoJuzgado is absent.
añoIngreso
integer | null
Four-digit year of the juzgado entry date. null if fechaHoraIngresoJuzgado is absent.

Error responses

StatusMeaning
400 Bad RequestNo valid filter parameters were provided (beyond pagination).
401 UnauthorizedMissing or invalid Authorization bearer token.

Example

Retrieve flat statistics for a sala and year

curl -G http://localhost:4000/api/estadisticas/plano \
  -H 'Authorization: Bearer <token>' \
  --data-urlencode 'idSala=1' \
  --data-urlencode 'fechaInicio=2024-01-01' \
  --data-urlencode 'fechaFin=2024-12-31' \
  --data-urlencode 'page=1' \
  --data-urlencode 'limit=50'

Filter by nomenclatura and appeal type

curl -G http://localhost:4000/api/estadisticas/plano \
  -H 'Authorization: Bearer <token>' \
  --data-urlencode 'idNomenclatura=3' \
  --data-urlencode 'idApelacion=7' \
  --data-urlencode 'page=1' \
  --data-urlencode 'limit=10'

Build docs developers (and LLMs) love