curl --request PATCH \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Main Business Account - Barclays",
"description": "Updated: Primary operating bank account for all business transactions",
"institution_name": "Barclays Bank UK PLC",
"custom_fields": {
"branch": "London City",
"relationship_manager": "Jane Doe",
"last_reviewed": "2024-03-15"
}
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/"
payload = {
"name": "Main Business Account - Barclays",
"description": "Updated: Primary operating bank account for all business transactions",
"institution_name": "Barclays Bank UK PLC",
"custom_fields": {
"branch": "London City",
"relationship_manager": "Jane Doe",
"last_reviewed": "2024-03-15"
}
}
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({
name: 'Main Business Account - Barclays',
description: 'Updated: Primary operating bank account for all business transactions',
institution_name: 'Barclays Bank UK PLC',
custom_fields: {
branch: 'London City',
relationship_manager: 'Jane Doe',
last_reviewed: '2024-03-15'
}
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_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([
'name' => 'Main Business Account - Barclays',
'description' => 'Updated: Primary operating bank account for all business transactions',
'institution_name' => 'Barclays Bank UK PLC',
'custom_fields' => [
'branch' => 'London City',
'relationship_manager' => 'Jane Doe',
'last_reviewed' => '2024-03-15'
]
]),
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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/"
payload := strings.NewReader("{\n \"name\": \"Main Business Account - Barclays\",\n \"description\": \"Updated: Primary operating bank account for all business transactions\",\n \"institution_name\": \"Barclays Bank UK PLC\",\n \"custom_fields\": {\n \"branch\": \"London City\",\n \"relationship_manager\": \"Jane Doe\",\n \"last_reviewed\": \"2024-03-15\"\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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Main Business Account - Barclays\",\n \"description\": \"Updated: Primary operating bank account for all business transactions\",\n \"institution_name\": \"Barclays Bank UK PLC\",\n \"custom_fields\": {\n \"branch\": \"London City\",\n \"relationship_manager\": \"Jane Doe\",\n \"last_reviewed\": \"2024-03-15\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_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 \"name\": \"Main Business Account - Barclays\",\n \"description\": \"Updated: Primary operating bank account for all business transactions\",\n \"institution_name\": \"Barclays Bank UK PLC\",\n \"custom_fields\": {\n \"branch\": \"London City\",\n \"relationship_manager\": \"Jane Doe\",\n \"last_reviewed\": \"2024-03-15\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"name": "<string>",
"currency": "<string>",
"account_type": "asset",
"account_type_display": "<string>",
"account_subtype": "current_assets",
"account_subtype_display": "<string>",
"parent_account_code": "<string>",
"current_balance": 123,
"current_balance_formatted": "<string>",
"debit_balance": 123,
"credit_balance": 123,
"period_balance": 123,
"period_balance_formatted": "<string>",
"has_children": true,
"hierarchy_level": 123,
"is_active": true,
"description": "<string>",
"institution_name": "<string>",
"iban": "<string>",
"sort_code": "<string>",
"account_number_mask": "<string>",
"total_debits": 123,
"total_credits": 123,
"last_entry_date": "2023-11-07T05:31:56Z",
"last_entry_reference": "<string>",
"sub_accounts": [
{}
]
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}Update account (partial)
Partial update of account fields.
Editable fields: name, description, parent_id, is_active, banking fields, balance_behavior, custom_fields
Non-editable: code, account_type
Parent change validation:
- New parent must have same account_type
- Cannot create circular references
Flexible lookup: The account_id parameter accepts UUID, account code, or external_id.
curl --request PATCH \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Main Business Account - Barclays",
"description": "Updated: Primary operating bank account for all business transactions",
"institution_name": "Barclays Bank UK PLC",
"custom_fields": {
"branch": "London City",
"relationship_manager": "Jane Doe",
"last_reviewed": "2024-03-15"
}
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/"
payload = {
"name": "Main Business Account - Barclays",
"description": "Updated: Primary operating bank account for all business transactions",
"institution_name": "Barclays Bank UK PLC",
"custom_fields": {
"branch": "London City",
"relationship_manager": "Jane Doe",
"last_reviewed": "2024-03-15"
}
}
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({
name: 'Main Business Account - Barclays',
description: 'Updated: Primary operating bank account for all business transactions',
institution_name: 'Barclays Bank UK PLC',
custom_fields: {
branch: 'London City',
relationship_manager: 'Jane Doe',
last_reviewed: '2024-03-15'
}
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_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([
'name' => 'Main Business Account - Barclays',
'description' => 'Updated: Primary operating bank account for all business transactions',
'institution_name' => 'Barclays Bank UK PLC',
'custom_fields' => [
'branch' => 'London City',
'relationship_manager' => 'Jane Doe',
'last_reviewed' => '2024-03-15'
]
]),
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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/"
payload := strings.NewReader("{\n \"name\": \"Main Business Account - Barclays\",\n \"description\": \"Updated: Primary operating bank account for all business transactions\",\n \"institution_name\": \"Barclays Bank UK PLC\",\n \"custom_fields\": {\n \"branch\": \"London City\",\n \"relationship_manager\": \"Jane Doe\",\n \"last_reviewed\": \"2024-03-15\"\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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Main Business Account - Barclays\",\n \"description\": \"Updated: Primary operating bank account for all business transactions\",\n \"institution_name\": \"Barclays Bank UK PLC\",\n \"custom_fields\": {\n \"branch\": \"London City\",\n \"relationship_manager\": \"Jane Doe\",\n \"last_reviewed\": \"2024-03-15\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_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 \"name\": \"Main Business Account - Barclays\",\n \"description\": \"Updated: Primary operating bank account for all business transactions\",\n \"institution_name\": \"Barclays Bank UK PLC\",\n \"custom_fields\": {\n \"branch\": \"London City\",\n \"relationship_manager\": \"Jane Doe\",\n \"last_reviewed\": \"2024-03-15\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"name": "<string>",
"currency": "<string>",
"account_type": "asset",
"account_type_display": "<string>",
"account_subtype": "current_assets",
"account_subtype_display": "<string>",
"parent_account_code": "<string>",
"current_balance": 123,
"current_balance_formatted": "<string>",
"debit_balance": 123,
"credit_balance": 123,
"period_balance": 123,
"period_balance_formatted": "<string>",
"has_children": true,
"hierarchy_level": 123,
"is_active": true,
"description": "<string>",
"institution_name": "<string>",
"iban": "<string>",
"sort_code": "<string>",
"account_number_mask": "<string>",
"total_debits": 123,
"total_credits": 123,
"last_entry_date": "2023-11-07T05:31:56Z",
"last_entry_reference": "<string>",
"sub_accounts": [
{}
]
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}Authorizations
Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>
Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.
Path Parameters
Body
Serializer for partial updates to accounts (PATCH only).
Non-editable fields: code, account_type (if transactions exist). Supports moving accounts in hierarchy via parent_id.
Response
Detailed serializer for account with additional information.
Account subtype code for more granular classification (bank, cash, etc.)
current_assets- Current Assetsnon_current_assets- Non-current Assetscurrent_liabilities- Current Liabilitiesnon_current_liabilities- Non-current Liabilitiesshare_capital- Share Capitalshare_premium- Share Premiumreserves- Reservesretained_earnings- Retained Earningsrevenue- Revenueother_operating_income- Other Operating Incomefinance_income- Finance Incomedirect_costs- Direct Costsoperating_expenses- Operating Expensesfinance_costs- Finance Costsincome_tax- Income Tax
current_assets, non_current_assets, current_liabilities, non_current_liabilities, share_capital, share_premium, reserves, retained_earnings, revenue, other_operating_income, finance_income, direct_costs, operating_expenses, finance_costs, income_tax Was this page helpful?