curl --request POST \
--url https://fees.sandbox.lerian.net/v1/packages \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": [
"customer-brl-1",
"customer-brl-2",
"customer-brl-3"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "business-brl-2"
}
},
"enable": true
}
'import requests
url = "https://fees.sandbox.lerian.net/v1/packages"
payload = {
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": ["customer-brl-1", "customer-brl-2", "customer-brl-3"],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": True,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": False,
"creditAccount": "business-brl-2"
}
},
"enable": True
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Organization-Id': '<x-organization-id>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
feeGroupLabel: 'Standard Package',
description: 'Package for testing',
transactionRoute: '019c96a0-10a0-72d2-9fb0-2b7de8093182',
segmentId: '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
ledgerId: '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
minimumAmount: '3000.00',
maximumAmount: '6000.00',
waivedAccounts: ['customer-brl-1', 'customer-brl-2', 'customer-brl-3'],
fees: {
admFee: {
feeLabel: 'Administrative Fee',
calculationModel: {applicationRule: 'flatFee', calculations: [{type: 'flat', value: '16.00'}]},
referenceAmount: 'originalAmount',
priority: 1,
isDeductibleFrom: true,
creditAccount: 'business-brl-1',
routeFrom: '019c96a0-1071-7a0d-9916-a831221de252',
routeTo: '019c96a0-108c-7a74-8e31-3789daffe1ed'
},
iof: {
feeLabel: 'IOF',
calculationModel: {
applicationRule: 'percentual',
calculations: [{type: 'percentage', value: '6.00'}]
},
referenceAmount: 'afterFeesAmount',
priority: 2,
isDeductibleFrom: false,
creditAccount: 'business-brl-2'
}
},
enable: true
})
};
fetch('https://fees.sandbox.lerian.net/v1/packages', 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://fees.sandbox.lerian.net/v1/packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feeGroupLabel' => 'Standard Package',
'description' => 'Package for testing',
'transactionRoute' => '019c96a0-10a0-72d2-9fb0-2b7de8093182',
'segmentId' => '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
'ledgerId' => '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
'minimumAmount' => '3000.00',
'maximumAmount' => '6000.00',
'waivedAccounts' => [
'customer-brl-1',
'customer-brl-2',
'customer-brl-3'
],
'fees' => [
'admFee' => [
'feeLabel' => 'Administrative Fee',
'calculationModel' => [
'applicationRule' => 'flatFee',
'calculations' => [
[
'type' => 'flat',
'value' => '16.00'
]
]
],
'referenceAmount' => 'originalAmount',
'priority' => 1,
'isDeductibleFrom' => true,
'creditAccount' => 'business-brl-1',
'routeFrom' => '019c96a0-1071-7a0d-9916-a831221de252',
'routeTo' => '019c96a0-108c-7a74-8e31-3789daffe1ed'
],
'iof' => [
'feeLabel' => 'IOF',
'calculationModel' => [
'applicationRule' => 'percentual',
'calculations' => [
[
'type' => 'percentage',
'value' => '6.00'
]
]
],
'referenceAmount' => 'afterFeesAmount',
'priority' => 2,
'isDeductibleFrom' => false,
'creditAccount' => 'business-brl-2'
]
],
'enable' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Organization-Id: <x-organization-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://fees.sandbox.lerian.net/v1/packages"
payload := strings.NewReader("{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fees.sandbox.lerian.net/v1/packages")
.header("X-Organization-Id", "<x-organization-id>")
.header("Content-Type", "<content-type>")
.body("{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "0196251d-a93a-7c42-9eef-c9f463470e21",
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": [
"customer-brl-1",
"customer-brl-2",
"customer-brl-3"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "business-brl-2"
}
},
"enable": true,
"createdAt": "2025-04-10T07:33:03.121Z",
"updatedAt": null,
"deletedAt": null
}Create a Package
Use this endpoint to create packages along with their associated fees in a single request.
curl --request POST \
--url https://fees.sandbox.lerian.net/v1/packages \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": [
"customer-brl-1",
"customer-brl-2",
"customer-brl-3"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "business-brl-2"
}
},
"enable": true
}
'import requests
url = "https://fees.sandbox.lerian.net/v1/packages"
payload = {
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": ["customer-brl-1", "customer-brl-2", "customer-brl-3"],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": True,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": False,
"creditAccount": "business-brl-2"
}
},
"enable": True
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Organization-Id': '<x-organization-id>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
feeGroupLabel: 'Standard Package',
description: 'Package for testing',
transactionRoute: '019c96a0-10a0-72d2-9fb0-2b7de8093182',
segmentId: '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
ledgerId: '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
minimumAmount: '3000.00',
maximumAmount: '6000.00',
waivedAccounts: ['customer-brl-1', 'customer-brl-2', 'customer-brl-3'],
fees: {
admFee: {
feeLabel: 'Administrative Fee',
calculationModel: {applicationRule: 'flatFee', calculations: [{type: 'flat', value: '16.00'}]},
referenceAmount: 'originalAmount',
priority: 1,
isDeductibleFrom: true,
creditAccount: 'business-brl-1',
routeFrom: '019c96a0-1071-7a0d-9916-a831221de252',
routeTo: '019c96a0-108c-7a74-8e31-3789daffe1ed'
},
iof: {
feeLabel: 'IOF',
calculationModel: {
applicationRule: 'percentual',
calculations: [{type: 'percentage', value: '6.00'}]
},
referenceAmount: 'afterFeesAmount',
priority: 2,
isDeductibleFrom: false,
creditAccount: 'business-brl-2'
}
},
enable: true
})
};
fetch('https://fees.sandbox.lerian.net/v1/packages', 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://fees.sandbox.lerian.net/v1/packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feeGroupLabel' => 'Standard Package',
'description' => 'Package for testing',
'transactionRoute' => '019c96a0-10a0-72d2-9fb0-2b7de8093182',
'segmentId' => '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
'ledgerId' => '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
'minimumAmount' => '3000.00',
'maximumAmount' => '6000.00',
'waivedAccounts' => [
'customer-brl-1',
'customer-brl-2',
'customer-brl-3'
],
'fees' => [
'admFee' => [
'feeLabel' => 'Administrative Fee',
'calculationModel' => [
'applicationRule' => 'flatFee',
'calculations' => [
[
'type' => 'flat',
'value' => '16.00'
]
]
],
'referenceAmount' => 'originalAmount',
'priority' => 1,
'isDeductibleFrom' => true,
'creditAccount' => 'business-brl-1',
'routeFrom' => '019c96a0-1071-7a0d-9916-a831221de252',
'routeTo' => '019c96a0-108c-7a74-8e31-3789daffe1ed'
],
'iof' => [
'feeLabel' => 'IOF',
'calculationModel' => [
'applicationRule' => 'percentual',
'calculations' => [
[
'type' => 'percentage',
'value' => '6.00'
]
]
],
'referenceAmount' => 'afterFeesAmount',
'priority' => 2,
'isDeductibleFrom' => false,
'creditAccount' => 'business-brl-2'
]
],
'enable' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Organization-Id: <x-organization-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://fees.sandbox.lerian.net/v1/packages"
payload := strings.NewReader("{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fees.sandbox.lerian.net/v1/packages")
.header("X-Organization-Id", "<x-organization-id>")
.header("Content-Type", "<content-type>")
.body("{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "0196251d-a93a-7c42-9eef-c9f463470e21",
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": [
"customer-brl-1",
"customer-brl-2",
"customer-brl-3"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "business-brl-2"
}
},
"enable": true,
"createdAt": "2025-04-10T07:33:03.121Z",
"updatedAt": null,
"deletedAt": null
}Headers
The unique identifier of the Organization associated with the request.
"019c96a0-0a98-7287-9a31-786e0809c769"
The authorization token in the 'Bearer ' format.
Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.
The type of media of the resource. Must be application/json.
"application/json"
Body
Name of the tax group, used to identify the configured tax package.
Unique identifier of the Ledger the package is linked to in the Midaz Ledger.
Minimum transaction amount below which the fees in the package don't apply. Important: Use a dot (.) as the decimal separator — commas are not accepted.
Maximum transaction amount above which the fees in the package don't apply. Important: Use a dot (.) as the decimal separator — commas are not accepted.
Object containing custom-named tax rules. Each key is defined by the client (e.g., admFee, iof), and its value must follow the Fee object schema.
Show child attributes
Show child attributes
If true it indicates that the package is active.
Short summary of for the package explaining what it covers.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
Unique identifier of the Segment the package is linked to in the Midaz Ledger.
List of accounts that are exempt from the taxes defined in the package.
Response
Indicates that the resource was successfully created and the operation was completed as expected.
Unique identifier of the package, in UUIDv7 format.
Name of the tax group, used to identify the configured tax package.
Unique identifier of the Ledger this Fee Package is linked to in the Midaz Ledger.
Minimum transaction amount below which the fees in the package don't apply.
Maximum transaction amount above which the fees in the package don't apply.
Object containing custom-named tax rules. Each key is defined by the client (e.g., admFee, iof, and its value must follow the Fee object schema.
Show child attributes
Show child attributes
If true it indicates that the package is active.
Short summary of for the package explaining what it covers.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
Unique identifier of the Segment this Fee Package is linked to in the Midaz Ledger.
List of accounts that are exempt from the taxes defined in the package.
Date when the package was created.
Date when the package was last updated.
Date when the package was deleted.
Was this page helpful?

