curl --request PUT \
--url https://api.sandbox.teal.dev/v0/line-entries/{line_entry_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '
{
"description": "<string>",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"tag_ids": [
"<string>"
]
}
'import requests
url = "https://api.sandbox.teal.dev/v0/line-entries/{line_entry_id}"
payload = {
"description": "<string>",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"tag_ids": ["<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({
description: '<string>',
ledger_id: '7JRNsKwy2Lw66caxVU7WGC',
tag_ids: ['<string>']
})
};
fetch('https://api.sandbox.teal.dev/v0/line-entries/{line_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/line-entries/{line_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([
'description' => '<string>',
'ledger_id' => '7JRNsKwy2Lw66caxVU7WGC',
'tag_ids' => [
'<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/line-entries/{line_entry_id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\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/line-entries/{line_entry_id}")
.header("teal-instance-id", "<teal-instance-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.teal.dev/v0/line-entries/{line_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 \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"amount": "31282.27999999999883584678173065185546875",
"debit_credit": "credit",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"id": "XMDsKVuW4Wmi3LTW31Qw6E",
"datetime": "2023-02-15T06:42:18Z",
"editable": true,
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
"journal_entry_description": "Payroll#230215",
"categorization_status": "completed",
"ledger_name": "Payroll Expense",
"description": "Payroll#230215",
"related_line_entry_id": "<string>",
"transaction_id": "<string>",
"sort_order": 1,
"journal_entry": {
"categorization_status": "completed",
"creation_date": "2023-02-15T06:42:18Z",
"creation_source": "manual",
"datetime": "2023-02-15T06:42:18Z",
"description": "Payroll#230215",
"id": "C4ocnUQze8kDwQ3EczkZXn",
"is_opening_balance": false,
"line_entry_ids": [
"XMDsKVuW4Wmi3LTW31Qw6E",
"NULcvXTkLczde32qs1rqgB"
]
},
"ledger": {
"created_at": "2024-01-01T00:00:00",
"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": "2240",
"sub_type": "current_assets",
"type": "asset"
},
"opposing_ledger_ids": [
"<string>"
],
"tags": [
{
"id": "UjL3BQnEaJtecuC7CUeDk",
"name": "Sprinter - 1ab-c23",
"tag_group_id": "NCB2xo5S1yQbNgyWskXpwG"
}
],
"transaction": {
"amount": 31282.28,
"datetime": "2023-02-15T06:42:18Z",
"description": "Payroll#230215",
"id": "txn_UjL3BQnEaJtecuC7CUeDk",
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"line_entry_id": "XMDsKVuW4Wmi3LTW31Qw6E",
"personal": false,
"posted_status": "posted",
"review_status": "reviewed",
"source_account_id": "L7RR1Yz85FJoASPvPLs441"
},
"payment_applications": [
{
"payment_application_id": "<string>",
"matched_amount": 123,
"accrual_source": {
"accrual_source_id": "<string>",
"type": "invoice",
"external_id": "<string>",
"external_party_id": "<string>",
"reference_number": "<string>",
"effective_date": "2023-12-25",
"gross_amount": 123
},
"source_type": "bank_transaction",
"status": "proposed",
"adjustments": [
{
"accrual_adjustment_id": "<string>",
"debit_account_id": "<string>",
"credit_account_id": "<string>",
"amount": 123
}
]
}
],
"line_payment_applications": [
{
"line_payment_application_id": "<string>",
"matched_amount": 123,
"accrual_source": {
"accrual_source_id": "<string>",
"type": "payroll",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"source_type": "bank_transaction",
"status": "proposed"
}
],
"accrual_source": {
"id": "<string>",
"instance_id": "<string>",
"reference_number": "<string>",
"type": "invoice",
"status": "paid",
"display_status": "paid",
"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>",
"error_code": "invalid_date"
}{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>",
"error_code": "invalid_date"
}{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>",
"error_code": "invalid_date"
}{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>",
"error_code": "invalid_date"
}Update a Line Entry
Updates a Line Entry.
curl --request PUT \
--url https://api.sandbox.teal.dev/v0/line-entries/{line_entry_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '
{
"description": "<string>",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"tag_ids": [
"<string>"
]
}
'import requests
url = "https://api.sandbox.teal.dev/v0/line-entries/{line_entry_id}"
payload = {
"description": "<string>",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"tag_ids": ["<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({
description: '<string>',
ledger_id: '7JRNsKwy2Lw66caxVU7WGC',
tag_ids: ['<string>']
})
};
fetch('https://api.sandbox.teal.dev/v0/line-entries/{line_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/line-entries/{line_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([
'description' => '<string>',
'ledger_id' => '7JRNsKwy2Lw66caxVU7WGC',
'tag_ids' => [
'<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/line-entries/{line_entry_id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\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/line-entries/{line_entry_id}")
.header("teal-instance-id", "<teal-instance-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.teal.dev/v0/line-entries/{line_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 \"description\": \"<string>\",\n \"ledger_id\": \"7JRNsKwy2Lw66caxVU7WGC\",\n \"tag_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"amount": "31282.27999999999883584678173065185546875",
"debit_credit": "credit",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"id": "XMDsKVuW4Wmi3LTW31Qw6E",
"datetime": "2023-02-15T06:42:18Z",
"editable": true,
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
"journal_entry_description": "Payroll#230215",
"categorization_status": "completed",
"ledger_name": "Payroll Expense",
"description": "Payroll#230215",
"related_line_entry_id": "<string>",
"transaction_id": "<string>",
"sort_order": 1,
"journal_entry": {
"categorization_status": "completed",
"creation_date": "2023-02-15T06:42:18Z",
"creation_source": "manual",
"datetime": "2023-02-15T06:42:18Z",
"description": "Payroll#230215",
"id": "C4ocnUQze8kDwQ3EczkZXn",
"is_opening_balance": false,
"line_entry_ids": [
"XMDsKVuW4Wmi3LTW31Qw6E",
"NULcvXTkLczde32qs1rqgB"
]
},
"ledger": {
"created_at": "2024-01-01T00:00:00",
"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": "2240",
"sub_type": "current_assets",
"type": "asset"
},
"opposing_ledger_ids": [
"<string>"
],
"tags": [
{
"id": "UjL3BQnEaJtecuC7CUeDk",
"name": "Sprinter - 1ab-c23",
"tag_group_id": "NCB2xo5S1yQbNgyWskXpwG"
}
],
"transaction": {
"amount": 31282.28,
"datetime": "2023-02-15T06:42:18Z",
"description": "Payroll#230215",
"id": "txn_UjL3BQnEaJtecuC7CUeDk",
"journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn",
"ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
"line_entry_id": "XMDsKVuW4Wmi3LTW31Qw6E",
"personal": false,
"posted_status": "posted",
"review_status": "reviewed",
"source_account_id": "L7RR1Yz85FJoASPvPLs441"
},
"payment_applications": [
{
"payment_application_id": "<string>",
"matched_amount": 123,
"accrual_source": {
"accrual_source_id": "<string>",
"type": "invoice",
"external_id": "<string>",
"external_party_id": "<string>",
"reference_number": "<string>",
"effective_date": "2023-12-25",
"gross_amount": 123
},
"source_type": "bank_transaction",
"status": "proposed",
"adjustments": [
{
"accrual_adjustment_id": "<string>",
"debit_account_id": "<string>",
"credit_account_id": "<string>",
"amount": 123
}
]
}
],
"line_payment_applications": [
{
"line_payment_application_id": "<string>",
"matched_amount": 123,
"accrual_source": {
"accrual_source_id": "<string>",
"type": "payroll",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"source_type": "bank_transaction",
"status": "proposed"
}
],
"accrual_source": {
"id": "<string>",
"instance_id": "<string>",
"reference_number": "<string>",
"type": "invoice",
"status": "paid",
"display_status": "paid",
"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>",
"error_code": "invalid_date"
}{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>",
"error_code": "invalid_date"
}{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>",
"error_code": "invalid_date"
}{
"message": "<string>",
"data": "<unknown>",
"display_message": "<string>",
"error_code": "invalid_date"
}Authorizations
Bearer authentication header of the form Bearer , where is your auth token.
Headers
The Teal instance ID
An optional identifier for audit logging.
Path Parameters
The line entry ID
Query Parameters
Comma-separated list of Line Entry expand paths.
transaction, ledger, journal_entry, opposing_ledger_ids, payment_applications, line_payment_applications, accrual_source Body
An arbitrary string on the object, useful for displaying to the user or for categorization.
4000The ID of the Line Entry's Ledger.
"7JRNsKwy2Lw66caxVU7WGC"
A list of IDs of the Tag objects associated with the Line Entry.
Response
Successful Response
The value of the line entry in decimal dollar cents.
"31282.27999999999883584678173065185546875"
Indicates if the amount is a credit or debit.
debit, credit "credit"
The ID of the Line Entry's Ledger.
"7JRNsKwy2Lw66caxVU7WGC"
The unique ID of the object.
"XMDsKVuW4Wmi3LTW31Qw6E"
The datetime the Line Entry was created in UTC time.
"2023-02-15T06:42:18Z"
Indicates if the Line Entry can be manually added or removed from a Ledger, as dictated by the editable property on the Ledger.
true
The ID of the associated Journal Entry.
"C4ocnUQze8kDwQ3EczkZXn"
An arbitrary string on the object, useful for displaying to users.
512"Payroll#230215"
Whether the associated 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). Both Line Entries of a Journal Entry share this value.
pending, delayed, completed "completed"
The name of the Line Entry's Ledger.
"Payroll Expense"
An arbitrary string on the object, useful for displaying to the user or for categorization.
4000"Payroll#230215"
If the Line Entry is identified as a transfer between accounts, the ID of the Line Entry in the opposing Ledger. Related guide: Auto-categorization
The ID of the associated Transaction, if one exists.
The position of the Line Entry within its Journal Entry, used to determine display order.
1
Expandable. The associated Journal Entry object.
Show child attributes
Show child attributes
{ "categorization_status": "completed", "creation_date": "2023-02-15T06:42:18Z", "creation_source": "manual", "datetime": "2023-02-15T06:42:18Z", "description": "Payroll#230215", "id": "C4ocnUQze8kDwQ3EczkZXn", "is_opening_balance": false, "line_entry_ids": [ "XMDsKVuW4Wmi3LTW31Qw6E", "NULcvXTkLczde32qs1rqgB" ] }
Expandable. The associated Ledger object.
Show child attributes
Show child attributes
{ "created_at": "2024-01-01T00:00:00", "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": "2240", "sub_type": "current_assets", "type": "asset" }
Expandable. IDs of the ledgers on the other side(s) of the line entry with opposite debit/credit.
A list of all the Tags associated with the Line Entry, if any.
Show child attributes
Show child attributes
Expandable. The associated Transaction object, if one exists.
Show child attributes
Show child attributes
{ "amount": 31282.28, "datetime": "2023-02-15T06:42:18Z", "description": "Payroll#230215", "id": "txn_UjL3BQnEaJtecuC7CUeDk", "journal_entry_id": "C4ocnUQze8kDwQ3EczkZXn", "ledger_id": "7JRNsKwy2Lw66caxVU7WGC", "line_entry_id": "XMDsKVuW4Wmi3LTW31Qw6E", "personal": false, "posted_status": "posted", "review_status": "reviewed", "source_account_id": "L7RR1Yz85FJoASPvPLs441" }
Payments applied to an accrual source (bill/invoice) using the Line Entry.
Show child attributes
Show child attributes
Payments applied to specific payroll lines of an accrual source using the Line Entry.
Show child attributes
Show child attributes
The accrual source linked to a line entry, if one exists.
Show child attributes
Show child attributes