{
  "openapi": "3.1.0",
  "info": {
    "title": "Valam Ventures API",
    "description": "Public enterprise API specification for Valam Ventures Private Limited (Coimbatore, Tamil Nadu). Provides automated discovery and programmatic interfaces for the group's business verticals, technology solutions, projects, and contact desks with Machine Payment Protocol (MPP) payment discovery.",
    "version": "1.0.0",
    "contact": {
      "name": "Valam Ventures Engineering",
      "url": "https://valamventures.com/technology-solutions/",
      "email": "tech@valamventures.com"
    }
  },
  "x-service-info": {
    "categories": [
      "business",
      "real-estate",
      "technology",
      "finance",
      "clean-energy"
    ],
    "provider": "Valam Ventures Private Limited",
    "payment_protocols": [
      "mpp",
      "acp",
      "ap2",
      "x402"
    ]
  },
  "servers": [
    {
      "url": "https://valamventures.com/api/v1",
      "description": "Production API Server"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "API Health Check",
        "description": "Returns operational status and service metadata for automated health and uptime monitoring.",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "Service is operational",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatus"
                },
                "example": {
                  "status": "healthy",
                  "service": "valam-ventures-api",
                  "version": "1.0.0",
                  "timestamp": "2026-09-23T10:00:00Z"
                }
              }
            }
          }
        }
      }
    },
    "/ventures": {
      "get": {
        "summary": "List Business Verticals",
        "description": "Retrieves the six primary operating sectors of Valam Ventures.",
        "operationId": "getVentures",
        "responses": {
          "200": {
            "description": "List of core business verticals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VentureVertical"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required via x402 protocol",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/contact": {
      "post": {
        "summary": "Submit Commercial Inquiry",
        "description": "Submits an enterprise, investment, student housing, or realty inquiry directly to Valam Ventures desks.",
        "operationId": "submitInquiry",
        "x-payment-info": {
          "intent": "charge",
          "method": "stripe",
          "amount": "1.00",
          "currency": "USD",
          "description": "Verified commercial inquiry and expedited partner routing fee"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InquiryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Inquiry accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "message": { "type": "string" }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required - MPP payment required to submit commercial inquiries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequiredError"
                }
              }
            }
          }
        }
      }
    },
    "/realty/inquiry": {
      "post": {
        "summary": "Request Realty Layout Inspection & Booking",
        "description": "Requests an on-site inspection, survey package, and reservation hold for DTCP/TNRERA approved villa plots managed by Property Paradise.",
        "operationId": "requestRealtyBooking",
        "x-payment-info": {
          "intent": "session",
          "method": "tempo",
          "amount": "5.00",
          "currency": "USD",
          "description": "Real estate plot site visit token and layout reservation session"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "project": { "type": "string", "example": "Aara Vista" },
                  "corridor": { "type": "string", "example": "Kalapatti" },
                  "client_name": { "type": "string" },
                  "client_email": { "type": "string", "format": "email" }
                },
                "required": ["project", "client_name", "client_email"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Inspection and booking scheduled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "booking_id": { "type": "string" },
                    "status": { "type": "string" }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required - Machine Payment Protocol session authorization required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequiredError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HealthStatus": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "example": "healthy" },
          "service": { "type": "string", "example": "valam-ventures-api" },
          "version": { "type": "string", "example": "1.0.0" },
          "timestamp": { "type": "string", "format": "date-time" }
        },
        "required": ["status", "service", "version"]
      },
      "VentureVertical": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string" },
          "division": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "description": { "type": "string" }
        },
        "required": ["id", "name", "division", "url"]
      },
      "InquiryRequest": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "email": { "type": "string", "format": "email" },
          "phone": { "type": "string" },
          "sector": { "type": "string", "enum": ["technology", "real-estate", "student-housing", "food-supply", "capital", "clean-energy", "general"] },
          "message": { "type": "string" }
        },
        "required": ["name", "email", "sector", "message"]
      },
      "PaymentRequiredError": {
        "type": "object",
        "properties": {
          "error": { "type": "string", "example": "Payment required" },
          "message": { "type": "string", "example": "Machine Payment Protocol authorization required" },
          "payment_methods": {
            "type": "array",
            "items": { "type": "string" },
            "example": ["stripe", "tempo", "card"]
          }
        },
        "required": ["error", "message"]
      },
      "X402PaymentRequired": {
        "type": "object",
        "properties": {
          "x402Version": { "type": "integer", "example": 2 },
          "error": { "type": "string", "example": "Payment Required" },
          "resource": {
            "type": "object",
            "properties": {
              "url": { "type": "string", "format": "uri" },
              "description": { "type": "string" },
              "mimeType": { "type": "string" }
            },
            "required": ["url"]
          },
          "accepts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scheme": { "type": "string", "example": "exact" },
                "network": { "type": "string", "example": "eip155:8453" },
                "amount": { "type": "string", "example": "10000" },
                "asset": { "type": "string", "example": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" },
                "payTo": { "type": "string", "example": "0x5346497C1919E86266D06Efa5F21659a5d118228" },
                "maxTimeoutSeconds": { "type": "integer", "example": 60 },
                "extra": {
                  "type": "object",
                  "properties": {
                    "facilitator": { "type": "string", "format": "uri", "example": "https://x402.org/facilitator" },
                    "name": { "type": "string", "example": "USD Coin" },
                    "symbol": { "type": "string", "example": "USDC" },
                    "decimals": { "type": "integer", "example": 6 }
                  }
                }
              },
              "required": ["scheme", "network", "amount", "asset", "payTo"]
            }
          }
        },
        "required": ["x402Version", "error", "resource", "accepts"]
      }
    }
  }
}
