{
  "openapi": "3.0.3",
  "info": {
    "title": "ViaConecta Global eSIM & Connectivity Platform API",
    "description": "API endpoints and AI machine-readable specs for ViaConecta — global high-speed eSIM data plans for 150+ countries with instant delivery and zero KYC requirement.",
    "version": "1.2.0",
    "termsOfService": "https://viaconecta.co/terms",
    "contact": {
      "name": "ViaConecta Support",
      "url": "https://viaconecta.co/contact",
      "email": "support@viaconecta.co"
    }
  },
  "servers": [
    {
      "url": "https://viaconecta.co",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/llms.txt": {
      "get": {
        "summary": "AI Summary & USPs (Plaintext)",
        "description": "Standard llms.txt summary describing ViaConecta platform capabilities, 1-Click Quick Buy (No KYC), Tethering policy, and regional coverage.",
        "operationId": "getLLMSSummary",
        "responses": {
          "200": {
            "description": "Markdown formatted summary",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms-full.php": {
      "get": {
        "summary": "Full AI System Context & Catalog",
        "description": "Comprehensive document including prompt engineering instructions for AI agents, complete country catalog table, technical FAQ, and full device compatibility list.",
        "operationId": "getLLMSFullContext",
        "responses": {
          "200": {
            "description": "Markdown formatted full system context",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms-catalog.php": {
      "get": {
        "summary": "AI Markdown Destinations Catalog",
        "description": "Dynamically generated Markdown table listing starting prices, data volumes, and validity for all 150+ supported countries and regions.",
        "operationId": "getLLMSCatalog",
        "responses": {
          "200": {
            "description": "Markdown catalog table",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/catalog.php": {
      "get": {
        "summary": "Get Structured eSIM Data Plans (JSON)",
        "description": "Structured JSON feed listing all available eSIM data packages, pricing in EUR, ISO country coverage codes, data caps, validity, and features (Tethering enabled, eKYC false).",
        "operationId": "getStructuredCatalog",
        "parameters": [
          {
            "name": "ref",
            "in": "query",
            "description": "Optional referral or affiliate code to append to checkout deep links",
            "required": false,
            "schema": {
              "type": "string",
              "default": "ai_agent"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of structured eSIM plan objects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EsimPlan"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EsimPlan": {
        "type": "object",
        "properties": {
          "planName": {
            "type": "string",
            "example": "Spain 10 GB 30 Days"
          },
          "validity": {
            "type": "integer",
            "example": 30,
            "description": "Validity period in days, starts only upon local network connection"
          },
          "dataCap": {
            "type": "number",
            "example": 10,
            "description": "Data volume quantity"
          },
          "dataUnit": {
            "type": "string",
            "example": "GB"
          },
          "dataCapPer": {
            "type": "string",
            "nullable": true,
            "example": "day",
            "description": "'day' for daily unlimited plans, null for fixed volume plans"
          },
          "prices": {
            "type": "object",
            "properties": {
              "EUR": {
                "type": "number",
                "example": 11.90
              }
            }
          },
          "coverages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "example": "ES"
                }
              }
            }
          },
          "tethering": {
            "type": "boolean",
            "example": true,
            "description": "Personal hotspot & tethering is allowed on all ViaConecta plans"
          },
          "eKYC": {
            "type": "boolean",
            "example": false,
            "description": "false means NO ID/passport upload or account registration is required"
          },
          "promoEnabled": {
            "type": "boolean",
            "example": true
          },
          "id": {
            "type": "string",
            "example": "160989"
          },
          "internal_id": {
            "type": "string",
            "example": "Spain_10_GB_30_Days"
          },
          "url": {
            "type": "string",
            "example": "https://viaconecta.co/checkout/Spain_10_GB_30_Days?ref=ai_agent"
          },
          "name": {
            "type": "string",
            "example": "Spain 10 GB 30 Days"
          },
          "price": {
            "type": "number",
            "example": 11.90
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "sim_type": {
            "type": "string",
            "example": "esim"
          },
          "speed": {
            "type": "string",
            "example": "4G/5G"
          }
        }
      }
    }
  }
}
