> ## 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، فلا يُطبَّق أبداً وتبقى الخطوة على حالتها الحالية.



موجّه إلغاء تجاوز الميزة
        نسخ الموجّه إلى الحافظة



      
      

\<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` من كائن `override` الذي تعيده [تحديث حالة الميزة](https://docs.didit.me/ar/sessions-api/update-feature-status.md)، أو اعرض تجاوزات الجلسة باستخدام [عرض تجاوزات الميزات](https://docs.didit.me/ar/sessions-api/list-feature-overrides.md) واختر تجاوزاً تكون قيمة `state` فيه `pending_until_flow_finishes`.## عند فشل الإلغاءيُرجع تجاوزٌ سبق تطبيقه أو إلغاؤه الاستجابة `409` مع الرمز `feature_override_not_pending`.
لتغيير فحص بعد تطبيق تجاوزه، أرسل بدلاً من ذلك طلب [تحديث حالة الميزة](https://docs.didit.me/ar/sessions-api/update-feature-status.md) جديداً.## ذات صلة- [تحديث حالة الميزة](https://docs.didit.me/ar/sessions-api/update-feature-status.md): تجاوز حالة خطوة واحدة، الآن أو بعد انتهاء سير العمل.
- [عرض تجاوزات الميزات](https://docs.didit.me/ar/sessions-api/list-feature-overrides.md): كل تجاوزات الجلسة وحالة كل منها.


## OpenAPI

````yaml ar/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`.


        أي تجاوز تم تطبيقه بالفعل أو تم إلغاؤه يعيد `409` مع الرمز
        `feature_override_not_pending`. يمكنك العثور على معرّفات التجاوز عبر
        `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).
          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 ذو نطاق محدد لا يمتلك الوصول الذي
            يتطلبه هذا الـ endpoint، أو `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: >-
            لا توجد جلسة KYC أو KYB بمعرّف `session_id` هذا، أو أن الجلسة لا
            تحتوي على تجاوز بمعرّف `overrideId` هذا.
          content:
            application/json:
              examples:
                Not Found:
                  summary: session_id غير معروف
                  value:
                    detail: Not found.
                Override Not Found:
                  summary: لا يوجد تجاوز بهذا المعرّف في الجلسة
                  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/`: ما يغيّره،
        وما إذا كان قد طُبّق أم لا يزال بانتظار إنهاء الشخص لسير العمل، ومن طلبه
        وسبب ذلك.
      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: معرّف التجاوز. مرّره إلى endpoint الإلغاء.
          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: >-
                البريد الإلكتروني لمستخدم وحدة التحكم، أو `null` لمفاتيح API
                والنظام.
              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`: أُلغي بواسطة endpoint الإلغاء. `replaced`:
            حل محله تجاوز أحدث على الفحص نفسه. `check_changed`: أعاد الشخص إجراء
            الفحص قبل إنهاء سير العمل. `session_closed`: غادرت الجلسة سير العمل
            قبل أن يُنهيه الشخص (متروكة، أو منتهية الصلاحية، أو تم اتخاذ القرار
            أثناء سير العمل).
          example: null
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        مفتاح API الخاص بتطبيقك، من Developers -> API keys في Business Console.
        يمتلك المفتاح الأساسي وصولاً كاملاً. يمكن تحديد نطاق المفتاح المسمى: لا
        شيء، أو قراءة، أو كتابة لكل مورد، ومحدوداً ببعض مسارات العمل أو بالجلسات
        المقبولة، وبقائمة من عناوين IP، وبتاريخ انتهاء الصلاحية. يشير 401 إلى أن
        المفتاح غير صحيح أو ملغى أو منتهي الصلاحية؛ ويشير 403 إلى أنه لم يتم
        إرسال أي مفتاح، أو أن المفتاح ليس لديه حق الوصول إلى هذا المورد أو
        الإجراء، أو أن الطلب جاء من عنوان خارج قائمة عناوين IP الخاصة به؛ ويشير
        404 في مسار جلسة إلى أن الجلسة خارج مسارات العمل أو الحالات الخاصة
        بالمفتاح. يتلقى المفتاح الذي لا يمتلك حق الوصول إلى الوسائط عناوين URL
        للصور ومقاطع الفيديو وملفات PDF كـ 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.