POST
/
v0
/
ledgers
Authorization
Header
Body
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

Authorization
string
headerrequired

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

Headers

teal-instance-id
string
required

The Teal instance ID

Body

application/json
debit_credit
enum<string>
required

Debit or credit amounts are interpreted as positive

Available options:
debit,
credit
editable
boolean
required

Whether the ledger can be edited

financial_account_type
enum<string> | null

The type of financial account

Available options:
bank_account,
credit_card,
payments,
payroll,
loan,
prepaid_card,
accounts_receivable,
accounts_payable
name
string
required

The name of the ledger

parent_id
string | null

The ID of the parent ledger when creating a sub-ledger

report_cash_flow
boolean
default: false

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

sort_code
string
required

The ledger sort code. This determines the display order in reports, ordered digit by digit, starting from the leftmost position.

sub_type
enum<string>
required

The sub_type of the ledger

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

The type of ledger

Available options:
asset,
liability,
equity,
revenue,
expense,
profit

Response

201 - application/json
debit_credit
enum<string>
required

Whether the amount is a credit or debit.

Available options:
debit,
credit
editable
boolean
required

Indicates whether line entries in this ledger may be edited

financial_account_type
enum<string> | null
required

The type of financial account represented by the ledger.

Available options:
bank_account,
credit_card,
payments,
payroll,
loan,
prepaid_card,
accounts_receivable,
accounts_payable
id
string
required
is_required
boolean
required

Indicates whether this is a required ledger for all users.

name
string
required
parent_id
string | null
required

Indicates the id of the parent ledger if this is a sub-ledger

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