Cancel a fiscal event (organization)
curl --request DELETE \
--url https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event}', 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/{fiscalEvent}/fiscal-events/{fiscal_event}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/{fiscalEvent}/fiscal-events/{fiscal_event}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": {}
}Close the fiscal year
Cancel a fiscal event (organization)
Cancels a fiscal event you created by hand and reverses its opening entry (organization space).
DELETE
/
accounting
/
organization
/
books
/
{fiscalEvent}
/
fiscal-events
/
{fiscal_event}
Cancel a fiscal event (organization)
curl --request DELETE \
--url https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event}', 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/{fiscalEvent}/fiscal-events/{fiscal_event}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/{fiscalEvent}/fiscal-events/{fiscal_event}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fiscalEvent}/fiscal-events/{fiscal_event}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": {}
}Organization space
Accounting module
Cannot be undone
For: Accountant · Permission:
fiscal_events.delete
Conditions
- The accounting module must be part of the organization’s plan.
- Only events opened by hand (profile provision or regularization) can be cancelled; events opened by a depreciation run or a disposal (derogatory depreciation, reinvestment gain, or any event with an origin entry) are refused and are cancelled by reversing that entry.
- An event that is already cancelled is refused.
- An event that has any reversal, even partial, is refused.
- The period of the event’s opening entry must still be open; otherwise the cancellation is refused.
- Reverses the event’s opening entry (dotation) with a new entry in the same journal; the original entry becomes reversed.
- Sets the event status to cancelled. The event row is kept and still readable; it is not deleted.
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 event, which is given by fiscal_event.
Identifier of the fiscal event (27-character KSUID string).
Query Parameters
Response mode. Default none; none answers 204 No Content.
Available options:
none Response
No Content (response mode none).