> ## 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のCancel Feature Override APIは、ユーザーのフロー完了を待っているステップステータスのオーバーライドを取り消します。オーバーライドは適用されず、ステップは現在のステータスのままです。



機能オーバーライドのキャンセル用プロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Cancel a check (feature) status override on a Didit session that still waits for the person to finish the flow, so it never applies.

Endpoint:
POST https://verification.didit.me/v3/session/{session_id}/features/overrides/{override_id}/cancel/

Authentication:
x-api-key (client API key) or a user-auth token. Privilege: write:sessions. A scoped API key needs write access to decisions.

Path parameters:
\- session_id (UUID): KYC or KYB; Didit resolves it against both session types.
\- override_id (UUID): the id of the override, from the "override" object returned by PATCH /v3/session/{session_id}/features/{node_id}/update-status/ or from GET /v3/session/{session_id}/features/overrides/.

Request body: none.

Only an override whose state is "pending_until_flow_finishes" can be cancelled.

Response (200): the override, with state "cancelled", cancelled_at set and cancel_reason "cancelled_by_reviewer".

Side effects:
\- The check keeps its current status.
\- The cancellation is recorded in the session's activity as FEATURE_OVERRIDE_CANCELLED.
\- No webhook is sent.

curl example:
curl -X POST https://verification.didit.me/v3/session/<SESSION_ID>/features/overrides/<OVERRIDE_ID>/cancel/ \
-H "x-api-key: <API_KEY>"

Failure modes:
\- 401: the scoped API key has expired.
\- 403: missing credentials (a wrong, revoked or expired key gets 401), the caller lacks write:sessions, a scoped key lacks decisions write, or the session belongs to another application ({ "detail": "You do not have permission to perform this action." }).
\- 404: { "detail": "Not found." } when no session with this session_id exists, or { "detail": "Override not found." } when the session has no override with this override_id.
\- 409: { "detail": "This override is no longer pending: it already applied or was cancelled.", "code": "feature_override_not_pending" }.

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

\</pre>



      
      

貼り付け先

本人がまだフローの途中にいる間に`defer_until_flow_finishes: true`を指定してステップをオーバーライドすると、そのオーバーライドは待機状態となり、フローが終了した時点で適用されます。
適用する必要がなくなった場合は、ここでキャンセルしてください。チェックのステータスは現在のまま維持されます。
キャンセルはセッションのアクティビティに`FEATURE_OVERRIDE_CANCELLED`として記録され、Webhookは送信されません。
レスポンスは、`state: cancelled`と`cancel_reason: cancelled_by_reviewer`を持つオーバーライドです。## オーバーライドIDを確認する[機能ステータスの更新](https://docs.didit.me/ja/sessions-api/update-feature-status.md)から返される`override`オブジェクトの`id`を使用するか、[機能オーバーライドの一覧取得](https://docs.didit.me/ja/sessions-api/list-feature-overrides.md)でセッションのオーバーライドを一覧表示し、`state`が`pending_until_flow_finishes`のものを選択してください。## キャンセルに失敗する場合すでに適用された、またはキャンセルされたオーバーライドをキャンセルしようとすると、コード`feature_override_not_pending`とともに`409`が返されます。
オーバーライドの適用後にチェックを変更するには、代わりに新しい[機能ステータスの更新](https://docs.didit.me/ja/sessions-api/update-feature-status.md)リクエストを送信してください。## 関連項目- [機能ステータスの更新](https://docs.didit.me/ja/sessions-api/update-feature-status.md): 1つのステップのステータスを、即時またはフロー終了時にオーバーライドします。
- [機能オーバーライドの一覧取得](https://docs.didit.me/ja/sessions-api/list-feature-overrides.md): セッションのすべてのオーバーライドとその状態を取得します。


## OpenAPI

````yaml ja/openapi-25.json POST /v3/session/{sessionId}/features/overrides/{overrideId}/cancel/
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}/features/overrides/{overrideId}/cancel/:
    post:
      tags:
        - Sessions
      summary: フローの完了を待っているチェックのオーバーライドをキャンセル
      description: >-
        まだ`pending_until_flow_finishes`の状態にある機能(ステップ)ステータスのオーバーライドをキャンセルし、適用されないようにします。チェックのステータスはそのまま維持され、キャンセルはセッションのアクティビティに`FEATURE_OVERRIDE_CANCELLED`として記録されます。Webhookは送信されません。レスポンスは`state:
        cancelled`および`cancel_reason: cancelled_by_reviewer`を持つオーバーライドです。


        すでに適用済みまたはキャンセル済みのオーバーライドの場合は、コード`feature_override_not_pending`とともに`409`が返されます。オーバーライドIDは`GET
        /v3/session/{sessionId}/features/overrides/`、または機能ステータスの更新で返される`override`で確認できます。


        `write:sessions`権限が必要です。スコープ付きのAPIキーには判定への書き込みアクセスが必要です。
      operationId: post_v3_session_feature_override_cancel
      parameters:
        - in: path
          name: sessionId
          required: true
          description: 検証セッションのUUID。ユーザー(KYC)と企業(KYB)の両方のセッションIDを受け付けます。
          schema:
            type: string
            format: uuid
            example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        - in: path
          name: overrideId
          required: true
          description: 取り消すオーバーライドの`id`です。
          schema:
            type: string
            format: uuid
            example: 9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3
      responses:
        '200':
          description: オーバーライドはキャンセルされ、今後適用されることはありません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureStatusOverride'
              examples:
                Cancelled:
                  summary: キャンセルされたオーバーライド
                  value:
                    id: 9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3
                    node_id: feature_liveness_1
                    feature_type: ''
                    feature_model: Face
                    previous_status: Declined
                    new_status: Approved
                    state: cancelled
                    forced: false
                    reason: Liveness retried with a reviewer present.
                    requested_by:
                      email: reviewer@example.com
                      name: Alex Reviewer
                      type: CONSOLE_USER
                    requested_at: '2026-10-13T09:15:00Z'
                    applied_at: null
                    cancelled_at: '2026-10-13T09:20:00Z'
                    cancel_reason: cancelled_by_reviewer
        '401':
          description: スコープ付きAPIキーの有効期限が切れています。
          content:
            application/json:
              examples:
                Expired API Key:
                  summary: 有効期限を過ぎたスコープ付きAPIキー
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            認証情報がない、呼び出し元に`write:sessions`権限がない、スコープ付きAPIキーにこのエンドポイントに必要なアクセス権がない、または`session_id`が別のアプリケーションに属しています。
          content:
            application/json:
              examples:
                Invalid Credentials:
                  summary: x-api-keyがないか無効です
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Missing Privilege:
                  summary: 呼び出し元にwrite:sessions権限がありません
                  value:
                    detail: You do not have permission to perform this action.
                Scoped Key Without Access:
                  summary: このアクセス権を持たないスコープ付きAPIキー
                  value:
                    detail: This API key has no write access to decisions.
        '404':
          description: >-
            この`session_id`を持つKYCまたはKYBセッションが存在しないか、セッションにこの`overrideId`を持つオーバーライドがありません。
          content:
            application/json:
              examples:
                Not Found:
                  summary: 不明なsession_id
                  value:
                    detail: Not found.
                Override Not Found:
                  summary: このセッションにこのidのオーバーライドはありません
                  value:
                    detail: Override not found.
        '409':
          description: オーバーライドはすでに適用済みか、キャンセルされています。
          content:
            application/json:
              examples:
                Not Pending:
                  summary: キャンセルできるのは待機中のオーバーライドのみです
                  value:
                    detail: >-
                      This override is no longer pending: it already applied or
                      was cancelled.
                    code: feature_override_not_pending
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST \
              https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/features/overrides/9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3/cancel/ \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.cancel_feature_override(
                "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3",
            )
            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.cancelFeatureOverride(
              "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3",
            );
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.CancelFeatureOverride(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\")\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().cancelFeatureOverride("3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3");

            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->cancelFeatureOverride('3fa85f64-5717-4562-b3fc-2c963f66afa6',
            '9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3');

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

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

            result = didit.sessions.cancel_feature_override(
              "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3"
            )
            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.CancelFeatureOverrideAsync("3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    FeatureStatusOverride:
      type: object
      description: >-
        `PATCH
        /v3/session/{sessionId}/features/{nodeId}/update-status/`で行ったチェック（機能）ステータスの上書き1件です。何を変更するか、適用済みか、まだ本人がフローを完了するのを待っているか、誰がなぜ依頼したかを示します。
      required:
        - id
        - node_id
        - feature_type
        - feature_model
        - previous_status
        - new_status
        - state
        - forced
        - reason
        - requested_by
        - requested_at
        - applied_at
        - cancelled_at
        - cancel_reason
      properties:
        id:
          type: string
          format: uuid
          description: オーバーライドの識別子。キャンセル用エンドポイントに渡してください。
          example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
        node_id:
          type: string
          description: リクエストで指定されたワークフローのノード(ノードのないステップの場合は`default`)。
          example: feature_ocr_1
        feature_type:
          type: string
          description: リクエストで渡された`feature_type`です。何も渡されなかった場合は空文字列です。
          example: ''
        feature_model:
          type: string
          description: オーバーライドされたチェックの種類です。例：`KYC`、`Face`、`AML`、`GeolocationCheck`。
          example: KYC
        previous_status:
          type: string
          enum:
            - Not Finished
            - Approved
            - Declined
            - In Review
            - Resub Requested
          description: オーバーライドがリクエストされた時点のチェックのステータス。
          example: In Review
        new_status:
          type: string
          enum:
            - Approved
            - Declined
            - In Review
          description: オーバーライドが設定するステータス。
          example: Approved
        state:
          type: string
          enum:
            - applied
            - pending_until_flow_finishes
            - cancelled
          description: >-
            `applied`：チェックに新しいステータスが適用されています。`pending_until_flow_finishes`：上書きは待機し、本人がフローを完了した時点で適用されます。`cancelled`：待機したものの、適用されることはありませんでした（`cancel_reason`を参照）。
          example: applied
        forced:
          type: boolean
          description: 本人がまだフロー内にいる間にオーバーライドが即座に適用された場合は`true`です。
          example: false
        reason:
          type: string
          nullable: true
          description: リクエストとともに送信された`comment`、または`null`です。
          example: Document manually verified by compliance.
        requested_by:
          type: object
          nullable: true
          description: オーバーライドを要求した者です。不明な場合は`null`です。
          properties:
            email:
              type: string
              format: email
              nullable: true
              description: コンソールユーザーのメールアドレス。APIキーおよびシステムの場合は`null`。
              example: reviewer@example.com
            name:
              type: string
              nullable: true
              description: リクエスト者の表示名、または`null`です。
              example: Alex Reviewer
            type:
              type: string
              enum:
                - CONSOLE_USER
                - API_KEY
                - SYSTEM
              description: リクエストを行った主体：コンソールユーザー、APIキー、またはDidit自身。
              example: CONSOLE_USER
        requested_at:
          type: string
          format: date-time
          description: オーバーライドがリクエストされた日時。
          example: '2026-10-13T09:15:00Z'
        applied_at:
          type: string
          format: date-time
          nullable: true
          description: チェックが新しいステータスになった日時。待機中、またはキャンセルされた後は`null`。
          example: '2026-10-13T09:15:00Z'
        cancelled_at:
          type: string
          format: date-time
          nullable: true
          description: 待機中のオーバーライドがキャンセルされた日時、または`null`。
          example: null
        cancel_reason:
          type: string
          nullable: true
          enum:
            - cancelled_by_reviewer
            - replaced
            - check_changed
            - session_closed
            - null
          description: >-
            待機中のオーバーライドが適用されなかった理由、または`null`。`cancelled_by_reviewer`：キャンセル用エンドポイントでキャンセルされました。`replaced`：同じチェックに対する新しいオーバーライドに置き換えられました。`check_changed`：本人がフローを完了する前にチェックをやり直しました。`session_closed`：本人がフローを完了する前に、セッションがフローを離れました（放棄、期限切れ、またはフロー途中での判定）。
          example: null
  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.