Skip to main content
POST
/
v0
/
platform-gl
/
coa-templates
/
{coa_template_id}
/
ledgers
Create a Ledger Template
curl --request POST \
  --url https://api.sandbox.teal.dev/v0/platform-gl/coa-templates/{coa_template_id}/ledgers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "editable": true,
  "debit_credit": "debit",
  "ledger_sub_type": "current_assets",
  "ledger_type": "asset",
  "name": "<string>",
  "report_cash_flow": true,
  "sort_code": "<string>",
  "financial_account_type": "bank_account",
  "parent_id": null
}
'
{
  "id": "<string>",
  "debit_credit": "debit",
  "editable": true,
  "financial_account_type": "bank_account",
  "is_required": true,
  "name": "<string>",
  "parent_id": null,
  "report_cash_flow": true,
  "sort_code": "<string>",
  "sub_type": "current_assets",
  "type": "asset",
  "children": null
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

coa_template_id
string
required

The ID of the Chart of Accounts Template. The ID of the Chart of Accounts Template.

Body

application/json
editable
boolean
required

Whether line entries can be manually added or removed from the ledger.

debit_credit
enum<string>
required

Indicates if the ledger is a credit or debit ledger.

Available options:
debit,
credit
ledger_sub_type
enum<string>
required

Indicates similar characteristics and accounting treatment for a group of ledgers within a type.

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>
required

Indicates the purpose and location of the funds and value recorded in the ledger and which report it is included in: asset, liability and equity ledgers are displayed on the balance sheet; revenue and expenses are displayed on the income statement.

Available options:
asset,
liability,
equity,
revenue,
expense
name
string
required

The name of the ledger.

report_cash_flow
boolean
required

Whether Teal includes this ledger in the cash flow report.

sort_code
string
required

Determines the display order in reports, ordered digit by digit, starting from the leftmost position. For example, 20010 will come before 3050.

Maximum string length: 20
financial_account_type
enum<string> | null

Indicates that the ledger represents a real-world financial account.

Available options:
bank_account,
credit_card,
payments,
payroll,
loan,
prepaid_card,
accounts_receivable,
accounts_payable
Example:

"bank_account"

parent_id
string | null

If the ledger is a child Ledger, the ID of the parent ledger object.

Example:

null

Response

Successful Response

id
string
required

The unique ID of the object.

debit_credit
enum<string>
required

Indicates if the ledger is a credit or debit ledger.

Available options:
debit,
credit
editable
boolean
required

Whether line entries can be manually added or removed from the ledger.

financial_account_type
enum<string> | null
required

Indicates that the ledger represents a real-world financial account.

Available options:
bank_account,
credit_card,
payments,
payroll,
loan,
prepaid_card,
accounts_receivable,
accounts_payable
Example:

"bank_account"

is_required
boolean
required

Indicates that the ledger is one of the four system ledgers required for Teal to work. In the default chart of accounts, these are named one of: Transfers Between Accounts, Opening Balance Retained Earnings, Uncategorized Cash Inflow, Uncategorized Cash Outflow. You can update the names of these to fit your needs.

name
string
required

The name of the ledger.

parent_id
string | null
required

If the ledger is a child Ledger, the ID of the parent ledger object.

Example:

null

report_cash_flow
boolean
required

Whether Teal includes this ledger in the cash flow report.

sort_code
string
required

Determines the display order in reports, ordered digit by digit, starting from the leftmost position. For example, 20010 will come before 3050.

sub_type
enum<string>
required

Indicates similar characteristics and accounting treatment for a group of ledgers within a type.

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
type
enum<string>
required

Indicates the purpose and location of the funds and value recorded in the ledger and which report it is included in: asset, liability and equity ledgers are displayed on the balance sheet; revenue and expenses are displayed on the income statement.

Available options:
asset,
liability,
equity,
revenue,
expense
children
any[] | null

If the Ledger has child ledgers, a list of the Ledger objects.

Example:

null