Undo latest depreciation (organization)
curl --request DELETE \
--url https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest', 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/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Fixed assets and depreciation
Undo latest depreciation (organization)
Organization space, on a chosen book. Cancels the most recent depreciation row of an asset when it was not posted to an accounting entry.
DELETE
/
accounting
/
organization
/
books
/
{fixedAsset}
/
fixed-assets
/
{fixed_asset}
/
depreciations
/
latest
Undo latest depreciation (organization)
curl --request DELETE \
--url https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest', 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/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}/depreciations/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Organization space
Accounting module
For: Accountant · Permission:
fixed_assets.depreciate
Conditions
- The book must be one the caller’s access opens.
- The accounting module must be part of the organization’s plan.
- The asset must have at least one depreciation row.
- Only the latest depreciation row (by period start) can be rolled back, and only when it posted no accounting entry; a row with an entry must be undone by reversing that entry.
- The period of that row must be open.
- The asset must not be disposed of.
- A derogatory fiscal event tied to the row that already has reversals blocks the rollback.
- Deletes the depreciation row.
- Subtracts the row’s amounts from the asset’s accumulated depreciation and fiscal accumulated depreciation, sets the status back to active (or fully_depreciated when the base is still covered) and increments its version.
- Cancels each derogatory fiscal event created by that row and posts a reversal entry for its provision.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the accounting book, not of the asset: the generated path names the books segment {fixedAsset}; the asset is the {fixed_asset} segment.
Identifier of the fixed asset (27-character KSUID).
Query Parameters
Response mode. Default none; none answers 204 No Content.
Available options:
none Response
No Content (response mode none).