/v1/unit
Price per standard unit
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
curl "https://api.oanor.com/unitprice-api/v1/unit" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/unitprice-api/v1/unit", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/unitprice-api/v1/unit");
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/unitprice-api/v1/unit",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"note": "Unit price = pack price ÷ total quantity. Multipacks multiply size by count.",
"input": {
"size": 500,
"unit": "g",
"count": 1,
"price": 3,
"measure": "weight"
},
"unit_price": {
"per_g": 0.006,
"per_kg": 6,
"per_lb": 2.7216,
"per_100g": 0.6
},
"total_base_quantity": 500
},
"meta": {
"timestamp": "2026-06-04T01:59:20.297Z",
"request_id": "6074fb9e-00fd-414f-9825-f0c8cb1abb64"
},
"status": "ok",
"message": "Unit price",
"success": true
}