curl --request POST \
--url https://api.exowpee.com/v1/accounting/organization/books/{book}/bank-statements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"money_account_id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"opening_balance": 123,
"closing_balance": 123,
"lines": [
{
"line_date": "2023-12-25",
"label": "<string>",
"amount": 2,
"reference": "<string>"
}
]
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{book}/bank-statements"
payload = {
"money_account_id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"opening_balance": 123,
"closing_balance": 123,
"lines": [
{
"line_date": "2023-12-25",
"label": "<string>",
"amount": 2,
"reference": "<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({
money_account_id: '<string>',
label: '<string>',
start_date: '2023-12-25',
end_date: '2023-12-25',
opening_balance: 123,
closing_balance: 123,
lines: [{line_date: '2023-12-25', label: '<string>', amount: 2, reference: '<string>'}]
})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{book}/bank-statements', 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}/bank-statements",
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([
'money_account_id' => '<string>',
'label' => '<string>',
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'opening_balance' => 123,
'closing_balance' => 123,
'lines' => [
[
'line_date' => '2023-12-25',
'label' => '<string>',
'amount' => 2,
'reference' => '<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}/bank-statements"
payload := strings.NewReader("{\n \"money_account_id\": \"<string>\",\n \"label\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"opening_balance\": 123,\n \"closing_balance\": 123,\n \"lines\": [\n {\n \"line_date\": \"2023-12-25\",\n \"label\": \"<string>\",\n \"amount\": 2,\n \"reference\": \"<string>\"\n }\n ]\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}/bank-statements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"money_account_id\": \"<string>\",\n \"label\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"opening_balance\": 123,\n \"closing_balance\": 123,\n \"lines\": [\n {\n \"line_date\": \"2023-12-25\",\n \"label\": \"<string>\",\n \"amount\": 2,\n \"reference\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{book}/bank-statements")
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 \"money_account_id\": \"<string>\",\n \"label\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"opening_balance\": 123,\n \"closing_balance\": 123,\n \"lines\": [\n {\n \"line_date\": \"2023-12-25\",\n \"label\": \"<string>\",\n \"amount\": 2,\n \"reference\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"money_account_id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"opening_balance": 123,
"closing_balance": 123,
"currency_code": "<string>",
"currency_exponent": 123,
"status": "<string>",
"reconciled_at": "2023-11-07T05:31:56Z",
"reconciled_by": "<string>",
"reconciled_by_type": "<string>",
"created_by": "<string>",
"created_by_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"lines": "<array>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Add a bank statement
Record a bank statement (with its opening and closing balances and lines) for one of the organization’s bank money accounts, ready to be reconciled.
curl --request POST \
--url https://api.exowpee.com/v1/accounting/organization/books/{book}/bank-statements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"money_account_id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"opening_balance": 123,
"closing_balance": 123,
"lines": [
{
"line_date": "2023-12-25",
"label": "<string>",
"amount": 2,
"reference": "<string>"
}
]
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{book}/bank-statements"
payload = {
"money_account_id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"opening_balance": 123,
"closing_balance": 123,
"lines": [
{
"line_date": "2023-12-25",
"label": "<string>",
"amount": 2,
"reference": "<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({
money_account_id: '<string>',
label: '<string>',
start_date: '2023-12-25',
end_date: '2023-12-25',
opening_balance: 123,
closing_balance: 123,
lines: [{line_date: '2023-12-25', label: '<string>', amount: 2, reference: '<string>'}]
})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{book}/bank-statements', 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}/bank-statements",
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([
'money_account_id' => '<string>',
'label' => '<string>',
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'opening_balance' => 123,
'closing_balance' => 123,
'lines' => [
[
'line_date' => '2023-12-25',
'label' => '<string>',
'amount' => 2,
'reference' => '<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}/bank-statements"
payload := strings.NewReader("{\n \"money_account_id\": \"<string>\",\n \"label\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"opening_balance\": 123,\n \"closing_balance\": 123,\n \"lines\": [\n {\n \"line_date\": \"2023-12-25\",\n \"label\": \"<string>\",\n \"amount\": 2,\n \"reference\": \"<string>\"\n }\n ]\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}/bank-statements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"money_account_id\": \"<string>\",\n \"label\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"opening_balance\": 123,\n \"closing_balance\": 123,\n \"lines\": [\n {\n \"line_date\": \"2023-12-25\",\n \"label\": \"<string>\",\n \"amount\": 2,\n \"reference\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{book}/bank-statements")
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 \"money_account_id\": \"<string>\",\n \"label\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"opening_balance\": 123,\n \"closing_balance\": 123,\n \"lines\": [\n {\n \"line_date\": \"2023-12-25\",\n \"label\": \"<string>\",\n \"amount\": 2,\n \"reference\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"money_account_id": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"opening_balance": 123,
"closing_balance": 123,
"currency_code": "<string>",
"currency_exponent": 123,
"status": "<string>",
"reconciled_at": "2023-11-07T05:31:56Z",
"reconciled_by": "<string>",
"reconciled_by_type": "<string>",
"created_by": "<string>",
"created_by_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"lines": "<array>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}bank_statements.create
Conditions
- The accounting module must be active for the organization.
- The caller must have been granted access to the book in the URL.
- Only the organization’s own book is accepted; a company book or a client book is refused.
- money_account_id must be a bank-type money account of the organization that is already linked to an accounting account and is active.
- end_date must not be before start_date.
- The end date must fall inside a fiscal year of the organization book; otherwise no statement is created.
- Optional lines (at most 500) must each fall between start_date and end_date, with a positive integer amount.
- Opening and closing balances are required integers; they are not checked against the lines at creation, only when the statement is closed.
- Creates the statement in status open, with the currency taken from the fiscal year that contains end_date, and creates the sent lines unmatched.
- created_by / created_by_type record the acting member profile or agent account. No journal entry is created.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the book. Only the organization's own book is accepted.
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, money_account_id, label, start_date, end_date, opening_balance, closing_balance, currency_code, currency_exponent, status, reconciled_at, reconciled_by, reconciled_by_type, created_by, created_by_type, created_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: lines.
Body
Bank money account of the organization the statement is for (27-character KSUID string). It must be a bank-type account that is active and linked to an accounting account.
Label of the statement, up to 255 characters.
255First day covered by the statement (ISO 8601 date).
Last day covered by the statement. Must not be before start_date and must fall in a fiscal year of the organization book; the statement currency comes from that year.
Balance of the money account at the start of the statement, an integer in minor units of the fiscal-year currency (may be negative).
Balance of the money account at the end of the statement, an integer in minor units (may be negative). Closing the statement requires opening_balance plus the signed lines to equal it.
Optional statement lines created with the statement, at most 500. Each must fall between start_date and end_date.
500Show child attributes
Show child attributes
Response
Resource (only with response=resource).
Identifier of the statement (27-character KSUID string).
Bank money account of the organization the statement belongs to (27-character KSUID string).
Label given to the statement.
First day covered by the statement (ISO 8601 date).
Last day covered by the statement (ISO 8601 date).
Bank balance at the start of the statement, an integer in minor units (divide by 10 to the power currency_exponent). Positive when funds are at the bank.
Bank balance at the end of the statement, an integer in minor units. Positive when funds are at the bank.
Currency of the statement (ISO 4217 code), taken from the fiscal year containing its end date.
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.
open while lines can be added and matched; reconciled once closed.
Date and time the statement was closed (ISO 8601); null while open.
Identifier of the member profile or agent account who closed it; null while open.
Type of the actor who closed it; null while open.
Identifier of the member profile or agent account who created the statement; null when no actor was recorded.
Type of the actor who created the statement.
Date and time the record was created (ISO 8601, UTC).
Statement lines. Only returned when requested with ?include=lines.