/v1/area
Sloped roof area
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/roofpitch-api/v1/area" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/roofpitch-api/v1/area", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/roofpitch-api/v1/area");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/roofpitch-api/v1/area",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"note": "Sloped roof area = footprint / cos(angle). The footprint is the flat plan area covered by the roof; multiply by the pitch multiplier to get the true surface area for materials.",
"inputs": {
"angle_deg": 26.565051,
"footprint_area": 100
},
"roof_area": 111.803399,
"pitch_multiplier": 1.11803399
},
"meta": {
"timestamp": "2026-06-05T19:50:23.277Z",
"request_id": "9891adef-94b4-4bda-a30b-1d26f78e7ac6"
},
"status": "ok",
"message": "Roof area",
"success": true
}