/v1/straight-line
Straight-line depreciation
Probeer het live
10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.
Het werkt. Haal een API-key op en gebruik hem in je project.
Verkrijg een API-sleutelCodefragmenten
curl "https://api.oanor.com/depreciation-api/v1/straight-line" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/depreciation-api/v1/straight-line", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/depreciation-api/v1/straight-line");
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/straight-line",
headers={"x-oanor-key": "oanor_test_..."}
)
Voorbeeldrespons
Een echte respons van dit endpoint, vastgelegd bij de laatste health check.
{
"data": {
"note": "Straight-line: equal annual depreciation = (cost − salvage) / life.",
"inputs": {
"cost": 10000,
"life": 5,
"salvage": 1000
},
"method": "straight-line",
"schedule": [
{
"year": 1,
"book_value": 8200,
"accumulated": 1800,
"depreciation": 1800
},
{
"year": 2,
"book_value": 6400,
"accumulated": 3600,
"depreciation": 1800
},
{
"year": 3,
"book_value": 4600,
"accumulated": 5400,
"depreciation": 1800
},
{
"year": 4,
"book_value": 2800,
"accumulated": 7200,
"depreciation": 1800
},
{
"year": 5,
"book_value": 1000,
"accumulated": 9000,
"depreciation": 1800
}
],
"total_depreciation": 9000,
"annual_depreciation": 1800
},
"meta": {
"timestamp": "2026-06-04T18:38:16.288Z",
"request_id": "bf9b00b2-7335-46f3-81bd-24e29cf4ed64"
},
"status": "ok",
"message": "Straight-line",
"success": true
}