Skip to main content

Asset Creation — Installment Contract

Endpoint to insert an Installment Contract asset into an assignment batch. Each asset represents a contract with a flow of installments — the whole contract is assigned to the fund in a single request, with all its installments.

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.

One asset, several installments

Unlike the Discounted Contract — where each installment is an independent asset — in the installment contract the asset is the contract, and the installments are its payment flow. The installments array must contain all the contract installments being assigned.

Attention

The contract external_id field 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": "contract",
"total_purchase_value": 900.00,
"contract": {
"external_id": "80187a08-ea7d-44b2-b65c-131f1318e904",
"originator_document_number": "22.333.444/0001-81",
"contract_number": "1144927986/XXX",
"issue_date": "2026-11-01",
"interest_rate_type": "pre_fixed",
"calendar_base": "calendar_365",
"pre_fixed": {
"calendar_base": "calendar_365",
"monthly_rate": 0.015
},
"borrower": {
"name": "José de Souza",
"document_number": "969.698.790-03",
"person_type": "natural_person",
"email": "jose.souza@yopmail.com",
"address": {
"street": "Rua Gilberto Sabino",
"number": "215",
"neighborhood": "Pinheiros",
"city": "São Paulo",
"postal_code": "05245-020",
"uf": "SP",
"country": "BRA"
},
"phone": {
"area_code": "11",
"number": "26260447"
},
"natural_person": {
"birthdate": "1999-01-01",
"gender": "male",
"mother_name": "Maria de Souza"
}
},
"installments": [
{
"installment_number": 1,
"maturity_date": "2026-12-25",
"face_value": 500.46,
"principal_value": 450.00,
"external_id": "parcela-1"
},
{
"installment_number": 2,
"maturity_date": "2027-01-25",
"face_value": 500.46,
"principal_value": 450.00,
"external_id": "parcela-2"
}
],
"contract_data": {
"cost_center": "SP-01"
}
}
}

Body attributes​

FieldTypeRequiredDescription
asset_typestringrequiredAsset type. For an installment contract, provide contract.
total_purchase_valuenumberrequiredTotal purchase value of the asset — effectively how much the assignee will pay for the whole contract. Up to 2 decimal places.
contractobjectrequiredContract data. See contract attributes.
Premiums and deductions do not apply

Do not send premiums or deductions for an installment contract: they are not recorded for this asset type. The acquisition value of the asset is the total_purchase_value provided.

contract attributes​

FieldTypeRequiredDescription
external_idstringrequiredUnique identification key of this asset in the partner's system. Maximum of 50 characters.
originator_document_numberstringrequiredCPF or CNPJ of the originator that enabled the operation, in the 000.000.000-00 or 00.000.000/0000-00 format. The originator must be registered with QI Tech with this document; otherwise, the insertion returns TRC000019.
contract_numberstringrequiredContract number. Maximum of 50 characters. Sent exactly as provided, without normalization.
borrowerobjectrequiredData of the contract's drawee/debtor. See borrower attributes.
interest_rate_typestringrequiredContract interest type.
installmentsarrayrequiredList of the contract installments. It must have at least one installment. See installments attributes.
issue_datestringoptionalContract issue date in the YYYY-MM-DD format.
calendar_basestringoptionalDay-count base of the contract. When omitted, workdays is assumed.
pre_fixedobjectconditionalFixed-rate data. Required when interest_rate_type is pre_fixed. See pre_fixed attributes.
post_fixedobjectconditionalFloating-rate data. Required when interest_rate_type is post_fixed. See post_fixed attributes.
contract_dataobjectoptionalFree-form object for additional contract information. It is stored and returned in queries and webhooks, without affecting the calculations.

interest_rate_type enumerators:

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

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
installment_numberintegerrequiredInstallment number, starting at 1. See the sequence rule below.
maturity_datestringrequiredInstallment maturity date in the YYYY-MM-DD format.
face_valuenumberrequiredInstallment face value — how much the drawee pays at maturity. Greater than zero and up to 8 decimal places.
principal_valuenumberoptionalExpected principal to be amortized on the maturity date. Up to 8 decimal places.
external_idstringoptionalIdentification key of the installment in the partner's system. Maximum of 50 characters.
Installment sequence

With the installments ordered by maturity_date, the installment_number values must form the sequence 1, 2, 3, … with no repetitions and no gaps. Out-of-order numbering returns the TRC000174 error.

pre_fixed attributes​

FieldTypeRequiredDescription
calendar_basestringrequiredDay-count base used for the rate. Same enumerators as calendar_base.
monthly_ratenumberrequiredMonthly contract rate, as a decimal fraction between 0 and 1. For 1.5% per month, provide 0.015. Up to 8 decimal places.

post_fixed attributes​

FieldTypeRequiredDescription
calendar_basestringrequiredDay-count base of the adjustment. Same enumerators as calendar_base.
indexerstringrequiredIndex that adjusts the contract.
ratenumberrequiredRate applied on the indexer. For 100% of DI, provide 1.
lagobjectrequiredLag between the index date and the adjustment date. See lag attributes.

indexer enumerators:

ValueDescription
diDI rate, calculated by B3.
selicSelic rate.
ipcaIPCA.

lag attributes​

FieldTypeRequiredDescription
referencestringrequiredLag unit: daily (days) or monthly (months).
amountnumberrequiredLag amount. To use the index from two months before, provide 2 with reference equal to monthly.

borrower attributes​

FieldTypeRequiredDescription
namestringrequiredDrawee name. Maximum of 255 characters.
document_numberstringrequiredFormatted CPF or CNPJ of the drawee.
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. 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
postal_codestringrequiredZIP code (CEP). 9 characters, in the 00000-000 format. Required whenever the address object is provided.
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. 2 characters.
complementstringoptionalComplement. Maximum of 255 characters.
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.

natural_person attributes​

FieldTypeRequiredDescription
birthdatestringoptionalDate of birth in the YYYY-MM-DD format.
genderstringoptionalGender: male or female.
mother_namestringoptionalMother's name. Maximum of 255 characters.
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.

Response​

STATUS
201
Response Body
{
"asset_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"external_id": "80187a08-ea7d-44b2-b65c-131f1318e904",
"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 contract.
statusstringInitial asset status. It always returns pending_eligibility, indicating that the asset was inserted and is awaiting eligibility analysis.
Values calculated by QI Tech

When the asset is inserted, QI Tech calculates — and starts returning in queries and webhooks — the purchase internal rate of return (purchase_irr), the contract duration and the purchase_value of each installment — the share of total_purchase_value allocated to each maturity. These fields must not be sent in the request.

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.
400TRC000025The asset_type differs from the asset type of the assignment configuration.
400TRC000084The contract object was sent with an asset_type other than contract (for example, financing_contract or debt_acknowledgment, which are not assigned through this flow).
400TRC000174With the installments ordered by maturity_date, the installment_number values do not form the sequence 1, 2, 3, ….
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. Check that the document is formatted exactly as in the registration. Despite the title (Originator bond not found), the error does not refer to the link with the configuration.
409TRC000054An asset with that external_id already exists in this batch.
400TRC1000xxThe asset's financial validation refused the flow. Example: TRC100014, present value of the installments different from total_purchase_value.

The error body follows the format below:

{
"title": "Contract must have an installment number sequence",
"description": "Contract 80187a08-ea7d-44b2-b65c-131f1318e904 must have installment numbers as a sequence starting at 1 ordered by maturity date",
"translation": "O contrato 80187a08-ea7d-44b2-b65c-131f1318e904 deve ter os numeros das parcelas em sequencia iniciando em 1 e ordenados pela data de vencimento",
"code": "TRC000174"
}

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, with document_type equal to contract, the PDF of this asset's installment contract (the contract with the debtor, not the assignment contract). One file per asset.
  2. Close asset insertion — signal that all assets have been inserted so the batch proceeds to the eligibility analysis.

To assign installment contracts in volume, without one request per asset, use File-Based Assignment.