{
  "openapi": "3.1.0",
  "info": {
    "title": "Spotto Geomarketing & Location Viability API",
    "version": "1.0.0",
    "description": "API REST de alta precisão para cálculo do Spotto Score™, cruzamento censitário e gravitação de David Huff na América Latina.",
    "contact": {
      "name": "Spotto Engineering",
      "email": "contato@spoto.lat",
      "url": "https://spoto.lat"
    }
  },
  "servers": [
    {
      "url": "https://api.spoto.lat",
      "description": "Servidor de Produção Oficial"
    }
  ],
  "paths": {
    "/api/analisar/preview": {
      "post": {
        "summary": "Simulação Gratuita de Ponto Comercial",
        "operationId": "analisarPreview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endereco": {
                    "type": "string",
                    "example": "Av. Paulista, 1000, Sao Paulo, SP"
                  },
                  "nicho": {
                    "type": "string",
                    "example": "alimentacao_restaurantes"
                  }
                },
                "required": [
                  "endereco"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Score calculado com sucesso"
          }
        }
      }
    },
    "/api/revenda/analisar": {
      "post": {
        "summary": "Análise Avançada B2B com Microdados Censitários",
        "operationId": "analiseB2B",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endereco": {
                    "type": "string"
                  },
                  "nicho": {
                    "type": "string"
                  },
                  "webhook_callback": {
                    "type": "string"
                  }
                },
                "required": [
                  "endereco"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Relatório analítico completo liberado"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}