Addition of Assets to be Repurchased
Endpoint to insert an asset into a substitution batch — a special batch used when an assignor needs to repurchase previously assigned assets and replace them with new ones. This endpoint is used to declare which assets are being repurchased and at what value.
Substitution batches
This endpoint is only applicable for substitution-type assignment configurations. Standard assignment batches use the regular asset creation endpoints (criacao_co, criacao_duplicata, etc.).
Where am I in the flow?
This is the asset insertion step within a substitution batch. Before this, you must have created the batch. After inserting repurchased assets, close the insertion.
Request
ENDPOINT
/trade_receivables/fund_class/{fund_class_key}/assignment_configuration/{assignment_configuration_key}/assignment/{assignment_external_id}/repurchased_assetMETHOD
POSTRequest Body
{
"asset_type": "ccb",
"external_id": "ccf6f331-d55f-46c0-a32f-fb909884dbb2",
"assignor_document_number": "46.282.154/0001-14",
"repurchase_value": 1500.00,
"settlement_type": "asset_settlement"
}
Body attributes
| Field | Type | Required | Description |
|---|---|---|---|
asset_type | string | required | Type of the asset being repurchased. Accepted values: ccb, duplicata_mercantil, duplicata_servicos, discounted_contract. |
external_id | string | required | The external_id of the originally assigned asset being repurchased. |
assignor_document_number | string | required | Formatted CPF or CNPJ of the assignor who originally transferred the asset. |
repurchase_value | number | required | Repurchase value in BRL. Up to 2 decimal places. |
settlement_type | string | required | Settlement type for the repurchase. Accepted values: asset_settlement or asset_amortization. |
settlement_type enumerators:
| Value | Description |
|---|---|
asset_settlement | Full repurchase — the entire outstanding balance of the asset is settled. |
asset_amortization | Partial repurchase — only the principal (amortization) portion is settled. |
Response
STATUS
201Response Body
{
"repurchased_asset_key": "7a3f1c92-84bd-4e2a-b017-cf3e8d9a1234",
"asset_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"assignor": {
"assignor_key": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"document_number": "46.282.154/0001-14",
"name": "Example Assignor Ltda"
},
"assignment": {
"assignment_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"external_id": "931e9437-d025-41ab-bb53-6b94e10fd361",
"status": "pending_assets_insertion"
}
}
Response attributes
| Field | Type | Description |
|---|---|---|
repurchased_asset_key | string | Unique identifier for this repurchase record (UUID). |
asset_key | string | Unique identifier of the original asset being repurchased (UUID). |
assignor | object | Assignor data. |
assignor.assignor_key | string | Unique assignor identifier (UUID). |
assignor.document_number | string | Assignor CPF/CNPJ. |
assignor.name | string | Assignor name. |
assignment | object | Substitution batch data. |
assignment.assignment_key | string | Unique batch identifier (UUID). |
assignment.external_id | string | External batch identifier provided by the partner. |
assignment.status | string | Current batch status. |
Possible errors
STATUS
404Batch not found
{
"title": "Assignment not found",
"description": "Assignment not found",
"translation": "Lote não encontrado",
"code": "TRC000018"
}
STATUS
404Asset not found
{
"title": "Asset not found",
"description": "Asset not found",
"translation": "Ativo não encontrado",
"code": "TRC000017"
}
STATUS
400Batch closed for insertion
{
"title": "Assignment is closed",
"description": "Assignment is closed to insert new assets",
"translation": "Lote esta fechado para inserir novos ativos",
"code": "TRC000022"
}
Next steps
After inserting all repurchased assets:
- Insertion closure — signal that all repurchased assets have been declared so that the batch proceeds to the substitution process.