Asset Creation — Discounted Contract
Endpoint to insert a Discounted Contract asset into an assignment batch. This asset type represents a discounted credit right derived from an installment-based contract, where a single installment is linked to a source contract.
Where am I in the flow?
This is the 2nd step of the assignment flow. Before this, you must have created the batch. After inserting assets, submit the required documents and close the insertion.
Attention
The external_id field of the credit right must be unique for each asset and must not be confused with the external_id of the batch.
Request
ENDPOINT
/trade_receivables/fund_class/{fund_class_key}/assignment_configuration/{assignment_configuration_key}/assignment/{assignment_external_id}/assetMETHOD
POSTRequest Body
{
"asset_type": "discounted_contract",
"total_purchase_value": 1231.21,
"discounted_credit_right": {
"external_id": "ccf6f331-d55f-46c0-a32f-fb909884dbb2",
"originator_document_number": "46.282.154/0001-14",
"face_value": 1023.01,
"maturity_date": "2023-12-10",
"installment_number": 3,
"borrower": {
"name": "Natália Nascimento",
"document_number": "805.359.140-08",
"person_type": "natural_person",
"email": "natalia.nascimento@yopmail.com",
"address": {
"street": "Gilberto Sabino",
"number": "215",
"neighborhood": "Pinheiros",
"city": "São Paulo",
"postal_code": "05425-020",
"uf": "SP",
"country": "BRA"
},
"phone": {
"area_code": "11",
"number": "36360268"
},
"natural_person": {
"mother_name": "Lívia Santos",
"birthdate": "2001-01-05"
}
},
"contract": {
"number_of_installments": 12,
"total_face_value": 12276.12,
"number": "CONTR-2023-00123",
"issue_date": "2023-01-10"
}
}
}
Body attributes
| Field | Type | Required | Description |
|---|---|---|---|
asset_type | string | required | Asset type. Must be discounted_contract. |
total_purchase_value | number | required | Total asset purchase value — the effective amount the assignee will pay. Up to 2 decimal places. |
discounted_credit_right | object | required | Credit right data. See discounted_credit_right attributes. |
discounted_credit_right attributes
| Field | Type | Required | Description |
|---|---|---|---|
external_id | string | required | Unique identifier for this asset in the partner's system. Maximum 50 characters. |
originator_document_number | string | required | Formatted CPF or CNPJ of the originator/consultant who facilitated the operation. |
face_value | number | required | Face value of this installment. Up to 8 decimal places. |
maturity_date | string | required | Installment maturity date in YYYY-MM-DD format. |
installment_number | integer | required | Installment sequence number within the source contract. |
borrower | object | required | Borrower data. See borrower attributes on the CCB Asset Creation page. |
contract | object | required | Source contract data. See contract attributes. |
contract attributes
| Field | Type | Required | Description |
|---|---|---|---|
number_of_installments | integer | required | Total number of installments in the source contract. |
total_face_value | number | required | Total face value of the source contract (sum of all installments). Up to 2 decimal places. |
number | string | required | Contract number in the originator's system. Maximum 50 characters. |
issue_date | string | required | Contract issue date in YYYY-MM-DD format. |
Response
STATUS
201Response Body
{
"asset_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"external_id": "ccf6f331-d55f-46c0-a32f-fb909884dbb2",
"status": "pending_eligibility"
}
Response attributes
| Field | Type | Description |
|---|---|---|
asset_key | string | Unique asset identifier generated by QI Tech (UUID). |
external_id | string | The same external key provided in the external_id field of discounted_credit_right. |
status | string | Initial asset status. Always returns pending_eligibility, indicating the asset was inserted and awaits eligibility analysis. |
Possible errors
STATUS
404Batch not found
{
"title": "Assignment not found",
"description": "Assignment not found",
"translation": "Lote não encontrado",
"code": "TRC000018"
}
STATUS
404Asset type does not exist
{
"title": "Asset type does not exist",
"description": "Asset type 'invalid_asset_type' does not exist",
"translation": "Tipo do ativo 'invalid_asset_type' nao existe",
"code": "TRC000015"
}
STATUS
400Asset type incompatible with batch
{
"title": "Invalid asset type configuration",
"description": "This assignment can not receive this asset type: discounted_contract",
"translation": "Esse lote não pode receber esse tipo de ativo: discounted_contract",
"code": "TRC000025"
}
STATUS
400Batch closed for insertion
{
"title": "Assignment is closed",
"description": "Assignment is closed to insert new assets",
"translation": "Lote esta fechado para inserir novos ativos",
"code": "TRC000022"
}
STATUS
400Duplicate external_id
{
"title": "Already Exist This External Id",
"description": "Already exist an asset with this External Id",
"translation": "Ja existe um ativo com esse External Id",
"code": "TRC000054"
}
Next steps
After inserting the asset, the flow continues with:
- Document submission — send the required documentation for each asset approved in eligibility.
- Insertion closure — signal that all assets have been inserted so that the batch proceeds to eligibility analysis.