Get what a document's file needs
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/regulatory/documents/{documentId}/contract \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://reporter.sandbox.lerian.net/v1/regulatory/documents/{documentId}/contract"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://reporter.sandbox.lerian.net/v1/regulatory/documents/{documentId}/contract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://reporter.sandbox.lerian.net/v1/regulatory/documents/{documentId}/contract"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"calendar": {
"from": "2025-01-01",
"nonBusinessDays": [
{
"date": "2026-11-02",
"description": "Finados"
}
],
"until": "2027-12-31",
"weekends": true
},
"datasets": [
{
"consolidation": {
"columns": {},
"key": [
"code"
],
"whenKeyRepeats": "combine"
},
"fields": [
{
"name": "saldo",
"required": true,
"type": "decimal",
"checkDigit": "cnpj",
"description": "<string>",
"domain": [
"<string>"
],
"expects": "<string>",
"format": {
"scaleDeclared": true,
"scaleIsExact": true,
"decimalSeparator": "<string>",
"groupSeparator": "<string>",
"pattern": "<string>",
"scale": 123
},
"generate": "timeOrderedId",
"identifiesInstitution": "true",
"length": 123,
"means": "<string>",
"normalize": "<string>",
"notAfter": "firstContract",
"pattern": "<string>",
"prefixOf": "cnpj"
}
],
"grain": {
"singleton": true,
"keys": [
"<string>"
]
},
"name": "cosif_balances",
"nonEmpty": true,
"childOf": {
"dataset": "<string>"
},
"description": "<string>",
"means": "<string>",
"rowSet": {
"columns": [
"<string>"
],
"key": "<string>",
"rows": [
{}
]
}
}
],
"filing": {
"period": [
"dataBase"
],
"remittance": {
"original": "I",
"parameter": "tipoRemessa",
"replacement": "S",
"replacementValues": [
"S"
],
"reference": "nrRecibo"
},
"noPeriod": true
},
"knownGaps": [
{
"id": "<string>",
"description": "<string>"
}
],
"metadata": {
"appliesTo": {
"institutionTypes": [
"<string>"
]
},
"id": "br.bcb.cadoc-4010",
"country": "BR",
"document": "4010",
"family": "cadoc",
"layout": {
"mandatoryFrom": "2026-01-01",
"version": "<string>"
},
"output": "xml",
"periodicity": "monthly",
"regulator": "BCB",
"status": "stable",
"summary": "<string>",
"title": "Balancete Patrimonial Analítico",
"version": "1.0.0"
},
"parameters": [
{
"allowedMonths": [
"<string>"
],
"businessDay": true,
"closed": true,
"default": "<string>",
"domain": [
"<string>"
],
"name": "dataBase",
"required": true,
"type": "month",
"description": "<string>",
"pattern": "[0-9]{1,18}-[0-9]{2}-[0-9]{3}-[0-9]{4}-[0-9]{1,18}"
}
],
"reportTimezone": "America/Sao_Paulo",
"rules": [
{
"id": "<string>",
"appliesTo": "<string>",
"does": {
"kind": "negateWhen",
"equals": "debit",
"field": "saldo",
"fields": [
"cosifCode"
],
"key": "cosifCode",
"rowSet": "contas.yaml",
"table": "natureza",
"values": [
"<string>"
]
},
"message": "<string>",
"severity": "error",
"where": {
"equals": "<string>",
"field": "<string>",
"in": [
"<string>"
],
"notIn": [
"<string>"
],
"rowSet": "<string>"
}
}
],
"tables": [
{
"from": "natureza.yaml",
"match": "longestPrefix",
"name": "natureza"
}
],
"apiVersion": "reporter.lerian.io/v1alpha1",
"kind": "DocumentContract"
}{
"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"
}
}Get what a document's file needs
Returns the contract: every set the file carries, every field of it, its type, whether it is required and how it is formatted. It is what a client reads to understand what they are mapping, and it is curated — never uploaded.
GET
/
v1
/
regulatory
/
documents
/
{documentId}
/
contract
Get what a document's file needs
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/regulatory/documents/{documentId}/contract \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://reporter.sandbox.lerian.net/v1/regulatory/documents/{documentId}/contract"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://reporter.sandbox.lerian.net/v1/regulatory/documents/{documentId}/contract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://reporter.sandbox.lerian.net/v1/regulatory/documents/{documentId}/contract"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"calendar": {
"from": "2025-01-01",
"nonBusinessDays": [
{
"date": "2026-11-02",
"description": "Finados"
}
],
"until": "2027-12-31",
"weekends": true
},
"datasets": [
{
"consolidation": {
"columns": {},
"key": [
"code"
],
"whenKeyRepeats": "combine"
},
"fields": [
{
"name": "saldo",
"required": true,
"type": "decimal",
"checkDigit": "cnpj",
"description": "<string>",
"domain": [
"<string>"
],
"expects": "<string>",
"format": {
"scaleDeclared": true,
"scaleIsExact": true,
"decimalSeparator": "<string>",
"groupSeparator": "<string>",
"pattern": "<string>",
"scale": 123
},
"generate": "timeOrderedId",
"identifiesInstitution": "true",
"length": 123,
"means": "<string>",
"normalize": "<string>",
"notAfter": "firstContract",
"pattern": "<string>",
"prefixOf": "cnpj"
}
],
"grain": {
"singleton": true,
"keys": [
"<string>"
]
},
"name": "cosif_balances",
"nonEmpty": true,
"childOf": {
"dataset": "<string>"
},
"description": "<string>",
"means": "<string>",
"rowSet": {
"columns": [
"<string>"
],
"key": "<string>",
"rows": [
{}
]
}
}
],
"filing": {
"period": [
"dataBase"
],
"remittance": {
"original": "I",
"parameter": "tipoRemessa",
"replacement": "S",
"replacementValues": [
"S"
],
"reference": "nrRecibo"
},
"noPeriod": true
},
"knownGaps": [
{
"id": "<string>",
"description": "<string>"
}
],
"metadata": {
"appliesTo": {
"institutionTypes": [
"<string>"
]
},
"id": "br.bcb.cadoc-4010",
"country": "BR",
"document": "4010",
"family": "cadoc",
"layout": {
"mandatoryFrom": "2026-01-01",
"version": "<string>"
},
"output": "xml",
"periodicity": "monthly",
"regulator": "BCB",
"status": "stable",
"summary": "<string>",
"title": "Balancete Patrimonial Analítico",
"version": "1.0.0"
},
"parameters": [
{
"allowedMonths": [
"<string>"
],
"businessDay": true,
"closed": true,
"default": "<string>",
"domain": [
"<string>"
],
"name": "dataBase",
"required": true,
"type": "month",
"description": "<string>",
"pattern": "[0-9]{1,18}-[0-9]{2}-[0-9]{3}-[0-9]{4}-[0-9]{1,18}"
}
],
"reportTimezone": "America/Sao_Paulo",
"rules": [
{
"id": "<string>",
"appliesTo": "<string>",
"does": {
"kind": "negateWhen",
"equals": "debit",
"field": "saldo",
"fields": [
"cosifCode"
],
"key": "cosifCode",
"rowSet": "contas.yaml",
"table": "natureza",
"values": [
"<string>"
]
},
"message": "<string>",
"severity": "error",
"where": {
"equals": "<string>",
"field": "<string>",
"in": [
"<string>"
],
"notIn": [
"<string>"
],
"rowSet": "<string>"
}
}
],
"tables": [
{
"from": "natureza.yaml",
"match": "longestPrefix",
"name": "natureza"
}
],
"apiVersion": "reporter.lerian.io/v1alpha1",
"kind": "DocumentContract"
}{
"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"
}
}Respuesta
OK
¿Esta página le ayudó?

