curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close', 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-years/{fiscalYear}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/client/fiscal-years/{fiscalYear}/close"
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"currency_code": "<string>",
"currency_exponent": 123,
"is_closed": true,
"closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Close a fiscal year (client account)
Client space, on the client’s own books. Closes the year once all its periods are closed (and their VAT declared, when the book declares VAT), moving the year’s result into the result accounts.
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close', 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-years/{fiscalYear}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/client/fiscal-years/{fiscalYear}/close"
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/fiscal-years/{fiscalYear}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"currency_code": "<string>",
"currency_exponent": 123,
"is_closed": true,
"closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}fiscal_years.close
Conditions
- The accounting module must be part of the organization’s plan.
- A year that is already closed is refused.
- Every fiscal period of the year must be closed.
- Once a VAT declaration exists in the book, every period of the year from the first declared period onward must have its VAT declaration; the first period without one blocks the close.
- Every earlier fiscal year of the book must already be closed.
- When the previous year is closed and had a non-zero result, that result must already be allocated; otherwise the close is refused.
- Posts closing entries in the closing journal (CL) dated on the year’s end date: one clears the revenue accounts (class 7) and one clears the expense accounts (classes 6 and 8) into the net result account (131).
- When the year ends in a loss, posts a third entry moving the loss from 131 to the loss result account (139).
- Marks the year as closed with the closing time and author. Entries dated in the year are refused because its periods are all closed, not because of this flag.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the fiscal year (27-character KSUID string).
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, label, start_date, end_date, currency_code, currency_exponent, is_closed, closed_at, created_at, updated_at.
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: .
Response
Resource (only with response=resource).
Identifier of the fiscal year (27-character KSUID).
Kind of book that owns the year; set by the server from the selected book.
Name of the fiscal year.
First day of the year, ISO 8601 date.
Last day of the year, ISO 8601 date.
Three-letter currency code in which the year's entries are kept.
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.
True once the year is closed by the year-end closing; years start open.
When the year was closed, ISO 8601; null while it is open or after it is reopened.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).