curl --request POST \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/children/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "1100-02",
"name": "Savings Account",
"description": "High-interest business savings account",
"external_id": "qbo-1100-02",
"institution_name": "Barclays Bank PLC",
"account_number_mask": "****6789"
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/children/"
payload = {
"code": "1100-02",
"name": "Savings Account",
"description": "High-interest business savings account",
"external_id": "qbo-1100-02",
"institution_name": "Barclays Bank PLC",
"account_number_mask": "****6789"
}
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({
code: '1100-02',
name: 'Savings Account',
description: 'High-interest business savings account',
external_id: 'qbo-1100-02',
institution_name: 'Barclays Bank PLC',
account_number_mask: '****6789'
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/children/', 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}/children/",
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([
'code' => '1100-02',
'name' => 'Savings Account',
'description' => 'High-interest business savings account',
'external_id' => 'qbo-1100-02',
'institution_name' => 'Barclays Bank PLC',
'account_number_mask' => '****6789'
]),
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}/children/"
payload := strings.NewReader("{\n \"code\": \"1100-02\",\n \"name\": \"Savings Account\",\n \"description\": \"High-interest business savings account\",\n \"external_id\": \"qbo-1100-02\",\n \"institution_name\": \"Barclays Bank PLC\",\n \"account_number_mask\": \"****6789\"\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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/children/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"1100-02\",\n \"name\": \"Savings Account\",\n \"description\": \"High-interest business savings account\",\n \"external_id\": \"qbo-1100-02\",\n \"institution_name\": \"Barclays Bank PLC\",\n \"account_number_mask\": \"****6789\"\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}/children/")
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 \"code\": \"1100-02\",\n \"name\": \"Savings Account\",\n \"description\": \"High-interest business savings account\",\n \"external_id\": \"qbo-1100-02\",\n \"institution_name\": \"Barclays Bank PLC\",\n \"account_number_mask\": \"****6789\"\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": [
{}
]
}{
"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>"
}Create child account
Create a child account under specified parent.
Inherited from parent:
- account_type
- account_subtype
- balance_behavior
Required fields:
- code: Unique account code
Parent can be specified by UUID, code, or external_id in the URL. Supports idempotency via external_id field.
curl --request POST \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/children/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "1100-02",
"name": "Savings Account",
"description": "High-interest business savings account",
"external_id": "qbo-1100-02",
"institution_name": "Barclays Bank PLC",
"account_number_mask": "****6789"
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/children/"
payload = {
"code": "1100-02",
"name": "Savings Account",
"description": "High-interest business savings account",
"external_id": "qbo-1100-02",
"institution_name": "Barclays Bank PLC",
"account_number_mask": "****6789"
}
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({
code: '1100-02',
name: 'Savings Account',
description: 'High-interest business savings account',
external_id: 'qbo-1100-02',
institution_name: 'Barclays Bank PLC',
account_number_mask: '****6789'
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/children/', 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}/children/",
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([
'code' => '1100-02',
'name' => 'Savings Account',
'description' => 'High-interest business savings account',
'external_id' => 'qbo-1100-02',
'institution_name' => 'Barclays Bank PLC',
'account_number_mask' => '****6789'
]),
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}/children/"
payload := strings.NewReader("{\n \"code\": \"1100-02\",\n \"name\": \"Savings Account\",\n \"description\": \"High-interest business savings account\",\n \"external_id\": \"qbo-1100-02\",\n \"institution_name\": \"Barclays Bank PLC\",\n \"account_number_mask\": \"****6789\"\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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/children/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"1100-02\",\n \"name\": \"Savings Account\",\n \"description\": \"High-interest business savings account\",\n \"external_id\": \"qbo-1100-02\",\n \"institution_name\": \"Barclays Bank PLC\",\n \"account_number_mask\": \"****6789\"\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}/children/")
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 \"code\": \"1100-02\",\n \"name\": \"Savings Account\",\n \"description\": \"High-interest business savings account\",\n \"external_id\": \"qbo-1100-02\",\n \"institution_name\": \"Barclays Bank PLC\",\n \"account_number_mask\": \"****6789\"\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": [
{}
]
}{
"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
Simplified serializer for creating child accounts.
Inherits from parent:
- account_type
- account_subtype
- balance_behavior
Only code is required; inherits accounting properties from parent.
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?