Skip to main content

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.

Available on
ProfileHostRequired permission
Managermanager-apiWrite
Consultantconsultant-apiBatches
Assignorassignor-apiWrite

Base URL for each host: Environments (Hosts).

No need to wait for the asset webhooks

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.

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 uploaded 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 when the batch was created.
Request Body
{
"assignment_status": "completed_assets_insertion"
}

Body attributes​

FieldTypeRequiredDescription
assignment_statusstringrequiredTo close asset insertion, send completed_assets_insertion. The batch must be in pending_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": 15230.75
}

Response attributes​

FieldTypeDescription
assignment_keystringUnique batch identifier (UUID).
external_idstringExternal batch key provided by the partner.
statusstringNew 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_assetsintegerAlways 0 in this call: approved assets are only counted at approval.
assignment_total_valuenumberSum 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​

StatusCodeWhen it happens
400TRC000023assignment_status with a value that is not accepted. The values accepted by this endpoint are completed_assets_insertion, pending_assets_insertion, approved and denied.
400TRC000024The batch is not in pending_assets_insertion.
400TRC000042The batch has no asset under analysis or approved. Insert at least one asset before closing.
400TRC000160All assets in the batch were denied.
400TRC000092Substitution batch: the value of the new assets is lower than the value of the repurchased assets.
400TRC000093Substitution batch without any repurchase asset.
404TRC000018No 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:

  1. Asset eligibility — each asset is analyzed individually. You receive asset webhooks reporting approval or denial.
  2. Batch eligibility — once all assets have been analyzed, the batch eligibility is evaluated. The result is reported via batch webhook.
  3. Approval — if the assignment configuration requires it, the consultant and/or the manager approve the batch.