curl --request GET \
--url http://localhost:4005/v1/regulatory/documents/{documentId}/contract \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/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('http://localhost:4005/v1/regulatory/documents/{documentId}/contract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4005/v1/regulatory/documents/{documentId}/contract"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"datasets": [
{
"fields": [
{
"name": "saldo",
"required": true,
"type": "decimal",
"description": "<string>",
"domain": [
"<string>"
],
"equalsSumOf": {
"dataset": "<string>",
"field": "<string>"
},
"forbiddenWhen": {
"field": "<string>",
"operator": "<string>",
"values": [
"<string>"
],
"via": "<string>"
},
"format": {
"scaleDeclared": true,
"scaleIsExact": true,
"decimalSeparator": "<string>",
"groupSeparator": "<string>",
"pattern": "<string>",
"scale": 123
},
"length": 123,
"means": "<string>",
"normalize": "<string>",
"pattern": "<string>",
"refersTo": {
"dataset": "<string>",
"field": "<string>"
},
"requiredWhen": {
"field": "<string>",
"operator": "<string>",
"values": [
"<string>"
],
"via": "<string>"
}
}
],
"grain": {
"singleton": true,
"keys": [
"<string>"
]
},
"name": "cosif_balances",
"childOf": {
"dataset": "<string>"
},
"description": "<string>",
"means": "<string>",
"rowSet": {
"key": "<string>"
}
}
],
"knownGaps": [
{
"id": "<string>",
"description": "<string>"
}
],
"metadata": {
"appliesTo": {
"institutionTypes": [
"<string>"
]
},
"id": "br.bcb.cadoc-4010",
"country": "BR",
"document": "4010",
"layout": {
"mandatoryFrom": "2026-01-01",
"version": "<string>"
},
"output": "xml",
"periodicity": "monthly",
"regulator": "BCB",
"status": "stable",
"title": "Balancete Patrimonial Analítico",
"version": "1.0.0"
},
"parameters": [
{
"allowedMonths": [
"<string>"
],
"default": "<string>",
"domain": [
"<string>"
],
"name": "dataBase",
"required": true,
"type": "month",
"description": "<string>"
}
],
"rules": [
{
"assert": "<string>",
"id": "<string>",
"severity": "error",
"appliesTo": "<string>",
"message": "<string>"
}
],
"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.
curl --request GET \
--url http://localhost:4005/v1/regulatory/documents/{documentId}/contract \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/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('http://localhost:4005/v1/regulatory/documents/{documentId}/contract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4005/v1/regulatory/documents/{documentId}/contract"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"datasets": [
{
"fields": [
{
"name": "saldo",
"required": true,
"type": "decimal",
"description": "<string>",
"domain": [
"<string>"
],
"equalsSumOf": {
"dataset": "<string>",
"field": "<string>"
},
"forbiddenWhen": {
"field": "<string>",
"operator": "<string>",
"values": [
"<string>"
],
"via": "<string>"
},
"format": {
"scaleDeclared": true,
"scaleIsExact": true,
"decimalSeparator": "<string>",
"groupSeparator": "<string>",
"pattern": "<string>",
"scale": 123
},
"length": 123,
"means": "<string>",
"normalize": "<string>",
"pattern": "<string>",
"refersTo": {
"dataset": "<string>",
"field": "<string>"
},
"requiredWhen": {
"field": "<string>",
"operator": "<string>",
"values": [
"<string>"
],
"via": "<string>"
}
}
],
"grain": {
"singleton": true,
"keys": [
"<string>"
]
},
"name": "cosif_balances",
"childOf": {
"dataset": "<string>"
},
"description": "<string>",
"means": "<string>",
"rowSet": {
"key": "<string>"
}
}
],
"knownGaps": [
{
"id": "<string>",
"description": "<string>"
}
],
"metadata": {
"appliesTo": {
"institutionTypes": [
"<string>"
]
},
"id": "br.bcb.cadoc-4010",
"country": "BR",
"document": "4010",
"layout": {
"mandatoryFrom": "2026-01-01",
"version": "<string>"
},
"output": "xml",
"periodicity": "monthly",
"regulator": "BCB",
"status": "stable",
"title": "Balancete Patrimonial Analítico",
"version": "1.0.0"
},
"parameters": [
{
"allowedMonths": [
"<string>"
],
"default": "<string>",
"domain": [
"<string>"
],
"name": "dataBase",
"required": true,
"type": "month",
"description": "<string>"
}
],
"rules": [
{
"assert": "<string>",
"id": "<string>",
"severity": "error",
"appliesTo": "<string>",
"message": "<string>"
}
],
"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"
}
}Autorizações
JWT bearer token issued by the identity provider.
Parâmetros de caminho
Document identifier, as the catalog publishes it.
Resposta
OK
Every set the file carries and every field of it.
Show child attributes
Show child attributes
What this contract knowingly does not yet cover.
Show child attributes
Show child attributes
Which obligation this is, at which version.
Show child attributes
Show child attributes
What the generation must be told, answered per request.
Show child attributes
Show child attributes
Assertions the finished file must satisfy.
Show child attributes
Show child attributes
Format identifier of the contract document.
"reporter.lerian.io/v1alpha1"
Document kind; always DocumentContract.
"DocumentContract"
Esta página foi útil?

