Close Asset Insertion
After inserting all the desired assets into the batch, use this endpoint to signal that insertion is complete. From that moment on, the batch accepts no new assets. When every asset has completed its individual analysis (pre_approved, pending_formalization, denied or registry_denied), the eligibility of the batch as a whole is evaluated automatically.
| Profile | Host | Required permission |
|---|---|---|
| Manager | manager-api | Write |
| Consultant | consultant-api | Batches |
| Assignor | assignor-api | Write |
Base URL for each host: Environments (Hosts).
You can close insertion at any time after inserting the assets. There is no need to wait for every asset to go through individual eligibility: the system waits until all of them have completed their analysis before proceeding with the batch eligibility.
This is the 3rd step of the assignment flow. Before this step, you must have:
Request
Path params
| Parameter | Type | Description |
|---|---|---|
assignment_external_id | string | The external_id provided when the batch was created. |
{
"assignment_status": "completed_assets_insertion"
}
Body attributes
| Field | Type | Required | Description |
|---|---|---|---|
assignment_status | string | required | To close asset insertion, send completed_assets_insertion. The batch must be in pending_assets_insertion. |
Response
{
"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": 15230.75
}
Response attributes
| Field | Type | Description |
|---|---|---|
assignment_key | string | Unique batch identifier (UUID). |
external_id | string | External batch key provided by the partner. |
status | string | New batch status: completed_assets_insertion, or waiting_assignment_date when the batch assignment_date is later than the fund's accounting date. In that case the batch moves to completed_assets_insertion on the assignment date. This move does not generate a webhook. |
number_of_approved_assets | integer | Always 0 in this call: approved assets are only counted at approval. |
assignment_total_value | number | Sum of the total_purchase_value of the assets not denied (denied/registry_denied), in reais. In substitution batches, already net of the value of the repurchased assets. |
Errors
| Status | Code | When it happens |
|---|---|---|
| 400 | TRC000023 | assignment_status with a value that is not accepted. The values accepted by this endpoint are completed_assets_insertion, pending_assets_insertion, approved and denied. |
| 400 | TRC000024 | The batch is not in pending_assets_insertion. |
| 400 | TRC000042 | The batch has no asset under analysis or approved. Insert at least one asset before closing. |
| 400 | TRC000160 | All assets in the batch were denied. |
| 400 | TRC000092 | Substitution batch: the value of the new assets is lower than the value of the repurchased assets. |
| 400 | TRC000093 | Substitution batch without any repurchase asset. |
| 404 | TRC000018 | No batch with this external_id in this assignment configuration. |
Authentication, permission and host errors: see API Errors.
Next steps
After insertion is closed, the flow continues automatically:
- Asset eligibility — each asset is analyzed individually. You receive asset webhooks reporting approval or denial.
- Batch eligibility — once all assets have been analyzed, the batch eligibility is evaluated. The result is reported via batch webhook.
- Approval — if the assignment configuration requires it, the consultant and/or the manager approve the batch.