> ## 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：ベンダーKYBエンティティの更新

> Diditの企業（KYB）の変更可能なフィールド（表示名、メタデータ、タグ）を更新します。法人登記に由来する識別フィールドは変更できません。従量課金型のKYB管理です。



企業更新用プロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Goal: Partial-update a Didit Business (KYB) entity by vendor_data.

Endpoint: PATCH https://verification.didit.me/v3/businesses/{vendor_data}/
Auth header: x-api-key: <DIDIT_API_KEY>
Content-Type: application/json

Path param:
\- vendor_data (string, REQUIRED) — free-form string, NOT a UUID. URL-encode.

Request body (PARTIAL — only included fields are touched; counters and session history are left alone):
\- display_name (string, nullable)
\- legal_name (string, nullable)
\- registration_number (string, nullable)
\- country_code (string, nullable) — ISO 3166-1 alpha-2.
\- region (string, nullable) — ISO 3166-2.
\- status (enum) — "ACTIVE" | "FLAGGED" | "BLOCKED" (VendorBusinessStatusChoices). Setting "BLOCKED" auto-adds vendor_data to the system blocklist.
\- metadata (object, nullable) — REPLACES existing metadata wholesale; merge client-side if you only want to add keys.
\- reason (string, optional, max 1000): why the status changed. Recorded on the status-change entry in the company's Activity in the Business Console, only when this update actually changes status. Webhooks do not carry it.

curl:
curl -X PATCH 'https://verification.didit.me/v3/businesses/company-123/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"display_name": "Acme", "metadata": {"tier": "enterprise"}}'

Response 200: full updated BusinessDetailItem (same shape as GET). See /reference/data-models.

Side effects:
\- Every edit is recorded in the company's activity (actor derived from the API key): a status change with reason, and a profile update when display_name, legal_name, registration_number, country_code or metadata change.
\- last_activity_at bumped to now().
\- Re-sending an unchanged body is safe.

Failure modes:
\- 400 — validation. Common: { "status": ["Invalid status. Valid options are: ACTIVE, FLAGGED, BLOCKED"] }, { "metadata": ["Metadata must be a JSON object."] }
\{ "reason": ["Ensure this field has no more than 1000 characters."] }
\- 401 — missing/invalid x-api-key.
\- 403: a scoped API key without businesses write. { "detail": "This API key has no write access to companies." }
\- 404 — vendor_data not found.
\- 429 — rate-limited.

Notes:
\- vendor_data in the URL cannot be changed via this endpoint.
\- For status-only flips, prefer the dedicated PATCH /v3/businesses/{vendor_data}/update-status/.
\- Overriding registry-derived fields is allowed but flagged in the audit log.

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

\</pre>



      
      

貼り付け先

## 概要[企業エンティティ](https://docs.didit.me/ja/entities/businesses/overview.md)の変更可能なフィールドを更新します。法人登記の照会から取得されたフィールド(`legal_name`、`registration_number`、`country_code`)は、最初の法人認証 (KYB) セッションが承認済みになった後は読み取り専用になります。## 使用するタイミング- **名前を変更**: 社内向けの表示用に、より適切な`display_name`を設定します。
- **メタデータの更新**: 企業を社内のレベル間で移動する、社内メモを記録する、タグを変更する、といった用途に使います。
- **法人登記データの上書き**(注意して使用): 上書きは受け付けられますが、[監査ログ](https://docs.didit.me/ja/console/audit-logs.md)でフラグが付けられます。## 注意事項- URL内の`vendor_data`は、このエンドポイントでは変更できません。
- `changed_fields`配列を含む`business.data.updated` Webhookを送信します。
- すべての編集は、Business Consoleの企業の**Activity**に記録されます。
  `status`の変更は指定されている場合は`reason`（最大1000文字）とともに記録され、`display_name`、`legal_name`、`registration_number`、`country_code`または`metadata`の変更はプロフィールの更新として記録されます。
  `business.status.updated` Webhookには`reason`は含まれません。## 権限プライマリシークレットとフルアクセスの[APIキー](https://docs.didit.me/ja/console/api-keys.md)は、常にこのエンドポイントを呼び出せます。
カスタムアクセスのキーには、**Companies**(`businesses`)の書き込み権限が必要です。
一部のワークフローまたは承認済みセッションに制限されたキーは、このエンドポイントにアクセスできません。Consoleの[役割と権限](https://docs.didit.me/ja/console/roles-permissions.md)は、チームメンバーがConsoleで実行できる操作を決めるものです。
APIキーによるリクエストでは評価されません。## 関連情報- [企業の操作](https://docs.didit.me/ja/entities/businesses/operations.md)
- [データモデル](https://docs.didit.me/ja/entities/businesses/data-model.md)
- [ステータスの更新](https://docs.didit.me/ja/management-api/businesses/update-status.md)


## OpenAPI

````yaml ja/openapi-25.json PATCH /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}/:
    patch:
      tags:
        - Businesses
      summary: 企業を更新
      description: >-
        企業を部分更新します。対象は`display_name`、`legal_name`、`registration_number`、`country_code`、`status`、`metadata`です。`metadata`は全体が置き換えられます。`status`を`BLOCKED`に設定すると`vendor_data`がシステムのブロックリストに追加され、`BLOCKED`から変更するとそのエントリーが削除されます。すべての編集は企業のアクティビティに記録されます。ステータス変更は任意の`reason`とともに記録され、`display_name`、`legal_name`、`registration_number`、`country_code`、`metadata`の変更はプロファイル更新として記録されます。
      operationId: update_business
      parameters:
        - name: vendor_data
          in: path
          required: true
          schema:
            type: string
          description: 企業に対するお客様独自の識別子です（自由形式の文字列で、UUIDではありません）。
          example: company-123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: 部分更新ボディ。変更したいフィールドのみを指定してください。
              properties:
                display_name:
                  type: string
                  nullable: true
                  description: コンソールに表示されるわかりやすい表示名（UI表示では`legal_name`より優先されます）。
                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`）。'
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - FLAGGED
                    - BLOCKED
                  description: >-
                    企業のライフサイクルステータス。`BLOCKED`を設定すると、`vendor_data`が自動的にシステムのブロックリストに追加されます。`BLOCKED`から別のステータスに変更すると、そのブロックリストのエントリは削除されます。
                metadata:
                  type: object
                  nullable: true
                  description: >-
                    企業に付与する任意のJSONオブジェクト。更新時には既存のメタデータを**完全に置き換えます**。キーを追加したいだけの場合は、クライアント側でマージしてください。
                reason:
                  type: string
                  nullable: true
                  maxLength: 1000
                  description: >-
                    ステータスが変更された理由。Business
                    Consoleの企業の**Activity**にあるステータス変更エントリに記録されます。記録されるのは、ステータスが実際に変わった場合のみです。Webhookには含まれません。
            examples:
              Update name:
                summary: 表示名を更新
                value:
                  display_name: Acme Corp
              Flag for review:
                summary: ステータスを切り替える
                value:
                  status: FLAGGED
              Add metadata:
                summary: メタデータJSONを置き換え
                value:
                  metadata:
                    industry: fintech
                    risk_level: low
              Fix registry data:
                summary: 抽出されたフィールドを修正
                value:
                  legal_name: Acme Trading International Ltd
                  registration_number: '12345678'
                  country_code: GB
              Flag with reason:
                summary: 企業にフラグを付け、理由を記録する
                value:
                  status: FLAGGED
                  reason: Ownership structure under review
      responses:
        '200':
          description: 企業を更新しました。更新後の企業の完全なレコードが返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessDetailItem'
              examples:
                Updated:
                  value:
                    didit_internal_id: a1b2c3d4-e5f6-4890-abcd-ef1234567890
                    vendor_data: company-123
                    display_name: Acme Corp
                    legal_name: Acme Trading Ltd
                    registration_number: '12345678'
                    country_code: GB
                    effective_name: Acme Corp
                    status: FLAGGED
                    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
                      risk_level: low
                    updated_at: '2026-03-15T10:30:00Z'
        '400':
          description: >-
            リクエストボディが無効です。主な原因は、不明な`status`、不正な形式の`metadata`、または1000文字を超える`reason`です。
          content:
            application/json:
              examples:
                Bad status:
                  value:
                    status:
                      - >-
                        Invalid status. Valid options are: ACTIVE, FLAGGED,
                        BLOCKED
                Bad metadata:
                  value:
                    metadata:
                      - Metadata must be a JSON object.
                Reason too long:
                  value:
                    reason:
                      - Ensure this field has no more than 1000 characters.
        '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 PATCH
            'https://verification.didit.me/v3/businesses/company-123/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"display_name": "Acme Corp", "status": "FLAGGED"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.businesses.update(
                "company-123",
                display_name="Acme Corp",
            )
            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.update("company-123", {
              display_name: "Acme Corp",
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.Update(ctx, \"company-123\", didit.BusinessesUpdateParams{\n\tDisplayName: didit.String(\"Acme Corp\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.BusinessesUpdateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result = client.businesses().update("company-123",
            BusinessesUpdateParams.builder()
                    .displayName("Acme Corp")
                    .build());
            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->update('company-123', [
                'display_name' => 'Acme Corp',
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.businesses.update(
              "company-123",
              display_name: "Acme Corp"
            )
            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.UpdateAsync("company-123", new
            BusinessesUpdateParams

            {
                DisplayName = "Acme Corp",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    BusinessDetailItem:
      type: object
      description: 企業の完全な詳細。BusinessListItemにmetadataと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のDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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