/v1/meta
Spec
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/margin-api/v1/meta" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/margin-api/v1/meta", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/margin-api/v1/meta");
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/margin-api/v1/meta",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"name": "Margin & Markup API",
"notes": "Margin is profit ÷ price; markup is profit ÷ cost — the same price has a lower margin than markup. Two percentages alone (margin + markup) cannot give absolute amounts; include a cost, price or profit. This is pricing maths — for everyday percentage operations use a percentage API. Nothing is stored.",
"version": "v1",
"endpoints": [
{
"path": "/v1/margin",
"params": {
"cost": "unit cost",
"price": "selling price",
"round": "decimal places (default 2)",
"margin": "gross margin % (of price)",
"markup": "markup % (of cost)",
"profit": "profit per unit"
},
"returns": "cost, price, profit, margin % and markup %"
},
{
"path": "/v1/breakeven",
"params": {
"price": "selling price per unit (required)",
"round": "decimal places (default 2)",
"fixed_costs": "total fixed costs (required)",
"variable_cost": "variable cost per unit (default 0)"
},
"returns": "break-even units, revenue and contribution margin"
},
{
"path": "/v1/meta",
"params": [],
"returns": "this document"
}
],
"description": "Pricing and profitability maths. The margin endpoint solves the relationships between cost, selling price, gross margin (% of price), markup (% of cost) and profit — give it any two of them and it works out the rest, so you can price from a target margin, find the margin of an existing price, or convert markup to margin. The breakeven endpoint computes how many units (and how much revenue) you must sell to cover your fixed costs, given a unit price and variable cost, along with the contribution margin. Pure local maths, no key."
},
"meta": {
"timestamp": "2026-06-03T09:25:01.126Z",
"request_id": "3a1238fc-4c24-49fb-9a1c-742226d15e3f"
},
"status": "ok",
"message": "Meta",
"success": true
}