Ir al contenido
GET /v1/safety

Safety stock

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/inventory-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

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

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "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
}