Zum Inhalt springen
GET /v1/bags

Bags needed for a volume

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/mulch-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/mulch-api/v1/bags" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/mulch-api/v1/bags", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/mulch-api/v1/bags");
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/mulch-api/v1/bags",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "note": "Bags = ⌈total litres / bag size⌉. A 50 L bag yields 0.05 m³, so 3.75 m³ needs 75 bags.",
        "inputs": {
            "volume_m3": 3.75,
            "bag_liters": 50
        },
        "exact_bags": 75,
        "bags_needed": 75,
        "total_liters": 3750
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:21.225Z",
        "request_id": "8ae5b5b9-3e5e-4eec-9b07-e03eacd3a041"
    },
    "status": "ok",
    "message": "Bags needed",
    "success": true
}