curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/fiscal-periods/{fiscalPeriod}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/fiscal-periods/{fiscalPeriod}/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-periods/{fiscalPeriod}/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-periods/{fiscalPeriod}/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-periods/{fiscalPeriod}/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-periods/{fiscalPeriod}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/fiscal-periods/{fiscalPeriod}/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>",
"fiscal_year_id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"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 period (client account)
Closes an accounting period so no more entries can be posted in it (client space).
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/fiscal-periods/{fiscalPeriod}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/fiscal-periods/{fiscalPeriod}/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-periods/{fiscalPeriod}/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-periods/{fiscalPeriod}/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-periods/{fiscalPeriod}/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-periods/{fiscalPeriod}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/fiscal-periods/{fiscalPeriod}/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>",
"fiscal_year_id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"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_periods.close
Conditions
- The accounting module must be part of the organization’s plan.
- The period must not already be closed.
- Every earlier period of the book, in any fiscal year, must already be closed.
- When the period is the last open period of its fiscal year, the previous fiscal year (the one ending the day before this one starts) must be closed, and its result must have been allocated when it closed with a non-zero result.
- Marks the period closed and records the closing time and the actor; entries, depreciation runs, disposals and rollbacks dated in a closed period are then refused.
- No action of this unit reopens a period, and reopening the fiscal year does not reopen its periods.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the fiscal period (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, fiscal_year_id, label, start_date, end_date, 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 period (27-character KSUID).
Kind of book that owns the period (organization book or client book); set by the server from the selected book.
Identifier of the fiscal year the period belongs to.
Name of the period; unique within its fiscal year. Periods generated with a year are labelled Y-m.
First day of the period, ISO 8601 date.
Last day of the period, ISO 8601 date.
True once the period is closed and accepts no more entries. Periods start open.
When the period was closed, ISO 8601; null while it is open.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).