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

# 列出 KYB 提取相关方 API

> 通过 Didit 读取 KYB 会话中上传证件所载明的股东、董事及股权比例。



## OpenAPI

````yaml zh/openapi-25.json GET /v3/session/{sessionId}/kyb/extracted-parties/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 身份证件验证 API。使用 x-api-key 请求头进行身份验证。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/session/{sessionId}/kyb/extracted-parties/:
    get:
      tags:
        - Sessions
      summary: 列出上传证件中所提及的当事方
      description: >-
        返回上传到此 KYB 会话的证件中所提及的股东和董事，按人合并并归属于提及他们的证件。将他们展示给您的申请人以进行确认，然后使用参与方草稿
        endpoint 进行申报。范围值仍保持范围格式：`ownership_percent.text` 保留原样的数值文本，而 `min` /
        `max` 保留从中读取的数字。此处没有人会被标记为
        UBO；该判定是在提交参与方时，根据工作流的角色设置和股权结构阈值来决定的。相同的列表也包含在会话决策中的
        `document_verifications[].extracted_parties` 内。需要 `read:businesses` 或
        `read:sessions`。
      operationId: get_v3_session_kyb_extracted_parties
      parameters:
        - name: sessionId
          in: path
          required: true
          description: 企业验证（KYB）会话的 UUID。它必须属于 API 密钥所属的应用。
          schema:
            type: string
            format: uuid
            example: 33333333-4444-5555-6666-777777777777
        - name: node_id
          in: query
          required: false
          description: KYB 步骤的工作流节点。仅在工作流具有多个 KYB 节点时需要；默认情况下，Didit 会使用会话自身的节点。
          schema:
            type: string
      responses:
        '200':
          description: 当前证件中注明的当事方。
          content:
            application/json:
              schema:
                type: object
                required:
                  - parties
                  - document_count
                properties:
                  parties:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        entity_type:
                          type: string
                          enum:
                            - person
                            - company
                        first_name:
                          type: string
                          nullable: true
                        last_name:
                          type: string
                          nullable: true
                        appointment_date:
                          type: string
                          nullable: true
                        designation:
                          type: string
                          nullable: true
                        roles:
                          type: array
                          items:
                            type: object
                            properties:
                              role:
                                type: string
                                enum:
                                  - director
                                  - non_executive_director
                                  - secretary
                                  - chairman
                                  - ubo
                                  - shareholder
                                  - representative
                                  - founder
                                  - legal_advisor
                                  - authorized_signatory
                                  - trustee
                                  - beneficiary
                                  - settlor
                                  - protector
                                  - company_officer
                                  - investor
                                  - other
                              ownership_percent:
                                type: object
                                properties:
                                  text:
                                    type: string
                                    nullable: true
                                    description: >-
                                      文件上明确注明的持股比例数值，例如 `25-50%`、`>50%` 或 `NO
                                      EXHIBE`。
                                  min:
                                    type: number
                                    nullable: true
                                    description: 从 `text` 中读取的较小数字；未说明时为 null。
                                  max:
                                    type: number
                                    nullable: true
                                    description: 从 `text` 中读取的数值上限；当未注明时为 null。
                        documents:
                          type: array
                          description: 提及该参与方的已上传证件。
                          items:
                            type: object
                            properties:
                              document_uuid:
                                type: string
                                format: uuid
                              document_type:
                                type: string
                                nullable: true
                              document_subtype:
                                type: string
                                nullable: true
                              original_filename:
                                type: string
                                nullable: true
                              status:
                                type: string
                                nullable: true
                    description: 上传证件中提及的股东和董事，按人合并。此处不会将任何人标记为 UBO：该标记在提交各方信息时确定。
                  document_count:
                    type: integer
                    description: 读取该列表所来源的已上传证件数量。
                  node_id:
                    type: string
                    nullable: true
              example:
                parties:
                  - name: Ana Lopez
                    entity_type: person
                    first_name: Ana
                    last_name: Lopez
                    appointment_date: null
                    designation: Administrador unico
                    roles:
                      - role: shareholder
                        ownership_percent:
                          text: 60%
                          min: 60
                          max: 60
                    documents:
                      - document_uuid: 0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41
                        document_type: OWNERSHIP_STRUCTURE
                        document_subtype: ARTICLES_OF_INCORPORATION
                        original_filename: acta_constitutiva.pdf
                        status: Approved
                document_count: 1
                node_id: node_kyb_documents
        '401':
          description: 作用域 API 密钥已过期。这是唯一返回 `401` 的情况：缺失、无效或已吊销的密钥将返回 `403`。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 便于人类阅读的错误消息。
              examples:
                Expired key:
                  summary: 密钥的到期日期已过
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            身份验证或授权失败。缺少密钥，以及属于其他应用的密钥、缺少该 endpoint 所需权限的限定作用域密钥和来自该密钥 IP
            允许名单之外的请求均返回 `403`；错误、已撤销或已过期的密钥返回 `401`。可通过 `detail` 区分它们。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 便于人类阅读的错误消息。
              examples:
                Missing or invalid credentials:
                  summary: 缺少 x-api-key 请求头，或该密钥验证失败
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Other application:
                  summary: 属于与该会话不同应用的有效密钥
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without decisions write:
                  summary: '作用域密钥缺少 decisions: write 权限'
                  value:
                    detail: This API key has no write access to decisions.
                IP not allowed:
                  summary: 来自密钥 IP 白名单之外的请求
                  value:
                    detail: This API key can't be used from this IP address.
        '404':
          description: 会话不存在、已被删除、属于另一个应用或超出了限定作用域密钥的限制；无法通过 detail 区分具体情况。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 便于人类阅读的错误消息。
              example:
                detail: Session not found.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.list_kyb_extracted_parties(
                "33333333-4444-5555-6666-777777777777",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const result = await
            didit.sessions.listKybExtractedParties("33333333-4444-5555-6666-777777777777");

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListKYBExtractedParties(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsListKYBExtractedPartiesParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().listKybExtractedParties("33333333-4444-5555-6666-777777777777");

            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $result =
            $didit->sessions->listKybExtractedParties('33333333-4444-5555-6666-777777777777');

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result =
            didit.sessions.list_kyb_extracted_parties("33333333-4444-5555-6666-777777777777")

            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.Sessions.ListKybExtractedPartiesAsync("33333333-4444-5555-6666-777777777777");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

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