Update a business account
curl --request PATCH \
--url https://thirdparty.qonto.com/v2/bank_accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bank_account": {
"name": "Michael Scott"
}
}
'import requests
url = "https://thirdparty.qonto.com/v2/bank_accounts/{id}"
payload = { "bank_account": { "name": "Michael Scott" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({bank_account: {name: 'Michael Scott'}})
};
fetch('https://thirdparty.qonto.com/v2/bank_accounts/{id}', 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://thirdparty.qonto.com/v2/bank_accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'bank_account' => [
'name' => 'Michael Scott'
]
]),
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://thirdparty.qonto.com/v2/bank_accounts/{id}"
payload := strings.NewReader("{\n \"bank_account\": {\n \"name\": \"Michael Scott\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://thirdparty.qonto.com/v2/bank_accounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bank_account\": {\n \"name\": \"Michael Scott\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/bank_accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bank_account\": {\n \"name\": \"Michael Scott\"\n }\n}"
response = http.request(request)
puts response.read_body{
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Primary bank account",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"main": true,
"iban": "FR7616958000010123456789037",
"bic": "BNPAFRPPXXX",
"currency": "EUR",
"balance": "142188.43",
"balance_cents": 14218843,
"authorized_balance": "141148.12",
"authorized_balance_cents": 14114812,
"updated_at": "2024-04-03T12:00:00Z",
"is_external_account": false,
"account_number": 1234567890
}
}Business Accounts
Update a business account
OAuth scope: bank_account.write
Updates the details of a specific business account identified by its ID. Currently, it supports only updating the account name.
Business accounts can be named based on your needs (e.g., Primary Account, Project ABC, Tax Pots). This flexibility helps you organize your finances and allocate funds for specific purposes.
PATCH
/
v2
/
bank_accounts
/
{id}
Update a business account
curl --request PATCH \
--url https://thirdparty.qonto.com/v2/bank_accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bank_account": {
"name": "Michael Scott"
}
}
'import requests
url = "https://thirdparty.qonto.com/v2/bank_accounts/{id}"
payload = { "bank_account": { "name": "Michael Scott" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({bank_account: {name: 'Michael Scott'}})
};
fetch('https://thirdparty.qonto.com/v2/bank_accounts/{id}', 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://thirdparty.qonto.com/v2/bank_accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'bank_account' => [
'name' => 'Michael Scott'
]
]),
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://thirdparty.qonto.com/v2/bank_accounts/{id}"
payload := strings.NewReader("{\n \"bank_account\": {\n \"name\": \"Michael Scott\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://thirdparty.qonto.com/v2/bank_accounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bank_account\": {\n \"name\": \"Michael Scott\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/bank_accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bank_account\": {\n \"name\": \"Michael Scott\"\n }\n}"
response = http.request(request)
puts response.read_body{
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Primary bank account",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"main": true,
"iban": "FR7616958000010123456789037",
"bic": "BNPAFRPPXXX",
"currency": "EUR",
"balance": "142188.43",
"balance_cents": 14218843,
"authorized_balance": "141148.12",
"authorized_balance_cents": 14114812,
"updated_at": "2024-04-03T12:00:00Z",
"is_external_account": false,
"account_number": 1234567890
}
}Authorizations
Bearer authorization header: Bearer <token>, where <token> is the access token received from the authorization server at the end of the OAuth 2.0 flow.
Headers
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
Path Parameters
ID of the business account to update
Body
application/json
Show child attributes
Show child attributes
Response
Business account updated successfully
Show child attributes
Show child attributes
Was this page helpful?
⌘I