curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": null,
"p_from": null,
"p_to": null,
"p_tipo": null,
"p_fnet_id": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff"
payload = {
"p_cnpj": None,
"p_from": None,
"p_to": None,
"p_tipo": None,
"p_fnet_id": None
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({p_cnpj: null, p_from: null, p_to: null, p_tipo: null, p_fnet_id: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"fnet_id": 123,
"previous_fnet_id": 123,
"cnpj": "<string>",
"tipo_documento": "<string>",
"reference_raw": "<string>",
"versao": 123,
"modalidade": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"previous_delivered_at": "2023-11-07T05:31:56Z",
"lag_days": 123,
"field_path": "<string>",
"block": "<string>",
"leaf": "<string>",
"change_kind": "<string>",
"old_value": "<string>",
"new_value": "<string>",
"old_num": 123,
"new_num": 123,
"delta": 123,
"match_basis": "<string>",
"cvm_column": "<string>",
"diff_version": 123,
"source_url": "<string>",
"previous_source_url": "<string>"
}
]{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}fund_restatement_diff
What a restatement changed, one row per field: for each re-filed FNET document SILO has diffed (the FIDC informe mensal, restatements delivered from 2026 on), the fields whose value differs from the version fund_restatements pairs it with (previous_fnet_id, same group key). field_path is the XML path, repeated blocks addressed by their declared key (CLASSE_SENIOR[SERIE=Série 1]) or, lacking one, by position ([#2]) — match_basis says which, and position rows are approximate by construction. old_value / new_value are the text exactly as printed (comma decimals included; NULL = nil or absent, change_kind says which: changed, added, removed, nil_to_value, value_to_nil); old_num / new_num / delta are set only on numeric leaves, never coerced. cvm_column is NULL until the XML-to-CVM crosswalk exists. A document with NO rows was either re-filed with nothing changed or not diffed: fund_restatements’ diff_status and n_fields_changed say which. The diff compares FNET’s versions, not CVM’s CSVs; tab VIII (debtors) is not in the XML. source_url / previous_source_url open both versions. Needs p_cnpj (the cnpjFundo link of the pair) or p_fnet_id (one restated document), else 22023; p_from / p_to bound the restated document’s delivery day, verbatim; p_tipo matches tipo_documento exactly. More than 1000 rows RAISES 22023 (never trimmed): narrow the window or pin p_fnet_id.
Row cap. A window producing more than 1000 rows raises SQLSTATE 22023 naming this function. Nothing is trimmed to fit — PostgREST would silently cut the response at 1000 and a cut-short series is indistinguishable from one that simply ends. This function does not page — narrow the window instead.
curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": null,
"p_from": null,
"p_to": null,
"p_tipo": null,
"p_fnet_id": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff"
payload = {
"p_cnpj": None,
"p_from": None,
"p_to": None,
"p_tipo": None,
"p_fnet_id": None
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({p_cnpj: null, p_from: null, p_to: null, p_tipo: null, p_fnet_id: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"fnet_id": 123,
"previous_fnet_id": 123,
"cnpj": "<string>",
"tipo_documento": "<string>",
"reference_raw": "<string>",
"versao": 123,
"modalidade": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"previous_delivered_at": "2023-11-07T05:31:56Z",
"lag_days": 123,
"field_path": "<string>",
"block": "<string>",
"leaf": "<string>",
"change_kind": "<string>",
"old_value": "<string>",
"new_value": "<string>",
"old_num": 123,
"new_num": 123,
"delta": 123,
"match_basis": "<string>",
"cvm_column": "<string>",
"diff_version": 123,
"source_url": "<string>",
"previous_source_url": "<string>"
}
]{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}Authorizations
Body
Response
The result set, newest delivery first. An unknown id is an empty array, not a 404 and never a guessed value.
Was this page helpful?