Skip to main content

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}/asset
METHOD
POST
Request 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

FieldTypeRequiredDescription
asset_typestringrequiredAsset type. Must be discounted_contract.
total_purchase_valuenumberrequiredTotal asset purchase value — the effective amount the assignee will pay. Up to 2 decimal places.
discounted_credit_rightobjectrequiredCredit right data. See discounted_credit_right attributes.

discounted_credit_right attributes

FieldTypeRequiredDescription
external_idstringrequiredUnique identifier for this asset in the partner's system. Maximum 50 characters.
originator_document_numberstringrequiredFormatted CPF or CNPJ of the originator/consultant who facilitated the operation.
face_valuenumberrequiredFace value of this installment. Up to 8 decimal places.
maturity_datestringrequiredInstallment maturity date in YYYY-MM-DD format.
installment_numberintegerrequiredInstallment sequence number within the source contract.
borrowerobjectrequiredBorrower data. See borrower attributes on the CCB Asset Creation page.
contractobjectrequiredSource contract data. See contract attributes.

contract attributes

FieldTypeRequiredDescription
number_of_installmentsintegerrequiredTotal number of installments in the source contract.
total_face_valuenumberrequiredTotal face value of the source contract (sum of all installments). Up to 2 decimal places.
numberstringrequiredContract number in the originator's system. Maximum 50 characters.
issue_datestringrequiredContract issue date in YYYY-MM-DD format.

Response

STATUS
201
Response Body
{
"asset_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"external_id": "ccf6f331-d55f-46c0-a32f-fb909884dbb2",
"status": "pending_eligibility"
}

Response attributes

FieldTypeDescription
asset_keystringUnique asset identifier generated by QI Tech (UUID).
external_idstringThe same external key provided in the external_id field of discounted_credit_right.
statusstringInitial asset status. Always returns pending_eligibility, indicating the asset was inserted and awaits eligibility analysis.

Possible errors

STATUS
404
Batch not found
{
"title": "Assignment not found",
"description": "Assignment not found",
"translation": "Lote não encontrado",
"code": "TRC000018"
}
STATUS
404
Asset 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
400
Asset 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
400
Batch 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
400
Duplicate 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:

  1. Document submission — send the required documentation for each asset approved in eligibility.
  2. Insertion closure — signal that all assets have been inserted so that the batch proceeds to eligibility analysis.