/v1/grams-to-carat
Grams to carat and points
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/gemstone-api/v1/grams-to-carat" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/gemstone-api/v1/grams-to-carat", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/gemstone-api/v1/grams-to-carat");
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/gemstone-api/v1/grams-to-carat",
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": "Grams to carats: divide by 0.2 (or multiply by 5), since a carat is a fifth of a gram. A 0.3 g stone is 1.5 ct. Loose-stone scales read directly in carats, but a weight taken in grams — say on a kitchen or lab balance — converts straight across with this factor.",
"carat": 1.5,
"inputs": {
"grams": 0.3
},
"points": 150,
"milligrams": 300
},
"meta": {
"timestamp": "2026-06-07T08:17:54.244Z",
"request_id": "093c3ae7-f092-458c-86f5-f58d72f64dec"
},
"status": "ok",
"message": "Grams to carat",
"success": true
}