curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/fixed-assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<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,
"useful_life_months": 600,
"description": "<string>",
"salvage_value": 1,
"fiscal_useful_life_months": 600,
"fiscal_rate": 50000,
"acquisition_journal_entry_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/fixed-assets"
payload = {
"name": "<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,
"useful_life_months": 600,
"description": "<string>",
"salvage_value": 1,
"fiscal_useful_life_months": 600,
"fiscal_rate": 50000,
"acquisition_journal_entry_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({
name: '<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,
useful_life_months: 600,
description: '<string>',
salvage_value: 1,
fiscal_useful_life_months: 600,
fiscal_rate: 50000,
acquisition_journal_entry_id: '<string>'
})
};
fetch('https://api.exowpee.com/v1/accounting/client/fixed-assets', 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/fixed-assets",
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([
'name' => '<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,
'useful_life_months' => 600,
'description' => '<string>',
'salvage_value' => 1,
'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/client/fixed-assets"
payload := strings.NewReader("{\n \"name\": \"<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 \"useful_life_months\": 600,\n \"description\": \"<string>\",\n \"salvage_value\": 1,\n \"fiscal_useful_life_months\": 600,\n \"fiscal_rate\": 50000,\n \"acquisition_journal_entry_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/fixed-assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<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 \"useful_life_months\": 600,\n \"description\": \"<string>\",\n \"salvage_value\": 1,\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/client/fixed-assets")
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 \"name\": \"<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 \"useful_life_months\": 600,\n \"description\": \"<string>\",\n \"salvage_value\": 1,\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>"
}{
"message": "<string>",
"errors": {}
}Register a fixed asset (client account)
Client space, on the client’s own books. Adds an asset such as equipment or a vehicle with its cost, service date and depreciation plan.
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/fixed-assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<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,
"useful_life_months": 600,
"description": "<string>",
"salvage_value": 1,
"fiscal_useful_life_months": 600,
"fiscal_rate": 50000,
"acquisition_journal_entry_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/fixed-assets"
payload = {
"name": "<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,
"useful_life_months": 600,
"description": "<string>",
"salvage_value": 1,
"fiscal_useful_life_months": 600,
"fiscal_rate": 50000,
"acquisition_journal_entry_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({
name: '<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,
useful_life_months: 600,
description: '<string>',
salvage_value: 1,
fiscal_useful_life_months: 600,
fiscal_rate: 50000,
acquisition_journal_entry_id: '<string>'
})
};
fetch('https://api.exowpee.com/v1/accounting/client/fixed-assets', 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/fixed-assets",
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([
'name' => '<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,
'useful_life_months' => 600,
'description' => '<string>',
'salvage_value' => 1,
'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/client/fixed-assets"
payload := strings.NewReader("{\n \"name\": \"<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 \"useful_life_months\": 600,\n \"description\": \"<string>\",\n \"salvage_value\": 1,\n \"fiscal_useful_life_months\": 600,\n \"fiscal_rate\": 50000,\n \"acquisition_journal_entry_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/fixed-assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<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 \"useful_life_months\": 600,\n \"description\": \"<string>\",\n \"salvage_value\": 1,\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/client/fixed-assets")
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 \"name\": \"<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 \"useful_life_months\": 600,\n \"description\": \"<string>\",\n \"salvage_value\": 1,\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>"
}{
"message": "<string>",
"errors": {}
}fixed_assets.create
Conditions
- The accounting module must be part of the organization’s plan.
- The three accounts must belong to the book and be postable, and follow the SYSCOHADA classes: asset on class 2 but not 28 or 29, depreciation on 28, expense on 68.
- salvage_value must be below acquisition_cost, in_service_date on or after acquisition_date, acquisition_cost at least 1 and useful_life_months between 1 and 1200.
- A fiscal year of the book must cover the in-service date.
- The fiscal plan is all or nothing: without fiscal_method, fiscal_rate and fiscal_useful_life_months are refused; with it, fiscal_useful_life_months is required, and fiscal_rate too when the method is declining.
- acquisition_journal_entry_id, when sent, must be a posted entry of the book and organization, neither a reversal or refund nor itself reversed or refunded, dated the acquisition date, with a debit on the asset account matching the acquisition cost.
- Allocates the next asset code of the book (IM-000001, IM-000002, …) from a per-book sequence.
- Creates the asset as active, with zero accumulated depreciation and version 1, taking its currency and exponent from the fiscal year of the in-service date. No accounting entry is posted.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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
Name of the asset, up to 255 characters. Required.
255Asset account (class 2, not 28 or 29) of the book, postable. Required.
Accumulated depreciation account (class 28) of the book, postable. Required.
Depreciation expense account (class 68) of the book, postable. Required.
Date of acquisition, ISO 8601 date. Required.
Date depreciation starts, ISO 8601 date. Required; on or after acquisition_date and inside a fiscal year of the book.
Cost in minor units (divide by 10 to the power currency_exponent), an integer of at least 1. Required.
x >= 1Economic life in months, 1 to 1200. Required. Depreciation is linear.
1 <= x <= 1200Free-text description. Optional.
Residual value in minor units, an integer from 0 and below acquisition_cost. Optional; defaults to 0.
x >= 0Separate fiscal depreciation method: linear or declining. Optional; when omitted the asset has no fiscal plan and fiscal_rate and fiscal_useful_life_months must be omitted.
linear, declining Fiscal life in months, 1 to 1200. Required when fiscal_method is sent.
1 <= x <= 1200Rate for the declining fiscal method, integer 1 to 100000. Required when fiscal_method is declining.
1 <= x <= 100000Posted entry of the book that recorded the purchase, to link to the asset. Optional; it must be dated the acquisition date, not reversed or refunded, and debit the asset account for the acquisition cost.
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).