Portfolio - Download Portfolio
Introduction
This resource synchronously generates a report for the fund class and returns it in base64.
Available on
| Profile | Host | Required permission |
|---|---|---|
| Manager | manager-api | Read |
| Consultant | consultant-api | View Compositions |
Base URL for each host: Environments (Hosts).
Request
ENDPOINT
/composition/fund_class/FUND_CLASS_KEY/reportMETHOD
POSTSTATUS
201Request Body
{
"report_type": "wallet_composition_by_composition",
"composition_type": "final_quota",
"reference_date": "2025-01-20"
}
| Field | Type | Required | Description |
|---|---|---|---|
report_type | string | Yes | Report to generate. See table below. |
reference_date | string | Yes | Reference date, in the YYYY-MM-DD format. |
composition_type | string | For portfolio reports, this or composition_key | pre_quota, final_quota or opening_quota. Uses the portfolio of this type on reference_date. |
composition_key | string | For portfolio reports, this or composition_type | Key of a specific portfolio. |
Available reports
report_type | Content | Must identify the portfolio |
|---|---|---|
wallet_composition_by_composition | Portfolio as a spreadsheet (.xlsx) | Yes |
wallet_composition_by_composition_pdf | Portfolio as PDF | Yes |
xml_401_by_composition | Portfolio XML 4.01 — does not accept pre_quota | Yes |
xml_5_by_composition | Portfolio XML 5.0 — does not accept pre_quota | Yes |
cash_account_demonstrative | Cash account statement | No (only reference_date) |
pmts_reconciliation | PMT reconciliation | No (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
| Status | Code | When it happens |
|---|---|---|
| 400 | CMP000015 | The portfolio is not in confirmed, pending_confirmation or reproved_by_agent. |
| 400 | CMP000044 | Portfolio report without composition_key or composition_type. |
| 400 | CMP000027 | report_type is not generated by this endpoint. |
| 404 | CMP000026 | xml_401_by_composition or xml_5_by_composition requested for a pre_quota portfolio. |
| 404 | CMP000012 | There is no portfolio with the given composition_key, or of the composition_type on reference_date. |
| 400 | CMP000014 | The report generator refused the request; the description gives the reason. |
| 400 | QIT000001 | Body outside the contract: required field missing, date in the wrong format or an unexpected field. |
| 400 | QIT000004 | The fund_class_key belongs to a class of another manager. |
Authentication, permission and host errors: see API Errors.