Skip to main content
GET
/
obras
/
:id
Get Public Work
curl --request GET \
  --url https://api.example.com/obras/:id \
  --header 'Authorization: <authorization>'
{
  "id": 123,
  "numeroObra": 123,
  "claveUnica": "<string>",
  "nombre": "<string>",
  "descripcion": "<string>",
  "monto": 123,
  "ejercicioFiscalId": 123,
  "ejercicioFiscal": {},
  "dependenciaId": 123,
  "dependencia": {},
  "municipioId": 123,
  "municipio": {},
  "tipoProyectoId": 123,
  "tipoProyecto": {},
  "estatusObraId": 123,
  "estatusObra": {},
  "ubicaciones": [
    {
      "id": 123,
      "municipioId": 123,
      "municipio": {},
      "direccion": "<string>",
      "localidadReferencia": "<string>",
      "referenciaLugar": "<string>",
      "tipoGeometria": "<string>",
      "geometriaJson": {},
      "orden": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LizandroCanul/back_sdo/llms.txt

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

Retrieves detailed information about a specific public work (obra) by its ID.

Authentication

This endpoint requires a valid JWT token. Both admin and user roles can access this endpoint.

Headers

Authorization
string
required
Bearer token for authentication
Authorization: Bearer YOUR_JWT_TOKEN

Path Parameters

id
number
required
The unique identifier of the obra to retrieve

Response

id
number
Unique identifier for the obra
numeroObra
number
Sequential obra number within the fiscal year (auto-generated)
claveUnica
string
Unique key for the obra (max 50 characters)
nombre
string
Name of the public work (max 255 characters)
descripcion
string
Detailed description of the obra
monto
number
Budget amount (decimal with 2 decimal places)
ejercicioFiscalId
number
Fiscal year ID
ejercicioFiscal
object
Fiscal year details object
dependenciaId
number
Department/dependency ID
dependencia
object
Department details object
municipioId
number
Municipality ID
municipio
object
Municipality details object with name and code
tipoProyectoId
number
Project type ID (nullable)
tipoProyecto
object
Project type details object
estatusObraId
number
Work status ID
estatusObra
object
Work status details object
ubicaciones
array
Array of location objects associated with this obra, sorted by orden ascending
id
number
Location ID
municipioId
number
Municipality ID for this location
municipio
object
Municipality details for this specific location
direccion
string
Street address
localidadReferencia
string
Locality reference (nullable)
referenciaLugar
string
Place reference (nullable)
tipoGeometria
string
Geometry type: PUNTO, RUTA, or POLIGONO
geometriaJson
object
GeoJSON geometry data
orden
number
Display order

Example Request

curl -X GET "https://api.yucatan.gob.mx/obras/1" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Example Response

{
  "id": 1,
  "numeroObra": 1,
  "claveUnica": "OBRA-2024-001",
  "nombre": "Construcción de Escuela Primaria",
  "descripcion": "Construcción de escuela primaria con 6 aulas, áreas verdes y cancha deportiva",
  "monto": 2500000.00,
  "ejercicioFiscalId": 1,
  "ejercicioFiscal": {
    "id": 1,
    "anio": 2024,
    "nombre": "Ejercicio Fiscal 2024"
  },
  "dependenciaId": 1,
  "dependencia": {
    "id": 1,
    "nombre": "Secretaría de Obras Públicas",
    "siglas": "SOP"
  },
  "municipioId": 1,
  "municipio": {
    "id": 1,
    "nombre": "Mérida",
    "codigo": "001"
  },
  "tipoProyectoId": 1,
  "tipoProyecto": {
    "id": 1,
    "nombre": "Educación",
    "descripcion": "Proyectos relacionados con infraestructura educativa"
  },
  "estatusObraId": 1,
  "estatusObra": {
    "id": 1,
    "nombre": "En Proceso",
    "descripcion": "La obra está actualmente en construcción"
  },
  "ubicaciones": [
    {
      "id": 1,
      "municipioId": 1,
      "municipio": {
        "id": 1,
        "nombre": "Mérida",
        "codigo": "001"
      },
      "direccion": "Calle 60 x 59, Col. Centro",
      "localidadReferencia": "Centro",
      "referenciaLugar": "Cerca del parque principal",
      "tipoGeometria": "PUNTO",
      "geometriaJson": {
        "type": "Point",
        "coordinates": [-89.6247, 20.9674]
      },
      "orden": 0
    }
  ]
}

Error Responses

401 Unauthorized

{
  "statusCode": 401,
  "message": "Unauthorized"
}
Returned when the JWT token is missing, invalid, or expired.

404 Not Found

{
  "statusCode": 404,
  "message": "Obra 999 no encontrada.",
  "error": "Not Found"
}
Returned when the obra with the specified ID does not exist.

Build docs developers (and LLMs) love