{
    "openapi": "3.1.0",
    "info": {
        "title": "Global eSIM public agent API",
        "version": "1.2.0",
        "description": "Read-only endpoints for AI agents: the full agent catalog, product search and the MCP server. No authentication and no payable operations - purchases are completed by a human in the web checkout."
    },
    "servers": [
        {
            "url": "https://globalesim.app"
        }
    ],
    "paths": {
        "/api/agent-catalog": {
            "get": {
                "operationId": "agentCatalog",
                "summary": "Every purchasable plan in one JSON document: coverage (ISO codes), data_gb, validity_days, voice_minutes, sms, price (USD), and a checkout_url that opens the product with the option preselected. Field docs: /ai-agents/#fields, brief: /ai-agents/brief.md",
                "responses": {
                    "200": {
                        "description": "The agent catalog (spec ges-agent-catalog/1)"
                    }
                }
            }
        },
        "/wp-json/wc/store/v1/products": {
            "get": {
                "operationId": "searchProducts",
                "summary": "Search eSIM products by destination or region",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Product list (WooCommerce Store API schema)"
                    }
                }
            }
        },
        "/wp-json/ges/acp/v1/product_search": {
            "get": {
                "operationId": "productSearch",
                "summary": "Read-only eSIM plan search (name, price, URL, Markdown URL)",
                "parameters": [
                    {
                        "name": "query",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Matching plans"
                    }
                }
            }
        },
        "/mcp": {
            "post": {
                "operationId": "mcpRpc",
                "summary": "MCP streamable-HTTP endpoint (JSON-RPC 2.0: initialize, tools/list, tools/call)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "JSON-RPC response"
                    }
                }
            }
        }
    }
}