curl --request GET \
--url https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview', 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/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview"
req, _ := http.NewRequest("GET", 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.get("https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"fiscal_year_id": "<string>",
"result_amount": 123,
"result_direction": "credit",
"capital_amount": 123,
"legal_reserve_balance": 123,
"legal_reserve_ceiling": 123,
"legal_reserve_proposed": 123,
"retained_earnings_proposed": 123,
"allocations": [
{
"target": "retained_earnings",
"amount": "<string>"
}
],
"currency_code": "<string>",
"currency_exponent": 123
}{
"message": "<string>",
"errors": {}
}Preview result allocation (organization)
Organization space, on a chosen book. Shows the suggested allocation of a closed year’s result without recording anything.
curl --request GET \
--url https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview', 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/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview"
req, _ := http.NewRequest("GET", 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.get("https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}/result-allocation/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"fiscal_year_id": "<string>",
"result_amount": 123,
"result_direction": "credit",
"capital_amount": 123,
"legal_reserve_balance": 123,
"legal_reserve_ceiling": 123,
"legal_reserve_proposed": 123,
"retained_earnings_proposed": 123,
"allocations": [
{
"target": "retained_earnings",
"amount": "<string>"
}
],
"currency_code": "<string>",
"currency_exponent": 123
}{
"message": "<string>",
"errors": {}
}fiscal_years.allocate_result
Conditions
- The accounting module must be part of the organization’s plan.
- The year must be closed.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the accounting book (27-character KSUID string); the route parameter carries this name by mistake and does not name the year, which is given by fiscal_year.
Identifier of the fiscal year (27-character KSUID string).
Response
Identifier of the fiscal year the result belongs to (27-character KSUID string).
Absolute value of the year's result, in minor units (divide by 10 to the power currency_exponent). The direction is given by result_direction.
credit when the year closed with a profit (or a zero result), debit when it closed with a loss.
credit, debit Credit balance of the capital account at year end, in minor units; zero or negative balances count as no capital in the ceiling.
Credit balance of the legal reserve account at year end, in minor units.
Maximum the legal reserve may reach: 20 % of the capital, in minor units (0 when there is no capital).
Part of a profit the proposal puts into the legal reserve, in minor units: 10 % of the result, limited to what is left under the ceiling. 0 for a loss.
Part of the result the proposal puts into retained earnings, in minor units: the rest of a profit, or the whole loss.
The proposed split, as a list of objects with target (legal_reserve or retained_earnings) and amount in minor units. Targets with a zero amount are left out, so the list is empty when the result is zero. It is only a proposal: the posted allocation may differ.
Show child attributes
Show child attributes
Currency code of the fiscal year (ISO 4217).
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.