{
  "openapi": "3.1.0",
  "info": {
    "title": "LaserCurativo Public API",
    "version": "1.0.0",
    "summary": "API pública somente leitura da LaserCurativo (tratamento de feridas com laserterapia em São Paulo).",
    "description": "API pública, sem autenticação, mantida pela LaserCurativo — clínica de tratamento de feridas com laserterapia de baixa intensidade (fotobiomodulação) em São Paulo, responsável técnica Simone Frigo (COREN-SP 251336). Todos os endpoints são GET, retornam JSON UTF-8 e são pensados para consumo por agentes de IA e function calling. Erros são sempre JSON estruturado com `error.code`, `error.message` e `error.hint`. Documentação para LLMs: https://www.lasercurativo.com.br/llms.txt",
    "contact": {
      "name": "LaserCurativo",
      "url": "https://www.lasercurativo.com.br/",
      "email": "lasercurativo@gmail.com"
    },
    "license": {
      "name": "Uso público com atribuição a LaserCurativo",
      "url": "https://www.lasercurativo.com.br/"
    }
  },
  "servers": [
    {
      "url": "https://www.lasercurativo.com.br/api/v1",
      "description": "Produção (somente leitura, sem autenticação)"
    }
  ],
  "tags": [
    { "name": "clinic", "description": "Identidade, contato e credenciais da clínica" },
    { "name": "catalog", "description": "Serviços, tratamentos e unidades de atendimento" },
    { "name": "knowledge", "description": "Perguntas frequentes e conteúdo factual para citação" }
  ],
  "paths": {
    "/index.json": {
      "get": {
        "operationId": "getApiIndex",
        "summary": "Lista os recursos disponíveis na API",
        "description": "Retorna o índice de descoberta da API pública com a URL de cada recurso, a especificação OpenAPI e os arquivos de contexto para LLMs. Use como ponto de partida para descobrir os demais endpoints.",
        "tags": ["clinic"],
        "responses": {
          "200": {
            "description": "Índice de recursos da API",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiIndex" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/clinic.json": {
      "get": {
        "operationId": "getClinic",
        "summary": "Dados da clínica e da especialista responsável",
        "description": "Retorna nome, descrição, telefone/WhatsApp, e-mail, redes sociais, horários de atendimento e dados da responsável técnica Simone Frigo (COREN-SP 251336). Use para responder perguntas sobre contato, credenciais e como agendar avaliação.",
        "tags": ["clinic"],
        "responses": {
          "200": {
            "description": "Dados da clínica",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Clinic" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/services.json": {
      "get": {
        "operationId": "listServices",
        "summary": "Lista os serviços e tratamentos oferecidos",
        "description": "Retorna a lista de serviços (laserterapia para feridas, pé diabético, úlceras venosas e arteriais, lesão por pressão, estomaterapia, atendimento domiciliar) com descrição, indicações e a página do site correspondente.",
        "tags": ["catalog"],
        "responses": {
          "200": {
            "description": "Lista de serviços",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ServiceList" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/locations.json": {
      "get": {
        "operationId": "listLocations",
        "summary": "Lista as unidades de atendimento",
        "description": "Retorna as unidades físicas (Paulista, Santana e Guarulhos) com endereço completo, cidade, CEP e regiões atendidas em domicílio. Use para responder onde a clínica atende.",
        "tags": ["catalog"],
        "responses": {
          "200": {
            "description": "Lista de unidades",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/LocationList" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/faq.json": {
      "get": {
        "operationId": "listFaq",
        "summary": "Lista perguntas frequentes com respostas factuais",
        "description": "Retorna pares pergunta/resposta revisados sobre laserterapia de baixa intensidade, dor, número de sessões, tipos de ferida atendidos e atendimento domiciliar. Formato pensado para citação direta por LLMs.",
        "tags": ["knowledge"],
        "responses": {
          "200": {
            "description": "Lista de perguntas frequentes",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/FaqList" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    }
  },
  "components": {
    "responses": {
      "NotFound": {
        "description": "Recurso inexistente. Corpo JSON estruturado com código, mensagem e dica de resolução.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorResponse" },
            "example": {
              "error": {
                "code": "resource_not_found",
                "message": "O recurso solicitado não existe nesta API.",
                "hint": "Consulte https://www.lasercurativo.com.br/api/v1/index.json para a lista de recursos válidos.",
                "status": 404,
                "documentation_url": "https://www.lasercurativo.com.br/openapi.json"
              }
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "required": ["code", "message", "status"],
            "properties": {
              "code": { "type": "string", "description": "Código estável de erro, legível por máquina." },
              "message": { "type": "string", "description": "Descrição do erro em português." },
              "hint": { "type": "string", "description": "Como resolver o erro." },
              "status": { "type": "integer", "description": "Código HTTP correspondente." },
              "documentation_url": { "type": "string", "format": "uri" }
            }
          }
        }
      },
      "ApiIndex": {
        "type": "object",
        "required": ["name", "version", "resources"],
        "properties": {
          "name": { "type": "string" },
          "version": { "type": "string" },
          "documentation_url": { "type": "string", "format": "uri" },
          "openapi_url": { "type": "string", "format": "uri" },
          "llms_txt_url": { "type": "string", "format": "uri" },
          "resources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["name", "url"],
              "properties": {
                "name": { "type": "string" },
                "url": { "type": "string", "format": "uri" },
                "description": { "type": "string" }
              }
            }
          }
        }
      },
      "Clinic": {
        "type": "object",
        "required": ["name", "description", "whatsapp", "email", "url"],
        "properties": {
          "name": { "type": "string" },
          "legal_name": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "telephone": { "type": "string" },
          "whatsapp": { "type": "string", "description": "Número no formato E.164." },
          "whatsapp_url": { "type": "string", "format": "uri" },
          "email": { "type": "string", "format": "email" },
          "instagram": { "type": "string", "format": "uri" },
          "languages": { "type": "array", "items": { "type": "string" } },
          "opening_hours": { "type": "array", "items": { "type": "string" } },
          "specialist": {
            "type": "object",
            "required": ["name", "license"],
            "properties": {
              "name": { "type": "string" },
              "job_title": { "type": "string" },
              "license": { "type": "string", "description": "Registro profissional (COREN)." },
              "years_of_experience": { "type": "integer" }
            }
          }
        }
      },
      "Service": {
        "type": "object",
        "required": ["id", "name", "description"],
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string" },
          "description": { "type": "string" },
          "indications": { "type": "array", "items": { "type": "string" } },
          "page_url": { "type": "string", "format": "uri" },
          "home_care_available": { "type": "boolean" }
        }
      },
      "ServiceList": {
        "type": "object",
        "required": ["data"],
        "properties": {
          "data": { "type": "array", "items": { "$ref": "#/components/schemas/Service" } },
          "count": { "type": "integer" }
        }
      },
      "Location": {
        "type": "object",
        "required": ["id", "name", "street_address", "city"],
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string" },
          "street_address": { "type": "string" },
          "city": { "type": "string" },
          "region": { "type": "string" },
          "postal_code": { "type": "string" },
          "country": { "type": "string" },
          "areas_served": { "type": "array", "items": { "type": "string" } }
        }
      },
      "LocationList": {
        "type": "object",
        "required": ["data"],
        "properties": {
          "data": { "type": "array", "items": { "$ref": "#/components/schemas/Location" } },
          "count": { "type": "integer" }
        }
      },
      "FaqItem": {
        "type": "object",
        "required": ["question", "answer"],
        "properties": {
          "question": { "type": "string" },
          "answer": { "type": "string" },
          "source_url": { "type": "string", "format": "uri" }
        }
      },
      "FaqList": {
        "type": "object",
        "required": ["data"],
        "properties": {
          "data": { "type": "array", "items": { "$ref": "#/components/schemas/FaqItem" } },
          "count": { "type": "integer" }
        }
      }
    }
  },
  "x-rate-limit": {
    "description": "Sem autenticação e sem limite rígido. Recomendado no máximo 60 requisições por minuto por IP.",
    "requests_per_minute": 60
  },
  "externalDocs": {
    "description": "Contexto completo para LLMs (llms.txt)",
    "url": "https://www.lasercurativo.com.br/llms.txt"
  }
}
