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

# 6 - Cancelar Contrato

> Solicita o cancelamento de um contrato, informando o motivo da exclusão (desistência, falecimento, etc).



## OpenAPI

````yaml post /contrato/cancelar
openapi: 3.0.1
info:
  title: SwaggerProxy
  version: '1.0'
servers:
  - url: https://econsignadotrabalhador.moneyp.dev.br
security: []
paths:
  /contrato/cancelar:
    post:
      tags:
        - contrato
      summary: Cancela um contrato de empréstimo consignado.
      description: >-
        Solicita o cancelamento de um contrato, informando o motivo da exclusão
        (desistência, falecimento, etc).
      operationId: EConsignado.Lambda.CancelarContrato
      requestBody:
        content:
          application/json:
            schema:
              required:
                - MotivoExclusao
                - NumeroContrato
              type: object
              properties:
                NumeroContrato:
                  type: integer
                  description: Número do contrato (valor positivo).
                  format: int64
                MotivoExclusao:
                  type: integer
                  description: >-
                    Motivo da exclusão do contrato. 1 = Desistência do
                    Empréstimo; 2 = Falecimento; 3 = Liquidação Antecipada; 7 =
                    Ação Judicial; 8 = Exclusão por Fraude; 9 = Outros.
                  format: int32
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                  - mensagem
                type: object
                properties:
                  mensagem:
                    type: string
                    description: Mensagem de confirmação.
        '400':
          description: Bad Request - Erros de validação
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrorId:
                    type: string
                    format: uuid
                  ErrorCode:
                    type: string
                  ErrorCampo:
                    type: string
                  Error:
                    type: string
                  Origem:
                    type: string
        '401':
          description: Unauthorized - Não Autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrorId:
                    type: string
                    format: uuid
                  ErrorCode:
                    type: string
                  ErrorCampo:
                    type: string
                  Error:
                    type: string
                  Origem:
                    type: string
        '403':
          description: Forbidden - Não Autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrorId:
                    type: string
                    format: uuid
                  ErrorCode:
                    type: string
                  ErrorCampo:
                    type: string
                  Error:
                    type: string
                  Origem:
                    type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                required:
                  - Erro
                type: object
                properties:
                  Erro:
                    type: string
        '408':
          description: Request Timeout - Tempo Excedido
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrorId:
                    type: string
                    format: uuid
                  ErrorCode:
                    type: string
                  ErrorCampo:
                    type: string
                  Error:
                    type: string
                  Origem:
                    type: string
        '412':
          description: Precondition Failed - Pré-condição não atendida
          content:
            application/json:
              schema:
                required:
                  - Erro
                type: object
                properties:
                  Erro:
                    type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                required:
                  - Erro
                type: object
                properties:
                  Erro:
                    type: string

````