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.
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
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
| Field | Type | Description |
|---|---|---|
webhook_type | string | Always trade_receivables.assignment_status_change. |
webhook_datetime | string | Date and time of sending, in YYYY-MM-DDTHH:MM:SSZ format. |
data | object | Event data. See table below. |
data attributes
| Field | Type | Description |
|---|---|---|
assignment_external_id | string | The batch external_id provided at creation. |
assignment_new_status | string | New batch status. |
assignment_configuration_key | string | Assignment 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_key | string | Fund class of the batch. |
signed_term_url | string | Only 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. |
{
"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_status | When it is sent |
|---|---|
pending_assets_insertion | Batch created and ready to receive assets. Also when a batch is reopened. |
completed_assets_insertion | Asset 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_eligibility | All assets have been analyzed and the batch has entered the eligibility analysis. |
pending_consultant_approval | Batch approved in eligibility, awaiting the consultant's approval. |
pending_manager_approval | Batch approved in eligibility (and by the consultant, when applicable), awaiting the manager's approval. |
pending_assets_registry | Batch approved automatically, with assets being registered. |
waiting_assets_to_formalize | Assets registered (or batch approved automatically without registration), awaiting formalization. |
pending_assignment_term | Assignment Term being generated. |
pending_assignment_term_signature | Assignment Term sent for signature. Retrieve it in Assignment Documents. |
pending_custody | Awaiting 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_payment | Term signed (or waived) and payment to the assignor being processed. May include signed_term_url. |
pending_assets_wallet_inclusion | Payment confirmed; assets being added to the portfolio. |
waiting_after_assignment_registry | Post-assignment registration (deferred registration) sent to the registry. |
completed | Assets added to the fund's portfolio — assignment completed. In configurations with deferred registration, it is sent at portfolio inclusion, before the post-assignment registration. |
denied | Batch 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. |
discarded | Batch discarded — for example, at the fund's accounting closing, when it had not yet been paid. denied batches are also discarded at that moment. |
- The final approval made through the API or the portal (which takes the batch to
pending_assets_registryorwaiting_assets_to_formalize) does not generate a webhook for that transition. Use thestatusin the approval response. waiting_assignment_date,pending_send_to_signature,pending_assignment_term_validationandpending_after_assignment_documentationdo not generate a webhook.- The move to
pending_custodyafter the Assignment Term is signed.
To check the status at any time, use Batch Retrieval.