Zum Inhalt springen
GET /v1/safety

Safety stock

Live testen

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

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

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

API-Key holen

Code-Snippets

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

Beispiel-Response

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

{
    "data": {
        "note": "Safety stock = Z × σ × √lead_time. Z is the normal-distribution value for the target service level (95 % → 1.645).",
        "inputs": {
            "service_level": 95,
            "demand_std_dev": 10,
            "lead_time_days": 7
        },
        "z_score": 1.6449,
        "safety_stock": 43.5187
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:18.643Z",
        "request_id": "04526d05-b77d-48e7-b502-84d92580ac6b"
    },
    "status": "ok",
    "message": "Safety stock",
    "success": true
}