Zum Inhalt springen
GET /v1/ratio

Split a volume by a mixing ratio

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/paint-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "ratio": "4:1",
        "formula": "each component = total · part / sum(parts).",
        "ratio_sum": 5,
        "components": [
            {
                "index": 0,
                "label": "base",
                "ratio": 4,
                "amount": 4,
                "percent": 80
            },
            {
                "index": 1,
                "label": "hardener",
                "ratio": 1,
                "amount": 1,
                "percent": 20
            }
        ],
        "total_volume": 5
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:51.761Z",
        "request_id": "e970a496-bc21-469b-b587-36fd7aba509a"
    },
    "status": "ok",
    "message": "Split a volume by a mixing ratio",
    "success": true
}