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

# 获取企业 API：通过 vendor_data 查询 KYB 企业实体

> 通过 vendor_data 获取单个 Didit 企业（KYB）信息，包括注册表衍生的身份、状态、汇总的 KYB 计数器和功能映射。按次计费。



获取企业信息提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Goal: Fetch a single Didit Business (KYB) entity by your own vendor_data.

Endpoint: GET https://verification.didit.me/v3/businesses/{vendor_data}/
Auth header: x-api-key: <DIDIT_API_KEY>

Path param:
\- vendor_data (string, REQUIRED) — your unique identifier. Free-form string, NOT a UUID. Matching is case-insensitive after normalisation. URL-encode it.

curl:
curl -X GET 'https://verification.didit.me/v3/businesses/company-123/' \
-H 'x-api-key: YOUR_API_KEY'

Response 200 (BusinessDetailItem) — extends the list shape with metadata, comments (activity log), and updated_at. Key fields:
\- didit_internal_id (UUID — Didit's stable internal identifier)
\- vendor_data (string)
\- display_name, legal_name, registration_number, country_code, region, effective_name
\- status: "ACTIVE" | "FLAGGED" | "BLOCKED" (VendorBusinessStatusChoices)
\- session_count, approved_count, declined_count, in_review_count (aggregate counters)
\- features (map: KYB_REGISTRY, KYB_AML, KYB_DOCUMENTS, ... -> latest status)
\- metadata (arbitrary JSON you attached)
\- comments (chronological activity log)
\- tags, created_at, updated_at, last_activity_at
See /reference/data-models for the full schema.

Notes:
\- Aggregate counters update in real time as Business Verification (KYB) sessions reach terminal status.
\- Registry-derived fields reflect the latest approved KYB session's registry data.
\- For bulk lookups, prefer paging GET /v3/businesses/ and indexing locally on vendor_data.

Failure modes (envelope {"detail": "..."}):
\- 401 — missing/invalid x-api-key.
\- 403 — lacks read:businesses.
\- 404 — no business with that vendor_data in this application.
\- 429 — rate-limited.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.`

\</pre>



      
      

粘贴到

## 概览通过 `vendor_data` 返回单个[企业实体](https://docs.didit.me/zh/entities/businesses/overview.md)。## 适用场景- **查询**企业当前的验证状态。`features` 映射可一目了然地显示每项 KYB 功能的最新状态。
- 在您自己的管理后台中展示**详情视图**。
- 结合汇总计数器和功能状态进行**风险评分**。## 注意事项- URL 中的 `vendor_data` 区分大小写。
- 如果不存在具有该 `vendor_data` 的企业，则返回 `404`。
- 汇总计数器（`session_count`、`approved_count`、`declined_count`、`in_review_count`）会在企业验证（KYB）会话完成时实时更新。
- 源自公司登记的字段（`legal_name`、`registration_number`、`country_code`）反映最新已通过的企业验证（KYB）会话。## 权限角色必须授予 `read:businesses` 权限。## 相关内容- [企业概览](https://docs.didit.me/zh/entities/businesses/overview.md)
- [数据模型](https://docs.didit.me/zh/entities/businesses/data-model.md)
- [列出企业](https://docs.didit.me/zh/management-api/businesses/list.md)


## OpenAPI

````yaml zh/openapi-25.json GET /v3/businesses/{vendor_data}/
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/businesses/{vendor_data}/:
    get:
      tags:
        - Businesses
      summary: 获取企业
      description: >-
        通过 `vendor_data`（精确匹配）获取单个[企业](/entities/businesses)。向列表视图添加 `metadata`
        和 `updated_at`。已删除的企业返回 404。
      operationId: get_business
      parameters:
        - name: vendor_data
          in: path
          required: true
          schema:
            type: string
          description: 您对该企业的唯一标识符，为自由格式字符串（非 UUID），按发送的内容精确匹配。
          example: company-123
      responses:
        '200':
          description: 完整企业详情，包含元数据和聚合会话数据。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessDetailItem'
              examples:
                Active business:
                  value:
                    didit_internal_id: a1b2c3d4-e5f6-4890-abcd-ef1234567890
                    vendor_data: company-123
                    display_name: null
                    legal_name: Acme Trading Ltd
                    registration_number: '12345678'
                    country_code: GB
                    effective_name: Acme Trading Ltd
                    status: ACTIVE
                    session_count: 2
                    approved_count: 1
                    declined_count: 0
                    in_review_count: 1
                    features:
                      KYB: Approved
                    features_list:
                      - feature: KYB
                        status: Approved
                    last_session_at: '2026-03-15T10:30:00Z'
                    last_activity_at: '2026-03-15T10:30:00Z'
                    first_session_at: '2026-01-10T08:00:00Z'
                    tags:
                      - uuid: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
                        name: VIP
                        color: '#2567FF'
                    created_at: '2026-01-10T08:00:00Z'
                    metadata:
                      industry: fintech
                    updated_at: '2026-03-15T10:30:00Z'
        '403':
          description: >-
            缺少、无效或已撤销的 API 密钥，或者该密钥无法读取此应用的企业。缺少密钥返回 `403`；错误、已撤销或已过期的密钥返回
            `401`。
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: 该应用下不存在带有提供的 `vendor_data` 的（未删除）企业。
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Not found.
        '429':
          description: 超出速率限制；请退避并在 `Retry-After` 指定的间隔后重试。
          content:
            application/json:
              examples:
                Rate limited:
                  value:
                    detail: Request was throttled. Expected available in 30 seconds.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/businesses/company-123/' \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.businesses.retrieve(
                "company-123",
            )
            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.businesses.retrieve("company-123");
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.Retrieve(ctx, \"company-123\")\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.businesses().retrieve("company-123");
            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->businesses->retrieve('company-123');
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.businesses.retrieve("company-123")
            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.Businesses.RetrieveAsync("company-123");
            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    BusinessDetailItem:
      type: object
      description: 完整企业详情。在 BusinessListItem 基础上扩展了元数据和 updated_at。
      allOf:
        - $ref: '#/components/schemas/BusinessListItem'
        - type: object
          properties:
            metadata:
              type: object
              description: 您附加到此企业的自定义元数据 JSON。默认为 `{}`。
            updated_at:
              type: string
              format: date-time
    BusinessListItem:
      type: object
      description: 已验证的企业。
      properties:
        didit_internal_id:
          type: string
          format: uuid
          description: Didit 为此企业分配的稳定内部 UUID。
        vendor_data:
          type: string
          nullable: true
          description: 您对此企业的唯一标识符（创建会话时传入）。未提供供应商标识符时可为 null。
        display_name:
          type: string
          nullable: true
          description: 您设置的自定义显示名称
        legal_name:
          type: string
          nullable: true
          description: 来自登记处或手动输入的官方法定名称
        registration_number:
          type: string
          nullable: true
          description: 企业注册号或成立号
        country_code:
          type: string
          nullable: true
          description: 注册国家/地区（ISO 3166-1 alpha-2，例如 `GB`、`US`）。
        effective_name:
          type: string
          nullable: true
          description: 最佳可用名称：如果已设置则为 display_name，否则为 legal_name
        status:
          type: string
          enum:
            - ACTIVE
            - FLAGGED
            - BLOCKED
          description: >-
            企业记录的生命周期状态（并非会话状态）。`ACTIVE` 为默认值，`FLAGGED` 标记为需要人工关注，`BLOCKED` 会阻止该
            `vendor_data` 创建新会话。
        session_count:
          type: integer
          description: 该企业的验证会话总数
        approved_count:
          type: integer
          description: 已通过的会话数量
        declined_count:
          type: integer
          description: 已拒绝的会话数量
        in_review_count:
          type: integer
          description: 审核中的会话数量
        features:
          type: object
          description: >-
            该企业所有 KYB 会话的每项功能汇总状态。目前唯一的键为
            `KYB`（公司登记核验状态）。可选值：`Approved`、`Declined`、`In Review`、`Not
            Finished`、`Resub Requested`。
        features_list:
          type: array
          items:
            type: object
            properties:
              feature:
                type: string
              status:
                type: string
          description: 与 `features` 相同的数据，为 `{feature, status}` 对象的有序数组。
        last_session_at:
          type: string
          format: date-time
          nullable: true
          description: 最近一次会话的时间戳
        first_session_at:
          type: string
          format: date-time
          nullable: true
          description: 首次会话的时间戳
        last_activity_at:
          type: string
          format: date-time
          nullable: true
          description: 最近一次活动的时间戳（状态变更、会话更新等）
        tags:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
          description: 分配给该企业的标签
        created_at:
          type: string
          format: date-time
  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.