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

# Aggiornare un UBO

Modifica la percentuale di partecipazione e/o il ruolo di controllo di un collegamento attivo.

* Un corpo vuoto restituisce 400 VALIDATION\_ERROR.
* I campi personId, validFrom e validTo non possono essere modificati; termina il collegamento e creane uno nuovo.

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 PATCH /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}:
    patch:
      summary: Aggiornare un UBO
      operationId: update-ubo
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ownershipPercentage:
                  type: number
                  description: Da 0 a 100, fino a due decimali.
                  examples:
                    - 55.5
                controlRole:
                  type: string
                  description: >-
                    Nuovo ruolo, uno dei codici indicati in “Collegare un UBO”.
                    Una stringa vuota restituisce 422 INVALID_CONTROL_ROLE; il
                    ruolo non può essere rimosso.
                  examples:
                    - PARTNER
                  enum:
                    - CEO
                    - CFO
                    - COO
                    - CTO
                    - PRESIDENT
                    - VICE_PRESIDENT
                    - DIRECTOR
                    - MANAGING_DIRECTOR
                    - MANAGING_PARTNER
                    - GENERAL_PARTNER
                    - PARTNER
                    - SECRETARY
                    - TREASURER
                    - CHAIRMAN
                    - BOARD_MEMBER
                    - AUTHORIZED_SIGNATORY
                    - GENERAL_COUNSEL
                    - OWNER
                    - FOUNDER
                    - MANAGER
                    - MEMBER
                    - COMPTROLLER
                    - CHIEF_COMPLIANCE_OFFICER
                    - LEGAL_REPRESENTATIVE
            examples:
              Example 1:
                value:
                  ownershipPercentage: 55.5
                  controlRole: ''
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    examples:
                      - 4584b476-ccc6-4e98-be40-0c5082748e35
                    description: Identificatore del collegamento UBO (uboId).
                  companyId:
                    type: string
                    examples:
                      - 7c9e6679-7425-40de-944b-e07fc1f90ae7
                    format: uuid
                    description: L'entità COMPANY.
                  personId:
                    type: string
                    examples:
                      - c1e384f5-ae1c-475e-9e64-a0abe533a96f
                    format: uuid
                    description: >-
                      L'entità INDIVIDUAL. Qui non vengono restituiti dati
                      personali della persona.
                  ownershipPercentage:
                    type:
                      - number
                      - 'null'
                    examples:
                      - 55.5
                    description: Da 0 a 100, fino a due decimali.
                  controlRole:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Ruolo in maiuscolo, ad esempio CEO, PARTNER, DIRECTOR,
                      LEGAL_REPRESENTATIVE. null se non indicato.
                  validFrom:
                    type: string
                    examples:
                      - '2024-01-15'
                    format: date
                    description: >-
                      Validità del collegamento. validTo è null finché il
                      collegamento è attivo.
                  validTo:
                    type:
                      - string
                      - 'null'
                    format: date
                    description: >-
                      Validità del collegamento. validTo è null finché il
                      collegamento è attivo.
                  createdAt:
                    type: string
                    examples:
                      - '2024-01-15T17:20:47Z'
                    format: date-time
                    description: Ora di creazione.
              examples:
                Example 1:
                  value:
                    id: 4584b476-ccc6-4e98-be40-0c5082748e35
                    companyId: 7c9e6679-7425-40de-944b-e07fc1f90ae7
                    personId: c1e384f5-ae1c-475e-9e64-a0abe533a96f
                    ownershipPercentage: 55.5
                    controlRole: null
                    validFrom: '2024-01-15'
                    validTo: null
                    createdAt: '2024-01-15T17:20:47Z'
        '400':
          description: >-
            Richiesta non valida. VALIDATION_ERROR: un campo, un header, un
            parametro di percorso o di query è mancante, sconosciuto o non
            valido. details[] elenca il campo e il problema.
          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 - VALIDATION_ERROR:
                  value:
                    type: about:blank
                    title: Validation error
                    status: 400
                    detail: >-
                      A field, header, path or query parameter is missing,
                      unknown or invalid. details[] lists field and issue.
                    instance: >-
                      /api/entity/v1/entities/7c9e6679-7425-40de-944b-e07fc1f90ae7/ubos/4584b476-ccc6-4e98-be40-0c5082748e35
                    code: VALIDATION_ERROR
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details:
                      - field: externalId
                        issue: REQUIRED
        '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: []
        '422':
          description: >-
            Entità non elaborabile. INVALID_PERCENTAGE: ownershipPercentage è al
            di fuori dell'intervallo da 0 a 100 o ha più di due decimali.
            INVALID_CONTROL_ROLE: controlRole non è uno dei codici di ruolo
            elencati in “Collegare un UBO”. I codici distinguono tra maiuscole e
            minuscole: director restituisce questo errore.
          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 - INVALID_PERCENTAGE:
                  value:
                    type: about:blank
                    title: Unprocessable entity
                    status: 422
                    detail: >-
                      ownershipPercentage is outside 0 to 100 or has more than
                      two decimals.
                    instance: >-
                      /api/entity/v1/entities/7c9e6679-7425-40de-944b-e07fc1f90ae7/ubos/4584b476-ccc6-4e98-be40-0c5082748e35
                    code: INVALID_PERCENTAGE
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
                Example 2 - INVALID_CONTROL_ROLE:
                  value:
                    type: about:blank
                    title: Unprocessable entity
                    status: 422
                    detail: >-
                      controlRole is not one of the role codes listed in Link a
                      UBO. Codes are case-sensitive: director returns this
                      error.
                    instance: >-
                      /api/entity/v1/entities/7c9e6679-7425-40de-944b-e07fc1f90ae7/ubos/4584b476-ccc6-4e98-be40-0c5082748e35
                    code: INVALID_CONTROL_ROLE
                    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.