curl --request GET \
--url https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview', 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}/vat-declarations/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/{book}/vat-declarations/preview"
req, _ := http.NewRequest("GET", 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.get("https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"fiscal_period_id": "<string>",
"fiscal_period": {
"id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"output_vat_total": 123,
"input_vat_total": 123,
"prior_credit_applied": 123,
"net_due": 123,
"net_credit": 123,
"currency_code": "<string>",
"currency_exponent": 123,
"lines": "<array>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Preview a VAT declaration (organization)
Computes the VAT position of an ended period, with the accounting lines a declaration would post, without recording anything (organization space). It applies the same rules as declaring.
curl --request GET \
--url https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview', 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}/vat-declarations/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/{book}/vat-declarations/preview"
req, _ := http.NewRequest("GET", 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.get("https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{book}/vat-declarations/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"fiscal_period_id": "<string>",
"fiscal_period": {
"id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"output_vat_total": 123,
"input_vat_total": 123,
"prior_credit_applied": 123,
"net_due": 123,
"net_credit": 123,
"currency_code": "<string>",
"currency_exponent": 123,
"lines": "<array>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}vat_declarations.create
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_period_id is required and must be a fiscal period of the book.
- The fiscal year of the period must be open.
- The period must have ended (its end date is in the past).
- The period must not already be declared.
- Declarations run oldest first: no earlier period of the book may be left undeclared and no later period may already be declared.
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
A period of another book is unknown here; the service still resolves it in the book.
Response
Identifier of the fiscal period the position is computed for (27-character KSUID string).
Summary of that period: id, label, start_date and end_date.
Show child attributes
Show child attributes
Output (collected) VAT of the period: net credit balance of the postable 443 accounts over the period, as an integer in minor units (divide by 10 to the power currency_exponent).
Input (deductible) VAT of the period: net debit balance of the postable 445 accounts over the period, as an integer in minor units. 0 when the period has no VAT movement.
VAT credit carried on account 4449 before the period starts (zero when none), as an integer in minor units. It is used against this period's VAT, or kept when the period has no movement.
VAT to pay for the period: output minus input minus prior credit when positive, otherwise 0, in minor units.
VAT credit to carry forward: the shortfall when input plus prior credit exceeds output, in minor units. When the period has no VAT movement it equals prior_credit_applied.
ISO 4217 code of the currency of the fiscal year, for example XOF.
Number of decimal places of the currency (0 for XOF). An amount in minor units divided by 10 to this power gives the amount in the currency.
Accounting lines the declaration would post, each with account_id, account_code, direction (debit or credit) and amount in minor units. Empty when the period has no VAT movement.