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

# واجهة فحص AML: العقوبات وPEP وقوائم المراقبة

> فحص AML فوري مقابل 1,300+ قائمة مراقبة عالمية: العقوبات وPEP والأخبار السلبية. نظام درجتين للمخاطر بسعر $0.20 لكل فحص دون حد أدنى شهري من Didit.



## OpenAPI

````yaml ar/openapi-25.json POST /v3/aml/
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/aml/:
    post:
      tags:
        - Standalone APIs
      summary: فحص AML (مستقل)
      description: >-
        فحص شخص أو شركة مقابل مجموعات بيانات PEP والعقوبات وقوائم
        التحذير/المراقبة والأخبار السلبية في استدعاء واحد.


        **نموذج الدرجتين.** يحمل كل تطابق `match_score` (0–100، الثقة في الهوية)
        و`risk_score` (0–100، مخاطر الكيان). يتم تمييز التطابقات التي يقل فيها
        `match_score` عن `aml_match_score_threshold` (القيمة الافتراضية **93**)
        بالوسم `review_status: "False Positive"` ويتم تجاهلها لأغراض تقييم
        المخاطر؛ وتصبح أعلى `risk_score` بين التطابقات المتبقية هي `aml.score`.
        وتتبع `aml.status` النهائية حدودك المعينة: `score` >
        `aml_score_review_threshold` (القيمة الافتراضية **100**) ← `Declined`؛
        `score` > `aml_score_approve_threshold` (القيمة الافتراضية **80**) ← `In
        Review`؛ وبخلاف ذلك تكون `Approved`. كلما كانت `score` غير صفرية وتساوي
        حد القبول أو تتجاوزه يُضاف تحذير `POSSIBLE_MATCH_FOUND` (الدرجة التي
        تساوي 0 تماماً لا تُصدر أي تحذير إطلاقاً).


        **أوزان درجة التطابق.** يجب أن يكون مجموع `aml_name_weight` +
        `aml_dob_weight` + `aml_country_weight` مساوياً لـ 100 تماماً (القيم
        الافتراضية 60/25/15). يتم استبعاد المكونات المفقودة من الطلب وإعادة ضبط
        النسب؛ ويعمل `document_number` المتطابق كمفتاح رئيسي يتجاوز
        `match_score` ليصبح 100.


        **زمن الاستجابة.** تكتمل عمليات الفحص العادية عادةً في غضون ثوانٍ قليلة.
        مع `include_adverse_media=true`، ينتظر الـ API إثراء الأخبار السلبية
        (توقف أولي لمدة 5 ثوانٍ تقريباً بالإضافة إلى ما يصل إلى 25 ثانية تقريباً
        من الاستقصاء) — اضبط مهلة العميل على **60 ثانية على الأقل**.


        **حفظ البيانات.** القيمة الافتراضية لـ `save_api_request` هي **true**:
        يتم تخزين الفحص كجلسة (يعمل `request_id` مع `GET
        /v3/session/{sessionId}/decision/`)، ويظهر في لوحة التحكم، ويتم إطلاق
        webhook للحدث `status.updated`، ويمكن تحديث حالات مراجعة التطابقات
        لاحقاً. مع `save_api_request=false`، لا يتم تخزين أي شيء ويكون
        `request_id` معرّف ارتباط مؤقتاً. يُبقي
        `include_ongoing_monitoring=true` على إعادة فحص الملف التعريفي باستمرار
        ويتطلب `save_api_request=true` (يتم فرضه عبر الخطأ `400`).


        **خاصية Idempotency.** أرسل رأس `Idempotency-Key` عند إعادة المحاولة بعد
        انتهاء المهلة أو حدوث خطأ عابر. يقتصر نطاق المفتاح على تطبيقك وجسم الطلب
        المطابق تماماً. يخزن الطلب المكتمل الأول استجابته؛ وتُرجع محاولات إعادة
        الطلب المتطابقة اللاحقة نفس الاستجابة دون تشغيل فحص AML آخر أو فوترته.
        إذا كان الطلب الأصلي لا يزال قيد التشغيل، أعد المحاولة لاحقاً باستخدام
        المفتاح نفسه. إذا تمت إعادة استخدام المفتاح نفسه مع جسم طلب مختلف، يُرجع
        الـ API الخطأ `409`.


        **الفوترة.** يتم خصم رصيد واحد لـ AML API بعد أول فحص ناجح. لا يتم فرض
        رسوم مرة أخرى على الاستجابات المكررة المستندة إلى خاصية idempotency؛
        ويؤدي عدم كفاية الرصيد إلى إرجاع `403` قبل إجراء أي فحص جديد.


        **البيئة التجريبية.** تتخطى المفاتيح الصادرة من تطبيقات البيئة التجريبية
        الفحص والفوترة تماماً وتُرجع نتيجة وهمية — `Approved` بدون أي تطابقات ما
        لم تُمرر `sandbox_scenario`. تعمل `save_api_request` بنفس طريقة المفاتيح
        الحية، لذا يمكن استرداد فحص البيئة التجريبية المحفوظ عبر `GET
        /v3/session/{sessionId}/decision/` و`GET
        /v3/session/{sessionId}/generate-pdf/`.
      operationId: post_v3aml
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            مفتاح اختياري لأمان إعادة المحاولة، حتى 255 حرفاً. تؤدي إعادة
            استخدام نفس المفتاح مع نفس نص الطلب إلى إرجاع الاستجابة الأصلية دون
            تشغيل أو فوترة فحص ثانٍ. تؤدي إعادة استخدام المفتاح مع نص مختلف إلى
            إرجاع `409`.
          schema:
            type: string
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - full_name
              properties:
                full_name:
                  type: string
                  minLength: 2
                  description: >-
                    الاسم الكامل للشخص أو الشركة المراد فحصها. الحد الأدنى
                    **حرفان** - وهو الحد الأدنى الخاص بمزود الفحص نفسه. يؤدي
                    إرسال اسم أقصر أو فارغ إلى إرجاع `400` في هذا الحقل قبل
                    تشغيل أي فحص، وبالتالي لا تتم فوترة أي شيء.
                  example: Antonio Ejemplo Modelo
                entity_type:
                  type: string
                  enum:
                    - person
                    - company
                  default: person
                  description: نوع الكيان المراد فحصه. القيمة الافتراضية هي `person`.
                date_of_birth:
                  type: string
                  format: date
                  description: >-
                    تاريخ الميلاد (للأشخاص) أو تاريخ التأسيس (للشركات)،
                    `YYYY-MM-DD`. يحسّن دقة التطابق عبر وزن DOB.
                  example: '1972-02-29'
                nationality:
                  type: string
                  description: >-
                    رمز الدولة وفقاً لـ ISO 3166-1 **alpha-2** (مثل `ES`).
                    الرموز غير الصالحة تُرجع `400`. يحسّن دقة التطابق من خلال
                    وزن الدولة.
                  example: ES
                document_number:
                  type: string
                  description: >-
                    رقم مستند الهوية. غير مرجّح بأوزان — يعمل كمفتاح حاسم:
                    التطابق التام يتجاوز `match_score` للنتيجة إلى 100، وعدم
                    التطابق الصريح يقلل الدرجة. يُرسل إلى مزوّد الفحص كمرشح بحث
                    فقط عندما يتراوح بين **2-50 حرفاً**؛ تُقبل القيمة الخارجة عن
                    هذا النطاق وتُخزّن، ويستمر الفحص وتتم فوترته، ولكن دون تضييق
                    نطاقه برقم المستند.
                aml_score_approve_threshold:
                  type: number
                  minimum: 0
                  maximum: 100
                  default: 80
                  description: >-
                    حد درجة المخاطر الذي تكون النتيجة عنده أو دونه `Approved`.
                    يجب أن يكون ≤ `aml_score_review_threshold` (وإلا فسيتم إرجاع
                    `400`).
                aml_score_review_threshold:
                  type: number
                  minimum: 0
                  maximum: 100
                  default: 100
                  description: >-
                    حد درجة المخاطر الذي تصبح النتيجة فوقه `Declined`. وتؤدي
                    الدرجات بين الحدين إلى الحالة `In Review`.
                aml_name_weight:
                  type: integer
                  minimum: 0
                  maximum: 100
                  default: 60
                  description: >-
                    وزن تشابه الأسماء في درجة التطابق لكل نتيجة مطابقة. يجب أن
                    يكون مجموع الأوزان الثلاثة 100 بالضبط (وإلا `400`).
                aml_dob_weight:
                  type: integer
                  minimum: 0
                  maximum: 100
                  default: 25
                  description: وزن تاريخ الميلاد في درجة التطابق لكل نتيجة مطابقة.
                aml_country_weight:
                  type: integer
                  minimum: 0
                  maximum: 100
                  default: 15
                  description: وزن الدولة/الجنسية في درجة التطابق لكل نتيجة مطابقة.
                aml_match_score_threshold:
                  type: integer
                  minimum: 0
                  maximum: 100
                  default: 93
                  description: >-
                    الحد الفاصل لكل تطابق: التطابقات التي تكون قيمة
                    `match_score` لها أقل من هذا الحد تُعد `False Positive`
                    (مستبعدة من تقييم المخاطر)؛ أما التطابقات التي تساوي هذا
                    الحد أو تتجاوزه فتُعد تطابقات محتملة `Unreviewed`.
                include_adverse_media:
                  type: boolean
                  default: false
                  description: >-
                    ابحث أيضاً في وسائل الإعلام الإخبارية عن التغطيات السلبية.
                    يضيف هذا ما يصل إلى ~30 ثانية من زمن الانتقال أثناء جمع
                    النتائج — استخدم مهلة انتظار للعميل تبلغ 60 ثانية على الأقل.
                include_ongoing_monitoring:
                  type: boolean
                  default: false
                  description: >-
                    الاستمرار في إعادة فحص هذا الملف التعريفي ودفع التغييرات عبر
                    webhook. يتطلب `save_api_request=true` (وإلا `400`).
                save_api_request:
                  type: boolean
                  default: true
                  description: >-
                    حفظ الفحص كجلسة (الظهور في لوحة التحكم، endpoint القرار،
                    webhooks، مراجعة النتائج). اضبطه على `false` لإجراء فحص عديم
                    الحالة.
                vendor_data:
                  type: string
                  description: >-
                    المعرّف الخاص بك للمستخدم الذي خضع للفحص؛ تتم إعادته وتخزينه
                    مع الجلسة.
                metadata:
                  type: object
                  nullable: true
                  description: كائن JSON بصيغة حرة يُخزن مع الطلب وتتم إعادته في الاستجابة.
                sandbox_scenario:
                  type: string
                  description: >-
                    المعرّف القصير للسيناريو الخاص بالبيئة التجريبية فقط. يُقبل
                    فقط عندما ينتمي مفتاح API إلى تطبيق في وضع البيئة التجريبية؛
                    ويُرفض في تطبيقات بيئة الإنتاج. لا يحتوي الفحص المستقل على
                    جلسة لتفعيلها مسبقاً، لذا يوضع المعرّف القصير في طلب الفحص
                    نفسه: يعيد `decline_aml_hit` تطابقاً واحداً بشكل مشابه لبيئة
                    الإنتاج ويحسم الفحص كـ `Declined`، ويحسمه
                    `review_aml_possible_match` كـ `In Review`، والسيناريو الذي
                    لا يفعّل أي نتيجة لفحص AML يترك الفحص نظيفاً خالياً من
                    النتائج. راجع دليل السيناريوهات عبر GET
                    /v1/sandbox/scenarios/ أو [البيئة التجريبية وبيانات
                    الاختبار](/ar/integration/sandbox-testing).
                  example: decline_aml_hit
            example:
              full_name: Antonio Ejemplo Modelo
              entity_type: person
              date_of_birth: '1972-02-29'
              nationality: ES
              include_adverse_media: false
              vendor_data: user-1234
      responses:
        '200':
          description: >-
            اكتمل الفحص. تعكس `aml.status` حدودك المحددة؛ ويتم إدراج كل تطابق
            عند الحد الأدنى الداخلي للإدراج أو أعلى منه في `aml.hits` مع
            `match_score` للهوية، و`risk_score` للكيان، و`score_breakdown` يوضح
            أسباب التطابق.
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                    format: uuid
                    description: >-
                      معرّف الجلسة المحفوظة عندما تكون `save_api_request=true`
                      (يمكن استخدامه مع `GET
                      /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID
                      ارتباط مؤقت.
                  aml:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - Approved
                          - In Review
                          - Declined
                        description: >-
                          `Declined` عندما تكون `score` >
                          `aml_score_review_threshold`؛ و`In Review` عندما تكون
                          `score` > `aml_score_approve_threshold`؛ و`Approved`
                          خلاف ذلك (بما في ذلك عند عدم توفر درجة).
                      total_hits:
                        type: integer
                        description: عدد الإدخالات في `hits`.
                      entity_type:
                        type: string
                        enum:
                          - person
                          - company
                        description: تكرار لنوع الكيان الذي تم فحصه.
                      hits:
                        type: array
                        items:
                          type: object
                          description: >-
                            نتيجة فحص واحدة. يقيس `match_score` (0–100) مدى
                            الثقة في الهوية — التطابقات الأقل من
                            `aml_match_score_threshold` تُوسم بـ `review_status:
                            "False Positive"` وتُستبعد من تقييم المخاطر؛
                            والتطابقات التي تساوي الحد أو تتجاوزه تكون تطابقات
                            محتملة بقيمة `"Unreviewed"`. يقيس `risk_score`
                            (0–100) مدى خطورة الكيان المتطابق ويوجه `aml.score`
                            على المستوى الأعلى.
                          properties:
                            id:
                              type: string
                              nullable: true
                              description: >-
                                معرّف Didit الثابت لنتيجة المطابقة: `hit_`
                                متبوعاً بـ 24 حرفاً سداسياً عشرياً. يحتفظ الكيان
                                المطابق نفسه بنفس `id` عند فحص الشخص المعني مرة
                                أخرى. مرّره كـ `hit_id` إلى endpoints مراجعة
                                نتائج مطابقة AML.
                            url:
                              type: string
                              nullable: true
                              description: رابط المصدر للكيان المطابق، عند توفره.
                            match:
                              type: boolean
                              nullable: true
                              description: >-
                                مؤشر تطابق تام قديم. يُفضل استخدام `match_score`
                                + `review_status`.
                            score:
                              type: number
                              nullable: true
                              description: >-
                                (مهمل) درجة التطابق الموزونة في النطاق 0–1.
                                استخدم `match_score` بدلاً من ذلك.
                            match_score:
                              type: number
                              nullable: true
                              description: >-
                                درجة الثقة في الهوية (0–100). تُقارن مع
                                `aml_match_score_threshold` لفصل النتائج
                                الإيجابية الكاذبة عن التطابقات المحتملة.
                            risk_score:
                              type: number
                              nullable: true
                              description: >-
                                درجة مخاطر الكيان (0–100). تصبح أعلى قيمة لـ
                                `risk_score` بين التطابقات التي ليست إيجابية
                                كاذبة هي `aml.score` في المستوى الأعلى.
                            target:
                              type: boolean
                              nullable: true
                            caption:
                              type: string
                              nullable: true
                              description: اسم العرض للكيان المطابق.
                            datasets:
                              type: array
                              nullable: true
                              items:
                                type: string
                                enum:
                                  - PEP
                                  - PEP Level 1
                                  - PEP Level 2
                                  - PEP Level 3
                                  - PEP Level 4
                                  - Sanctions
                                  - Adverse Media
                                  - Warnings and Regulatory Enforcement
                                  - Fitness and Probity
                                  - SIP
                                  - SIE
                                  - Insolvency
                                  - Other Lists
                              description: >-
                                فئات المخاطر المدرج الكيان تحتها: `PEP` (مع
                                مستواه، من `PEP Level 1` إلى `PEP Level 4`)، أو
                                `Sanctions`، أو `Adverse Media`، أو `Warnings
                                and Regulatory Enforcement`، أو `Fitness and
                                Probity`، أو `SIP`، أو `SIE`، أو `Insolvency`.
                                وتكون `Other Lists` عندما لا يحدد مصدر الكيان
                                أياً من هذه الفئات.
                            features:
                              type: object
                              nullable: true
                            properties:
                              type: object
                              nullable: true
                              description: >-
                                ملف تعريف الكيان: `name`، و`alias`، و`notes`،
                                و`gender`، و`birthDate`، و`birthPlace`،
                                و`nationality`، و`position`، ومصفوفات السيرة
                                الذاتية الأخرى (كل منها قابلة للقيمة الفارغة).
                            rca_name:
                              type: string
                              nullable: true
                              description: >-
                                اسم الشريك المقرب ذي الصلة الذي تم من خلاله
                                مطابقة الكيان، عندما تكون النتيجة مطابقة RCA.
                            pep_matches:
                              type: array
                              description: مدخلات قائمة PEP المؤيدة لهذه النتيجة.
                              items:
                                type: object
                                properties:
                                  list_name:
                                    type: string
                                  publisher:
                                    type: string
                                  source_url:
                                    type: string
                                  description:
                                    type: string
                                  matched_name:
                                    type: string
                                  pep_position:
                                    type: string
                                  date_of_birth:
                                    type: string
                                  place_of_birth:
                                    type: string
                                  aliases:
                                    type: array
                                    items:
                                      type: string
                                  education:
                                    type: array
                                    items:
                                      type: string
                                  other_sources:
                                    type: array
                                    items:
                                      type: string
                            sanction_matches:
                              type: array
                              items:
                                type: object
                              description: >-
                                مدخلات قائمة العقوبات التي تدعم هذه النتيجة
                                (الشكل نفسه للقائمة الداعمة لـ `pep_matches`،
                                بالإضافة إلى الحقول الخاصة بالعقوبات).
                            warning_matches:
                              type: array
                              items:
                                type: object
                              description: >-
                                إدخالات التحذير/قائمة المراقبة الداعمة لهذه
                                النتيجة المطابقة.
                            adverse_media_matches:
                              type: array
                              description: >-
                                مقالات الأخبار السلبية. يتم ملؤها فقط عندما تكون
                                `include_adverse_media=true`.
                              items:
                                type: object
                                properties:
                                  headline:
                                    type: string
                                  summary:
                                    type: string
                                  sentiment:
                                    type: string
                                  sentiment_score:
                                    type: number
                                  source_url:
                                    type: string
                                  thumbnail:
                                    type: string
                                    nullable: true
                                  country:
                                    type: string
                                    nullable: true
                                  author_name:
                                    type: string
                                    nullable: true
                                  publication_date:
                                    type: string
                                    nullable: true
                                  adverse_keywords:
                                    type: array
                                    items:
                                      type: string
                                  other_sources:
                                    type: array
                                    items:
                                      type: string
                            adverse_media_details:
                              type: object
                              nullable: true
                              description: >-
                                مشاعر الأخبار السلبية المجمعة للكيان
                                (`sentiment`، `sentiment_score`، ومخطط تكرار
                                `adverse_keywords`). يتم ملؤها فقط عندما تكون
                                `include_adverse_media=true`.
                            first_seen:
                              type: string
                              format: date-time
                              nullable: true
                              description: وقت ظهور الكيان لأول مرة في مجموعات البيانات.
                            last_seen:
                              type: string
                              format: date-time
                              nullable: true
                              description: أحدث تحديث لمجموعة البيانات تضمن الكيان.
                            linked_entities:
                              type: array
                              description: >-
                                العلاقات المعروفة للكيان المطابق (العائلة،
                                الأشخاص المرتبطون، الشركات).
                              items:
                                type: object
                                properties:
                                  name:
                                    type: array
                                    items:
                                      type: string
                                  active:
                                    type: array
                                    items:
                                      type: string
                                  status:
                                    type: array
                                    items:
                                      type: string
                                  details:
                                    type: array
                                    items:
                                      type: string
                                  relation:
                                    type: array
                                    items:
                                      type: string
                            risk_view:
                              type: object
                              nullable: true
                              description: >-
                                تفصيل المخاطر لكل بُعد (`crimes`، `countries`،
                                `categories`، `custom_list`)، كل منها مع
                                `score`، `weightage`، `risk_level`، وخريطة
                                `risk_scores`.
                            additional_information:
                              type: object
                              nullable: true
                              description: >-
                                سياق إضافي بصيغة حرة، مثل مصفوفة `flag_summary`
                                التي توضح سبب وضع علامة على الكيان.
                            review_status:
                              type: string
                              nullable: true
                              enum:
                                - False Positive
                                - Unreviewed
                                - Confirmed Match
                                - Inconclusive
                              description: >-
                                `False Positive` — `match_score` أقل من
                                `aml_match_score_threshold`، ومُستبعد من تقييم
                                المخاطر. `Unreviewed` — تطابق محتمل في انتظار
                                المراجعة. `Confirmed Match` / `Inconclusive` —
                                يحددهما المراجِع يدوياً (عبر Business Console)
                                في الجلسات المحفوظة؛ إمكانية المراجعة هذه ليست
                                جزءاً من هذه المواصفات.
                            score_breakdown:
                              type: object
                              nullable: true
                              description: >-
                                كيفية حساب `match_score`. يساهم كل من الاسم
                                وتاريخ الميلاد والدولة بنقاط قدرها
                                `<component>_score` ×
                                `<component>_weight_normalized`؛ وتُعاد تسوية
                                الأوزان عند غياب أحد المكونات من البيانات
                                المفحوصة. رقم المستند لا يخضع للوزن — فهو يعمل
                                بمثابة 'مفتاح ذهبي': يحدد `MATCH` النتيجة إلى
                                100، ويتركها `NEUTRAL` دون تغيير، بينما يفرض
                                `HARD_MISMATCH` عقوبة خفض للدرجة.
                              properties:
                                name_score:
                                  type: integer
                                  nullable: true
                                  description: تشابه الأسماء الخام (0–100).
                                name_weight:
                                  type: integer
                                  nullable: true
                                  description: وزن الاسم المُهيَّأ (`aml_name_weight`).
                                name_weight_normalized:
                                  type: number
                                  nullable: true
                                  description: وزن الاسم بعد إعادة التطبيع (0–100).
                                name_contribution:
                                  type: number
                                  nullable: true
                                  description: النقاط التي ساهم بها الاسم في `total_score`.
                                dob_score:
                                  type: integer
                                  nullable: true
                                  description: >-
                                    درجة تاريخ الميلاد كنسبة مئوية من وزنه (−100
                                    إلى 100).
                                dob_weight:
                                  type: integer
                                  nullable: true
                                  description: >-
                                    وزن تاريخ الميلاد المُهيَّأ
                                    (`aml_dob_weight`).
                                dob_weight_normalized:
                                  type: number
                                  nullable: true
                                  description: وزن تاريخ الميلاد بعد إعادة التطبيع (0–100).
                                dob_contribution:
                                  type: number
                                  nullable: true
                                  description: >-
                                    النقاط التي ساهم بها تاريخ الميلاد في
                                    `total_score`.
                                country_score:
                                  type: integer
                                  nullable: true
                                  description: >-
                                    درجة الدولة كنسبة مئوية من وزنها (−100 إلى
                                    100).
                                country_weight:
                                  type: integer
                                  nullable: true
                                  description: وزن الدولة المُهيَّأ (`aml_country_weight`).
                                country_weight_normalized:
                                  type: number
                                  nullable: true
                                  description: وزن الدولة بعد إعادة التطبيع (0–100).
                                country_contribution:
                                  type: number
                                  nullable: true
                                  description: >-
                                    النقاط التي ساهمت بها الدولة في
                                    `total_score`.
                                document_number_match_type:
                                  type: string
                                  nullable: true
                                  enum:
                                    - MATCH
                                    - NEUTRAL
                                    - HARD_MISMATCH
                                  description: نتيجة المفتاح الذهبي لمقارنة رقم المستند.
                                document_number_effect:
                                  type: string
                                  nullable: true
                                  description: وصف سهل القراءة لتأثير رقم المستند.
                                total_score:
                                  type: integer
                                  nullable: true
                                  description: >-
                                    درجة التطابق المرجحة النهائية (0–100) —
                                    تطابق `match_score`.
                      score:
                        type: number
                        nullable: true
                        description: >-
                          درجة مخاطر AML الإجمالية (0–100): أعلى `risk_score`
                          بين النتائج المتطابقة التي ليست إيجابيات كاذبة. تُحدد
                          `status` عبر الحدين.
                      screened_data:
                        type: object
                        description: >-
                          تكرار لما تم فحصه: `full_name`، و`date_of_birth`،
                          و`nationality`، و`document_number` (الحقول غير
                          الموجودة تكون `null`).
                        properties:
                          full_name:
                            type: string
                          date_of_birth:
                            type: string
                            nullable: true
                          nationality:
                            type: string
                            nullable: true
                          document_number:
                            type: string
                            nullable: true
                      warnings:
                        type: array
                        items:
                          type: object
                          properties:
                            feature:
                              type: string
                              description: الميزة التي أصدرت التحذير.
                            risk:
                              type: string
                              description: معرّف مخاطر مقروء آلياً.
                            additional_data:
                              type: object
                              nullable: true
                              description: سياق إضافي للتحذير، عند توفره.
                            log_type:
                              type: string
                              description: >-
                                `warning` أو `information` أو `error` — كيف أثر
                                الخطر على النتيجة.
                            short_description:
                              type: string
                              description: ملخص مقروء للبشر في سطر واحد.
                            long_description:
                              type: string
                              description: تفسير كامل مفهوم للبشر.
                        description: >-
                          يحتوي على تحذير `POSSIBLE_MATCH_FOUND` عندما تكون
                          `score` غير صفرية و≥ `aml_score_approve_threshold`
                          (الدرجة 0 تماماً لا تُصدر تحذيراً أبداً)؛ وفارغ بخلاف
                          ذلك.
                  vendor_data:
                    type: string
                    nullable: true
                    description: تكرار لقيمة `vendor_data` التي أرسلتها.
                  metadata:
                    type: object
                    nullable: true
                    description: نسخة مطابقة من `metadata` التي أرسلتها.
                  created_at:
                    type: string
                    format: date-time
              examples:
                No hits (Approved):
                  summary: فحص خالٍ من النتائج — دون أي نتائج متطابقة
                  value:
                    request_id: d27c5509-7a66-45a9-b05e-d69d9f4c336a
                    aml:
                      status: Approved
                      total_hits: 0
                      entity_type: person
                      hits: []
                      score: 0
                      screened_data:
                        full_name: Maximilian Mustermann-Doe
                        date_of_birth: '1992-03-14'
                        nationality: DE
                        document_number: null
                      warnings: []
                    vendor_data: user-1234
                    metadata:
                      internal_ref: abc-123
                    created_at: '2026-06-11T10:21:07.013938+00:00'
                PEP hit (Approved — risk below approve threshold):
                  summary: >-
                    تطابق محتمل واحد مع شخص معرض سياسياً؛ تظل درجة المخاطر 73
                    أقل من حد القبول الافتراضي البالغ 80
                  value:
                    request_id: 0b7e7a3e-65a1-4f3d-9c7a-1de2f9a40111
                    aml:
                      status: Approved
                      total_hits: 1
                      entity_type: person
                      hits:
                        - id: hit_7c1e9a40b2d35f86e0a4c912
                          url: https://news.example.org/articles/sample
                          match: false
                          score: 0.93
                          match_score: 93
                          risk_score: 73
                          target: null
                          caption: Antonio Ejemplo Modelo
                          datasets:
                            - PEP Level 1
                            - PEP
                          features: null
                          rca_name: ''
                          first_seen: '2026-01-07T00:00:00'
                          last_seen: '2026-01-07T00:00:00'
                          review_status: Unreviewed
                          properties:
                            name:
                              - Antonio Ejemplo Modelo
                              - Antonio Ejemplo
                            alias:
                              - Antonio Ejemplo Modelo
                              - Ejemplo Modelo, Pedro
                            notes:
                              - Prime Minister of Spain
                            gender:
                              - male
                            birthDate:
                              - '1972-02-29'
                            birthPlace:
                              - Madrid, Spain
                            nationality: null
                            position: null
                          risk_view:
                            crimes:
                              score: 0
                              weightage: 20
                              risk_level: Low
                              risk_scores: {}
                            countries:
                              score: 9.64
                              weightage: 30
                              risk_level: Low
                              risk_scores:
                                Spain: 25.71
                            categories:
                              score: 62.5
                              weightage: 50
                              risk_level: High
                              risk_scores:
                                PEP: 100
                                PEP Level 1: 100
                            custom_list: {}
                          score_breakdown:
                            name_score: 89
                            name_weight: 60
                            name_weight_normalized: 60
                            name_contribution: 53.4
                            dob_score: 100
                            dob_weight: 25
                            dob_weight_normalized: 25
                            dob_contribution: 25
                            country_score: 100
                            country_weight: 15
                            country_weight_normalized: 15
                            country_contribution: 15
                            document_number_match_type: NEUTRAL
                            document_number_effect: No document number provided for screening
                            total_score: 93
                          pep_matches:
                            - aliases: []
                              education: []
                              list_name: Presidency of the Government of Spain
                              publisher: Presidency of the Government of Spain
                              source_url: https://news.example.org/articles/sample
                              description: >-
                                The Presidency of the Government is the central
                                institutional body in Spain that supports the
                                Prime Minister and coordinates the general
                                action of the central government.
                              matched_name: Antonio Ejemplo Modelo
                              pep_position: ''
                              date_of_birth: '1972-02-29'
                              other_sources: []
                              place_of_birth: Madrid, Spain
                          sanction_matches: []
                          warning_matches: []
                          adverse_media_matches: []
                          adverse_media_details: null
                          linked_entities:
                            - name:
                                - Maria Begona Gomez Fernandez
                              active: []
                              status: []
                              details: []
                              relation:
                                - spouse
                          additional_information:
                            flag_summary:
                              - >-
                                Antonio Ejemplo Modelo has been flagged as a
                                Level 1 Politically Exposed Person (PEP) from
                                Spain, serving as the President of the
                                Government of Spain.
                      score: 73
                      screened_data:
                        full_name: Pedro Sanchez Perez-Castejon
                        date_of_birth: '1972-02-29'
                        nationality: ES
                        document_number: null
                      warnings: []
                    vendor_data: null
                    metadata: null
                    created_at: '2026-06-11T10:23:44.812000+00:00'
        '400':
          description: >-
            خطأ في التحقق. تُرجع المشكلات على مستوى الحقول غلاف DRF القياسي
            (مصفوفة رسائل واحدة لكل حقل مخالف)؛ بينما تُرجع القواعد بين الحقول
            (مجموع الأوزان، وترتيب الحدود، والمراقبة بدون حفظ) `{"error":
            [...]}`.
          content:
            application/json:
              examples:
                Missing full_name:
                  summary: '`full_name` هو الحقل الوحيد المطلوب'
                  value:
                    full_name:
                      - This field is required.
                Short full_name:
                  summary: يجب ألا يقل `full_name` عن حرفين
                  value:
                    full_name:
                      - Ensure this field has at least 2 characters.
                Invalid nationality:
                  summary: يجب أن تكون `nationality` بصيغة ISO 3166-1 alpha-2
                  value:
                    nationality:
                      - Invalid ISO 3166-1 alpha-2 country code.
                Weights do not sum to 100:
                  summary: >-
                    `aml_name_weight` + `aml_dob_weight` + `aml_country_weight`
                    ≠ 100
                  value:
                    error:
                      - >-
                        AML weights must sum to 100. Current sum: 90 (name: 50,
                        dob: 25, country: 15)
                Thresholds out of order:
                  summary: حد الموافقة أعلى من حد المراجعة
                  value:
                    error:
                      - >-
                        Approve threshold (90.0) cannot be greater than review
                        threshold (80.0)
                Monitoring without saving:
                  summary: >-
                    `include_ongoing_monitoring=true` مع
                    `save_api_request=false`
                  value:
                    error:
                      - >-
                        Ongoing monitoring can only be enabled when the API
                        request is saved.
        '403':
          description: >-
            تم رفض الإذن. يُرجع عند فقدان الرأس `x-api-key`، وأيضاً عندما لا
            يتمكن رصيد المؤسسة الطالبة من تغطية الاستدعاء؛ ويُرجع المفتاح الخاطئ
            أو الملغى أو منتهي الصلاحية `401`. يؤدي المفتاح المفقود إلى إرجاع
            `403` مع `{"detail": ...}`؛ ويؤدي المفتاح الخاطئ أو الملغى أو منتهي
            الصلاحية إلى إرجاع `401`. يُرجع نقص الرصيد `403` مع `{"error": ...}`
            قبل إجراء أي فحص أو استدعاء لمزود الخدمة.
          content:
            application/json:
              examples:
                Missing or invalid API key:
                  summary: لا يوجد رأس `x-api-key`، أو أن المفتاح غير صالح/ملغى
                  value:
                    detail: You do not have permission to perform this action.
                Not enough credits:
                  summary: رصيد المؤسسة لا يمكنه تغطية تكلفة الاستدعاء
                  value:
                    error: >-
                      You don't have enough credits to perform this request.
                      Please top up at https://business.didit.me
        '429':
          description: >-
            تم تجاوز حد المعدل. تشترك نقاط endpoint الخاصة بـ POST/PATCH/DELETE
            في ميزانية قدرها 300 طلب كتابة في الدقيقة لكل مفتاح API (إنشاء
            المعاملات واستيعاب الأحداث لهما ميزانية منفصلة تبلغ 600). تتضمن
            الاستجابة رؤوس `X-RateLimit-Limit` و`X-RateLimit-Remaining`
            و`X-RateLimit-Reset` و`Retry-After`.
          content:
            application/json:
              examples:
                Write rate limit exceeded:
                  summary: أكثر من 300 طلب كتابة في الدقيقة الحالية
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      requests per minute.
              schema:
                type: object
                properties:
                  detail:
                    type: string
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST https://verification.didit.me/v3/aml/ \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -H 'Idempotency-Key: aml-user-1234-2026-08-20' \
              -d '{
                "full_name": "Antonio Ejemplo Modelo",
                "entity_type": "person",
                "date_of_birth": "1972-02-29",
                "nationality": "ES",
                "include_adverse_media": false,
                "vendor_data": "user-1234"
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.aml.screen(
                full_name="Antonio Ejemplo Modelo",
                entity_type="person",
                date_of_birth="1972-02-29",
                nationality="ES",
                include_adverse_media=False,
                vendor_data="user-1234",
            )
            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.aml.screen({
              full_name: "Antonio Ejemplo Modelo",
              entity_type: "person",
              date_of_birth: "1972-02-29",
              nationality: "ES",
              include_adverse_media: false,
              vendor_data: "user-1234",
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AML.Screen(ctx, didit.AMLScreenParams{\n\tFullName:            \"Antonio Ejemplo Modelo\",\n\tEntityType:          didit.Some(didit.AMLScreenParamsEntityType(\"person\")),\n\tDateOfBirth:         didit.String(\"1972-02-29\"),\n\tNationality:         didit.String(\"ES\"),\n\tIncludeAdverseMedia: didit.Bool(false),\n\tVendorData:          didit.String(\"user-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: |-
            import java.time.LocalDate;
            import me.didit.Didit;
            import me.didit.types.AmlScreenParams;

            // Reads DIDIT_API_KEY.
            Didit client = new Didit();

            var result = client.aml().screen(AmlScreenParams.builder()
                    .fullName("Antonio Ejemplo Modelo")
                    .entityType(AmlScreenParams.EntityType.of("person"))
                    .dateOfBirth(LocalDate.parse("1972-02-29"))
                    .nationality("ES")
                    .includeAdverseMedia(false)
                    .vendorData("user-1234")
                    .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->aml->screen([
                'full_name' => 'Antonio Ejemplo Modelo',
                'entity_type' => 'person',
                'date_of_birth' => '1972-02-29',
                'nationality' => 'ES',
                'include_adverse_media' => false,
                'vendor_data' => 'user-1234',
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.aml.screen(
              full_name: "Antonio Ejemplo Modelo",
              entity_type: "person",
              date_of_birth: "1972-02-29",
              nationality: "ES",
              include_adverse_media: false,
              vendor_data: "user-1234"
            )
            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.Aml.ScreenAsync(new AmlScreenParams
            {
                FullName = "Antonio Ejemplo Modelo",
                EntityType = new AmlScreenParamsEntityType("person"),
                DateOfBirth = "1972-02-29",
                Nationality = "ES",
                IncludeAdverseMedia = false,
                VendorData = "user-1234",
            });
            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  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.