Skip to main content

Close Asset Insertion

After inserting all desired assets into the batch, use this endpoint to signal that insertion is complete. From this point, once all assets are either pre-approved (pre_approved) or discarded (discarded), the overall batch eligibility will be automatically evaluated.

No need to wait for asset webhooks

You can close the insertion at any time after inserting the assets. There is no need to wait for all assets to complete individual eligibility. The system will automatically wait until all assets have finished analysis before proceeding with batch eligibility.

Where am I in the flow?

This is the 3rd step of the assignment flow. Before this step, you must have:

  1. Created the batch
  2. Inserted the assets and submitted the documents

Request

ENDPOINT
/trade_receivables/fund_class/{fund_class_key}/assignment_configuration/{assignment_configuration_key}/assignment/{assignment_external_id}
METHOD
PUT

Path params

ParameterTypeDescription
assignment_external_idstringThe external_id provided at batch creation.
Request Body
{
"assignment_status": "completed_assets_insertion"
}

Body attributes

FieldTypeRequiredDescription
assignment_statusstringrequiredStatus to update the batch to. To close asset insertion, send completed_assets_insertion.

Response

STATUS
200
Response Body
{
"assignment_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"external_id": "931e9437-d025-41ab-bb53-6b94e10fd361",
"status": "completed_assets_insertion",
"number_of_approved_assets": 0,
"assignment_total_value": 0.00
}

Response attributes

FieldTypeDescription
assignment_keystringUnique batch identifier (UUID).
external_idstringExternal batch key provided by the partner.
statusstringNew batch status: completed_assets_insertion.
number_of_approved_assetsintegerNumber of approved assets in the batch. At this stage, the value will be 0 since eligibility has not yet been processed.
assignment_total_valuenumberTotal assignment value in BRL. At this stage, the value will be 0.00 since pricing has not yet occurred.

Possible errors

STATUS
400
Batch has no inserted assets

You attempted to close asset insertion, but the batch has no assets yet. You must insert at least one asset before closing the batch.

{
"title": "Cannot Close This Assignment",
"description": "Cannot close this assignment because there is no asset.",
"translation": "Não é possível fechar este lote porque não há nenhum ativo.",
"code": "TRC000042"
}

Next steps

After closing the insertion, the flow continues automatically:

  1. Asset eligibility — each asset will be analyzed individually. You will receive asset webhooks informing approval or denial.
  2. Batch eligibility — once all assets have been analyzed, the batch eligibility will be evaluated. The result will be notified via a batch webhook.
  3. Manager approval — if the batch is approved in eligibility, the fund manager must approve it.