Skip to main content

Contract Creation

This is the first step of the expense submission flow performed by the integrating agent. The contract defines the business relationship between the fund and a vendor, establishing the expense type and the payment conditions.

Prerequisites

Before creating a contract, you need to have at hand:

  • fund_class_key — unique key of the fund, provided by QI Tech
  • vendor_key — key of the registered vendor. See the vendor listing to obtain it

For more details about the complete flow, see the introduction page.

Attention

The submission_nature = rebate field can only be used together with expense_type = distribution_fee. For all other expense types, use submission_nature = manual_submission.

Request​

ENDPOINT
/expense_submission/fund_class/{fund_class_key}/contract
METHOD
POST

Path params​

ParameterTypeDescription
fund_class_keystringUnique key of the fund (UUID)
Request Body
{
"name": "Contrato de Auditoria - Exercício 2026",
"vendor_key": "3571e292-3a83-4011-904d-20ee963022ef",
"expense_type": "audit_tax",
"submission_nature": "manual_submission",
"contract_value": 50000.00,
"validity_date": "2026-12-31",
"contract_key": "contrato-auditoria-2026"
}

Body attributes​

FieldTypeRequiredDescription
namestringrequiredContract name. Maximum of 255 characters.
vendor_keystringrequiredUnique key of the vendor (maximum 255 characters).
expense_typestringrequiredExpense type. See Expense types.
submission_naturestringrequiredSubmission nature: manual_submission or rebate.
contract_valuenumberoptionalMaximum contract value. When provided, the sum of the expenses cannot exceed this value. Minimum: 0.
validity_datestringoptionalContract validity date in the YYYY-MM-DD format. After this date, no new expense can be created.
contract_keystringoptionalCustom identifier of the contract in the partner's system. Maximum of 255 characters. When not provided, a UUID is generated automatically.

Expense types​

ValueDescription
cvm_taxCVM fee
cetip_taxCETIP fee
anbima_taxANBIMA fee
notaryNotary
audit_taxAudit fee
administration_taxAdministration fee
management_taxManagement fee
bank_accountBank account
selic_taxSELIC fee
consulting_feeConsulting fees
custody_taxCustody fee
performance_feePerformance fee
bankslip_feeBankslip fee
sale_commission_taxSales commission
certifier_feeCertifier fees
rating_agency_feeRating agency fee
lawyer_feeLegal fees
bookkeeping_feeBookkeeping fee
distribution_feeDistribution fee
insurance_feeInsurance fee
collection_agent_feeCollection agent fees
servicing_feeServicing fee
fund_structuring_feeFund structuring fee
credit_rights_registration_feeCredit rights registration fee
origination_feeOrigination fee

Response​

STATUS
201
Response Body
{
"name": "Contrato de Auditoria - Exercício 2026",
"contract_key": "contrato-auditoria-2026",
"fund_class": {
"name": "FUNDO DE INVESTIMENTO EM DIREITOS CREDITÓRIOS EXEMPLO",
"manager": {
"name": "EXEMPLO GESTORA LTDA",
"manager_key": "a7498c6c-1893-42ec-a8f3-bc6ad0c6b52c",
"document_number": "45.585.471/0001-47"
},
"fund_class_key": "4b8377d0-58ec-479f-8ee9-9f963d5c47ad",
"document_number": "60.910.091/0001-24"
},
"vendor": {
"vendor_key": "3571e292-3a83-4011-904d-20ee963022ef",
"name": "AUDITORES EXEMPLO S.A.",
"document_number": "12.345.678/0001-90",
"requires_invoice": "True"
},
"expense_type": "audit_tax",
"status": "created",
"contract_value": 50000.00,
"validity_date": "2026-12-31",
"submission_nature": "manual_submission"
}

Response attributes​

FieldTypeDescription
namestringContract name.
contract_keystringUnique key of the contract. Store this value for the next steps.
fund_classobjectData of the associated fund. See fund_class attributes.
vendorobjectVendor data. See vendor attributes.
expense_typestringExpense type of the contract.
statusstringInitial status of the contract. Always returns created.
contract_valuenumberMaximum contract value, or null when not provided.
validity_datestringValidity date in the YYYY-MM-DD format, or null when not provided.
submission_naturestringSubmission nature of the contract.

fund_class attributes​

FieldTypeDescription
namestringFund name.
managerobjectData of the fund manager.
manager.namestringManager name.
manager.manager_keystringUnique key of the manager (UUID).
manager.document_numberstringManager's CNPJ.
fund_class_keystringUnique key of the fund (UUID).
document_numberstringFund's CNPJ.

vendor attributes​

FieldTypeDescription
vendor_keystringUnique key of the vendor.
namestringVendor name.
document_numberstringVendor's CPF or CNPJ.
requires_invoicestringIndicates whether the vendor requires an invoice ("True" or "False").

Possible errors​

STATUS
404
Fund not found

The fund_class_key provided in the URL does not correspond to any registered fund.

{
"title": "Fund Class Not Found",
"description": "Fund Class with key {fund_class_key} was not found.",
"translation": "O Fundo com chave {fund_class_key} nao foi encontrado.",
"code": "ESB000005"
}
Vendor not found

The vendor_key provided in the body does not correspond to any registered vendor.

{
"title": "Vendor Not Found",
"description": "Vendor with key {vendor_key} was not found.",
"translation": "O fornecedor com a chave {vendor_key} nao foi encontrado.",
"code": "ESB000008"
}
STATUS
409
Duplicate contract key

A contract with the provided contract_key already exists in this fund. Use a different identifier or omit the field to generate a UUID automatically.

{
"title": "Contract Key Already Exists",
"description": "A Contract with key {contract_key} already exists.",
"translation": "Um contrato com a chave {contract_key} já existe.",
"code": "ESB000012"
}
STATUS
400
Expense type incompatible with the submission nature

The rebate value in submission_nature is only valid when expense_type is distribution_fee.

{
"title": "Invalid Expense Type",
"description": "The expense type {expense_type} is not valid for submission nature {submission_nature}.",
"translation": "O tipo de despesa {expense_type} não é válido para a natureza de submissão {submission_nature}.",
"code": "ESB000031"
}

Next steps​

After creating the contract, the flow continues with:

  1. Contract submission — send the contract for analysis and approval by QI Tech.
  2. Contract update — edit the contract data while it is still in the created status.