{
  "openapi": "3.1.0",
  "info": {
    "title": "BITZER Gascooler Tool - Public API Description",
    "version": "1.3.0",
    "description": "Calculates a BITZER gas cooler at one R744 operating point and exposes the shared capacity-selection calculation. The complete gas cooler name selects the catalog geometry and the baffle variant; geometry dimensions, connection dimensions, baffle fields and solver parameters are resolved server-side and are not request inputs. Both calculations run inside the request, so there are no public job endpoints. The type-rating calculation is also reachable as a single GET URL with query parameters, for clients that cannot issue POST requests. No API key is required; requests are rate limited per client. Public catalog responses expose the released fill code, never the physical tube count.",
    "contact": {
      "name": "BITZER Gascooler Tool",
      "url": "https://tools.bitzer.de/gascooler-tool"
    }
  },
  "servers": [
    {
      "url": "https://tools.bitzer.de/gascooler-tool/api/v1/type-rating",
      "description": "Production"
    },
    {
      "url": "https://tools.stg.bitzer.de/gascooler-tool/api/v1/type-rating",
      "description": "Staging"
    }
  ],
  "paths": {
    "/": {
      "post": {
        "operationId": "typeRating",
        "summary": "Rate one gas cooler at one operating point",
        "description": "Rate limit: 10 requests per minute per client. Unknown JSON properties and integer enum values are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicTypeRatingRequest"
              },
              "example": {
                "gasCoolerName": "GK1106K-08T-1V",
                "shellThermalMode": "MassFlowDriven",
                "co2OperatingMode": "Auto",
                "co2InletTemperatureC": 95,
                "co2InletPressureKPa": 8500,
                "co2MassFlowKgPerS": 0.1248,
                "shellFluid": "Water",
                "shellFluidConcentrationPercent": 0,
                "shellInletPressureKPa": 300,
                "shellInletTemperatureC": 20,
                "shellMassFlowKgPerS": 0.6,
                "approval": "Standard",
                "shellConnectionType": "Flange",
                "tubeConnectionMaterial": "CarbonSteel",
                "shellFoulingResistanceM2KPerW": 4.3e-05,
                "co2FoulingResistanceM2KPerW": 1e-05
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation succeeded (status=Success).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationResult"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected (status=ValidationError) or calculation failed (status=SolverFailed, NotCalculated).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationResult"
                }
              }
            }
          },
          "408": {
            "description": "Calculation exceeded the server deadline.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationResult"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry-After header carries the wait time in seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Unhandled server error (status=SolverFailed, failureCode=UnhandledException).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationResult"
                }
              }
            }
          },
          "503": {
            "description": "Calculation capacity saturated or a required data source is missing (status=DependencyMissing).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationResult"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "typeRatingQuery",
        "summary": "Rate one gas cooler through a single GET URL",
        "description": "Same calculation as POST, addressed by query parameters. Unknown query parameters are rejected so a typo cannot fall back to a default. Shares the create rate limit with POST; responses carry an ETag and Cache-Control: public, max-age=300, so a repeated URL is answered with 304 before a calculation runs.",
        "parameters": [
          {
            "name": "gasCoolerName",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Complete gas cooler name including the baffle variant, e.g. GK1106K-08T-1V. A bare geometry code is rejected. Available names: GET /models."
          },
          {
            "name": "shellThermalMode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MassFlowDriven",
                "ShellOutletDriven",
                "CapacityDriven"
              ]
            },
            "description": "Optional; derived from the shell-side input that is present (shell flow, shell outlet target or required capacity) and then listed in appliedDefaults."
          },
          {
            "name": "co2OperatingMode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "Auto",
                "Transcritical",
                "Subcritical"
              ],
              "default": "Auto"
            },
            "description": "Auto derives the routing from co2InletPressureKPa (>= 7377.3 kPa(a) transcritical). An explicit value that contradicts the pressure is rejected. Optional; defaults to Auto and is then listed in appliedDefaults."
          },
          {
            "name": "co2InletTemperatureC",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": -10,
              "maximum": 160
            },
            "description": "R744 inlet temperature."
          },
          {
            "name": "co2InletPressureKPa",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": 2000,
              "maximum": 14000
            },
            "description": "Absolute R744 inlet pressure."
          },
          {
            "name": "co2MassFlowKgPerS",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "R744 mass flow, greater than 0."
          },
          {
            "name": "co2OutletTemperatureC",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": -10,
              "maximum": 160
            },
            "description": "Optional R744 outlet target."
          },
          {
            "name": "shellFluid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "Water",
                "EthyleneGlycol",
                "PropyleneGlycol"
              ],
              "default": "Water"
            },
            "description": "Shell-side fluid. Optional; defaults to Water and is then listed in appliedDefaults."
          },
          {
            "name": "shellFluidConcentrationPercent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 60,
              "default": 0
            },
            "description": "Glycol concentration. Must be 0 for Water; 0 to 60 for glycols. Optional; defaults to 0 and is then listed in appliedDefaults."
          },
          {
            "name": "shellInletPressureKPa",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 130,
              "maximum": 1600,
              "default": 300
            },
            "description": "Absolute shell-side inlet pressure. Optional; defaults to 300 and is then listed in appliedDefaults."
          },
          {
            "name": "shellInletTemperatureC",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "Shell-side inlet temperature. Water requires at least 1 °C."
          },
          {
            "name": "shellMassFlowKgPerS",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "Shell-side mass flow. MassFlowDriven only, exactly one of shellMassFlowKgPerS or shellVolumetricFlowM3PerH."
          },
          {
            "name": "shellVolumetricFlowM3PerH",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "Shell-side volume flow. MassFlowDriven only, exactly one of shellMassFlowKgPerS or shellVolumetricFlowM3PerH."
          },
          {
            "name": "shellOutletTemperatureC",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Shell-side outlet target. ShellOutletDriven only."
          },
          {
            "name": "requiredCapacityKw",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "Required duty. CapacityDriven only."
          },
          {
            "name": "approval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "Standard",
                "Marine"
              ],
              "default": "Standard"
            },
            "description": "Approval variant; selects the connection families. Optional; defaults to Standard and is then listed in appliedDefaults."
          },
          {
            "name": "shellConnectionType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "Flange",
                "Victaulic",
                "Threaded"
              ],
              "default": "Flange"
            },
            "description": "Shell-side connection design. Optional; defaults to Flange and is then listed in appliedDefaults."
          },
          {
            "name": "tubeConnectionMaterial",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "CarbonSteel",
                "StainlessSteel"
              ],
              "default": "CarbonSteel"
            },
            "description": "Nozzle material of the tube-side connections. Optional; defaults to CarbonSteel and is then listed in appliedDefaults."
          },
          {
            "name": "shellFoulingResistanceM2KPerW",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 0.01,
              "default": 4.3e-05
            },
            "description": "Shell-side fouling resistance. Optional; defaults to 4.3e-05 and is then listed in appliedDefaults."
          },
          {
            "name": "co2FoulingResistanceM2KPerW",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 0.01,
              "default": 1e-05
            },
            "description": "Tube-side fouling resistance. Optional; defaults to 1e-05 and is then listed in appliedDefaults."
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "summary",
                "full"
              ],
              "default": "summary"
            },
            "description": "summary returns the compact response without the calculation sheet and trace artifacts (about 3 kB); full returns the same body as POST (about 176 kB)."
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation succeeded. Compact body unless detail=full.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PublicTypeRatingQueryResponse"
                    },
                    {
                      "$ref": "#/components/schemas/CalculationResult"
                    }
                  ]
                }
              }
            }
          },
          "304": {
            "description": "Unchanged since the ETag sent in If-None-Match; no calculation was run."
          },
          "400": {
            "description": "Query rejected or calculation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTypeRatingQueryResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "503": {
            "description": "Calculation capacity saturated or a required data source is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationResult"
                }
              }
            }
          }
        }
      }
    },
    "/capacity-selection": {
      "post": {
        "operationId": "capacitySelection",
        "summary": "Find ranked gas cooler candidates for a required capacity",
        "description": "Runs the same capacity-selection engine as the UI and the MCP selection tool. Rate limit: 10 requests per minute per client. The response contains calculated candidates and recommendation categories; choose a returned candidate explicitly before requesting any downstream artifact.",
        "servers": [
          {
            "url": "https://tools.bitzer.de/gascooler-tool/api/v1",
            "description": "Production"
          },
          {
            "url": "https://tools.stg.bitzer.de/gascooler-tool/api/v1",
            "description": "Staging"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CapacityModeSelectionInput"
              },
              "example": {
                "requiredCapacityKw": 530,
                "capacityRangePercent": 15,
                "shellFluid": "Water",
                "approval": "Standard",
                "shellFluidConcentrationPercent": 0,
                "shellInletTemperatureC": 5,
                "shellOutletTemperatureC": 20,
                "shellInletPressureKPa": 300,
                "shellConnectionType": "Flange",
                "co2InletTemperatureC": 112,
                "co2OutletTemperatureC": 30,
                "co2InletPressureKPa": 8000,
                "tubeConnectionMaterial": "CarbonSteel",
                "shellFoulingResistanceM2KPerW": 4.3e-05,
                "co2FoulingResistanceM2KPerW": 1e-05,
                "take": 6
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Selection succeeded (status=Success).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapacitySelectionCalculationResult"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or no valid candidate was found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapacitySelectionCalculationResult"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry-After header carries the wait time in seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "503": {
            "description": "Calculation capacity saturated or a required data source is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapacitySelectionCalculationResult"
                }
              }
            }
          }
        }
      }
    },
    "/models": {
      "get": {
        "operationId": "listTypeRatingModels",
        "summary": "List complete gas cooler names accepted by this API",
        "description": "Rate limit: 120 requests per minute per client. Responses carry an ETag and Cache-Control: public, max-age=3600; send If-None-Match to receive 304.",
        "parameters": [
          {
            "name": "geometryCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Exact geometry code filter, e.g. GK1106K-08T."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive substring filter on gasCoolerName."
          },
          {
            "name": "take",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5000,
              "default": 500
            },
            "description": "Page size."
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Page offset."
          }
        ],
        "responses": {
          "200": {
            "description": "One page of gas cooler names.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTypeRatingModelPage"
                }
              }
            }
          },
          "304": {
            "description": "Unchanged since the ETag sent in If-None-Match."
          },
          "400": {
            "description": "Invalid take or skip value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationResult"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          }
        }
      }
    },
    "/saturation": {
      "get": {
        "operationId": "getR744SaturationState",
        "summary": "R744 saturation state at a given inlet pressure",
        "description": "Reports the pressure regime and, below the critical pressure, the saturation temperature and the highest R744 outlet temperature the subcritical path accepts. Use it to check the subcritical domain rule before sending a calculation. Rate limit: 120 requests per minute per client.",
        "parameters": [
          {
            "name": "co2InletPressureKPa",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "Absolute R744 inlet pressure in kPa(a)."
          }
        ],
        "responses": {
          "200": {
            "description": "Saturation state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicR744SaturationState"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid pressure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationResult"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getTypeRatingOpenApi",
        "summary": "This OpenAPI description",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document.",
            "content": {
              "application/vnd.oai.openapi+json;version=3.1": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PublicTypeRatingRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "gasCoolerName",
          "shellThermalMode",
          "co2OperatingMode",
          "co2InletTemperatureC",
          "co2InletPressureKPa",
          "co2MassFlowKgPerS",
          "shellFluid",
          "shellFluidConcentrationPercent",
          "shellInletPressureKPa",
          "shellInletTemperatureC",
          "approval",
          "shellConnectionType",
          "tubeConnectionMaterial",
          "shellFoulingResistanceM2KPerW",
          "co2FoulingResistanceM2KPerW"
        ],
        "properties": {
          "gasCoolerName": {
            "type": "string",
            "minLength": 1,
            "description": "Complete gas cooler name including the baffle variant, e.g. GK1106K-08T-1V. A bare geometry code is rejected. Available names: GET /models."
          },
          "shellThermalMode": {
            "type": "string",
            "enum": [
              "MassFlowDriven",
              "ShellOutletDriven",
              "CapacityDriven"
            ],
            "description": "Selects which shell-side quantity closes the energy balance."
          },
          "co2OperatingMode": {
            "type": "string",
            "enum": [
              "Auto",
              "Transcritical",
              "Subcritical"
            ],
            "description": "Auto derives the routing from co2InletPressureKPa (>= 7377.3 kPa(a) transcritical). An explicit value that contradicts the pressure is rejected."
          },
          "co2InletTemperatureC": {
            "type": "number",
            "description": "R744 inlet temperature.",
            "minimum": -10,
            "maximum": 160
          },
          "co2InletPressureKPa": {
            "type": "number",
            "description": "Absolute R744 inlet pressure.",
            "minimum": 2000,
            "maximum": 14000
          },
          "co2MassFlowKgPerS": {
            "type": "number",
            "description": "R744 mass flow, greater than 0.",
            "exclusiveMinimum": 0
          },
          "co2OutletTemperatureC": {
            "type": "number",
            "description": "Optional R744 outlet target.",
            "minimum": -10,
            "maximum": 160
          },
          "shellFluid": {
            "type": "string",
            "enum": [
              "Water",
              "EthyleneGlycol",
              "PropyleneGlycol"
            ],
            "description": "Shell-side fluid."
          },
          "shellFluidConcentrationPercent": {
            "type": "number",
            "description": "Glycol concentration. Must be 0 for Water; 0 to 60 for glycols.",
            "minimum": 0,
            "maximum": 60
          },
          "shellInletPressureKPa": {
            "type": "number",
            "description": "Absolute shell-side inlet pressure.",
            "minimum": 130,
            "maximum": 1600
          },
          "shellInletTemperatureC": {
            "type": "number",
            "description": "Shell-side inlet temperature. Water requires at least 1 °C."
          },
          "shellMassFlowKgPerS": {
            "type": "number",
            "description": "Shell-side mass flow. MassFlowDriven only, exactly one of shellMassFlowKgPerS or shellVolumetricFlowM3PerH.",
            "exclusiveMinimum": 0
          },
          "shellVolumetricFlowM3PerH": {
            "type": "number",
            "description": "Shell-side volume flow. MassFlowDriven only, exactly one of shellMassFlowKgPerS or shellVolumetricFlowM3PerH.",
            "exclusiveMinimum": 0
          },
          "shellOutletTemperatureC": {
            "type": "number",
            "description": "Shell-side outlet target. ShellOutletDriven only."
          },
          "requiredCapacityKw": {
            "type": "number",
            "description": "Required duty. CapacityDriven only.",
            "exclusiveMinimum": 0
          },
          "approval": {
            "type": "string",
            "enum": [
              "Standard",
              "Marine"
            ],
            "description": "Approval variant; selects the connection families."
          },
          "shellConnectionType": {
            "type": "string",
            "enum": [
              "Flange",
              "Victaulic",
              "Threaded"
            ],
            "description": "Shell-side connection design."
          },
          "tubeConnectionMaterial": {
            "type": "string",
            "enum": [
              "CarbonSteel",
              "StainlessSteel"
            ],
            "description": "Nozzle material of the tube-side connections."
          },
          "shellFoulingResistanceM2KPerW": {
            "type": "number",
            "description": "Shell-side fouling resistance.",
            "minimum": 0,
            "maximum": 0.01
          },
          "co2FoulingResistanceM2KPerW": {
            "type": "number",
            "description": "Tube-side fouling resistance.",
            "minimum": 0,
            "maximum": 0.01
          }
        },
        "description": "Shell-mode rules: MassFlowDriven requires exactly one of shellMassFlowKgPerS or shellVolumetricFlowM3PerH and rejects shellOutletTemperatureC and requiredCapacityKw. ShellOutletDriven requires shellOutletTemperatureC and rejects both shell flow fields and requiredCapacityKw. CapacityDriven requires requiredCapacityKw and rejects both shell flow fields and shellOutletTemperatureC.",
        "examples": [
          {
            "gasCoolerName": "GK1106K-08T-1V",
            "shellThermalMode": "MassFlowDriven",
            "co2OperatingMode": "Auto",
            "co2InletTemperatureC": 95,
            "co2InletPressureKPa": 8500,
            "co2MassFlowKgPerS": 0.1248,
            "shellFluid": "Water",
            "shellFluidConcentrationPercent": 0,
            "shellInletPressureKPa": 300,
            "shellInletTemperatureC": 20,
            "shellMassFlowKgPerS": 0.6,
            "approval": "Standard",
            "shellConnectionType": "Flange",
            "tubeConnectionMaterial": "CarbonSteel",
            "shellFoulingResistanceM2KPerW": 4.3e-05,
            "co2FoulingResistanceM2KPerW": 1e-05
          }
        ]
      },
      "CapacityModeSelectionInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "requiredCapacityKw",
          "shellInletTemperatureC",
          "shellOutletTemperatureC",
          "co2InletTemperatureC",
          "co2InletPressureKPa"
        ],
        "properties": {
          "requiredCapacityKw": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Required duty in kW."
          },
          "capacityRangePercent": {
            "type": "number",
            "minimum": 0,
            "default": 5,
            "description": "Allowed capacity deviation around requiredCapacityKw, in percent."
          },
          "shellFluid": {
            "type": "string",
            "enum": [
              "Water",
              "EthyleneGlycol",
              "PropyleneGlycol"
            ],
            "default": "Water"
          },
          "approval": {
            "type": "string",
            "enum": [
              "Standard",
              "Marine"
            ],
            "default": "Marine"
          },
          "shellFluidConcentrationPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 60,
            "default": 0
          },
          "shellInletTemperatureC": {
            "type": "number",
            "description": "Shell-side inlet temperature in °C."
          },
          "shellOutletTemperatureC": {
            "type": "number",
            "description": "Target shell-side outlet temperature in °C."
          },
          "shellInletPressureKPa": {
            "type": "number",
            "minimum": 0,
            "default": 300,
            "description": "Absolute shell-side inlet pressure in kPa(a)."
          },
          "shellConnectionType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Flange",
              "Victaulic",
              "Threaded",
              null
            ]
          },
          "co2InletTemperatureC": {
            "type": "number",
            "description": "R744 inlet temperature in °C."
          },
          "co2Target": {
            "type": "string",
            "enum": [
              "OutletTemperature",
              "MassFlow"
            ],
            "default": "OutletTemperature"
          },
          "co2OutletTemperatureC": {
            "type": [
              "number",
              "null"
            ],
            "description": "Target R744 outlet temperature in °C when co2Target is OutletTemperature."
          },
          "co2MassFlowKgPerS": {
            "type": [
              "number",
              "null"
            ],
            "exclusiveMinimum": 0,
            "description": "Prescribed R744 mass flow in kg/s when co2Target is MassFlow."
          },
          "co2InletPressureKPa": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Absolute R744 inlet pressure in kPa(a)."
          },
          "tubeConnectionMaterial": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CarbonSteel",
              "StainlessSteel",
              null
            ]
          },
          "shellFoulingResistanceM2KPerW": {
            "type": "number",
            "minimum": 0,
            "maximum": 0.01,
            "default": 4.3e-05
          },
          "co2FoulingResistanceM2KPerW": {
            "type": "number",
            "minimum": 0,
            "maximum": 0.01,
            "default": 1e-05
          },
          "maxOverallLengthMm": {
            "type": [
              "number",
              "null"
            ]
          },
          "maxShellDiameterMm": {
            "type": [
              "number",
              "null"
            ]
          },
          "take": {
            "type": "integer",
            "minimum": 1,
            "default": 10
          }
        },
        "description": "The same capacity-selection input used by the UI and MCP. Mode-dependent fields are validated server-side; no physical tube-count field is accepted or returned."
      },
      "CapacitySelectionCalculationResult": {
        "type": "object",
        "required": [
          "status",
          "failureCode"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "NotCalculated",
              "ValidationError",
              "DependencyMissing",
              "SolverFailed"
            ]
          },
          "failureCode": {
            "type": "string",
            "description": "None on success; otherwise the machine-readable failure classification."
          },
          "failureDetails": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CapacitySelectionResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Present only when status=Success."
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalculationWarning"
            }
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationErrorInfo"
            }
          },
          "userFacingError": {
            "type": [
              "object",
              "null"
            ]
          },
          "traceArtifacts": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Technical trace artifacts; not populated by the public selection response."
          }
        }
      },
      "CapacitySelectionResponse": {
        "type": "object",
        "required": [
          "matches",
          "recommendations",
          "diagnostics",
          "baffleCodeToCount"
        ],
        "properties": {
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RatedGkCandidate"
            },
            "description": "Ranked calculated candidates. Each candidate carries its released geometry identity and baffle code; physical tube count is not included."
          },
          "recommendations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string"
                },
                "candidate": {
                  "$ref": "#/components/schemas/RatedGkCandidate"
                },
                "baseTypeKey": {
                  "type": "object"
                },
                "score": {
                  "type": "number"
                },
                "scoreBreakdown": {
                  "type": "object"
                }
              }
            }
          },
          "diagnostics": {
            "type": "object",
            "description": "Public selection counters. Internal preselection candidate details are omitted."
          },
          "baffleCodeToCount": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Released baffle code to support-baffle count mapping."
          }
        }
      },
      "PublicTypeRatingModelPage": {
        "type": "object",
        "required": [
          "total",
          "count",
          "skip",
          "take",
          "models"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "description": "Number of names matching the filter."
          },
          "count": {
            "type": "integer",
            "description": "Number of names in this page."
          },
          "skip": {
            "type": "integer"
          },
          "take": {
            "type": "integer"
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicTypeRatingModel"
            }
          }
        }
      },
      "PublicTypeRatingModel": {
        "type": "object",
        "required": [
          "gasCoolerName",
          "geometryCode",
          "baffleCode",
          "baffleCount"
        ],
        "properties": {
          "gasCoolerName": {
            "type": "string",
            "description": "Value to send as gasCoolerName."
          },
          "geometryCode": {
            "type": "string"
          },
          "baffleCode": {
            "type": "string"
          },
          "baffleCount": {
            "type": "integer"
          },
          "isCalculationType": {
            "type": "boolean",
            "description": "True for calculation-only geometries that are not orderable products."
          }
        }
      },
      "PublicR744SaturationState": {
        "type": "object",
        "required": [
          "pressureKPa",
          "criticalPressureKPa",
          "regime"
        ],
        "properties": {
          "pressureKPa": {
            "type": "number",
            "description": "Pressure the state was evaluated at, in kPa(a)."
          },
          "criticalPressureKPa": {
            "type": "number",
            "description": "R744 critical pressure, the routing threshold between the subcritical and the transcritical path."
          },
          "regime": {
            "type": "string",
            "enum": [
              "Subcritical",
              "Transcritical"
            ],
            "description": "Path a calculation at this pressure takes."
          },
          "saturationTemperatureC": {
            "type": [
              "number",
              "null"
            ],
            "description": "R744 saturation temperature in °C; null in the transcritical regime."
          },
          "requiredSubcoolingK": {
            "type": [
              "number",
              "null"
            ],
            "description": "Subcooling the subcritical path requires below the saturation temperature, in K."
          },
          "maxCo2OutletTemperatureC": {
            "type": [
              "number",
              "null"
            ],
            "description": "Highest co2OutletTemperatureC the subcritical path accepts at this pressure, in °C."
          }
        }
      },
      "CalculationResult": {
        "type": "object",
        "required": [
          "status",
          "failureCode"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "NotCalculated",
              "ValidationError",
              "DependencyMissing",
              "SolverFailed"
            ],
            "description": "Only Success means the calculation produced engineering values."
          },
          "failureCode": {
            "type": "string",
            "enum": [
              "None",
              "InvalidRequest",
              "MissingDatastore",
              "InvalidDatastore",
              "UnknownModelCode",
              "UnknownBaffleCode",
              "UnsupportedFluid",
              "IncompleteInput",
              "DesignLimitExceeded",
              "InvalidCorrelationRange",
              "PropertyEvaluationFailed",
              "PhysicalStateInvalid",
              "ThermalPinch",
              "InvalidZoneConfiguration",
              "NoValidDutyBracket",
              "GeometryTraceabilityGap",
              "CalculationTimedOut",
              "SolverDidNotConverge",
              "UnhandledException"
            ],
            "description": "None on success."
          },
          "failureDetails": {
            "type": [
              "string",
              "null"
            ],
            "description": "Technical failure detail."
          },
          "value": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RatingResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Present only when status=Success."
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalculationWarning"
            }
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationErrorInfo"
            }
          },
          "userFacingError": {
            "type": [
              "object",
              "null"
            ],
            "description": "Localised error information when available."
          },
          "traceArtifacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "RatingResponse": {
        "type": "object",
        "properties": {
          "result": {
            "$ref": "#/components/schemas/RatedGkCandidate"
          },
          "baffleCodeToCount": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Baffle code to baffle count mapping of the catalog."
          }
        }
      },
      "RatedGkCandidate": {
        "type": "object",
        "description": "Calculated result. Dimensions and connections are outputs, not inputs.",
        "properties": {
          "geometryCode": {
            "type": "string",
            "description": "Resolved catalog geometry."
          },
          "baseType": {
            "type": "string",
            "description": "Catalog base type."
          },
          "baffleCode": {
            "type": "string",
            "description": "Resolved baffle variant code."
          },
          "baffleCount": {
            "type": "integer",
            "description": "Resolved number of support baffles."
          },
          "requiredCapacityKw": {
            "type": "number",
            "description": "Duty required by the request."
          },
          "availableCapacityKw": {
            "type": "number",
            "description": "Duty the unit delivers at the operating point."
          },
          "capacityRatio": {
            "type": "number",
            "description": "availableCapacityKw / requiredCapacityKw; 0 when no duty was requested."
          },
          "overdesignFraction": {
            "type": "number",
            "description": "capacityRatio - 1."
          },
          "overallU_WPerM2K": {
            "type": "number",
            "description": "Overall heat-transfer coefficient."
          },
          "effectiveLMTD_K": {
            "type": "number",
            "description": "Effective logarithmic mean temperature difference."
          },
          "outerAreaM2": {
            "type": "number",
            "description": "Outer heat-transfer area."
          },
          "shellMassFlowKgPerS": {
            "type": "number",
            "description": "Resolved shell-side mass flow."
          },
          "co2MassFlowKgPerS": {
            "type": "number",
            "description": "R744 mass flow used in the calculation."
          },
          "shellOutletTemperatureC": {
            "type": "number",
            "description": "Calculated shell-side outlet temperature."
          },
          "co2OutletTemperatureC": {
            "type": "number",
            "description": "Calculated R744 outlet temperature."
          },
          "calculatedGasCoolerOutletTemperatureC": {
            "type": "number",
            "description": "Calculated R744 outlet temperature at the gas cooler outlet."
          },
          "r744ShellOutletApproachK": {
            "type": "number",
            "description": "Approach between R744 outlet and shell inlet."
          },
          "shellPressureDropKPa": {
            "type": "number",
            "description": "Shell-side pressure drop."
          },
          "co2PressureDropKPa": {
            "type": "number",
            "description": "Tube-side R744 pressure drop."
          },
          "shellVelocityMPerS": {
            "type": "number",
            "description": "Shell-side main crossflow velocity."
          },
          "co2VelocityMPerS": {
            "type": "number",
            "description": "Tube-side R744 velocity."
          },
          "co2MassFluxKgPerM2S": {
            "type": "number",
            "description": "Tube-side R744 mass flux."
          },
          "maxShellCutWindowVelocityMPerS": {
            "type": "number",
            "description": "Highest velocity in a baffle cut window."
          },
          "maxShellNozzleVelocityMPerS": {
            "type": "number",
            "description": "Highest shell nozzle velocity."
          },
          "maxCo2NozzleImpulseKgPerMS2": {
            "type": "number",
            "description": "Highest R744 nozzle impulse."
          },
          "maxShellVolumeFlowM3PerH": {
            "type": "number",
            "description": "Shell-side volume flow at the design limit."
          },
          "shellConnectionType": {
            "type": "string",
            "description": "Resolved shell connection design."
          },
          "shellConnectionOuterDiameterMm": {
            "type": "number",
            "description": "Resolved shell connection outer diameter."
          },
          "shellConnectionPositionMm": {
            "type": "number",
            "description": "Resolved shell connection position."
          },
          "tubeConnectionMaterial": {
            "type": "string",
            "description": "Resolved tube nozzle material."
          },
          "tubeInletConnectionOuterDiameterMm": {
            "type": "number",
            "description": "Resolved tube inlet connection outer diameter."
          },
          "tubeOutletConnectionOuterDiameterMm": {
            "type": "number",
            "description": "Resolved tube outlet connection outer diameter."
          },
          "refrigerantVolumeDm3": {
            "type": "number",
            "description": "Tube-side refrigerant volume."
          },
          "shellFluidVolumeDm3": {
            "type": "number",
            "description": "Shell-side fluid volume."
          },
          "shellEnvelopeVolumeM3": {
            "type": "number",
            "description": "Shell envelope volume."
          },
          "estimatedCostIndex": {
            "type": "number",
            "description": "Relative cost index used for ranking; not a price."
          },
          "geometryTraceabilityStatus": {
            "type": "string",
            "description": "Traceability state of the geometry record."
          },
          "alternativeTags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Category tags of the candidate."
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalculationWarning"
            },
            "description": "Warnings raised for this candidate."
          },
          "sheet": {
            "type": "object",
            "description": "Calculation sheet sections as shown in the tool."
          },
          "traceArtifacts": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Technical trace data."
          }
        }
      },
      "CalculationWarning": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Warning classification, e.g. EquationOutsideRecommendedRange."
          },
          "message": {
            "type": "string"
          },
          "violation": {
            "type": [
              "object",
              "null"
            ],
            "description": "Metric, actual value and limit when the warning is a limit violation."
          }
        }
      },
      "ValidationErrorInfo": {
        "type": "object",
        "properties": {
          "ruleId": {
            "type": "string",
            "description": "Stable rule identifier, e.g. public.type-rating.co2MassFlowKgPerS."
          },
          "field": {
            "type": "string",
            "description": "Rejected request field."
          },
          "message": {
            "type": "string"
          },
          "actual": {
            "type": [
              "number",
              "null"
            ]
          },
          "min": {
            "type": [
              "number",
              "null"
            ]
          },
          "max": {
            "type": [
              "number",
              "null"
            ]
          },
          "unit": {
            "type": "string"
          },
          "failureCode": {
            "type": "string",
            "enum": [
              "None",
              "InvalidRequest",
              "MissingDatastore",
              "InvalidDatastore",
              "UnknownModelCode",
              "UnknownBaffleCode",
              "UnsupportedFluid",
              "IncompleteInput",
              "DesignLimitExceeded",
              "InvalidCorrelationRange",
              "PropertyEvaluationFailed",
              "PhysicalStateInvalid",
              "ThermalPinch",
              "InvalidZoneConfiguration",
              "NoValidDutyBracket",
              "GeometryTraceabilityGap",
              "CalculationTimedOut",
              "SolverDidNotConverge",
              "UnhandledException"
            ]
          }
        }
      },
      "RateLimitError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "RateLimited"
          },
          "errorCode": {
            "type": "string",
            "enum": [
              "PublicTypeRatingRateLimitExceeded",
              "PublicCapacitySelectionRateLimitExceeded"
            ]
          },
          "details": {
            "type": "string"
          },
          "retryAfterSeconds": {
            "type": "integer"
          }
        }
      },
      "PublicTypeRatingQueryResponse": {
        "type": "object",
        "required": [
          "status",
          "failureCode",
          "request",
          "appliedDefaults"
        ],
        "description": "Compact answer of the GET form: the envelope of CalculationResult without the calculation sheet and the trace artifacts, plus the effective request and the defaults that were applied.",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "NotCalculated",
              "ValidationError",
              "DependencyMissing",
              "SolverFailed"
            ],
            "description": "Only Success means the calculation produced engineering values."
          },
          "failureCode": {
            "type": "string",
            "enum": [
              "None",
              "InvalidRequest",
              "MissingDatastore",
              "InvalidDatastore",
              "UnknownModelCode",
              "UnknownBaffleCode",
              "UnsupportedFluid",
              "IncompleteInput",
              "DesignLimitExceeded",
              "InvalidCorrelationRange",
              "PropertyEvaluationFailed",
              "PhysicalStateInvalid",
              "ThermalPinch",
              "InvalidZoneConfiguration",
              "NoValidDutyBracket",
              "GeometryTraceabilityGap",
              "CalculationTimedOut",
              "SolverDidNotConverge",
              "UnhandledException"
            ],
            "description": "None on success."
          },
          "failureDetails": {
            "type": [
              "string",
              "null"
            ]
          },
          "request": {
            "$ref": "#/components/schemas/PublicTypeRatingRequest"
          },
          "appliedDefaults": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Fields that were not supplied and were filled with the documented default."
          },
          "value": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "result": {
                "$ref": "#/components/schemas/RatedGkCandidate"
              }
            },
            "description": "Present on success. result carries the calculated fields without sheet and traceArtifacts."
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalculationWarning"
            }
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationErrorInfo"
            }
          }
        }
      }
    }
  }
}