Skip to main content

Contract editing

Corrects the data of a contract still in pending_submission. Only the fields sent are changed.

Edit contract​

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

Path parameters​

ParameterTypeDescription
fund_class_keystringFund class key (UUID).
contract_keystringContract 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.

FieldTypeDescription
namestringNew name, from 1 to 255 characters.
signature_methodstringcertifiqi, qi_sign or external.
expense_typesarrayReplaces all expense types. If recurrences is not sent in the same call, the current recurrences must still cover exactly the new types.
recurrencesarrayReplaces all recurrences. null removes all of them.
expiration_datestringNew expiration, YYYY-MM-DD. null removes the expiration.

Response​

STATUS
200

The updated contract, in the structure described in contract attributes. Removed recurrences remain in parametrizations, with status: canceled.

Errors​

StatuscodeWhen it happens
400QIT000001Empty ({}) or invalid body.
400ECT000040expiration_date is not a valid date.
400ECT000012, ECT000010An expense type does not exist, does not use a contract or is contracted during fund structuring.
400ECT000061, ECT000045A recurrence has end_date earlier than start_date, or the recurrences do not have exactly one for each expense type.
400ECT000060In an amendment, the expense types are not exactly those of the original contract.
404ECT000005The fund class does not exist or you do not have access to it.
404ECT000009The contract does not exist in this fund class.
409ECT000017The contract is not in pending_submission. After submission for review, the data cannot change.
409ECT000046The contract was created by QI Tech during fund structuring and does not accept this call.
409ECT000014One 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.