Skip to main content

Portfolio - Download Portfolio

Introduction​

This resource synchronously generates a report for the fund class and returns it in base64.

Available on
ProfileHostRequired permission
Managermanager-apiRead
Consultantconsultant-apiView Compositions

Base URL for each host: Environments (Hosts).

Request​

ENDPOINT
/composition/fund_class/FUND_CLASS_KEY/report
METHOD
POST
STATUS
201
Request Body
{
"report_type": "wallet_composition_by_composition",
"composition_type": "final_quota",
"reference_date": "2025-01-20"
}
FieldTypeRequiredDescription
report_typestringYesReport to generate. See table below.
reference_datestringYesReference date, in the YYYY-MM-DD format.
composition_typestringFor portfolio reports, this or composition_keypre_quota, final_quota or opening_quota. Uses the portfolio of this type on reference_date.
composition_keystringFor portfolio reports, this or composition_typeKey of a specific portfolio.

Available reports​

report_typeContentMust identify the portfolio
wallet_composition_by_compositionPortfolio as a spreadsheet (.xlsx)Yes
wallet_composition_by_composition_pdfPortfolio as PDFYes
xml_401_by_compositionPortfolio XML 4.01 — does not accept pre_quotaYes
xml_5_by_compositionPortfolio XML 5.0 — does not accept pre_quotaYes
cash_account_demonstrativeCash account statementNo (only reference_date)
pmts_reconciliationPMT reconciliationNo (only reference_date)

The other values accepted by the contract (wallet_composition_a_pagar, assets_wallet_composition_legacy, wallet_asset_installments_settlement_legacy, settlements_status_by_reference_date, discarded_settlements_on_payment_batch) are not generated by this endpoint and return CMP000027.

Response​

Response Body
{
"document_b64": "UEsDBBQABgAIAAAAIQ..."
}

document_b64 is the report file encoded in base64.

Attention

For portfolio reports, the portfolio must be in confirmed, pending_confirmation or reproved_by_agent. In any other status, the response is 400 (CMP000015).

Errors​

StatusCodeWhen it happens
400CMP000015The portfolio is not in confirmed, pending_confirmation or reproved_by_agent.
400CMP000044Portfolio report without composition_key or composition_type.
400CMP000027report_type is not generated by this endpoint.
404CMP000026xml_401_by_composition or xml_5_by_composition requested for a pre_quota portfolio.
404CMP000012There is no portfolio with the given composition_key, or of the composition_type on reference_date.
400CMP000014The report generator refused the request; the description gives the reason.
400QIT000001Body outside the contract: required field missing, date in the wrong format or an unexpected field.
400QIT000004The fund_class_key belongs to a class of another manager.

Authentication, permission and host errors: see API Errors.