Skip to main content

Contract submission and cancellation

Submits the contract for QI Tech review, or cancels an in-progress contract.

Submission freezes the document and sends the contract to automated reading and QI Tech review. From then on, the data and the document cannot change: you can follow and cancel the contract and, in pending_signature, switch the signature method.

Submit for review​

Use it after uploading the document. The contract must be in pending_submission.

Available on
ProfileHostRequired permission
Managermanager-apiWrite
Consultantconsultant-apiCreate Expense Contracts

Base URL for each host: Environments (Hosts).

ENDPOINT
/expense_contract/fund_class/{fund_class_key}/contract/{contract_key}/submit
METHOD
PUT

Path parameters​

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

This call has no body.

Response​

STATUS
200

The contract with status: sent_to_analysis and ai_analysis with status: sent, in the structure described in contract attributes.

Response excerpt
{
"contract_key": "3f2b8c1e-7d4a-4e9b-9a61-0c5d2e8f4b17",
"status": "sent_to_analysis",
"ai_analysis": {
"ai_analysis_key": "7c8d9e0f-1a2b-4c3d-9e4f-5a6b7c8d9e0f",
"status": "sent",
"analysis_result": null
}
}

After submission:

  1. The automated reading compares the document with the contract data: fund and vendor CNPJ, expense types, expiration, recurrences and prohibited clauses.
  2. The contract moves on to in_manual_analysis, whatever the reading result.

If the call returns an error, the contract stays in pending_submission.

Cancel contract​

Cancels an in-progress contract, that is, one in any of these statuses: pending_submission, sent_to_analysis, in_manual_analysis, in_compliance_analysis, pending_manager_approval, pending_vendor_approval or pending_signature. In pending_signature, the signature batch is canceled as well.

An active or expired contract cannot be canceled: the manager must request a termination.

Available on
ProfileHostRequired permission
Managermanager-apiWrite
Consultantconsultant-apiUpdate Expense Contracts

Base URL for each host: Environments (Hosts).

ENDPOINT
/expense_contract/fund_class/{fund_class_key}/contract/{contract_key}/cancel
METHOD
PUT

Path parameters​

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

This call has no body.

Response​

STATUS
200

The contract with status: canceled. The recurrences become inactive.

Errors​

StatuscodeWhen it happens
400ECT000071Submission: the document could not be read. Upload a PDF without a password again.
404ECT000005The fund class does not exist or you do not have access to it.
404ECT000009The contract does not exist in this fund class.
404ECT000056Submission: the automated reading is not configured at QI Tech. Contact support.
409ECT000017Submission: the contract is not in pending_submission.
409ECT000022Submission: the contract document has not been uploaded yet.
409ECT000015Submission: the vendor is inactive.
409ECT000059Submission: the vendor's registration has expired (expired).
409ECT000016Cancellation: the contract is not in progress. An active or expired contract can only be ended through termination.
409ECT000046The contract was created by QI Tech during fund structuring and does not accept this call.
Example
{
"title": "Document not uploaded",
"description": "The document of the contract 3f2b8c1e-7d4a-4e9b-9a61-0c5d2e8f4b17 was not uploaded.",
"translation": "O documento do contrato 3f2b8c1e-7d4a-4e9b-9a61-0c5d2e8f4b17 nao foi enviado.",
"code": "ECT000022"
}

Authentication, permission and host errors: see API Errors.

Next step​

Contract retrieval: track the review and the signature.