The appeals module exposes three catalog endpoints that power the registration form dropdowns. The primary endpoint returns all catalogs needed to populate the form for a given matter type, while two auxiliary endpoints let the UI lazily load localities and appeal sub-types after the user makes an upstream selection. All three endpoints require a valid Bearer JWT.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.
GET /api/apelaciones/catalogos
Returns all catalog lists required to render the appeal registration form, pre-filtered bymateria. Common catalogs (materias, magistrados, delitos, sexos, tiposPartes, tiposEscritos) are always included. Penal-specific catalogs (apelaciones, tiposApelaciones, juzgados) are included only when materia=penal. Indigenous-specific catalogs (municipios, etnias) are included only when materia=indigena. Every response also contains a folioTentativo — a tentative folio string generated by the PA_INS_PCF_FolioTramite stored procedure so the UI can display it before the record is saved.
Authentication
Query Parameters
The matter type to filter catalogs by. Must be exactly
penal (idMateria 5) or indigena (idMateria 6). Any other value returns a 400 validation error.Response — 200 OK
Always
"success" on a successful response.Human-readable confirmation, e.g.
"Catálogos cargados correctamente".The catalog payload. All
CatalogoBase items share the shape { id: number, descripcion: string }.Error Responses
| HTTP Status | Code / Reason | Description |
|---|---|---|
400 Bad Request | Invalid materia value | materia was not penal or indigena. |
401 Unauthorized | Missing or invalid JWT | No Authorization header, expired token, or invalid signature. |
Example Request
Example Response
GET /api/apelaciones/:idMunicipio/localidades
Returns the localities that belong to a given municipality. This endpoint is intended to be called lazily — after the user selects a municipality from themunicipios catalog returned by /catalogos?materia=indigena.
Authentication
Required. Bearer JWT.Path Parameters
The numeric ID of the municipality whose localities should be returned. Must be a valid integer; non-numeric values trigger a 400 error.
Response — 200 OK
"success""Catálogo de Localidades cargados correctamente"Array of locality objects belonging to the requested municipality. Each item has
id (number) and descripcion (string).Error Responses
| HTTP Status | Reason | Description |
|---|---|---|
400 Bad Request | Non-numeric or missing idMunicipio | Path parameter could not be parsed as an integer. |
401 Unauthorized | Missing or invalid JWT | Authentication failed. |
404 Not Found | Municipality not found | No municipality with the given ID exists in the catalog. |
Example Request
Example Response
GET /api/apelaciones/:idApelacion/tipos-apelacion
Returns the sub-types that correspond to a top-level appeal catalog entry. Call this endpoint after the user picks an item from theapelaciones list (penal path only) to populate the tipoApelacion dropdown.
Authentication
Required. Bearer JWT.Path Parameters
The numeric ID of the top-level appeal catalog entry (
CatalogoBase.id from data.apelaciones). Must be a valid integer; non-numeric values trigger a 400 error.Response — 200 OK
"success""Catálogo de tipo apelación cargados correctamente"Array of appeal sub-types. Each item has
id (number) and descripcion (string). Pass the selected item’s id as idTipoApelacion when creating an appeal.Error Responses
| HTTP Status | Reason | Description |
|---|---|---|
400 Bad Request | Non-numeric or missing idApelacion | Path parameter could not be parsed as an integer. |
401 Unauthorized | Missing or invalid JWT | Authentication failed. |
404 Not Found | Catalog entry not found | No appeal catalog entry with the given ID exists. |