Skip to main content

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_asset
METHOD
POST
Request 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

FieldTypeRequiredDescription
asset_typestringrequiredType of the asset being repurchased. Accepted values: ccb, duplicata_mercantil, duplicata_servicos, discounted_contract.
external_idstringrequiredThe external_id of the originally assigned asset being repurchased.
assignor_document_numberstringrequiredFormatted CPF or CNPJ of the assignor who originally transferred the asset.
repurchase_valuenumberrequiredRepurchase value in BRL. Up to 2 decimal places.
settlement_typestringrequiredSettlement type for the repurchase. Accepted values: asset_settlement or asset_amortization.

settlement_type enumerators:

ValueDescription
asset_settlementFull repurchase — the entire outstanding balance of the asset is settled.
asset_amortizationPartial repurchase — only the principal (amortization) portion is settled.

Response

STATUS
201
Response 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

FieldTypeDescription
repurchased_asset_keystringUnique identifier for this repurchase record (UUID).
asset_keystringUnique identifier of the original asset being repurchased (UUID).
assignorobjectAssignor data.
assignor.assignor_keystringUnique assignor identifier (UUID).
assignor.document_numberstringAssignor CPF/CNPJ.
assignor.namestringAssignor name.
assignmentobjectSubstitution batch data.
assignment.assignment_keystringUnique batch identifier (UUID).
assignment.external_idstringExternal batch identifier provided by the partner.
assignment.statusstringCurrent batch status.

Possible errors

STATUS
404
Batch not found
{
"title": "Assignment not found",
"description": "Assignment not found",
"translation": "Lote não encontrado",
"code": "TRC000018"
}
STATUS
404
Asset not found
{
"title": "Asset not found",
"description": "Asset not found",
"translation": "Ativo não encontrado",
"code": "TRC000017"
}
STATUS
400
Batch 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:

  1. Insertion closure — signal that all repurchased assets have been declared so that the batch proceeds to the substitution process.