Update multiple Journal Entries
curl --request PUT \
--url https://api.sandbox.teal.dev/v0/journal-entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '
[
{
"id": "<string>",
"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"
payload = [
{
"id": "<string>",
"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([
{
id: '<string>',
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', 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",
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([
[
'id' => '<string>',
'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"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\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 }\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")
.header("teal-instance-id", "<teal-instance-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\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 }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.teal.dev/v0/journal-entries")
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 {\n \"id\": \"<string>\",\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 }\n]"
response = http.request(request)
puts response.read_body{
"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>"
}Journal Entries
Update multiple Journal Entries
Updates multiple existing Journal Entry’s details.
PUT
/
v0
/
journal-entries
Update multiple Journal Entries
curl --request PUT \
--url https://api.sandbox.teal.dev/v0/journal-entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'teal-instance-id: <teal-instance-id>' \
--data '
[
{
"id": "<string>",
"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"
payload = [
{
"id": "<string>",
"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([
{
id: '<string>',
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', 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",
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([
[
'id' => '<string>',
'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"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\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 }\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")
.header("teal-instance-id", "<teal-instance-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\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 }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.teal.dev/v0/journal-entries")
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 {\n \"id\": \"<string>\",\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 }\n]"
response = http.request(request)
puts response.read_body{
"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
Bearer authentication header of the form Bearer , where is your auth token.
Headers
The Teal instance ID
An optional identifier for audit logging.
Body
application/json
The unique ID of the object.
Example:
"TYcnEf8yEYMXSwUui3E2df"
The datetime the Journal Entry was created in UTC time.
Example:
"2023-02-15T06:42:18Z"
An arbitrary string on the object, useful for displaying to the user.
Maximum string length:
512Example:
"Payroll#230215"
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.
Show child attributes
Show child attributes
Response
Successful Response
⌘I