{
  "openapi": "3.1.0",
  "info": {
    "title": "M/S Vaishali Electrical Works Agent & Engineering API",
    "version": "1.0.0",
    "description": "Machine-readable OpenAPI specification for M/S Vaishali Electrical Works (Rampur Bhikhanpura, Sahebganj, Muzaffarpur, Bihar - State Code 10) covering 8 engineering divisions, 29 services, 38 Bihar districts, MCP, A2A, Lead capture, and x402 diagnostics.",
    "contact": {
      "name": "M/S Vaishali Electrical Works Support",
      "email": "vaishalielectricalworks01@gmail.com",
      "url": "https://vaishalielectricalworks.in"
    }
  },
  "servers": [
    {
      "url": "https://vaishalielectricalworks.in",
      "description": "Canonical Production Origin"
    }
  ],
  "x-service-info": {
    "categories": [
      "engineering",
      "diagnostics",
      "electrical-services"
    ],
    "docs": {
      "homepage": "https://vaishalielectricalworks.in",
      "apiReference": "https://vaishalielectricalworks.in/docs/api",
      "llms": "https://vaishalielectricalworks.in/llms.txt"
    }
  },
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Service health and verified catalog telemetry",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "Healthy status JSON"
          }
        }
      }
    },
    "/api/agent-markdown": {
      "get": {
        "summary": "Render any canonical route as LLM-ready Markdown (RFC 9110 Accept target)",
        "operationId": "getAgentMarkdown",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "/"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown document with x-markdown-tokens header"
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "summary": "Fetch MCP Server Card metadata",
        "operationId": "getMcpServerCard",
        "responses": {
          "200": {
            "description": "MCP server metadata"
          }
        }
      },
      "post": {
        "summary": "Streamable HTTP MCP JSON-RPC 2.0 endpoint (initialize, tools/list, tools/call, resources/list, prompts/list)",
        "operationId": "postMcpRpc",
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response"
          }
        }
      }
    },
    "/api/a2a": {
      "post": {
        "summary": "Agent-to-Agent (A2A) JSON-RPC task execution endpoint",
        "operationId": "postA2aTask",
        "responses": {
          "200": {
            "description": "A2A task response"
          }
        }
      }
    },
    "/api/v1/motor-audit": {
      "get": {
        "summary": "x402-gated industrial motor winding, FLA/OLR & cable sizing audit ($0.05 USDC on Base)",
        "operationId": "getMotorAudit",
        "x-payment-info": {
          "intent": "charge",
          "method": "tempo",
          "amount": "0.05",
          "currency": "USDC",
          "description": "Industrial motor winding copper gauge, 3-phase FLA/OLR trip settings, and cable voltage-drop audit."
        },
        "responses": {
          "200": {
            "description": "Audited specification JSON after x402 settlement"
          },
          "402": {
            "description": "x402 Payment Required challenge (ExactEvmScheme USDC)"
          }
        }
      },
      "post": {
        "summary": "x402-gated custom motor audit calculation",
        "operationId": "postMotorAudit",
        "x-payment-info": {
          "intent": "charge",
          "method": "tempo",
          "amount": "0.05",
          "currency": "USDC",
          "description": "Custom industrial motor winding, 3-phase FLA/OLR trip settings, and cable voltage-drop calculation."
        },
        "responses": {
          "200": {
            "description": "Audited calculation JSON after x402 settlement"
          },
          "402": {
            "description": "x402 Payment Required challenge"
          }
        }
      }
    },
    "/api/v1/diagnostic-report": {
      "get": {
        "summary": "x402-gated borewell pump & district electrical dispatch report ($0.10 USDC on Base)",
        "operationId": "getDiagnosticReport",
        "x-payment-info": {
          "intent": "charge",
          "method": "tempo",
          "amount": "0.10",
          "currency": "USDC",
          "description": "Submersible borewell pump and Bihar district electrical dispatch diagnostic report."
        },
        "responses": {
          "200": {
            "description": "Engineering diagnostic payload"
          },
          "402": {
            "description": "x402 Payment Required challenge"
          }
        }
      },
      "post": {
        "summary": "x402-gated custom borewell pump & district electrical dispatch report ($0.10 USDC on Base)",
        "operationId": "postDiagnosticReport",
        "x-payment-info": {
          "intent": "charge",
          "method": "tempo",
          "amount": "0.10",
          "currency": "USDC",
          "description": "Custom submersible borewell pump and Bihar district electrical dispatch diagnostic report."
        },
        "responses": {
          "200": {
            "description": "Engineering diagnostic payload"
          },
          "402": {
            "description": "x402 Payment Required challenge"
          }
        }
      }
    },
    "/api/leads": {
      "post": {
        "summary": "Submit DPDP-compliant repair estimate, B2B AMC, supply, or tender enquiry",
        "operationId": "submitLead",
        "responses": {
          "201": {
            "description": "Enquiry reference ID issued"
          },
          "400": {
            "description": "Validation error"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    }
  }
}