Run period depreciation (client account)
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/depreciation-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fiscal_period_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/depreciation-runs"
payload = { "fiscal_period_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fiscal_period_id: '<string>'})
};
fetch('https://api.exowpee.com/v1/accounting/client/depreciation-runs', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fiscal_period_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/accounting/client/depreciation-runs"
payload := strings.NewReader("{\n \"fiscal_period_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/accounting/client/depreciation-runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fiscal_period_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/depreciation-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fiscal_period_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
"<unknown>"
]{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Fixed assets and depreciation
Run period depreciation (client account)
Client space, on the client’s own books. Calculates and records the depreciation of every eligible fixed asset for a chosen period in one accounting entry.
POST
/
accounting
/
client
/
depreciation-runs
Run period depreciation (client account)
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/depreciation-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fiscal_period_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/depreciation-runs"
payload = { "fiscal_period_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fiscal_period_id: '<string>'})
};
fetch('https://api.exowpee.com/v1/accounting/client/depreciation-runs', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fiscal_period_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/accounting/client/depreciation-runs"
payload := strings.NewReader("{\n \"fiscal_period_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/accounting/client/depreciation-runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fiscal_period_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/depreciation-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fiscal_period_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
"<unknown>"
]{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Client space
Accounting module
For: Accountant · Permission:
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).
- The call is refused when no asset has anything to depreciate in the period, and when every candidate is skipped because of an earlier period.
- Posts one accounting entry in the miscellaneous-operations journal, dated the last day of the period, described as the period’s depreciation allowance. It debits the expense account and credits the depreciation account of each asset (amounts of the same account are added together). No entry is posted when the total is zero.
- Records one depreciation row per asset for the period, with the economic amount, the fiscal amount when the asset has a fiscal plan, and the entry it belongs to.
- Raises the accumulated depreciation of each asset (and its fiscal accumulated depreciation when it has a fiscal plan), sets its status to fully_depreciated once the depreciable base is reached and active otherwise, and increments its version.
- When an asset’s fiscal depreciation runs ahead of its economic one, opens a derogatory depreciation fiscal event and posts its provision entry; when the gap shrinks, takes part of the open provision back with a reversal entry.
- Allocates a source reference to the entry made of the period and a run counter, so a later run for the same period (for assets added after the first run) posts its own entry.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Shared by the preview and the run.
Identifier of the fiscal period to depreciate (27-character KSUID string), a period of the selected book. Required. Used both for the preview and for the run.