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

# Update one ownership edge in the KYB graph

> Change the roles or the share on an existing edge; endpoints are fixed.



## OpenAPI

````yaml /openapi.json patch /api/v1/kyb/b2b/kyb/relationships/{relationship_id}
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers: []
security: []
paths:
  /api/v1/kyb/b2b/kyb/relationships/{relationship_id}:
    patch:
      tags:
        - B2B
        - kyb
      summary: Update one ownership edge in the KYB graph
      description: Change the roles or the share on an existing edge; endpoints are fixed.
      operationId: >-
        update_kyb_relationship_package_alias_api_v1_kyb_b2b_kyb_relationships__relationship_id__patch
      parameters:
        - name: relationship_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Relationship Id
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntityRelationshipDraftUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/EntityRelationshipDraftData'
                  - $ref: '#/components/schemas/KybPendingShareholderData'
                title: >-
                  Response Update Kyb Relationship Package Alias Api V1 Kyb B2B
                  Kyb Relationships  Relationship Id  Patch
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    EntityRelationshipDraftUpdate:
      properties:
        ownershipPercentage:
          anyOf:
            - type: number
              maximum: 100
              exclusiveMinimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Ownershippercentage
        hasControl:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hascontrol
        isDirector:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isdirector
        isSigner:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Issigner
        title:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Title
          description: Office held in the target company, for example 'Director'.
      type: object
      title: EntityRelationshipDraftUpdate
      description: Editable relationship terms; endpoints and consent status stay fixed.
    EntityRelationshipDraftData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        sourceEntityId:
          type: string
          format: uuid
          title: Sourceentityid
        targetEntityId:
          type: string
          format: uuid
          title: Targetentityid
        ownershipPercentage:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Ownershippercentage
        hasControl:
          type: boolean
          title: Hascontrol
        isDirector:
          type: boolean
          title: Isdirector
        isSigner:
          type: boolean
          title: Issigner
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        status:
          $ref: '#/components/schemas/EntityRelationshipStatus'
          default: active
        verifications:
          items:
            $ref: '#/components/schemas/EntityProviderVerificationData'
          type: array
          title: Verifications
      type: object
      required:
        - id
        - sourceEntityId
        - targetEntityId
        - hasControl
        - isDirector
        - isSigner
      title: EntityRelationshipDraftData
    KybPendingShareholderData:
      properties:
        relationshipId:
          type: string
          format: uuid
          title: Relationshipid
        email:
          type: string
          format: email
          title: Email
        ownershipPercentage:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Ownershippercentage
        hasControl:
          type: boolean
          title: Hascontrol
        isDirector:
          type: boolean
          title: Isdirector
        isSigner:
          type: boolean
          title: Issigner
        status:
          type: string
          const: pending
          title: Status
      type: object
      required:
        - relationshipId
        - email
        - hasControl
        - isDirector
        - isSigner
        - status
      title: KybPendingShareholderData
      description: Editable pending owner card without any invited entity profile fields.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EntityRelationshipStatus:
      type: string
      enum:
        - pending
        - active
        - revoked
      title: EntityRelationshipStatus
      description: Consent state for a KYB ownership or authority relationship.
    EntityProviderVerificationData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        provider:
          $ref: '#/components/schemas/FiatProvider'
        externalId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalid
        status:
          type: string
          title: Status
        kycLink:
          anyOf:
            - type: string
            - type: 'null'
          title: Kyclink
        kycLinkState:
          anyOf:
            - type: string
            - type: 'null'
          title: Kyclinkstate
        kycLinkExpiresAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Kyclinkexpiresat
      type: object
      required:
        - provider
        - status
      title: EntityProviderVerificationData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    FiatProvider:
      type: string
      enum:
        - swipelux
        - align
        - dakota
        - mcp
        - wirex
        - conduit_fiat
        - conduit_crypto
        - due
      title: FiatProvider
      description: Supported fiat payment providers.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````