Skip to main content
PUT
/
v0
/
journal-entries
/
{journal_entry_id}
Update a Journal Entry
curl --request PUT \
  --url https://api.sandbox.teal.dev/v0/journal-entries/{journal_entry_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'teal-instance-id: <teal-instance-id>' \
  --data '
{
  "datetime": "2023-02-15T06:42:18Z",
  "description": "Payroll#230215",
  "line_entry_changes": {
    "create": [
      {
        "amount": "31282.27999999999883584678173065185546875",
        "ledger_id": "<string>",
        "description": "Payroll#230215",
        "tag_ids": [
          "<string>"
        ],
        "sort_order": 1
      }
    ],
    "update": [
      {
        "id": "<string>",
        "amount": "31282.27999999999883584678173065185546875",
        "debit_credit": "credit",
        "description": "<string>",
        "ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
        "tag_ids": [
          "<string>"
        ],
        "sort_order": 1
      }
    ],
    "delete": [
      "<string>"
    ]
  }
}
'
import requests

url = "https://api.sandbox.teal.dev/v0/journal-entries/{journal_entry_id}"

payload = {
"datetime": "2023-02-15T06:42:18Z",
"description": "Payroll#230215",
"line_entry_changes": {
"create": [
{
"amount": "31282.27999999999883584678173065185546875",
"ledger_id": "<string>",
"description": "Payroll#230215",
"tag_ids": ["<string>"],
"sort_order": 1
}
],
"update": [
{
"id": "<string>",
"amount": "31282.27999999999883584678173065185546875",
"debit_credit": "credit",
"description": "<string>",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"tag_ids": ["<string>"],
"sort_order": 1
}
],
"delete": ["<string>"]
}
}
headers = {
"teal-instance-id": "<teal-instance-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {
'teal-instance-id': '<teal-instance-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
datetime: '2023-02-15T06:42:18Z',
description: 'Payroll#230215',
line_entry_changes: {
create: [
{
amount: '31282.27999999999883584678173065185546875',
ledger_id: '<string>',
description: 'Payroll#230215',
tag_ids: ['<string>'],
sort_order: 1
}
],
update: [
{
id: '<string>',
amount: '31282.27999999999883584678173065185546875',
debit_credit: 'credit',
description: '<string>',
ledger_id: '7JRNsKwy2Lw66caxVU7WGC',
tag_ids: ['<string>'],
sort_order: 1
}
],
delete: ['<string>']
}
})
};

fetch('https://api.sandbox.teal.dev/v0/journal-entries/{journal_entry_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.teal.dev/v0/journal-entries/{journal_entry_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '2023-02-15T06:42:18Z',
'description' => 'Payroll#230215',
'line_entry_changes' => [
'create' => [
[
'amount' => '31282.27999999999883584678173065185546875',
'ledger_id' => '<string>',
'description' => 'Payroll#230215',
'tag_ids' => [
'<string>'
],
'sort_order' => 1
]
],
'update' => [
[
'id' => '<string>',
'amount' => '31282.27999999999883584678173065185546875',
'debit_credit' => 'credit',
'description' => '<string>',
'ledger_id' => '7JRNsKwy2Lw66caxVU7WGC',
'tag_ids' => [
'<string>'
],
'sort_order' => 1
]
],
'delete' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"teal-instance-id: <teal-instance-id>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.teal.dev/v0/journal-entries/{journal_entry_id}"

payload := strings.NewReader("{\n \"datetime\": \"2023-02-15T06:42:18Z\",\n \"description\": \"Payroll#230215\",\n \"line_entry_changes\": {\n \"create\": [\n {\n \"amount\": \"31282.27999999999883584678173065185546875\",\n \"ledger_id\": \"<string>\",\n \"description\": \"Payroll#230215\",\n \"tag_ids\": [\n \"<string>\"\n ],\n \"sort_order\": 1\n }\n ],\n \"update\": [\n {\n \"id\": \"<string>\",\n \"amount\": \"31282.27999999999883584678173065185546875\",\n \"debit_credit\": \"credit\",\n \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\n ],\n \"sort_order\": 1\n }\n ],\n \"delete\": [\n \"<string>\"\n ]\n }\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("teal-instance-id", "<teal-instance-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.sandbox.teal.dev/v0/journal-entries/{journal_entry_id}")
.header("teal-instance-id", "<teal-instance-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"datetime\": \"2023-02-15T06:42:18Z\",\n \"description\": \"Payroll#230215\",\n \"line_entry_changes\": {\n \"create\": [\n {\n \"amount\": \"31282.27999999999883584678173065185546875\",\n \"ledger_id\": \"<string>\",\n \"description\": \"Payroll#230215\",\n \"tag_ids\": [\n \"<string>\"\n ],\n \"sort_order\": 1\n }\n ],\n \"update\": [\n {\n \"id\": \"<string>\",\n \"amount\": \"31282.27999999999883584678173065185546875\",\n \"debit_credit\": \"credit\",\n \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\n ],\n \"sort_order\": 1\n }\n ],\n \"delete\": [\n \"<string>\"\n ]\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.teal.dev/v0/journal-entries/{journal_entry_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["teal-instance-id"] = '<teal-instance-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"datetime\": \"2023-02-15T06:42:18Z\",\n \"description\": \"Payroll#230215\",\n \"line_entry_changes\": {\n \"create\": [\n {\n \"amount\": \"31282.27999999999883584678173065185546875\",\n \"ledger_id\": \"<string>\",\n \"description\": \"Payroll#230215\",\n \"tag_ids\": [\n \"<string>\"\n ],\n \"sort_order\": 1\n }\n ],\n \"update\": [\n {\n \"id\": \"<string>\",\n \"amount\": \"31282.27999999999883584678173065185546875\",\n \"debit_credit\": \"credit\",\n \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\n ],\n \"sort_order\": 1\n }\n ],\n \"delete\": [\n \"<string>\"\n ]\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "description": "<string>",
  "datetime": "2023-11-07T05:31:56Z",
  "creation_date": "2023-11-07T05:31:56Z",
  "is_opening_balance": true,
  "line_entry_ids": [
    "XMDsKVuW4Wmi3LTW31Qw6E",
    "NULcvXTkLczde32qs1rqgB"
  ],
  "linked_entity": null,
  "line_entries": [
    {
      "amount": 31282.28,
      "categorization_status": "completed",
      "datetime": "2023-02-15T06:42:18Z",
      "debit_credit": "debit",
      "description": "Payroll#230215",
      "editable": false,
      "id": "XMDsKVuW4Wmi3LTW31Qw6E",
      "journal_entry_description": "Payroll#230215",
      "journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
      "ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
      "ledger_name": "Pluto Checking 4242",
      "sort_order": 1,
      "tags": [],
      "transaction_id": "txn_UjL3BQnEaJtecuC7CUeDk"
    },
    {
      "amount": 31282.28,
      "categorization_status": "completed",
      "datetime": "2023-02-15T06:42:18Z",
      "debit_credit": "credit",
      "description": "Payroll#230215",
      "editable": false,
      "id": "NULcvXTkLczde32qs1rqgB",
      "journal_entry_description": "Payroll#230215",
      "journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
      "ledger_id": "HLn8oy2eqMUCwjp1Cwdgco",
      "ledger_name": "Payroll Expense",
      "sort_order": 2,
      "tags": []
    }
  ],
  "accrual_source": {
    "id": "<string>",
    "instance_id": "<string>",
    "reference_number": "<string>",
    "effective_date": "2023-12-25",
    "gross_amount": 123,
    "amount_paid": 123,
    "amount_adjusted": 123,
    "amount_outstanding": 123,
    "external_id": "<string>",
    "external_party_id": "<string>",
    "due_date": "2023-12-25",
    "notes": "<string>",
    "service_period_start": "2023-12-25",
    "service_period_end": "2023-12-25",
    "lines": [
      {
        "id": "<string>",
        "accrual_source_id": "<string>",
        "account_id": "<string>",
        "line_number": 123,
        "description": "<string>",
        "amount": 123,
        "external_id": "<string>"
      }
    ],
    "journal_entry_ids": [],
    "files": [
      {
        "id": "<string>",
        "file_name": "<string>"
      }
    ],
    "payment_applications": [
      {
        "payment_application_id": "<string>",
        "matched_amount": 123,
        "line_entry": {
          "line_entry_id": "<string>",
          "line_entry_description": "<string>",
          "line_entry_amount": 123,
          "journal_entry_id": "<string>",
          "journal_entry_description": "<string>"
        },
        "adjustments": [
          {
            "accrual_adjustment_id": "<string>",
            "debit_account_id": "<string>",
            "credit_account_id": "<string>",
            "amount": 123
          }
        ]
      }
    ]
  },
  "transfer": {
    "id": "<string>",
    "from_entry": {
      "journal_entry_id": "<string>",
      "description": "<string>",
      "datetime": "2023-11-07T05:31:56Z",
      "line_entries": [
        {
          "amount": 123,
          "ledger_id": "<string>",
          "id": "XMDsKVuW4Wmi3LTW31Qw6E",
          "datetime": "2023-11-07T05:31:56Z",
          "editable": true,
          "journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
          "journal_entry_description": "<string>",
          "ledger_name": "<string>",
          "description": "Payroll#230215",
          "related_line_entry_id": "<string>",
          "transaction_id": "<string>",
          "sort_order": 1,
          "journal_entry": null,
          "ledger": null,
          "opposing_ledger_ids": [
            "<string>"
          ],
          "tags": [
            {
              "id": "<string>",
              "name": "<string>",
              "tag_group_id": "<string>"
            }
          ],
          "transaction": null,
          "payment_applications": [
            {
              "payment_application_id": "<string>",
              "matched_amount": 123,
              "accrual_source": {
                "accrual_source_id": "<string>",
                "external_id": "<string>",
                "external_party_id": "<string>",
                "reference_number": "<string>",
                "effective_date": "2023-12-25",
                "gross_amount": 123
              },
              "adjustments": [
                {
                  "accrual_adjustment_id": "<string>",
                  "debit_account_id": "<string>",
                  "credit_account_id": "<string>",
                  "amount": 123
                }
              ]
            }
          ],
          "accrual_source": {
            "id": "<string>",
            "instance_id": "<string>",
            "reference_number": "<string>",
            "effective_date": "2023-12-25",
            "gross_amount": 123,
            "amount_paid": 123,
            "amount_adjusted": 123,
            "amount_outstanding": 123,
            "external_id": "<string>",
            "external_party_id": "<string>",
            "due_date": "2023-12-25",
            "notes": "<string>",
            "service_period_start": "2023-12-25",
            "service_period_end": "2023-12-25",
            "lines": [
              {
                "id": "<string>",
                "accrual_source_id": "<string>",
                "account_id": "<string>",
                "line_number": 123,
                "description": "<string>",
                "amount": 123,
                "external_id": "<string>"
              }
            ]
          }
        }
      ]
    },
    "to_entry": {
      "journal_entry_id": "<string>",
      "description": "<string>",
      "datetime": "2023-11-07T05:31:56Z",
      "line_entries": [
        {
          "amount": 123,
          "ledger_id": "<string>",
          "id": "XMDsKVuW4Wmi3LTW31Qw6E",
          "datetime": "2023-11-07T05:31:56Z",
          "editable": true,
          "journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
          "journal_entry_description": "<string>",
          "ledger_name": "<string>",
          "description": "Payroll#230215",
          "related_line_entry_id": "<string>",
          "transaction_id": "<string>",
          "sort_order": 1,
          "journal_entry": null,
          "ledger": null,
          "opposing_ledger_ids": [
            "<string>"
          ],
          "tags": [
            {
              "id": "<string>",
              "name": "<string>",
              "tag_group_id": "<string>"
            }
          ],
          "transaction": null,
          "payment_applications": [
            {
              "payment_application_id": "<string>",
              "matched_amount": 123,
              "accrual_source": {
                "accrual_source_id": "<string>",
                "external_id": "<string>",
                "external_party_id": "<string>",
                "reference_number": "<string>",
                "effective_date": "2023-12-25",
                "gross_amount": 123
              },
              "adjustments": [
                {
                  "accrual_adjustment_id": "<string>",
                  "debit_account_id": "<string>",
                  "credit_account_id": "<string>",
                  "amount": 123
                }
              ]
            }
          ],
          "accrual_source": {
            "id": "<string>",
            "instance_id": "<string>",
            "reference_number": "<string>",
            "effective_date": "2023-12-25",
            "gross_amount": 123,
            "amount_paid": 123,
            "amount_adjusted": 123,
            "amount_outstanding": 123,
            "external_id": "<string>",
            "external_party_id": "<string>",
            "due_date": "2023-12-25",
            "notes": "<string>",
            "service_period_start": "2023-12-25",
            "service_period_end": "2023-12-25",
            "lines": [
              {
                "id": "<string>",
                "accrual_source_id": "<string>",
                "account_id": "<string>",
                "line_number": 123,
                "description": "<string>",
                "amount": 123,
                "external_id": "<string>"
              }
            ]
          }
        }
      ]
    }
  }
}
{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>"
}
{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>"
}
{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>"
}
{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Headers

teal-instance-id
string
required

The Teal instance ID

modified-by
string | null

An optional identifier for audit logging.

Path Parameters

journal_entry_id
string
required

Journal entry ID

Query Parameters

expand
enum<string>[] | null

Comma-separated list of expand paths.

Available options:
accrual_source,
line_entries,
line_entries.transaction,
line_entries.ledger,
line_entries.opposing_ledger_ids,
line_entries.payment_applications,
transfer

Body

application/json
datetime
string<date-time> | null

The datetime the Journal Entry was created in UTC time.

Example:

"2023-02-15T06:42:18Z"

description
string | null

An arbitrary string on the object, useful for displaying to the user.

Maximum string length: 512
Example:

"Payroll#230215"

line_entry_changes
LineEntryChanges · object | null

An object with optional create, update, and delete parameters to modify the Line Entries associated with the Journal Entry. The create and update parameters accept lists of Line Entry objects, while the delete parameter accepts a list of existing Line Entry IDs.

Response

Successful Response

id
string
required

The unique ID of the object.

Example:

"C4ocnUQze8kDwQ3EczkZXn"

description
string
required

An arbitrary string on the object, useful for displaying to the user.

Maximum string length: 512
Example:

"Payroll#230215"

datetime
string<date-time>
required

The datetime the Journal Entry was created in UTC time.

Example:

"2023-02-15T06:42:18Z"

creation_date
string<date-time>
required

The timestamp when this journal entry record was created in the database.

Example:

"2023-02-15T06:42:18Z"

is_opening_balance
boolean
required

Whether the Journal Entry represents an opening balance.

Example:

false

creation_source
enum<string>
required

The source of the journal entry creation: 'manual' if created manually by the user, 'transaction' if auto-generated from transaction categorization (e.g., Plaid sync), or 'legacy' if auto-generated from the old AR/AP system.

Available options:
manual,
transaction,
accrual,
payment_application,
legacy,
scheduled_accrual
categorization_status
enum<string>
required

Whether the journal entry is still awaiting an auto-categorization result: 'pending' (awaiting), 'delayed' (timed out, a late result may still resolve it), or 'completed' (resolved, or not auto-categorized).

Available options:
pending,
delayed,
completed
line_entry_ids
string[] | null

The ids of the Line Entries detailing the Journal Entry's movement of value.

Example:
[
"XMDsKVuW4Wmi3LTW31Qw6E",
"NULcvXTkLczde32qs1rqgB"
]
linked_entity
null

Deprecated - always null

line_entries
ExpandableDetailedLineEntry · object[] | null

List of Line Entries. platformGL instances only. Included in expanded responses.

Example:
[
{
"amount": 31282.28,
"categorization_status": "completed",
"datetime": "2023-02-15T06:42:18Z",
"debit_credit": "debit",
"description": "Payroll#230215",
"editable": false,
"id": "XMDsKVuW4Wmi3LTW31Qw6E",
"journal_entry_description": "Payroll#230215",
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"ledger_name": "Pluto Checking 4242",
"sort_order": 1,
"tags": [],
"transaction_id": "txn_UjL3BQnEaJtecuC7CUeDk"
},
{
"amount": 31282.28,
"categorization_status": "completed",
"datetime": "2023-02-15T06:42:18Z",
"debit_credit": "credit",
"description": "Payroll#230215",
"editable": false,
"id": "NULcvXTkLczde32qs1rqgB",
"journal_entry_description": "Payroll#230215",
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
"ledger_id": "HLn8oy2eqMUCwjp1Cwdgco",
"ledger_name": "Payroll Expense",
"sort_order": 2,
"tags": []
}
]
accrual_source
AccrualSourceDetails · object | null

The accrual source associated with this journal entry, if any. Included in expanded responses.

transfer
Transfer · object | null

The transfer linking this journal entry to the journal entry on the other side of the transfer, if any. Included in expanded responses.