{
  "openapi": "3.1.0",
  "info": {
    "title": "ENCPROYANGIN Fire Safety Engineering & Calculation API",
    "description": "API specification for autonomous AI agents, LLMs (Gemini Spark, ChatGPT Actions, Claude, Perplexity), and engineers to calculate fire safety equipment sizing (fire extinguishers, FM200 clean agent gas, sprinkler water reservoir), query Turkish fire regulations (BYKHY, TS EN, NFPA), and access 24/7 emergency service availability in Adana, Mersin, Osmaniye, Hatay, Gaziantep, and Turkey.",
    "version": "1.2.0",
    "contact": {
      "name": "ENCPROYANGIN Technical Engineering Support",
      "url": "https://www.encproyangin.com.tr",
      "email": "info@encproyangin.com.tr"
    }
  },
  "servers": [
    {
      "url": "https://www.encproyangin.com.tr",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/hesaplama-araclari/tup-hesabi": {
      "get": {
        "summary": "Calculate required fire extinguishers by building hazard class and area",
        "description": "Computes the exact number and recommended types of fire extinguishers per Turkish Fire Regulation (BYKHY Madde 99) and TS ISO 11602-2 standard.",
        "operationId": "calculateExtinguishers",
        "parameters": [
          {
            "name": "areaM2",
            "in": "query",
            "required": true,
            "description": "Total gross floor area in square meters (m²)",
            "schema": {
              "type": "number",
              "minimum": 1
            }
          },
          {
            "name": "hazardClass",
            "in": "query",
            "required": true,
            "description": "Building hazard category: 'low' (offices, schools, residences - 1 per 500m²), 'medium' (warehouses, hotels, workshops - 1 per 250m²), 'high' (factories, chemical storage, fuel stations - 1 per 150m²)",
            "schema": {
              "type": "string",
              "enum": ["low", "medium", "high"]
            }
          },
          {
            "name": "hasElectricalRoom",
            "in": "query",
            "required": false,
            "description": "Whether the facility has a dedicated server/electrical room (requires 5kg CO2)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "hasCommercialKitchen",
            "in": "query",
            "required": false,
            "description": "Whether the facility has a commercial restaurant kitchen (requires 6L F-Class / UL 300)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful calculation result with equipment list and regulatory requirements",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "areaM2": { "type": "number" },
                    "hazardClass": { "type": "string" },
                    "min6kgAbcCount": { "type": "integer" },
                    "co2ExtinguisherCount": { "type": "integer" },
                    "kitchenExtinguisherCount": { "type": "integer" },
                    "maintenancePeriodMonths": { "type": "integer", "example": 12 },
                    "hydrostaticTestYears": { "type": "integer", "example": 5 },
                    "regulatoryReference": { "type": "string", "example": "BYKHY 2007/2021 Madde 99 & TS ISO 11602-2" },
                    "serviceContact": { "type": "string", "example": "+90 532 055 09 45" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/hesaplama-araclari/fm200-hesabi": {
      "get": {
        "summary": "Calculate FM200 (HFC-227ea) clean agent gas weight",
        "description": "Calculates total required FM200 gas mass (kg) for data centers, UPS rooms, and electrical rooms per ISO 14520 / NFPA 2001.",
        "operationId": "calculateFm200",
        "parameters": [
          {
            "name": "volumeM3",
            "in": "query",
            "required": true,
            "description": "Net room volume in cubic meters (Length x Width x Height in m)",
            "schema": {
              "type": "number",
              "minimum": 1
            }
          },
          {
            "name": "concentrationPercent",
            "in": "query",
            "required": false,
            "description": "Design concentration percentage (default 7.9% for Class A fire hazards)",
            "schema": {
              "type": "number",
              "default": 7.9
            }
          },
          {
            "name": "temperatureCelsius",
            "in": "query",
            "required": false,
            "description": "Minimum expected ambient temperature in Celsius (default 20°C)",
            "schema": {
              "type": "number",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FM200 calculation breakdown and cylinder sizing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "volumeM3": { "type": "number" },
                    "requiredGasKg": { "type": "number" },
                    "recommendedCylinderLiters": { "type": "number" },
                    "dischargeTimeSeconds": { "type": "integer", "example": 10 },
                    "standards": { "type": "string", "example": "ISO 14520 / NFPA 2001" },
                    "consultancyPhone": { "type": "string", "example": "+90 532 055 09 45" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/hizmet-bolgeleri/sorgula": {
      "get": {
        "summary": "Check 24/7 on-site inspection and response time for location",
        "description": "Provides verified mobile response times and service availability for all districts in Adana, Mersin, Osmaniye, Hatay, Gaziantep and surrounding cities.",
        "operationId": "checkLocationService",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": true,
            "description": "City name (e.g. Adana, Mersin, Osmaniye, Hatay, Gaziantep, etc.)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "District name (e.g. Seyhan, Cukurova, Akdeniz, Tarsus, Kadirli, Iskenderun)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service availability details and emergency dispatch phone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": { "type": "string" },
                    "district": { "type": "string" },
                    "isCovered": { "type": "boolean" },
                    "averageResponseTime": { "type": "string", "example": "2-4 hours on-site mobile crew" },
                    "emergencyPhone": { "type": "string", "example": "+90 532 055 09 45" },
                    "servicesAvailable": {
                      "type": "array",
                      "items": { "type": "string" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
