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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'p_cnpj' => null,
'p_from' => null,
'p_to' => null,
'p_tipo' => null,
'p_fnet_id' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff"
payload := strings.NewReader("{\n \"p_cnpj\": null,\n \"p_from\": null,\n \"p_to\": null,\n \"p_tipo\": null,\n \"p_fnet_id\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"p_cnpj\": null,\n \"p_from\": null,\n \"p_to\": null,\n \"p_tipo\": null,\n \"p_fnet_id\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"p_cnpj\": null,\n \"p_from\": null,\n \"p_to\": null,\n \"p_tipo\": null,\n \"p_fnet_id\": null\n}"
response = http.request(request)
puts response.read_body[
{
"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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'p_cnpj' => null,
'p_from' => null,
'p_to' => null,
'p_tipo' => null,
'p_fnet_id' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff"
payload := strings.NewReader("{\n \"p_cnpj\": null,\n \"p_from\": null,\n \"p_to\": null,\n \"p_tipo\": null,\n \"p_fnet_id\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"p_cnpj\": null,\n \"p_from\": null,\n \"p_to\": null,\n \"p_tipo\": null,\n \"p_fnet_id\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatement_diff")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"p_cnpj\": null,\n \"p_from\": null,\n \"p_to\": null,\n \"p_tipo\": null,\n \"p_fnet_id\": null\n}"
response = http.request(request)
puts response.read_body[
{
"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
The publishable key (sb_publishable_…), on every request. It is NOT a JWT — sending it as Authorization: Bearer is rejected as an invalid JWT. It identifies the project, not you, and maps to the Postgres anon role.
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?