> ## Documentation Index
> Fetch the complete documentation index at: https://chargecloud.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Contracts / Cancel

> Terminates a contract using the strategy selected via `cancel_type` and returns the resulting end date. Required permission: crm:contracts:cancel. Available contexts: API Key.



## OpenAPI

````yaml /api/core-api/crmiapi.json post /api/v1/crm/contracts/{uuid}/cancel
openapi: 3.2.0
info:
  title: chargecloud - Core API
  summary: chargecloud Core API. All around CRM, Asset Management and more.
  version: 1.141.0
  description: chargecloud Core API. All around CRM, Asset Management and more.
servers:
  - url: https://api.chargecloud.dev
    description: Production - chargecloud Core API
  - url: https://demo.chargecloud.de
    description: Sandbox/Dev - chargecloud Core API
security: []
paths:
  /api/v1/crm/contracts/{uuid}/cancel:
    post:
      tags:
        - Contracts
      summary: Contracts / Cancel
      description: >-
        Terminates a contract using the strategy selected via `cancel_type` and
        returns the resulting end date. Required permission:
        crm:contracts:cancel. Available contexts: API Key.
      operationId: /api/v1/crm/contracts/{uuid}/cancel_POST
      parameters:
        - name: uuid
          in: path
          description: >-
            Identifies the contract to cancel. It must belong to the client of
            the API key; otherwise 404.
          required: true
          schema:
            type: string
            maxLength: 36
            description: >-
              Identifies the contract to cancel. It must belong to the client of
              the API key; otherwise 404.
        - name: Accept-Language
          in: header
          description: BCP 47 language tag for content negotiation (e.g. en, de-DE).
          required: false
          schema:
            type: string
            description: BCP 47 language tag for content negotiation (e.g. en, de-DE).
            example: en
      requestBody:
        description: >-
          Terminates a contract using the strategy selected via `cancel_type`
          and returns the resulting end date. Required permission:
          crm:contracts:cancel. Available contexts: API Key.
        content:
          application/json:
            schema:
              type: object
              required:
                - filing_cancel_date
                - cancel_type
                - cancellation_tech_key
              properties:
                filing_cancel_date:
                  type: string
                  format: date
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: Filing date of the cancellation (YYYY-MM-DD).
                  example: '2026-03-15'
                cancel_type:
                  type: string
                  enum:
                    - deadlineDate
                    - extraOrdinaryDate
                    - cancelDate
                    - moveAtDate
                  description: >-
                    Cancellation strategy. Allowed values: deadlineDate
                    (earliest legal cancellation date, auto-calculated, no extra
                    date required); extraOrdinaryDate (immediate termination,
                    requires extra_ordinary_date); cancelDate (scheduled
                    termination, requires cancel_date); moveAtDate (relocation,
                    requires move_at_date).
                  example: deadlineDate
                cancellation_tech_key:
                  type: string
                  description: >-
                    Technical key identifying the cancellation reason; validated
                    against the client's registered presets. Common values:
                    DUNNINGLEVEL3CANCELLED, CANCELEDBYPROVIDER, MOVEOUT,
                    CLOSEDOWN, RELOCATION.
                extra_ordinary_date:
                  type: string
                  format: date
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: >-
                    Extraordinary cancellation date (YYYY-MM-DD). Required when
                    cancel_type = extraOrdinaryDate.
                  example: '2026-03-20'
                cancel_date:
                  type: string
                  format: date
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: >-
                    Scheduled cancellation date (YYYY-MM-DD). Required when
                    cancel_type = cancelDate.
                  example: '2026-04-01'
                move_at_date:
                  type: string
                  format: date
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: >-
                    Relocation move-out date (YYYY-MM-DD). Required when
                    cancel_type = moveAtDate.
                  example: '2026-05-01'
        required: true
      responses:
        '200':
          headers:
            Content-Language:
              description: The locale of the response content (BCP 47 language tag).
              required: false
              schema:
                type: string
                example: en
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
                    description: Human-readable confirmation of the cancellation.
                  cancelled_at_date:
                    type: string
                    format: date
                    pattern: ^\d{4}-\d{2}-\d{2}$
                    description: >-
                      Effective contract end date after cancellation
                      (YYYY-MM-DD). For cancel_type `deadlineDate` this is
                      auto-calculated; for the other strategies it equals the
                      input date. Null when the service did not resolve an end
                      date.
          description: Cancellation confirmation including the resulting contract end date.
        '401':
          headers:
            Content-Language:
              description: The locale of the response content (BCP 47 language tag).
              required: false
              schema:
                type: string
                example: en
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Unauthorized
        '403':
          headers:
            Content-Language:
              description: The locale of the response content (BCP 47 language tag).
              required: false
              schema:
                type: string
                example: en
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Forbidden
        '404':
          headers:
            Content-Language:
              description: The locale of the response content (BCP 47 language tag).
              required: false
              schema:
                type: string
                example: en
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Not found
        '405':
          headers:
            Content-Language:
              description: The locale of the response content (BCP 47 language tag).
              required: false
              schema:
                type: string
                example: en
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Method not allowed
        '422':
          headers:
            Content-Language:
              description: The locale of the response content (BCP 47 language tag).
              required: false
              schema:
                type: string
                example: en
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        errorKey:
                          type: string
                          description: A key identifying the error
                        message:
                          type: string
                          description: The error message
                        parameter:
                          type: string
                          description: The parameter that caused the error, if any
                      required:
                        - errorKey
                        - message
                        - parameter
                      description: Error
                    description: List of errors
          description: Request validation failed
      security:
        - bearer:
            - crm:contracts
components:
  securitySchemes:
    bearer:
      type: http
      description: OAuth2 Bearer Authorization
      scheme: bearer
      bearerFormat: JWT

````

## Related topics

- [Contract management](https://chargecloud.dev/contract-management.md)
- [Contracts / Update](https://chargecloud.dev/api-reference/contracts/contracts-update.md)
- [Contracts / Read](https://chargecloud.dev/api-reference/contracts/contracts-read.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.