Ledgers
Update Ledger
Update the attributes of a ledger.
PUT
/
v0
/
ledgers
/
{ledger_id}
Authorization
Header
Path
Body
curl --request PUT \
--url https://api.sandbox.teal.dev/v0/ledgers/{ledger_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '{
"name": "<string>",
"sort_code": "<string>"
}'
{
"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
headerrequiredThe access token received from the authorization server in the OAuth 2.0 flow.
Headers
teal-instance-id
string
requiredThe Teal instance ID
Path Parameters
ledger_id
string
requiredThe ledger ID
Body
application/json
name
string | null
The new name of the ledger
sort_code
string | null
The new ledger sort code
Response
201 - application/json
debit_credit
enum<string>
requiredWhether the amount is a credit or debit.
Available options:
debit
, credit
editable
boolean
requiredIndicates whether line entries in this ledger may be edited
financial_account_type
enum<string> | null
requiredThe 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
requiredis_required
boolean
requiredIndicates whether this is a required ledger for all users.
name
string
requiredparent_id
string | null
requiredIndicates the id of the parent ledger if this is a sub-ledger
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 PUT \
--url https://api.sandbox.teal.dev/v0/ledgers/{ledger_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '{
"name": "<string>",
"sort_code": "<string>"
}'
{
"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"
}