Validate period close
curl --request POST \
--url https://api.zenskar.com/accounting_new/periods/validate-close \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_date": "2023-12-25"
}
'import requests
url = "https://api.zenskar.com/accounting_new/periods/validate-close"
payload = { "end_date": "2023-12-25" }
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
organisation: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({end_date: '2023-12-25'})
};
fetch('https://api.zenskar.com/accounting_new/periods/validate-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.zenskar.com/accounting_new/periods/validate-close",
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([
'end_date' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"organisation: <api-key>",
"x-api-key: <api-key>"
],
]);
$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.zenskar.com/accounting_new/periods/validate-close"
payload := strings.NewReader("{\n \"end_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<api-key>")
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.zenskar.com/accounting_new/periods/validate-close")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"end_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/accounting_new/periods/validate-close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"end_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"can_close": true,
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"validation_checks": [
{
"check_name": "<string>",
"passed": true,
"count": 123,
"message": "<string>",
"is_blocking": true,
"details": {}
}
],
"summary": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Accounting
Validate period close
Validate prerequisites for closing an accounting period without actually closing it. Returns a comprehensive checklist of what needs to be fixed.
POST
/
accounting_new
/
periods
/
validate-close
Validate period close
curl --request POST \
--url https://api.zenskar.com/accounting_new/periods/validate-close \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_date": "2023-12-25"
}
'import requests
url = "https://api.zenskar.com/accounting_new/periods/validate-close"
payload = { "end_date": "2023-12-25" }
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
organisation: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({end_date: '2023-12-25'})
};
fetch('https://api.zenskar.com/accounting_new/periods/validate-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.zenskar.com/accounting_new/periods/validate-close",
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([
'end_date' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"organisation: <api-key>",
"x-api-key: <api-key>"
],
]);
$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.zenskar.com/accounting_new/periods/validate-close"
payload := strings.NewReader("{\n \"end_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<api-key>")
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.zenskar.com/accounting_new/periods/validate-close")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"end_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/accounting_new/periods/validate-close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"end_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"can_close": true,
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"validation_checks": [
{
"check_name": "<string>",
"passed": true,
"count": 123,
"message": "<string>",
"is_blocking": true,
"details": {}
}
],
"summary": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Request schema for the dry-run that reports what still blocks a close, without actually closing.
End date to validate for period close
Response
Successful Response
Response schema for period close validation — the checklist of what passed, what failed, and whether the period can actually close.
Whether all blocking validations passed
Auto-calculated start date
Requested end date
Detailed results of each validation check
Show child attributes
Show child attributes
Aggregate statistics (total_checks, passed, failed, total_issues)
Show child attributes
Show child attributes