curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/portfolio_fund_terms \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpjs": [
"<string>"
]
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/portfolio_fund_terms"
payload = { "p_cnpjs": ["<string>"] }
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_cnpjs: ['<string>']})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/portfolio_fund_terms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"line_no": 123,
"input_cnpj": "<string>",
"cnpj": "<string>",
"gestor_id": "<string>",
"gestor_name": "<string>",
"admin_cnpj": "<string>",
"admin_name": "<string>",
"terms_source": "<string>",
"terms_dt_comptc": "2023-12-25",
"qt_dia_conversao_cota": 123,
"qt_dia_pagto_resgate": 123,
"tp_dia_pagto_resgate": "<string>",
"qt_dia_resgate_cotas": 123,
"reason": "<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>"
}portfolio_fund_terms
Who runs a fund and how long a redemption takes (catalog v62). One row per input CNPJ (punctuation stripped, padded to 14 digits; an entry that is not a CNPJ comes back with cnpj NULL and a reason). gestor_id, gestor_name, admin_cnpj and admin_name are as filed in cvm_fund_registry; a CNPJ with several registry rows (one per entity_type) uses one, picked by is_active first, then no dt_cancel, then the newest dt_cancel, then the newest fetched_at, then entity_type, and the reason names it. gestor_id can be a CPF and is never read as a CNPJ. The redemption terms (qt_dia_conversao_cota, qt_dia_pagto_resgate, tp_dia_pagto_resgate, qt_dia_resgate_cotas = lock-up) come from the CVM Extrato das Informacoes (vw_fi_extrato_latest, terms_source extrato, terms_dt_comptc = the filed version’s DT_COMPTC), and only when the CNPJ has no Extrato from the lamina (vw_fi_lamina_latest, terms_source lamina: QT_DIA_CONVERSAO_COTA_RESGATE and QT_DIA_CAREN mapped by name to the same meanings; the row with no subclass, else the newest). Values are as filed, never rescaled; NULL is not filed, never zero. A fund in neither document (a FII, FIDC, FIP or FIAGRO, a closed fund) has every term NULL and the reason says so (Portuguese). More than 200 CNPJs RAISES 22023; the result is one row per input, at most one 1000-row page.
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/portfolio_fund_terms \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpjs": [
"<string>"
]
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/portfolio_fund_terms"
payload = { "p_cnpjs": ["<string>"] }
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_cnpjs: ['<string>']})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/portfolio_fund_terms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"line_no": 123,
"input_cnpj": "<string>",
"cnpj": "<string>",
"gestor_id": "<string>",
"gestor_name": "<string>",
"admin_cnpj": "<string>",
"admin_name": "<string>",
"terms_source": "<string>",
"terms_dt_comptc": "2023-12-25",
"qt_dia_conversao_cota": 123,
"qt_dia_pagto_resgate": 123,
"tp_dia_pagto_resgate": "<string>",
"qt_dia_resgate_cotas": 123,
"reason": "<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
Response
The result set, oldest first. An unknown id is an empty array, not a 404 and never a guessed value.
Was this page helpful?