Skip to main content

Asset Creation — CCB

Endpoint to insert a CCB (Cédula de Crédito Bancário — Bank Credit Note) asset into an assignment batch. Each asset represents a credit operation that will be assigned to the fund. The same contract applies to structured_cci.

Available on
ProfileHostRequired permission
Managermanager-apiWrite
Consultantconsultant-apiBatches
Assignorassignor-apiWrite

Base URL for each host: Environments (Hosts).

Where am I in the flow?

This is step 2 of the assignment flow. Before this, you must have created the batch. After inserting the assets, submit the required documents and close the insertion.

Attention

The external_id field of the credit operation identifies the asset within the batch and must not be confused with the batch external_id.

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": "Empresa Exemplo Ltda",
"document_number": "11.222.333/0001-81",
"person_type": "legal_person",
"email": "financeiro@empresaexemplo.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": "22.333.444/0001-81",
"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
},
{
"maturity_date": "2026-10-01",
"installment_number": 4,
"face_value": 162.77
},
{
"maturity_date": "2027-10-01",
"installment_number": 5,
"face_value": 81.39
},
{
"maturity_date": "2028-10-01",
"installment_number": 6,
"face_value": 40.69
}
],
"modality_code": "0202",
"consignee": {
"consignee_type": "inss",
"name": "Consignee name",
"document_number": "33.444.555/0001-81"
},
"collaterals": [
{
"collateral_type": "social_security",
"benefit_number": "0000000000",
"benefit_type": "benefit_type",
"status": "reserved"
}
]
}
}

Body attributes​

FieldTypeRequiredDescription
asset_typestringrequiredAsset type. For CCB, provide ccb.
total_purchase_valuenumberrequiredTotal purchase value of the asset — effectively how much the assignee will pay. Up to 2 decimal places.
premiumsarrayoptionalList of premiums involved in the sale. See premiums attributes.
deductionsarrayoptionalList of discounts involved in the sale. See deductions attributes.
credit_operationobjectrequiredCredit operation data. See credit_operation attributes.
Premiums and discounts are part of the value check

At insertion, QI Tech calculates the present value of the installments and compares it with the asset purchase value: total_purchase_value − sum of premiums + sum of deductions. Small differences are automatically recorded as an adjustment (math_adjustment); above that, the insertion returns TRC100014.

premiums attributes​

FieldTypeRequiredDescription
premium_typestringrequiredPremium type: spread, math_adjustment, banker_fee, transaction_fee or originator_fee.
total_valuenumberrequiredTotal premium value. Minimum 0.01. Up to 2 decimal places.

deductions attributes​

FieldTypeRequiredDescription
deduction_typestringrequiredDiscount type: bad_debt_discount or math_adjustment.
total_valuenumberrequiredTotal discount value. Minimum 0.01. Up to 2 decimal places.

credit_operation attributes​

FieldTypeRequiredDescription
external_idstringrequiredUnique identification key of this asset in the partner's system. Maximum of 50 characters.
originator_document_numberstringrequiredFormatted CPF or CNPJ (000.000.000-00 or 00.000.000/0000-00) of the originator that enabled the operation. It must be registered with QI Tech; otherwise, it returns TRC000019.
principal_valuenumberrequiredTotal outstanding principal of the operation. Up to 8 decimal places.
contractobjectrequiredContract data. See contract attributes.
borrowerobjectrequiredDrawee/debtor data. See borrower attributes.
amortization_typestringrequiredAmortization type used in the calculation.
interest_rate_typestringrequiredInterest type of the operation.
pre_fixedobjectconditionalCalculation data for the fixed-rate part. Required when interest_rate_type is pre_fixed. See pre_fixed attributes.
post_fixedobjectconditionalCalculation data for the floating-rate part. Required when interest_rate_type is post_fixed. See post_fixed attributes.
installmentsarrayrequiredList of the operation installments. See installments attributes.
delayobjectrequiredLate fine and interest data. See delay attributes.
modality_codestringoptional4-digit code that specifies the category or type of financial operation associated with the asset. When omitted, the one in the assignment configuration applies.
b3_codestringoptionalAsset code at B3. Up to 50 characters. Only accepted when the assignment configuration uses registry_transfer, deferred_registry or external_registry registration; in the others, it returns TRC000188.
b3_self_codestringoptionalAsset's own code at B3. Up to 50 characters. Same rule as b3_code.
consigneeobjectoptionalConsignee entity data. See consignee attributes.
collateralsarrayoptionalList of collaterals associated with the operation. See collaterals attributes.

amortization_type enumerators:

ValueDescription
sacSAC amortization.
pricePrice amortization.
price_daysPrice amortization with interest calculated by calendar days.

interest_rate_type enumerators:

ValueDescription
pre_fixedFor fixed-rate operations. Provide the pre_fixed object.
post_fixedFor floating-rate operations. Provide the post_fixed object.

contract attributes​

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

borrower attributes​

FieldTypeRequiredDescription
namestringrequiredDrawee name. Maximum of 255 characters.
document_numberstringrequiredDrawee CPF or CNPJ.
person_typestringrequiredPerson type.
emailstringoptionalDrawee e-mail. Maximum of 255 characters.
addressobjectoptionalDrawee address. See address attributes.
phoneobjectoptionalDrawee phone. See phone attributes.

person_type enumerators:

ValueDescription
natural_personNatural person. The CPF in document_number has its check digit verified. When provided, include the natural_person object inside borrower. See natural_person attributes.
legal_personLegal entity. When provided, include the legal_person object inside borrower. See legal_person attributes.

address attributes​

FieldTypeRequiredDescription
streetstringoptionalStreet. If you do not have all the information, send it compiled in this field. Maximum of 255 characters.
numberstringoptionalAddress number. Maximum of 40 characters.
neighborhoodstringoptionalNeighborhood. Maximum of 255 characters.
citystringoptionalCity. Maximum of 255 characters.
ufstringoptionalState abbreviation, in uppercase (e.g., SP).
complementstringoptionalComplement. Maximum of 255 characters.
postal_codestringrequiredZIP code (CEP) in the 00000-000 format. Required whenever the address object is provided.
countrystringoptionalCountry in ISO 3166-1 alpha-3 format. 3 characters.

phone attributes​

FieldTypeRequiredDescription
area_codestringrequiredArea code (DDD). 2 digits.
numberstringrequiredPhone number. 8 or 9 digits.
international_dial_codestringoptionalInternational dialing code (DDI). Up to 3 characters.

natural_person attributes​

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

gender enumerators:

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

representatives attributes​

FieldTypeRequiredDescription
namestringrequiredRepresentative name. Maximum of 255 characters.
document_numberstringrequiredRepresentative CPF or CNPJ.
emailstringrequiredRepresentative e-mail. Maximum of 255 characters.
phoneobjectrequiredPhone. Same structure as phone attributes.
addressobjectrequiredAddress. Same structure as address attributes.
person_typestringoptionalPerson type (natural_person or legal_person).
representative_typestringoptionalRepresentative type. Maximum of 50 characters.

pre_fixed attributes​

FieldTypeRequiredDescription
calendar_basestringrequiredCalculation base used.
monthly_ratenumberrequiredMonthly contract rate, as a decimal fraction between 0 and 1. For 1%, provide 0.01. Up to 8 decimal places.
nominal_monthly_ratenumberoptionalNominal monthly contract rate, in the same format as monthly_rate.

calendar_base enumerators:

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

post_fixed attributes​

FieldTypeRequiredDescription
calendar_basestringrequiredDay-count base of the adjustment. Same enumerators as calendar_base.
indexerstringrequiredIndex that adjusts the operation: di, selic or ipca.
ratenumberrequiredRate applied on the indexer. For 100% of DI, provide 1.
lagobjectrequiredIndex lag: reference (daily or monthly) and amount (quantity). To use the index from two months before, provide {"reference": "monthly", "amount": 2}.

installments attributes​

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

delay attributes​

FieldTypeRequiredDescription
fineobjectrequiredLate fine data. See fine attributes. With no fine, send fine_type percentage with percentage_value 0.
interestobjectrequiredLate interest data. See interest attributes. With no late interest, send monthly_rate 0.

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 value when fine_type is fixed. Up to 2 decimal places.

fine_type enumerators:

ValueDescription
percentagePercentage fine on the installment value.
fixedFixed fine value.

interest attributes​

FieldTypeRequiredDescription
methodstringrequiredLate interest method.
pre_fixedobjectrequiredLate interest rate: calendar_base and monthly_rate or daily_rate. Does not accept nominal_monthly_rate. See late interest pre_fixed attributes.

method enumerators:

ValueDescription
compoundCompound late interest.
simpleSimple late interest.
pre_fixedFixed-rate late interest.

consignee attributes​

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

consignee_type enumerators:

ValueDescription
publicPublic consignee.
privatePrivate consignee.
inssINSS consignee.

collaterals attributes​

FieldTypeRequiredDescription
collateral_typestringrequiredCollateral type.
How to build collaterals

collaterals is a list and each item represents one collateral. The collateral_type determines which fields that item accepts — the fields of one type are not accepted in another. Any property outside the set of the given type is refused with QIT000001.

collateral_type enumerators:

ValueDescription
fgtsFGTS collateral. Include the fields of FGTS collateral attributes.
social_securityINSS collateral. Include the fields of INSS collateral attributes.
home_equityReal estate collateral. Include the fields of Real estate collateral attributes.
vehicleVehicle collateral. Include the fields of Vehicle 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_namestringrequiredDevelopment name.
registration_numberstringrequiredProperty registration number.
enterprise_document_numberstringoptionalCPF or CNPJ associated with the development.
collateral_propertiesarrayrequiredList of the property's units. See collateral_properties attributes.

collateral_properties attributes​

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

Vehicle collateral attributes​

FieldTypeRequiredDescription
vehicle_loan_valuenumberoptionalFinanced value of the vehicle. Cannot be negative.
vehicle_total_market_valuenumberoptionalTotal market value of the vehicle. Cannot be negative.
vehicle_identificationobjectrequiredVehicle identification. See vehicle_identification attributes.
Vehicle collateral example
{
"collateral_type": "vehicle",
"vehicle_loan_value": 30000.00,
"vehicle_total_market_value": 55000.00,
"vehicle_identification": {
"brand": "Toyota",
"model": "Corolla XEi 2.0",
"manufacturing_year": 2022,
"chassis_number": "9BRBLWHEXK0123456",
"license_plate": "ABC1D23",
"renavam": "12345678901"
}
}

vehicle_identification attributes​

FieldTypeRequiredDescription
brandstringoptionalVehicle brand.
modelstringrequiredVehicle model.
manufacturing_yearintegerrequiredVehicle manufacturing year. Minimum 1900.
chassis_numberstringrequiredVehicle chassis number.
license_platestringoptionalVehicle license plate.
renavamstringoptionalVehicle RENAVAM code.

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. It always returns pending_eligibility, indicating that the asset was inserted and is awaiting eligibility analysis.

Errors​

StatusCodeWhen it happens
400QIT000001The request body does not follow the expected format: missing required field, invalid type or format. The description points to the field.
404TRC000018There is no batch with that assignment_external_id in this assignment configuration.
404TRC000015The asset_type does not exist.
400TRC000025The asset_type differs from the asset type of the assignment configuration.
400TRC000022The batch no longer accepts assets: the insertion has already been closed. To add more, reopen the batch.
400TRC000009Invalid CPF or CNPJ in originator_document_number or in the document_number of a natural person drawee.
404TRC000019There is no originator registered with the originator_document_number provided. Despite the title (Originator bond not found), the error does not refer to the link with the configuration.
400TRC000188b3_code or b3_self_code sent in a configuration whose registration type does not accept them.
409TRC000054An asset with that external_id already exists in this batch.
400TRC100014The present value of the installment flow does not match the purchase value (total_purchase_value, premiums and discounts).
400TRC100004 / TRC100005Installments without sequential numbering or out of ascending maturity order.
400TRC100009issue_value lower than the operation principal.
409TRC100017The fund cannot buy overdue assets.

The TRC1000xx codes come from the asset's financial validation, performed at insertion. The error body follows the format below:

{
"title": "Already Exist This External Id",
"description": "Already exist an asset with this External Id and asset_key->41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"translation": "Ja existe um ativo com esse External Id e asset_key->41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"code": "TRC000054"
}

In case of error, resend the request. A duplicate (TRC000054) means the resource already exists: query it instead of recreating it, through the asset query endpoint. More in Retry and duplicates.

Authentication, permission and host errors: see API Errors.

Next steps​

After inserting the asset, the flow continues with:

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