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.
Once an appeal has been registered, this endpoint retrieves its complete record by folio number. The response is a fully hydrated object that includes every scalar field on the appeal, all associated catalog lookups (materia, juzgado, magistrado, etc.), and the nested relaciones array which carries the parties and offenses for each case relation. Use the folioOficialia value returned by POST /api/apelaciones to construct the query string.
GET /api/apelaciones/detalle
Authentication
A valid Bearer JWT is required. Requests without an Authorization: Bearer <token> header return 401 Unauthorized .
Query Parameters
The official folio number of the appeal to retrieve (e.g. "2024-PCF-001"). This is the value returned as data.folioOficialia when the appeal was created. Omitting this parameter returns a 400 error.
Response — 200 OK
The response data object maps directly to the ApelacionDetailDTO interface. All catalog reference fields follow the CatalogoBase shape: { id: number, descripcion: string }. Fields that are not applicable to the appeal’s matter type (e.g. catJuzgado for an indígena appeal) will be null.
The full appeal record. Show Top-level appeal fields
Internal database ID of the appeal record.
The official folio assigned at creation (e.g. "2024-PCF-001").
The toca (appeal docket) folio, assigned after the appeal is formally opened. May be null if not yet assigned.
Office correspondence folio. Present only for penal appeals where it was provided.
Originating case file number from the court of first instance. Penal only.
Accumulated case file identifier. Penal only, max 10 characters.
Number of pages submitted with the appeal brief. Penal only.
Whether the appeal is a repositioning (true) or a first-time appeal (false).
ISO 8601 date of the originating court order. Penal only.
Free-text observations entered at registration. Penal only.
Subject matter description. Indígena only.
Location where the events took place. Indígena only.
Show Catalog reference fields (CatalogoBase | null)
The matter type of this appeal (e.g. { id: 5, descripcion: "Penal" }).
Top-level appeal catalog entry (e.g. “Apelación de sentencia”). Penal only.
Appeal sub-type. Penal only.
Type of written brief filed. Penal only.
Originating court. Penal only.
Municipality. Indígena only.
Locality within the municipality. Indígena only.
Ethnic group. Indígena only.
Show relaciones — case relations array
Array of case relations. Each relation pairs an offended party with a defendant and lists the associated offenses. Internal ID of the relation record.
data.relaciones[].ofendido
The offended party. Whether the party is a minor.
Party type catalog entry.
data.relaciones[].procesado
The defendant. Same shape as ofendido.
data.relaciones[].delitosRelacion
Offenses linked to this relation. Show DelitosRelacion item fields
Internal offense-relation record ID.
Offense catalog entry ({ id, descripcion }).
Error Responses
HTTP Status Reason Description 400 Bad RequestfolioOficialia not providedThe query string is missing the folioOficialia parameter. 401 UnauthorizedMissing or invalid JWT Authentication failed. 404 Not FoundAppeal not found No appeal with the given folio exists in the database.
Example Request
curl 'http://localhost:4000/api/apelaciones/detalle?folioOficialia=2024-PCF-001' \
-H 'Authorization: Bearer <token>'
Example Response
{
"status" : "success" ,
"data" : {
"id" : 87 ,
"folioOficialia" : "2024-PCF-001" ,
"folioApelacion" : "TOCA-2024-012" ,
"folioOficio" : "OF-2024-001" ,
"expedienteCausa" : "CAUSA-001" ,
"expedienteAcumulado" : null ,
"fojas" : 15 ,
"esReposicion" : false ,
"fechaAuto" : "2024-03-10T00:00:00.000Z" ,
"observaciones" : null ,
"asunto" : null ,
"lugarHechos" : null ,
"catMateria" : { "id" : 5 , "descripcion" : "Penal" },
"catApelacion" : { "id" : 1 , "descripcion" : "Apelación de sentencia" },
"tipoApelacion" : { "id" : 1 , "descripcion" : "Apelación principal" },
"tipoEscrito" : { "id" : 1 , "descripcion" : "Escrito de apelación" },
"catJuzgado" : { "id" : 2 , "descripcion" : "Juzgado Segundo Penal" },
"catMunicipio" : null ,
"catLocalidad" : null ,
"catEtnia" : null ,
"catMagistrado" : { "id" : 1 , "descripcion" : "Lic. Martínez Ruiz" },
"relaciones" : [
{
"id" : 201 ,
"ofendido" : {
"id" : 301 ,
"nombre" : "María López" ,
"direccion" : null ,
"menorEdad" : false ,
"sexo" : { "id" : 2 , "descripcion" : "Femenino" },
"tipoParte" : { "id" : 1 , "descripcion" : "Ofendido" }
},
"procesado" : {
"id" : 302 ,
"nombre" : "Juan Pérez" ,
"direccion" : "Calle Reforma 123" ,
"menorEdad" : false ,
"sexo" : { "id" : 1 , "descripcion" : "Masculino" },
"tipoParte" : { "id" : 2 , "descripcion" : "Procesado" }
},
"delitosRelacion" : [
{
"id" : 401 ,
"delito" : { "id" : 4 , "descripcion" : "Robo con violencia" }
}
]
}
]
}
}
The folioApelacion (toca docket number) differs from folioOficialia. folioOficialia is generated immediately on registration; folioApelacion is assigned later during the formal docket-opening step and may be null for newly created appeals.