Aller au contenu
GET /v1/soil-state

Bank ↔ loose ↔ compacted

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/earthwork-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/earthwork-api/v1/soil-state" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/earthwork-api/v1/soil-state", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/earthwork-api/v1/soil-state");
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/earthwork-api/v1/soil-state",
    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": "Soil changes volume as it is handled: excavating bank (in-situ) material loosens it — loose = bank × (1 + swell %), ~25 % for common soil — so you haul more cubic yards than you cut; placing and compacting it shrinks it below bank — compacted = bank × (1 − shrinkage %), ~10 %. So a balanced cut-and-fill needs MORE bank cut than the compacted fill volume; size trucks on loose and earthwork balance on compacted.",
        "inputs": {
            "swell_pct": 25,
            "shrinkage_pct": 10,
            "bank_cubic_yards": 1000
        },
        "load_factor": 0.8,
        "shrinkage_factor": 0.9,
        "loose_cubic_yards": 1250,
        "compacted_cubic_yards": 900
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:02.633Z",
        "request_id": "7ca8648c-91f0-40ee-bdcd-9fd1d6825563"
    },
    "status": "ok",
    "message": "Soil state",
    "success": true
}