CSV layout — attorney fees
Spreadsheet for the assignment of attorney fees (legal_fees). Each line is an asset: the right to the fees of one lawsuit. Attorney fees can only be submitted by CSV.
Where this file is used
In the flow described in Assignment by file, in an attorney fees assignment configuration.
Step by step
- Download the template and keep all the header columns, including the address columns you will not fill in.
- Write one line per lawsuit, each with its own
external_id. - Fill in the data of the lawsuit, the lawyer, the claimant (who brings the action) and the drawee (the debtor).
- In
legal_claim_expected_face_value, repeat exactly the text offace_value. - Save as CSV in UTF-8 and submit it with the
.csvextension.
File format
| Item | Rule |
|---|---|
| Header | The first line, with the exact column names. Keep the address columns even if empty: without them in the header, the asset is not registered |
| Lines | One per asset |
| Separator | Comma or semicolon, detected from the header |
| Encoding | UTF-8, with or without BOM |
| Values | Decimal point with 1 or 2 decimal places: 10000.00 |
| Dates | YYYY-MM-DD |
| Documents | CPF 000.000.000-00 and CNPJ 00.000.000/0000-00, with punctuation and a valid check digit |
Columns
Asset and lawsuit
| Column | Requirement | Format and use |
|---|---|---|
asset_type | Required | legal_fees |
external_id | Required | Up to 50 characters, unique in the file |
contract_number | Required | Up to 20 characters |
originator_document_number | Required | CNPJ of the originator, registered and linked to the configuration |
total_purchase_value | Required | How much the fund pays, with 1 or 2 decimal places |
face_value | Required | Face value, with 1 or 2 decimal places. It cannot be lower than total_purchase_value |
maturity_date | Required | Expected due date |
legal_claim_case_number | Required | Case number of the lawsuit |
legal_claim_type | Required | Type of lawsuit (e.g. trabalhista), up to 50 characters |
legal_claim_status | Required | Status of the lawsuit, up to 255 characters |
legal_claim_expected_maturity_date | Required | Expected date of receipt |
legal_claim_expected_face_value | Required | Exactly the same text as face_value: 10000.00 and 10000.0 are different |
legal_fees_success_percentage_expectation | Required | Expected likelihood of success, from 0 to 100, up to 2 decimal places: 80 = 80% |
Lawyer
| Column | Requirement | Format and use |
|---|---|---|
lawyer_name | Required | Name of the lawyer |
lawyer_document_number | Required | CPF with a valid check digit |
lawyer_oab_code_number | Required | State + OAB number, without spaces: SP123456 |
Claimant and drawee
The columns below exist with the claimant_ prefix (claimant) and with the borrower_ prefix (drawee, the debtor). The same rules apply to both.
| Column | Requirement | Format and use |
|---|---|---|
…_name | Required | Up to 255 characters |
…_document_number | Required | CPF or CNPJ with a valid check digit, according to the person type |
…_person_type | Required | natural_person or legal_person |
…_email | Required | Up to 255 characters |
…_phone_area_code | Required | 2-digit area code |
…_phone_number | Required | 8 or 9 digits |
…_address_postal_code | Required | CEP 00000-000 |
…_address_country | Required | 3 letters (BRA) |
…_address_street, …_address_number, …_address_neighborhood, …_address_city, …_address_uf | Optional | They can be left empty, but the columns must be in the header |
File rules
These reject the whole file:
- Repeated
external_id. face_valuedifferent, as text, fromlegal_claim_expected_face_value.face_valuelower thantotal_purchase_value.- Invalid check digit in the lawyer's CPF, the originator's CNPJ or the document of the claimant or the drawee.
- Originator not linked to the configuration, or different across lines.
- Any column out of format.
Example
cessao_honorarios.csv
asset_type,external_id,contract_number,originator_document_number,total_purchase_value,face_value,maturity_date,legal_claim_case_number,legal_claim_type,legal_claim_status,legal_claim_expected_maturity_date,legal_claim_expected_face_value,legal_fees_success_percentage_expectation,lawyer_name,lawyer_document_number,lawyer_oab_code_number,claimant_name,claimant_document_number,claimant_person_type,claimant_email,claimant_phone_area_code,claimant_phone_number,claimant_address_postal_code,claimant_address_country,claimant_address_street,claimant_address_number,claimant_address_neighborhood,claimant_address_city,claimant_address_uf,borrower_name,borrower_document_number,borrower_person_type,borrower_email,borrower_phone_area_code,borrower_phone_number,borrower_address_postal_code,borrower_address_country,borrower_address_street,borrower_address_number,borrower_address_neighborhood,borrower_address_city,borrower_address_uf
legal_fees,HON-0001,HON-0001,11.222.333/0001-81,8000.00,10000.00,2027-06-30,0001234-56.2024.5.02.0001,trabalhista,ativo,2027-06-30,10000.00,80,Ana Advogada,111.444.777-35,SP123456,Joao da Silva,529.982.247-25,natural_person,joao@exemplo.com,11,912345678,01311-000,BRA,,,,,,Empresa Devedora Ltda,11.444.777/0001-61,legal_person,financeiro@devedora.com,11,33334444,01310-100,BRA,,,,,
A labor lawsuit with attorney fees of 10,000.00, purchased for 8,000.00, with an expected likelihood of success of 80%. The address columns are in the header and empty.
Errors
| Message | How to fix |
|---|---|
| The fields 'face_value' and 'legal_claim_expected_face_value' must have the same value. | Write both with the same text |
| The 'face_value' cannot be lower than the 'total_purchase_value'. | Fix the values |
| The lawyer's CPF '…' is invalid… | Fix the lawyer's CPF |
| The originator's CNPJ '…' is invalid… | Use the CNPJ of the registered originator |
| The claimant's document '…' is invalid… / The drawee's document '…' is invalid… | Fix the document and the person type |
| The identifier '…' is duplicated… | One external_id per line |
| The field … has an invalid format. | Values with a dot and up to 2 decimal places; OAB as SP123456 |