{
  "openapi": "3.1.0",
  "info": {
    "title": "RueKhum Demolition & Salvage Valuation Web API",
    "description": "API สำหรับเชื่อมต่อ AI Search, ChatGPT Custom GPTs, และ AI Agents กับระบบประเมินราคาค่าทุบรื้อถอนบ้าน อาคาร และรับซื้อซากวัสดุก่อสร้างคืนเงินสด รื้อคุ้ม (RueKhum)",
    "version": "1.0.0",
    "contact": {
      "name": "รื้อคุ้ม (RueKhum)",
      "url": "https://ruekhum.com"
    }
  },
  "servers": [
    {
      "url": "https://ruekhum.com",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/api/estimate-demolition.json": {
      "get": {
        "summary": "ประเมินราคาค่ารื้อถอนและตรวจสิทธิ์ทุบฟรีแลกซาก",
        "description": "คำนวณราคาค่าบริการรื้อถอนบ้าน อาคารพาณิชย์ โกดังเหล็ก โรงเรียนเอกชน และวัด พร้อมประเมินมูลค่าซากคืนเงินสด",
        "operationId": "estimateDemolitionCost",
        "responses": {
          "200": {
            "description": "ผลการประเมินราคาค่ารื้อถอนและมูลค่าซากคืนเงินสด",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "company": { "type": "string" },
                    "defaultEstimate": { "type": "object" },
                    "contact": { "type": "object" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/scrap-prices.json": {
      "get": {
        "summary": "ดัชนีราคารับซื้อซากเศษเหล็กและไม้สักเก่าประจำวัน 2569",
        "description": "ดึงราคารับซื้อซากวัสดุก่อสร้าง เหล็กโครงสร้าง H-Beam ไม้สักเก่า ทองแดง สำหรับหักลดค่ารื้อถอน",
        "operationId": "getScrapPrices",
        "responses": {
          "200": {
            "description": "รายการราคาซากวัสดุรับซื้อ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lastUpdated": { "type": "string" },
                    "currency": { "type": "string" },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "material": { "type": "string" },
                          "priceRange": { "type": "string" },
                          "unit": { "type": "string" }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
