/v1/sugar
Sugar from sugar-to-fruit ratio
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/jam-api/v1/sugar" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/jam-api/v1/sugar", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/jam-api/v1/sugar");
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/jam-api/v1/sugar",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"note": "Jam sugar is set by the sugar-to-fruit ratio: a traditional full-sugar jam is 1:1 (equal sugar and fruit), so 1 kg of fruit takes 1 kg of sugar for a 2 kg batch at 50 % sugar. Lower ratios (0.6–0.75) make a softer, fresher, less-sweet preserve but need added pectin and shorter keeping; the sugar is what preserves and helps the set, so dropping it changes both shelf life and gel.",
"inputs": {
"sugar_ratio": 1,
"fruit_weight_g": 1000
},
"sugar_g": 1000,
"sugar_pct": 50,
"total_batch_g": 2000
},
"meta": {
"timestamp": "2026-06-07T08:17:51.931Z",
"request_id": "532ebaa7-2c00-4e8e-8f47-5d430e285bc5"
},
"status": "ok",
"message": "Sugar",
"success": true
}