Skip to main content
PATCH
/
v1
/
organizations
/
{organization_id}
/
ledgers
/
{ledger_id}
/
settings
Update Ledger Settings
curl --request PATCH \
  --url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/settings \
  --header 'Content-Type: application/json' \
  --data '
{
  "accounting": {
    "validateRoutes": true
  }
}
'
import requests

url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/settings"

payload = { "accounting": { "validateRoutes": True } }
headers = {"Content-Type": "application/json"}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({accounting: {validateRoutes: true}})
};

fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/settings', 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://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accounting' => [
'validateRoutes' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$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://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/settings"

payload := strings.NewReader("{\n \"accounting\": {\n \"validateRoutes\": true\n }\n}")

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

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.patch("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/settings")
.header("Content-Type", "application/json")
.body("{\n \"accounting\": {\n \"validateRoutes\": true\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/settings")

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

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"accounting\": {\n \"validateRoutes\": true\n }\n}"

response = http.request(request)
puts response.read_body
{
  "accounting": {
    "validateAccountType": false,
    "validateRoutes": true
  }
}

Headers

Content-Type
string

The type of media of the resource. Recommended value is application/json.

X-Request-Id
string<uuid>

A unique identifier used to trace and track each request.

Authorization
string

Bearer JWT token for authentication. Required when PLUGIN_AUTH_ENABLED=true (enforced in multi-tenant deployments). Optional in default OSS single-tenant mode. Format: Bearer <token>

Path Parameters

organization_id
string<uuid>
required

The unique identifier of the Organization associated with the Ledger.

ledger_id
string<uuid>
required

The unique identifier of the associated Ledger.

Body

application/json

Partial update for Ledger settings. Uses deep merge — only the fields you include are changed.

accounting
object

Accounting-related settings for the Ledger.

Response

Indicates that the request was successful and the settings were updated.

The current settings of a Ledger.

accounting
object

Accounting-related settings for the Ledger.