Expense lifecycle
The path of an expense posted by the manager or consultant, from posting to payment, and the statuses and origin shown in the retrievals. The calls are on the next pages of this section.
Flow of an expense posted by the manager
Legend: blue boxes with a solid border are manager calls or steps where the expense waits for the manager; dashed grey boxes are QI Tech steps; the green box is the paid expense; the red one, the rejected expense.
- Vendor and contract, only for types that require a contract.
- Posting. The expense is posted in
pending_submission, with the calculation statement and, if already available, the invoice. It can be canceled until it enters the portfolio: inpending_contract_analysis,pending_submission,pre_approved,in_manual_analysisorpending_manager_approval. - Submission. Submit the expense for review, or use
submit: truewhen posting. The expense follows one of two paths:- Without provision: it becomes
pre_approvedand waits for the invoice. If the contract is still under review, it first waits inpending_contract_analysisand becomespre_approvedwhen the contract takes effect. - With provision: it goes to QI Tech review (
in_manual_analysis). Once approved, it enters the portfolio inin_provisionand is provisioned daily. If the contract is still under review, it waits inpending_contract_analysisafter approval and enters the portfolio when the contract takes effect.
- Without provision: it becomes
- Invoice. With the expense in
pre_approvedorin_provision, submit the invoice. Until then, the payment date can be rescheduled. - Consolidation and payment. QI Tech approves the invoice and the expense becomes
consolidated. It is paid on the analysis date (paid) and ends incompleted. A rejected invoice is replaced by a new analysis.
The flow changes in two cases:
- Consultant expense. The expense and the invoice posted by the consultant go through the manager's decision after the QI Tech review.
- Expense calculated by QI Tech (administration, management and performance fees, for example). It is created directly in the portfolio. When the invoice is issued by the manager, it is also submitted through the consolidation analysis.
Tracking. There is no expense webhook. Track expenses through the retrieval filtering by status. Actions taken through the API with an integration key appear in status_events with author_type: qitech.
Expense status
Expenses posted by the manager or consultant first go through the submission and review stage. Then they enter the fund's portfolio, where they are provisioned, consolidated and paid. Expenses calculated by QI Tech are created directly in the portfolio.
Legend: blue with a solid border, the expense waits for the manager or consultant; dashed grey, with QI Tech; green, final; red, rejected. canceled is not in the diagram: through the API, the expense can be canceled until it enters the portfolio. Canceling the contract also cancels its expenses already in the portfolio and not yet paid; rejecting the contract rejects (contract_reproved) all of its expenses still outside the portfolio.
| Status | Stage | Description |
|---|---|---|
pending_submission | Submission | Posted, waiting to be submitted for review. |
pending_contract_analysis | Submission | Submitted, waiting for the linked contract to be approved. |
pre_approved | Submission | Pre-approved: waiting for the invoice to be consolidated. |
in_manual_analysis | Submission | Under QI Tech review. |
pending_manager_approval | Submission | Posted by the consultant and approved by QI Tech, waiting for the manager's decision. |
reproved | Submission | Rejected. reproval_reason gives the reason; post a new expense. |
created | Portfolio | Recorded, before entering the portfolio. For expenses posted by the manager or consultant, it only appears as the first event in status_events. |
in_provision | Portfolio | Provisioned daily between start_deferral_date and end_deferral_date. |
on_demand_recognition | Portfolio | Recognized on demand, without daily provisioning. |
consolidated | Portfolio | Amount consolidated and ready for payment. |
paid | Portfolio | Paid; provisioning still runs until end_deferral_date. |
completed | Portfolio | Paid and fully recognized. |
canceled | Any | Canceled. |
Expense rejection reasons (reproval_reason): invalid_documents, missing_documents, incorrect_information, ineligible_contract, contract_reproved, manager_reproval. On rejection together with the invoice for incorrect_value, incorrect_payment_data or rebate_inconsistency, the expense's reproval_reason is null; the reason is in consolidation_analysis.reproval_reason.
Expense origin
origin.origin_type tells how the expense was created:
origin_type | Origin |
|---|---|
expense_contract | Posted by the manager or consultant under an expense contract. origin_key is the contract key. |
expense | Posted by the manager or consultant without a contract (notary, court fees, CVM and ANBIMA fees). |
reimbursement | Reimbursement to the manager or consultant of an expense it has already paid. |
rebate_fee | Management fee rebate, posted as a distribution fee. |
quota_fee, performance_fee, payment_fee, recurring_expense, expense_control, manual | Calculated or recorded by QI Tech. |
Consolidation analysis
Consolidating means closing the expense amount with the invoice. Until then, the amount is the one posted (and, with provision, the one provisioned day by day); the invoice confirms the final amount, which may differ, with a justification. Once consolidated (consolidated), the expense has final amount and payment data and moves on to payment.
Each expense posted by the manager or consultant has a consolidation analysis: the check of the invoice, the amount and the payment data before consolidating and paying. It appears in consolidation_analysis in the expense retrieval. The calls are in Consolidation analysis.
| Status | Description |
|---|---|
created | Initial record of the review; it only appears as the first event in consolidation_status_events. |
pending_submission | Waiting for the invoice to be submitted. |
in_manual_analysis | Under QI Tech review. |
pending_manager_approval | Submitted by the consultant and approved by QI Tech, waiting for the manager's decision. |
approved | Approved. The expense moves to consolidated. |
reproved | Rejected. Open a new analysis, which gets the next number (analysis_number). |
consolidated | Consolidated automatically by QI Tech. |
canceled | Closed together with the expense. |
Analysis rejection reasons (reproval_reason): invalid_documents, missing_documents, incorrect_value, incorrect_payment_data, incorrect_information, manager_reproval, rebate_inconsistency.
Errors
Authentication, permission and host errors: see API Errors. Expense errors have the EXP prefix and are listed on each call's page.