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

# Cancelar un reclamo

> Usa este endpoint para cancelar un reclamo de portabilidad o titularidad.


**Notas:**

- Para portabilidad: el estado debe ser OPEN o WAITING_RESOLUTION. Si el
motivo de cancelación es DEFAULT_OPERATION, debe haber transcurrido el
periodo definido por el campo ResolutionPeriodEnd.

- Para titularidad: el estado debe ser OPEN o WAITING_RESOLUTION. Si el
motivo de cancelación es DEFAULT_OPERATION, debe haber transcurrido el
periodo definido por el campo ResolutionPeriodEnd.



## OpenAPI

````yaml es/openapi/v3-current/indirect-pix.yaml POST /v1/dict/claims/{claim_id}/cancel
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - API completa
  description: |
    API completa para el sistema de pagos instantáneos Pix de Brasil, que
    incluye operaciones del diccionario de claves Pix, generación/decodificación
    de códigos QR, transacciones y límites transaccionales.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/dict/claims/{claim_id}/cancel:
    post:
      tags:
        - Claims API
      summary: Cancelar un reclamo
      description: >-
        Usa este endpoint para cancelar un reclamo de portabilidad o
        titularidad.



        **Notas:**


        - Para portabilidad: el estado debe ser OPEN o WAITING_RESOLUTION. Si el

        motivo de cancelación es DEFAULT_OPERATION, debe haber transcurrido el

        periodo definido por el campo ResolutionPeriodEnd.


        - Para titularidad: el estado debe ser OPEN o WAITING_RESOLUTION. Si el

        motivo de cancelación es DEFAULT_OPERATION, debe haber transcurrido el

        periodo definido por el campo ResolutionPeriodEnd.
      parameters:
        - $ref: '#/components/parameters/ClaimId'
        - $ref: '#/components/parameters/XAccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelClaimInput'
            example: {}
      responses:
        '200':
          description: Reclamo cancelado correctamente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClaimObject'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0001:
                  $ref: '#/components/examples/ErrorPIX0001'
                ErrorPIX0003:
                  $ref: '#/components/examples/ErrorPIX0003'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0135:
                  $ref: '#/components/examples/ErrorPIX0135'
                ErrorPIX0141:
                  $ref: '#/components/examples/ErrorPIX0141'
                ErrorPIX0145:
                  $ref: '#/components/examples/ErrorPIX0145'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0113:
                  $ref: '#/components/examples/ErrorPIX0113'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0134:
                  $ref: '#/components/examples/ErrorPIX0134'
                ErrorPIX0136:
                  $ref: '#/components/examples/ErrorPIX0136'
                ErrorPIX0137:
                  $ref: '#/components/examples/ErrorPIX0137'
                ErrorPIX0142:
                  $ref: '#/components/examples/ErrorPIX0142'
                ErrorPIX0143:
                  $ref: '#/components/examples/ErrorPIX0143'
                ErrorPIX0144:
                  $ref: '#/components/examples/ErrorPIX0144'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0000:
                  $ref: '#/components/examples/ErrorPIX0000'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1000:
                  $ref: '#/components/examples/ErrorPIX1000'
                ErrorPIX1007:
                  $ref: '#/components/examples/ErrorPIX1007'
                ErrorPIX1099:
                  $ref: '#/components/examples/ErrorPIX1099'
      deprecated: false
      security:
        - bearerAuth: []
components:
  parameters:
    ClaimId:
      name: claim_id
      in: path
      description: Identificador único del reclamo (formato UUID).
      required: true
      example: 019c96a0-0bc7-7958-9d05-82bef1f200f1
      schema:
        type: string
    XAccountId:
      name: X-Account-Id
      in: header
      description: Identificador único de la cuenta del Ledger de Midaz (formato UUID).
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
  schemas:
    CancelClaimInput:
      type: object
      properties: {}
    ClaimObject:
      type: object
      properties:
        id:
          type: string
          description: UUID interno del reclamo.
          example: 019c96a0-0c3e-77b5-8321-4807058a67bb
        bacenClaimId:
          type: string
          description: Identificador DICT de BACEN para este reclamo.
          example: 019c96a0-0d16-7184-ad7f-38545eeb671c
        key:
          type: string
          description: Valor de la clave Pix que se está reclamando.
          example: '+5561988887777'
        keyType:
          type: string
          description: Tipo de clave Pix.
          example: PHONE
        type:
          type: string
          description: Tipo de reclamo.
          enum:
            - OWNERSHIP
            - PORTABILITY
          example: OWNERSHIP
        status:
          type: string
          description: Estado actual del reclamo.
          enum:
            - OPEN
            - WAITING_RESOLUTION
            - CONFIRMED
            - CANCELLED
            - COMPLETED
          example: OPEN
        donorParticipant:
          type: string
          description: ISPB del PSP donante.
          example: '30306294'
        resolutionPeriodEnd:
          type: string
          format: date-time
          description: Fecha límite para la respuesta del donante (D+7 desde la creación).
          example: '2024-01-22T10:30:00Z'
        completionPeriodEnd:
          type: string
          format: date-time
          description: Fecha límite para completar el reclamo (D+14 desde la creación).
          example: '2024-01-29T10:30:00Z'
        createdAt:
          type: string
          format: date-time
          description: Marca de tiempo en que se creó el reclamo.
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: Marca de tiempo de la última actualización del reclamo.
          example: '2024-01-15T10:30:00Z'
    ErrorFormat:
      type: object
      description: El mensaje de error de la respuesta.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: Un identificador único y estable para el error.
        title:
          type: string
          description: Un breve resumen del problema.
        message:
          type: string
          description: Orientación detallada para resolver el error.
  examples:
    ErrorPIX0001:
      summary: Missing Headers in Request
      value:
        code: PIX-0001
        title: Missing Headers in Request
        message: >-
          Your request is missing one or more required header params. Please
          refer to the documentation to ensure all necessary header params are
          included in your request.
    ErrorPIX0003:
      summary: Missing Fields in Request
      value:
        code: PIX-0003
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    ErrorPIX0135:
      summary: Donor Cannot Cancel Open Claim
      value:
        code: PIX-0135
        title: Donor Cannot Cancel Open Claim
        message: The donor participant cannot cancel a claim in OPEN status.
    ErrorPIX0141:
      summary: Donor Cannot Cancel Confirmed Portability
      value:
        code: PIX-0141
        title: Donor Cannot Cancel Confirmed Portability
        message: The donor cannot cancel a confirmed portability claim.
    ErrorPIX0145:
      summary: Unknown Actor
      value:
        code: PIX-0145
        title: Unknown Actor
        message: The participant is neither the claimer nor the donor.
    ErrorPIX0113:
      summary: Claim Not Found
      value:
        code: PIX-0113
        title: Claim Not Found
        message: The claim was not found.
    ErrorPIX0134:
      summary: Claim Cannot Be Cancelled
      value:
        code: PIX-0134
        title: Claim Cannot Be Cancelled
        message: The claim cannot be cancelled in current status.
    ErrorPIX0136:
      summary: Invalid Reason for Claimer
      value:
        code: PIX-0136
        title: Invalid Reason for Claimer
        message: The claimer cannot cancel with the provided reason in this status.
    ErrorPIX0137:
      summary: Invalid Reason for Donor
      value:
        code: PIX-0137
        title: Invalid Reason for Donor
        message: The donor cannot cancel with the provided reason in this status.
    ErrorPIX0142:
      summary: Resolution Period Not Ended
      value:
        code: PIX-0142
        title: Resolution Period Not Ended
        message: >-
          The resolution period has not ended yet for DEFAULT_OPERATION
          cancellation.
    ErrorPIX0143:
      summary: Ownership Cancel Period Not Ended
      value:
        code: PIX-0143
        title: Ownership Cancel Period Not Ended
        message: >-
          Ownership claims with DEFAULT_OPERATION can only be cancelled after
          CompletionPeriodEnd + 16 days.
    ErrorPIX0144:
      summary: Donor Cancel Period Expired
      value:
        code: PIX-0144
        title: Donor Cancel Period Expired
        message: >-
          The donor can only cancel with FRAUD while CompletionPeriodEnd has not
          passed.
    ErrorPIX0000:
      summary: Internal Server Error
      value:
        code: PIX-0000
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
    ErrorPIX1000:
      summary: Provider Connection Error
      value:
        code: PIX-1000
        title: Provider Connection Error
        message: Failed to connect to provider.
    ErrorPIX1007:
      summary: Provider Internal Error
      value:
        code: PIX-1007
        title: Provider Internal Error
        message: Provider returned an internal error.
    ErrorPIX1099:
      summary: Provider Unmapped Error
      value:
        code: PIX-1099
        title: Provider Unmapped Error
        message: Provider returned an unmapped error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````