Chart of Accounts Templates
Create Ledger Template
Create a ledger template in a Chart of Accounts template.
POST
/
v0
/
platform-gl
/
coa-templates
/
{coa_template_id}
/
ledgers
Authorization
Path
Body
curl --request POST \
--url https://api.sandbox.teal.dev/v0/platform-gl/coa-templates/{coa_template_id}/ledgers \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"debit_credit": "debit",
"editable": true,
"ledger_sub_type": "current_assets",
"ledger_type": "asset",
"name": "<string>",
"parent_id": "<string>",
"report_cash_flow": true,
"sort_code": "<string>"
}'
{
"children": [
"<any>"
],
"debit_credit": "debit",
"editable": true,
"id": "DHyQ8EFqVWPDujU9dKRsyw",
"is_required": true,
"name": "Salaries And Wages Expense",
"parent_id": "HUeT6rusHJAuS3NHhW9PE5",
"report_cash_flow": true,
"sort_code": "5300",
"sub_type": "current_expenses",
"type": "expense"
}
Authorizations
Authorization
string
headerrequiredThe access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
coa_template_id
string
requiredThe ID of the chart of accounts template.
Body
application/json
debit_credit
enum<string>
requiredThe debit or credit type of the ledger template.
Available options:
debit
, credit
editable
boolean
requiredWhether the ledger is editable.
ledger_sub_type
enum<string>
requiredThe sub-type of the ledger template
Available options:
current_assets
, non-current_assets
, transfers_between_accounts
, uncategorized_assets
, current_liabilities
, non-current_liabilities
, equity
, operating_revenues
, other_income
, cost_of_goods_sold
, operating_expenses
, other_expenses
ledger_type
enum<string>
requiredThe type of the ledger template.
Available options:
asset
, liability
, equity
, revenue
, expense
, profit
name
string
requiredThe name of the ledger template
parent_id
string | null
The ID of the parent ledger template when creating a sub-ledger template
report_cash_flow
boolean
requiredWhether entries in the ledger should be included in the cash flow report.
sort_code
string
requiredThe sort code of the ledger template.
Response
201 - application/json
children
any[] | null
requiredA list of child ledger templates
debit_credit
enum<string>
requiredAvailable options:
debit
, credit
editable
boolean
requiredIndicates whether this ledger may be edited.
id
string
requiredis_required
boolean
requiredIndicates whether this ledger is required to exist in the template.
name
string
requiredparent_id
string | null
requiredThe ID of the parent ledger template
report_cash_flow
boolean
requiredIndicates entries in the ledger should be included in the cash flow report.
sort_code
string
requiredsub_type
enum<string>
requiredAvailable options:
current_assets
, non-current_assets
, transfers_between_accounts
, uncategorized_assets
, current_liabilities
, non-current_liabilities
, equity
, operating_revenues
, other_income
, cost_of_goods_sold
, operating_expenses
, other_expenses
type
enum<string>
requiredAvailable options:
asset
, liability
, equity
, revenue
, expense
, profit
curl --request POST \
--url https://api.sandbox.teal.dev/v0/platform-gl/coa-templates/{coa_template_id}/ledgers \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"debit_credit": "debit",
"editable": true,
"ledger_sub_type": "current_assets",
"ledger_type": "asset",
"name": "<string>",
"parent_id": "<string>",
"report_cash_flow": true,
"sort_code": "<string>"
}'
{
"children": [
"<any>"
],
"debit_credit": "debit",
"editable": true,
"id": "DHyQ8EFqVWPDujU9dKRsyw",
"is_required": true,
"name": "Salaries And Wages Expense",
"parent_id": "HUeT6rusHJAuS3NHhW9PE5",
"report_cash_flow": true,
"sort_code": "5300",
"sub_type": "current_expenses",
"type": "expense"
}