curl --request PUT \
--url https://api.sandbox.teal.dev/v0/ledgers/{ledger_id}/transactions/{transaction_id}/categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '
{
"updated_category_ledger_id": "<string>",
"category_ledger_id": "HLn8oy2eqMUCwjp1Cwdgco"
}
'{
"transaction": {
"id": "<string>",
"amount": 123,
"datetime": "2023-11-07T05:31:56Z",
"description": "<string>",
"posted_status": "not_posted",
"review_status": "unreviewed",
"source_account_id": "<string>",
"personal": true,
"metadata": null,
"categorization_method": "similarity",
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
"journal_entry": "<unknown>",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"ledger": "<unknown>",
"line_entry_id": "XMDsKVuW4Wmi3LTW31Qw6E",
"line_entry": "<unknown>",
"opposing_line_entry_ids": [
"NULcvXTkLczde32qs1rqgB"
],
"opposing_line_entries": "<unknown>",
"tags": null
},
"categories": [
{
"ledger_id": "<string>",
"ledger_name": "<string>",
"editable": true
}
],
"ledger": {
"id": "<string>",
"name": "<string>",
"debit_credit": "debit",
"editable": true,
"is_required": true,
"parent_id": null,
"report_cash_flow": true,
"sort_code": "<string>",
"sub_type": "current_assets",
"type": "asset",
"created_at": "2023-11-07T05:31:56Z",
"financial_account_type": "bank_account",
"parent": "<unknown>"
},
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn"
}Updates one or all of a Transaction’s categories. Deprecated, use source account endpoints.
curl --request PUT \
--url https://api.sandbox.teal.dev/v0/ledgers/{ledger_id}/transactions/{transaction_id}/categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '
{
"updated_category_ledger_id": "<string>",
"category_ledger_id": "HLn8oy2eqMUCwjp1Cwdgco"
}
'{
"transaction": {
"id": "<string>",
"amount": 123,
"datetime": "2023-11-07T05:31:56Z",
"description": "<string>",
"posted_status": "not_posted",
"review_status": "unreviewed",
"source_account_id": "<string>",
"personal": true,
"metadata": null,
"categorization_method": "similarity",
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
"journal_entry": "<unknown>",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"ledger": "<unknown>",
"line_entry_id": "XMDsKVuW4Wmi3LTW31Qw6E",
"line_entry": "<unknown>",
"opposing_line_entry_ids": [
"NULcvXTkLczde32qs1rqgB"
],
"opposing_line_entries": "<unknown>",
"tags": null
},
"categories": [
{
"ledger_id": "<string>",
"ledger_name": "<string>",
"editable": true
}
],
"ledger": {
"id": "<string>",
"name": "<string>",
"debit_credit": "debit",
"editable": true,
"is_required": true,
"parent_id": null,
"report_cash_flow": true,
"sort_code": "<string>",
"sub_type": "current_assets",
"type": "asset",
"created_at": "2023-11-07T05:31:56Z",
"financial_account_type": "bank_account",
"parent": "<unknown>"
},
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn"
}The access token received from the authorization server in the OAuth 2.0 flow.
The Teal instance ID
An optional identifier for audit logging.
The Transaction ID.
The Ledger ID.
Successful Response
The Transaction object.
Show child attributes
The unique ID of the object. This is used as an idempotency
key to prevent duplicates. This is manually set as part of the create
transactions request. If the transaction is created via a data integration,
Plaid for example, it will be set to the transaction_id to enforce
idempotency with the data source.
The value of the transaction in decimal dollar cents.
The UTC datetime that the Transaction was created. This
will never be before an Instance's entries_start date. When importing
transactions, transactions whose datetime is before the Instance’s
entries_start date will be skipped. Other transactions will be processed
as normal.
An arbitrary string on the object, useful for displaying information to the user. Descriptions over 512 characters will be truncated.
Indicates if the corresponding journal entry and
line entries for the transaction have been have been created. deleted
indicates that the transaction is posted but the corresponding journal entry
and line entries have been deleted.
not_posted, posted, deleted Indicates if the transaction has been reviewed. See the reviewing transactions for steps on how to use this.
unreviewed, reviewed The ID of the transaction source account where the transaction is stored.
Whether the transaction is a non-business personal transaction.
Arbitrary structured information about the transaction. This could be location of the transaction to display to the user or vendor information to use as part of a Platform or Instance categorization rule. Teal does not use metadata for any accounting purposes.
Show child attributes
null
How the Transaction was assigned its category.
See the categorization guide for more details.
ai, rules, similarity, transfer_between_accounts, uncategorized, user "similarity"
The ID of the Journal Entry that the Transaction's Line Entry is associated with.
"C4ocnUQze8kDwQ3EczkZXn"
Expandable. The associated Journal Entry object.
The ID of the financial account ledger associated with the Transaction.
"7JRNsKwy2Lw66caxVU7WGC"
Expandable. The Ledger object of the financial account associated with the Transaction.
The ID of the financial account ledger associated with the Transaction.
"XMDsKVuW4Wmi3LTW31Qw6E"
Expandable. The associated Line Entry.
A list of IDs of all the Line Entries
objects in the journal entry with the opposite debit_credit status. For
example if the Transaction's line entry is a debit this opposing line entries
will be credit line entries.
["NULcvXTkLczde32qs1rqgB"]Expandable. A list of the Line Entry objects
with the opposite debit_credit status.
A list of all the Tags associated with the Transaction, if any. Note that Tags are not transitive and the tags on a Transaction can be different than those on its line entry or entires.
null
A list of the categories of the Transaction.
The Ledger object of the financial account associated with the Transaction.
Show child attributes
The unique ID of the object.
The name of the ledger.
Indicates if the ledger is a credit or debit ledger.
debit, credit Whether line entries can be manually added or removed from the ledger.
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.
If the ledger is a child Ledger, the ID of the parent ledger object.
null
Whether Teal includes this ledger in the cash flow report.
Determines the display order in reports, ordered digit by digit, starting from the leftmost position. For example, 20010 will come before 3050.
Indicates similar characteristics and accounting treatment for a group of ledgers within a type.
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 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.
asset, liability, equity, revenue, expense The datetime when the ledger was created.
Indicates that the ledger represents a real-world financial account.
bank_account, credit_card, payments, payroll, loan, prepaid_card, accounts_receivable, accounts_payable "bank_account"
Expandable. If the ledger is a child ledger, the parent ledger object.
The ID of the Journal Entry that the Transaction's Line Entry is associated with.
"C4ocnUQze8kDwQ3EczkZXn"