Saltar al contenido principal
POST
/
v1
/
inbound-source-configs
Crear una configuración de fuente entrante
curl --request POST \
  --url https://sta.sandbox.lerian.net/v1/inbound-source-configs \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "bacenSystemCode": "<string>",
  "credentialId": "<string>",
  "intervalSeconds": 907,
  "sourceProduct": "<string>",
  "bacenSystemFilterCode": "<string>",
  "displayName": "<string>",
  "maxFileSizeBytes": 2,
  "retentionDays": 1825,
  "urgencyEnabled": true
}
'
import requests

url = "https://sta.sandbox.lerian.net/v1/inbound-source-configs"

payload = {
"bacenSystemCode": "<string>",
"credentialId": "<string>",
"intervalSeconds": 907,
"sourceProduct": "<string>",
"bacenSystemFilterCode": "<string>",
"displayName": "<string>",
"maxFileSizeBytes": 2,
"retentionDays": 1825,
"urgencyEnabled": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bacenSystemCode: '<string>',
credentialId: '<string>',
intervalSeconds: 907,
sourceProduct: '<string>',
bacenSystemFilterCode: '<string>',
displayName: '<string>',
maxFileSizeBytes: 2,
retentionDays: 1825,
urgencyEnabled: true
})
};

fetch('https://sta.sandbox.lerian.net/v1/inbound-source-configs', 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://sta.sandbox.lerian.net/v1/inbound-source-configs",
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([
'bacenSystemCode' => '<string>',
'credentialId' => '<string>',
'intervalSeconds' => 907,
'sourceProduct' => '<string>',
'bacenSystemFilterCode' => '<string>',
'displayName' => '<string>',
'maxFileSizeBytes' => 2,
'retentionDays' => 1825,
'urgencyEnabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://sta.sandbox.lerian.net/v1/inbound-source-configs"

payload := strings.NewReader("{\n \"bacenSystemCode\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"intervalSeconds\": 907,\n \"sourceProduct\": \"<string>\",\n \"bacenSystemFilterCode\": \"<string>\",\n \"displayName\": \"<string>\",\n \"maxFileSizeBytes\": 2,\n \"retentionDays\": 1825,\n \"urgencyEnabled\": true\n}")

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

req.Header.Add("Authorization", "<api-key>")
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://sta.sandbox.lerian.net/v1/inbound-source-configs")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bacenSystemCode\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"intervalSeconds\": 907,\n \"sourceProduct\": \"<string>\",\n \"bacenSystemFilterCode\": \"<string>\",\n \"displayName\": \"<string>\",\n \"maxFileSizeBytes\": 2,\n \"retentionDays\": 1825,\n \"urgencyEnabled\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sta.sandbox.lerian.net/v1/inbound-source-configs")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bacenSystemCode\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"intervalSeconds\": 907,\n \"sourceProduct\": \"<string>\",\n \"bacenSystemFilterCode\": \"<string>\",\n \"displayName\": \"<string>\",\n \"maxFileSizeBytes\": 2,\n \"retentionDays\": 1825,\n \"urgencyEnabled\": true\n}"

response = http.request(request)
puts response.read_body
{
  "bacenSystemCode": "<string>",
  "bacenSystemFilterCode": "<string>",
  "createdAt": "<string>",
  "credentialId": "<string>",
  "deletedAt": "<string>",
  "displayName": "<string>",
  "id": "<string>",
  "intervalSeconds": 123,
  "isEnabled": true,
  "maxFileSizeBytes": 123,
  "retentionDays": 123,
  "sourceProduct": "<string>",
  "updatedAt": "<string>",
  "urgencyEnabled": true
}
{}
{}
{}
{}
{}

Autorizaciones

Authorization
string
header
requerido

Bearer token authentication (format: "Bearer {token}")

Cuerpo

application/json

inbound source config payload

bacenSystemCode
string
requerido
credentialId
string
requerido

CredentialID is the UUID of the BACEN credential used to fetch inbound documents of this source. MANDATORY: every inbound source fetches with a credential. The uuid tag rejects a malformed value at the boundary (400); the domain constructor rejects uuid.Nil (422 via the reserve/invariant path).

intervalSeconds
integer
requerido
Rango requerido: 15 <= x <= 1800
sourceProduct
string
requerido
bacenSystemFilterCode
string
displayName
string
maxFileSizeBytes
integer
Rango requerido: x >= 1
retentionDays
integer
Rango requerido: 1 <= x <= 3650
urgencyEnabled
boolean

UrgencyEnabled opts this inbound source into urgent inbound processing. Defaults false. Operator-settable.

Respuesta

Created

bacenSystemCode
string
bacenSystemFilterCode
string
createdAt
string
credentialId
string

CredentialID is the UUID string of the BACEN credential bound to this inbound source (mandatory and always present).

deletedAt
string
displayName
string
id
string
intervalSeconds
integer
isEnabled
boolean
maxFileSizeBytes
integer
retentionDays
integer
sourceProduct
string
updatedAt
string
urgencyEnabled
boolean