Contract editing
Corrects the data of a contract still in pending_submission. Only the fields sent are changed.
- To replace the PDF, upload a new document.
- The vendor cannot be changed. To use a different vendor, cancel the contract and create another one.
Edit contract
Available on
| Profile | Host | Required permission |
|---|---|---|
| Manager | manager-api | Write |
| Consultant | consultant-api | Update Expense Contracts |
Base URL for each host: Environments (Hosts).
ENDPOINT
/expense_contract/fund_class/{fund_class_key}/contract/{contract_key}/contract_dataMETHOD
PUTPath parameters
| Parameter | Type | Description |
|---|---|---|
fund_class_key | string | Fund class key (UUID). |
contract_key | string | Contract key (UUID). |
Request body
{
"expense_types": [
{
"expense_type": "audit_tax"
},
{
"expense_type": "lawyer_fee"
}
],
"recurrences": null,
"expiration_date": "2028-06-30"
}
Body attributes
Send at least one field. Each field follows the rules of creation.
| Field | Type | Description |
|---|---|---|
name | string | New name, from 1 to 255 characters. |
signature_method | string | certifiqi, qi_sign or external. |
expense_types | array | Replaces all expense types. If recurrences is not sent in the same call, the current recurrences must still cover exactly the new types. |
recurrences | array | Replaces all recurrences. null removes all of them. |
expiration_date | string | New expiration, YYYY-MM-DD. null removes the expiration. |
Response
STATUS
200The updated contract, in the structure described in contract attributes. Removed recurrences remain in parametrizations, with status: canceled.
Errors
| Status | code | When it happens |
|---|---|---|
| 400 | QIT000001 | Empty ({}) or invalid body. |
| 400 | ECT000040 | expiration_date is not a valid date. |
| 400 | ECT000012, ECT000010 | An expense type does not exist, does not use a contract or is contracted during fund structuring. |
| 400 | ECT000061, ECT000045 | A recurrence has end_date earlier than start_date, or the recurrences do not have exactly one for each expense type. |
| 400 | ECT000060 | In an amendment, the expense types are not exactly those of the original contract. |
| 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. |
| 409 | ECT000017 | The contract is not in pending_submission. After submission for review, the data cannot change. |
| 409 | ECT000046 | The contract was created by QI Tech during fund structuring and does not accept this call. |
| 409 | ECT000014 | One of the new types is already in another in-progress, active or expired contract of this fund with this vendor. |
Example
{
"title": "Contract not pending submission",
"description": "This action requires a contract in status pending_submission, not sent_to_analysis.",
"translation": "Esta acao exige um contrato com status pending_submission, nao sent_to_analysis.",
"code": "ECT000017"
}
Authentication, permission and host errors: see API Errors.