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

# Terminare un collegamento UBO

Termina un collegamento attivo con un titolare effettivo (UBO) impostando validTo alla data odierna. Il collegamento resta visibile con includeEnded=true.

* Se termini un collegamento già terminato, la risposta è 404 UBO\_NOT\_FOUND. Finché l'azienda è IN\_REVIEW, la risposta è 409 ENTITY\_IN\_REVIEW.

Gli errori usano `application/problem+json` con un `code` stabile. Catalogo completo: [Stati delle entità e codici di errore](https://docs.localpayment.com/it/reference/entity-statuses-and-error-codes.md).


## OpenAPI

````yaml openapi/it/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: Terminare un collegamento UBO
      operationId: end-ubo-link
      parameters:
        - name: Authorization
          in: header
          description: >-
            Token di accesso Bearer per l'autenticazione. Questo token si
            ottiene dagli endpoint [Ottenere il token di
            accesso](/it/reference/get-token) o [Rinnovare il token di
            accesso](/it/reference/refresh-token). Da esso vengono ricavati il
            tuo conto esercente e l'utente che esegue l'operazione.
          required: true
          schema:
            type: string
            examples:
              - Bearer <your_access_token>
        - name: X-Correlation-ID
          in: header
          description: >-
            Identificatore di traccia (UUID). Restituito nella risposta;
            generato da Localpayment se assente.
          required: false
          schema:
            type: string
            examples:
              - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
        - name: companyId
          in: path
          description: internalId della COMPANY.
          required: true
          schema:
            type: string
            examples:
              - 7c9e6679-7425-40de-944b-e07fc1f90ae7
            format: uuid
        - name: uboId
          in: path
          description: ID del collegamento UBO.
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 4584b476-ccc6-4e98-be40-0c5082748e35
      responses:
        '204':
          description: Nessun contenuto. Nessun corpo.
        '401':
          description: >-
            Non autorizzato. UNAUTHORIZED: token di accesso mancante o non
            valido.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    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: >-
            Non trovato. ENTITY_NOT_FOUND: l'entità non esiste o appartiene a un
            altro esercente. UBO_NOT_FOUND: il collegamento UBO non esiste, è
            già terminato o appartiene a un altro esercente.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    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: >-
            Conflitto. ENTITY_IN_REVIEW: l'entità è IN_REVIEW: i suoi dati,
            documenti, file e collegamenti UBO sono bloccati finché il team di
            conformità di Localpayment non la risolve.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    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.