curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/fiscal-events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subtype": "<string>",
"label": "<string>",
"fiscal_year_id": "<string>",
"accounting_date": "2023-12-25",
"amount": 2,
"description": "<string>",
"provision_account_id": "<string>",
"counterpart_account_id": "<string>",
"subject_type": "fixed_asset",
"subject_id": "<string>",
"expected_reversal_on": "2023-12-25"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/fiscal-events"
payload = {
"subtype": "<string>",
"label": "<string>",
"fiscal_year_id": "<string>",
"accounting_date": "2023-12-25",
"amount": 2,
"description": "<string>",
"provision_account_id": "<string>",
"counterpart_account_id": "<string>",
"subject_type": "fixed_asset",
"subject_id": "<string>",
"expected_reversal_on": "2023-12-25"
}
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({
subtype: '<string>',
label: '<string>',
fiscal_year_id: '<string>',
accounting_date: '2023-12-25',
amount: 2,
description: '<string>',
provision_account_id: '<string>',
counterpart_account_id: '<string>',
subject_type: 'fixed_asset',
subject_id: '<string>',
expected_reversal_on: '2023-12-25'
})
};
fetch('https://api.exowpee.com/v1/accounting/client/fiscal-events', 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/fiscal-events",
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([
'subtype' => '<string>',
'label' => '<string>',
'fiscal_year_id' => '<string>',
'accounting_date' => '2023-12-25',
'amount' => 2,
'description' => '<string>',
'provision_account_id' => '<string>',
'counterpart_account_id' => '<string>',
'subject_type' => 'fixed_asset',
'subject_id' => '<string>',
'expected_reversal_on' => '2023-12-25'
]),
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/fiscal-events"
payload := strings.NewReader("{\n \"subtype\": \"<string>\",\n \"label\": \"<string>\",\n \"fiscal_year_id\": \"<string>\",\n \"accounting_date\": \"2023-12-25\",\n \"amount\": 2,\n \"description\": \"<string>\",\n \"provision_account_id\": \"<string>\",\n \"counterpart_account_id\": \"<string>\",\n \"subject_type\": \"fixed_asset\",\n \"subject_id\": \"<string>\",\n \"expected_reversal_on\": \"2023-12-25\"\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/fiscal-events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subtype\": \"<string>\",\n \"label\": \"<string>\",\n \"fiscal_year_id\": \"<string>\",\n \"accounting_date\": \"2023-12-25\",\n \"amount\": 2,\n \"description\": \"<string>\",\n \"provision_account_id\": \"<string>\",\n \"counterpart_account_id\": \"<string>\",\n \"subject_type\": \"fixed_asset\",\n \"subject_id\": \"<string>\",\n \"expected_reversal_on\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/fiscal-events")
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 \"subtype\": \"<string>\",\n \"label\": \"<string>\",\n \"fiscal_year_id\": \"<string>\",\n \"accounting_date\": \"2023-12-25\",\n \"amount\": 2,\n \"description\": \"<string>\",\n \"provision_account_id\": \"<string>\",\n \"counterpart_account_id\": \"<string>\",\n \"subject_type\": \"fixed_asset\",\n \"subject_id\": \"<string>\",\n \"expected_reversal_on\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"profile": "<string>",
"subtype": "<string>",
"label": "<string>",
"description": "<string>",
"fiscal_year_id": "<string>",
"fiscal_year": {},
"provision_account_id": "<string>",
"provision_account": {},
"counterpart_account_id": "<string>",
"counterpart_account": {},
"subject_type": "<string>",
"subject_id": "<string>",
"amount": 123,
"reversed_amount": 123,
"remaining_amount": 123,
"status": "<string>",
"expected_reversal_on": "2023-12-25",
"currency_code": "<string>",
"currency_exponent": 123,
"dotation_journal_entry_id": "<string>",
"origin_journal_entry_id": "<string>",
"reversals": "<array>",
"created_by": "<string>",
"created_by_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Record a fiscal event (client account)
Records a tax provision or deferral for a fiscal year and posts its opening entry (client space).
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/fiscal-events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subtype": "<string>",
"label": "<string>",
"fiscal_year_id": "<string>",
"accounting_date": "2023-12-25",
"amount": 2,
"description": "<string>",
"provision_account_id": "<string>",
"counterpart_account_id": "<string>",
"subject_type": "fixed_asset",
"subject_id": "<string>",
"expected_reversal_on": "2023-12-25"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/fiscal-events"
payload = {
"subtype": "<string>",
"label": "<string>",
"fiscal_year_id": "<string>",
"accounting_date": "2023-12-25",
"amount": 2,
"description": "<string>",
"provision_account_id": "<string>",
"counterpart_account_id": "<string>",
"subject_type": "fixed_asset",
"subject_id": "<string>",
"expected_reversal_on": "2023-12-25"
}
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({
subtype: '<string>',
label: '<string>',
fiscal_year_id: '<string>',
accounting_date: '2023-12-25',
amount: 2,
description: '<string>',
provision_account_id: '<string>',
counterpart_account_id: '<string>',
subject_type: 'fixed_asset',
subject_id: '<string>',
expected_reversal_on: '2023-12-25'
})
};
fetch('https://api.exowpee.com/v1/accounting/client/fiscal-events', 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/fiscal-events",
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([
'subtype' => '<string>',
'label' => '<string>',
'fiscal_year_id' => '<string>',
'accounting_date' => '2023-12-25',
'amount' => 2,
'description' => '<string>',
'provision_account_id' => '<string>',
'counterpart_account_id' => '<string>',
'subject_type' => 'fixed_asset',
'subject_id' => '<string>',
'expected_reversal_on' => '2023-12-25'
]),
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/fiscal-events"
payload := strings.NewReader("{\n \"subtype\": \"<string>\",\n \"label\": \"<string>\",\n \"fiscal_year_id\": \"<string>\",\n \"accounting_date\": \"2023-12-25\",\n \"amount\": 2,\n \"description\": \"<string>\",\n \"provision_account_id\": \"<string>\",\n \"counterpart_account_id\": \"<string>\",\n \"subject_type\": \"fixed_asset\",\n \"subject_id\": \"<string>\",\n \"expected_reversal_on\": \"2023-12-25\"\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/fiscal-events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subtype\": \"<string>\",\n \"label\": \"<string>\",\n \"fiscal_year_id\": \"<string>\",\n \"accounting_date\": \"2023-12-25\",\n \"amount\": 2,\n \"description\": \"<string>\",\n \"provision_account_id\": \"<string>\",\n \"counterpart_account_id\": \"<string>\",\n \"subject_type\": \"fixed_asset\",\n \"subject_id\": \"<string>\",\n \"expected_reversal_on\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/fiscal-events")
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 \"subtype\": \"<string>\",\n \"label\": \"<string>\",\n \"fiscal_year_id\": \"<string>\",\n \"accounting_date\": \"2023-12-25\",\n \"amount\": 2,\n \"description\": \"<string>\",\n \"provision_account_id\": \"<string>\",\n \"counterpart_account_id\": \"<string>\",\n \"subject_type\": \"fixed_asset\",\n \"subject_id\": \"<string>\",\n \"expected_reversal_on\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"profile": "<string>",
"subtype": "<string>",
"label": "<string>",
"description": "<string>",
"fiscal_year_id": "<string>",
"fiscal_year": {},
"provision_account_id": "<string>",
"provision_account": {},
"counterpart_account_id": "<string>",
"counterpart_account": {},
"subject_type": "<string>",
"subject_id": "<string>",
"amount": 123,
"reversed_amount": 123,
"remaining_amount": 123,
"status": "<string>",
"expected_reversal_on": "2023-12-25",
"currency_code": "<string>",
"currency_exponent": 123,
"dotation_journal_entry_id": "<string>",
"origin_journal_entry_id": "<string>",
"reversals": "<array>",
"created_by": "<string>",
"created_by_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}fiscal_events.create
Conditions
- The accounting module must be part of the organization’s plan.
- Only the profiles provision and regularization can be opened by hand; derogatory depreciation and reinvestment gain are created by depreciation runs and disposals.
- The subtype must belong to the chosen profile; otherwise the call is refused.
- The accounting date must fall within the chosen fiscal year, and in an open fiscal period.
- The provision account and counterpart account, when sent, must exist in the book and be postable; when omitted the profile’s default chart account is looked up by code in the book and must exist.
- For the regularization profile the counterpart account is required, because accruals and deferrals have no default counterpart.
- subject_type and subject_id must be sent together; the only subject type is fixed_asset.
- A regularization event cannot be added to a fiscal year that has already been carried forward.
- The amount must be a positive integer.
- Posts the opening entry (dotation) in the miscellaneous (OD) journal: the provision account is posted in the profile’s direction and the counterpart account in the opposite direction, for the event amount.
- Stores the event with status open, nothing reversed, the fiscal year’s currency, and the creating actor; the opening entry id is saved on the event.
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, profile, subtype, label, description, fiscal_year_id, provision_account_id, counterpart_account_id, subject_type, subject_id, amount, reversed_amount, status, expected_reversal_on, currency_code, currency_exponent, dotation_journal_entry_id, origin_journal_entry_id, created_by, created_by_type, created_at, updated_at, remaining_amount.
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: provisionAccount, counterpartAccount, fiscalYear, reversals.
Body
The year, the accounts and the subject must belong to the selected book: an id of another book is unknown here (422). The only subject is a fixed asset of the book.
Kind of event. Required. provision (a provision or impairment) or regularization (accruals and deferrals); the other profiles are created only by depreciation runs and disposals and are refused here.
provision, regularization Required, up to 64 characters. Must be a subtype of the chosen profile: for provision, for example litigation, customer_warranty, tax, pension, inventory, receivable or an impairment type; for regularization, cca, pca, cap or par. The subtype sets the default accounts and direction.
64Required name of the event, up to 255 characters. It is used as the label of the posted entry lines.
255Required. Identifier of the fiscal year the event belongs to (27-character KSUID string). It must be a year of the selected book.
Required. Accounting date of the opening entry, ISO 8601 date. It must fall within the fiscal year chosen above and in an open fiscal period.
Required. Amount of the event, in minor units (an integer of at least 1; divide by 10 to the power currency_exponent). The currency is the fiscal year's.
x >= 1Optional free-text description.
Optional identifier of the provision (balance sheet) account (27-character KSUID string), a postable account of the selected book. When omitted the subtype's default account is looked up in the book by its chart code.
Identifier of the counterpart (expense or income) account (27-character KSUID string), a postable account of the selected book. Required when the profile is regularization; otherwise optional and defaulted from the subtype (for example 691 or 697).
Type of record the event relates to. The only value is fixed_asset. Required when subject_id is sent.
fixed_asset Identifier of the fixed asset the event relates to (27-character KSUID string). Required when subject_type is sent.
Optional date the event is expected to be taken back, ISO 8601 date. It drives the overdue filter of the list; it does not reverse anything by itself.
Response
Resource (only with response=resource).
Identifier of the fiscal event (27-character KSUID string).
Kind of book that owns the event, set by the server from the selected book (organization or client).
Kind of event: provision, regularization (accruals and deferrals), derogatory_depreciation or reinvestment_gain. The last two are created by depreciation runs and disposals.
Subtype inside the profile, for example litigation, inventory, receivable, cca, pca, cap, par, derogatory.
Name of the event.
Free-text description, null when none was given.
Identifier of the fiscal year the event belongs to (27-character KSUID string).
The fiscal year, only when requested through include=fiscalYear and the caller may view fiscal years.
Identifier of the provision (balance sheet) account (27-character KSUID string).
The provision account, only when requested through include=provisionAccount and the caller may view accounting accounts.
Identifier of the counterpart (expense or income) account (27-character KSUID string).
The counterpart account, only when requested through include=counterpartAccount and the caller may view accounting accounts.
Type of record the event relates to; fixed_asset or null.
Identifier of the fixed asset the event relates to (27-character KSUID string), null when none.
Total amount of the event, in minor units (divide by 10 to the power currency_exponent).
Part of the amount already taken back, in minor units.
Amount still standing: amount minus reversed_amount, in minor units.
open (nothing taken back), partially_reversed, reversed (fully taken back) or cancelled (opening entry reversed).
Date the event is expected to be taken back (ISO 8601 date), null when not set.
Currency code of the event (ISO 4217), copied from the fiscal year.
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 opening (dotation) journal entry (27-character KSUID string), null when none.
Identifier of the journal entry of a depreciation run or disposal that opened the event, null for events opened by hand. Such events cannot be cancelled by hand.
The reversals recorded on the event, only when requested through include=reversals.
Identifier of the actor who created the event.
Type of the actor who created the event.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).