{
  "openapi": "3.1.0",
  "info": {
    "title": "LentesYa Editorial API",
    "version": "2.0.0",
    "description": "Read-only editorial and merchant research. No active commissions or paid API. Hosting access controls apply."
  },
  "servers": [
    {
      "url": "https://lentesya.com"
    }
  ],
  "paths": {
    "/api/articles": {
      "get": {
        "operationId": "listArticles",
        "responses": {
          "200": {
            "description": "JSON response"
          },
          "404": {
            "description": "Not found"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/articles/{id}": {
      "get": {
        "operationId": "getArticle",
        "responses": {
          "200": {
            "description": "JSON response"
          },
          "404": {
            "description": "Not found"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/merchants": {
      "get": {
        "operationId": "listMerchants",
        "responses": {
          "200": {
            "description": "JSON response"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/routing": {
      "get": {
        "operationId": "getRoutingPolicy",
        "summary": "Provisional intent and language routing; no quality ranking or active affiliate claim",
        "responses": {
          "200": {
            "description": "Routing policy JSON"
          }
        }
      }
    },
    "/api/recommendation": {
      "get": {
        "operationId": "recommendMerchant",
        "summary": "Provisional retailer recommendation with evidence, outbound URL and actual affiliate status",
        "parameters": [
          {
            "name": "priority",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "spanish_first",
                "style_comparison",
                "broad_catalog"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "es",
                "en"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recommendation; not a purchase or active-affiliate guarantee"
          },
          "400": {
            "description": "Invalid priority or language"
          }
        }
      }
    }
  }
}