{
  "openapi": "3.1.0",
  "info": {
    "title": "IXORTA Public Website API",
    "version": "1.0.0",
    "description": "Public endpoints for website health, quotation requests and read-only agent discovery. No OAuth is required for the currently published endpoints."
  },
  "servers": [
    {
      "url": "https://www.ixorta.com"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Check public API health",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "Operational status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/quote": {
      "post": {
        "summary": "Submit a machinery quotation request",
        "operationId": "submitQuoteRequest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "message"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 300
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 5000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request accepted"
          },
          "400": {
            "description": "Missing or invalid fields"
          },
          "405": {
            "description": "Method not allowed"
          },
          "500": {
            "description": "Email provider error"
          }
        }
      }
    },
    "/machinery.json": {
      "get": {
        "summary": "Read the public IXORTA machinery model data feed",
        "operationId": "getMachineryCatalogue",
        "responses": {
          "200": {
            "description": "Catalogue model and component-guide data",
            "content": {
              "application/ld+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/customer/signup": {
      "post": {
        "summary": "Create a free encrypted buyer account",
        "operationId": "createBuyerAccount",
        "description": "Same-origin website registration. Passwords are one-way hashed and profile records are encrypted before storage.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "country", "interests", "password", "passwordConfirm", "consent", "startedAt"],
                "properties": {
                  "name": {"type": "string", "maxLength": 120},
                  "email": {"type": "string", "format": "email", "maxLength": 254},
                  "company": {"type": "string", "maxLength": 160},
                  "country": {"type": "string", "maxLength": 100},
                  "phone": {"type": "string", "maxLength": 60},
                  "interests": {"type": "array", "items": {"type": "string"}},
                  "password": {"type": "string", "minLength": 12, "maxLength": 128},
                  "passwordConfirm": {"type": "string", "minLength": 12, "maxLength": 128},
                  "consent": {"type": "boolean"},
                  "startedAt": {"type": "integer"}
                }
              }
            }
          }
        },
        "responses": {
          "201": {"description": "Account created and secure session started"},
          "400": {"description": "Invalid registration"},
          "409": {"description": "Account already exists"},
          "503": {"description": "Buyer-account storage security is not configured"}
        }
      }
    },
    "/api/customer/login": {
      "post": {
        "summary": "Sign in to a buyer account",
        "operationId": "loginBuyerAccount",
        "responses": {
          "200": {"description": "Secure buyer session started"},
          "401": {"description": "Invalid email or password"}
        }
      }
    },
    "/api/customer/session": {
      "get": {
        "summary": "Read the current buyer session",
        "operationId": "getBuyerSession",
        "responses": {
          "200": {"description": "Configuration, authentication and profile status"}
        }
      }
    },
    "/api/customer/logout": {
      "post": {
        "summary": "End the current buyer session",
        "operationId": "logoutBuyerAccount",
        "responses": {
          "200": {"description": "Buyer session ended"}
        }
      }
    },
    "/api/mcp": {
      "get": {
        "summary": "Read MCP endpoint discovery information",
        "responses": {
          "200": {
            "description": "MCP endpoint details"
          }
        }
      },
      "post": {
        "summary": "Use the IXORTA read-only MCP server",
        "description": "Supports initialize, tools/list and tools/call over JSON-RPC.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          }
        }
      }
    }
  }
}
