'https://api.swep.net/calculateSinglePhase', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "inputs": { "calculationMethod": "Design", "selectedFluidSide1": { "fluidId": 53, "isGas": false, "inputValue": null }, "selectedFluidSide2": { "fluidId": 53, "isGas": false, "inputValue": null }, "coCurrent": false, "selectedHeatExchangers": [ { "heatExchangerInputType": "Parent", "id": 1 } ], "heatLoad": { "amount": 1500, "unit": "HeatLoadUnit.Kilowatt" }, "inletTemperatureSide1": { "amount": 80, "unit": "TemperatureUnit.DegreeCelsius" }, "inletTemperatureSide2": { "amount": 20, "unit": "TemperatureUnit.DegreeCelsius" }, "outletTemperatureSide1": { "amount": 40, "unit": "TemperatureUnit.DegreeCelsius" }, "outletTemperatureSide2": { "amount": 50, "unit": "TemperatureUnit.DegreeCelsius" }, "flowSide1": null, "flowSide2": null, "maxPressureDropSide1": { "amount": 20000, "unit": "PressureUnit.Pascal" }, "maxPressureDropSide2": { "amount": 20000, "unit": "PressureUnit.Pascal" }, "numberOfPasses": null, "numberOfPlates": null, "numberOfPlatesStack1": null, "numberOfPlatesStack2": null, "oversurface": null, "portSwitch": true, "autoperformance": false } }', CURLOPT_HTTPHEADER => array( 'X-API-KEY: YOUR_API_KEY', 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;