Skip to main content

Expense creation

Creates a fund expense. Without submit, it stays in pending_submission until you submit it through submission; with submit: true, it is submitted for analysis in the same call.

Before creating, check in Expense types which types require a contract and which contracts accept the type. The full flow is in Expense lifecycle. A management fee rebate uses this same call, with its own rules in Management fee rebate.

Create an expense​

Available on
ProfileHostRequired permission
Managermanager-apiWrite
Consultantconsultant-apiCreate and Edit Expenses or Submit Consolidations

Base URL for each host: Environments (Hosts).

ENDPOINT
/expense/fund_class/{fund_class_key}/expense
METHOD
POST

Path parameters​

ParameterTypeDescription
fund_class_keystringFund class key (UUID).
Request body — expense with a contract, paid to the vendor's account
{
"expense_key": "b7f1c8e2-5a7d-4c7f-9a0e-2c3d4e5f6a7b",
"expense_type": "audit_tax",
"contract_key": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"description": "Auditoria do exercício 2026",
"payment_value": 15000.00,
"payment_date": "2026-11-24",
"payment_method": "transfer",
"payment": {
"target": {
"name": "AUDITORES EXEMPLO S.A.",
"document_number": "44.555.666/0001-81"
},
"vendor_bank_account_key": "0f9e8d7c-6b5a-4f3e-2d1c-0b9a8f7e6d5c"
},
"documents": [
{
"name": "memoria_de_calculo.pdf",
"document_type": "calculation_memory",
"document_b64": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoK..."
}
],
"consolidation_analysis_documents": [
{
"name": "nfe_001234.pdf",
"document_type": "invoice",
"document_b64": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoK..."
}
],
"submit": true
}
Request body — expense without a contract, via Pix, with provision
{
"expense_type": "notary",
"description": "Registro de ata em cartório",
"payment_value": 850.00,
"payment_date": "2026-11-30",
"start_deferral_date": "2026-11-03",
"end_deferral_date": "2026-11-30",
"payment_method": "pix",
"payment": {
"target": {
"name": "CARTORIO EXEMPLO",
"document_number": "11.222.333/0001-81"
},
"target_pix_key": "11222333000181"
}
}

Body attributes​

FieldTypeRequiredDescription
expense_keystringNoExpense key (UUID) chosen by you. Use it to retry safely: a key already used in the fund returns 409 (EXP000080). Without it, QI Tech generates one.
expense_typestringConditionalExpense type. See types. Required, except on a rebate, which is always distribution_fee. Does not accept pass_through_agent_fee. The types calculated by QI Tech (cetip_tax, selic_tax, custody_tax, administration_tax, management_tax and performance_fee) are refused with EXP000218.
contract_keystringConditionalVendor contract (UUID). Required on types with a contract. Forbidden on notary, court_fee, cvm_tax, anbima_tax and on a rebate. The contracts that accept the type are in Expense types.
descriptionstringYesDescription, from 1 to 200 characters.
payment_valuenumberYesAmount, greater than zero.
payment_datestringConditionalPayment date, YYYY-MM-DD, on a business day, from today on. Required, except on a rebate, where it is forbidden.
start_deferral_datestringNoProvision start, YYYY-MM-DD, on a business day. Send it together with end_deferral_date, or send neither. Forbidden on a rebate.
end_deferral_datestringNoProvision end, YYYY-MM-DD, on a business day, on or after the start.
payment_methodstringYestransfer (TED), pix, bank_slip (bank slip) or automatic_debit (automatic debit).
paymentobjectYesPayee and payment destination. See Payment details.
is_reimbursementbooleanNotrue when the expense reimburses the manager or the consultant for a payment they already made. Forbidden on a rebate. Default: false.
reimbursement_recipientstringConditionalmanager or consultant. Required with is_reimbursement: true.
rebated_expense_keystringNoKey of the fund's management fee (management_tax) that the rebate offsets. Makes the expense a rebate. See Management fee rebate.
documentsarrayNoFrom 1 to 20 expense documents. See documents on creation.
consolidation_analysis_documentsarrayNoFrom 1 to 20 consolidation analysis documents (invoice and receipts).
submitbooleanNotrue submits the expense for analysis in the same call. A rebate is always submitted. Default: false.

No other field is accepted.

Documents on creation​

Each item of documents and consolidation_analysis_documents has:

FieldTypeRequiredDescription
namestringYesFile name, from 1 to 255 characters.
document_typestringYesType. In documents: invoice, calculation_memory, contract, bank_slip, payment_receipt, evidence, extra_document, settlement_term or variance_justification. In consolidation_analysis_documents, the same except contract and evidence.
document_b64stringYesBase64 content, up to 20 MB per file.

The whole body accepts up to 100 MB.

Documents required on submission, here or through submission:

  • Calculation memory (calculation_memory), in either list: always, including on a rebate.
  • Payment receipt (payment_receipt), in consolidation_analysis_documents: on a reimbursement with the invoice (or the bank slip, on types without a contract) and on a reimbursement of cvm_tax or anbima_tax.

The invoice (invoice) is optional on creation. Sent in consolidation_analysis_documents, it removes the need to submit the invoice later: the consolidation analysis is submitted together with the expense. On types without a contract and on a rebate, the bank slip (bank_slip) also works, in either list. cvm_tax and anbima_tax do not require an invoice.

Response​

STATUS
201

The expense, in the structure of retrieval by key, with permission_type: owner, without status_events and consolidation_status_events. The status is pending_submission, or the result of the submission when submit is true:

Situation on submissionExpense status
No provision, contract active or no contractpre_approved
With provision (start_deferral_date and end_deferral_date)in_manual_analysis
No provision, contract still under analysispending_contract_analysis

When the expense becomes pre_approved or in_manual_analysis, the consolidation analysis (consolidation_analysis.status) also moves to in_manual_analysis if:

  • the invoice (or the bank slip, on types without a contract) has already been sent; or
  • the type is cvm_tax or anbima_tax.

The rebate stays pre_approved, and its analysis only moves forward with the management fee's analysis. See Management fee rebate.

Errors​

StatuscodeWhen it happens
400QIT000001Invalid body: missing required field, date in the wrong format, field forbidden for the case (a rebate with a date, for example) or unexpected field.
400EXP000069The fund class does not belong to the manager.
400EXP000136A document is not valid Base64.
400EXP000137A document exceeds 20 MB.
400EXP000218The type is calculated by QI Tech: cetip_tax, selic_tax, custody_tax, administration_tax, management_tax or performance_fee.
400EXP000120The type requires a contract and contract_key was not sent.
400EXP000125contract_key sent on a type without a contract.
400EXP000134is_reimbursement: true without reimbursement_recipient.
400EXP000121payment_date is before today.
400EXP000122payment_date is not a business day.
400EXP000161Only one of the provision dates was sent.
400EXP000009end_deferral_date is before start_deferral_date.
400EXP000027A provision date is not a business day.
400EXP000126The contract does not exist in the fund.
400EXP000128The contract does not cover the expense type.
400EXP000130The contract is rejected or canceled.
400EXP000129The contract is expired, amended or in another status that does not accept expenses.
400EXP000131On this contract, the type is calculated automatically.
400EXP000159The contract expires before the provision end (without provision, before the payment date).
400EXP000178 to EXP000183, EXP000208 to EXP000211 and other payment errorsSee Payment details.
400, 404EXP000087, EXP000089, EXP000090, EXP000133, EXP000166, EXP000206, EXP000010 and other rebate errorsSee Management fee rebate.
400EXP000138Submission without a calculation memory.
400EXP000135Submission of a reimbursement without a payment receipt, with the invoice (or the bank slip, on types without a contract) already sent or with type cvm_tax or anbima_tax.
400EXP000153Submission: the contract no longer accepts the expense.
403EXP000124The consultant has no active link with the fund. Usually consultant-api rejects the request earlier, with 401 (CIT000018).
404EXP000001The fund class does not exist.
409EXP000080The expense_key has already been used in the fund. Retrieve the existing expense.
413EXP000177The body exceeds 100 MB.
503EXP000132The API could not read the contract. Try again.
Example
{
"title": "Payment Target Must Be Contract Vendor",
"description": "The payment target must be the vendor of the contract 0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d (document 44.555.666/0001-81).",
"translation": "O favorecido do pagamento deve ser o fornecedor do contrato 0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d (documento 44.555.666/0001-81).",
"code": "EXP000208"
}

Authentication, permission and host errors: see API Errors.

Next step​