Get Accounts/Sub-Accounts
curl --location --request GET 'https://api.freshbooks.com/accounting/businesses/<business_uuid>/reports/chart_of_accounts?currency_code=USD&end_date=2024-12-31&sort=account_number_asc&start_date=2024-01-01&state=active&use_ledger_entries=true' \
--header 'Authorization: Bearer <SET BEARER TOKEN>'
{
"response": {
"result": {
"journal_entry_accounts": [
{
"account_name": "Cash",
"account_number": "1000",
"account_type": "asset",
"balance": "-10.000",
"currency_code": "USD",
"sub_accounts": [
{
"account_type": "asset",
"balance": "-10.000",
"currency_code": "USD",
"account_name": "Petty Cash",
"account_number": "1000-1",
"account_uuid": "184ba7f5-ce2a-4435-ab67-824cbc082c47",
"parent_account_uuid": "bbb2fd89-f70d-4738-85ce-80c47c0ceed2",
"account_sub_type": "Cash & Bank",
"system_account_name": "Petty Cash",
"auto_created": false,
"state": "active"
},
{
"account_type": "asset",
"balance": "0.000",
"currency_code": "USD",
"account_name": "Something else",
"account_number": "1000-4",
"account_uuid": "ccbf7404-a0f4-4580-ac71-8b77a9644fe2",
"parent_account_uuid": "bbb2fd89-f70d-4738-85ce-80c47c0ceed2",
"account_sub_type": "Cash & Bank",
"system_account_name": null,
"auto_created": false,
"state": "active"
}
],
"account_uuid": "bbb2fd89-f70d-4738-85ce-80c47c0ceed2",
"account_sub_type": "Cash & Bank",
"system_account_name": "Cash",
"auto_created": true,
"state": "active"
},
{
"account_name": "Accounts Receivable",
"account_number": "1200-1",
"account_type": "asset",
"balance": "1265.600",
"currency_code": "USD",
"sub_accounts": [],
"account_uuid": "0f321fa9-78db-41ce-8c5f-11605718e5fb",
"account_sub_type": "Current Asset",
"system_account_name": "Accounts Receivable",
"auto_created": false,
"state": "active"
},
]
}
}
}
Get Individual Account Information
curl --location --request GET 'https://api.freshbooks.com/accounting/businesses/<business_uuid>/ledger_accounts/accounts/<account_uuid>' \
--header 'Authorization: Bearer <SET BEARER TOKEN>'
{
"data": {
"uuid": "<account_uuid>",
"name": "Cash",
"number": "1000",
"description": "",
"type": "asset",
"sub_type": "Cash & Bank",
"system_account_name": "Cash",
"parent_account": null,
"sub_accounts": [
"<sub account_uuid>"
],
"auto_created": true,
"state": "active",
"updated_at": "2024-10-24T14:14:08.821530Z"
}
}
Create Account in Chart of Accounts
curl --location --request POST 'https://api.freshbooks.com/accounting/businesses/<business_uuid>/ledger_accounts/accounts' \
--header 'Authorization: Bearer <SET BEARER TOKEN>' \
--data-raw '{
"uuid": null,
"name": "Something else",
"number": "1000-4",
"type": "asset",
"sub_type": "Cash & Bank",
"parent_account": "<parent account_uuid>",
"state": "active",
"system_account_name": null,
"auto_created": false
}'