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 search (/api/busquedas/plano) returns Apelacion records in a streamlined scalar projection. Unlike the full-mode search, flat results do not include the nested partes (parties) or anexos (annexes) arrays. This makes the endpoint significantly faster for bulk queries, dashboard counts, and export operations where relational detail is not needed. All endpoints require a valid JWT bearer token.
Prefer flat mode when building data grids, generating summary exports, or querying large date ranges. Switch to full mode (GET /api/busquedas) only when party or annex data is specifically required.

Endpoints overview

MethodPathDescription
GET/api/busquedas/planoSearch appeals in flat projection with filters and pagination
GET/api/busquedas/plano/exportar-excelExport flat results as an Excel file
GET/api/busquedas/plano/exportar-pdfExport flat results as a PDF file

GET /api/busquedas/plano

Returns a paginated list of ApelacionPlanoDTO records. Each record is a flat object with all scalar fields of an appeal but without nested partes or anexos. Authentication: Authorization: Bearer <token>
At least one search filter (beyond page and limit) must be provided. Requests that supply only pagination parameters — or no parameters at all — will receive a 400 Bad Request response. The filter set is validated with PlanoFiltrosDTO.tieneFiltros().

Query parameters

page
integer
default:1
Page number for pagination. Starts at 1.
limit
integer
default:10
Number of results per page.
folioOficialia
string
Filter by the officialia folio identifier (e.g. "FOL-001").
idSala
integer
Filter by sala ID. Use the catalog values returned by GET /api/busquedas/filtros.
idNomenclatura
integer
Filter by nomenclatura ID. Use the catalog values returned by GET /api/busquedas/filtros.
idApelacion
integer
Filter by appeal type ID. Use the catalog values returned by GET /api/busquedas/filtros.
folioApelacion
string
Filter by appeal folio / toca number (e.g. "TOCA-2024-001").
expedienteCausa
string
Filter by the originating criminal cause docket number.
observacion
string
Filter by free-text observations recorded at intake. This filter is exclusive to flat mode and is not available in the full-mode search.
fechaInicio
string (date)
Start of the reception date range. ISO 8601 format: YYYY-MM-DD.
fechaFin
string (date)
End of the reception date range. ISO 8601 format: YYYY-MM-DD.

Response 200

status
string
required
"success"
message
string
required
Human-readable result message, e.g. "Operación exitosa".
data
object
required
Paginated result envelope.

ApelacionPlanoDTO fields

Each object in the planos array is a flat record with no nested arrays.
id
integer
required
Internal primary key of the appeal record.
folioOficialia
string | null
Officialia folio identifier assigned at intake.
folioApelacion
string | null
Appeal folio / toca number assigned after acceptance.
folioApelacionAnterior
string | null
Previous toca folio if this is a re-filed or related appeal.
folioOficio
string | null
Official correspondence folio number.
tramite
string
required
Internal processing code.
fojas
integer | null
Number of pages (fojas) in the dossier.
expedienteAcumulado
string | null
Accumulated docket identifier when multiple cases are joined.
esReposicion
boolean | null
Whether this appeal is a reposition of a prior proceeding.
expedienteCausa
string | null
Originating criminal cause docket number.
fechaAuto
string (date) | null
Date of the judicial auto (ruling). Format: YYYY-MM-DD.
fechaHoraRecepcion
string (date-time) | null
Full timestamp of when the appeal was received. Format: ISO 8601.
fechaHoraIngresoJuz
string (date-time) | null
Full timestamp of when the appeal entered the court system. Format: ISO 8601.
observaciones
string | null
Free-text observations recorded at intake.
asunto
string | null
Subject matter description of the appeal.
lugarHechos
string | null
Geographic location where the underlying criminal act occurred.
sala
string | null
Name of the sala currently handling the appeal.
salaAnterior
string | null
Name of the sala that previously handled this case.
juzgado
string | null
Name of the originating trial court.
magistrado
string | null
Name of the magistrate assigned to the appeal.
nomenclatura
string | null
Nomenclature classification label.
apelacion
string | null
Appeal type name (descriptive label).
tipoApelacion
string | null
Appeal sub-type classification.
tipoEscrito
string | null
Type of the written submission filed.
The planos response intentionally omits the partes and anexos arrays present in the full ApelacionDTO. If you need party or annex data, use GET /api/busquedas instead.

Error responses

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

GET /api/busquedas/plano/exportar-excel

Generates and streams a binary Excel workbook (.xlsx) containing all flat records matching the supplied filters. Pagination parameters are not applicable — the export contains the full result set. Authentication: Authorization: Bearer <token>

Query parameters

Same filter parameters as GET /api/busquedas/plano (excluding page and limit): folioOficialia, idSala, idNomenclatura, idApelacion, folioApelacion, expedienteCausa, observacion, fechaInicio, fechaFin.

Response 200

  • Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • Content-Disposition: attachment; filename=planos.xlsx
  • Body: Binary Excel file stream.

Error responses

StatusMeaning
401 UnauthorizedMissing or invalid Authorization bearer token.

GET /api/busquedas/plano/exportar-pdf

Generates and streams a binary PDF document containing all flat records matching the supplied filters. Authentication: Authorization: Bearer <token>

Query parameters

Same filter parameters as GET /api/busquedas/plano/exportar-excel.

Response 200

  • Content-Type: application/pdf
  • Content-Disposition: attachment; filename=planos.pdf
  • Body: Binary PDF file stream.

Error responses

StatusMeaning
401 UnauthorizedMissing or invalid Authorization bearer token.

Examples

Search flat records by sala and date range

curl -G http://localhost:4000/api/busquedas/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 observation text

curl -G http://localhost:4000/api/busquedas/plano \
  -H 'Authorization: Bearer <token>' \
  --data-urlencode 'observacion=urgente' \
  --data-urlencode 'page=1' \
  --data-urlencode 'limit=10'

Export flat results to Excel

curl -G http://localhost:4000/api/busquedas/plano/exportar-excel \
  -H 'Authorization: Bearer <token>' \
  --data-urlencode 'idSala=1' \
  --data-urlencode 'fechaInicio=2024-01-01' \
  --data-urlencode 'fechaFin=2024-12-31' \
  -o planos.xlsx

Export flat results to PDF

curl -G http://localhost:4000/api/busquedas/plano/exportar-pdf \
  -H 'Authorization: Bearer <token>' \
  --data-urlencode 'expedienteCausa=CAUSA-2024-100' \
  -o planos.pdf

Build docs developers (and LLMs) love