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": "Paquete estándar",
"description": "Paquete para pruebas",
"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": "Tasa administrativa",
"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": "Paquete estándar",
"description": "Paquete para pruebas",
"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": "Tasa administrativa",
"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: 'Paquete estándar',
description: 'Paquete para pruebas',
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: 'Tasa administrativa',
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' => 'Paquete estándar',
'description' => 'Paquete para pruebas',
'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' => 'Tasa administrativa',
'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\": \"Paquete estándar\",\n \"description\": \"Paquete para pruebas\",\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\": \"Tasa administrativa\",\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\": \"Paquete estándar\",\n \"description\": \"Paquete para pruebas\",\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\": \"Tasa administrativa\",\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\": \"Paquete estándar\",\n \"description\": \"Paquete para pruebas\",\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\": \"Tasa administrativa\",\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": "Paquete estándar",
"description": "Paquete para pruebas",
"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": "Tasa administrativa",
"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
}Crear un paquete
Utiliza este endpoint para crear paquetes junto con sus tarifas asociadas en una única solicitud.
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": "Paquete estándar",
"description": "Paquete para pruebas",
"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": "Tasa administrativa",
"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": "Paquete estándar",
"description": "Paquete para pruebas",
"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": "Tasa administrativa",
"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: 'Paquete estándar',
description: 'Paquete para pruebas',
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: 'Tasa administrativa',
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' => 'Paquete estándar',
'description' => 'Paquete para pruebas',
'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' => 'Tasa administrativa',
'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\": \"Paquete estándar\",\n \"description\": \"Paquete para pruebas\",\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\": \"Tasa administrativa\",\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\": \"Paquete estándar\",\n \"description\": \"Paquete para pruebas\",\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\": \"Tasa administrativa\",\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\": \"Paquete estándar\",\n \"description\": \"Paquete para pruebas\",\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\": \"Tasa administrativa\",\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": "Paquete estándar",
"description": "Paquete para pruebas",
"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": "Tasa administrativa",
"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
}Encabezados
Identificador único de la organización asociada a la solicitud.
"019c96a0-0a98-7287-9a31-786e0809c769"
El token de autorización en formato 'Bearer '.
Importante: Este encabezado es obligatorio si su entorno tiene habilitado Access Manager. Para obtener más información, consulte la documentación de Access Manager.
Tipo de medio del recurso. Debe ser application/json.
"application/json"
Cuerpo
Nombre del grupo de tarifas, usado para identificar el paquete configurado.
Identificador único del Ledger al que está vinculado el paquete en el Ledger de Midaz.
Monto mínimo de la transacción por debajo del cual las tarifas del paquete no aplican. Importante: usa un punto (.) como separador decimal; las comas no se aceptan.
Monto máximo de la transacción por encima del cual las tarifas del paquete no aplican. Importante: usa un punto (.) como separador decimal; las comas no se aceptan.
Objeto que contiene reglas de tarifas con nombres personalizados. Cada clave la define el cliente (por ejemplo, admFee, iof) y su valor debe seguir el esquema del objeto Fee.
Show child attributes
Show child attributes
Si true, indica que el paquete está activo.
Breve resumen del paquete que explica qué cubre.
La ruta contable principal que define la naturaleza de la transacción. Ayuda a agrupar operaciones relacionadas en el Ledger.
Identificador único del segmento al que está vinculado el paquete en el Ledger de Midaz.
Lista de cuentas exentas de las tarifas definidas en el paquete.
Respuesta
Indica que el recurso se creó correctamente y que la operación se completó según lo esperado.
Identificador único del paquete en formato UUIDv7.
Nombre del grupo de tarifas, usado para identificar el paquete configurado.
Identificador único del Ledger al que está vinculado este paquete de tarifas en el Ledger de Midaz.
Monto mínimo de la transacción por debajo del cual las tarifas del paquete no aplican.
Monto máximo de la transacción por encima del cual las tarifas del paquete no aplican.
Objeto que contiene reglas de tarifas con nombres personalizados. Cada clave la define el cliente (por ejemplo, admFee, iof) y su valor debe seguir el esquema del objeto Fee.
Show child attributes
Show child attributes
Si true, indica que el paquete está activo.
Breve resumen del paquete que explica qué cubre.
La ruta contable principal que define la naturaleza de la transacción. Ayuda a agrupar operaciones relacionadas en el Ledger.
Identificador único del segmento al que está vinculado este paquete de tarifas en el Ledger de Midaz.
Lista de cuentas exentas de las tarifas definidas en el paquete.
Fecha en la que se creó el paquete.
Fecha en la que se actualizó por última vez el paquete.
Fecha en la que se eliminó el paquete.
¿Esta página le ayudó?

