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

# Finalizar un enlace UBO

Finaliza un enlace UBO activo estableciendo validTo en la fecha de hoy. El enlace sigue visible con includeEnded=true.

* Finalizar un enlace ya finalizado devuelve 404 UBO\_NOT\_FOUND. Mientras la empresa esté en IN\_REVIEW devuelve 409 ENTITY\_IN\_REVIEW.

Los errores usan `application/problem+json` con un `code` estable. Catálogo completo: [Estados de las entidades y códigos de error](https://docs.localpayment.com/es/reference/entity-statuses-and-error-codes.md).


## OpenAPI

````yaml openapi/es/localpayment.json DELETE /api/entity/v1/entities/{companyId}/ubos/{uboId}
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/entity/v1/entities/{companyId}/ubos/{uboId}:
    delete:
      summary: Finalizar un enlace UBO
      operationId: end-ubo-link
      parameters:
        - name: Authorization
          in: header
          description: >-
            Token de acceso Bearer para la autenticación. Este token se obtiene
            de los endpoints [Get Access Token](/es/reference/get-token) o
            [Refresh Access Token](/es/reference/refresh-token). Tu cuenta de
            comerciante y el usuario que actúa se determinan a partir de él.
          required: true
          schema:
            type: string
            examples:
              - Bearer <your_access_token>
        - name: X-Correlation-ID
          in: header
          description: >-
            Identificador de seguimiento (UUID). Se incluye en la respuesta;
            Localpayment lo genera si no está presente.
          required: false
          schema:
            type: string
            examples:
              - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
        - name: companyId
          in: path
          description: internalId de la COMPANY.
          required: true
          schema:
            type: string
            examples:
              - 7c9e6679-7425-40de-944b-e07fc1f90ae7
            format: uuid
        - name: uboId
          in: path
          description: ID de enlace UBO.
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 4584b476-ccc6-4e98-be40-0c5082748e35
      responses:
        '204':
          description: Sin contenido. Sin cuerpo.
        '401':
          description: >-
            No autorizado. UNAUTHORIZED: Falta el token de acceso o no es
            válido.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Detalles del problema según RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve resumen del problema.
                  status:
                    type: integer
                    description: Código de estado HTTP.
                  detail:
                    type: string
                    description: Explicación comprensible para el ser humano.
                  instance:
                    type: string
                    description: Ruta de solicitud.
                  code:
                    type: string
                    description: >-
                      Código de error estable legible por máquina. Basa tu
                      lógica de ramificación en este valor.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificador de la solicitud. Indícalo cuando te pongas
                      en contacto con el servicio de asistencia.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campos problemáticos, cuando corresponda.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - UNAUTHORIZED:
                  value:
                    type: about:blank
                    title: Unauthorized
                    status: 401
                    detail: Missing or invalid access token.
                    instance: >-
                      /api/entity/v1/entities/7c9e6679-7425-40de-944b-e07fc1f90ae7/ubos/4584b476-ccc6-4e98-be40-0c5082748e35
                    code: UNAUTHORIZED
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '404':
          description: >-
            No encontrado. ENTITY_NOT_FOUND: La entidad no existe o pertenece a
            otro comerciante. UBO_NOT_FOUND: El vínculo UBO no existe, ya
            finalizó o pertenece a otro comerciante.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Detalles del problema según RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve resumen del problema.
                  status:
                    type: integer
                    description: Código de estado HTTP.
                  detail:
                    type: string
                    description: Explicación comprensible para el ser humano.
                  instance:
                    type: string
                    description: Ruta de solicitud.
                  code:
                    type: string
                    description: >-
                      Código de error estable legible por máquina. Basa tu
                      lógica de ramificación en este valor.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificador de la solicitud. Indícalo cuando te pongas
                      en contacto con el servicio de asistencia.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campos problemáticos, cuando corresponda.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - ENTITY_NOT_FOUND:
                  value:
                    type: about:blank
                    title: Not found
                    status: 404
                    detail: The entity does not exist or belongs to another merchant.
                    instance: >-
                      /api/entity/v1/entities/7c9e6679-7425-40de-944b-e07fc1f90ae7/ubos/4584b476-ccc6-4e98-be40-0c5082748e35
                    code: ENTITY_NOT_FOUND
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
                Example 2 - UBO_NOT_FOUND:
                  value:
                    type: about:blank
                    title: Not found
                    status: 404
                    detail: >-
                      The UBO link does not exist, has already ended, or belongs
                      to another merchant.
                    instance: >-
                      /api/entity/v1/entities/7c9e6679-7425-40de-944b-e07fc1f90ae7/ubos/4584b476-ccc6-4e98-be40-0c5082748e35
                    code: UBO_NOT_FOUND
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '409':
          description: >-
            Conflicto. ENTITY_IN_REVIEW: La entidad está IN_REVIEW: sus datos,
            documentos, archivos y vínculos UBO están congelados hasta que
            Localpayment Compliance lo resuelva.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Detalles del problema según RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve resumen del problema.
                  status:
                    type: integer
                    description: Código de estado HTTP.
                  detail:
                    type: string
                    description: Explicación comprensible para el ser humano.
                  instance:
                    type: string
                    description: Ruta de solicitud.
                  code:
                    type: string
                    description: >-
                      Código de error estable legible por máquina. Basa tu
                      lógica de ramificación en este valor.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificador de la solicitud. Indícalo cuando te pongas
                      en contacto con el servicio de asistencia.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campos problemáticos, cuando corresponda.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - ENTITY_IN_REVIEW:
                  value:
                    type: about:blank
                    title: Conflict
                    status: 409
                    detail: >-
                      The entity is IN_REVIEW: its data, documents, files and
                      UBO links are frozen until Localpayment Compliance
                      resolves it.
                    instance: >-
                      /api/entity/v1/entities/7c9e6679-7425-40de-944b-e07fc1f90ae7/ubos/37325b16-514f-40f5-afca-a2acd201f629
                    code: ENTITY_IN_REVIEW
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

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