Vai al contenuto
GET /v1/safety

Safety stock

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/inventory-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo 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
}