curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fiscal_year_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/exports"
payload = { "fiscal_year_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>'})
};
fetch('https://api.exowpee.com/v1/accounting/client/exports', 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/exports",
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>'
]),
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/client/exports"
payload := strings.NewReader("{\n \"fiscal_year_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/client/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fiscal_year_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/exports")
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}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"kind": "<string>",
"fiscal_year_id": "<string>",
"params": {},
"original_name": "<string>",
"mime_type": "<string>",
"size": 123,
"generated_at": "2023-11-07T05:31:56Z",
"generated_by": "<string>",
"generated_by_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Generate an accounting export (client account)
Produce and save an export file for a fiscal year, either the audit entries file (FEC) or the annual statements PDF.
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fiscal_year_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/exports"
payload = { "fiscal_year_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>'})
};
fetch('https://api.exowpee.com/v1/accounting/client/exports', 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/exports",
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>'
]),
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/client/exports"
payload := strings.NewReader("{\n \"fiscal_year_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/client/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fiscal_year_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/exports")
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}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"kind": "<string>",
"fiscal_year_id": "<string>",
"params": {},
"original_name": "<string>",
"mime_type": "<string>",
"size": 123,
"generated_at": "2023-11-07T05:31:56Z",
"generated_by": "<string>",
"generated_by_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}accounting_exports.create, the permission for the chosen export content
Conditions
- The accounting module must be part of the organization’s plan.
- The book must have accounting set up.
- The chosen content also needs a permission: journal_entries.export for fec, statement_filings.export for liasse.
- kind must be fec or liasse; fiscal_year_id is required and must be a fiscal year of the book.
- params may only contain journal_id, from and to; journal_id must be a journal of the book, and to must not be before from.
- For a liasse export, the fiscal year must have a filed annual statements filing of the normal system; otherwise the call is refused with a business-rule error. params are ignored for liasse.
- Generates the file now and stores it once, privately, under a random name.
- Records the export with its file name, MIME type, size in bytes, generation time and the member or agent account who generated it.
- For fec, writes the book’s journal lines as a CSV in the audit-file layout (every entry status, reversals included); for liasse, renders the filed annual statements to PDF from their frozen payload.
- If saving the record fails, the stored file is deleted again.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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, kind, fiscal_year_id, params, original_name, mime_type, size, generated_at, generated_by, generated_by_type, 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: .
Body
The fiscal year and the journal must belong to the selected book: ids of another book fail validation.
Kind of export: fec (journal entries CSV in the audit-file layout) or liasse (PDF of the filed annual statements; the fiscal year must have a filed normal-system filing). Required.
fec, liasse Fiscal year to export (27-character KSUID string). Required; it must belong to the selected book.
Optional filters for a fec export; only journal_id, from and to are accepted, and they are ignored for liasse.
Show child attributes
Show child attributes
Response
Resource (only with response=resource).
Identifier of the stored export (27-character KSUID string).
Kind of book that owns the export: organization, company or client account.
Kind of file: fec is the journal entries CSV in the audit-file layout; liasse is the PDF of the filed annual statements.
Fiscal year the export covers (27-character KSUID string).
Filters sent when the file was generated: journal_id, from and to. They are stored as sent but only used for a fec export; a liasse export ignores them.
File name offered when the file is downloaded.
Content type of the file: text/csv; charset=UTF-8 for fec, application/pdf for liasse.
Size of the stored file in bytes.
Date and time the file was generated (ISO 8601).
Identifier of the member or agent account who generated the file; null when the actor could not be resolved.
Type of the actor who generated the file (its morph alias); null when the actor could not be resolved.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).