curl --request PATCH \
--url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_id} \
--header 'Content-Type: application/json' \
--data '
{
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"description": "Pacote de taxas administrativas padrão",
"enable": true,
"feeGroupLabel": "Pacote Padrão",
"fees": {},
"id": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"maximumAmount": "2",
"minimumAmount": "100",
"segmentId": "00000000-0000-0000-0000-000000000000",
"transactionRoute": "debitoted",
"updatedAt": "2021-01-01T00:00:00Z",
"waivedAccounts": [
"acc001",
"acc002"
]
}
'import requests
url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_id}"
payload = {
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"description": "Pacote de taxas administrativas padrão",
"enable": True,
"feeGroupLabel": "Pacote Padrão",
"fees": {},
"id": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"maximumAmount": "2",
"minimumAmount": "100",
"segmentId": "00000000-0000-0000-0000-000000000000",
"transactionRoute": "debitoted",
"updatedAt": "2021-01-01T00:00:00Z",
"waivedAccounts": ["acc001", "acc002"]
}
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({
createdAt: '2021-01-01T00:00:00Z',
deletedAt: '2021-01-01T00:00:00Z',
description: 'Pacote de taxas administrativas padrão',
enable: true,
feeGroupLabel: 'Pacote Padrão',
fees: {},
id: '00000000-0000-0000-0000-000000000000',
ledgerId: '00000000-0000-0000-0000-000000000000',
maximumAmount: '2',
minimumAmount: '100',
segmentId: '00000000-0000-0000-0000-000000000000',
transactionRoute: 'debitoted',
updatedAt: '2021-01-01T00:00:00Z',
waivedAccounts: ['acc001', 'acc002']
})
};
fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_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://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_id}",
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([
'createdAt' => '2021-01-01T00:00:00Z',
'deletedAt' => '2021-01-01T00:00:00Z',
'description' => 'Pacote de taxas administrativas padrão',
'enable' => true,
'feeGroupLabel' => 'Pacote Padrão',
'fees' => [
],
'id' => '00000000-0000-0000-0000-000000000000',
'ledgerId' => '00000000-0000-0000-0000-000000000000',
'maximumAmount' => '2',
'minimumAmount' => '100',
'segmentId' => '00000000-0000-0000-0000-000000000000',
'transactionRoute' => 'debitoted',
'updatedAt' => '2021-01-01T00:00:00Z',
'waivedAccounts' => [
'acc001',
'acc002'
]
]),
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}/packages/{package_id}"
payload := strings.NewReader("{\n \"createdAt\": \"2021-01-01T00:00:00Z\",\n \"deletedAt\": \"2021-01-01T00:00:00Z\",\n \"description\": \"Pacote de taxas administrativas padrão\",\n \"enable\": true,\n \"feeGroupLabel\": \"Pacote Padrão\",\n \"fees\": {},\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"ledgerId\": \"00000000-0000-0000-0000-000000000000\",\n \"maximumAmount\": \"2\",\n \"minimumAmount\": \"100\",\n \"segmentId\": \"00000000-0000-0000-0000-000000000000\",\n \"transactionRoute\": \"debitoted\",\n \"updatedAt\": \"2021-01-01T00:00:00Z\",\n \"waivedAccounts\": [\n \"acc001\",\n \"acc002\"\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}/packages/{package_id}")
.header("Content-Type", "application/json")
.body("{\n \"createdAt\": \"2021-01-01T00:00:00Z\",\n \"deletedAt\": \"2021-01-01T00:00:00Z\",\n \"description\": \"Pacote de taxas administrativas padrão\",\n \"enable\": true,\n \"feeGroupLabel\": \"Pacote Padrão\",\n \"fees\": {},\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"ledgerId\": \"00000000-0000-0000-0000-000000000000\",\n \"maximumAmount\": \"2\",\n \"minimumAmount\": \"100\",\n \"segmentId\": \"00000000-0000-0000-0000-000000000000\",\n \"transactionRoute\": \"debitoted\",\n \"updatedAt\": \"2021-01-01T00:00:00Z\",\n \"waivedAccounts\": [\n \"acc001\",\n \"acc002\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_id}")
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 \"createdAt\": \"2021-01-01T00:00:00Z\",\n \"deletedAt\": \"2021-01-01T00:00:00Z\",\n \"description\": \"Pacote de taxas administrativas padrão\",\n \"enable\": true,\n \"feeGroupLabel\": \"Pacote Padrão\",\n \"fees\": {},\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"ledgerId\": \"00000000-0000-0000-0000-000000000000\",\n \"maximumAmount\": \"2\",\n \"minimumAmount\": \"100\",\n \"segmentId\": \"00000000-0000-0000-0000-000000000000\",\n \"transactionRoute\": \"debitoted\",\n \"updatedAt\": \"2021-01-01T00:00:00Z\",\n \"waivedAccounts\": [\n \"acc001\",\n \"acc002\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"description": "Pacote de taxas administrativas padrão",
"enable": true,
"feeGroupLabel": "Pacote Padrão",
"fees": {},
"id": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"maximumAmount": "2",
"minimumAmount": "100",
"segmentId": "00000000-0000-0000-0000-000000000000",
"transactionRoute": "debitoted",
"updatedAt": "2021-01-01T00:00:00Z",
"waivedAccounts": [
"acc001",
"acc002"
]
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Update a package
curl --request PATCH \
--url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_id} \
--header 'Content-Type: application/json' \
--data '
{
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"description": "Pacote de taxas administrativas padrão",
"enable": true,
"feeGroupLabel": "Pacote Padrão",
"fees": {},
"id": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"maximumAmount": "2",
"minimumAmount": "100",
"segmentId": "00000000-0000-0000-0000-000000000000",
"transactionRoute": "debitoted",
"updatedAt": "2021-01-01T00:00:00Z",
"waivedAccounts": [
"acc001",
"acc002"
]
}
'import requests
url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_id}"
payload = {
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"description": "Pacote de taxas administrativas padrão",
"enable": True,
"feeGroupLabel": "Pacote Padrão",
"fees": {},
"id": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"maximumAmount": "2",
"minimumAmount": "100",
"segmentId": "00000000-0000-0000-0000-000000000000",
"transactionRoute": "debitoted",
"updatedAt": "2021-01-01T00:00:00Z",
"waivedAccounts": ["acc001", "acc002"]
}
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({
createdAt: '2021-01-01T00:00:00Z',
deletedAt: '2021-01-01T00:00:00Z',
description: 'Pacote de taxas administrativas padrão',
enable: true,
feeGroupLabel: 'Pacote Padrão',
fees: {},
id: '00000000-0000-0000-0000-000000000000',
ledgerId: '00000000-0000-0000-0000-000000000000',
maximumAmount: '2',
minimumAmount: '100',
segmentId: '00000000-0000-0000-0000-000000000000',
transactionRoute: 'debitoted',
updatedAt: '2021-01-01T00:00:00Z',
waivedAccounts: ['acc001', 'acc002']
})
};
fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_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://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_id}",
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([
'createdAt' => '2021-01-01T00:00:00Z',
'deletedAt' => '2021-01-01T00:00:00Z',
'description' => 'Pacote de taxas administrativas padrão',
'enable' => true,
'feeGroupLabel' => 'Pacote Padrão',
'fees' => [
],
'id' => '00000000-0000-0000-0000-000000000000',
'ledgerId' => '00000000-0000-0000-0000-000000000000',
'maximumAmount' => '2',
'minimumAmount' => '100',
'segmentId' => '00000000-0000-0000-0000-000000000000',
'transactionRoute' => 'debitoted',
'updatedAt' => '2021-01-01T00:00:00Z',
'waivedAccounts' => [
'acc001',
'acc002'
]
]),
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}/packages/{package_id}"
payload := strings.NewReader("{\n \"createdAt\": \"2021-01-01T00:00:00Z\",\n \"deletedAt\": \"2021-01-01T00:00:00Z\",\n \"description\": \"Pacote de taxas administrativas padrão\",\n \"enable\": true,\n \"feeGroupLabel\": \"Pacote Padrão\",\n \"fees\": {},\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"ledgerId\": \"00000000-0000-0000-0000-000000000000\",\n \"maximumAmount\": \"2\",\n \"minimumAmount\": \"100\",\n \"segmentId\": \"00000000-0000-0000-0000-000000000000\",\n \"transactionRoute\": \"debitoted\",\n \"updatedAt\": \"2021-01-01T00:00:00Z\",\n \"waivedAccounts\": [\n \"acc001\",\n \"acc002\"\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}/packages/{package_id}")
.header("Content-Type", "application/json")
.body("{\n \"createdAt\": \"2021-01-01T00:00:00Z\",\n \"deletedAt\": \"2021-01-01T00:00:00Z\",\n \"description\": \"Pacote de taxas administrativas padrão\",\n \"enable\": true,\n \"feeGroupLabel\": \"Pacote Padrão\",\n \"fees\": {},\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"ledgerId\": \"00000000-0000-0000-0000-000000000000\",\n \"maximumAmount\": \"2\",\n \"minimumAmount\": \"100\",\n \"segmentId\": \"00000000-0000-0000-0000-000000000000\",\n \"transactionRoute\": \"debitoted\",\n \"updatedAt\": \"2021-01-01T00:00:00Z\",\n \"waivedAccounts\": [\n \"acc001\",\n \"acc002\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/packages/{package_id}")
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 \"createdAt\": \"2021-01-01T00:00:00Z\",\n \"deletedAt\": \"2021-01-01T00:00:00Z\",\n \"description\": \"Pacote de taxas administrativas padrão\",\n \"enable\": true,\n \"feeGroupLabel\": \"Pacote Padrão\",\n \"fees\": {},\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"ledgerId\": \"00000000-0000-0000-0000-000000000000\",\n \"maximumAmount\": \"2\",\n \"minimumAmount\": \"100\",\n \"segmentId\": \"00000000-0000-0000-0000-000000000000\",\n \"transactionRoute\": \"debitoted\",\n \"updatedAt\": \"2021-01-01T00:00:00Z\",\n \"waivedAccounts\": [\n \"acc001\",\n \"acc002\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"description": "Pacote de taxas administrativas padrão",
"enable": true,
"feeGroupLabel": "Pacote Padrão",
"fees": {},
"id": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"maximumAmount": "2",
"minimumAmount": "100",
"segmentId": "00000000-0000-0000-0000-000000000000",
"transactionRoute": "debitoted",
"updatedAt": "2021-01-01T00:00:00Z",
"waivedAccounts": [
"acc001",
"acc002"
]
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Headers
The type of media of the resource. Recommended value is application/json.
A unique identifier used to trace and track each request.
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
The unique identifier of the Organization associated with the Ledger.
Package ID (UUID)
Body
"2021-01-01T00:00:00Z"
"2021-01-01T00:00:00Z"
"Pacote de taxas administrativas padrão"
"Pacote Padrão"
Show child attributes
Show child attributes
"00000000-0000-0000-0000-000000000000"
"00000000-0000-0000-0000-000000000000"
"2"
"100"
"00000000-0000-0000-0000-000000000000"
"debitoted"
"2021-01-01T00:00:00Z"
["acc001", "acc002"]
Response
OK
"2021-01-01T00:00:00Z"
"2021-01-01T00:00:00Z"
"Pacote de taxas administrativas padrão"
"Pacote Padrão"
Show child attributes
Show child attributes
"00000000-0000-0000-0000-000000000000"
"00000000-0000-0000-0000-000000000000"
"2"
"100"
"00000000-0000-0000-0000-000000000000"
"debitoted"
"2021-01-01T00:00:00Z"
["acc001", "acc002"]
Was this page helpful?

