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
headerrequired

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.

Body

application/json
debit_credit
enum<string>
required

The debit or credit type of the ledger template.

Available options:
debit,
credit
editable
boolean
required

Whether the ledger is editable.

ledger_sub_type
enum<string>
required

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

The type of the ledger template.

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

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

Whether entries in the ledger should be included in the cash flow report.

sort_code
string
required

The sort code of the ledger template.

Response

201 - application/json
children
any[] | null
required

A list of child ledger templates

debit_credit
enum<string>
required
Available options:
debit,
credit
editable
boolean
required

Indicates whether this ledger may be edited.

id
string
required
is_required
boolean
required

Indicates whether this ledger is required to exist in the template.

name
string
required
parent_id
string | null
required

The ID of the parent ledger template

report_cash_flow
boolean
required

Indicates entries in the ledger should be included in the cash flow report.

sort_code
string
required
sub_type
enum<string>
required
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
Available options:
asset,
liability,
equity,
revenue,
expense,
profit