Vai al contenuto
GET /v1/hat

Convert a hat size

Provalo dal vivo

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

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

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

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "note": "US hat size = head circumference (inches) ÷ π in 1/8 steps; EU = head circumference in cm.",
        "input": {
            "from": "cm",
            "value": 57
        },
        "sizes": {
            "eu": 57,
            "uk": 7,
            "us": 7.125,
            "band": "M",
            "head_circumference_cm": 57,
            "head_circumference_in": 22.44
        }
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:01.234Z",
        "request_id": "4b32f7bf-a80e-4461-87e8-e23286e7a288"
    },
    "status": "ok",
    "message": "Convert a hat size",
    "success": true
}