PUT
/
v0
/
ledgers
/
{ledger_id}
/
transactions
/
{transaction_id}
/
categories
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 '{
  "category_ledger_id": "HLn8oy2eqMUCwjp1Cwdgco",
  "updated_category_ledger_id": "WhvrC7XAES1fDrpWWgmPtg"
}'
{
  "transaction": {
    "amount": 132629.38,
    "categorization_method": "similarity",
    "datetime": "2024-03-15T15:28:53Z",
    "description": "Payroll March 15 2024",
    "id": "t_9237232",
    "journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
    "ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
    "line_entry_id": "XMDsKVuW4Wmi3LTW31Qw6E",
    "opposing_line_entry_ids": [
      "NULcvXTkLczde32qs1rqgB"
    ],
    "personal": false,
    "posted_status": "posted",
    "review_status": "unreviewed",
    "source_account_id": "L7RR1Yz85FJoASPvPLs441"
  },
  "categories": [
    {
      "editable": true,
      "ledger_id": "HLn8oy2eqMUCwjp1Cwdgco",
      "ledger_name": "Payroll Expense"
    }
  ],
  "ledger": {
    "debit_credit": "debit",
    "editable": false,
    "financial_account_type": "bank_account",
    "id": "7JRNsKwy2Lw66caxVU7WGC",
    "is_required": false,
    "name": "Pluto Checking 4242",
    "report_cash_flow": true,
    "sort_code": "1140",
    "sub_type": "current_assets",
    "type": "asset"
  },
  "journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn"
}

Authorizations

Authorization
string
header
required

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

Headers

teal-instance-id
string
required

The Teal instance ID

modified-by
string | null

An optional identifier for audit logging.

Path Parameters

transaction_id
string
required

The Transaction ID.

ledger_id
string
required

The Ledger ID.

Body

application/json
updated_category_ledger_id
string
required

The ID of the new category ledger.

Example:

"WhvrC7XAES1fDrpWWgmPtg"

category_ledger_id
string | null

If specified, the ID of the category ledger that will be changed to the new value. If no value is specified, all categories will be updated.

Example:

"HLn8oy2eqMUCwjp1Cwdgco"

Response

200
application/json
Successful Response
transaction
object
required

The Transaction object.

Example:
{
  "amount": 132629.38,
  "categorization_method": "similarity",
  "datetime": "2024-03-15T15:28:53Z",
  "description": "Payroll March 15 2024",
  "id": "t_9237232",
  "journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
  "ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
  "line_entry_id": "XMDsKVuW4Wmi3LTW31Qw6E",
  "opposing_line_entry_ids": ["NULcvXTkLczde32qs1rqgB"],
  "personal": false,
  "posted_status": "posted",
  "review_status": "unreviewed",
  "source_account_id": "L7RR1Yz85FJoASPvPLs441"
}
categories
object[]
required

A list of the categories of the Transaction.

Example:
[
  {
    "editable": true,
    "ledger_id": "HLn8oy2eqMUCwjp1Cwdgco",
    "ledger_name": "Payroll Expense"
  }
]
ledger
object
required

The Ledger object of the financial account associated with the Transaction.

Example:
{
  "debit_credit": "debit",
  "editable": false,
  "financial_account_type": "bank_account",
  "id": "7JRNsKwy2Lw66caxVU7WGC",
  "is_required": false,
  "name": "Pluto Checking 4242",
  "report_cash_flow": true,
  "sort_code": "1140",
  "sub_type": "current_assets",
  "type": "asset"
}
journal_entry_id
string | null

The ID of the Journal Entry that the Transaction's Line Entry is associated with.

Example:

"C4ocnUQze8kDwQ3EczkZXn"