Saltar al contenido principal
POST
/
api
/
v1
/
br
/
tax
/
preview
Previsualizar los importes de impuesto de la jurisdicción
curl --request POST \
  --url https://lender.sandbox.lerian.net/api/v1/br/tax/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "disbursementDate": "2023-11-07T05:31:56Z",
  "finalDueDate": "2023-11-07T05:31:56Z",
  "grossAmount": "<string>",
  "jurisdictionCode": "<string>",
  "taxRegime": "<string>",
  "netDeliveredAmount": "<string>"
}
'
import requests

url = "https://lender.sandbox.lerian.net/api/v1/br/tax/preview"

payload = {
"disbursementDate": "2023-11-07T05:31:56Z",
"finalDueDate": "2023-11-07T05:31:56Z",
"grossAmount": "<string>",
"jurisdictionCode": "<string>",
"taxRegime": "<string>",
"netDeliveredAmount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
disbursementDate: '2023-11-07T05:31:56Z',
finalDueDate: '2023-11-07T05:31:56Z',
grossAmount: '<string>',
jurisdictionCode: '<string>',
taxRegime: '<string>',
netDeliveredAmount: '<string>'
})
};

fetch('https://lender.sandbox.lerian.net/api/v1/br/tax/preview', 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://lender.sandbox.lerian.net/api/v1/br/tax/preview",
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([
'disbursementDate' => '2023-11-07T05:31:56Z',
'finalDueDate' => '2023-11-07T05:31:56Z',
'grossAmount' => '<string>',
'jurisdictionCode' => '<string>',
'taxRegime' => '<string>',
'netDeliveredAmount' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://lender.sandbox.lerian.net/api/v1/br/tax/preview"

payload := strings.NewReader("{\n \"disbursementDate\": \"2023-11-07T05:31:56Z\",\n \"finalDueDate\": \"2023-11-07T05:31:56Z\",\n \"grossAmount\": \"<string>\",\n \"jurisdictionCode\": \"<string>\",\n \"taxRegime\": \"<string>\",\n \"netDeliveredAmount\": \"<string>\"\n}")

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

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.post("https://lender.sandbox.lerian.net/api/v1/br/tax/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disbursementDate\": \"2023-11-07T05:31:56Z\",\n \"finalDueDate\": \"2023-11-07T05:31:56Z\",\n \"grossAmount\": \"<string>\",\n \"jurisdictionCode\": \"<string>\",\n \"taxRegime\": \"<string>\",\n \"netDeliveredAmount\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://lender.sandbox.lerian.net/api/v1/br/tax/preview")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"disbursementDate\": \"2023-11-07T05:31:56Z\",\n \"finalDueDate\": \"2023-11-07T05:31:56Z\",\n \"grossAmount\": \"<string>\",\n \"jurisdictionCode\": \"<string>\",\n \"taxRegime\": \"<string>\",\n \"netDeliveredAmount\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "cofins": "<string>",
    "grossAmount": "<string>",
    "iofAdditional": "<string>",
    "iofDaily": "<string>",
    "jurisdictionCode": "<string>",
    "netDeliveredAmount": "<string>",
    "pis": "<string>",
    "profileVersion": "<string>",
    "rateTableSnapshotId": "<string>",
    "taxRegime": "<string>",
    "totalIof": "<string>",
    "totalTax": "<string>"
  }
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Cuerpo

application/json
disbursementDate
string<date-time>
requerido

Disbursement date (RFC3339).

Ejemplo:

"2026-06-14T12:00:00Z"

finalDueDate
string<date-time>
requerido

Final due date (RFC3339).

Ejemplo:

"2026-06-14T12:00:00Z"

grossAmount
string
requerido

Gross disbursement amount in major currency units (e.g. "100000.00").

Ejemplo:

"100000.00"

jurisdictionCode
string
requerido

ISO 3166-1 alpha-2 jurisdiction code (e.g. "BR").

Required string length: 2
Ejemplo:

"BR"

taxRegime
string
requerido

Tax regime selector understood by the jurisdiction tax engine.

netDeliveredAmount
string

Optional net delivered amount in major currency units.

Ejemplo:

"99913.16"

Respuesta

OK

data
object
requerido

The computed tax-preview result (IOF, PIS, COFINS, and net delivered amount) for the requested disbursement.