> ## 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.

# 53 - Cancel Registration

> <p>Scopes:</p>
<b>api.ext api.boleto.cancelar</b>

Through this endpoint, the partner can cancel the registration of a boleto as long as it has not yet been paid.


## OpenAPI

````yaml post /api/Boleto/CancelarRegistro
openapi: 3.0.1
info:
  title: BMPSPBExt
  description: '<p><strong>Build Number: </strong>#0.0</p>'
  version: v1
servers:
  - url: https://api.ext.dbs.moneyp.dev.br/
    description: Localhost
security:
  - Bearer: []
paths:
  /api/Boleto/CancelarRegistro:
    post:
      tags:
        - Boleto
      summary: Cancela o registro de um boleto bancário previamente registrado.
      description: "<p>Scopes:</p>\r\n<b>api.ext api.boleto.cancelar</b>"
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
        - name: IgnoraHandshake
          in: header
          description: (somente em homologação)
          required: true
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/BMPSPB.Domain.Messaging.API.Shared.ListaGuidRequest
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/BMPSPB.Domain.Messaging.API.Shared.ListaGuidRequest
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/BMPSPB.Domain.Messaging.API.Shared.ListaGuidRequest
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BMPSPB.Domain.Messaging.API.Externa.DDA.CancelamentoBoletoResponse
        '400':
          description: Erro de negócio
          content:
            application/json:
              schema:
                type: object
                properties:
                  sucesso:
                    type: boolean
                  mensagem:
                    type: string
        '500':
          description: Erro interno do servidor
          content:
            application/json:
              schema:
                type: object
                properties:
                  sucesso:
                    type: boolean
                  mensagem:
                    type: string
components:
  schemas:
    BMPSPB.Domain.Messaging.API.Shared.ListaGuidRequest:
      type: object
      properties:
        listaCodigos:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Lista de códigos UUID identificadores dos boletos.


            Observação:

            - Quando a 'lista de códigos UUID de identificadores dos boletos'
            (```listaCodigos```) for informada, a 'lista de códigos de barras
            dos boletos' (```listaCodigosBarras```) não deve ser preenchida.
          nullable: true
        listaCodigosBarras:
          type: array
          items:
            type: string
          description: >-
            Lista de códigos de barras dos boletos.


            Observação:

            - Quando a 'lista de códigos de barras dos boletos'
            (```listaCodigosBarras```) for informada, a 'lista de códigos UUID
            de identificadores dos boletos' (```listaCodigos```) não deve ser
            preenchida.
          nullable: true
      additionalProperties: false
    BMPSPB.Domain.Messaging.API.Externa.DDA.CancelamentoBoletoResponse:
      type: object
      properties:
        sucesso:
          type: boolean
        mensagem:
          type: string
          nullable: true
        listaCodigosCancelamento:
          type: array
          items:
            $ref: >-
              #/components/schemas/BMPSPB.Domain.Messaging.API.Shared.CancelamentoBoletoDto
          nullable: true
      additionalProperties: false
    BMPSPB.Domain.Messaging.API.Shared.CancelamentoBoletoDto:
      type: object
      properties:
        codigoRegistroBoleto:
          type: string
          format: uuid
        codigoCancelamento:
          type: string
          format: uuid
        situacaoBoleto:
          allOf:
            - $ref: '#/components/schemas/BMPSPB.Infra.Enums.SituacaoBoleto'
          nullable: true
        sucesso:
          type: boolean
        mensagem:
          type: string
          nullable: true
        ticketId:
          type: string
          format: uuid
          nullable: true
      additionalProperties: false
    BMPSPB.Infra.Enums.SituacaoBoleto:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
      type: integer
      description: ''
      format: int32
  securitySchemes:
    Bearer:
      type: apiKey
      description: Copie 'Bearer ' + token
      name: Authorization
      in: header

````