diff --git a/Redfish.md b/Redfish.md
index 6036e8a..1714985 100644
--- a/Redfish.md
+++ b/Redfish.md
@@ -191,6 +191,7 @@
 
 - Actions
 - ChassisType
+- HotPluggable
 - Links/ComputerSystems
 - Links/ManagedBy
 - PCIeDevices
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index dd77195..31b38c3 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -270,7 +270,7 @@
             }
 
             asyncResp->res.jsonValue["@odata.type"] =
-                "#Chassis.v1_16_0.Chassis";
+                "#Chassis.v1_22_0.Chassis";
             asyncResp->res.jsonValue["@odata.id"] =
                 crow::utility::urlFromPieces("redfish", "v1", "Chassis",
                                              chassisId);
@@ -314,23 +314,47 @@
 
             const std::string assetTagInterface =
                 "xyz.openbmc_project.Inventory.Decorator.AssetTag";
-            if (std::find(interfaces2.begin(), interfaces2.end(),
-                          assetTagInterface) != interfaces2.end())
+            const std::string replaceableInterface =
+                "xyz.openbmc_project.Inventory.Decorator.Replaceable";
+            for (const auto& interface : interfaces2)
             {
-                sdbusplus::asio::getProperty<std::string>(
-                    *crow::connections::systemBus, connectionName, path,
-                    assetTagInterface, "AssetTag",
-                    [asyncResp, chassisId(std::string(chassisId))](
-                        const boost::system::error_code& ec2,
-                        const std::string& property) {
-                    if (ec2)
-                    {
-                        BMCWEB_LOG_DEBUG << "DBus response error for AssetTag";
-                        messages::internalError(asyncResp->res);
-                        return;
-                    }
-                    asyncResp->res.jsonValue["AssetTag"] = property;
-                    });
+                if (interface == assetTagInterface)
+                {
+                    sdbusplus::asio::getProperty<std::string>(
+                        *crow::connections::systemBus, connectionName, path,
+                        assetTagInterface, "AssetTag",
+                        [asyncResp,
+                         chassisId](const boost::system::error_code& ec2,
+                                    const std::string& property) {
+                        if (ec2)
+                        {
+                            BMCWEB_LOG_ERROR
+                                << "DBus response error for AssetTag: " << ec2;
+                            messages::internalError(asyncResp->res);
+                            return;
+                        }
+                        asyncResp->res.jsonValue["AssetTag"] = property;
+                        });
+                }
+                else if (interface == replaceableInterface)
+                {
+                    sdbusplus::asio::getProperty<bool>(
+                        *crow::connections::systemBus, connectionName, path,
+                        replaceableInterface, "HotPluggable",
+                        [asyncResp,
+                         chassisId](const boost::system::error_code& ec2,
+                                    const bool property) {
+                        if (ec2)
+                        {
+                            BMCWEB_LOG_ERROR
+                                << "DBus response error for HotPluggable: "
+                                << ec2;
+                            messages::internalError(asyncResp->res);
+                            return;
+                        }
+                        asyncResp->res.jsonValue["HotPluggable"] = property;
+                        });
+                }
             }
 
             for (const char* interface : hasIndicatorLed)
