CSV layout — substitution (repurchase)
In a substitution batch, the assignor repurchases assets that are already in the fund's portfolio and, in the same batch, may assign new assets in their place. The file is the assignment spreadsheet for the asset type, with extra columns for the repurchase lines.
Only under a repurchase assignment configuration for CCB, structured CCI, legal fees or receivables titles (duplicatas, CT-e, checks and promissory notes). Contracts have no substitution by file. Under a regular configuration, the repurchase columns cause the file to be rejected with "Substitution files are only allowed in repurchase (substitution) assignment configurations."
For receivables titles, the repurchase can also be done through the CNAB 444, with occurrences 72 (partial) and 74 (full).
Download a CCB substitution example · Download a repurchase-only template
Step by step
- Start from the assignment template for the configuration's asset type: CCB, receivables titles or legal fees.
- Add
assignor_document_number,settlement_typeand, if you want to provide the amount,repurchase_valueto the header. - Write the lines for the new assets as in a regular assignment, with the repurchase columns empty.
- Write one line per repurchased asset, filling in only the repurchase columns.
- Send the file under the repurchase configuration. The batch is automatically created as a substitution.
How the file is read
- The file is read as a substitution when its header contains
external_id,asset_type,assignor_document_numberandsettlement_type. - A line with
settlement_typefilled in is a repurchase. All other lines are an assignment. - The required columns of the assignment spreadsheet are only enforced if there is at least one assignment line. A repurchase-only batch may contain just the repurchase columns.
Repurchase line columns
| Column | Requirement | Format and use |
|---|---|---|
external_id | Required | Identifier of the repurchased asset, as it was assigned. Up to 50 characters. It cannot repeat across repurchases nor match a new asset in the file |
asset_type | Required | Type of the repurchased asset (e.g. ccb) |
assignor_document_number | Required | Assignor's CPF or CNPJ, with punctuation and a valid check digit |
settlement_type | Required | asset_settlement (full repurchase) or asset_amortization (partial repurchase) |
repurchase_value | Optional | Repurchase amount, with a decimal point and up to 2 decimal places |
In repurchase lines, all other columns stay empty. Any assignment column filled in on a repurchase line causes the file to be rejected.
Assignment line columns
The same as in the template for the asset type, with the same rules: CCB, receivables titles or legal fees. The repurchase columns stay empty.
Example
Assignment of a new single-installment CCB and full repurchase of another CCB:
asset_type;external_id;originator_document_number;contract_number;contract_issue_date;contract_issue_value;contract_disbursement_date;contract_signature_date;total_purchase_value;principal_value;amortization_type;interest_rate_type;pre_fixed_calendar_base;pre_fixed_monthly_rate;delay_fine_type;delay_fine_percentage_value;delay_interest_method;delay_interest_pre_fixed_monthly_rate;delay_interest_pre_fixed_calendar_base;borrower_name;borrower_document_number;borrower_person_type;borrower_gender;borrower_birthdate;borrower_address_postal_code;installment_number;installment_maturity_date;installment_face_value;installment_external_id;assignor_document_number;settlement_type;repurchase_value
ccb;CCB-2026-0001;11.222.333/0001-81;CCB0001;2026-11-20;2000.00;2026-11-20;2026-11-20;1950.00;2000.00;price;pre_fixed;calendar_360;0.0199;percentage;0.02;compound;0.01;calendar_360;Maria de Souza;529.982.247-25;natural_person;female;1985-04-12;01310-100;1;2026-12-20;1037.85;CCB-2026-0001-P1;;;
ccb;CCB-2025-0420;;;;;;;;;;;;;;;;;;;;;;;;;;;;11.444.777/0001-61;asset_settlement;1200.00
The first line assigns the CCB CCB-2026-0001. The second line fully repurchases the CCB CCB-2025-0420 for 1,200.00.
Errors
All of them reject the whole file.
| Message | How to fix |
|---|---|
| Substitution files are only allowed in repurchase (substitution) assignment configurations. | Send it under the repurchase configuration, or remove the repurchase columns |
| Invalid asset type | The configuration is for a type with no substitution by file (contracts) |
| The fields … are not accepted in this line. In repurchase lines, fill in only the repurchase columns… | Clear the assignment columns in the repurchase line |
| The identifier '…' is being used by a new asset and by a repurchased asset in the same file. | Use different identifiers |
| The identifier '…' is duplicated… | Repurchase each asset only once per file |
| The assignor document '…' is invalid… | Fix the assignor's CPF or CNPJ |
| The field … must be one of the accepted values: asset_amortization, asset_settlement. | Use one of the two values in settlement_type |