Aller au contenu
GET /v1/target-weight

Weight to reach a target MC

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/woodmoisture-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/woodmoisture-api/v1/target-weight" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/woodmoisture-api/v1/target-weight", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/woodmoisture-api/v1/target-weight");
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/woodmoisture-api/v1/target-weight",
    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": "To dry wood to a target moisture content, find the unchanging oven-dry weight (current ÷ (1 + current MC/100)), then the target weight = dry × (1 + target MC/100); the difference is the water to drive off. Taking 120 g at 20 % down to 12 % means a 112 g target and 8 g of water to lose — weigh the piece down to that figure and it is there. A negative water-to-lose means the wood would instead gain moisture to reach the target.",
        "inputs": {
            "target_mc_pct": 12,
            "current_mc_pct": 20,
            "current_weight_g": 120
        },
        "target_weight_g": 112,
        "water_to_lose_g": 8,
        "oven_dry_weight_g": 100
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:53.933Z",
        "request_id": "93570c8d-5ecf-4fc1-81e9-9beea8ab78c4"
    },
    "status": "ok",
    "message": "Target weight",
    "success": true
}