Skip to main content

Assignment Batch Webhooks

Throughout the assignment flow, the system sends webhooks to notify batch status changes. All of them have the type trade_receivables.assignment_status_change and identify the batch by the assignment_external_id provided at creation.

Webhook configuration

To receive webhooks, you must have a callback URL configured with QI Tech. The configuration defines which statuses you receive: only the events subscribed in it are sent. Contact integracao.dtvm@qitech.com.br to set it up. Delivery, retries and signature: see Receiving Webhooks.

Batch status flow​

Assignment batch status flow, from pending_assets_insertion to completed, with the exits to denied and discarded

Reading the diagram: blue = intermediate status with webhook · dashed = status without webhook · green = assignment completed · red = final denied or discarded status.

The full list of statuses, including those that do not generate a webhook, is in Batch status enumerators.

Webhook structure​

FieldTypeDescription
webhook_typestringAlways trade_receivables.assignment_status_change.
webhook_datetimestringDate and time of sending, in YYYY-MM-DDTHH:MM:SSZ format.
dataobjectEvent data. See table below.

data attributes​

FieldTypeDescription
assignment_external_idstringThe batch external_id provided at creation.
assignment_new_statusstringNew batch status.
assignment_configuration_keystringAssignment configuration the batch belongs to — the same key used in the endpoint URLs. Because an assignor can have more than one active configuration, it tells you under which agreement the event happened.
fund_class_keystringFund class of the batch.
signed_term_urlstringOnly in the pending_payment webhook, when the Assignment Term was signed electronically: pre-signed URL to download the signed term, valid for 24 hours. After that, use Assignment Documents.
Webhook Body
{
"data": {
"assignment_external_id": "1caff47c-bd05-48b0-a6bc-9569f5070f6b",
"assignment_new_status": "pending_manager_approval",
"assignment_configuration_key": "3571e292-3a83-4011-904d-20ee963022ef",
"fund_class_key": "b7d3e2a1-4c5f-4e8b-9d1a-2f3c4e5a6b7c"
},
"webhook_type": "trade_receivables.assignment_status_change",
"webhook_datetime": "2024-04-23T15:08:30Z"
}

Events by status​

The body is always the same; only assignment_new_status changes.

assignment_new_statusWhen it is sent
pending_assets_insertionBatch created and ready to receive assets. Also when a batch is reopened.
completed_assets_insertionAsset insertion closed. Also when the batch returns from registration with assets refused by the registry. Not sent for a batch with a future assignment_date: it goes through waiting_assignment_date and enters completed_assets_insertion on the assignment date, without a webhook.
pending_eligibilityAll assets have been analyzed and the batch has entered the eligibility analysis.
pending_consultant_approvalBatch approved in eligibility, awaiting the consultant's approval.
pending_manager_approvalBatch approved in eligibility (and by the consultant, when applicable), awaiting the manager's approval.
pending_assets_registryBatch approved automatically, with assets being registered.
waiting_assets_to_formalizeAssets registered (or batch approved automatically without registration), awaiting formalization.
pending_assignment_termAssignment Term being generated.
pending_assignment_term_signatureAssignment Term sent for signature. Retrieve it in Assignment Documents.
pending_custodyAwaiting custody, according to the assignment configuration. Sent only when the configuration waives the term signature; after the signature, the move to pending_custody does not generate a webhook.
pending_paymentTerm signed (or waived) and payment to the assignor being processed. May include signed_term_url.
pending_assets_wallet_inclusionPayment confirmed; assets being added to the portfolio.
waiting_after_assignment_registryPost-assignment registration (deferred registration) sent to the registry.
completedAssets added to the fund's portfolio — assignment completed. In configurations with deferred registration, it is sent at portfolio inclusion, before the post-assignment registration.
deniedBatch denied: in eligibility, because all assets were denied, at registration, or by the consultant/manager. It does not return to the pipeline through the API.
discardedBatch discarded — for example, at the fund's accounting closing, when it had not yet been paid. denied batches are also discarded at that moment.
Transitions without webhook
  • The final approval made through the API or the portal (which takes the batch to pending_assets_registry or waiting_assets_to_formalize) does not generate a webhook for that transition. Use the status in the approval response.
  • waiting_assignment_date, pending_send_to_signature, pending_assignment_term_validation and pending_after_assignment_documentation do not generate a webhook.
  • The move to pending_custody after the Assignment Term is signed.

To check the status at any time, use Batch Retrieval.