/v1/sum-of-years
Sum-of-years-digits depreciation
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/depreciation-api/v1/sum-of-years" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/depreciation-api/v1/sum-of-years", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/depreciation-api/v1/sum-of-years");
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/depreciation-api/v1/sum-of-years",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"note": "Sum-of-years-digits: year t depreciates (remaining_life / SYD) × (cost − salvage); SYD = n(n+1)/2. Accelerated, early-loaded.",
"inputs": {
"cost": 10000,
"life": 5,
"salvage": 1000
},
"method": "sum-of-years-digits",
"schedule": [
{
"year": 1,
"book_value": 7000,
"accumulated": 3000,
"depreciation": 3000
},
{
"year": 2,
"book_value": 4600,
"accumulated": 5400,
"depreciation": 2400
},
{
"year": 3,
"book_value": 2800,
"accumulated": 7200,
"depreciation": 1800
},
{
"year": 4,
"book_value": 1600,
"accumulated": 8400,
"depreciation": 1200
},
{
"year": 5,
"book_value": 1000,
"accumulated": 9000,
"depreciation": 600
}
],
"total_depreciation": 9000,
"sum_of_years_digits": 15
},
"meta": {
"timestamp": "2026-06-04T18:38:16.424Z",
"request_id": "f4c51e40-f873-4d6f-885e-3d85456e6505"
},
"status": "ok",
"message": "Sum-of-years-digits",
"success": true
}