Create Ledger
curl --request POST \
--url https://api.sandbox.teal.dev/v0/ledgers \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '{
"debit_credit": "debit",
"editable": true,
"financial_account_type": "bank_account",
"name": "<string>",
"parent_id": "<string>",
"report_cash_flow": true,
"sort_code": "<string>",
"sub_type": "current_assets",
"type": "asset"
}'
{
"debit_credit": "debit",
"editable": true,
"financial_account_type": "bank_account",
"id": "7JRNsKwy2Lw66caxVU7WGC",
"is_required": true,
"name": "Accounts Receivable",
"parent_id": "HLn8oy2eqMUCwjp1Cwdgco",
"report_cash_flow": true,
"sort_code": "2003",
"sub_type": "current_assets",
"type": "asset"
}
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
The Teal instance ID
Body
Debit or credit amounts are interpreted as positive
debit
, credit
Whether the ledger can be edited
The type of financial account
bank_account
, credit_card
, payments
, payroll
, loan
, prepaid_card
, accounts_receivable
, accounts_payable
The name of the ledger
The ID of the parent ledger when creating a sub-ledger
Whether entries in the ledger should be included in the cash flow report.
The ledger sort code. This determines the display order in reports, ordered digit by digit, starting from the leftmost position.
The sub_type of the ledger
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
The type of ledger
asset
, liability
, equity
, revenue
, expense
, profit
Response
Whether the amount is a credit or debit.
debit
, credit
Indicates whether line entries in this ledger may be edited
The type of financial account represented by the ledger.
bank_account
, credit_card
, payments
, payroll
, loan
, prepaid_card
, accounts_receivable
, accounts_payable
Indicates whether this is a required ledger for all users.
Indicates the id of the parent ledger if this is a sub-ledger
Indicates entries in the ledger should be included in the cash flow report.
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
asset
, liability
, equity
, revenue
, expense
, profit
curl --request POST \
--url https://api.sandbox.teal.dev/v0/ledgers \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '{
"debit_credit": "debit",
"editable": true,
"financial_account_type": "bank_account",
"name": "<string>",
"parent_id": "<string>",
"report_cash_flow": true,
"sort_code": "<string>",
"sub_type": "current_assets",
"type": "asset"
}'
{
"debit_credit": "debit",
"editable": true,
"financial_account_type": "bank_account",
"id": "7JRNsKwy2Lw66caxVU7WGC",
"is_required": true,
"name": "Accounts Receivable",
"parent_id": "HLn8oy2eqMUCwjp1Cwdgco",
"report_cash_flow": true,
"sort_code": "2003",
"sub_type": "current_assets",
"type": "asset"
}