Ir al contenido
GET /v1/average

Weighted component average

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/gradecalc-api

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

Obtener una clave API

Fragmentos de código

curl "https://api.oanor.com/gradecalc-api/v1/average" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/gradecalc-api/v1/average", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/gradecalc-api/v1/average");
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/gradecalc-api/v1/average",
    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": "Weighted average = Σ(score × weight) ÷ Σ(weight). If weights sum to under 100, the remaining weight is what is still ungraded.",
        "input": {
            "components": [
                {
                    "score": 90,
                    "weight": 40
                },
                {
                    "score": 80,
                    "weight": 60
                }
            ]
        },
        "weighted_average": 84,
        "total_weight_percent": 100,
        "remaining_weight_percent": 0
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:15.491Z",
        "request_id": "9df5e408-b91e-4497-bda8-ab1105edc020"
    },
    "status": "ok",
    "message": "Weighted component average",
    "success": true
}