curl --request POST \
--url https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close', 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/{bankStatement}/bank-statements/{bank_statement}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{bankStatement}/bank-statements/{bank_statement}/close"
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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>",
"errors": {}
}Close a bank statement
Mark a statement as reconciled once every line is matched and the balances agree.
curl --request POST \
--url https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close', 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/{bankStatement}/bank-statements/{bank_statement}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{bankStatement}/bank-statements/{bank_statement}/close"
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{bankStatement}/bank-statements/{bank_statement}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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>",
"errors": {}
}bank_statements.close
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.
- The statement must still be open; a reconciled statement is refused.
- Every line of the statement must be matched; one unmatched line refuses the close.
- The opening balance plus the signed sum of the statement lines (debit adds, credit subtracts) must equal the closing balance.
- Unmatched book entries never block the close: cheques issued but not yet presented can stay outstanding.
- The statement status becomes reconciled; reconciled_at is set to now and reconciled_by / reconciled_by_type record the acting member profile or agent account.
- From then on the statement cannot be edited, deleted, receive lines or matches, and its matches cannot be undone; the status has no transition back to open.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the book segment of the URL (the organization's book); see book.
Identifier of the bank statement to close (27-character KSUID string).
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.
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.