Handle Edit Termination
Replace the contract's scheduled termination (CRM-11490).
Takes the same request as creating one. The services go back to their values from before the notice, then the new request is applied in their place; the originals are kept from the first snapshot. Scope may change. Refused once the notice has taken effect.
Path Parameters
- Type: stringcontract
_id required
Body·
required
application/json
A termination notice for the whole contract or for chosen services.
- Type: stringFormat: date-timenotice
Date requiredWhen notice was given. Not in the future
- Type: enumscoperequired
ENTIRE_CONTRACT or PER_SERVICE
valuesENTIRE_CONTRACTPER_SERVICE - Type: stringFormat: date-timenullableeffective
End Date The contract's last active day. Required for ENTIRE_CONTRACT, ignored otherwise
- Type: stringnotesmax length:8192nullable
Free-text notes
- Type: integernullablereason
Id Termination reason ID
- Type: array of TerminationServiceInputnullableservicesProperties: 2
The recurring services to end. Required for PER_SERVICE, ignored otherwise
Responses
- application/json
- application/json
- application/json
Request Example for put/{contract_id} /termination
curl 'https://crm.dreamhub.ai/api/v1/contracts/{contract_id}/termination' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"scope": "ENTIRE_CONTRACT",
"noticeDate": "2026-11-12T20:58:40.556Z",
"effectiveEndDate": "2026-11-12T20:58:40.556Z",
"services": [
{
"revenueItemId": "",
"endDate": "2026-11-12T20:58:40.556Z"
}
],
"reasonId": 1,
"notes": ""
}'
{
"id": "string",
"contractId": "string",
"scope": "ENTIRE_CONTRACT",
"state": "SCHEDULED",
"noticeDate": "2026-11-12T20:58:40.561Z",
"effectiveEndDate": "2026-11-12T20:58:40.561Z",
"reasonId": 1,
"notes": "string",
"createdBy": "string",
"createdAt": "2026-11-12T20:58:40.561Z",
"items": [
{
"revenueItemId": "string",
"action": "END",
"newServiceEndDate": "2026-11-12T20:58:40.561Z",
"newTotalLocal": 1,
"originalServiceEndDate": "2026-11-12T20:58:40.561Z",
"originalTotalLocal": 1,
"originalAutoRenewal": true
}
]
}
