Skip to main content

Consolidation analysis

The consolidation analysis is the invoice step: the manager or the consultant submits the expense invoice, and QI Tech checks the invoice, the amount and the payment details before consolidating and paying. Each expense has one current analysis (analysis_number 1, 2...). A rejected analysis is replaced by a new one.

Invoices are submitted here for:

  • expenses created by the manager or by the consultant;
  • expenses calculated by QI Tech for which the invoice belongs to the manager:
    • origins manual, performance_fee and expense_control;
    • origin quota_fee, except custody_tax and administration_tax;
    • origin recurring_expense consolidated by the manager and paid without automatic debit.

Flow:

  1. The expense is pre_approved or in_provision, with the analysis in pending_submission.
  2. Attach the invoice and the other documents to the analysis.
  3. Submit the invoice: the analysis moves to in_manual_analysis.
  4. QI Tech approves (analysis approved, expense consolidated) or rejects (reproved). An invoice submitted by the consultant first goes through the manager's decision (pending_manager_approval).
  5. On rejection, if the expense is still pre_approved or in_provision, open a new analysis and repeat from step 2. If the expense was also reproved (it was still in in_manual_analysis or pending_manager_approval), post another expense.

The invoice can also go with the expense creation: the analysis is submitted together with the expense.

Retrieve the current analysis​

Available on
ProfileHostRequired permission
Managermanager-apiRead
Consultantconsultant-apiRead Expenses or Read Consolidations

Base URL for each host: Environments (Hosts).

ENDPOINT
/expense/fund_class/{fund_class_key}/expense/{expense_key}/consolidation_analysis
METHOD
GET

Returns the expense's current analysis.

STATUS
200
Response body
{
"consolidation_analysis_key": "e3f4a5b6-c7d8-4e9f-8a0b-1c2d3e4f5a6b",
"expense_key": "b7f1c8e2-5a7d-4c7f-9a0e-2c3d4e5f6a7b",
"analysis_number": 2,
"status": "pending_submission",
"expense_description": "Auditoria do exercício 2026",
"payment_method": "transfer",
"payment": {
"target": {
"name": "AUDITORES EXEMPLO S.A.",
"document_number": "44.555.666/0001-81"
},
"target_account": {
"account_number": "123456",
"account_branch": "0001",
"account_digit": "7",
"financial_institution_code": "341",
"financial_institution_ispb": "60701190"
}
},
"payment_date": "2026-11-20",
"payment_value": 15000.0,
"total_rebate_value": null,
"is_reimbursement": false,
"reimbursement_recipient": null,
"reproval_reason": null,
"reproval_details": null,
"last_updated": "2026-11-09T14:10:00Z",
"documents": [
{
"name": "nfe_001234.pdf",
"document_key": "d4e5f6a7-b8c9-4123-def4-567890abcdef",
"consolidation_analysis_key": "e3f4a5b6-c7d8-4e9f-8a0b-1c2d3e4f5a6b",
"document_type": "invoice",
"status": "in_manual_analysis"
}
]
}

Analysis attributes​

FieldTypeDescription
consolidation_analysis_keystringAnalysis key (UUID).
expense_keystringExpense key.
analysis_numberintegerAnalysis number, starting at 1.
statusstringSee analysis status.
expense_descriptionstringExpense description.
payment_methodstringtransfer, pix, bank_slip or automatic_debit.
paymentobjectPayment details, in the same structure as in expense creation.
payment_datestringPayment date, YYYY-MM-DD.
payment_valuenumberAmount to pay. On the management fee, it is the net amount paid to the manager, without the rebates.
total_rebate_valuenumberOnly on the management fee: sum of the fee's rebates, stored on invoice submission and recalculated on approval with the approved rebates. payment_value + total_rebate_value is the fee's gross amount. null on other expenses and before submission.
is_reimbursementbooleantrue when the expense is a reimbursement.
reimbursement_recipientstringmanager, consultant or null.
reproval_reasonstringinvalid_documents, missing_documents, incorrect_value, incorrect_payment_data, incorrect_information, manager_reproval, rebate_inconsistency or null.
reproval_detailsstringRejection details, or null.
last_updatedstringLast change, ISO 8601 in UTC.
documentsarrayAnalysis documents, including canceled ones: name, document_key, consolidation_analysis_key, document_type, status.
rebatesarrayOnly when retrieving the current analysis of a management_tax: non-canceled rebates, with expense_key, status, payment_value, consolidation_analysis_status, reproval_reason, reproval_details.

Attach a document to the analysis​

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/{expense_key}/consolidation_analysis/document
METHOD
POST

Attaches the invoice or another document to the analysis. Allowed with the analysis in pending_submission or reproved. After a rejection, open the new analysis first and attach to it: the new analysis does not copy the documents of the previous one.

Request body
{
"name": "nfe_001234.pdf",
"document_type": "invoice",
"document_b64": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoK..."
}
FieldTypeRequiredDescription
namestringYesFile name, from 1 to 255 characters.
document_typestringYesinvoice (invoice), bank_slip (bank slip), calculation_memory (calculation memory), payment_receipt (payment receipt), settlement_term (settlement term), variance_justification (justification for an amount difference) or extra_document (additional document).
document_b64stringYesBase64 content, up to 20 MB.
STATUS
201
Response body
{
"name": "nfe_001234.pdf",
"document_key": "d4e5f6a7-b8c9-4123-def4-567890abcdef",
"consolidation_analysis_key": "e3f4a5b6-c7d8-4e9f-8a0b-1c2d3e4f5a6b",
"document_type": "invoice",
"status": "in_manual_analysis"
}

Retrieve and cancel an analysis document​

To download an analysis document:

Available on
ProfileHostRequired permission
Managermanager-apiRead
Consultantconsultant-apiRead Expenses or Read Consolidations

Base URL for each host: Environments (Hosts).

ENDPOINT
/expense/fund_class/{fund_class_key}/expense/{expense_key}/consolidation_analysis/document/{document_key}
METHOD
GET

Looks for the document across all of the expense's analyses, not only the current one, and returns it with document_url: the link to download the file, valid for 24 hours and served as application/pdf.

To cancel an analysis document:

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/{expense_key}/consolidation_analysis/document/{document_key}
METHOD
DELETE

Marks a document of the current analysis as canceled. Allowed with the analysis in pending_submission or reproved. Returns 200 with the document.

Open a new analysis​

After a rejection, opens the next analysis in pending_submission. Amount, date and payment details are copied from the previous one; the documents are not. Allowed with the current analysis reproved and the expense in pre_approved or in_provision. For a rebate, the copied amount must fit within the management fee's balance.

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/{expense_key}/consolidation_analysis
METHOD
POST

This call has no body.

STATUS
201

The new analysis, in the structure of analysis attributes, without rebates.

Errors​

StatuscodeWhen it happens
400EXP000164The expense does not accept a consolidation analysis, or the analysis or the expense is not in the status the call requires.
400EXP000163New analysis: the current one is not reproved, or the expense is in neither pre_approved nor in_provision.
400EXP000087New rebate analysis: the amount exceeds the management fee's balance.
400EXP000136The document is not valid Base64.
400EXP000137The document exceeds 20 MB.
400QIT000001Invalid body: missing required field, document_type outside the list or an unexpected field.
400EXP000069The fund class does not belong to the manager.
403EXP000156You did not create the expense: the consultant created it and the caller is the manager, or the other way round. Only the agent who created it submits the invoice, attaches and cancels documents and opens a new analysis.
404EXP000010The expense does not exist in the fund.
404EXP000071The document does not exist in the analysis.

Authentication, permission and host errors: see API Errors.