Skip to main content

Expense submission and cancellation

Submits an expense in pending_submission for analysis, or cancels an expense that has not yet entered the fund's portfolio. Only whoever created the expense, manager or consultant, uses these calls.

On submission, the next status depends on the provision and the contract. To submit right on creation, use submit: true on expense creation.

Submit 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/{expense_key}/submit
METHOD
PUT

Path parameters​

ParameterTypeDescription
fund_class_keystringFund class key (UUID).
expense_keystringExpense key (UUID).

This call has no body.

Before submitting, check that:

  • The calculation memory (calculation_memory) is among the documents of the expense or of the consolidation analysis.
  • On a reimbursement, the payment receipt (payment_receipt) is in the analysis, if the invoice (or the bank slip, on types without a contract) has already been sent or if the type is cvm_tax or anbima_tax.
  • The payment date has not passed.
  • The contract still accepts the expense.

Response​

STATUS
200

The expense, in the structure of retrieval by key, without status_events and consolidation_status_events, in the new status:

SituationExpense status
No provision, contract active or no contractpre_approved
With provisionin_manual_analysis
No provision, contract still under analysispending_contract_analysis

When the expense becomes pre_approved or in_manual_analysis, the consolidation analysis also moves to in_manual_analysis if:

  • the invoice is already among the analysis documents (on types without a contract, the bank slip too, among the expense or analysis documents); or
  • the type is cvm_tax or anbima_tax.

Otherwise, submit the invoice later.

Cancel an expense​

Cancels the expense and the current consolidation analysis. Allowed in the statuses pending_submission, pending_contract_analysis, pre_approved, in_manual_analysis and pending_manager_approval. The API does not cancel an expense that has already entered the portfolio (from in_provision onward).

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}/cancel
METHOD
PUT

This call has no body.

Response​

STATUS
200

The expense with status: canceled.

Errors​

StatuscodeWhen it happens
400EXP000140Submission: the expense is not in pending_submission.
400EXP000138Submission: the calculation memory is missing.
400EXP000135Submission: 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.
400EXP000121Submission: the payment date has already passed. Cancel the expense and post another one with a new date.
400EXP000126Submission: the contract no longer exists in the fund.
400EXP000153Submission: the contract no longer accepts the expense.
400EXP000142Cancellation: the expense is not in any of the statuses in which cancellation is allowed.
400EXP000069The fund class does not belong to the manager.
403EXP000124The consultant has no active link with the fund. Usually consultant-api rejects the request earlier, with 401 (CIT000018).
403EXP000156You did not create the expense (permission_type other than owner).
404EXP000010The expense does not exist in the fund.
503EXP000132Submission: the API could not read the contract. Try again.
Example
{
"title": "Calculation Memory Required",
"description": "The expense requires a calculation_memory document to be submitted.",
"translation": "A despesa exige o documento calculation_memory para ser enviada.",
"code": "EXP000138"
}

Authentication, permission and host errors: see API Errors.