Skip to main content

Asset Creation — CCB

Endpoint to insert a CCB (Bank Credit Note) asset into an assignment batch. Each asset represents a credit operation that will be assigned to the fund.

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 operation 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": "ccb",
"total_purchase_value": 1351.66,
"premiums": [
{
"premium_type": "spread",
"total_value": 13.38
}
],
"credit_operation": {
"contract": {
"number": "0008309052/NBF",
"disbursement_date": "2023-07-06",
"issue_date": "2023-07-06",
"signature_date": "2023-07-06",
"issue_value": 1338.28
},
"amortization_type": "sac",
"borrower": {
"name": "QI CTVM",
"document_number": "19.845.976/0001-93",
"person_type": "legal_person",
"email": "qidtvm@qitech.com.br",
"address": {
"street": "Pátio de Teixeira",
"number": "1",
"neighborhood": "Estrela do Oriente",
"city": "Rondônia",
"postal_code": "01012-030",
"uf": "RO",
"country": "BRA"
},
"phone": {
"area_code": "11",
"number": "936360268"
},
"legal_person": {
"activity_code": "11.11-1-11"
}
},
"delay": {
"fine": {
"fine_type": "percentage",
"percentage_value": 0.0
},
"interest": {
"method": "compound",
"pre_fixed": {
"monthly_rate": 0.0,
"calendar_base": "calendar_360"
}
}
},
"principal_value": 1338.28,
"interest_rate_type": "pre_fixed",
"external_id": "ccf6f331-d55f-46c0-a32f-fb909884dbb2",
"originator_document_number": "75.723.105/0001-78",
"pre_fixed": {
"calendar_base": "calendar_365",
"monthly_rate": 0.018
},
"installments": [
{
"maturity_date": "2023-10-01",
"installment_number": 1,
"face_value": 689.33
},
{
"maturity_date": "2024-10-01",
"installment_number": 2,
"face_value": 482.53
},
{
"maturity_date": "2025-10-01",
"installment_number": 3,
"face_value": 300.36
}
],
"modality_code": "0202",
"consignee": {
"consignee_type": "inss",
"name": "Consignee name",
"document_number": "11.620.231/3105-71"
},
"collaterals": [
{
"collateral_type": "social_security",
"benefit_number": "0000000000",
"benefit_type": "benefit_type",
"status": "reserved"
}
]
}
}

Body attributes

FieldTypeRequiredDescription
asset_typestringrequiredAsset type. For CCB, use ccb.
total_purchase_valuenumberrequiredTotal asset purchase value — the effective amount the assignee will pay. Up to 2 decimal places.
premiumsarrayoptionalList of premiums involved in the sale. Informational only — not used in calculations.
credit_operationobjectrequiredCredit operation data. See credit_operation attributes.

premiums attributes

FieldTypeRequiredDescription
premium_typestringrequiredPremium type.
total_valuenumberrequiredTotal premium value. Up to 2 decimal places.

premium_type enumerators:

ValueDescription
spreadSpread linked to origination and credit issuance.

credit_operation 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.
principal_valuenumberrequiredTotal outstanding principal of the operation. Up to 8 decimal places.
contractobjectrequiredContract data. See contract attributes.
borrowerobjectrequiredBorrower/debtor data. See borrower attributes.
amortization_typestringrequiredAmortization type used in calculation.
interest_rate_typestringrequiredOperation interest rate type.
pre_fixedobjectrequiredPre-fixed rate calculation data. See pre_fixed attributes.
installmentsarrayrequiredList of operation installments. See installments attributes.
delayobjectoptionalLate fine and interest data. See delay attributes.
modality_codestringoptional4-digit code specifying the category or type of financial operation associated with the asset.
consigneeobjectoptionalConsignee entity data. See consignee attributes.
collateralsarrayoptionalList of collaterals associated with the operation. See collaterals attributes.

amortization_type enumerators:

ValueDescription
sacSAC amortization type.
pricePrice amortization type.

interest_rate_type enumerators:

ValueDescription
pre_fixedFor pre-fixed rate operations.
post_fixedFor post-fixed rate operations.

contract attributes

FieldTypeRequiredDescription
numberstringrequiredContract number. Maximum 50 characters.
disbursement_datestringrequiredDisbursement date in YYYY-MM-DD format.
issue_datestringrequiredIssue date in YYYY-MM-DD format.
signature_datestringoptionalContract signature date in YYYY-MM-DD format.
issue_valuenumberrequiredContract issue value. Up to 2 decimal places.

borrower attributes

FieldTypeRequiredDescription
namestringrequiredBorrower name. Maximum 255 characters.
document_numberstringrequiredBorrower CPF or CNPJ.
person_typestringrequiredPerson type.
emailstringoptionalBorrower email. Maximum 255 characters.
addressobjectrequiredBorrower address. See address attributes.
phoneobjectoptionalBorrower phone. See phone attributes.

person_type enumerators:

ValueDescription
natural_personIndividual. When set, include the natural_person object inside borrower. See natural_person attributes.
legal_personLegal entity. When set, include the legal_person object inside borrower. See legal_person attributes.

address attributes

FieldTypeRequiredDescription
streetstringrequiredStreet address. If not all details are available, send the compiled information in this field. Maximum 255 characters.
numberstringoptionalAddress number. Maximum 40 characters.
neighborhoodstringoptionalNeighborhood. Maximum 255 characters.
citystringoptionalCity. Maximum 255 characters.
ufstringoptionalState abbreviation. 2 characters.
complementstringoptionalComplement. Maximum 255 characters.
postal_codestringrequiredPostal code (CEP). 9 characters (with hyphen).
countrystringoptionalCountry in ISO 3166-1 alpha-3 format. 3 characters.

phone attributes

FieldTypeRequiredDescription
area_codestringrequiredArea code (DDD). 2 digits.
numberstringrequiredPhone number. Up to 9 digits.

natural_person attributes

FieldTypeRequiredDescription
birthdatestringoptionalDate of birth in YYYY-MM-DD format.
genderstringoptionalGender.
mother_namestringoptionalMother's name. Maximum 255 characters.

gender enumerators:

ValueDescription
maleMale.
femaleFemale.
FieldTypeRequiredDescription
foundation_datestringoptionalFoundation date in YYYY-MM-DD format.
activity_codestringrequiredActivity code in 11.11-1-11 format.
annual_revenuesintegeroptionalAnnual revenue in cents.
representativesarrayoptionalList of legal representatives. See representatives attributes.

representatives attributes

FieldTypeRequiredDescription
namestringrequiredRepresentative name. Maximum 255 characters.
document_numberstringrequiredRepresentative CPF or CNPJ.
emailstringoptionalRepresentative email. Maximum 255 characters.
phoneobjectoptionalPhone. Same structure as phone attributes.
addressobjectoptionalAddress. Same structure as address attributes.
person_typestringrequiredPerson type (natural_person or legal_person).
representative_typestringoptionalRepresentative type. Maximum 50 characters.

pre_fixed attributes

FieldTypeRequiredDescription
calendar_basestringrequiredCalculation base used.
monthly_ratenumberrequiredMonthly contract rate. For 1%, provide 0.01. Up to 8 decimal places.

calendar_base enumerators:

ValueDescription
workdaysCalculation base in business days (252).
calendar_365Calculation base of 365 days.
calendar_360Calculation base of 360 days.

installments attributes

FieldTypeRequiredDescription
maturity_datestringrequiredInstallment maturity date in YYYY-MM-DD format.
installment_numberintegerrequiredInstallment number.
face_valuenumberoptionalInstallment face value. Up to 8 decimal places.
principal_valuenumberoptionalExpected principal to be amortized on the maturity date. Up to 8 decimal places.

delay attributes

FieldTypeRequiredDescription
fineobjectoptionalLate fine data. See fine attributes.
interestobjectoptionalLate interest data. See interest attributes.

fine attributes

FieldTypeRequiredDescription
fine_typestringrequiredFine type.
percentage_valuenumberconditionalFine value when fine_type is percentage. From 0 to 1, representing 0% to 100%. Up to 2 decimal places.
amountnumberconditionalFixed fine amount when fine_type is fixed. Up to 2 decimal places.

fine_type enumerators:

ValueDescription
percentagePercentage fine on installment value.
fixedFixed fine amount.

interest attributes

FieldTypeRequiredDescription
methodstringrequiredLate interest method.
pre_fixedobjectrequiredPre-fixed rate data. Same structure as pre_fixed attributes.

method enumerators:

ValueDescription
compoundCompound late interest.
simpleSimple late interest.

consignee attributes

FieldTypeRequiredDescription
namestringrequiredConsignee entity name. Maximum 255 characters.
document_numberstringrequiredConsignee entity CPF or CNPJ.
consignee_typestringrequiredConsignee type.

consignee_type enumerators:

ValueDescription
publicPublic consignee.
privatePrivate consignee.
inssINSS (Social Security) consignee.

collaterals attributes

FieldTypeRequiredDescription
collateral_typestringrequiredCollateral type.

collateral_type enumerators:

ValueDescription
fgtsFGTS (severance fund) collateral. Include FGTS collateral attributes.
social_securityINSS (social security) collateral. Include INSS collateral attributes.
home_equityReal estate collateral. Include real estate collateral attributes.

FGTS collateral attributes

FieldTypeRequiredDescription
protocol_numberstringrequiredProtocol number.
statusstringrequiredCollateral status.

INSS collateral attributes

FieldTypeRequiredDescription
benefit_numberstringrequiredBenefit number.
benefit_typestringrequiredBenefit type.
statusstringrequiredCollateral status.

Real estate collateral attributes

FieldTypeRequiredDescription
enterprise_namestringrequiredEnterprise name.
registration_numberstringrequiredProperty registration number.
enterprise_document_numberstringoptionalCPF or CNPJ associated with the enterprise.
collateral_propertiesarrayrequiredList of property attributes. See collateral_properties attributes.

collateral_properties attributes

FieldTypeRequiredDescription
addressobjectrequiredProperty address. Same structure as address attributes.
total_collateral_valuenumberrequiredProperty value. Up to 8 decimal places.

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 credit_operation.
statusstringInitial asset status. Always returns pending_eligibility, indicating the asset was inserted and awaits eligibility analysis.

Possible errors

STATUS
404
Batch not found

The assignment_external_id provided in the URL does not match any existing batch in this assignment configuration. Verify that the identifier is correct.

{
"title": "Assignment not found",
"description": "Assignment not found",
"translation": "Lote não encontrado",
"code": "TRC000018"
}
STATUS
404
Asset type does not exist

The value provided in the asset_type field is not a valid type. Verify that the type is correct (e.g., ccb, duplicata_mercantil, discounted_contract).

{
"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

The batch was configured to receive a different asset type than the one provided. Each assignment configuration accepts only one specific asset type. Verify the assignment configuration being used.

{
"title": "Invalid asset type configuration",
"description": "This assignment can not receive this asset type: ccb",
"translation": "Esse lote não pode receber esse tipo de ativo: ccb",
"code": "TRC000025"
}
STATUS
400
Batch closed for insertion

The batch has already been closed for new asset insertion. After closure, no more assets can be added. If needed, reopen the batch before inserting new assets.

{
"title": "Assignment is closed",
"description": "Assignment is closed to insert new assets",
"translation": "Lote esta fechado para inserir novos ativos",
"code": "TRC000022"
}
STATUS
400
Invalid document number

One of the document numbers provided (CPF or CNPJ) is invalid. Verify the document_number, originator_document_number, and other document fields in the request body.

{
"title": "Invalid Document number",
"description": "Given '000.000.000-00' document number is invalid.",
"translation": "O numero de document '000.000.000-00' fornecido não é valido.",
"code": "TRC000009"
}
STATUS
400
Duplicate external_id

An asset with the provided external_id already exists. Each asset must have a unique identifier. Generate a new external_id and try again.

{
"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.