curl --request GET \
--url https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"fiscal_period_id": "<string>",
"total": 123,
"assets": "<array>",
"skipped": "<array>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Preview depreciation run (client account)
Client space, on the client’s own books. Shows what a depreciation run would record for a period, and which assets would be skipped, without posting anything.
curl --request GET \
--url https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/depreciation-runs/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"fiscal_period_id": "<string>",
"total": 123,
"assets": "<array>",
"skipped": "<array>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}fixed_assets.depreciate
Conditions
- The accounting module must be part of the organization’s plan.
- fiscal_period_id is required.
- The period must have ended: a period whose last day is today or later is refused.
- The period must be open: a closed period is refused, because assets owed a closed period are caught up by the first open period instead.
- An asset is left out and listed in skipped when an earlier open period (or one it was depreciated in) has not been brought up to its target; earlier periods must be depreciated first.
- An asset whose currency differs from the fiscal year’s currency makes the call fail.
- An asset already depreciated in the period is not run again (one row per asset and period).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
A period of another book is unknown here; the service still resolves it in the book.
Response
Identifier of the period the run covers.
Total depreciation of the run in minor units (divide by 10 to the power currency_exponent): the sum of the economic amounts of the listed assets.
Assets that the run covers, one object each: fixed_asset_id, code, name, amount (economic depreciation for the period, in minor units), expense_account_id, depreciation_account_id, new_accumulated, fully_depreciated, fiscal_amount and new_fiscal_accumulated (null without a fiscal plan), and derogatory_gap (provision movement, in minor units, null without a fiscal plan).
Assets left out because an earlier period has not been depreciated yet, one object each: fixed_asset_id, code and reason (always earlier_period_undepreciated).