curl --request POST \
--url https://reporter.sandbox.lerian.net/v1/institutions/{institutionId}/regulatory/reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"parameters": {
"dataBase": "2026-03"
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://reporter.sandbox.lerian.net/v1/institutions/{institutionId}/regulatory/reports"
payload := strings.NewReader("{\n \"subscriptionId\": \"00000000-0000-0000-0000-000000000000\",\n \"parameters\": {\n \"dataBase\": \"2026-03\"\n }\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscriptionId: '00000000-0000-0000-0000-000000000000',
parameters: {dataBase: '2026-03'}
})
};
fetch('https://reporter.sandbox.lerian.net/v1/institutions/{institutionId}/regulatory/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://reporter.sandbox.lerian.net/v1/institutions/{institutionId}/regulatory/reports"
payload = {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"parameters": { "dataBase": "2026-03" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"openGaps": [
{
"field": "saldos_cosif.valor",
"reason": "a consulta mapeada não devolve esta coluna",
"required": true
}
],
"report": {
"allInstitutions": false,
"approvedAt": "2026-03-12T10:00:00Z",
"approvedBy": "9c1d7e34-2b6a-4f81-90a3-5e7f8d0a1b2c",
"completedAt": "2026-01-31T15:04:05Z",
"correctedAt": "2026-03-12T09:40:00Z",
"correctedBy": "3f9a1c2e-0f5b-4d9a-9b8e-1a2b3c4d5e6f",
"createdAt": "2026-01-31T15:00:00Z",
"deletedAt": "2026-02-01T09:00:00Z",
"documentId": "br.bcb.cadoc-4010",
"documentVersion": "1.0.0",
"draftVersion": 3,
"filingPeriod": "dataBase=2026-09",
"filters": {
"accounts": {
"account": {
"status": {
"eq": [
"ACTIVE"
]
}
}
}
},
"id": "00000000-0000-0000-0000-000000000001",
"institution": {
"cnpj": "12ABC34501DE35",
"id": "00000000-0000-0000-0000-000000000000",
"name": "Banco Exemplo S.A.",
"scope": {}
},
"metadata": {
"source": "ledger",
"tenant": "sandbox"
},
"openGaps": [
{
"field": "saldos_cosif.valor",
"reason": "a consulta mapeada não devolve esta coluna",
"required": true
}
],
"parameters": {
"dataBase": "2026-08"
},
"provenance": {
"catalog": {
"bindingVersion": 3,
"documentId": "br.bcb.cadoc-4010",
"documentVersion": "1.0.0",
"subscriptionId": "<string>",
"bindingOrigin": "reference",
"institution": {
"cnpj": "12ABC34501DE35",
"id": "00000000-0000-0000-0000-000000000000",
"name": "Banco Exemplo S.A.",
"scope": {}
}
},
"generatedAt": "2023-11-07T05:31:56Z",
"artifactChecksum": "e3b0c44298fc1c149afbf4c8996fb924...",
"artifactSizeBytes": 20480,
"parameters": {
"dataBase": "2026-03"
},
"template": {
"category": "cadoc4010",
"revision": 4,
"revisionChecksum": "9f2c...",
"templateId": "7c1e2f40-77d1-4a8a-9d0f-6b0e2c4a1111"
}
},
"remittance": "original",
"status": "Processing",
"subscriptionId": "<string>",
"supersededBy": "00000000-0000-0000-0000-000000000003",
"templateDescription": "Monthly accounting report",
"templateId": "00000000-0000-0000-0000-000000000002",
"templateOutputFormat": "pdf",
"updatedAt": "2026-01-31T15:04:05Z"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Generate a filing of a subscribed document for an institution
Generates one filing exactly as POST /v1/regulatory/reports does — same body, same 201 answer, the report a DRAFT a person corrects and approves — provided the subscription is the one the institution in the path files. Call it after subscribing the document for that institution and mapping it; a credential confined to some institutions generates only through this route, because the unscoped one names no institution. The binding in force is frozen into the request and the report is queued for the worker; nothing changes on the subscription. A malformed institution or subscription id is refused with 400 RPT-0009 naming the field. A subscription that does not exist, was deleted, or is filed by another institution is answered 404 RPT-0011 — the same answer in all three cases, before anything is frozen or queued. An inactive subscription is refused with 400 RPT-0146, and a parameter the contract requires and the request omits, or one it does not declare, with 400 naming it. 401 and 403 come from authorization: a credential confined to some institutions is refused here when the path names one outside them.
curl --request POST \
--url https://reporter.sandbox.lerian.net/v1/institutions/{institutionId}/regulatory/reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"parameters": {
"dataBase": "2026-03"
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://reporter.sandbox.lerian.net/v1/institutions/{institutionId}/regulatory/reports"
payload := strings.NewReader("{\n \"subscriptionId\": \"00000000-0000-0000-0000-000000000000\",\n \"parameters\": {\n \"dataBase\": \"2026-03\"\n }\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscriptionId: '00000000-0000-0000-0000-000000000000',
parameters: {dataBase: '2026-03'}
})
};
fetch('https://reporter.sandbox.lerian.net/v1/institutions/{institutionId}/regulatory/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://reporter.sandbox.lerian.net/v1/institutions/{institutionId}/regulatory/reports"
payload = {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"parameters": { "dataBase": "2026-03" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"openGaps": [
{
"field": "saldos_cosif.valor",
"reason": "a consulta mapeada não devolve esta coluna",
"required": true
}
],
"report": {
"allInstitutions": false,
"approvedAt": "2026-03-12T10:00:00Z",
"approvedBy": "9c1d7e34-2b6a-4f81-90a3-5e7f8d0a1b2c",
"completedAt": "2026-01-31T15:04:05Z",
"correctedAt": "2026-03-12T09:40:00Z",
"correctedBy": "3f9a1c2e-0f5b-4d9a-9b8e-1a2b3c4d5e6f",
"createdAt": "2026-01-31T15:00:00Z",
"deletedAt": "2026-02-01T09:00:00Z",
"documentId": "br.bcb.cadoc-4010",
"documentVersion": "1.0.0",
"draftVersion": 3,
"filingPeriod": "dataBase=2026-09",
"filters": {
"accounts": {
"account": {
"status": {
"eq": [
"ACTIVE"
]
}
}
}
},
"id": "00000000-0000-0000-0000-000000000001",
"institution": {
"cnpj": "12ABC34501DE35",
"id": "00000000-0000-0000-0000-000000000000",
"name": "Banco Exemplo S.A.",
"scope": {}
},
"metadata": {
"source": "ledger",
"tenant": "sandbox"
},
"openGaps": [
{
"field": "saldos_cosif.valor",
"reason": "a consulta mapeada não devolve esta coluna",
"required": true
}
],
"parameters": {
"dataBase": "2026-08"
},
"provenance": {
"catalog": {
"bindingVersion": 3,
"documentId": "br.bcb.cadoc-4010",
"documentVersion": "1.0.0",
"subscriptionId": "<string>",
"bindingOrigin": "reference",
"institution": {
"cnpj": "12ABC34501DE35",
"id": "00000000-0000-0000-0000-000000000000",
"name": "Banco Exemplo S.A.",
"scope": {}
}
},
"generatedAt": "2023-11-07T05:31:56Z",
"artifactChecksum": "e3b0c44298fc1c149afbf4c8996fb924...",
"artifactSizeBytes": 20480,
"parameters": {
"dataBase": "2026-03"
},
"template": {
"category": "cadoc4010",
"revision": 4,
"revisionChecksum": "9f2c...",
"templateId": "7c1e2f40-77d1-4a8a-9d0f-6b0e2c4a1111"
}
},
"remittance": "original",
"status": "Processing",
"subscriptionId": "<string>",
"supersededBy": "00000000-0000-0000-0000-000000000003",
"templateDescription": "Monthly accounting report",
"templateId": "00000000-0000-0000-0000-000000000002",
"templateOutputFormat": "pdf",
"updatedAt": "2026-01-31T15:04:05Z"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Cuerpo
¿Esta página le ayudó?

