curl --request POST \
--url http://localhost:4005/v1/regulatory/subscriptions/{subscriptionId}/adopt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": "1.1.0"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/v1/regulatory/subscriptions/{subscriptionId}/adopt"
payload := strings.NewReader("{\n \"version\": \"1.1.0\"\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({version: '1.1.0'})
};
fetch('http://localhost:4005/v1/regulatory/subscriptions/{subscriptionId}/adopt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4005/v1/regulatory/subscriptions/{subscriptionId}/adopt"
payload = { "version": "1.1.0" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"subscription": {
"adoptedVersion": "1.0.0",
"adoptionHistory": [
{
"adoptedAt": "2026-01-01T00:00:00Z",
"adoptedBy": "operator@bank.example",
"version": "1.1.0",
"supersedes": "1.0.0"
}
],
"bindingVersion": 3,
"createdAt": "2026-01-01T00:00:00Z",
"documentId": "br.bcb.cadoc-4010",
"id": "00000000-0000-0000-0000-000000000000",
"status": "active",
"updatedAt": "2026-01-01T00:00:00Z",
"version": 1,
"deactivatedAt": "2026-01-01T00:00:00Z",
"deactivatedBy": "acme/00000000-0000-0000-0000-000000000000",
"institutionId": "00000000-0000-0000-0000-000000000000",
"reactivatedAt": "2026-01-01T00:00:00Z",
"reactivatedBy": "acme/00000000-0000-0000-0000-000000000000"
},
"adjustment": {
"compared": true,
"total": 123,
"untouched": 123,
"added": [
"<string>"
],
"rebound": [
"<string>"
],
"removed": [
"<string>"
],
"retargeted": [
"<string>"
]
},
"mappingBroken": "dataset 'saldos': field 'novoCampo' is not a field...",
"readiness": {
"contractVersion": "<string>",
"document": "<string>",
"queries": [
{
"columnsChecked": true,
"query": "<string>",
"status": "<string>",
"columns": [
{
"column": "<string>",
"found": true
}
],
"composedOver": "<string>",
"dataSource": "<string>",
"detail": "<string>",
"resolvedTable": "<string>",
"table": "<string>"
}
],
"gaps": [
{
"field": "saldos_cosif.valor",
"reason": "a consulta mapeada não devolve esta coluna",
"required": true
}
],
"startedFrom": "<string>",
"unsupported": [
"<string>"
]
}
}{
"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"
}
}Adopt another version of the subscribed document
Moves the subscription’s pin to another catalog version — a DELIBERATE act: a release published upstream changes nothing here until somebody adopts it. The new version is fetched from the origin, verified and materialized BESIDE the old copy, never over it, so every report already generated stays explainable by its provenance. The answer carries what the new version does to the EXISTING mapping: its readiness against the adopted contract, the exact reason when it no longer plans at all (as information — the adoption stands), and how much of the new reference mapping it already agrees with. Omitting version adopts the newest the origin has; adopting the version already in force re-materializes the copy and leaves the history untouched.
curl --request POST \
--url http://localhost:4005/v1/regulatory/subscriptions/{subscriptionId}/adopt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": "1.1.0"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/v1/regulatory/subscriptions/{subscriptionId}/adopt"
payload := strings.NewReader("{\n \"version\": \"1.1.0\"\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({version: '1.1.0'})
};
fetch('http://localhost:4005/v1/regulatory/subscriptions/{subscriptionId}/adopt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4005/v1/regulatory/subscriptions/{subscriptionId}/adopt"
payload = { "version": "1.1.0" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"subscription": {
"adoptedVersion": "1.0.0",
"adoptionHistory": [
{
"adoptedAt": "2026-01-01T00:00:00Z",
"adoptedBy": "operator@bank.example",
"version": "1.1.0",
"supersedes": "1.0.0"
}
],
"bindingVersion": 3,
"createdAt": "2026-01-01T00:00:00Z",
"documentId": "br.bcb.cadoc-4010",
"id": "00000000-0000-0000-0000-000000000000",
"status": "active",
"updatedAt": "2026-01-01T00:00:00Z",
"version": 1,
"deactivatedAt": "2026-01-01T00:00:00Z",
"deactivatedBy": "acme/00000000-0000-0000-0000-000000000000",
"institutionId": "00000000-0000-0000-0000-000000000000",
"reactivatedAt": "2026-01-01T00:00:00Z",
"reactivatedBy": "acme/00000000-0000-0000-0000-000000000000"
},
"adjustment": {
"compared": true,
"total": 123,
"untouched": 123,
"added": [
"<string>"
],
"rebound": [
"<string>"
],
"removed": [
"<string>"
],
"retargeted": [
"<string>"
]
},
"mappingBroken": "dataset 'saldos': field 'novoCampo' is not a field...",
"readiness": {
"contractVersion": "<string>",
"document": "<string>",
"queries": [
{
"columnsChecked": true,
"query": "<string>",
"status": "<string>",
"columns": [
{
"column": "<string>",
"found": true
}
],
"composedOver": "<string>",
"dataSource": "<string>",
"detail": "<string>",
"resolvedTable": "<string>",
"table": "<string>"
}
],
"gaps": [
{
"field": "saldos_cosif.valor",
"reason": "a consulta mapeada não devolve esta coluna",
"required": true
}
],
"startedFrom": "<string>",
"unsupported": [
"<string>"
]
}
}{
"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"
}
}Autorizações
JWT bearer token issued by the identity provider.
Parâmetros de caminho
Subscription whose pin moves.
Corpo
Catalog version to adopt. Omitted, the newest the origin has.
"1.1.0"
Resposta
OK
Esta página foi útil?

