curl --request POST \
--url https://api.exowpee.com/v1/accounting/organization/books/{book}/statement-filings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fiscal_year_id": "<string>",
"supersedes_filing_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{book}/statement-filings"
payload = {
"fiscal_year_id": "<string>",
"supersedes_filing_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fiscal_year_id: '<string>', supersedes_filing_id: '<string>'})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{book}/statement-filings', 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/{book}/statement-filings",
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([
'fiscal_year_id' => '<string>',
'supersedes_filing_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.exowpee.com/v1/accounting/organization/books/{book}/statement-filings"
payload := strings.NewReader("{\n \"fiscal_year_id\": \"<string>\",\n \"supersedes_filing_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/accounting/organization/books/{book}/statement-filings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fiscal_year_id\": \"<string>\",\n \"supersedes_filing_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{book}/statement-filings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fiscal_year_id\": \"<string>\",\n \"supersedes_filing_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"fiscal_year_id": "<string>",
"fiscal_year": {},
"system": "<string>",
"status": "<string>",
"payload": {},
"generated_at": "2023-11-07T05:31:56Z",
"generated_by": "<string>",
"generated_by_type": "<string>",
"filed_at": "2023-11-07T05:31:56Z",
"filed_by": "<string>",
"filed_by_type": "<string>",
"supersedes_filing_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Prepare a filing (organization)
Prepares a draft filing of the annual statements for a closed fiscal year (organization space).
curl --request POST \
--url https://api.exowpee.com/v1/accounting/organization/books/{book}/statement-filings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fiscal_year_id": "<string>",
"supersedes_filing_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{book}/statement-filings"
payload = {
"fiscal_year_id": "<string>",
"supersedes_filing_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fiscal_year_id: '<string>', supersedes_filing_id: '<string>'})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{book}/statement-filings', 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/{book}/statement-filings",
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([
'fiscal_year_id' => '<string>',
'supersedes_filing_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.exowpee.com/v1/accounting/organization/books/{book}/statement-filings"
payload := strings.NewReader("{\n \"fiscal_year_id\": \"<string>\",\n \"supersedes_filing_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/accounting/organization/books/{book}/statement-filings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fiscal_year_id\": \"<string>\",\n \"supersedes_filing_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{book}/statement-filings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fiscal_year_id\": \"<string>\",\n \"supersedes_filing_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"fiscal_year_id": "<string>",
"fiscal_year": {},
"system": "<string>",
"status": "<string>",
"payload": {},
"generated_at": "2023-11-07T05:31:56Z",
"generated_by": "<string>",
"generated_by_type": "<string>",
"filed_at": "2023-11-07T05:31:56Z",
"filed_by": "<string>",
"filed_by_type": "<string>",
"supersedes_filing_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}statement_filings.create, journal_entries.viewreports, statement_note_inputs.list
Conditions
- The accounting module must be part of the organization’s plan.
- In the organization space, the caller must have access to the book.
- The book must have accounting set up (at least one journal).
- fiscal_year_id is required and must be a fiscal year of the book.
- The fiscal year must be closed.
- The book can hold only one draft per fiscal year and form; a second draft is refused. Filed and superseded filings do not count.
- system defaults to normal when omitted. Only normal and prix_de_transfert can be computed from the books; pays_par_pays is accepted by validation but refused with a business error.
- When supersedes_filing_id is sent, it must be a currently filed filing of the same book, fiscal year and form.
- Computing the statements also needs the permissions journal_entries.viewreports and statement_note_inputs.list; for prix_de_transfert it needs journal_entries.viewreports, related_parties.list and transfer_pricing_narratives.list instead of the note permission.
- On the normal form, an account with activity that no line of the statement layout claims refuses the call with a business-rule error naming the account.
- Creates a draft filing whose payload freezes the year as computed now: the balance sheet, income statement, cash flow and notes for the normal form, the transfer-pricing declaration for prix_de_transfert.
- Records the closing date of the year and a digest of its inputs (the note inputs, or the related parties and written answers for prix_de_transfert), so the draft can be detected as stale at filing time.
- Stamps generated_at and the generating actor.
- When supersedes_filing_id is sent, the draft is linked to the filed filing it will replace; that filing keeps its status until the draft is filed.
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) whose records are worked on.
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, system, status, generated_at, generated_by, generated_by_type, filed_at, filed_by, filed_by_type, supersedes_filing_id, created_at, updated_at, payload.
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: fiscalYear.
Body
Identifier of the fiscal year to file (27-character KSUID string), a year of the selected book. Required. Only one draft can exist per book, fiscal year and form: to pick up new figures, regenerate the draft that exists.
DGI form to file: normal (Système Normal), prix_de_transfert (transfer pricing) or pays_par_pays (country by country). Optional; defaults to normal. Only normal and prix_de_transfert can be computed; pays_par_pays is refused.
normal, prix_de_transfert, pays_par_pays Identifier of the filing this one corrects (27-character KSUID string). Optional. It must be a filing of the same book, fiscal year and form that is currently filed.
Response
Resource (only with response=resource).
Identifier of the filing (27-character KSUID string).
Kind of owner of the book the filing belongs to (for example organization or client account); set by the server from the selected book.
Identifier of the closed fiscal year the filing covers (27-character KSUID string).
The fiscal year, present only when requested with ?include=fiscalYear and the caller has the permission fiscal_years.retrieve; omitted otherwise.
DGI form the filing is made on: normal (Systeme Normal), prix_de_transfert (the transfer-pricing declaration, CGI art. 470) or pays_par_pays. Only normal and prix_de_transfert can be generated.
State of the filing: draft (editable by regenerate), filed (declared), superseded (replaced by a later filed correction).
Frozen content computed when the draft was created or regenerated. For the normal form: system, balance_sheet, income_statement, cash_flow and notes. For prix_de_transfert: the declaration that the transfer-pricing preview returns (obligation, operations, loans and narrative). Omitted from lists.
When the figures were last computed, ISO 8601; replaced by each regenerate.
Identifier of the member or agent account that created or last regenerated the draft; null when the actor could not be validated.
Kind of actor in generated_by; null when generated_by is null.
When the filing was filed, ISO 8601; null while it is a draft.
Identifier of the actor that filed it; null until filed.
Kind of actor in filed_by; null until filed.
Identifier of the filed filing this one replaces once it is filed; null for a first filing.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).