curl --request POST \
--url https://api.example.com/v2/bank-statements/{statement_id}/unapprove \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v2/bank-statements/{statement_id}/unapprove"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v2/bank-statements/{statement_id}/unapprove', 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.example.com/v2/bank-statements/{statement_id}/unapprove",
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.example.com/v2/bank-statements/{statement_id}/unapprove"
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.example.com/v2/bank-statements/{statement_id}/unapprove")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/bank-statements/{statement_id}/unapprove")
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{
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": "submitted",
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"account_id": "<string>",
"account_number": "<string>",
"attachment": {
"id": "<string>",
"name": "<string>",
"src": "<string>",
"mime_type": "application/json",
"file_type": "<string>"
},
"processing_error": {
"error_code": "duplicate",
"error_message": "<string>"
},
"split_info": {
"is_split_parent": true,
"split_count": 123,
"child_statements": [
{
"id": "<string>",
"name": "<string>"
}
],
"original_statement_id": "<string>",
"split_index": 123
},
"transactions": [
{
"id": "<string>",
"account_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"amount": "<string>",
"currency": "<string>",
"type": "deposit",
"description": "<string>",
"reference_number": "<string>",
"payment_status": "non_payment"
}
],
"object": "<string>"
}{
"type": "request-validation",
"status": 422,
"title": "<string>",
"errors": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"detail": "<string>"
}Unapprove Bank Statement Endpoint
Unapprove a Bank Statement
Revert an approved bank statement back to pending_approval status. Only allowed if no transactions have related payments.
curl --request POST \
--url https://api.example.com/v2/bank-statements/{statement_id}/unapprove \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v2/bank-statements/{statement_id}/unapprove"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v2/bank-statements/{statement_id}/unapprove', 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.example.com/v2/bank-statements/{statement_id}/unapprove",
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.example.com/v2/bank-statements/{statement_id}/unapprove"
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.example.com/v2/bank-statements/{statement_id}/unapprove")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/bank-statements/{statement_id}/unapprove")
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{
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": "submitted",
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"account_id": "<string>",
"account_number": "<string>",
"attachment": {
"id": "<string>",
"name": "<string>",
"src": "<string>",
"mime_type": "application/json",
"file_type": "<string>"
},
"processing_error": {
"error_code": "duplicate",
"error_message": "<string>"
},
"split_info": {
"is_split_parent": true,
"split_count": 123,
"child_statements": [
{
"id": "<string>",
"name": "<string>"
}
],
"original_statement_id": "<string>",
"split_index": 123
},
"transactions": [
{
"id": "<string>",
"account_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"amount": "<string>",
"currency": "<string>",
"type": "deposit",
"description": "<string>",
"reference_number": "<string>",
"payment_status": "non_payment"
}
],
"object": "<string>"
}{
"type": "request-validation",
"status": 422,
"title": "<string>",
"errors": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Full response schema for a bank statement (includes transactions).
The status of this upload.
submitted, processing, invalid, pending_approval, approved, split, synced The statement period's start date.
The statement period's end date.
The account number that the statement relates to.
Attachment information for a bank statement.
Show child attributes
Show child attributes
Processing error details.
Show child attributes
Show child attributes
Information about statement splitting.
Show child attributes
Show child attributes
Transactions extracted from the statement
Show child attributes
Show child attributes
String representing the object's type. Objects of the same type share the same value.
