Manager decision on a consultant expense
When the consultant linked to the fund creates an expense or submits an invoice, QI Tech analyzes it first. Then the expense or the invoice stays in pending_manager_approval, waiting for the manager to approve or reject it. There are two calls:
| What awaits the decision | Where it shows up | Call |
|---|---|---|
| The expense with provision | Expense pending_manager_approval | Decide on the expense |
| The invoice (consolidation analysis) | consolidation_analysis.status pending_manager_approval | Decide on the invoice |
To find what awaits the manager, filter the expense list with status=pending_manager_approval, or the analysis list with status=pending_manager_approval.
Whoever created or submitted the expense or the invoice, or opened the current analysis, cannot decide on it. Through the API, the identity compared is the manager's key. Expenses created by the manager itself do not go through this step.
Decision body
Both calls use the same body.
{
"status": "reproved",
"reproval_details": "Valor diverge do orçamento aprovado."
}
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | approved or reproved. |
reproval_details | string | Conditional | Reason for the rejection, from 1 to 1000 characters. Required with reproved; ignored with approved. |
Decide on the expense
| Profile | Host | Required permission |
|---|---|---|
| Manager | manager-api | Write |
Base URL for each host: Environments (Hosts).
Approves or rejects a consultant expense in pending_manager_approval. Allowed with the consolidation analysis not under review; if the invoice is under review, decide on the invoice.
The expense, in the structure of retrieval by key, with permission_type: viewer, without status_events and consolidation_status_events:
- Rejected:
reproved, withreproval_reason: manager_reproval. The current consolidation analysis also becomesreproved. - Approved: enters the portfolio in
in_provision, or moves topending_contract_analysisif the contract is still under analysis. Payment or provision dates that have already passed move to the first business day from today.
Decide on the invoice
| Profile | Host | Required permission |
|---|---|---|
| Manager | manager-api | Write |
Base URL for each host: Environments (Hosts).
Approves or rejects the consultant's invoice. Allowed with the consolidation analysis in pending_manager_approval.
The consolidation analysis, in the structure of Consolidation analysis:
- Rejected: analysis
reproved, withreproval_reason: manager_reproval.- An expense still in
in_manual_analysisorpending_manager_approvalis rejected along with it. - On a rebate, the expense does not change, and the management fee's analysis, if still open, is rejected with
rebate_inconsistency.
- An expense still in
- Approved: analysis
approved.- The expense is consolidated, and the payment is scheduled for the analysis date or the first available business day (after 5 p.m., the next one).
- An expense not yet in the portfolio enters it before being consolidated, or moves to
pending_contract_analysisif the contract is still under analysis. - On the management fee, the approved rebates are consolidated first, each by its own amount.
total_rebate_valuebecomes their sum, and the fee is consolidated bypayment_value(the net amount). - On a rebate, only the analysis is approved; the rebate is consolidated together with the management fee.
Errors
| Status | code | When it happens |
|---|---|---|
| 400 | EXP000154 | The expense or the analysis is not in pending_manager_approval. |
| 400 | EXP000162 | The expense's invoice is under review: decide on the invoice. |
| 400 | EXP000150 | reproved without reproval_details. |
| 400 | QIT000001 | Invalid body: no status, status other than approved and reproved, reproval_details empty or longer than 1000 characters, or an unexpected field. |
| 400 | EXP000153 | Approval: the contract no longer accepts the expense. |
| 400 | EXP000037, EXP000008, EXP000009, EXP000027 | Approval of an expense not yet in the portfolio: dates incompatible with the fund's accounting date or not on a business day. |
| 400 | EXP000157 | Approval of the management fee's invoice with rebates still under analysis. |
| 400 | EXP000085, EXP000086, EXP000036 | Invoice approval: the expense has no payee or payment destination. |
| 400 | EXP000043, EXP000044 | Approval of an invoice paid by bank slip: the digitable line is missing, or the bank slip amount differs from the consolidated amount. |
| 400 | EXP000011, EXP000051, EXP000073, EXP000074 | Invoice approval: the expense is already consolidated, canceled, paid or completed. |
| 400 | EXP000069 | The fund class does not belong to the manager. |
| 403 | EXP000207 | You created or submitted the expense or the invoice, or opened the current analysis: you cannot decide on it. |
| 404 | EXP000010 | The expense does not exist in the fund. |
| 503 | EXP000132 | The API could not read the contract. Try again. |
{
"title": "Expense Not Pending Manager Approval",
"description": "The expense is in status pre_approved, not pending manager approval.",
"translation": "A despesa esta no status pre_approved, nao aguardando aprovacao do gestor.",
"code": "EXP000154"
}
Authentication, permission and host errors: see API Errors.