> ## 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：ブロック・フラグ設定

> Didit の企業（KYB）をブロック、フラグ付け、または有効化します。ステータスは今後のKYBセッションと取引スクリーニングに反映されます。企業管理は呼び出しごとの従量課金です。



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



      
      

\<pre>

\`Goal: Flip ONLY the lifecycle status of a Didit Business (KYB) entity. Use the full PATCH /v3/businesses/{vendor_data}/ when you also need to touch other fields.

Endpoint: PATCH https://verification.didit.me/v3/businesses/{vendor_data}/update-status/
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:
\- status (enum, REQUIRED) — "ACTIVE" | "FLAGGED" | "BLOCKED" (VendorBusinessStatusChoices, NOT the session enum).
\- 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 the status actually changes. Webhooks do not carry it.

Status semantics:
\- ACTIVE  → normal. New KYB sessions allowed for this vendor_data.
\- FLAGGED → still accepted, highlighted in Console for manual review; filterable with ?status=FLAGGED.
\- BLOCKED → terminal. Adds vendor_data to the system blocklist. Subsequent KYB session creations for the same identifier are rejected. Flipping back to ACTIVE/FLAGGED removes the blocklist entry automatically.

curl:
curl -X PATCH 'https://verification.didit.me/v3/businesses/company-123/update-status/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"status": "BLOCKED", "reason": "Registry shows the company dissolved"}'

Response 200: full updated BusinessDetailItem (same shape as GET /v3/businesses/{vendor_data}/). See /reference/data-models.

Side effects:
\- Toggles the system blocklist entry when entering/leaving BLOCKED.
\- Writes one status-change entry to the company's activity (actor = API key identity), with reason as its comment.
\- Idempotent — re-sending the same status is a no-op (no extra audit row, no extra blocklist toggle).

Failure modes:
\- 400 — validation:
\{ "status": "This field is required." }
\{ "status": "Invalid status. Valid options are: ACTIVE, FLAGGED, BLOCKED" }
\{ "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 (or deleted). { "detail": "Not found." }
\- 429 — rate-limited.

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)のステータスを`ACTIVE`、`FLAGGED`、`BLOCKED`の間で変更します。ステートマシンの全体像は[エンティティのライフサイクル](https://docs.didit.me/ja/entities/lifecycle.md)を参照してください。## 使用するタイミング- 制裁対象の企業や不正が確認された企業を**ブロック**する。
- 手動レビュー待ちの企業に**フラグを立てる**。
- 是正後に**ブロックを解除**する。
- 自社のコンプライアンスシステムからの**外部シグナルを反映**する。## 注意事項- 有効な値は`ACTIVE`、`FLAGGED`、`BLOCKED`です。
- 任意の`reason`(最大1000文字)を渡すと、ステータスを変更した理由を記録できます。
  Diditはこれを、Business Consoleにおけるその企業の**Activity**のステータス変更エントリに保存します。
  記録されるのは、ステータスが実際に変更された場合のみです。
- `BLOCKED`の企業では、新しい法人確認 (KYB) セッションがすべて自動的に却下され、新しい取引も、その企業が取引相手となる場合を含めてすべて自動的に却下されます。
- `previous_status`と`status`を含む`business.status.updated`を送信します。
  このWebhookには`reason`は含まれません。## 適用内容| ステータス | 新規の法人確認 (KYB) セッション | この企業が関係する取引 |
| - | - | - |
| `ACTIVE` | 通常のフロー | 通常のフロー |
| `FLAGGED` | `IN_REVIEW`に移行する | ルールにより自動的にエスカレーションされる場合がある |
| `BLOCKED` | 自動的に却下 | 自動的に却下 |## 権限プライマリシークレットとフルアクセスの[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/lifecycle.md)
- [企業のブロックリスト](https://docs.didit.me/ja/entities/businesses/blocklist.md)
- [エンティティのWebhook](https://docs.didit.me/ja/entities/webhooks.md)


## OpenAPI

````yaml ja/openapi-25.json PATCH /v3/businesses/{vendor_data}/update-status/
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}/update-status/:
    patch:
      tags:
        - Businesses
      summary: 企業ステータスを更新
      description: >-
        企業のライフサイクル`status`のみを切り替えます：`ACTIVE`、`FLAGGED`、`BLOCKED`のいずれかです（セッションのステータスではありません）。`BLOCKED`にすると`vendor_data`がシステムのブロックリストに追加され、`BLOCKED`から別のステータスに変更するとそのエントリーは削除されます。各変更は、任意の`reason`とともに企業のアクティビティに記録されます。現在と同じステータスを送信しても何も変更されず、`reason`も記録されません。`business.status.updated`のWebhookには`reason`は含まれません。
      operationId: update_business_status
      parameters:
        - name: vendor_data
          in: path
          required: true
          schema:
            type: string
          description: 企業に対するお客様独自の識別子です（自由形式の文字列で、UUIDではありません）。
          example: company-123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/EntityStatusUpdateRequest'
                - type: object
                  properties:
                    reason:
                      type: string
                      nullable: true
                      maxLength: 1000
                      description: >-
                        ステータスが変更された理由。Business
                        Consoleの企業の**Activity**にあるステータス変更エントリに記録されます。記録されるのは、ステータスが実際に変わった場合のみです。Webhookには含まれません。
            examples:
              Flag:
                summary: 企業にレビュー用のフラグを付ける
                value:
                  status: FLAGGED
              Block:
                summary: 企業をブロックします（システムのブロックリストに追加）
                value:
                  status: BLOCKED
              Reactivate:
                summary: 企業を再有効化する
                value:
                  status: ACTIVE
              Block with reason:
                summary: 企業をブロックし、その理由を記録します
                value:
                  status: BLOCKED
                  reason: Registry shows the company dissolved
      responses:
        '200':
          description: 企業ステータスを更新しました。企業の完全なレコードが返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessDetailItem'
              examples:
                Blocked:
                  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: BLOCKED
                    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'
        '400':
          description: '`status`がないか無効です。または、`reason`が1000文字を超えています。'
          content:
            application/json:
              examples:
                Missing status:
                  value:
                    status:
                      - This field is required.
                Bad status:
                  value:
                    status:
                      - >-
                        Invalid status. Valid options are: ACTIVE, FLAGGED,
                        BLOCKED
                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/update-status/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"status": "BLOCKED"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.businesses.update_status(
                "company-123",
                status="FLAGGED",
            )
            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.updateStatus("company-123", {
              status: "FLAGGED",
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.UpdateStatus(ctx, \"company-123\", didit.BusinessesUpdateStatusParams{\n\tStatus: \"FLAGGED\",\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.BusinessesUpdateStatusParams;

            import me.didit.types.EntityStatusUpdateRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result = client.businesses().updateStatus("company-123",
            BusinessesUpdateStatusParams.builder()
                    .status(EntityStatusUpdateRequest.Status.of("FLAGGED"))
                    .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->updateStatus('company-123', [
                'status' => 'FLAGGED',
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.businesses.update_status(
              "company-123",
              status: "FLAGGED"
            )
            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.UpdateStatusAsync("company-123", new
            BusinessesUpdateStatusParams

            {
                Status = "FLAGGED",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    EntityStatusUpdateRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - ACTIVE
            - FLAGGED
            - BLOCKED
          description: 新しいライフサイクルステータス。`BLOCKED`を指定すると、`vendor_data`もシステムのブロックリストに追加されます。
    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.