curl --request PUT \
--url https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"asset_account_id": "<string>",
"depreciation_account_id": "<string>",
"expense_account_id": "<string>",
"acquisition_date": "2023-11-07T05:31:56Z",
"in_service_date": "2023-11-07T05:31:56Z",
"acquisition_cost": 2,
"salvage_value": 1,
"useful_life_months": 600,
"fiscal_useful_life_months": 600,
"fiscal_rate": 50000,
"acquisition_journal_entry_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}"
payload = {
"name": "<string>",
"description": "<string>",
"asset_account_id": "<string>",
"depreciation_account_id": "<string>",
"expense_account_id": "<string>",
"acquisition_date": "2023-11-07T05:31:56Z",
"in_service_date": "2023-11-07T05:31:56Z",
"acquisition_cost": 2,
"salvage_value": 1,
"useful_life_months": 600,
"fiscal_useful_life_months": 600,
"fiscal_rate": 50000,
"acquisition_journal_entry_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
asset_account_id: '<string>',
depreciation_account_id: '<string>',
expense_account_id: '<string>',
acquisition_date: '2023-11-07T05:31:56Z',
in_service_date: '2023-11-07T05:31:56Z',
acquisition_cost: 2,
salvage_value: 1,
useful_life_months: 600,
fiscal_useful_life_months: 600,
fiscal_rate: 50000,
acquisition_journal_entry_id: '<string>'
})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'asset_account_id' => '<string>',
'depreciation_account_id' => '<string>',
'expense_account_id' => '<string>',
'acquisition_date' => '2023-11-07T05:31:56Z',
'in_service_date' => '2023-11-07T05:31:56Z',
'acquisition_cost' => 2,
'salvage_value' => 1,
'useful_life_months' => 600,
'fiscal_useful_life_months' => 600,
'fiscal_rate' => 50000,
'acquisition_journal_entry_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/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"asset_account_id\": \"<string>\",\n \"depreciation_account_id\": \"<string>\",\n \"expense_account_id\": \"<string>\",\n \"acquisition_date\": \"2023-11-07T05:31:56Z\",\n \"in_service_date\": \"2023-11-07T05:31:56Z\",\n \"acquisition_cost\": 2,\n \"salvage_value\": 1,\n \"useful_life_months\": 600,\n \"fiscal_useful_life_months\": 600,\n \"fiscal_rate\": 50000,\n \"acquisition_journal_entry_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"asset_account_id\": \"<string>\",\n \"depreciation_account_id\": \"<string>\",\n \"expense_account_id\": \"<string>\",\n \"acquisition_date\": \"2023-11-07T05:31:56Z\",\n \"in_service_date\": \"2023-11-07T05:31:56Z\",\n \"acquisition_cost\": 2,\n \"salvage_value\": 1,\n \"useful_life_months\": 600,\n \"fiscal_useful_life_months\": 600,\n \"fiscal_rate\": 50000,\n \"acquisition_journal_entry_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"asset_account_id\": \"<string>\",\n \"depreciation_account_id\": \"<string>\",\n \"expense_account_id\": \"<string>\",\n \"acquisition_date\": \"2023-11-07T05:31:56Z\",\n \"in_service_date\": \"2023-11-07T05:31:56Z\",\n \"acquisition_cost\": 2,\n \"salvage_value\": 1,\n \"useful_life_months\": 600,\n \"fiscal_useful_life_months\": 600,\n \"fiscal_rate\": 50000,\n \"acquisition_journal_entry_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"code": "<string>",
"name": "<string>",
"description": "<string>",
"asset_account_id": "<string>",
"asset_account": {},
"depreciation_account_id": "<string>",
"depreciation_account": {},
"expense_account_id": "<string>",
"expense_account": {},
"acquisition_date": "2023-12-25",
"in_service_date": "2023-12-25",
"acquisition_cost": 123,
"salvage_value": 123,
"useful_life_months": 123,
"method": "<string>",
"fiscal_method": "<string>",
"fiscal_rate": 123,
"fiscal_useful_life_months": 123,
"fiscal_accumulated_depreciation": 123,
"status": "<string>",
"accumulated_depreciation": 123,
"net_book_value": 123,
"acquisition_journal_entry_id": "<string>",
"disposal_date": "2023-12-25",
"disposal_proceeds": 123,
"disposal_journal_entry_id": "<string>",
"currency_code": "<string>",
"currency_exponent": 123,
"created_by": "<string>",
"created_by_type": "<string>",
"version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Edit a fixed asset (organization)
Organization space, on a chosen book. Changes an asset’s description or, while it has no depreciation yet, its cost, dates, accounts and plan.
curl --request PUT \
--url https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"asset_account_id": "<string>",
"depreciation_account_id": "<string>",
"expense_account_id": "<string>",
"acquisition_date": "2023-11-07T05:31:56Z",
"in_service_date": "2023-11-07T05:31:56Z",
"acquisition_cost": 2,
"salvage_value": 1,
"useful_life_months": 600,
"fiscal_useful_life_months": 600,
"fiscal_rate": 50000,
"acquisition_journal_entry_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}"
payload = {
"name": "<string>",
"description": "<string>",
"asset_account_id": "<string>",
"depreciation_account_id": "<string>",
"expense_account_id": "<string>",
"acquisition_date": "2023-11-07T05:31:56Z",
"in_service_date": "2023-11-07T05:31:56Z",
"acquisition_cost": 2,
"salvage_value": 1,
"useful_life_months": 600,
"fiscal_useful_life_months": 600,
"fiscal_rate": 50000,
"acquisition_journal_entry_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
asset_account_id: '<string>',
depreciation_account_id: '<string>',
expense_account_id: '<string>',
acquisition_date: '2023-11-07T05:31:56Z',
in_service_date: '2023-11-07T05:31:56Z',
acquisition_cost: 2,
salvage_value: 1,
useful_life_months: 600,
fiscal_useful_life_months: 600,
fiscal_rate: 50000,
acquisition_journal_entry_id: '<string>'
})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'asset_account_id' => '<string>',
'depreciation_account_id' => '<string>',
'expense_account_id' => '<string>',
'acquisition_date' => '2023-11-07T05:31:56Z',
'in_service_date' => '2023-11-07T05:31:56Z',
'acquisition_cost' => 2,
'salvage_value' => 1,
'useful_life_months' => 600,
'fiscal_useful_life_months' => 600,
'fiscal_rate' => 50000,
'acquisition_journal_entry_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/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"asset_account_id\": \"<string>\",\n \"depreciation_account_id\": \"<string>\",\n \"expense_account_id\": \"<string>\",\n \"acquisition_date\": \"2023-11-07T05:31:56Z\",\n \"in_service_date\": \"2023-11-07T05:31:56Z\",\n \"acquisition_cost\": 2,\n \"salvage_value\": 1,\n \"useful_life_months\": 600,\n \"fiscal_useful_life_months\": 600,\n \"fiscal_rate\": 50000,\n \"acquisition_journal_entry_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"asset_account_id\": \"<string>\",\n \"depreciation_account_id\": \"<string>\",\n \"expense_account_id\": \"<string>\",\n \"acquisition_date\": \"2023-11-07T05:31:56Z\",\n \"in_service_date\": \"2023-11-07T05:31:56Z\",\n \"acquisition_cost\": 2,\n \"salvage_value\": 1,\n \"useful_life_months\": 600,\n \"fiscal_useful_life_months\": 600,\n \"fiscal_rate\": 50000,\n \"acquisition_journal_entry_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fixedAsset}/fixed-assets/{fixed_asset}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"asset_account_id\": \"<string>\",\n \"depreciation_account_id\": \"<string>\",\n \"expense_account_id\": \"<string>\",\n \"acquisition_date\": \"2023-11-07T05:31:56Z\",\n \"in_service_date\": \"2023-11-07T05:31:56Z\",\n \"acquisition_cost\": 2,\n \"salvage_value\": 1,\n \"useful_life_months\": 600,\n \"fiscal_useful_life_months\": 600,\n \"fiscal_rate\": 50000,\n \"acquisition_journal_entry_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"code": "<string>",
"name": "<string>",
"description": "<string>",
"asset_account_id": "<string>",
"asset_account": {},
"depreciation_account_id": "<string>",
"depreciation_account": {},
"expense_account_id": "<string>",
"expense_account": {},
"acquisition_date": "2023-12-25",
"in_service_date": "2023-12-25",
"acquisition_cost": 123,
"salvage_value": 123,
"useful_life_months": 123,
"method": "<string>",
"fiscal_method": "<string>",
"fiscal_rate": 123,
"fiscal_useful_life_months": 123,
"fiscal_accumulated_depreciation": 123,
"status": "<string>",
"accumulated_depreciation": 123,
"net_book_value": 123,
"acquisition_journal_entry_id": "<string>",
"disposal_date": "2023-12-25",
"disposal_proceeds": 123,
"disposal_journal_entry_id": "<string>",
"currency_code": "<string>",
"currency_exponent": 123,
"created_by": "<string>",
"created_by_type": "<string>",
"version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}fixed_assets.update
Conditions
- The book must be one the caller’s access opens.
- The accounting module must be part of the organization’s plan.
- Once the asset has any depreciation row or is no longer active, only name and description may change; other fields may be sent only with their current values.
- in_service_date cannot be before acquisition_date, and salvage_value must stay below acquisition_cost.
- The fiscal plan stays all or nothing: a fiscal_method needs fiscal_useful_life_months (and fiscal_rate when declining); clearing the method needs the other two cleared.
- While unlocked, the three accounts are checked again against the SYSCOHADA classes, and a changed in-service date needs a fiscal year covering it.
- The acquisition entry is checked again only when it, the asset account, the acquisition date or the cost changes.
- Increments the asset’s version. When the in-service date changes, the currency is refreshed from the fiscal year covering it. No accounting entry is posted.
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.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, owner_type, code, name, description, asset_account_id, depreciation_account_id, expense_account_id, acquisition_date, in_service_date, acquisition_cost, salvage_value, useful_life_months, method, fiscal_method, fiscal_rate, fiscal_useful_life_months, fiscal_accumulated_depreciation, status, accumulated_depreciation, acquisition_journal_entry_id, disposal_date, disposal_proceeds, disposal_journal_entry_id, currency_code, currency_exponent, created_by, created_by_type, version, created_at, updated_at, net_book_value.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: assetAccount, depreciationAccount, expenseAccount.
Body
New name, up to 255 characters. Optional; null or missing keeps the current one.
255New description. Optional; sending null clears it, omitting it keeps the current one.
New asset account (class 2). Optional; changeable only while the asset is active and has no depreciation.
New depreciation account (class 28). Optional; changeable only while the asset is active and has no depreciation.
New expense account (class 68). Optional; changeable only while the asset is active and has no depreciation.
New acquisition date, ISO 8601 date. Optional; locked once the asset is depreciated or not active.
New in-service date, ISO 8601 date, not before the acquisition date. Optional; locked once depreciated or not active.
New cost in minor units, integer of at least 1. Optional; locked once depreciated or not active.
x >= 1New residual value in minor units, below the cost. Optional; locked once depreciated or not active.
x >= 0New economic life in months, 1 to 1200. Optional; locked once depreciated or not active.
1 <= x <= 1200New fiscal method (linear or declining). Sending null clears the fiscal plan, which then needs fiscal_rate and fiscal_useful_life_months cleared too. Locked once depreciated or not active.
linear, declining New fiscal life in months, 1 to 1200. Sending null clears it. Locked once depreciated or not active.
1 <= x <= 1200New rate for the declining fiscal method, 1 to 100000. Sending null clears it. Locked once depreciated or not active.
1 <= x <= 100000Entry linked as the purchase record. Sending null unlinks it. Checked again only when it or the asset account, date or cost changes.
Response
Resource (only with response=resource).
Identifier of the asset (27-character KSUID).
Kind of book that owns the asset; set by the server.
Asset number allocated by the server per book, in the form IM-000001.
Name of the asset.
Free-text description; null when none.
Identifier of the asset account (class 2) the cost is carried on.
The asset account, an object, present only with ?include=assetAccount and when the caller may retrieve accounting accounts.
Identifier of the accumulated depreciation account (class 28).
The depreciation account, an object, present only with ?include=depreciationAccount and when the caller may retrieve accounting accounts.
Identifier of the depreciation expense account (class 68).
The expense account, an object, present only with ?include=expenseAccount and when the caller may retrieve accounting accounts.
Date the asset was acquired, ISO 8601 date.
Date depreciation starts from, ISO 8601 date. The service month counts when its day is 15 or earlier.
Cost of the asset in minor units (divide by 10 to the power currency_exponent).
Residual value in minor units, below the cost; 0 when not sent. The depreciable base is cost minus salvage value.
Economic useful life in months, between 1 and 1200.
Economic depreciation method; always linear, set by the server.
Fiscal depreciation method, linear or declining; null when the asset follows its economic plan for tax too.
Rate of the declining fiscal method; null otherwise. Integer from 1 to 100000, used in the declining-balance computation: each month takes the larger of the remaining base times rate divided by 120000 and the remaining base spread over the months left.
Fiscal useful life in months; null without a fiscal plan.
Fiscal depreciation recorded so far, in minor units.
active while depreciation can still run, fully_depreciated once the depreciable base is reached, disposed after a sale or scrapping.
Economic depreciation posted so far, in minor units.
Acquisition cost minus accumulated depreciation, in minor units; computed by the server.
Identifier of the posted accounting entry that recorded the purchase, when linked; null otherwise.
Date of the disposal, ISO 8601 date; null until disposed.
Proceeds of the disposal in minor units; null until disposed.
Identifier of the disposal accounting entry; null until disposed.
Three-letter currency code, taken from the fiscal year of the in-service date.
Number of decimal places of the currency (0 for XOF). An amount in minor units divided by 10 to this power gives the amount in the currency.
Identifier of the member or agent account that registered the asset.
Kind of actor that registered the asset.
Counter starting at 1 and increased by every change, run, rollback or disposal.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).