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

Body·

required
application/json

A termination notice for the whole contract or for chosen services.

  • When notice was given. Not in the future

  • ENTIRE_CONTRACT or PER_SERVICE

    values
    ENTIRE_CONTRACTPER_SERVICE
  • The contract's last active day. Required for ENTIRE_CONTRACT, ignored otherwise

  • Free-text notes

  • Termination reason ID

  • The recurring services to end. Required for PER_SERVICE, ignored otherwise

    Properties: 2

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
    }
  ]
}