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.
| Profile | Host | Required permission |
|---|---|---|
| Manager | manager-api | Write |
| Consultant | consultant-api | Create Expense Contracts |
Base URL for each host: Environments (Hosts).
Path parameters
| Parameter | Type | Description |
|---|---|---|
fund_class_key | string | Fund class key (UUID). |
contract_key | string | Contract key (UUID). |
This call has no body.
Response
The contract with status: sent_to_analysis and ai_analysis with status: sent, in the structure described in contract attributes.
{
"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:
- The automated reading compares the document with the contract data: fund and vendor CNPJ, expense types, expiration, recurrences and prohibited clauses.
- 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.
| Profile | Host | Required permission |
|---|---|---|
| Manager | manager-api | Write |
| Consultant | consultant-api | Update Expense Contracts |
Base URL for each host: Environments (Hosts).
Path parameters
| Parameter | Type | Description |
|---|---|---|
fund_class_key | string | Fund class key (UUID). |
contract_key | string | Contract key (UUID). |
This call has no body.
Response
The contract with status: canceled. The recurrences become inactive.
Errors
| Status | code | When it happens |
|---|---|---|
| 400 | ECT000071 | Submission: the document could not be read. Upload a PDF without a password again. |
| 404 | ECT000005 | The fund class does not exist or you do not have access to it. |
| 404 | ECT000009 | The contract does not exist in this fund class. |
| 404 | ECT000056 | Submission: the automated reading is not configured at QI Tech. Contact support. |
| 409 | ECT000017 | Submission: the contract is not in pending_submission. |
| 409 | ECT000022 | Submission: the contract document has not been uploaded yet. |
| 409 | ECT000015 | Submission: the vendor is inactive. |
| 409 | ECT000059 | Submission: the vendor's registration has expired (expired). |
| 409 | ECT000016 | Cancellation: the contract is not in progress. An active or expired contract can only be ended through termination. |
| 409 | ECT000046 | The contract was created by QI Tech during fund structuring and does not accept this call. |
{
"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.