Naar de inhoud
GET /v1/ratio

Split a volume by a mixing ratio

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/paint-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

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_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste 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
}