{
    "openapi": "3.1.0",
    "info": {
        "title": "Grupo URSA Public API",
        "version": "1.0.0",
        "description": "API REST v1 pública, informativa y de solo lectura. No confirma inventario ni ejecuta operaciones inmobiliarias.",
        "contact": {
            "name": "Grupo URSA",
            "url": "https://www.grupoursa.com/contacto/",
            "email": "contacto@grupoursa.com.mx"
        }
    },
    "servers": [
        {
            "url": "https://www.grupoursa.com/api/v1",
            "description": "Producción v1"
        }
    ],
    "tags": [
        {
            "name": "Discovery",
            "description": "Descubrimiento de información pública y rutas canónicas."
        }
    ],
    "paths": {
        "/site": {
            "get": {
                "operationId": "getSiteIdentity",
                "tags": [
                    "Discovery"
                ],
                "summary": "Obtener la identidad pública de Grupo URSA",
                "description": "Devuelve nombre, mercado, audiencias y contacto.",
                "responses": {
                    "200": {
                        "description": "Respuesta correcta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "name",
                                        "url",
                                        "market",
                                        "audiences",
                                        "contact",
                                        "lastUpdated"
                                    ],
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "market": {
                                            "type": "string"
                                        },
                                        "audiences": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "contact": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "lastUpdated": {
                                            "type": "string",
                                            "format": "date"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/resources": {
            "get": {
                "operationId": "listPublicResources",
                "tags": [
                    "Discovery"
                ],
                "summary": "Listar recursos inmobiliarios públicos",
                "description": "Devuelve rutas canónicas para catálogo, bodegas, tierra, servicios y preguntas frecuentes.",
                "responses": {
                    "200": {
                        "description": "Respuesta correcta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string",
                                        "format": "uri"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/search-guide": {
            "get": {
                "operationId": "getPropertySearchGuide",
                "tags": [
                    "Discovery"
                ],
                "summary": "Obtener una guía de búsqueda inmobiliaria",
                "description": "Indica datos iniciales, verificaciones necesarias y siguiente paso humano.",
                "responses": {
                    "200": {
                        "description": "Respuesta correcta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "purpose",
                                        "recommendedInputs",
                                        "verificationRequired",
                                        "nextStep"
                                    ],
                                    "properties": {
                                        "purpose": {
                                            "type": "string"
                                        },
                                        "recommendedInputs": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "verificationRequired": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "nextStep": {
                                            "type": "string",
                                            "format": "uri"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error tipado RFC 9457",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "type",
                                        "title",
                                        "status",
                                        "detail",
                                        "instance",
                                        "code",
                                        "resolution"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "detail": {
                                            "type": "string"
                                        },
                                        "instance": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "resolution": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "SiteIdentity": {
                "type": "object",
                "required": [
                    "name",
                    "url",
                    "market",
                    "audiences",
                    "contact",
                    "lastUpdated"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "market": {
                        "type": "string"
                    },
                    "audiences": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "contact": {
                        "type": "string",
                        "format": "uri"
                    },
                    "lastUpdated": {
                        "type": "string",
                        "format": "date"
                    }
                }
            },
            "ResourceMap": {
                "type": "object",
                "additionalProperties": {
                    "type": "string",
                    "format": "uri"
                }
            },
            "SearchGuide": {
                "type": "object",
                "required": [
                    "purpose",
                    "recommendedInputs",
                    "verificationRequired",
                    "nextStep"
                ],
                "properties": {
                    "purpose": {
                        "type": "string"
                    },
                    "recommendedInputs": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "verificationRequired": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "nextStep": {
                        "type": "string",
                        "format": "uri"
                    }
                }
            },
            "Problem": {
                "type": "object",
                "required": [
                    "type",
                    "title",
                    "status",
                    "detail",
                    "instance",
                    "code",
                    "resolution"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "format": "uri"
                    },
                    "title": {
                        "type": "string"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "detail": {
                        "type": "string"
                    },
                    "instance": {
                        "type": "string"
                    },
                    "code": {
                        "type": "string"
                    },
                    "resolution": {
                        "type": "string"
                    }
                }
            }
        },
        "responses": {
            "Problem": {
                "description": "Error tipado RFC 9457",
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "type": "object",
                            "required": [
                                "type",
                                "title",
                                "status",
                                "detail",
                                "instance",
                                "code",
                                "resolution"
                            ],
                            "properties": {
                                "type": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "title": {
                                    "type": "string"
                                },
                                "status": {
                                    "type": "integer"
                                },
                                "detail": {
                                    "type": "string"
                                },
                                "instance": {
                                    "type": "string"
                                },
                                "code": {
                                    "type": "string"
                                },
                                "resolution": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "externalDocs": {
        "description": "Documentación y política de versión/deprecación",
        "url": "https://www.grupoursa.com/developers/"
    }
}
