{
  "openapi": "3.0.0",
  "info": {
    "version": "3.0.0",
    "title": "Didit Verification API",
    "description": "API التحقق من الهوية. قم بالمصادقة باستخدام الرأس x-api-key."
  },
  "servers": [
    {
      "url": "https://verification.didit.me"
    }
  ],
  "tags": [],
  "paths": {
    "/system/healthcheck": {
      "get": {
        "summary": "فحص حالة تشغيل الخدمة (عام، دون مصادقة)",
        "description": "فحص حيوية النظام عام وغير مصادق عليه. يُرجع `HTTP 200` مع `{status: \"ok\", timestamp}` عندما تكون الخدمة وقاعدة البيانات وذاكرة التخزين المؤقت والوسيط بحالة تشغيل سليمة.",
        "operationId": "get_system_healthcheck",
        "x-didit-sdk": {
          "resource": "system",
          "method": "healthcheck",
          "auth": "public",
          "server": false
        },
        "tags": [
          "System"
        ],
        "security": [
          {}
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "الخدمة تعمل بشكل سليم وتقبل الطلبات. جسم الاستجابة يكون دائمًا `{\"status\": \"ok\", \"timestamp\": \"<iso8601>\"}`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "timestamp"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ],
                      "description": "علامة كشف الحيوية. دائمًا السلسلة النصية الحرفية `\"ok\"` في استجابة 200.",
                      "example": "ok"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "وقت الخادم الذي تم فيه تقييم فحص حالة التشغيل، بتنسيق ISO 8601 بدقة المللي ثانية ولاحقة `Z` (UTC).",
                      "example": "2026-04-21T16:42:50.445Z"
                    }
                  }
                },
                "examples": {
                  "Healthy": {
                    "summary": "الخدمة قيد التشغيل",
                    "value": {
                      "status": "ok",
                      "timestamp": "2026-04-21T16:42:50.445Z"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "الخدمة غير سليمة — أحد المكونات الإضافية المكوّنة لفحص حالة التشغيل (قاعدة البيانات، ذاكرة التخزين المؤقت، الوسيط) يواجه فشلاً. جسم الاستجابة موجز عن قصد؛ فحالة HTTP هي الإشارة الأساسية. أعد المحاولة مع التراجع الأسي."
          },
          "5XX": {
            "description": "خدمة التحقق متدهورة أو لا يمكن الوصول إليها. تعامل مع أي استجابة غير 2xx على أنها \"غير سليمة\" وأعد المحاولة مع تراجع أسي."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -i https://verification.didit.me/system/healthcheck"
          },
          {
            "lang": "Python",
            "label": "Python (requests)",
            "source": "import requests\n\nresp = requests.get(\"https://verification.didit.me/system/healthcheck\", timeout=5)\nresp.raise_for_status()\nprint(resp.json())  # {'status': 'ok', 'timestamp': '2026-04-21T16:42:50.445Z'}"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js (fetch)",
            "source": "const res = await fetch(\"https://verification.didit.me/system/healthcheck\");\nif (!res.ok) throw new Error(`Didit unhealthy: ${res.status}`);\nconst body = await res.json();\nconsole.log(body); // { status: 'ok', timestamp: '2026-04-21T16:42:50.445Z' }"
          }
        ]
      }
    },
    "/v3/email/risk/": {
      "post": {
        "summary": "احتساب درجة المخاطر لعنوان بريد إلكتروني",
        "description": "إرجاع إشارات قابلية التسليم، والعناوين المؤقتة، والتسريبات، والتطابق عبر الجلسات، وإشارات معلومات المخاطر الموحدة دون إرسال OTP. ينشئ هذا الـ endpoint جلسة API ويعيد معرفها كـ `request_id`.\n\n**القرار.** تعكس القيمة `status` على المستوى الأعلى القيمة `email.status`. وتكون عادة `Approved`؛ ويمكن أن يؤدي تقييم المخاطر إلى `In Review` أو `Declined`.\n\n**الأسماء البديلة للتوافق.** تعرض الاستجابات في بيئة الإنتاج كائن المعلومات الموحد باسم `email.email_intelligence` و`email.enrichment`. وتكون القيم متطابقة. يمكن للتكاملات الجديدة قراءة `email.enrichment`. ويغيب كلا المفتاحين عند عدم إرجاع أي بيانات معلومات قابلة للاستخدام.\n\n**الفوترة.** تستخدم الاستدعاءات في بيئة الإنتاج أسعار Email Risk API. ويكون الطلب خاضعاً للفوترة بمجرد بدء عملية البحث، حتى لو كانت بعض الحقول التي تعتمد على بذل أقصى جهد غير متوفرة.\n\n**البيئة التجريبية.** تتحقق مفاتيح البيئة التجريبية من صحة الطلب وتعيد بيانات مقبولة محددة مسبقاً دون إرسال بريد إلكتروني، أو استهلاك أرصدة، أو إنشاء جلسة، أو المساهمة في Networks.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة `403` - لا تُرجع هذه الـ API أبداً `401`.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب في الدقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE (تمتلك عمليات إنشاء المعاملات واستيعاب الأحداث ميزانية منفصلة تبلغ 600).\n\n**البصمة الاجتماعية.** اضبط `enable_social` على `true` لإضافة كتلة `email_social`: المنصات عبر الإنترنت التي تم تسجيل هذا العنوان فيها، مع أعداد لكل فئة وأي تفاصيل ملف شخصي متوفرة. تعني `profiles_registered: 0` أنه تم فحص المنصات ولم يتم العثور على العنوان في أي منها - وهي إجابة صالحة وخاضعة للفوترة. تغيب هذه الكتلة عند عدم طلب هذه الميزة الإضافية أو تعذر إكمال الفحص، ولا تتم فوترتها في تلك الحالة. تضيف الفوترة وحدة `email_social` واحدة لكل طلب بالإضافة إلى سعر هذا الـ endpoint نفسه.",
        "operationId": "post_v3email_risk",
        "x-didit-sdk": {
          "resource": "email",
          "method": "assess_risk",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/email/risk/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"email\": \"alice@example.com\",\n    \"country_code\": \"US\",\n    \"vendor_data\": \"lead-123\",\n    \"metadata\": {\"source\": \"signup_prescreen\"}\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.email.assess_risk(\n    email=\"alice@example.com\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.email.assessRisk({\n  email: \"alice@example.com\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Email.AssessRisk(ctx, didit.EmailRiskRequest{\n\tEmail: \"alice@example.com\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.EmailRiskRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.email().assessRisk(EmailRiskRequest.builder()\n        .email(\"alice@example.com\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->email->assessRisk([\n    'email' => 'alice@example.com',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.email.assess_risk(email: \"alice@example.com\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Email.AssessRiskAsync(new EmailRiskRequest\n{\n    Email = \"alice@example.com\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailRiskRequest"
              },
              "examples": {
                "Minimal": {
                  "summary": "احتساب درجة لعنوان بالقيم الافتراضية",
                  "value": {
                    "email": "alice@example.com"
                  }
                },
                "Full context": {
                  "summary": "احتساب الدرجة مع الإشارات وتلميح الدولة ومعرّفات الارتباط",
                  "value": {
                    "email": "alice@example.com",
                    "country_code": "US",
                    "signals": {
                      "ip": "192.0.2.1",
                      "device_id": "8F0B8FDD-C2CB-4387-B20A-56E9B2E5A0D2",
                      "device_platform": "web",
                      "os_version": "14.4",
                      "app_version": "1.2.34",
                      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15"
                    },
                    "vendor_data": "lead-123",
                    "metadata": {
                      "source": "signup_prescreen"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل تقييم المخاطر. افحص `status` لمعرفة القرار؛ رمز HTTP دائماً ما يكون `200` لعمليات البحث المكتملة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailRiskResponse"
                },
                "examples": {
                  "Clean address": {
                    "summary": "عنوان قابل للتسليم دون تعرض لأي اختراق",
                    "value": {
                      "request_id": "82397be9-5921-4970-a979-2d5b43e08b33",
                      "status": "Approved",
                      "email": {
                        "status": "Approved",
                        "email": "alice@example.com",
                        "is_breached": false,
                        "breaches": [],
                        "is_disposable": false,
                        "is_undeliverable": false,
                        "verification_attempts": 0,
                        "verified_at": null,
                        "warnings": [],
                        "lifecycle": [],
                        "matches": [],
                        "email_intelligence": {
                          "score": 4.0,
                          "deliverable": "high",
                          "breach_risk_level": "Low",
                          "breach_risk_index": 4,
                          "is_recent_breach": false,
                          "is_frequent_breached": false,
                          "is_disposable": false,
                          "is_free_domain": false,
                          "is_breached": false,
                          "no_of_breaches": 0,
                          "reason_codes": []
                        },
                        "enrichment": {
                          "score": 4.0,
                          "deliverable": "high",
                          "breach_risk_level": "Low",
                          "breach_risk_index": 4,
                          "is_recent_breach": false,
                          "is_frequent_breached": false,
                          "is_disposable": false,
                          "is_free_domain": false,
                          "is_breached": false,
                          "no_of_breaches": 0,
                          "reason_codes": []
                        }
                      },
                      "vendor_data": "lead-123",
                      "metadata": {
                        "source": "signup_prescreen"
                      },
                      "created_at": "2026-09-01T10:30:00.123456+00:00"
                    }
                  },
                  "Breached address": {
                    "summary": "العنوان موجود في اختراقات معروفة",
                    "value": {
                      "request_id": "d1e5c2a8-6f30-4c1a-8b2d-3e4f5a6b7c8d",
                      "status": "In Review",
                      "email": {
                        "status": "In Review",
                        "email": "bob@example.org",
                        "is_breached": true,
                        "breaches": [
                          {
                            "name": "ExampleBreach2023",
                            "domain": "example.org",
                            "breach_date": "2023-06-01",
                            "breach_emails_count": 1200000,
                            "description": "A data breach affecting example.org accounts.",
                            "logo_path": "https://logos.example.org/example.png",
                            "data_classes": [
                              "email_addresses",
                              "passwords"
                            ],
                            "is_verified": true
                          }
                        ],
                        "is_disposable": false,
                        "is_undeliverable": false,
                        "verification_attempts": 0,
                        "verified_at": null,
                        "warnings": [],
                        "lifecycle": [],
                        "matches": [],
                        "email_intelligence": {
                          "score": 58.0,
                          "deliverable": "high",
                          "breach_risk_level": "High",
                          "breach_risk_index": 72,
                          "is_recent_breach": true,
                          "is_frequent_breached": true,
                          "is_disposable": false,
                          "is_free_domain": true,
                          "is_breached": true,
                          "no_of_breaches": 4,
                          "reason_codes": [
                            {
                              "code": "IR-F784B630",
                              "direction": "risk",
                              "message": "Email's digital footprint diversity is Very Low",
                              "impact_level": "low"
                            }
                          ]
                        },
                        "enrichment": {
                          "score": 58.0,
                          "deliverable": "high",
                          "breach_risk_level": "High",
                          "breach_risk_index": 72,
                          "is_recent_breach": true,
                          "is_frequent_breached": true,
                          "is_disposable": false,
                          "is_free_domain": true,
                          "is_breached": true,
                          "no_of_breaches": 4,
                          "reason_codes": [
                            {
                              "code": "IR-F784B630",
                              "direction": "risk",
                              "message": "Email's digital footprint diversity is Very Low",
                              "impact_level": "low"
                            }
                          ]
                        }
                      },
                      "vendor_data": "lead-125",
                      "metadata": null,
                      "created_at": "2026-09-01T10:30:00.123456+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/EmailRiskValidationError"
          },
          "403": {
            "$ref": "#/components/responses/RiskPermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/ip/risk/": {
      "post": {
        "summary": "احتساب درجة المخاطر لعنوان IP",
        "description": "إرجاع الموقع الجغرافي، وملكية الشبكة، ومؤشرات VPN/Tor ومراكز البيانات، وبيانات التهديدات، و`country_mismatch` لعنوان IP محدد. ينشئ هذا الـ endpoint جلسة API ويعيد معرفها كـ `request_id`.\n\n**القرار.** تكون `status` هي `In Review` عندما تتعارض الدولة المحددة مع `claimed_country`، أو عندما يرتبط العنوان ببنية تحتية لـ VPN أو Tor أو مركز بيانات. وإلا فإنها تكون `Approved`.\n\n**بذل أقصى جهد.** يُقدم إثراء IP بأقصى جهد ممكن. إذا لم يُرجع أي مصدر إثراء بيانات قابلة للاستخدام، يُرجع الـ endpoint استجابة مقبولة مع `ip.ip_address: null` و`ip.country_mismatch: null` وكائن `ip.threat` فارغ.\n\n**الفوترة.** تستخدم الاستدعاءات في بيئة الإنتاج أسعار IP Risk API. يكون الطلب خاضعاً للفوترة بمجرد بدء عملية البحث.\n\n**البيئة التجريبية.** تتحقق مفاتيح البيئة التجريبية من صحة الطلب وتعيد بيانات مقبولة محددة مسبقاً دون استهلاك أرصدة، أو إنشاء جلسة، أو المساهمة في Networks.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة `403` - لا تُرجع هذه الـ API أبداً `401`.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب في الدقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE (تمتلك عمليات إنشاء المعاملات واستيعاب الأحداث ميزانية منفصلة تبلغ 600).",
        "operationId": "post_v3ip_risk",
        "x-didit-sdk": {
          "resource": "ip",
          "method": "assess_risk",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/ip/risk/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"ip_address\": \"8.8.8.8\",\n    \"claimed_country\": \"ESP\",\n    \"user_agent\": \"Mozilla/5.0\",\n    \"vendor_data\": \"lead-123\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.ip.assess_risk(\n    ip_address=\"8.8.8.8\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.ip.assessRisk({\n  ip_address: \"8.8.8.8\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IP.AssessRisk(ctx, didit.IPRiskRequest{\n\tIPAddress: \"8.8.8.8\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.IPRiskRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.ip().assessRisk(IPRiskRequest.builder()\n        .ipAddress(\"8.8.8.8\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->ip->assessRisk([\n    'ip_address' => '8.8.8.8',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.ip.assess_risk(ip_address: \"8.8.8.8\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Ip.AssessRiskAsync(new IPRiskRequest\n{\n    IpAddress = \"8.8.8.8\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IPRiskRequest"
              },
              "examples": {
                "Minimal": {
                  "summary": "احتساب درجة لعنوان بالقيم الافتراضية",
                  "value": {
                    "ip_address": "8.8.8.8"
                  }
                },
                "With claimed country": {
                  "summary": "احتساب الدرجة مع تحديد دولة مدعاة لكشف عدم التطابق",
                  "value": {
                    "ip_address": "8.8.8.8",
                    "claimed_country": "ESP",
                    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15",
                    "vendor_data": "lead-123"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل تقييم المخاطر. افحص `status` لمعرفة القرار؛ رمز HTTP دائماً ما يكون `200` لعمليات البحث المكتملة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IPRiskResponse"
                },
                "examples": {
                  "Clean residential IP": {
                    "summary": "عنوان السكن، الدولة المُصرَّح بها متطابقة",
                    "value": {
                      "request_id": "9a96ed2a-721e-4b86-8cbf-d61eda529279",
                      "status": "Approved",
                      "ip": {
                        "status": "Approved",
                        "ip_address": "192.0.2.10",
                        "ip_country": "Spain",
                        "ip_country_code": "ES",
                        "ip_state": "Madrid",
                        "ip_city": "Madrid",
                        "latitude": 40.4168,
                        "longitude": -3.7038,
                        "isp": "Example Telecom",
                        "organization": "Example Telecom SA",
                        "is_vpn_or_tor": false,
                        "is_data_center": false,
                        "time_zone": "Europe/Madrid",
                        "time_zone_offset": "+0200",
                        "asn_number": 3352,
                        "asn_organization": "EXAMPLE-TELECOM",
                        "connection_type": "broadband",
                        "carrier": "Example Telecom",
                        "proxy_type": null,
                        "claimed_country": "ESP",
                        "country_mismatch": false,
                        "threat": {}
                      },
                      "vendor_data": "lead-123",
                      "metadata": null,
                      "created_at": "2026-09-01T10:30:00.123456+00:00"
                    }
                  },
                  "Datacenter mismatch": {
                    "summary": "عنوان مركز بيانات يتعارض مع الدولة المزعومة",
                    "value": {
                      "request_id": "5b1d4e9a-3c7b-4f8e-9a2d-1b0c9d8e7f6a",
                      "status": "In Review",
                      "ip": {
                        "status": "In Review",
                        "ip_address": "8.8.8.8",
                        "ip_country": "United States",
                        "ip_country_code": "US",
                        "ip_state": "California",
                        "ip_city": "Mountain View",
                        "latitude": 37.386,
                        "longitude": -122.0838,
                        "isp": "Google",
                        "organization": "Google LLC",
                        "is_vpn_or_tor": true,
                        "is_data_center": true,
                        "time_zone": "America/Los_Angeles",
                        "time_zone_offset": "-0700",
                        "asn_number": 15169,
                        "asn_organization": "GOOGLE, US",
                        "connection_type": "hosting",
                        "carrier": null,
                        "proxy_type": "VPN",
                        "claimed_country": "ESP",
                        "country_mismatch": true,
                        "threat": {
                          "is_proxy": true,
                          "is_data_center": true,
                          "is_tor": false
                        }
                      },
                      "vendor_data": "lead-126",
                      "metadata": null,
                      "created_at": "2026-09-01T10:30:00.123456+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IPRiskValidationError"
          },
          "403": {
            "$ref": "#/components/responses/RiskPermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/phone/risk/": {
      "post": {
        "summary": "احتساب درجة المخاطر لرقم هاتف",
        "description": "حلّل رقم هاتف واسترجع إشارات المشغّل، ونوع الخط، ونقل الرقم، والأرقام المؤقتة، ومطابقة الجلسات المتعددة، ومؤشرات استخبارات المخاطر الموحدة دون إرسال OTP. يُنشئ هذا الـ endpoint جلسة API ويعيد مُعرّفها كـ `request_id`.\n\n**القرار.** يعكس الحقل `status` من المستوى الأعلى حالة `phone.status`. وتكون قيمته عادةً `Approved`؛ كما يمكن لتقييم المخاطر أن يُسفر عن `In Review` أو `Declined`.\n\n**الأسماء البديلة للتوافقية.** تُظهر الاستجابات الحية كائن الاستخبارات الموحد باسم `phone.phone_intelligence` و`phone.enrichment` على حد سواء. وتكون القيم متطابقة تماماً. يمكن لعمليات التكامل الجديدة قراءة `phone.enrichment`. ويغيب كلا المفتاحين عند عدم إرجاع أي بيانات استخباراتية قابلة للاستخدام.\n\n**الفوترة.** تستخدم الاستدعاءات الحية تسعير Phone Risk API. ويخضع الطلب للفوترة بمجرد بدء عملية البحث، حتى لو تعذّر توفير بعض الحقول رغم بذل أفضل جهد.\n\n**البيئة التجريبية.** تتحقق مفاتيح البيئة التجريبية من صحة الطلب وتُرجع بيانات مقبولة محددة مسبقاً دون إرسال OTP، أو استهلاك الرصيد، أو إنشاء جلسة، أو المساهمة في Networks.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة الرمز `403` - لا تُرجع واجهة API هذه الرمز `401` أبداً.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب في الدقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE (تتمتع عمليات إنشاء المعاملات واستيعاب الأحداث بميزانية منفصلة تبلغ 600).\n\n**البصمة الاجتماعية.** اضبط `enable_social` على `true` لإضافة كتلة `phone_social`: المنصات الإلكترونية المسجل عليها هذا الرقم، مع أعداد لكل فئة وأي تفاصيل ملف شخصي متاحة. وتعني `profiles_registered: 0` أنه تم فحص المنصات ولم يتم العثور على الرقم في أي منها - وهي استجابة صالحة وخاضعة للفوترة. تغيب هذه الكتلة إذا لم يتم طلب الميزة الإضافية أو تعذر إكمال الفحص، ولا تتم فوترتها في تلك الحالة. تُضيف الفوترة وحدة `phone_social` واحدة لكل طلب علاوة على السعر الخاص بهذا الـ endpoint نفسه.",
        "operationId": "post_v3phone_risk",
        "x-didit-sdk": {
          "resource": "phone",
          "method": "assess_risk",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/phone/risk/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone_number\": \"+14155552671\",\n    \"country_code\": \"US\",\n    \"vendor_data\": \"lead-123\",\n    \"metadata\": {\"source\": \"signup_prescreen\"}\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.phone.assess_risk(\n    phone_number=\"+14155552671\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.phone.assessRisk({\n  phone_number: \"+14155552671\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Phone.AssessRisk(ctx, didit.PhoneRiskRequest{\n\tPhoneNumber: \"+14155552671\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.PhoneRiskRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.phone().assessRisk(PhoneRiskRequest.builder()\n        .phoneNumber(\"+14155552671\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->phone->assessRisk([\n    'phone_number' => '+14155552671',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.phone.assess_risk(phone_number: \"+14155552671\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Phone.AssessRiskAsync(new PhoneRiskRequest\n{\n    PhoneNumber = \"+14155552671\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneRiskRequest"
              },
              "examples": {
                "Minimal": {
                  "summary": "احتساب درجة لرقم بالقيم الافتراضية",
                  "value": {
                    "phone_number": "+14155552671"
                  }
                },
                "Full context": {
                  "summary": "احتساب الدرجة مع الإشارات وتلميح الدولة ومعرّفات الارتباط",
                  "value": {
                    "phone_number": "+14155552671",
                    "country_code": "US",
                    "signals": {
                      "ip": "192.0.2.1",
                      "device_id": "8F0B8FDD-C2CB-4387-B20A-56E9B2E5A0D2",
                      "device_platform": "ios",
                      "device_model": "iPhone17,2",
                      "os_version": "18.0.1",
                      "app_version": "1.2.34",
                      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1"
                    },
                    "vendor_data": "lead-123",
                    "metadata": {
                      "source": "signup_prescreen"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل تقييم المخاطر. افحص `status` لمعرفة القرار؛ رمز HTTP دائماً ما يكون `200` لعمليات البحث المكتملة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneRiskResponse"
                },
                "examples": {
                  "Clean mobile number": {
                    "summary": "رقم هاتف محمول مُنقّى مع تغطية معلوماتية",
                    "value": {
                      "request_id": "4fd09d2e-9bc9-4c4e-9c46-7f625ac0ab62",
                      "status": "Approved",
                      "phone": {
                        "status": "Approved",
                        "phone_number_prefix": "+1",
                        "phone_number": "4155552671",
                        "full_number": "+14155552671",
                        "country_code": "US",
                        "country_name": "United States",
                        "carrier": {
                          "name": "Example Mobile",
                          "type": "mobile"
                        },
                        "is_disposable": false,
                        "is_virtual": false,
                        "verification_method": null,
                        "verification_attempts": 0,
                        "verified_at": null,
                        "warnings": [],
                        "lifecycle": [],
                        "matches": [],
                        "phone_intelligence": {
                          "score": 3.0,
                          "phone_type_risk": "Low",
                          "phone_trust_index": 97,
                          "network_stability_index": 95,
                          "is_disposable": false,
                          "is_ported": false,
                          "is_recently_ported": false,
                          "carrier_type": "mobile",
                          "reason_codes": []
                        },
                        "enrichment": {
                          "score": 3.0,
                          "phone_type_risk": "Low",
                          "phone_trust_index": 97,
                          "network_stability_index": 95,
                          "is_disposable": false,
                          "is_ported": false,
                          "is_recently_ported": false,
                          "carrier_type": "mobile",
                          "reason_codes": []
                        }
                      },
                      "vendor_data": "lead-123",
                      "metadata": {
                        "source": "signup_prescreen"
                      },
                      "created_at": "2026-09-01T10:30:00.123456+00:00"
                    }
                  },
                  "Number in review": {
                    "summary": "رقم مؤقت أو افتراضي تم وضع علامة عليه للمراجعة",
                    "value": {
                      "request_id": "8c22e1f0-4b3d-4a3a-9d1e-2f6b7c8d9e0f",
                      "status": "In Review",
                      "phone": {
                        "status": "In Review",
                        "phone_number_prefix": "+44",
                        "phone_number": "7700900123",
                        "full_number": "+447700900123",
                        "country_code": "GB",
                        "country_name": "United Kingdom",
                        "carrier": {
                          "name": "Example VoIP",
                          "type": "voip"
                        },
                        "is_disposable": true,
                        "is_virtual": true,
                        "verification_method": null,
                        "verification_attempts": 0,
                        "verified_at": null,
                        "warnings": [],
                        "lifecycle": [],
                        "matches": [],
                        "phone_intelligence": {
                          "score": 72.0,
                          "phone_type_risk": "High",
                          "phone_trust_index": 28,
                          "network_stability_index": 40,
                          "is_disposable": true,
                          "is_ported": true,
                          "is_recently_ported": true,
                          "carrier_type": "voip",
                          "reason_codes": [
                            {
                              "code": "IR-5AC67A32",
                              "direction": "risk",
                              "message": "Phone type identified as non-mobile",
                              "impact_level": "medium"
                            }
                          ]
                        },
                        "enrichment": {
                          "score": 72.0,
                          "phone_type_risk": "High",
                          "phone_trust_index": 28,
                          "network_stability_index": 40,
                          "is_disposable": true,
                          "is_ported": true,
                          "is_recently_ported": true,
                          "carrier_type": "voip",
                          "reason_codes": [
                            {
                              "code": "IR-5AC67A32",
                              "direction": "risk",
                              "message": "Phone type identified as non-mobile",
                              "impact_level": "medium"
                            }
                          ]
                        }
                      },
                      "vendor_data": "lead-124",
                      "metadata": null,
                      "created_at": "2026-09-01T10:30:00.123456+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PhoneRiskValidationError"
          },
          "403": {
            "$ref": "#/components/responses/RiskPermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/": {
      "post": {
        "summary": "أنشئ جلسة تحقق",
        "description": "أنشئ جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB) واحصل على `url` لصفحة التحقق المستضافة بالإضافة إلى `session_token` لإعادة توجيه المستخدم النهائي إليها أو تضمينها له. يحدد `workflow_id` خطوات التحقق التي ستُنفَّذ وما إذا كانت الجلسة KYC أم KYB.\n\nاستدعِ هذا الـ endpoint من خادمك الخلفي (وليس من المتصفح مطلقًا — فمفتاح API سرّي) كلما تطلب الأمر التحقق من مستخدم أو شركة: عند التسجيل، أو قبل إجراء حساس، أو عند الحاجة إلى إعادة التحقق. المتطلبات المسبقة: سير عمل منشور (تم إنشاؤه في صفحة [Workflows](https://docs.didit.me/ar/console/workflows) في Console) ومفتاح API للتطبيق مع رصيد متاح. تتجاوز تطبيقات البيئة التجريبية التحقق من الرصيد.\n\n**Idempotency:** عند توفير `vendor_data` ووجود جلسة غير مكتملة بالفعل (`Not Started` أو `In Progress` أو `Resubmitted` أو `Awaiting User`) تحمل نفس `vendor_data` على **أحدث إصدار منشور حاليًا** لسير العمل (وكان لتلك الجلسة بالفعل رابط تحقق مستضاف)، يتم إرجاع الجلسة الحالية (مع بقاء الرمز `201`) بدلاً من إنشاء جلسة مكررة — مع تحديث `callback` و`metadata` بالقيم المقدمة حديثًا. الجلسة غير المكتملة التي تم إنشاؤها على إصدار أقدم من سير العمل (إصدار أُعيد نشره منذ ذلك الحين) **لا** يُعاد استخدامها؛ بل يتم إنشاء جلسة جديدة مرتبطة بأحدث إصدار منشور بدلاً من ذلك. لا يُعاد أبدًا استخدام الجلسات التي تكون في حالات `Approved` أو `Declined` أو `In Review` أو `Expired` أو `Abandoned` أو `Kyc Expired`.\n\n**الآثار الجانبية:** يتم إنشاء عنوان URL لصفحة التحقق المستضافة وتخزينه؛ وإذا كان `contact_details.send_notification_emails` بقيمة `true` مع تقديم بريد إلكتروني، فسيتم إرسال بريد إلكتروني لدعوة التحقق. تنتهي صلاحية الجلسة بعد وقت انتهاء صلاحية الجلسة المحدّد في سير العمل. بالنسبة لسير عمل KYB، يتم تجاهل `contact_details.phone` و`expected_details`.",
        "operationId": "post_v3_session_create",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء الجلسة (أو إرجاعها، إذا كانت هناك جلسة غير مكتملة بنفس قيمة `vendor_data` موجودة بالفعل في أحدث إصدار منشور من سير العمل). الاستجابة هي الجلسة المُسلسَلة، بما في ذلك عنوان `url` لصفحة التحقق المستضافة لإعادة توجيه المستخدم إليها.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "session_id",
                    "session_number",
                    "session_token",
                    "url",
                    "vendor_data",
                    "metadata",
                    "status",
                    "workflow_id",
                    "workflow_version",
                    "callback"
                  ],
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "المعرّف الفريد لجلسة التحقق. استخدم هذا المعرّف عند استدعاء `GET /v3/session/{sessionId}/decision/`.",
                      "example": "11111111-2222-3333-4444-555555555555"
                    },
                    "session_number": {
                      "type": "integer",
                      "description": "رقم تسلسلي ومقروء بوضوح يُعيّن للجلسة داخل تطبيقك. مفيد للدعم ولوحات التحكم.",
                      "example": 43762
                    },
                    "session_token": {
                      "type": "string",
                      "description": "رمز token آمن لعناوين URL مكوّن من 12 حرفاً يمنح المستخدم النهائي الإذن بالوصول إلى تدفق التحقق المستضاف على `url`. صالح حتى انتهاء صلاحية الجلسة. تعامل معه كسرٍ — يمكن لأي شخص يحمله فتح تدفق التحقق لهذه الجلسة.",
                      "example": "3FaJ9wLqX2Mz"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "رابط التحقق المستضاف لإعادة توجيه المستخدم النهائي إليه. يتضمن الرابط `session_token`، وإذا تم تكوينه، يستخدم نطاق العلامة البيضاء الخاص بك. عندما يتضمن الطلب `language`، يحتوي الرابط على جزء مسار اللغة — `https://verify.didit.me/{language}/session/{session_token}` (مثل `/es/session/...`)؛ وبدون `language`، يتم حذف هذا الجزء.",
                      "example": "https://verify.didit.me/session/3FaJ9wLqX2Mz"
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "المعرّف الذي مرّرته في الطلب لربط الجلسة بمستخدم أو شركة في نظامك الخاص. يُعاد نصياً كما هو. ويكون Null عند عدم تقديمه.",
                      "example": "user-123"
                    },
                    "metadata": {
                      "description": "payload بصيغة JSON عشوائية قمت بتخزينها مع الجلسة وقت الإنشاء. يتم إرجاعها كما هي تماماً — أياً كانت قيمة JSON التي أرسلتها (كائن، نص، رقم، مصفوفة) يتم إرجاعها بحالتها، مع أنه يُوصى باستخدام كائن JSON. لا تظهر للمستخدم النهائي. تظهر دائماً في الاستجابات؛ وتكون `null` عند عدم تقديمها وقت الإنشاء.",
                      "example": {
                        "user_type": "premium",
                        "account_id": "ABC123"
                      }
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "الوسوم الموجودة في الجلسة، حسب الاسم.",
                      "example": [
                        "VIP",
                        "ONBOARDING Q4"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Not Started",
                        "In Progress",
                        "Approved",
                        "Declined",
                        "In Review",
                        "Expired",
                        "Abandoned",
                        "Kyc Expired",
                        "Resubmitted",
                        "Awaiting User"
                      ],
                      "description": "الحالة الحالية للجلسة. ترجع الجلسات المنشأة حديثاً الحالة `Not Started`. إذا كانت هناك جلسة غير مكتملة موجودة بالفعل لنفس `vendor_data` في أحدث إصدار منشور من سير العمل، فإن الحالة المرجعة تعكس تلك الجلسة الحالية.",
                      "example": "Not Started"
                    },
                    "callback": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط إعادة التوجيه النهائي الذي يُرسل إليه المستخدم بعد إكمال سير العمل. يلحق Didit المعاملين `?verificationSessionId={session_id}&status={status}` بهذا الرابط. يتم الرجوع إلى رابط الاستدعاء المهيأ لسير العمل عند عدم تقديمه في الطلب؛ ويكون `null` إذا لم يتم تعيين أي منهما. عندما يحتوي التطبيق على نطاقات مسموح بها وكان هذا الرابط رابط ويب خارجها (على سبيل المثال، القيمة الافتراضية لسير العمل التي تم تعيينها قبل تغيير القائمة)، فإن سير العمل المستضاف لا يعيد توجيه المستخدم إليه.",
                      "example": "https://example.com/verification/callback"
                    },
                    "workflow_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف ثابت لسير العمل الذي تعمل عليه هذه الجلسة. يكون دائماً معرّف المجموعة الثابت لسير العمل — حتى إذا أشرت إلى UUID لإصدار سير عمل محدد في الطلب (بحث متوافق مع الإصدارات السابقة)، فإن الاستجابة تحمل `workflow_id` الثابت. استخدمه لربط الجلسة بسير العمل الذي قمت بتهيئته في Console.",
                      "example": "11111111-2222-3333-4444-555555555555"
                    },
                    "workflow_version": {
                      "type": "integer",
                      "description": "رقم إصدار سير العمل المنشور الذي تم تثبيت الجلسة عليه عند الإنشاء. تحل Didit قيمة `workflow_id` إلى أحدث إصدار منشور من سير العمل عند إنشاء الجلسة، وتستمر الجلسة في تشغيل هذا الإصدار حتى إذا أُعيد نشر سير العمل لاحقاً.",
                      "example": 3
                    }
                  }
                },
                "examples": {
                  "KYC session": {
                    "summary": "تم إنشاء جلسة KYC",
                    "value": {
                      "session_id": "11111111-2222-3333-4444-555555555555",
                      "session_number": 43762,
                      "session_token": "3FaJ9wLqX2Mz",
                      "url": "https://verify.didit.me/en/session/3FaJ9wLqX2Mz",
                      "vendor_data": "user-123",
                      "metadata": {
                        "user_type": "premium",
                        "account_id": "ABC123"
                      },
                      "status": "Not Started",
                      "workflow_id": "11111111-2222-3333-4444-555555555555",
                      "workflow_version": 3,
                      "callback": "https://example.com/verification/callback"
                    }
                  },
                  "KYB session": {
                    "summary": "تم إنشاء جلسة KYB",
                    "value": {
                      "session_id": "22222222-3333-4444-5555-666666666666",
                      "session_number": 43763,
                      "session_token": "Yk7pQ2vN8aBc",
                      "url": "https://verify.didit.me/en/session/Yk7pQ2vN8aBc",
                      "vendor_data": "company-acme-001",
                      "metadata": {
                        "tier": "enterprise"
                      },
                      "status": "Not Started",
                      "workflow_id": "33333333-4444-5555-6666-777777777777",
                      "workflow_version": 1,
                      "callback": "https://example.com/kyb/callback"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "طلب غير صالح — فشل التحقق من صحة الـ payload (معرّف `workflow_id` مفقود أو غير معروف، أو `language` غير صالحة، أو `vendor_data` مدرجة في قائمة الحظر، أو `portrait_image` غير صحيحة، أو `address` بدون `country`/`poa_country`، أو `sandbox_scenario` غير صالح، أو مستندات أو حقول أو قيم `sign` ترفضها خطوة التوقيع الإلكتروني في سير العمل، مثل `signature_document_not_supported`، أو `signature_document_conversion_failed`، أو `field_anchor_not_found`، أو `field_value_missing`، وما إلى ذلك) أو أن مؤسستك لا تملك رصيدًا كافيًا لبدء الجلسة.\n\nجسم الاستجابة هو كائن مفاتيحه اسم الحقل المخالف (أو `detail` للأخطاء غير المرتبطة بحقل معين). تكون القيم **مصفوفة من السلاسل النصية** لحالات فشل التحقق من صحة المدخلات (مثل حقل مطلوب مفقود، أو لغة غير صالحة، أو صورة شخصية كبيرة الحجم) و**سلسلة نصية بسيطة** لحالات الفشل المكتشفة أثناء إنشاء الجلسة (`workflow_id` غير معروف، أو `vendor_data` مدرجة في قائمة الحظر، أو عدم توفر وجه مرجعي لسير عمل مطابقة الوجه). تعامل مع كلا الشكلين.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة للأخطاء التي لا تتعلق بحقل معين (مثل عدم كفاية الرصيد). تستخدم حالات الفشل على مستوى الحقول اسم الحقل كمفتاح بدلاً من ذلك، مع قيمة نصية أو مصفوفة من النصوص.",
                      "example": "You don't have enough credits to perform this request. Please top up at https://business.didit.me"
                    }
                  }
                },
                "examples": {
                  "Missing workflow_id": {
                    "summary": "تم إغفال حقل مطلوب (بصيغة مصفوفة من النصوص)",
                    "value": {
                      "workflow_id": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid workflow_id": {
                    "summary": "‏workflow_id غير معروف (صيغة سلسلة نصية بسيطة)",
                    "value": {
                      "workflow_id": "Invalid workflow_id."
                    }
                  },
                  "Insufficient credits": {
                    "summary": "نفد رصيد المؤسسة",
                    "value": {
                      "detail": "You don't have enough credits to perform this request. Please top up at https://business.didit.me"
                    }
                  },
                  "Blocklisted vendor_data": {
                    "summary": "vendor_data مدرج في قائمة الحظر",
                    "value": {
                      "vendor_data": "This user or business has been blocked and cannot create new verification sessions."
                    }
                  },
                  "Portrait image too large": {
                    "summary": "فشل التحقق من حجم portrait_image",
                    "value": {
                      "portrait_image": [
                        "Image size exceeds 2MB."
                      ]
                    }
                  },
                  "No stored face for vendor_data": {
                    "summary": "سير عمل مطابقة الوجه بدون portrait_image وبدون وجه مخزن لمستخدم vendor_data",
                    "value": {
                      "portrait_image": "No stored face image was found for this user. Send a portrait_image, or complete an approved verification with face liveness or an ID document for this vendor_data first."
                    }
                  },
                  "Portrait image required without vendor_data": {
                    "summary": "سير عمل مطابقة الوجه بدون portrait_image وبدون vendor_data",
                    "value": {
                      "portrait_image": "A portrait image is required to perform face match for this workflow. Send a portrait_image, or provide the vendor_data of a user with a previously stored face image to reuse it."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشلت المصادقة أو التفويض. يؤدي استخدام مفتاح خاطئ أو ملغى أو منتهي الصلاحية إلى إرجاع `401`. يُرجع endpoint الرمز `403` عندما يكون الرأس `x-api-key` مفقوداً أو يكون مفتاح API صالحاً ولكن العميل لا يملك إذناً لإنشاء جلسات في هذا التطبيق (على سبيل المثال، ينتمي مفتاح API إلى مؤسسة مختلفة). تشترك حالات الفشل هذه في نص الاستجابة `{\"detail\": \"You do not have permission to perform this action.\"}`. تأكد من وجود الرأس `x-api-key` وانتمائه إلى التطبيق المقصود، وأعد جلب مفتاح API للتطبيق عبر [Auth API](/ar/auth-api/get-credentials) إذا لزم الأمر، ثم أعد المحاولة.\n\n**التطبيق المحذوف:** لبضع دقائق بعد حذف تطبيق ما، قد يستجيب الطلب المُرسَل بأحد مفاتيح API الخاصة به بـ `{\"detail\": \"This application was deleted.\", \"code\": \"application_deleted\"}`. لا تُعد المحاولة: التطبيق ومفاتيح API الخاصة به لم يعودا موجودين. بعد تلك الدقائق القليلة، يُرفض المفتاح تماماً كأي مفتاح غير صالح آخر.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "You do not have permission to perform this action."
                    },
                    "code": {
                      "type": "string",
                      "description": "سبب مقروء آلياً، لا يتوفر إلا عند حدوث بعض حالات الفشل. `application_deleted`: مفتاح API يخص تطبيقاً تم حذفه.",
                      "example": "application_deleted"
                    }
                  },
                  "required": [
                    "detail"
                  ]
                },
                "examples": {
                  "Missing or invalid API key": {
                    "summary": "لا يوجد رأس `x-api-key` أو مفتاح API غير صالح",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "No permission": {
                    "summary": "لا يمكن للعميل إنشاء جلسات",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Application deleted": {
                    "summary": "مفتاح API لتطبيق محذوف",
                    "value": {
                      "detail": "This application was deleted.",
                      "code": "application_deleted"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل — أكثر من 600 طلب لإنشاء الجلسات خلال نافذة زمنية مدتها 60 ثانية من نفس مفتاح API / عنوان IP. تحقق من `Retry-After` وانتظر قبل إعادة المحاولة.\n\n**ملاحظة:** يحدد الكود المصدري أيضاً `FREE_SESSION_RATE_LIMIT` بمقدار 10 استدعاءات/دقيقة إلى جانب `PAID_SESSION_RATE_LIMIT=600` (`sessions/serializers/session.py`)، ولكن هذا الحد الأقصى للمستوى المجاني **لا يُطبق على هذا الـ endpoint في V3** — تفرض برمجية حد المعدل الوسيطة حد `SESSION_CREATE_RATE_LIMIT` البالغ 600/دقيقة بغض النظر عن الخطة. 600/دقيقة هو الحد الوحيد الذي يمكن أن تصل إليه هنا.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني التي يجب على المتصل انتظارها قبل إعادة محاولة إرسال الطلب.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 42
                }
              },
              "X-RateLimit-Limit": {
                "description": "الحد الأقصى لعدد الطلبات المسموح بها في نافذة الـ 60 ثانية الحالية للحد الذي تم تجاوزه (600 لإنشاء الجلسة session-create). غير موجود في متغير حصة البيئة التجريبية (sandbox-quota).",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-RateLimit-Remaining": {
                "description": "عدد الطلبات التي لا تزال مسموحة في النافذة الحالية للحد الذي تم تجاوزه. غير موجود في متغير حصة البيئة التجريبية (sandbox).",
                "schema": {
                  "type": "integer",
                  "minimum": 0,
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "ثواني epoch بتوقيت UTC عند إعادة تعيين نافذة حد المعدل الحالية. غير موجود في متغير حصة البيئة التجريبية.",
                "schema": {
                  "type": "integer",
                  "minimum": 0,
                  "example": 1747497600
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "تفسير سهل القراءة لتجاوز حد المعدل. استخدم هذه الرسالة لتحديد أي من الحدود الثلاثة تم بلوغه.",
                      "example": "Session creation rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                },
                "examples": {
                  "Session-create limit": {
                    "summary": "أكثر من 600 طلب لإنشاء الجلسات في الدقيقة",
                    "value": {
                      "detail": "Session creation rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  },
                  "Sandbox session quota": {
                    "summary": "تجاوز تطبيق البيئة التجريبية 500 جلسة خلال 24 ساعة",
                    "value": {
                      "detail": "Sandbox session quota exceeded (500 sessions per 24h). Wait for the window to reset. Expected available in 3600 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST 'https://verification.didit.me/v3/session/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"workflow_id\": \"11111111-2222-3333-4444-555555555555\",\n    \"vendor_data\": \"user-123\",\n    \"callback\": \"https://example.com/verification/callback\",\n    \"callback_method\": \"both\",\n    \"metadata\": {\"user_type\": \"premium\", \"account_id\": \"ABC123\"},\n    \"language\": \"en\",\n    \"contact_details\": {\n      \"email\": \"john.doe@example.com\",\n      \"send_notification_emails\": true,\n      \"email_lang\": \"en\",\n      \"phone\": \"+14155552671\"\n    },\n    \"expected_details\": {\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"date_of_birth\": \"1990-05-15\",\n      \"id_country\": \"USA\",\n      \"expected_document_types\": [\"P\", \"ID\"]\n    }\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.create(\n    workflow_id=\"11111111-2222-3333-4444-555555555555\",\n    vendor_data=\"user-123\",\n    callback=\"https://example.com/verification/callback\",\n    callback_method=\"both\",\n    metadata={\"user_type\": \"premium\", \"account_id\": \"ABC123\"},\n    language=\"en\",\n    contact_details={\n        \"email\": \"john.doe@example.com\",\n        \"send_notification_emails\": True,\n        \"email_lang\": \"en\",\n        \"phone\": \"+14155552671\",\n    },\n    expected_details={\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"date_of_birth\": \"1990-05-15\",\n        \"nationality\": \"USA\",\n        \"id_country\": \"USA\",\n        \"expected_document_types\": [\"P\", \"ID\"],\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.create({\n  workflow_id: \"11111111-2222-3333-4444-555555555555\",\n  vendor_data: \"user-123\",\n  callback: \"https://example.com/verification/callback\",\n  callback_method: \"both\",\n  metadata: { user_type: \"premium\", account_id: \"ABC123\" },\n  language: \"en\",\n  contact_details: {\n    email: \"john.doe@example.com\",\n    send_notification_emails: true,\n    email_lang: \"en\",\n    phone: \"+14155552671\",\n  },\n  expected_details: {\n    first_name: \"John\",\n    last_name: \"Doe\",\n    date_of_birth: \"1990-05-15\",\n    nationality: \"USA\",\n    id_country: \"USA\",\n    expected_document_types: [\"P\", \"ID\"],\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Create(ctx, didit.SessionsCreateParams{\n\tWorkflowID:     \"11111111-2222-3333-4444-555555555555\",\n\tVendorData:     didit.String(\"user-123\"),\n\tCallback:       didit.String(\"https://example.com/verification/callback\"),\n\tCallbackMethod: didit.Some(didit.SessionsCreateParamsCallbackMethod(\"both\")),\n\tMetadata:       didit.Some[any](map[string]any{\"user_type\": \"premium\", \"account_id\": \"ABC123\"}),\n\tLanguage:       didit.Some(didit.SessionsCreateParamsLanguage(\"en\")),\n\tContactDetails: didit.Some(didit.SessionsCreateParamsContactDetails{\n\t\tEmail:                  didit.String(\"john.doe@example.com\"),\n\t\tSendNotificationEmails: didit.Bool(true),\n\t\tEmailLang:              didit.Some(didit.SessionsCreateParamsContactDetailsEmailLang(\"en\")),\n\t\tPhone:                  didit.String(\"+14155552671\"),\n\t}),\n\tExpectedDetails: didit.Some(didit.SessionsCreateParamsExpectedDetails{\n\t\tFirstName:             didit.String(\"John\"),\n\t\tLastName:              didit.String(\"Doe\"),\n\t\tDateOfBirth:           didit.String(\"1990-05-15\"),\n\t\tNationality:           didit.String(\"USA\"),\n\t\tIDCountry:             didit.String(\"USA\"),\n\t\tExpectedDocumentTypes: didit.Some([]didit.SessionsCreateParamsExpectedDetailsExpectedDocumentTypes{\"P\", \"ID\"}),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.LocalDate;\nimport java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().create(SessionsCreateParams.builder()\n        .workflowId(\"11111111-2222-3333-4444-555555555555\")\n        .vendorData(\"user-123\")\n        .callback(\"https://example.com/verification/callback\")\n        .callbackMethod(SessionsCreateParams.CallbackMethod.of(\"both\"))\n        .metadata(Map.of(\"user_type\", \"premium\", \"account_id\", \"ABC123\"))\n        .language(SessionsCreateParams.Language.of(\"en\"))\n        .contactDetails(SessionsCreateParams.ContactDetails.builder()\n                .email(\"john.doe@example.com\")\n                .sendNotificationEmails(true)\n                .emailLang(SessionsCreateParams.ContactDetails.EmailLang.of(\"en\"))\n                .phone(\"+14155552671\")\n                .build())\n        .expectedDetails(SessionsCreateParams.ExpectedDetails.builder()\n                .firstName(\"John\")\n                .lastName(\"Doe\")\n                .dateOfBirth(LocalDate.parse(\"1990-05-15\"))\n                .nationality(\"USA\")\n                .idCountry(\"USA\")\n                .expectedDocumentTypes(List.of(SessionsCreateParams.ExpectedDetails.ExpectedDocumentTypes.of(\"P\"), SessionsCreateParams.ExpectedDetails.ExpectedDocumentTypes.of(\"ID\")))\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->create([\n    'workflow_id' => '11111111-2222-3333-4444-555555555555',\n    'vendor_data' => 'user-123',\n    'callback' => 'https://example.com/verification/callback',\n    'callback_method' => 'both',\n    'metadata' => ['user_type' => 'premium', 'account_id' => 'ABC123'],\n    'language' => 'en',\n    'contact_details' => [\n        'email' => 'john.doe@example.com',\n        'send_notification_emails' => true,\n        'email_lang' => 'en',\n        'phone' => '+14155552671',\n    ],\n    'expected_details' => [\n        'first_name' => 'John',\n        'last_name' => 'Doe',\n        'date_of_birth' => '1990-05-15',\n        'nationality' => 'USA',\n        'id_country' => 'USA',\n        'expected_document_types' => ['P', 'ID'],\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.create(\n  workflow_id: \"11111111-2222-3333-4444-555555555555\",\n  vendor_data: \"user-123\",\n  callback: \"https://example.com/verification/callback\",\n  callback_method: \"both\",\n  metadata: { user_type: \"premium\", account_id: \"ABC123\" },\n  language: \"en\",\n  contact_details: {\n    email: \"john.doe@example.com\",\n    send_notification_emails: true,\n    email_lang: \"en\",\n    phone: \"+14155552671\",\n  },\n  expected_details: {\n    first_name: \"John\",\n    last_name: \"Doe\",\n    date_of_birth: \"1990-05-15\",\n    nationality: \"USA\",\n    id_country: \"USA\",\n    expected_document_types: [\"P\", \"ID\"],\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.CreateAsync(new SessionsCreateParams\n{\n    WorkflowId = \"11111111-2222-3333-4444-555555555555\",\n    VendorData = \"user-123\",\n    Callback = \"https://example.com/verification/callback\",\n    CallbackMethod = new SessionsCreateParamsCallbackMethod(\"both\"),\n    Metadata = new Dictionary<string, object> { [\"user_type\"] = \"premium\", [\"account_id\"] = \"ABC123\" },\n    Language = new SessionsCreateParamsLanguage(\"en\"),\n    ContactDetails = new SessionsCreateParamsContactDetails\n    {\n        Email = \"john.doe@example.com\",\n        SendNotificationEmails = true,\n        EmailLang = new SessionsCreateParamsContactDetailsEmailLang(\"en\"),\n        Phone = \"+14155552671\",\n    },\n    ExpectedDetails = new SessionsCreateParamsExpectedDetails\n    {\n        FirstName = \"John\",\n        LastName = \"Doe\",\n        DateOfBirth = \"1990-05-15\",\n        Nationality = \"USA\",\n        IdCountry = \"USA\",\n        ExpectedDocumentTypes = new SessionsCreateParamsExpectedDetailsExpectedDocumentTypes[] { \"P\", \"ID\" },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "workflow_id"
                ],
                "properties": {
                  "workflow_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "معرّف ثابت لسير العمل الذي يحدد خطوات التحقق التي ستشغلها الجلسة. يتم إنشاء مسارات العمل وإدارتها في صفحة [مسارات العمل](/ar/console/workflows) في Console. يحدد `workflow_id` أيضاً بشكل ضمني ما إذا كانت الجلسة مخصصة لـ KYC أو KYB.",
                    "example": "11111111-2222-3333-4444-555555555555",
                    "x-readme-id": "0.0"
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "معرّف فريد للمستخدم الذي يتم التحقق منه، مثل UUID أو بريد إلكتروني أو معرّف مستخدم داخلي. يُستخدم هذا الحقل من أجل: (1) **تجميع المستخدمين** — يتم ربط الجلسات التي تحتوي على نفس vendor_data بنفس الملف التعريفي للمستخدم في تبويب Users. (2) **اكتشاف التكرار عبر الجلسات** — عند التحقق من تكرار الوجوه أو المستندات أو أرقام الهواتف أو رسائل البريد الإلكتروني أو عناوين IP أو بصمات الأجهزة، تُعامل الجلسات التي تحتوي على نفس vendor_data على أنها للمستخدم نفسه ويتم استبعادها من التطابقات. بدون vendor_data، تُعامل كل جلسة كمستخدم فريد وتظهر جميع حالات التكرار المحتملة. نوصي بشدة بتقديم vendor_data دائمًا لتقليل التشويش في اكتشاف التكرار.",
                    "example": "user-123",
                    "x-readme-id": "0.1"
                  },
                  "multi_account_segment": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "نطاق اختياري لكشف التكرار داخل مؤسستك. تقارن عمليات فحص تكرار الوجوه هذه الجلسة فقط بالجلسات الأخرى التي تحمل نفس الشريحة، بحيث لا تؤدي قواعد الحسابات المنفصلة (الحسابات الشخصية وحسابات الشركات، أو حساب واحد لكل عميل فرعي B2B) إلى الإبلاغ عن شخص يمتلك حساباً واحداً في كل منها بشكل مشروع. اتركه فارغاً لاستخدام النطاق الافتراضي الموحد، وهو ما تستخدمه كل جلسة حالياً. تتجاهل مطابقة قائمة الحظر وقائمة السماح هذا الحقل.",
                    "example": "business-accounts"
                  },
                  "callback": {
                    "type": "string",
                    "description": "رابط URL لإعادة توجيه المستخدم إليه بعد اكتمال التحقق. يُلحق Didit تلقائياً `verificationSessionId` و`status` (Approved، Declined، In Review) كمعاملات استعلام. مخططات URL المخصصة (مثل `myapp://`) مدعومة لعمليات الاستدعاء على الأجهزة المحمولة. إذا حُذف، يُستخدم `callback_url` الافتراضي لسير العمل. عندما يحتوي التطبيق على نطاقات مسموح بها (`allowed_domains` في `PATCH /v3/webhook/`)، يجب أن يكون استدعاء `http` أو `https` على أحد تلك الأصول (نفس المخطط والمضيف والمنفذ)، وإلا سيفشل الطلب برمز 400 على `callback`: `callback must be on one of the application's allowed domains: https://app.example.com`. تُقبل دائماً مخططات URL المخصصة.",
                    "example": "https://example.com/verification/callback",
                    "x-readme-id": "0.2"
                  },
                  "callback_method": {
                    "type": "string",
                    "description": "يحدد الجهاز الذي يجب أن يتعامل مع إعادة التوجيه إلى رابط الاستدعاء المقدم. استخدم `initiator` لإعادة توجيه الجهاز الذي بدأ سير العمل فقط، أو `completer` للجهاز الذي ينهيه، أو `both` للسماح لأي من الجهازين بتشغيل الاستدعاء. إذا لاحظت في أي وقت أن الاستدعاء لا يعمل بشكل موثوق، نوصي بتعيين هذه القيمة على `both`.",
                    "enum": [
                      "initiator",
                      "completer",
                      "both"
                    ],
                    "default": "initiator",
                    "example": "both",
                    "x-readme-id": "0.3"
                  },
                  "metadata": {
                    "description": "بيانات JSON عشوائية مخزنة مع الجلسة ويتم إرجاعها في الاستجابة وأحداث webhook. يتم قبول أي قيمة JSON (كائن، نص، رقم، مصفوفة)، ولكن يُوصى باستخدام كائن JSON لأزواج المفاتيح/القيم. لا تظهر للمستخدم النهائي. استخدمها لتمرير معرّفات الارتباط الخاصة بك، أو متغيرات اختبار A/B، أو سياق العمل.",
                    "example": {
                      "user_type": "premium",
                      "account_id": "ABC123"
                    },
                    "x-readme-id": "0.4"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "maxItems": 10,
                    "description": "العلامات المضافة إلى الجلسة عند إنشائها، بالاسم. ما يصل إلى 10، كل منها بحد أقصى 50 حرفاً. الأسماء غير حساسة لحالة الأحرف وتُخزّن بأحرف كبيرة. يتم إنشاء الاسم الذي ليس له وجود بعد في التطبيق كعلامة جديدة. تظهر العلامات على الجلسة في لوحة التحكم، حيث يمكنك التصفية بناءً عليها.",
                    "example": [
                      "VIP",
                      "ONBOARDING Q4"
                    ]
                  },
                  "language": {
                    "type": "string",
                    "description": "رمز اللغة (ISO 639-1) لواجهة عملية التحقق. يتحكم في اللغة المعروضة للمستخدم النهائي أثناء التحقق. إذا لم يتم توفيره، فسيتم اكتشاف لغة المتصفح واستخدامها تلقائياً. تحقق من جميع اللغات المدعومة [هنا](/ar/integration/supported-languages).",
                    "enum": [
                      "en",
                      "ar",
                      "bg",
                      "bn",
                      "bs",
                      "ca",
                      "cnr",
                      "cs",
                      "da",
                      "de",
                      "el",
                      "es",
                      "et",
                      "fa",
                      "fi",
                      "fr",
                      "he",
                      "hi",
                      "hr",
                      "hu",
                      "hy",
                      "id",
                      "it",
                      "ja",
                      "ka",
                      "kk",
                      "ko",
                      "ky",
                      "lt",
                      "lv",
                      "mk",
                      "mn",
                      "ms",
                      "nl",
                      "no",
                      "pl",
                      "pt-BR",
                      "pt",
                      "ro",
                      "ru",
                      "sk",
                      "sl",
                      "so",
                      "sq",
                      "sr",
                      "sv",
                      "th",
                      "tr",
                      "uk",
                      "uz",
                      "vi",
                      "zh-CN",
                      "zh-TW",
                      "zh"
                    ],
                    "example": "en",
                    "x-readme-id": "0.5"
                  },
                  "contact_details": {
                    "type": "object",
                    "description": "معلومات الاتصال الخاصة بالمستخدم التي يمكن استخدامها للإشعارات، وملء نماذج التحقق مسبقاً، والتحقق من رقم الهاتف. يتضمن ذلك عنوان البريد الإلكتروني، واللغة المفضلة للتواصل، ورقم الهاتف.",
                    "example": {
                      "email": "john.doe@example.com",
                      "send_notification_emails": true,
                      "email_lang": "en",
                      "phone": "+14155552671"
                    },
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email",
                        "description": "عنوان البريد الإلكتروني للمستخدم (مثل \"john.doe@example.com\") الذي سيتم استخدامه أثناء خطوة [التحقق من البريد الإلكتروني](/ar/core-technology/email-verification/overview). إذا لم يتم توفيره، يجب على المستخدم تقديمه أثناء مسار التحقق.",
                        "example": "john.doe@example.com",
                        "x-readme-id": "1.0"
                      },
                      "send_notification_emails": {
                        "type": "boolean",
                        "default": false,
                        "description": "إذا كانت القيمة true وتم توفير بريد إلكتروني، فإن Didit ترسل رسالة البريد الإلكتروني الأولية \"Verify your identity\" بشكل غير متزامن عند إنشاء جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB). ترسل Didit أيضاً إشعارات بحالة التحقق للجلسات التي تتطلب مراجعة يدوية إلى عنوان البريد الإلكتروني المقدّم (على سبيل المثال، من 'In Review' إلى 'Approved' أو 'Declined'). يساعد هذا المستخدمين على العودة إلى تطبيقك بمجرد اكتمال عملية التحقق الخاصة بهم. إذا قمت بتفعيل العلامة البيضاء للجلسة، فستكون رسالة البريد الإلكتروني المرسلة بعلامة بيضاء.",
                        "example": true,
                        "x-readme-id": "1.1"
                      },
                      "email_lang": {
                        "type": "string",
                        "description": "رمز اللغة (ISO 639-1) لإشعارات البريد الإلكتروني. يتحكم في لغة جميع اتصالات البريد الإلكتروني (مثل \"en\" و\"es\" و\"fr\"). لا يوجد افتراضي مخزن — عند حذفه، يعود البريد الإلكتروني لدعوة التحقق تلقائياً إلى اللغة الإنجليزية (`en`) في وقت الإرسال. التعداد أدناه هو مجرد لمحة سريعة؛ المصدر الفعلي المباشر للقيم المقبولة هو وثيقة [اللغات المدعومة](/ar/integration/supported-languages) — ارجع إليها دائماً قبل الاعتماد على رمز معين.",
                        "enum": [
                          "en",
                          "ar",
                          "bg",
                          "bn",
                          "bs",
                          "ca",
                          "cnr",
                          "cs",
                          "da",
                          "de",
                          "el",
                          "es",
                          "et",
                          "fa",
                          "fi",
                          "fr",
                          "he",
                          "hi",
                          "hr",
                          "hu",
                          "hy",
                          "id",
                          "it",
                          "ja",
                          "ka",
                          "kk",
                          "ko",
                          "ky",
                          "lt",
                          "lv",
                          "mk",
                          "mn",
                          "ms",
                          "nl",
                          "no",
                          "pl",
                          "pt-BR",
                          "pt",
                          "ro",
                          "ru",
                          "sk",
                          "sl",
                          "so",
                          "sq",
                          "sr",
                          "sv",
                          "th",
                          "tr",
                          "uk",
                          "uz",
                          "vi",
                          "zh-CN",
                          "zh-TW",
                          "zh"
                        ],
                        "example": "en",
                        "x-readme-id": "1.2"
                      },
                      "phone": {
                        "type": "string",
                        "description": "رقم الهاتف بتنسيق E.164 (على سبيل المثال، \"+14155552671\") الذي سيتم استخدامه أثناء خطوة [التحقق من رقم الهاتف](/ar/core-technology/phone-verification/overview). إذا لم يتم توفيره، يجب على المستخدم تقديمه أثناء سير عمل التحقق. يتم تجاهله في سير عمل التحقق من الشركات (KYB). **هام:** يتم فرض رقم الهاتف هذا فقط إذا كان رقم هاتف E.164 صالحاً. إذا كان الرقم المقدم غير صالح أو تعذر تحليله، فسيتم تجاهله وسيتمكن المستخدم من إدخال أي رقم هاتف صالح أثناء خطوة التحقق من رقم الهاتف.",
                        "example": "+14155552671",
                        "x-readme-id": "1.3"
                      }
                    },
                    "x-readme-id": "0.4"
                  },
                  "expected_details": {
                    "type": "object",
                    "description": "تفاصيل المستخدم المتوقعة المُستخدمة للتحقق المتبادل مقابل البيانات المستخرجة من مستند التحقق من الهوية الخاص بالمستخدم، وإثبات العنوان، وخطوات التحقق الأخرى. تظهر حالات عدم التطابق كتحذيرات في القرار؛ كما تؤدي بعض الحقول (مثل `id_country` و`expected_document_types`) أيضاً إلى تعديل سير العمل الموجه للمستخدم. بالنسبة لسير عمل التحقق من الشركات (KYB)، تُستخدم حقول الشركة فقط (`company_name` و`registry_country` و`registration_number`) — حيث تملأ مسبقاً البحث في سجل الشركات للمستخدم — ويتم تجاهل جميع الحقول على مستوى الشخص.",
                    "example": {
                      "first_name": "John",
                      "last_name": "Doe",
                      "date_of_birth": "1990-05-15",
                      "nationality": "USA",
                      "id_country": "USA",
                      "expected_document_types": [
                        "P",
                        "ID"
                      ]
                    },
                    "properties": {
                      "first_name": {
                        "type": "string",
                        "description": "الاسم الأول للمستخدم. على سبيل المثال، `John`. تستخدم المطابقة مقارنة تقريبية، ويمكنك ضبط مستوى الدقة من خلال تهيئة حد درجة تطابق الأسماء في لوحة التحكم لكل من سير عمل مستند الهوية وسير عمل إثبات العنوان.",
                        "example": "John",
                        "x-readme-id": "1.0"
                      },
                      "last_name": {
                        "type": "string",
                        "description": "اسم عائلة المستخدم. على سبيل المثال، `Doe`. تستخدم المطابقة مقارنة تقريبية، ويمكنك ضبط مستوى الدقة من خلال تهيئة حد درجة تطابق الأسماء في لوحة التحكم لكل من سير عمل مستند الهوية وإثبات العنوان.",
                        "example": "Doe",
                        "x-readme-id": "1.1"
                      },
                      "date_of_birth": {
                        "type": "string",
                        "format": "date",
                        "description": "تاريخ ميلاد المستخدم بالتنسيق: YYYY-MM-DD. على سبيل المثال، `1990-05-15`.",
                        "example": "1990-05-15",
                        "x-readme-id": "1.2"
                      },
                      "gender": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "M",
                          "F"
                        ],
                        "default": null,
                        "description": "جنس المستخدم. يجب أن يكون 'M' أو 'F' أو null.",
                        "example": "M",
                        "x-readme-id": "1.3"
                      },
                      "nationality": {
                        "type": "string",
                        "description": "رمز الدولة وفق المعيار ISO 3166-1 alpha-3 الذي يمثل بلد المنشأ لمقدم الطلب. على سبيل المثال، `USA`. راجع [القائمة الكاملة لرموز الدول المدعومة](https://docs.didit.me/ar/core-technology/id-verification/supported-documents-id-verification#المستندات-المدعومة-حسب-الدولة).",
                        "example": "USA",
                        "x-readme-id": "1.4"
                      },
                      "country": {
                        "type": "string",
                        "description": "رمز الدولة وفق المعيار ISO 3166-1 alpha-3 المُستخدم كخيار احتياطي لعمليات التحقق من عدم تطابق الدولة لكل من التحقق من الهوية وإثبات العنوان. مطلوب عند تقديم `address` وعدم تعيين أي من `id_country` أو `poa_country`.",
                        "example": "USA",
                        "x-readme-id": "1.4.1"
                      },
                      "id_country": {
                        "type": "string",
                        "description": "رمز الدولة وفق المعيار ISO 3166-1 alpha-3 الذي يمثل الدولة المتوقعة لمستند هوية مقدم الطلب، والتي قد تختلف عن الجنسية. على سبيل المثال، `GBR`. يحظى بالأولوية على `country` في عمليات التحقق من عدم تطابق دولة التحقق من الهوية. راجع [القائمة الكاملة لرموز الدول المدعومة](https://docs.didit.me/ar/core-technology/id-verification/supported-documents-id-verification#المستندات-المدعومة-حسب-الدولة).",
                        "example": "GBR",
                        "x-readme-id": "1.5"
                      },
                      "poa_country": {
                        "type": "string",
                        "description": "رمز الدولة وفق المعيار ISO 3166-1 alpha-3 الذي يمثل الدولة المتوقعة لمستند إثبات العنوان. على سبيل المثال، `USA`. يحظى بالأولوية على `country` في عمليات التحقق من عدم تطابق دولة إثبات العنوان (POA). راجع [القائمة الكاملة لرموز الدول المدعومة](https://docs.didit.me/ar/core-technology/id-verification/supported-documents-id-verification#المستندات-المدعومة-حسب-الدولة).",
                        "example": "USA",
                        "x-readme-id": "1.5.1"
                      },
                      "address": {
                        "type": "string",
                        "description": "العنوان بتنسيق مقروء للبشر، متضمناً أكبر قدر ممكن من المعلومات. على سبيل المثال، `123 Main St, San Francisco, CA 94105, USA`. عند تقديمه، يجب عليك أيضاً تمرير `country` أو `poa_country`، وإلا فسيفشل الطلب بالرمز `400`.",
                        "example": "123 Main St, San Francisco, CA 94105, USA",
                        "x-readme-id": "1.6"
                      },
                      "identification_number": {
                        "type": "string",
                        "description": "رقم مستند المستخدم، أو الرقم الشخصي، أو الرقم الضريبي. على سبيل المثال، `123456789`.",
                        "example": "123456789",
                        "x-readme-id": "1.7"
                      },
                      "ip_address": {
                        "type": "string",
                        "description": "عنوان IP المتوقع للجلسة، بتنسيق IPv4 أو IPv6. إذا اختلف عنوان IP الفعلي عن هذه القيمة، فسيتم تسجيل تحذير. على سبيل المثال، `192.168.1.100` أو `2001:db8::1`.",
                        "example": "192.168.1.100",
                        "x-readme-id": "1.8"
                      },
                      "expected_document_types": {
                        "type": "array",
                        "description": "يقيّد أنواع المستندات التي يمكن للمستخدم تقديمها أثناء خطوة التحقق من الهوية (OCR). عند التعيين، تعرض شاشة اختيار المستندات الأنواع المطلوبة فقط ويتم تصفية `documents_allowed` المُرجعة وفقاً لذلك. القيم غير حساسة لحالة الأحرف وتتم إزالة التكرارات منها؛ وتُرفض القيم غير المعروفة بالرمز `400`. الرموز المسموح بها: `P` (جواز السفر)، `ID` (بطاقة الهوية الوطنية)، `DL` (رخصة القيادة)، `RP` (تصريح الإقامة)، `HIC` (بطاقة التأمين الصحي)، `TC` (البطاقة الضريبية)، `SSC` (بطاقة الضمان الاجتماعي).",
                        "items": {
                          "type": "string",
                          "enum": [
                            "P",
                            "ID",
                            "DL",
                            "RP",
                            "HIC",
                            "TC",
                            "SSC"
                          ]
                        },
                        "example": [
                          "P",
                          "ID"
                        ],
                        "x-readme-id": "1.9"
                      },
                      "company_name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "الاسم القانوني المتوقع للشركة قيد التحقق. على سبيل المثال، `Tesco PLC`. يملأ مسبقاً حقل اسم الشركة في البحث في السجل ضمن سير عمل التحقق من الشركات (KYB)؛ وعند تقديم `registration_number` أيضاً، يجمع البحث في السجل بين كلا المعرّفين. يتم تجاهله في سير عمل KYC.",
                        "example": "Tesco PLC",
                        "x-readme-id": "1.10"
                      },
                      "registry_country": {
                        "type": "string",
                        "maxLength": 10,
                        "description": "رمز ISO 3166-1 alpha-2 للدولة التي تم تسجيل الشركة في سجل الشركات الخاص بها. على سبيل المثال، `GB`. عندما تعمل سجلات الشركات على مستوى الولاية أو المقاطعة، ألحق رمز التقسيم الفرعي ISO 3166-2 بصيغة `XX-YY`: يستهدف `US-CA` سجل كاليفورنيا. نفس تنسيق `country_code` في [KYB Registry Search API](https://docs.didit.me/ar/standalone-apis/kyb-registry-search). يحدد مسبقاً دولة السجل في مهام سير عمل التحقق من الشركات (KYB)؛ ويتم تجاهله في مهام سير عمل KYC.",
                        "example": "US-CA",
                        "x-readme-id": "1.11"
                      },
                      "registration_number": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "رقم التسجيل المتوقع للشركة في سجل الشركات. على سبيل المثال، `00445790`. يملأ مسبقاً حقل رقم التسجيل في البحث في السجل ضمن سير عمل التحقق من الشركات (KYB)؛ وعند تقديم `company_name` أيضاً، يجمع البحث في السجل بين كلا المعرّفين. يتم تجاهله في سير عمل KYC.",
                        "example": "00445790",
                        "x-readme-id": "1.12"
                      }
                    },
                    "x-readme-id": "0.5"
                  },
                  "portrait_image": {
                    "type": "string",
                    "format": "byte",
                    "description": "صورة شخصية لوجه المستخدم النهائي بترميز Base64 (بحد أقصى 2 ميغابايت؛ بصيغة JPEG أو PNG أو WebP أو TIFF). تُستخدم كصورة مرجعية لمطابقتها مع لقطة كشف الحيوية عندما يكون سير العمل عبارة عن سير عمل `Biometric Authentication` مع تفعيل مطابقة الوجه، أو أي سير عمل مخطط يتم فيه تشغيل مطابقة الوجه قبل التحقق من الهوية (OCR). اختيارية عندما يكون لدى مستخدم `vendor_data` صورة وجه مخزنة بالفعل: تعيد Didit استخدامها تلقائياً، وفقاً لترتيب الأولوية التالي: وجه من جلسة كشف حيوية مقبولة، صورة شريحة جواز السفر الإلكتروني، الصورة الشخصية في مستند الهوية، وجه الملف الشخصي المُسجّل يدوياً (يُعاد فقط استخدام الوجوه المأخوذة من جلسات مقبولة أو الوجوه التي سجّلتها بنفسك). عند تقديمها، تكون الأولوية دائماً لـ `portrait_image` على الوجه المخزن. في حال حذفها وعدم وجود وجه مخزن (أو عدم إرسال `vendor_data`)، يفشل إنشاء الجلسة بالرمز `400`. يتم تجاهلها لأنواع سير العمل الأخرى.",
                    "example": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",
                    "x-readme-id": "0.6"
                  },
                  "sandbox_scenario": {
                    "type": "string",
                    "description": "معرّف سيناريو مخصص للبيئة التجريبية فقط. يُقبل فقط عندما ينتمي مفتاح API إلى تطبيق في وضع البيئة التجريبية؛ ويُرفض في تطبيقات بيئة الإنتاج. عند تعيينه، يُوسّع تدفق الإنشاء القيم السحرية المرفقة بالسيناريو لتُدرج في حقول إدخال الجلسة (contact_details، expected_details) حتى يُعيد المزودون المحاكون إنتاج نتيجة السيناريو من خلال مسار سير العمل الفعلي. راجع كتالوج السيناريوهات عبر GET /v1/sandbox/scenarios/ أو [Sandbox & Test Data](/ar/integration/sandbox-testing). يمكنك أيضاً تجهيز (أو إعادة تجهيز) سيناريو بعد الإنشاء عبر POST /v3/session/{sessionId}/sandbox/arm/، طالما أن الجلسة لا تزال بحالة `Not Started`. لعمليات البحث غير المعتمدة على المستندات، استخدم `lookup_partial_match` أو `lookup_no_match` أو `lookup_provider_error` لاختبار ميزانية المحاولات المهيأة والرجوع التلقائي. لمحفظات الهوية، استخدم `wallet_cancelled` أو `wallet_timeout` أو `wallet_provider_error`؛ بينما يُحاكي `approve` محفظة تم التحقق منها. يمكن اختبار جميع المحافظ المدرجة في الكتالوج داخل البيئة التجريبية، بما في ذلك المخططات غير المتاحة في تطبيقات بيئة الإنتاج. لا تُحتسب أي رسوم على المحاولات المحاكاة.",
                    "example": "decline_document_expired"
                  },
                  "sign": {
                    "type": "object",
                    "description": "مدخلات التوقيع الإلكتروني لهذه الجلسة. `documents` هي المستندات المطلوب توقيعها، لسير عمل تتلقى فيه خطوة التوقيع الإلكتروني المستندات من الجلسة (`signature_documents_source` إما `session` أو `both`): بحد أقصى 20 مستنداً و50 ميغابايت إجمالاً. يملأ `field_values` الحقول التي يكون `prefill` الخاص بها هو `api.<key>`، في كل من مستندات سير العمل والجلسة على حد سواء. تؤدي إعادة إنشاء جلسة لنفس `workflow_id` و`vendor_data` إلى إرجاع الجلسة المعلقة؛ وإذا أرسل هذا الاستدعاء `sign`، فيجب أن تكون مستنداته وحقوله وقيمه مطابقة تماماً للمستندات والحقول والقيم الأولى، وأي اختلاف يُرجع `400` مع `{\"sign\": \"signature_document_changed\"}`. راجع [مستندات التوقيع الإلكتروني](/ar/sessions-api/create-session#مستندات-التوقيع-الإلكتروني).",
                    "properties": {
                      "documents": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 20,
                        "items": {
                          "$ref": "#/components/schemas/SessionSignDocument"
                        }
                      },
                      "field_values": {
                        "type": "object",
                        "description": "القيم المفهرسة بواسطة `<key>` لكل مصدر تعبئة مسبقة `api.<key>`: سلاسل نصية من 1 إلى 500 حرف لحقول `text` و`data`، وقيم منطقية لحقل `checkbox`. الرمز `400` مع `field_value_unknown` لمفتاح لا يستخدمه أي حقل، و`field_value_missing` لحقل مطلوب بدون قيمته، و`field_value_invalid` لقيمة تفشل في التحقق من صحة حقلها.",
                        "additionalProperties": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            {
                              "type": "boolean"
                            }
                          ]
                        },
                        "example": {
                          "credit_limit": "3,000 EUR"
                        }
                      }
                    }
                  },
                  "user_state": {
                    "type": "string",
                    "maxLength": 16,
                    "description": "مكان إقامة الشخص، عندما يكون معروفاً لديك: رمز قسم فرعي وفق معيار ISO 3166-2 (مثل `US-IL`، `ES-M`) أو رمز ولاية أمريكية أو اسمها (مثل `IL`، `Illinois`). الولاية التي يشترط قانونها الحصول على موافقة بيومترية صريحة (إلينوي، تكساس، كولورادو) تجعل سير عمل التحقق يطلبها قبل التقاط الوجه، مع المُشغِّل `declared_state`. تُرجع القيمة غير المعروفة الرمز `400`. راجع [الموافقة البيومترية](/ar/getting-started/biometric-consent).",
                    "example": "US-IL"
                  },
                  "biometric_consent": {
                    "type": "object",
                    "description": "الموافقة البيومترية الصريحة التي جمعتها بالفعل من الشخص. وهي تستوفي المتطلب، لذا لا يطلبها سير عمل التحقق مرة أخرى، ويسجلها القرار كـ `status: \"given\"` مع المُشغِّل `customer_collected`. لا يتم مطلقاً استبدال الإجابة التي قدمها الشخص بالفعل في سير العمل. راجع [الموافقة البيومترية](/ar/getting-started/biometric-consent).",
                    "required": [
                      "given_at",
                      "text_version"
                    ],
                    "properties": {
                      "given_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "متى قدم الشخص موافقة بيومترية صريحة (ISO 8601). لا يمكن أن تكون في المستقبل."
                      },
                      "text_version": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "معرّف إصدار نص الموافقة الذي قبله الشخص، في سجلاتك الخاصة."
                      }
                    }
                  }
                },
                "example": {
                  "workflow_id": "11111111-2222-3333-4444-555555555555",
                  "vendor_data": "user-123",
                  "callback": "https://example.com/verification/callback",
                  "callback_method": "both",
                  "metadata": {
                    "user_type": "premium",
                    "account_id": "ABC123"
                  },
                  "language": "en",
                  "contact_details": {
                    "email": "john.doe@example.com",
                    "send_notification_emails": true,
                    "email_lang": "en",
                    "phone": "+14155552671"
                  },
                  "expected_details": {
                    "first_name": "John",
                    "last_name": "Doe",
                    "date_of_birth": "1990-05-15",
                    "id_country": "USA",
                    "expected_document_types": [
                      "P",
                      "ID"
                    ]
                  }
                }
              },
              "examples": {
                "Create KYC session": {
                  "summary": "payload الكامل للمسار الناجح لجلسة التحقق من المستخدمين (KYC)",
                  "description": "استدعاء إنشاء واقعي يستخدم كل حقل يُضبط عادةً: اختيار سير العمل، وربط المورد، وتوجيه معاودة الاتصال، والبيانات الوصفية، والإعدادات المحلية، والتعبئة المسبقة لبيانات الاتصال، وتفاصيل المستخدم المتوقعة. انسخ هذا والصقه مباشرة في عينة cURL أعلاه.",
                  "value": {
                    "workflow_id": "11111111-2222-3333-4444-555555555555",
                    "vendor_data": "user-123",
                    "callback": "https://example.com/verification/callback",
                    "callback_method": "both",
                    "metadata": {
                      "user_type": "premium",
                      "account_id": "ABC123"
                    },
                    "language": "en",
                    "contact_details": {
                      "email": "john.doe@example.com",
                      "send_notification_emails": true,
                      "email_lang": "en",
                      "phone": "+14155552671"
                    },
                    "expected_details": {
                      "first_name": "John",
                      "last_name": "Doe",
                      "date_of_birth": "1990-05-15",
                      "nationality": "USA",
                      "id_country": "USA",
                      "expected_document_types": [
                        "P",
                        "ID"
                      ]
                    }
                  }
                },
                "Create KYB session": {
                  "summary": "payload لمسار النجاح لجلسة التحقق من الشركات (KYB)",
                  "description": "الشكل نفسه لاستدعاء KYC — معرّف `workflow_id` هو ما يجعل الجلسة مخصصة لـ KYB. يشير `vendor_data` عادةً إلى الشركة في نظامك ويستهدف `contact_details.email` الممثل القانوني الذي سيكمل التدفق. يقبل `expected_details` حقول الشركة (`company_name` و`registry_country` و`registration_number`)، والتي تملأ مسبقاً البحث في سجل الشركات؛ ويتم تجاهل الحقول على مستوى الأفراد و`contact_details.phone` في سير عمل KYB.",
                  "value": {
                    "workflow_id": "33333333-4444-5555-6666-777777777777",
                    "vendor_data": "company-acme-001",
                    "callback": "https://example.com/kyb/callback",
                    "callback_method": "both",
                    "metadata": {
                      "tier": "enterprise",
                      "company_id": "ACME-001"
                    },
                    "expected_details": {
                      "company_name": "Tesco PLC",
                      "registry_country": "GB",
                      "registration_number": "00445790"
                    },
                    "language": "en",
                    "contact_details": {
                      "email": "legal-rep@acme.example.com",
                      "send_notification_emails": true,
                      "email_lang": "en"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/session/imports/": {
      "post": {
        "summary": "أنشئ مهمة استيراد للتحقق",
        "description": "إنشاء مهمة استيراد غير متزامنة لجلسات التحقق من المستخدمين التاريخية، أو جلسات التحقق من الشركات (KYB)، أو سجلات مراقبة المعاملات، أو قواعد الحالات المخصصة لسير العمل. عيّن `source=provider` للترحيل من مزود آخر: يقرأ Didit كلاً من Sumsub وOnfido وPersona وComplyCube باستخدام مفتاحك المخصص للقراءة فقط، ويقرأ سجلات Veriff وiDenfy وMetaMap عبر المعرّفات التي ترفعها في `file`، ويستورد ملف تصدير بتنسيق Didit للمزودين الآخرين. تضاف مساحة أسماء إلى معرّفات السجلات بحسب المزود (`sumsub:<id>`) بحيث يتخطى تشغيل العملية مجدداً كل ما هو موجود بالفعل في Didit، كما يتم التعرف على السجل المستورد عبر ملف بالمعرّف المجرّد للمزود في كلا الاتجاهين، وبالتالي فإن التبديل بين استيراد ملف والترحيل من مزود لن يستورد سجلاً مرتين أبداً. يمكن للتطبيق تشغيل ما يصل إلى 4 مهام استيراد في وقت واحد؛ وتستأنف المهمة التي توقفت بسبب عملية نشر أو إعادة تشغيل عامل المعالجة من آخر صف تم استيراده تلقائياً. تكون عمليات الاستيراد معطلة افتراضياً ويجب تفعيلها لكل مؤسسة بواسطة Didit.",
        "operationId": "post_v3_session_imports_create",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "import_type": {
                    "type": "string",
                    "enum": [
                      "user_verification",
                      "business_verification",
                      "status_rules",
                      "transactions"
                    ],
                    "default": "user_verification",
                    "description": "ما سيتم استيراده: جلسات التحقق من المستخدمين التاريخية، أو جلسات التحقق من الشركات التاريخية، أو قواعد الحالة المخصصة لسير العمل، أو سجلات مراقبة المعاملات التاريخية."
                  },
                  "workflow_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "معرّف UUID لسير العمل الذي يجب إرفاق الجلسات المستوردة أو قواعد الحالة به. مطلوب لـ user_verification وbusiness_verification وstatus_rules. لا تُدرجه للمعاملات."
                  },
                  "source_format": {
                    "type": "string",
                    "enum": [
                      "csv",
                      "ndjson"
                    ],
                    "description": "اختياري. يُستنتج من امتداد الملف المرفوع عند حذفه."
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "ملف CSV أو NDJSON قياسي. استخدم NDJSON لعمليات الاستيراد الكبيرة. الحد الأقصى لحجم الرفع 25 ميغابايت (استخدم `source_file_url` للملفات الأكبر). يتعارض مع `source_file_url`."
                  },
                  "source_file_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "بديل لتحميل الملفات. يجب أن يكون رابط HTTPS يوجه إلى عنوان عام (يتم رفض الشبكات الخاصة أو شبكات الاسترجاع). لا يمكن استخدامه مع `file`."
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "file",
                      "provider"
                    ],
                    "description": "`provider` يجعل هذا نقلاً من مزود آخر للتحقق من الهوية. احذفه عند استيراد ملف."
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "sumsub",
                      "jumio",
                      "veriff",
                      "onfido",
                      "persona",
                      "metamap",
                      "socure",
                      "idnow",
                      "shufti",
                      "idenfy",
                      "ondato",
                      "trulioo",
                      "au10tix",
                      "complycube",
                      "other"
                    ],
                    "description": "مصدر الترحيل، من `GET /v3/session/imports/providers/`. مطلوب عندما يكون `source` هو `provider`."
                  },
                  "credentials": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "المفتاح المخصص للقراءة فقط الخاص بالمزود، بأسماء الحقول التي تسردها `credential_fields`. مشفر في وضع السكون، ولا يُعاد أبداً، ويتم محوه عند انتهاء الاستيراد. أرسله كسلسلة JSON نصية في multipart."
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "region": {
                        "type": "string",
                        "description": "منطقة المزود، إحدى `regions` التابعة له (Onfido: `eu`، `us`، `ca`)."
                      }
                    }
                  },
                  "status_mapping": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "Approved",
                        "Declined",
                        "In Review",
                        "Expired",
                        "Not Finished",
                        "Abandoned"
                      ]
                    },
                    "description": "تعديلات على تعيين الحالة الافتراضي للمزود: من حالة المصدر إلى حالة Didit. يتم تخطي الحالتين `Not Finished` و`Abandoned` وحسابهما، ولا يتم استيرادهما أبداً."
                  },
                  "dry_run": {
                    "type": "boolean",
                    "default": false,
                    "description": "حساب ما ستستورده عملية الترحيل (حسب الحالة، موجود بالفعل في Didit، نفس الشخص، غير مكتمل) وعدم كتابة أي شيء. تنتهي المهمة بالحالة `READY`؛ ابدأها باستخدام `POST /v3/session/imports/{importId}/start/`."
                  },
                  "face_templates": {
                    "type": "boolean",
                    "default": false,
                    "description": "إنشاء قوالب بيومترية للوجوه من صور السيلفي المستوردة والبحث عنها ومقارنتها بوجوه التطبيق وقائمة الحظر. يتم وضع علامة على التطابقات للمراجعة فقط. يتطلب `lawful_basis_confirmed`."
                  },
                  "lawful_basis_confirmed": {
                    "type": "boolean",
                    "default": false,
                    "description": "يؤكد أن لديك أساساً قانونياً لمشاركة صور السيلفي هذه مع Didit كمعالج."
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "source_file_url"
                ],
                "properties": {
                  "import_type": {
                    "type": "string",
                    "enum": [
                      "user_verification",
                      "business_verification",
                      "status_rules",
                      "transactions"
                    ],
                    "default": "user_verification",
                    "description": "ما سيتم استيراده: جلسات التحقق من المستخدمين التاريخية، أو جلسات التحقق من الشركات التاريخية، أو قواعد الحالة المخصصة لسير العمل، أو سجلات مراقبة المعاملات التاريخية."
                  },
                  "workflow_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "معرّف UUID لسير العمل الذي يجب إرفاق الجلسات المستوردة أو قواعد الحالة به. مطلوب لـ user_verification وbusiness_verification وstatus_rules. لا تُدرجه للمعاملات."
                  },
                  "source_format": {
                    "type": "string",
                    "enum": [
                      "csv",
                      "ndjson"
                    ],
                    "description": "اختياري. يُستنتج من امتداد ملف الرابط عند حذفه."
                  },
                  "source_file_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "بديل لتحميل الملفات. يجب أن يكون رابط HTTPS يوجه إلى عنوان عام (يتم رفض الشبكات الخاصة أو شبكات الاسترجاع). لا يمكن استخدامه مع `file`."
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "file",
                      "provider"
                    ],
                    "description": "`provider` يجعل هذا نقلاً من مزود آخر للتحقق من الهوية. احذفه عند استيراد ملف."
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "sumsub",
                      "jumio",
                      "veriff",
                      "onfido",
                      "persona",
                      "metamap",
                      "socure",
                      "idnow",
                      "shufti",
                      "idenfy",
                      "ondato",
                      "trulioo",
                      "au10tix",
                      "complycube",
                      "other"
                    ],
                    "description": "مصدر الترحيل، من `GET /v3/session/imports/providers/`. مطلوب عندما يكون `source` هو `provider`."
                  },
                  "credentials": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "المفتاح المخصص للقراءة فقط الخاص بالمزود، بأسماء الحقول التي تسردها `credential_fields`. مشفر في وضع السكون، ولا يُعاد أبداً، ويتم محوه عند انتهاء الاستيراد. أرسله كسلسلة JSON نصية في multipart."
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "region": {
                        "type": "string",
                        "description": "منطقة المزود، إحدى `regions` التابعة له (Onfido: `eu`، `us`، `ca`)."
                      }
                    }
                  },
                  "status_mapping": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "Approved",
                        "Declined",
                        "In Review",
                        "Expired",
                        "Not Finished",
                        "Abandoned"
                      ]
                    },
                    "description": "تعديلات على تعيين الحالة الافتراضي للمزود: من حالة المصدر إلى حالة Didit. يتم تخطي الحالتين `Not Finished` و`Abandoned` وحسابهما، ولا يتم استيرادهما أبداً."
                  },
                  "dry_run": {
                    "type": "boolean",
                    "default": false,
                    "description": "حساب ما ستستورده عملية الترحيل (حسب الحالة، موجود بالفعل في Didit، نفس الشخص، غير مكتمل) وعدم كتابة أي شيء. تنتهي المهمة بالحالة `READY`؛ ابدأها باستخدام `POST /v3/session/imports/{importId}/start/`."
                  },
                  "face_templates": {
                    "type": "boolean",
                    "default": false,
                    "description": "إنشاء قوالب بيومترية للوجوه من صور السيلفي المستوردة والبحث عنها ومقارنتها بوجوه التطبيق وقائمة الحظر. يتم وضع علامة على التطابقات للمراجعة فقط. يتطلب `lawful_basis_confirmed`."
                  },
                  "lawful_basis_confirmed": {
                    "type": "boolean",
                    "default": false,
                    "description": "يؤكد أن لديك أساساً قانونياً لمشاركة صور السيلفي هذه مع Didit كمعالج."
                  }
                }
              },
              "examples": {
                "URL-based import": {
                  "value": {
                    "import_type": "user_verification",
                    "workflow_id": "9f9b1234-aaaa-bbbb-cccc-1234567890ab",
                    "source_file_url": "https://files.example.com/exports/sessions.ndjson"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "تم قبول مهمة الاستيراد. قم بالاستقصاء الدوري لـ `uuid` المُعاد حتى تصبح `status` هي `COMPLETED` أو `FAILED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionImportJob"
                },
                "examples": {
                  "Job accepted": {
                    "value": {
                      "uuid": "3f9c1a2b-4d5e-4f60-8a7b-9c0d1e2f3a4b",
                      "status": "PENDING",
                      "import_type": "user_verification",
                      "source_format": "ndjson",
                      "source_filename": "sessions.ndjson",
                      "total_rows": 0,
                      "processed_rows": 0,
                      "checkpoint_row": 0,
                      "created_count": 0,
                      "updated_count": 0,
                      "skipped_count": 0,
                      "failed_count": 0,
                      "total_media_bytes": 0,
                      "last_error": null,
                      "created_at": "2026-05-17T08:42:11Z",
                      "updated_at": "2026-05-17T08:42:11Z",
                      "started_at": null,
                      "completed_at": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "سير عمل، أو نوع ملف، أو حجم ملف، أو رابط مصدر، أو توليفة محددات غير صالحة. عملية الترحيل التي يرفض المزود مفتاحها تُرجع `code` (`invalid_credentials` أو `missing_permission` أو `wrong_region` أو `provider_unavailable` أو `rate_limited` أو `ids_required` أو `record_not_found`) و `missing_permissions` و `suggested_region`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid workflow": {
                    "value": {
                      "workflow_id": [
                        "Invalid workflow_id."
                      ]
                    }
                  },
                  "Workflow required": {
                    "value": {
                      "workflow_id": [
                        "This field is required for this import type."
                      ]
                    }
                  },
                  "Wrong file type": {
                    "value": {
                      "file": [
                        "Only CSV and NDJSON files are supported."
                      ]
                    }
                  },
                  "File too large": {
                    "value": {
                      "file": [
                        "Import file exceeds the maximum allowed size."
                      ]
                    }
                  },
                  "No source": {
                    "value": {
                      "file": [
                        "Upload a file or provide source_file_url."
                      ]
                    }
                  },
                  "Both sources": {
                    "value": {
                      "file": [
                        "Use either file or source_file_url, not both."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "عمليات الاستيراد غير مفعّلة، أو أن التطبيق في البيئة التجريبية، أو مفتاح API مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`). يتم تعطيل استيراد عمليات التحقق افتراضياً ويجب تمكينه لكل مؤسسة بواسطة Didit.",
            "content": {
              "application/json": {
                "examples": {
                  "Imports not enabled": {
                    "value": {
                      "detail": "Verification imports are not enabled for this organization."
                    }
                  },
                  "Sandbox": {
                    "value": {
                      "detail": "Verification imports are not enabled for sandbox applications."
                    }
                  },
                  "Bad API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "لدى التطبيق بالفعل 4 مهام استيراد نشطة (PENDING/PROCESSING/PAUSED)، وهو الحد الأقصى الذي يمكنه تشغيله في وقت واحد. انتظر حتى تكتمل إحداها قبل بدء مهمة أخرى.",
            "content": {
              "application/json": {
                "examples": {
                  "Active job": {
                    "value": {
                      "detail": "This application already has 4 active import jobs, the most it can run at once. Wait for one to finish before starting another."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.create(\n    import_type=\"user_verification\",\n    workflow_id=\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n    source_file_url=\"https://files.example.com/exports/sessions.ndjson\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.create({\n  import_type: \"user_verification\",\n  workflow_id: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n  source_file_url: \"https://files.example.com/exports/sessions.ndjson\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Create(ctx, didit.SessionsImportsCreateParams{\n\tImportType:    didit.Some(didit.SessionsImportsCreateParamsImportType(\"user_verification\")),\n\tWorkflowID:    didit.String(\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\"),\n\tSourceFileURL: didit.String(\"https://files.example.com/exports/sessions.ndjson\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsImportsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().create(SessionsImportsCreateParams.builder()\n        .importType(SessionsImportsCreateParams.ImportType.of(\"user_verification\"))\n        .workflowId(\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\")\n        .sourceFileUrl(\"https://files.example.com/exports/sessions.ndjson\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->create([\n    'import_type' => 'user_verification',\n    'workflow_id' => '9f9b1234-aaaa-bbbb-cccc-1234567890ab',\n    'source_file_url' => 'https://files.example.com/exports/sessions.ndjson',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.create(\n  import_type: \"user_verification\",\n  workflow_id: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n  source_file_url: \"https://files.example.com/exports/sessions.ndjson\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.CreateAsync(new SessionsImportsCreateParams\n{\n    ImportType = new SessionsImportsCreateParamsImportType(\"user_verification\"),\n    WorkflowId = \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n    SourceFileUrl = \"https://files.example.com/exports/sessions.ndjson\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/imports/template/": {
      "get": {
        "summary": "تنزيل قالب استيراد التحقق",
        "description": "تنزيل رأس CSV المعتمد لعمليات استيراد التحقق. يتم تحديد مجموعة الأعمدة بواسطة `import_type`. العمود الأول في قوالب الجلسة هو مفتاح idempotency المسمى `external_id`.",
        "operationId": "get_v3_session_imports_template",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "retrieve_template",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "import_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "user_verification",
                "business_verification",
                "status_rules",
                "transactions"
              ],
              "default": "user_verification"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ملف قالب CSV.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح تنزيل قوالب الاستيراد. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "summary": "مفتاح API مفقود أو غير صالح أو ملغى",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.imports.retrieve_template()\nwith open(\"download.csv\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.imports.retrieveTemplate();\nawait writeFile(\"download.csv\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Imports.RetrieveTemplate(ctx, didit.SessionsImportsRetrieveTemplateParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.csv\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().imports().retrieveTemplate()\n        .writeTo(Path.of(\"download.csv\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->sessions->imports->retrieveTemplate();\n$content->saveTo('download.csv');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.imports.retrieve_template\nFile.binwrite(\"download.csv\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.Imports.RetrieveTemplateAsync();\nawait content.SaveToAsync(\"download.csv\");"
          }
        ]
      }
    },
    "/v3/session/imports/{importId}/": {
      "get": {
        "summary": "استرداد مهمة استيراد عمليات التحقق",
        "description": "استرداد عدّادات تقدم الاستيراد والحالة النهائية لمهمة واحدة. يمكنك إجراء الاستقصاء الدوري حتى تصبح `status` هي `COMPLETED` أو `FAILED`؛ وإذا كانت `failed_count` > 0 فهذا يعني أنه تم رفض بعض الصفوف — يمكنك سردها عبر endpoint الخاص بالأخطاء.",
        "operationId": "get_v3_session_imports_retrieve",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "حالة مهمة الاستيراد.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionImportJob"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على مهمة الاستيراد لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح قراءة مهام الاستيراد لهذا التطبيق. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "summary": "مفتاح API مفقود أو غير صالح أو ملغى",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/imports/{importId}/errors/": {
      "get": {
        "summary": "عرض قائمة بأخطاء صفوف استيراد التحقق",
        "description": "عرض قائمة بالأخطاء على مستوى الصفوف لمهمة استيراد عمليات التحقق، مرتبة حسب `row_number`. استخدم هذا الـ endpoint لإنشاء ملف إعادة محاولة مصحح يحتوي فقط على الصفوف التي فشلت.",
        "operationId": "get_v3_session_imports_errors",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "list_errors",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            },
            "description": "حجم الصفحة. القيمة الافتراضية 50 عند إغفاله."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "إزاحة تستند إلى الصفر للسجل الأول المراد إرجاعه."
          }
        ],
        "responses": {
          "200": {
            "description": "أخطاء الصفوف المقسّمة إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد صفوف الأخطاء — دقيق حتى 100، ويقتصر على 100 كحد أقصى بعد ذلك. اعتمد على كون `next` بقيمة `null` لاكتشاف الصفحة الأخيرة."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SessionImportError"
                      }
                    }
                  }
                },
                "examples": {
                  "Row errors": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
                          "row_number": 17,
                          "external_id": "ext-000017",
                          "error": "status: invalid value 'unknown_status'",
                          "raw_row": {
                            "external_id": "ext-000017",
                            "status": "unknown_status",
                            "first_name": "Jane"
                          },
                          "created_at": "2026-05-17T08:44:02Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على مهمة الاستيراد لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح قراءة مهام الاستيراد لهذا التطبيق. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "summary": "مفتاح API مفقود أو غير صالح أو ملغى",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.imports.list_errors(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.imports.listErrors(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.Imports.ListErrorsAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsImportsListErrorsParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().imports().listErrors(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->sessions->imports->listErrors('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.imports.list_errors(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.Imports.ListErrorsAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/decision/": {
      "get": {
        "summary": "استرداد القرار الكامل لجلسة تحقق",
        "description": "استرجع تقرير القرار الكامل لجلسة تحقق — `status` المجمّع للجلسة بالإضافة إلى تقرير واحد لكل ميزة تحقق نفّذها سير العمل. هذا هو endpoint القراءة المعتمد لكل من جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB): يخدم المسار نفسه كليهما، ويخبرك محدّد `session_kind` ذو المستوى الأعلى بالشكل الذي استلمته (`\"user\"` أو `\"business\"`).\n\n**كل تقرير ميزة عبارة عن مصفوفة بصيغة الجمع.** مسارات عمل V3 عبارة عن مخططات يمكنها تشغيل الميزة نفسها أكثر من مرة، لذا فإن كل كتلة (`id_verifications`، `nfc_verifications`، `liveness_checks`، `face_matches`، `poa_verifications`، `document_ai_documents`، `phone_verifications`، `email_verifications`، `aml_screenings`، `ip_analyses`، `database_validations`، `questionnaire_responses`) هي مصفوفة JSON يحمل كل عنصر فيها `node_id` يحدد عقدة مخطط سير العمل التي أنتجته. اقرأ NFC كـ `response.nfc_verifications[0]` — ولا تقرأه أبداً كحقل مفرد `nfc`. تكون الكتلة `null` حتى يقوم سير العمل بتشغيل تلك الميزة مرة واحدة على الأقل؛ والميزات التي لا يتضمنها سير العمل لا تظهر أبداً مع بيانات. توجد نتائج التوقيع الإلكتروني في `signatures`، والتي لا تتواجد إلا عندما يتضمن سير العمل خطوة التوقيع الإلكتروني.\n\n**متى يتم الاستدعاء.** النمط الموصى به مدفوع بالأحداث: انتظر webhook لـ `status.updated` الذي يتم إطلاقه عندما تصل الجلسة إلى قرار (`Approved`، `Declined`، `In Review`)، ثم استدعِ هذا الـ endpoint مرة واحدة لجلب التقرير الكامل. يعمل الاستقصاء الدوري أيضاً — حيث يمكن استدعاء الـ endpoint في أي نقطة من دورة حياة الجلسة ويُرجع البيانات المنتجة حتى الآن — ولكن نمط انتظار الـ webhook ثم الجلب أقل تكلفة وأسرع. عناوين URL للوسائط في الاستجابة (صور المستندات، مقاطع الفيديو، ملفات PDF) هي روابط موقّعة مسبقاً قصيرة الأجل: اجلبها فوراً أو أعد طلب القرار للحصول على روابط جديدة، ولا تقم بتخزينها كمراجع طويلة الأجل.\n\n**الحالات.** الـ `status` ذو المستوى الأعلى هو حالة دورة حياة الجلسة (`Not Started`، `In Progress`، `Awaiting User`، `In Review`، `Approved`، `Declined`، `Resubmitted`، `Expired`، `Kyc Expired`، `Abandoned`). بالإضافة إلى ذلك، يحمل كل عنصر ميزة الـ `status` الخاص به على مستوى الميزة (`Not Finished`، `Approved`، `Declined`، `In Review`، ...). يمكن أن تكون الجلسة `Approved` بشكل عام بينما تكون ميزة فردية `In Review`، اعتماداً على قواعد اتخاذ القرار في سير العمل.\n\n**المصادقة ومجال الرؤية.** قم بالمصادقة باستخدام مفتاح API الخاص بالتطبيق في الرأس `x-api-key` (يعمل أيضاً token بصيغة Bearer لمستخدم لوحة التحكم مزود بإذن `read:sessions`). الجلسات المملوكة للتطبيق الذي تمّت مصادقته هي فقط المرئية. إذا كان سير العمل الخاص بك يقيّد سمات الاستجابة، فسيتم إرجاع الحقول غير المسموح بها داخل عناصر الميزات كـ `null` بينما يتم الاحتفاظ بـ `status` و `warnings` و `node_id` دائماً.\n\n**حدود المعدل.** تقتصر طلبات GET على 600 طلب في الدقيقة لكل مفتاح API. يؤدي تجاوز الحد إلى إرجاع `429` مع الرأسين `Retry-After` و `X-RateLimit-*`.",
        "operationId": "get_v3_session_decision",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "retrieve_decision",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "تقرير القرار الكامل. يميّز `session_kind` بين الشكلين: تحمل جلسات `user` مصفوفات ميزات KYC الموضحة أدناه؛ بينما تحمل جلسات `business` كلاً من `registry_checks` و`document_verifications` و`key_people_checks` إلى جانب المصفوفات المشتركة. تكون مصفوفات الميزات `null` حتى يُشغّل سير العمل تلك الميزة؛ روابط الوسائط هي روابط مؤقتة وموقعة مسبقاً.",
            "content": {
              "application/json": {
                "examples": {
                  "Example": {
                    "summary": "مثال كامل",
                    "value": {
                      "session_id": "11111111-2222-3333-4444-555555555555",
                      "session_kind": "user",
                      "session_number": 43762,
                      "session_url": "https://verify.didit.me/session/11111111-2222-3333-4444-555555555555",
                      "status": "In Review",
                      "environment": "live",
                      "workflow_id": "11111111-2222-3333-4444-555555555555",
                      "features": [
                        "ID_VERIFICATION",
                        "NFC",
                        "LIVENESS",
                        "FACE_MATCH",
                        "POA",
                        "PHONE",
                        "DATABASE_VALIDATION",
                        "AML",
                        "IP_ANALYSIS"
                      ],
                      "vendor_data": "11111111-1111-1111-1111-111111111111",
                      "metadata": {
                        "user_type": "premium",
                        "account_id": "ABC123"
                      },
                      "expected_details": {
                        "first_name": "Carmen",
                        "last_name": "Española Española"
                      },
                      "contact_details": {
                        "email": "carmen@example.com",
                        "email_lang": "es",
                        "send_notification_emails": false,
                        "phone": null
                      },
                      "callback": "https://verify.didit.me/",
                      "id_verifications": [
                        {
                          "node_id": "feature_ocr_1",
                          "status": "Approved",
                          "document_type": "Identity Card",
                          "document_subtype": "ID_CARD_GENERIC",
                          "document_number": "CAA000000",
                          "personal_number": "99999999R",
                          "portrait_image": "https://<media-host>/portrait.jpg",
                          "front_image": "https://<media-host>/front.jpg",
                          "front_video": "https://<media-host>/front.mp4",
                          "back_image": "https://<media-host>/back.jpg",
                          "back_video": "https://<media-host>/back.mp4",
                          "full_front_image": "https://<media-host>/full_front.jpg",
                          "full_back_image": "https://<media-host>/full_back.jpg",
                          "front_image_camera_front": "https://<media-host>/front_camera_front.jpg",
                          "back_image_camera_front": "https://<media-host>/back_camera_front.jpg",
                          "date_of_birth": "1980-01-01",
                          "age": 45,
                          "expiration_date": "2031-06-02",
                          "date_of_issue": "2021-06-02",
                          "issuing_state": "ESP",
                          "issuing_state_name": "Spain",
                          "first_name": "Carmen",
                          "last_name": "Española Española",
                          "full_name": "Carmen Española Española",
                          "gender": "F",
                          "address": "Avda de Madrid 34, Madrid, Madrid",
                          "formatted_address": "Avda de Madrid 34, Madrid, Madrid 28822, Spain",
                          "place_of_birth": "Madrid",
                          "marital_status": "Single",
                          "nationality": "ESP",
                          "extra_fields": {
                            "dl_categories": [],
                            "blood_group": null
                          },
                          "mrz": {
                            "surname": "ESPANOLA ESPANOLA",
                            "name": "CARMEN",
                            "country": "ESP",
                            "nationality": "ESP",
                            "birth_date": "800101",
                            "expiry_date": "310602",
                            "sex": "F",
                            "document_type": "ID",
                            "document_number": "CAA000000",
                            "optional_data": "99999999R",
                            "optional_data_2": "",
                            "birth_date_hash": "4",
                            "expiry_date_hash": "8",
                            "document_number_hash": "4",
                            "final_hash": "1",
                            "personal_number": "99999999R",
                            "warnings": [],
                            "errors": [],
                            "mrz_type": "TD1",
                            "mrz_string": "IDESPCAA000000499999999R<<<<<<\n8001014F3106028ESP<<<<<<<<<<<1\nESPANOLA<ESPANOLA<<CARMEN<<<<<",
                            "mrz_key": "CAA000000480010143106028"
                          },
                          "parsed_address": {
                            "city": "Madrid",
                            "label": "Spain ID Card Address",
                            "region": "Madrid",
                            "country": "ES",
                            "category": "Residential",
                            "street_1": "Avda de Madrid 34",
                            "street_2": null,
                            "is_verified": true,
                            "postal_code": "28822",
                            "raw_results": {
                              "types": [
                                "street_address"
                              ],
                              "geometry": {
                                "location": {
                                  "lat": 37.4222804,
                                  "lng": -122.0843428
                                },
                                "viewport": {
                                  "northeast": {
                                    "lat": 37.4237349802915,
                                    "lng": -122.083183169709
                                  },
                                  "southwest": {
                                    "lat": 37.4210370197085,
                                    "lng": -122.085881130292
                                  }
                                },
                                "location_type": "ROOFTOP"
                              },
                              "place_id": "ChIJN1t_tDeuEmsRUsoyG83frY4",
                              "formatted_address": "Avda de Madrid 34, 28822 Madrid, Spain",
                              "navigation_points": [
                                {
                                  "location": {
                                    "latitude": 37.4222804,
                                    "longitude": -122.0843428
                                  }
                                }
                              ],
                              "address_components": [
                                {
                                  "types": [
                                    "street_number"
                                  ],
                                  "long_name": "34",
                                  "short_name": "34"
                                },
                                {
                                  "types": [
                                    "route"
                                  ],
                                  "long_name": "Avda de Madrid",
                                  "short_name": "Avda de Madrid"
                                },
                                {
                                  "types": [
                                    "locality",
                                    "political"
                                  ],
                                  "long_name": "Madrid",
                                  "short_name": "Madrid"
                                },
                                {
                                  "types": [
                                    "country",
                                    "political"
                                  ],
                                  "long_name": "Spain",
                                  "short_name": "ES"
                                },
                                {
                                  "types": [
                                    "postal_code"
                                  ],
                                  "long_name": "28822",
                                  "short_name": "28822"
                                }
                              ]
                            },
                            "address_type": "Avda",
                            "document_location": {
                              "latitude": 37.4222804,
                              "longitude": -122.0843428
                            },
                            "formatted_address": "Avda de Madrid 34, 28822 Madrid, Spain"
                          },
                          "front_image_camera_front_face_match_score": 95.5,
                          "back_image_camera_front_face_match_score": 93.2,
                          "document_selfie_face_matches": [
                            {
                              "session_id": "3f0c9a52-7b1e-4d68-a2c4-5e9d8b7f1a20",
                              "session_number": 1180,
                              "similarity_percentage": 97.4,
                              "vendor_data": "user_ref_001",
                              "vendor_user_id": null,
                              "biometric_template_id": null,
                              "verification_date": "2026-09-02T09:15:00Z",
                              "user_details": {
                                "full_name": "Jane Doe"
                              },
                              "match_image_url": "https://<media-host>/match_face.jpg",
                              "status": "Approved",
                              "is_blocklisted": false,
                              "is_allowlisted": false,
                              "api_service": null,
                              "source": "session"
                            }
                          ],
                          "front_image_quality_score": {
                            "focus_score": 85.3,
                            "brightness_score": 92.1,
                            "brightness_issue": "ok",
                            "is_document_fully_visible": true,
                            "resolution_score": 72.4,
                            "overall_score": 88.7
                          },
                          "back_image_quality_score": {
                            "focus_score": 79.1,
                            "brightness_score": 90.5,
                            "brightness_issue": "ok",
                            "is_document_fully_visible": true,
                            "resolution_score": 72.4,
                            "overall_score": 85.2
                          },
                          "extra_files": [
                            "https://<media-host>/extra_id_verification.jpg"
                          ],
                          "matches": [
                            {
                              "session_id": "7d4f1f60-9c2e-4b8a-8f3d-2a1b5c6d7e8f",
                              "session_number": 1234,
                              "vendor_data": "user_ref_001",
                              "verification_date": "2024-06-15T10:30:00Z",
                              "user_details": {
                                "name": "John Smith",
                                "document_type": "ID",
                                "document_number": "CLM148418"
                              },
                              "status": "Approved",
                              "is_blocklisted": false,
                              "api_service": null,
                              "front_image_url": "https://<media-host>/document_front.jpg"
                            },
                            {
                              "session_id": "b2c8e4d1-6a3f-4e7b-95c0-1d8f2a6b4c9e",
                              "session_number": 1235,
                              "vendor_data": null,
                              "verification_date": "2024-05-20T14:45:00Z",
                              "user_details": {
                                "name": "John Smith",
                                "document_type": "ID",
                                "document_number": "CLM148418"
                              },
                              "status": "Declined",
                              "is_blocklisted": true,
                              "api_service": "ID_VERIFICATION",
                              "front_image_url": "https://<media-host>/document_front_2.jpg"
                            }
                          ],
                          "warnings": [
                            {
                              "feature": "ID_VERIFICATION",
                              "risk": "QR_NOT_DETECTED",
                              "additional_data": null,
                              "log_type": "information",
                              "short_description": "QR not detected",
                              "long_description": "The system couldn't find or read the QR code on the document, which is necessary for document verification. This could be due to poor image quality or an unsupported document type.",
                              "node_id": "feature_ocr_1"
                            }
                          ],
                          "verification_method": "document",
                          "assurance": "documentary",
                          "wallet_provider": null,
                          "fallback_from": null,
                          "id_lookup": null,
                          "wallet_verification": null,
                          "document_liveness": {
                            "portrait_replace": {
                              "score": 96.46,
                              "front": 96.46,
                              "back": 98.2,
                              "decline_threshold": 35,
                              "review_threshold": 70,
                              "bucket": "approve"
                            },
                            "printed_copy": {
                              "score": 91.2,
                              "front": 91.2,
                              "back": 93.7,
                              "decline_threshold": 35,
                              "review_threshold": 77,
                              "bucket": "approve"
                            },
                            "screen_replay": {
                              "score": 99.9,
                              "front": 99.9,
                              "back": 99.5,
                              "decline_threshold": 30,
                              "review_threshold": 70,
                              "bucket": "approve"
                            }
                          }
                        },
                        {
                          "node_id": "feature_ocr_2",
                          "status": "Approved",
                          "issuing_state": "ZAF",
                          "issuing_state_name": "South Africa",
                          "first_name": "Thabo",
                          "last_name": "Mokoena",
                          "full_name": "Thabo Mokoena",
                          "date_of_birth": "1991-06-15",
                          "personal_number": "9106155043088",
                          "verification_method": "id_lookup",
                          "assurance": "data_match",
                          "wallet_provider": null,
                          "fallback_from": null,
                          "id_lookup": {
                            "source": "Department of Home Affairs",
                            "checked_at": "2026-09-04T09:12:44Z",
                            "attempts": 1,
                            "max_attempts": 2,
                            "outcome": "match",
                            "comparison": [
                              {
                                "field": "identification_number",
                                "label": "ID number",
                                "provided": "9106155043088",
                                "record": "9106155043088",
                                "result": "match"
                              },
                              {
                                "field": "full_name",
                                "label": "Full name",
                                "provided": "Thabo Mokoena",
                                "record": "Thabo Mokoena",
                                "result": "match"
                              },
                              {
                                "field": "date_of_birth",
                                "label": "Date of birth",
                                "provided": "1991-06-15",
                                "record": "1991-06-15",
                                "result": "match"
                              }
                            ],
                            "registry_portrait": "https://<media-host>/registry_portrait.jpg",
                            "face_match_score": 96.4,
                            "source_errors": []
                          },
                          "wallet_verification": null,
                          "warnings": []
                        },
                        {
                          "node_id": "feature_ocr_3",
                          "status": "Approved",
                          "issuing_state": "DNK",
                          "issuing_state_name": "Denmark",
                          "first_name": "Freja",
                          "last_name": "Nielsen",
                          "full_name": "Freja Nielsen",
                          "date_of_birth": "1988-03-02",
                          "verification_method": "wallet",
                          "assurance": "cryptographic",
                          "wallet_provider": "mitid",
                          "fallback_from": null,
                          "id_lookup": null,
                          "wallet_verification": {
                            "provider": "mitid",
                            "provider_name": "MitID",
                            "issuing_authority": "Danish Agency for Digital Government",
                            "issuing_country": "DNK",
                            "credential_type": "person_identification",
                            "level_of_assurance": "substantial",
                            "verified_at": "2026-09-04T09:12:44Z",
                            "signature_valid": true,
                            "attributes": {
                              "full_name": "Freja Nielsen",
                              "date_of_birth": "1988-03-02",
                              "cpr_alias": "b0f1c2d3-e4f5-4678-9abc-def012345678"
                            },
                            "portrait": null,
                            "face_match_score": null
                          },
                          "warnings": []
                        }
                      ],
                      "nfc_verifications": [
                        {
                          "node_id": "feature_nfc_1",
                          "status": "In Review",
                          "is_nfc_skipped": false,
                          "skip_reason": null,
                          "chip_protocol": "icao",
                          "jpki": null,
                          "portrait_image": "https://<media-host>/portrait.jpg",
                          "signature_image": "https://<media-host>/signature.jpg",
                          "chip_data": {
                            "document_type": "ID",
                            "issuing_country": "ESP",
                            "document_number": "123456789",
                            "expiration_date": "2030-01-01",
                            "first_name": "John",
                            "last_name": "Smith",
                            "birth_date": "1990-05-15",
                            "gender": "M",
                            "nationality": "ESP",
                            "address": "CALLE MAYOR 123 4B, MADRID, MADRID",
                            "place_of_birth": "MADRID, MADRID"
                          },
                          "authenticity": {
                            "sod_integrity": true,
                            "dg_integrity": true
                          },
                          "certificate_summary": {
                            "issuer": "Common Name: CSCA SPAIN, Serial Number: 3, Organization: DIRECCION GENERAL DE LA POLICIA, Country: ES",
                            "subject": "Common Name: DS n-eID SPAIN 2, Organizational Unit: PASSPORT, Organization: DIRECCION GENERAL DE LA POLICIA, Country: ES",
                            "serial_number": "118120836164494130086420187336801405660",
                            "not_valid_after": "2031-02-18 10:21:11",
                            "not_valid_before": "2020-11-18 10:21:11"
                          },
                          "warnings": [
                            {
                              "feature": "NFC",
                              "risk": "DATA_INCONSISTENT",
                              "additional_data": null,
                              "log_type": "warning",
                              "short_description": "OCR and NFC mrz code extracted are not the same",
                              "long_description": "The Optical Character Recognition (OCR) data and the NFC chip data don't match, indicating potential document tampering or data inconsistency.",
                              "node_id": "feature_nfc_1"
                            }
                          ]
                        }
                      ],
                      "liveness_checks": [
                        {
                          "node_id": "feature_liveness_1",
                          "status": "Approved",
                          "method": "ACTIVE_3D",
                          "score": 89.92,
                          "reference_image": "https://<media-host>/reference.jpg",
                          "video_url": "https://<media-host>/video.mp4",
                          "age_estimation": 24.3,
                          "matches": [
                            {
                              "session_id": "7d4f1f60-9c2e-4b8a-8f3d-2a1b5c6d7e8f",
                              "session_number": 1234,
                              "vendor_data": "user_ref_001",
                              "verification_date": "2024-06-15T10:30:00Z",
                              "user_details": {
                                "full_name": "John Smith",
                                "document_type": "ID",
                                "document_number": "CLM148418"
                              },
                              "status": "Approved",
                              "is_blocklisted": false,
                              "is_allowlisted": false,
                              "api_service": null,
                              "source": "session",
                              "match_image_url": "https://<media-host>/face_match.jpg",
                              "similarity_percentage": 98.5
                            },
                            {
                              "session_id": "3e9a7c21-5b48-4f0e-9c6a-8d2f4b1e0a35",
                              "session_number": 1100,
                              "vendor_data": "customer_xyz",
                              "verification_date": "2024-04-10T09:15:00Z",
                              "user_details": {
                                "full_name": "John Smith",
                                "document_type": "P",
                                "document_number": "DZ8375806"
                              },
                              "status": "Approved",
                              "is_blocklisted": false,
                              "is_allowlisted": false,
                              "api_service": "PASSIVE_LIVENESS",
                              "source": "session",
                              "match_image_url": "https://<media-host>/face_match_2.jpg",
                              "similarity_percentage": 95.2
                            }
                          ],
                          "warnings": [
                            {
                              "feature": "LIVENESS",
                              "risk": "LOW_LIVENESS_SCORE",
                              "additional_data": null,
                              "log_type": "information",
                              "short_description": "Low liveness score",
                              "long_description": "The liveness check resulted in a low score, indicating potential use of non-live facial representations or poor-quality biometric data.",
                              "node_id": "feature_liveness_1"
                            }
                          ],
                          "face_quality": null,
                          "face_luminance": null
                        }
                      ],
                      "face_matches": [
                        {
                          "node_id": "feature_face_match_1",
                          "status": "In Review",
                          "score": 65.43,
                          "source_image_session_id": null,
                          "source_image": "https://<media-host>/source-image.jpg",
                          "target_image": "https://<media-host>/target-image.jpg",
                          "warnings": [
                            {
                              "feature": "FACEMATCH",
                              "risk": "LOW_FACE_MATCH_SIMILARITY",
                              "additional_data": null,
                              "log_type": "warning",
                              "short_description": "Low face match similarity",
                              "long_description": "The facial features of the provided image don't closely match the reference image, suggesting a potential identity mismatch.",
                              "node_id": "feature_face_match_1"
                            }
                          ]
                        }
                      ],
                      "phone_verifications": [
                        {
                          "node_id": "feature_phone_1",
                          "status": "Approved",
                          "phone_number_prefix": "+34",
                          "phone_number": "600600600",
                          "full_number": "+34600600600",
                          "country_code": "ES",
                          "country_name": "Spain",
                          "carrier": {
                            "name": "Orange",
                            "type": "mobile"
                          },
                          "is_disposable": false,
                          "is_virtual": false,
                          "verification_method": "sms",
                          "verification_attempts": 1,
                          "verified_at": "2024-07-28T06:47:35.654321Z",
                          "lifecycle": [
                            {
                              "type": "PHONE_VERIFICATION_MESSAGE_SENT",
                              "timestamp": "2025-08-24T09:12:39.580554+00:00",
                              "details": {
                                "status": "Success",
                                "reason": null,
                                "channel": "sms",
                                "actual_channel": "sms"
                              },
                              "fee": 0.1
                            },
                            {
                              "type": "VALID_CODE_ENTERED",
                              "timestamp": "2025-08-24T09:12:39.662157+00:00",
                              "details": {
                                "code_tried": "123456",
                                "status": "Approved"
                              },
                              "fee": 0
                            },
                            {
                              "type": "PHONE_VERIFICATION_APPROVED",
                              "timestamp": "2025-08-24T09:12:39.684292+00:00",
                              "details": null,
                              "fee": 0
                            }
                          ],
                          "warnings": [],
                          "matches": [
                            {
                              "session_id": null,
                              "session_number": null,
                              "vendor_data": null,
                              "verification_date": null,
                              "phone_number": "+34600000000",
                              "status": null,
                              "is_blocklisted": true,
                              "api_service": null,
                              "source": "list_entry"
                            }
                          ]
                        }
                      ],
                      "email_verifications": [
                        {
                          "node_id": "feature_email_1",
                          "status": "Approved",
                          "email": "test@example.com",
                          "is_breached": true,
                          "breaches": [
                            {
                              "name": "TAPAirPortugal",
                              "domain": "flytap.com",
                              "logo_path": "https://logos.example.com/TAPAirPortugal.png",
                              "breach_date": "2022-08-25",
                              "description": "In August 2022, the Portuguese airline <a href=\"https://www.bleepingcomputer.com/news/security/ragnar-locker-ransomware-claims-attack-on-portugals-flag-airline/\" target=\"_blank\" rel=\"noopener\">TAP Air Portugal was the target of a ransomware attack perpetrated by the Ragnar Locker gang</a> who later leaked the compromised data via a public dark web site. Over 5M unique email addresses were exposed alongside other personal data including names, genders, DoBs, phone numbers and physical addresses.",
                              "is_verified": true,
                              "data_classes": [
                                "dates_of_birth",
                                "email_addresses",
                                "genders",
                                "names",
                                "nationalities",
                                "phone_numbers",
                                "physical_addresses",
                                "salutations",
                                "spoken_languages"
                              ],
                              "breach_emails_count": 6083479
                            }
                          ],
                          "is_disposable": false,
                          "is_undeliverable": false,
                          "verification_attempts": 1,
                          "verified_at": "2025-09-15T17:36:19.963451Z",
                          "warnings": [
                            {
                              "feature": "EMAIL",
                              "risk": "BREACHED_EMAIL_DETECTED",
                              "additional_data": null,
                              "log_type": "information",
                              "short_description": "Breached email detected",
                              "long_description": "This email address was found in one or more known data breaches.",
                              "node_id": "feature_email_1"
                            }
                          ],
                          "lifecycle": [
                            {
                              "type": "EMAIL_VERIFICATION_MESSAGE_SENT",
                              "timestamp": "2025-09-15T17:36:19.792684+00:00",
                              "details": {
                                "status": "Success",
                                "reason": null
                              },
                              "fee": 0.02
                            },
                            {
                              "type": "VALID_CODE_ENTERED",
                              "timestamp": "2025-09-15T17:36:19.963427+00:00",
                              "details": {
                                "code_tried": "123456",
                                "status": "Approved"
                              },
                              "fee": 0
                            },
                            {
                              "type": "EMAIL_VERIFICATION_DECLINED",
                              "timestamp": "2025-09-15T17:36:20.081471+00:00",
                              "details": {
                                "reason": "BREACHED_EMAIL_DETECTED"
                              },
                              "fee": 0
                            }
                          ],
                          "matches": [
                            {
                              "session_id": null,
                              "session_number": null,
                              "vendor_data": null,
                              "verification_date": null,
                              "email": "test@example.com",
                              "status": null,
                              "is_blocklisted": true,
                              "api_service": null,
                              "source": "list_entry"
                            }
                          ]
                        }
                      ],
                      "poa_verifications": [
                        {
                          "node_id": "feature_poa_1",
                          "status": "Declined",
                          "document_file": "https://<media-host>/poa_document.pdf",
                          "issuing_state": "AR",
                          "document_type": "UTILITY_BILL",
                          "document_subtype": null,
                          "document_language": "es",
                          "document_metadata": {
                            "file_size": 1000,
                            "content_type": "application/pdf",
                            "creation_date": "2021-01-01",
                            "modified_date": "2021-01-01",
                            "overlay_manipulation": null,
                            "creator": null,
                            "producer": "PDF Generator",
                            "software": null,
                            "encryption": null,
                            "is_signed": false,
                            "is_tampered": false,
                            "signature_info": null,
                            "exif_original_date": null,
                            "exif_digitized_date": null,
                            "processed_by_known_editor": false,
                            "has_different_creation_mod_date": true
                          },
                          "issuer": "Aguas del Norte",
                          "issue_date": "2021-02-01",
                          "expiration_date": null,
                          "poa_address": "AVDA. MONSEÑOR TAVELLA N° 3396, SALTA",
                          "poa_formatted_address": "Av. Monseñor Tavella 3396, A4400 Salta, Argentina",
                          "poa_parsed_address": {
                            "address_type": "Avenida",
                            "street_1": "Avenida Monseñor Tavella 3396",
                            "street_2": null,
                            "city": "Salta",
                            "region": "Salta",
                            "country": "AR",
                            "postal_code": "A4400",
                            "document_location": {
                              "latitude": -24.8208664,
                              "longitude": -65.4131
                            }
                          },
                          "name_on_document": "Fernando De Lima",
                          "name_match_score_expected_details": null,
                          "name_match_score_id_verification": 38.5,
                          "expected_details_address": null,
                          "expected_details_formatted_address": null,
                          "expected_details_parsed_address": {},
                          "extra_fields": {
                            "bank_account_number": "1234567890",
                            "bank_iban": null,
                            "bank_sort_code": null,
                            "bank_routing_number": null,
                            "bank_swift_bic": null,
                            "bank_branch_name": null,
                            "bank_branch_address": null,
                            "document_phone_number": "+5491112345678",
                            "additional_names": []
                          },
                          "extra_files": [
                            "https://<media-host>/extra_poa.pdf"
                          ],
                          "detected_codes": [
                            {
                              "type": "QR_CODE",
                              "page_number": 1,
                              "position": [
                                [
                                  820,
                                  1120
                                ],
                                [
                                  1002,
                                  1120
                                ],
                                [
                                  1002,
                                  1302
                                ],
                                [
                                  820,
                                  1302
                                ]
                              ],
                              "x": 820,
                              "y": 1120,
                              "width": 182,
                              "height": 182,
                              "page_width": 1190,
                              "page_height": 1684,
                              "raw_payload": "aHR0cHM6Ly9hZ3Vhc2RlbG5vcnRlLmNvbS9mYWN0dXJhLzk5ODgxMQ==",
                              "parsed_payload": "https://aguasdelnorte.com/factura/998811"
                            },
                            {
                              "type": "CODE_128",
                              "page_number": 1,
                              "position": [
                                [
                                  112,
                                  1480
                                ],
                                [
                                  560,
                                  1480
                                ],
                                [
                                  560,
                                  1540
                                ],
                                [
                                  112,
                                  1540
                                ]
                              ],
                              "x": 112,
                              "y": 1480,
                              "width": 448,
                              "height": 60,
                              "page_width": 1190,
                              "page_height": 1684,
                              "raw_payload": "MDA5OTg4MTEwMDA0Mg==",
                              "parsed_payload": "0099881100042"
                            }
                          ],
                          "warnings": []
                        }
                      ],
                      "document_ai_documents": [
                        {
                          "status": "Approved",
                          "node_id": "feature_document_ai_1",
                          "items": [
                            {
                              "uuid": "c1a2b3c4-d5e6-7f80-9a1b-2c3d4e5f6071",
                              "node_id": "feature_document_ai_1",
                              "document_key": "proof_of_funds",
                              "original_filename": "bank_statement.pdf",
                              "file_size": 184320,
                              "file_url": "https://<media-host>/document_ai/proof_of_funds.pdf",
                              "status": "Approved",
                              "extracted_data": {
                                "account_holder": "John Doe",
                                "balance": 15230.55,
                                "currency": "EUR",
                                "statement_date": "2026-05-31"
                              },
                              "detected_codes": [
                                {
                                  "type": "QR_CODE",
                                  "page_number": 2,
                                  "position": [
                                    [
                                      124,
                                      86
                                    ],
                                    [
                                      306,
                                      86
                                    ],
                                    [
                                      306,
                                      268
                                    ],
                                    [
                                      124,
                                      268
                                    ]
                                  ],
                                  "x": 124,
                                  "y": 86,
                                  "width": 182,
                                  "height": 182,
                                  "page_width": 1190,
                                  "page_height": 1684,
                                  "raw_payload": "SU5WLTIwMjYtMDA0Mg==",
                                  "parsed_payload": "INV-2026-0042"
                                }
                              ],
                              "fields": [
                                {
                                  "key": "account_holder",
                                  "name": "Account holder",
                                  "instruction": "Extract the full name of the account holder.",
                                  "type": "text",
                                  "required": true
                                },
                                {
                                  "key": "balance",
                                  "name": "Closing balance",
                                  "instruction": "Extract the closing balance amount.",
                                  "type": "number",
                                  "required": true
                                }
                              ],
                              "document_metadata": {
                                "is_tampered": false
                              },
                              "cross_check_result": null,
                              "created_at": "2026-06-01T12:34:56Z"
                            }
                          ],
                          "warnings": []
                        }
                      ],
                      "questionnaire_responses": [
                        {
                          "node_id": "feature_questionnaire_1",
                          "questionnaire_id": "9f7485e0-b00b-4d56-9d3e-7859b68d1213",
                          "title": "Source of Funds",
                          "description": "Reply to this questionnaire to help us understand the source of funds.",
                          "languages": [
                            "en"
                          ],
                          "default_language": "en",
                          "is_active": true,
                          "is_simple_questionnaire": true,
                          "questionnaire_group_id": "2b6a9d40-13a8-4b1e-9a6c-3f1d2e4b5a60",
                          "version": 1,
                          "published_at": "2025-11-02T09:14:55.000000Z",
                          "sections": [
                            {
                              "title": null,
                              "description": null,
                              "items": [
                                {
                                  "uuid": "618636d9-7d5c-41ce-b8d0-1ab2a4be20db",
                                  "value": "question_1",
                                  "element_type": "DROPDOWN",
                                  "is_required": true,
                                  "title": "What is your primary source of funds?",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": [
                                    {
                                      "label": "Salary",
                                      "value": "salary"
                                    },
                                    {
                                      "label": "Business Income",
                                      "value": "business_income"
                                    },
                                    {
                                      "label": "Savings",
                                      "value": "savings"
                                    },
                                    {
                                      "label": "Investments",
                                      "value": "investments"
                                    },
                                    {
                                      "label": "Sale of Asset",
                                      "value": "sale_of_asset"
                                    },
                                    {
                                      "label": "Inheritance/Gift",
                                      "value": "inheritance_gift"
                                    },
                                    {
                                      "label": "Pension",
                                      "value": "pension"
                                    },
                                    {
                                      "label": "Crypto Proceeds",
                                      "value": "crypto_proceeds"
                                    },
                                    {
                                      "label": "Other",
                                      "value": "other",
                                      "requires_text_input": true
                                    }
                                  ],
                                  "max_files": 1,
                                  "answer": {
                                    "value": "salary"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "2d16b527-72be-42e0-8e96-b164b818386c",
                                  "value": "question_2",
                                  "element_type": "LONG_TEXT",
                                  "is_required": true,
                                  "title": "Provide details of the primary source.",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": null,
                                  "max_files": 1,
                                  "answer": {
                                    "value": "Test answer"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "a9239b7c-fbfb-4ea7-b7e4-c835cd4016e0",
                                  "value": "question_3",
                                  "element_type": "DROPDOWN",
                                  "is_required": true,
                                  "title": "What is your annual income range (pre-tax)?",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": [
                                    {
                                      "label": "Less than $25,000",
                                      "value": "<25k"
                                    },
                                    {
                                      "label": "$25,000 - $50,000",
                                      "value": "25k-50k"
                                    },
                                    {
                                      "label": "$50,001 - $100,000",
                                      "value": "50k-100k"
                                    },
                                    {
                                      "label": "$100,001 - $250,000",
                                      "value": "100k-250k"
                                    },
                                    {
                                      "label": "More than $250,000",
                                      "value": ">250k"
                                    }
                                  ],
                                  "max_files": 1,
                                  "answer": {
                                    "value": "<25k"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "93dede62-6d0c-4a7f-934d-42175eb94011",
                                  "value": "question_4",
                                  "element_type": "DROPDOWN",
                                  "is_required": true,
                                  "title": "What is your approximate net worth (range)?",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": [
                                    {
                                      "label": "Less than $50,000",
                                      "value": "<50k"
                                    },
                                    {
                                      "label": "$50,000 - $250,000",
                                      "value": "50k-250k"
                                    },
                                    {
                                      "label": "$250,001 - $1,000,000",
                                      "value": "250k-1m"
                                    },
                                    {
                                      "label": "$1,000,001 - $5,000,000",
                                      "value": "1m-5m"
                                    },
                                    {
                                      "label": "More than $5,000,000",
                                      "value": ">5m"
                                    }
                                  ],
                                  "max_files": 1,
                                  "answer": {
                                    "value": "<50k"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "2af60d6f-6961-4692-9ee7-24b3033610a6",
                                  "value": "question_5",
                                  "element_type": "LONG_TEXT",
                                  "is_required": true,
                                  "title": "For your initial deposit/funding, indicate the exact source and amount.",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": null,
                                  "max_files": 1,
                                  "answer": {
                                    "value": "Test answer"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "0ad9d1aa-736f-46cf-947b-9e1241b53e40",
                                  "value": "question_6",
                                  "element_type": "LONG_TEXT",
                                  "is_required": true,
                                  "title": "Breakdown of sources by percentage.",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": null,
                                  "max_files": 1,
                                  "answer": {
                                    "value": "Test answer"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "1bf8a2a3-14ee-48a8-bb3d-175481aae4aa",
                                  "value": "question_7",
                                  "element_type": "SINGLE_CHOICE",
                                  "is_required": true,
                                  "title": "Will any funds originate from third parties? If yes, please provide details.",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": [
                                    {
                                      "label": "Yes",
                                      "value": "yes",
                                      "requires_text_input": true
                                    },
                                    {
                                      "label": "No",
                                      "value": "no"
                                    }
                                  ],
                                  "max_files": 1,
                                  "answer": {
                                    "text": "Additional details",
                                    "value": "yes"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "e18d4dd3-b7bf-4883-ba18-d6046adbe313",
                                  "value": "question_8",
                                  "element_type": "SINGLE_CHOICE",
                                  "is_required": true,
                                  "title": "Do you hold or plan to use virtual assets (e.g., crypto) to fund this account? If yes, please provide details.",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": [
                                    {
                                      "label": "Yes",
                                      "value": "yes",
                                      "requires_text_input": true
                                    },
                                    {
                                      "label": "No",
                                      "value": "no"
                                    }
                                  ],
                                  "max_files": 1,
                                  "answer": {
                                    "text": "Additional details",
                                    "value": "yes"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "a90a073d-e098-404c-bbce-5130d8b12a13",
                                  "value": "question_9",
                                  "element_type": "FILE_UPLOAD",
                                  "is_required": true,
                                  "title": "Upload a proof of funds document",
                                  "description": "You can upload your three (3) most recent bank statements, three (3) most recent payslips, your most recent tax return, proof of company ownership, trading exchange statement, sale of property, or proof of inheritance.",
                                  "placeholder": null,
                                  "choices": null,
                                  "max_files": 3,
                                  "answer": {
                                    "files": [
                                      "/media/ocr/",
                                      "/media/ocr/"
                                    ]
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                },
                                {
                                  "uuid": "9503b486-7cb8-4c3b-a97d-4b64926a5a47",
                                  "value": "question_10",
                                  "element_type": "LONG_TEXT",
                                  "is_required": false,
                                  "title": "Would you like to add any details to help us expedite our review of the documents you submitted?",
                                  "description": null,
                                  "placeholder": null,
                                  "choices": null,
                                  "max_files": 1,
                                  "answer": {
                                    "value": "Test answer"
                                  },
                                  "required_if": null,
                                  "repeatable_config": null
                                }
                              ]
                            }
                          ],
                          "status": "Approved"
                        }
                      ],
                      "aml_screenings": [
                        {
                          "node_id": "feature_aml_1",
                          "status": "In Review",
                          "total_hits": 1,
                          "entity_type": "person",
                          "hits": [
                            {
                              "id": "hit_7c1e9a40b2d35f86e0a4c912",
                              "url": "https://news.example.org/articles/sample",
                              "match": false,
                              "score": 0.73,
                              "target": null,
                              "caption": "Javier Ejemplo Modelo",
                              "datasets": [
                                "PEP"
                              ],
                              "features": null,
                              "rca_name": "",
                              "last_seen": "2025-06-13T00:00:00",
                              "risk_view": {
                                "crimes": {
                                  "score": 0,
                                  "weightage": 20,
                                  "risk_level": "Low",
                                  "risk_scores": {}
                                },
                                "countries": {
                                  "score": 0,
                                  "weightage": 30,
                                  "risk_level": "Low",
                                  "risk_scores": {}
                                },
                                "categories": {
                                  "score": 100,
                                  "weightage": 50,
                                  "risk_level": "High",
                                  "risk_scores": {
                                    "PEP": 100
                                  }
                                },
                                "custom_list": {}
                              },
                              "first_seen": "2025-01-18T00:00:00",
                              "properties": {
                                "name": [
                                  "Javier Ejemplo Modelo"
                                ],
                                "alias": [
                                  "Javier Ejemplo Modelo",
                                  "David Azagra"
                                ],
                                "notes": [
                                  "Spanish orchestra conductor"
                                ],
                                "title": null,
                                "gender": [
                                  "male"
                                ],
                                "height": null,
                                "topics": null,
                                "weight": null,
                                "address": null,
                                "country": null,
                                "website": null,
                                "eyeColor": null,
                                "keywords": null,
                                "lastName": [
                                  "Ejemplo",
                                  "Modelo"
                                ],
                                "position": null,
                                "religion": null,
                                "birthDate": [
                                  "1974"
                                ],
                                "education": [
                                  "Tokyo Arts and Space (2012-2012)",
                                  "Saint Petersburg Conservatory (-2010)",
                                  "Comillas Pontifical University"
                                ],
                                "ethnicity": null,
                                "firstName": [
                                  "David"
                                ],
                                "hairColor": null,
                                "weakAlias": null,
                                "birthPlace": [
                                  "Madrid"
                                ],
                                "modifiedAt": null,
                                "wikidataId": null,
                                "citizenship": null,
                                "nationality": null
                              },
                              "match_score": 98,
                              "risk_score": 73,
                              "review_status": "Unreviewed",
                              "score_breakdown": {
                                "name_score": 95,
                                "name_weight": 60,
                                "name_weight_normalized": 70.59,
                                "name_contribution": 67.06,
                                "dob_score": 100,
                                "dob_weight": 25,
                                "dob_weight_normalized": 29.41,
                                "dob_contribution": 29.41,
                                "country_score": 0,
                                "country_weight": 15,
                                "country_weight_normalized": 0,
                                "country_contribution": 0,
                                "document_number_match_type": "NEUTRAL",
                                "document_number_effect": "No document number provided for screening",
                                "total_score": 98
                              },
                              "pep_matches": [
                                {
                                  "aliases": [
                                    "Javier Ejemplo Modelo",
                                    "David Azagra"
                                  ],
                                  "education": [
                                    "Tokyo Arts and Space (2012-2012)",
                                    "Saint Petersburg Conservatory (-2010)",
                                    "Comillas Pontifical University"
                                  ],
                                  "list_name": "Wikidata",
                                  "publisher": "Wikidata",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "description": "Wikidata is the structured data project of the Wikipedia community, providing fact-based information edited by humans and machines",
                                  "matched_name": "Javier Ejemplo Modelo",
                                  "pep_position": "",
                                  "date_of_birth": "1974",
                                  "other_sources": [],
                                  "place_of_birth": "Madrid"
                                }
                              ],
                              "linked_entities": [
                                {
                                  "name": [
                                    "Antonio Ejemplo"
                                  ],
                                  "active": [],
                                  "status": [],
                                  "details": [],
                                  "relation": []
                                }
                              ],
                              "warning_matches": [],
                              "sanction_matches": [],
                              "adverse_media_details": {
                                "sentiment": "Moderately Negative",
                                "entity_type": "person",
                                "sentiment_score": -2,
                                "adverse_keywords": {
                                  "fraud": 3,
                                  "juicio": 1,
                                  "delitos": 2,
                                  "imputado": 1,
                                  "impunidad": 1,
                                  "corruption": 2,
                                  "favoritism": 2,
                                  "privilegio": 1,
                                  "corrupción": 1,
                                  "persecution": 2,
                                  "desconfianza": 1,
                                  "desprestigio": 1,
                                  "fraude de ley": 2,
                                  "manipulación": 1,
                                  "investigación": 3,
                                  "prevaricación": 8,
                                  "trato de favor": 1,
                                  "irregularidades": 2,
                                  "crisis de confianza": 1,
                                  "tráfico de influencias": 8
                                }
                              },
                              "adverse_media_matches": [
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo is implicated in legal violations related to favoritism and influence trafficking, leading to a negative portrayal in the article.",
                                  "headline": "La Diputación de Villaejemplo consolida la plaza a medida para el ex asesor de Moncloa amigo del \"hermanito\" de Ejemplo",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "fraud",
                                    "prevaricación",
                                    "tráfico de influencias",
                                    "irregularidades",
                                    "imputado"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-10T20:46:38"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo is implicated in legal issues regarding favoritism and corruption, leading to a negative portrayal in the article.",
                                  "headline": "La Diputación de Villaejemplo consolida la plaza a medida para el ex asesor de Moncloa amigo del \"hermanito\" de Ejemplo",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "fraud",
                                    "prevaricación",
                                    "tráfico de influencias",
                                    "irregularidades",
                                    "trato de favor"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-10T20:46:38"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo Modelo is mentioned in connection with Carlos Ficticio's corruption case, indicating his involvement in alleged influence peddling.",
                                  "headline": "España, paraíso del aforado",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "prevaricación",
                                    "tráfico de influencias",
                                    "corrupción",
                                    "impunidad",
                                    "privilegio",
                                    "desconfianza",
                                    "manipulación",
                                    "fraude de ley"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-10T05:05:34"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo Modelo is implicated in the same investigation as Ficticio, which raises questions about his conduct and political ethics.",
                                  "headline": "Aforamientos: esa figura incómoda",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "prevaricación",
                                    "tráfico de influencias",
                                    "investigación",
                                    "juicio",
                                    "fraude de ley",
                                    "desprestigio",
                                    "crisis de confianza",
                                    "delitos"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-08T06:01:00"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo is implicated in a legal investigation regarding irregularities in his hiring, which raises serious concerns about his conduct.",
                                  "headline": "La jueza del 'caso Javier Ejemplo' denuncia un «fraude de ley» en el aforamiento de Ficticio (Partido Ejemplo)",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "fraud",
                                    "irregularities",
                                    "prevaricación",
                                    "tráfico de influencias"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-09T10:19:10"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo Modelo is mentioned in connection with legal allegations of corruption, contributing to a negative perception.",
                                  "headline": "'Caso aforamiento': la letrada mayor de la Asamblea certifica a la juez que Ficticio es diputado desde antes de prometer su cargo en el Pleno",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "prevaricación",
                                    "tráfico de influencias"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-09T08:08:30"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo Modelo is implicated in the same investigation as Ficticio, raising concerns about political corruption and influence.",
                                  "headline": "Aforamientos: esa figura incómoda",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "prevaricación",
                                    "tráfico de influencias",
                                    "investigación"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-08T06:01:00"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo Modelo is implicated in the same investigation as Ficticio, which raises concerns about political misconduct.",
                                  "headline": "Aforamientos: esa figura incómoda",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "prevaricación",
                                    "tráfico de influencias",
                                    "investigación",
                                    "delitos"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-08T06:00:59"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo is implicated in a case of favoritism and corruption, which casts a negative light on his character and actions.",
                                  "headline": "'Caso Javier Ejemplo': las asociaciones judiciales salen en defensa de la juez Luisa Inventada ante las \"presiones externas\" que sufre",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "favoritism",
                                    "corruption",
                                    "persecution"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-06T10:08:15"
                                },
                                {
                                  "country": "spain",
                                  "summary": "Javier Ejemplo is implicated in a case of alleged favoritism and corruption, which casts a negative light on his character and actions.",
                                  "headline": "'Caso Javier Ejemplo': las asociaciones judiciales salen en defensa de la juez Luisa Inventada ante las \"presiones externas\" que sufre",
                                  "sentiment": "moderately negative",
                                  "thumbnail": "https://news.example.org/articles/sample",
                                  "source_url": "https://news.example.org/articles/sample",
                                  "author_name": null,
                                  "other_sources": [],
                                  "adverse_keywords": [
                                    "favoritism",
                                    "corruption",
                                    "persecution"
                                  ],
                                  "sentiment_score": -2,
                                  "publication_date": "2025-06-06T08:08:15"
                                }
                              ],
                              "additional_information": {}
                            }
                          ],
                          "score": 80,
                          "screened_data": {
                            "full_name": "Javier Ejemplo Modelo",
                            "nationality": "ES",
                            "date_of_birth": "1974-01-01",
                            "document_number": null
                          },
                          "is_ongoing_monitoring_enabled": true,
                          "next_ongoing_monitoring_bill_date": "2026-07-24",
                          "last_ongoing_screening_at": "2026-09-12T04:03:11Z",
                          "last_ongoing_screening_datasets_updated_at": "2026-09-11T06:00:00Z",
                          "warnings": [
                            {
                              "feature": "AML",
                              "risk": "POSSIBLE_MATCH_FOUND",
                              "additional_data": null,
                              "log_type": "warning",
                              "short_description": "Possible match found in AML screening",
                              "long_description": "The Anti-Money Laundering (AML) screening process identified potential matches with watchlists or high-risk databases, requiring further review.",
                              "node_id": "feature_aml_1"
                            }
                          ]
                        }
                      ],
                      "ip_analyses": [
                        {
                          "node_id": "feature_ip_1",
                          "status": "Approved",
                          "device_brand": "Apple",
                          "device_model": "iPhone",
                          "browser_family": "Mobile Safari",
                          "os_family": "iOS",
                          "platform": "mobile",
                          "device_fingerprint": "didit-fp-a1b2c3d4e5f6g7h8",
                          "ip_country": "Spain",
                          "ip_country_code": "ES",
                          "ip_state": "Barcelona",
                          "ip_city": "Barcelona",
                          "latitude": 41.4022,
                          "longitude": 2.1407,
                          "ip_address": "83.50.226.71",
                          "isp": null,
                          "organization": null,
                          "is_vpn_or_tor": false,
                          "is_data_center": false,
                          "time_zone": "Europe/Madrid",
                          "time_zone_offset": "+0100",
                          "ip": {
                            "location": {
                              "latitude": 40.2206327,
                              "longitude": 1.5770097
                            },
                            "distance_from_id_document": 23.4,
                            "distance_from_poa_document": 12.3
                          },
                          "id_document": {
                            "location": {
                              "latitude": 41.2706327,
                              "longitude": 1.9770097
                            },
                            "distance_from_ip": 23.4,
                            "distance_from_poa_document": 18.7
                          },
                          "poa_document": {
                            "location": {
                              "latitude": 41.2706327,
                              "longitude": 1.9770097
                            },
                            "distance_from_ip": 12.3,
                            "distance_from_id_document": 18.7
                          },
                          "warnings": [],
                          "matches": [
                            {
                              "session_id": "99999999-8888-7777-6666-555555555555",
                              "session_number": 41205,
                              "vendor_data": "22222222-2222-2222-2222-222222222222",
                              "verification_date": "2024-07-20T10:15:30Z",
                              "match_type": "ip_address",
                              "match_source": "ip_address",
                              "matched_value": "83.50.226.71",
                              "status": "Approved",
                              "is_blocklisted": false,
                              "api_service": null,
                              "source": "session",
                              "device_info": {
                                "device_brand": "Apple",
                                "device_model": "iPhone",
                                "browser_family": "Mobile Safari",
                                "os_family": "iOS",
                                "platform": "mobile",
                                "device_fingerprint": "didit-fp-f9e8d7c6b5a40312"
                              },
                              "location_info": {
                                "ip_address": "83.50.226.71",
                                "ip_country": "Spain",
                                "ip_country_code": "ES",
                                "ip_state": "Barcelona",
                                "ip_city": "Barcelona",
                                "is_vpn_or_tor": false,
                                "is_data_center": false
                              },
                              "confidence": 0.0,
                              "match_mode": "co_occurrence"
                            },
                            {
                              "session_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                              "session_number": 42830,
                              "vendor_data": "33333333-3333-3333-3333-333333333333",
                              "verification_date": "2024-06-30T18:22:05Z",
                              "match_type": "device_fingerprint",
                              "match_source": "recovered_high",
                              "matched_value": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                              "status": "Declined",
                              "is_blocklisted": false,
                              "api_service": null,
                              "source": "session",
                              "device_info": {
                                "device_brand": "Samsung",
                                "device_model": "SM-G991B",
                                "browser_family": "Chrome Mobile",
                                "os_family": "Android",
                                "platform": "mobile",
                                "device_fingerprint": null
                              },
                              "location_info": {
                                "ip_address": "83.50.231.18",
                                "ip_country": "Spain",
                                "ip_country_code": "ES",
                                "ip_state": "Madrid",
                                "ip_city": "Madrid",
                                "is_vpn_or_tor": false,
                                "is_data_center": false
                              },
                              "confidence": 1.0,
                              "match_mode": "deterministic",
                              "recovery_similarity": 0.9874,
                              "tls_ja4_corroborated": true,
                              "recovery_gate_reason": "hardware_root_match"
                            }
                          ]
                        }
                      ],
                      "database_validations": [
                        {
                          "node_id": "feature_db_validation_1",
                          "issuing_state": "BRA",
                          "validation_type": "one_by_one",
                          "screened_data": {
                            "last_name": "De Lima",
                            "first_name": "Fernando",
                            "tax_number": "01234567890",
                            "date_of_birth": "1980-01-01",
                            "document_type": "ID",
                            "expiration_date": "2030-01-01"
                          },
                          "validations": [
                            {
                              "service_id": "bra_cpf",
                              "service_name": "Brazil - CPF status check",
                              "outcome_code": "MATCH",
                              "validation": {
                                "full_name": "full_match",
                                "date_of_birth": "full_match",
                                "identification_number": "full_match"
                              },
                              "source_data": {
                                "identification_number": "01234567890",
                                "first_name": "FERNANDO",
                                "last_name": "DE LIMA",
                                "date_of_birth": "1980-01-01",
                                "gender": "M",
                                "nationality": "BRA"
                              }
                            }
                          ],
                          "match_type": "full_match",
                          "status": "Approved",
                          "warnings": []
                        }
                      ],
                      "reviews": [
                        {
                          "user": "compliance@example.com",
                          "new_status": "Declined",
                          "comment": "Possible match found in AML screening",
                          "created_at": "2024-07-18T13:29:00.366811Z"
                        }
                      ],
                      "created_at": "2024-07-24T08:54:25.443172Z",
                      "expires_at": "2025-07-24T08:54:25.443172Z",
                      "biometric_consent": {
                        "required": false,
                        "trigger": null,
                        "status": "not_required",
                        "given_at": null,
                        "declined_at": null,
                        "text_version": null,
                        "text_hash": null,
                        "locale": null,
                        "policy_url": null,
                        "step": null,
                        "node_id": null,
                        "ip_address": null,
                        "ip_country_code": null,
                        "ip_state": null,
                        "ip_city": null,
                        "user_agent": null,
                        "detected_ip_address": "83.50.226.71",
                        "detected_country_code": "ES",
                        "detected_state": "ES-B",
                        "detected_city": "Barcelona",
                        "declared_state": null,
                        "document_state": null,
                        "jurisdictions": [],
                        "retention_months": null,
                        "reason": null,
                        "decline_reason": null,
                        "face_data_deleted_at": null
                      }
                    }
                  },
                  "BusinessExample": {
                    "summary": "مثال على جلسة التحقق من الشركات (KYB)",
                    "description": "قرار `session_kind = \"business\"`: تستبدل جلسات KYB مصفوفات ميزات KYC بـ `registry_checks` و`document_verifications` و`key_people_checks`، بينما تتشارك في `aml_screenings` و`phone_verifications` و`email_verifications` و`questionnaire_responses` و`ip_analyses` و`reviews` وغلاف الجلسة.",
                    "value": {
                      "session_id": "66666666-7777-8888-9999-000000000000",
                      "session_kind": "business",
                      "session_number": 31415,
                      "session_url": "https://verify.didit.me/session/business123",
                      "status": "In Review",
                      "environment": "live",
                      "workflow_id": "abababab-cdcd-efef-0101-232323232323",
                      "features": [
                        "KYB_REGISTRY",
                        "KYB_DOCUMENTS",
                        "KYB_KEY_PEOPLE"
                      ],
                      "vendor_data": "merchant-001234",
                      "metadata": null,
                      "callback": "https://example.com/verification/callback",
                      "registry_checks": [
                        {
                          "status": "Approved",
                          "node_id": "feature_kyb_registry_1",
                          "data_resolved": true,
                          "company": {
                            "uuid": "dddd4444-eeee-5555-ffff-666677778888",
                            "node_id": "feature_kyb_registry_1",
                            "status": "Approved",
                            "registry_status": "active",
                            "data_resolved": true,
                            "company_name": "ACME HOLDINGS LTD",
                            "registration_number": "12345678",
                            "country_code": "GB",
                            "region": null,
                            "company_type": "Private Limited Company",
                            "incorporation_date": "2015-03-12",
                            "registered_address": "1 Example Street, London, EC1A 1AA",
                            "tax_number": null,
                            "risk_level": null,
                            "verification_status": "verified",
                            "is_from_registry": true,
                            "fetch_status": "resolved",
                            "alternative_names": null,
                            "nature_of_business": "62012 - Business and domestic software development",
                            "registered_capital": "100 GBP",
                            "registered_capital_amount": "100.00",
                            "registered_capital_currency": "GBP",
                            "website": null,
                            "email": null,
                            "phone": null,
                            "legal_entity_identifier": null,
                            "location_of_registration": "England and Wales",
                            "financial_summary": null,
                            "officers": [
                              {
                                "uuid": "aaaa1111-bbbb-2222-cccc-333344445555",
                                "name": "Jane Smith",
                                "designation": "Director",
                                "role": "director",
                                "nationality": "British",
                                "is_active": true,
                                "kyc_status": "Approved",
                                "kyc_session_url": "https://verify.didit.me/session/abc123def456"
                              }
                            ],
                            "beneficial_owners": [
                              {
                                "uuid": "bbbb2222-cccc-3333-dddd-444455556666",
                                "name": "John Doe",
                                "first_name": "John",
                                "last_name": "Doe",
                                "entity_type": "person",
                                "roles": [
                                  "ubo",
                                  "shareholder"
                                ],
                                "ownership_min_shares": "50",
                                "ownership_max_shares": "75",
                                "is_active": true,
                                "kyc_status": "Pending",
                                "kyc_session_url": "https://verify.didit.me/session/def456ghi789",
                                "effective_ownership_percent": 75.0
                              }
                            ],
                            "addresses": [
                              {
                                "type": "registered",
                                "address": "1 Example Street, London, EC1A 1AA",
                                "country": "GB"
                              }
                            ],
                            "industries": [
                              {
                                "code": "62012",
                                "description": "Business and domestic software development"
                              }
                            ],
                            "accounts": null,
                            "registry_data": {},
                            "user_provided_data": {
                              "company_name": "ACME HOLDINGS",
                              "registration_number": "12345678"
                            },
                            "confirmed_by_user_at": "2026-06-10T12:01:30.000000Z",
                            "last_console_edit_at": null,
                            "is_editable": false
                          },
                          "ownership_structure": {
                            "shareholders": [
                              {
                                "name": "John Doe",
                                "first_name": "John",
                                "last_name": "Doe",
                                "date_of_birth": null,
                                "country_of_birth": null,
                                "company_name": null,
                                "registration_number": null,
                                "entity_type": "person",
                                "nationality": null,
                                "designation": null,
                                "roles": [
                                  "shareholder"
                                ],
                                "ownership_min_shares": "75",
                                "ownership_max_shares": "75",
                                "voting_min_shares": null,
                                "voting_max_shares": null,
                                "appointment_date": null,
                                "is_active": true,
                                "shareholding": {
                                  "share_class": "ORDINARY",
                                  "number_of_shares": 750.0,
                                  "currency": "GBP",
                                  "nominal_value": 1.0,
                                  "total_value": null,
                                  "percentage": 75.0
                                }
                              }
                            ],
                            "beneficial_owners": []
                          },
                          "warnings": []
                        }
                      ],
                      "aml_screenings": null,
                      "document_verifications": [
                        {
                          "status": "In Review",
                          "node_id": "feature_kyb_documents_1",
                          "items": [
                            {
                              "uuid": "eeee5555-ffff-6666-0000-777788889999",
                              "document_type": "LEGAL_PRESENCE",
                              "document_subtype": "CERTIFICATE_OF_INCORPORATION",
                              "document_group": "LEGAL_PRESENCE",
                              "file_url": "https://<media-host>/kyb/certificate-of-incorporation.pdf",
                              "original_filename": "certificate_of_incorporation.pdf",
                              "file_size": 482133,
                              "status": "Approved",
                              "created_at": "2026-06-10T12:03:11.000000Z",
                              "cross_check_result": {
                                "critical": {
                                  "company_name": {
                                    "document": "ACME HOLDINGS LTD",
                                    "registry": "ACME HOLDINGS LTD",
                                    "score": 1.0,
                                    "match": true
                                  },
                                  "registration_number": {
                                    "document": "12345678",
                                    "registry": "12345678",
                                    "match": true
                                  }
                                },
                                "non_critical": {},
                                "people": {}
                              },
                              "document_metadata": {
                                "file_size": 482133,
                                "content_type": "application/pdf",
                                "creation_date": "2015-03-12T09:00:00",
                                "modified_date": "2015-03-12T09:00:00",
                                "creator": null,
                                "producer": null,
                                "software": null,
                                "encryption": null,
                                "is_signed": true,
                                "is_tampered": false,
                                "signature_info": null,
                                "exif_original_date": null,
                                "exif_digitized_date": null,
                                "processed_by_known_editor": false,
                                "has_different_creation_mod_date": false,
                                "overlay_manipulation": null
                              },
                              "description": null,
                              "is_requested": false,
                              "ocr_data": {
                                "company_name": "ACME HOLDINGS LTD",
                                "registration_number": "12345678",
                                "incorporation_date": "2015-03-12"
                              },
                              "is_console_upload": false,
                              "is_confirmed": true
                            },
                            {
                              "uuid": "ffff6666-0000-7777-1111-888899990000",
                              "document_type": "OWNERSHIP_STRUCTURE",
                              "document_subtype": null,
                              "document_group": "OWNERSHIP_STRUCTURE",
                              "file_url": null,
                              "original_filename": null,
                              "file_size": null,
                              "status": "Not Finished",
                              "created_at": "2026-06-10T15:40:02.000000Z",
                              "cross_check_result": null,
                              "document_metadata": null,
                              "description": "Please upload an up-to-date shareholder registry",
                              "is_requested": true,
                              "ocr_data": null,
                              "is_console_upload": false,
                              "is_confirmed": true
                            }
                          ],
                          "groups": {
                            "LEGAL_PRESENCE": {
                              "total": 1,
                              "approved": 1,
                              "pending": 0,
                              "declined": 0,
                              "in_review": 0,
                              "other": 0,
                              "missing": 0
                            },
                            "OWNERSHIP_STRUCTURE": {
                              "total": 1,
                              "approved": 0,
                              "pending": 0,
                              "declined": 0,
                              "in_review": 0,
                              "other": 0,
                              "missing": 1
                            }
                          },
                          "required_groups": [
                            "LEGAL_PRESENCE",
                            "OWNERSHIP_STRUCTURE"
                          ],
                          "warnings": []
                        }
                      ],
                      "key_people_checks": [
                        {
                          "status": "In Review",
                          "node_id": "feature_kyb_key_people_1",
                          "registry": {
                            "officers": [
                              {
                                "uuid": "aaaa1111-bbbb-2222-cccc-333344445555",
                                "name": "Jane Smith",
                                "designation": "Director",
                                "role": "director",
                                "nationality": "British",
                                "appointment_date": "2015-03-12",
                                "termination_date": null,
                                "is_active": true,
                                "address": "1 Example Street, London, EC1A 1AA",
                                "aml_status": "Approved",
                                "kyc_status": "Approved",
                                "kyc_session_url": "https://verify.didit.me/session/abc123def456",
                                "kyc_session_id": "77777777-8888-9999-aaaa-bbbbbbbbbbbb",
                                "verification_workflow_type": "kyc",
                                "verification_workflow_id": "12121212-3434-5656-7878-909090909090",
                                "verification_workflow_label": "Key People KYC",
                                "verification_workflow_features": [
                                  {
                                    "feature": "ID_VERIFICATION",
                                    "status": "Approved"
                                  },
                                  {
                                    "feature": "LIVENESS",
                                    "status": "Approved"
                                  },
                                  {
                                    "feature": "AML",
                                    "status": "Approved"
                                  }
                                ],
                                "didit_internal_id": "99999999-0000-1111-2222-333333333333",
                                "kyc_document_type": "P",
                                "kyc_nationality": "GBR",
                                "kyc_liveness_passed": true,
                                "kyc_verified_at": "2026-06-10T14:22:31.123456Z",
                                "kyc_aml_categories": {
                                  "sanctions": "clear",
                                  "pep": "clear",
                                  "adverse_media": "clear",
                                  "warnings": "clear"
                                },
                                "kyc_notification_sent_at": "2026-06-09T09:00:00.000000Z"
                              }
                            ],
                            "beneficial_owners": [
                              {
                                "uuid": "bbbb2222-cccc-3333-dddd-444455556666",
                                "name": "John Doe",
                                "first_name": "John",
                                "last_name": "Doe",
                                "date_of_birth": "1980-05-04",
                                "country_of_birth": null,
                                "email": null,
                                "company_name": null,
                                "registration_number": null,
                                "entity_type": "person",
                                "nationality": "British",
                                "designation": null,
                                "roles": [
                                  "ubo",
                                  "shareholder"
                                ],
                                "ownership_min_shares": "50",
                                "ownership_max_shares": "75",
                                "is_active": true,
                                "aml_status": null,
                                "kyc_status": "In Progress",
                                "kyc_session_url": "https://verify.didit.me/session/def456ghi789",
                                "kyc_session_id": "88888888-9999-aaaa-bbbb-cccccccccccc",
                                "verification_workflow_type": "kyc",
                                "verification_workflow_id": "12121212-3434-5656-7878-909090909090",
                                "verification_workflow_label": "Key People KYC",
                                "verification_workflow_features": [
                                  {
                                    "feature": "ID_VERIFICATION",
                                    "status": "Not Finished"
                                  },
                                  {
                                    "feature": "LIVENESS",
                                    "status": "Not Finished"
                                  },
                                  {
                                    "feature": "AML",
                                    "status": "Not Finished"
                                  }
                                ],
                                "didit_internal_id": null,
                                "kyc_document_type": null,
                                "kyc_nationality": null,
                                "kyc_liveness_passed": null,
                                "kyc_verified_at": null,
                                "kyc_aml_categories": null,
                                "kyc_notification_sent_at": null,
                                "child_beneficial_owners": [],
                                "effective_ownership_percent": 75.0
                              }
                            ]
                          },
                          "submitted": {
                            "parties": [
                              {
                                "uuid": "cccc3333-dddd-4444-eeee-555566667777",
                                "entity_type": "person",
                                "source": "USER",
                                "name": "John Doe",
                                "first_name": "John",
                                "last_name": "Doe",
                                "company_name": null,
                                "registration_number": null,
                                "email": "john.doe@example.com",
                                "nationality": "GBR",
                                "phone_number": "+447700900123",
                                "date_of_birth": "1980-05-04",
                                "position": "Chief Executive Officer",
                                "custom_fields": {},
                                "is_active": true,
                                "is_skipped": false,
                                "requires_verification": true,
                                "roles": [
                                  {
                                    "role": "ubo",
                                    "ownership_percent": 75.0,
                                    "voting_percent": 75.0
                                  },
                                  {
                                    "role": "director",
                                    "ownership_percent": null,
                                    "voting_percent": null
                                  }
                                ],
                                "kyc_session_id": "88888888-9999-aaaa-bbbb-cccccccccccc",
                                "kyc_session_status": "In Progress",
                                "kyc_session_url": "https://verify.didit.me/session/def456ghi789",
                                "kyb_sub_session_id": null,
                                "kyb_sub_session_status": null,
                                "kyb_sub_session_url": null,
                                "verification_workflow_type": "kyc",
                                "verification_workflow_id": "12121212-3434-5656-7878-909090909090",
                                "verification_workflow_label": "Key People KYC",
                                "verification_workflow_features": [
                                  {
                                    "feature": "ID_VERIFICATION",
                                    "status": "Not Finished"
                                  },
                                  {
                                    "feature": "LIVENESS",
                                    "status": "Not Finished"
                                  },
                                  {
                                    "feature": "AML",
                                    "status": "Not Finished"
                                  }
                                ],
                                "didit_internal_id": null
                              }
                            ]
                          },
                          "ubo_kyc_summary": {
                            "total": 1,
                            "approved": 0,
                            "flagged": 0,
                            "pending": 1
                          },
                          "warnings": []
                        }
                      ],
                      "phone_verifications": null,
                      "email_verifications": null,
                      "questionnaire_responses": null,
                      "ip_analyses": null,
                      "reviews": [],
                      "contact_details": null,
                      "expected_details": {
                        "company_name": "Tesco PLC",
                        "registry_country": "GB",
                        "registration_number": "00445790"
                      },
                      "created_at": "2026-06-10T11:58:04.000000Z",
                      "expires_at": "2026-06-24T11:58:04.000000Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SessionDecision"
                }
              }
            }
          },
          "403": {
            "description": "فشلت المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. تميز سلسلتان نصيتان من `detail` بين أوضاع الفشل:\n\n- `\"Authentication credentials were not provided or are invalid.\"` — لا يوجد رأس `x-api-key` (ولا يوجد token لـ `Authorization: Bearer`)، أو فشل فحص بيانات الاعتماد المقدمة (ملغاة، أو منتهية الصلاحية، أو غير صحيحة البنية).\n- `\"You do not have permission to perform this action.\"` — بيانات الاعتماد صالحة ولكن لا يُسمح لها بقراءة هذه الجلسة: يفتقر Bearer token الخاص بمستخدم لوحة التحكم إلى إذن `read:sessions` أو لا يمكنه الوصول إلى التطبيق المالك، أو ينتمي مفتاح API إلى مؤسسة مختلفة عن الجلسة.\n\nلاحظ أنه بالنسبة لـ `sessionId` غير معروف تماماً، يحدد endpoint التطبيق المالك قبل التحقق من بيانات الاعتماد، لذلك تُرجع الجلسة المفقودة `404` حتى عندما تكون بيانات الاعتماد مفقودة أو غير صالحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "Authentication credentials were not provided or are invalid."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل فحص المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Insufficient permissions": {
                    "summary": "بيانات اعتماد صالحة تفتقر إلى read:sessions أو حق الوصول إلى التطبيق المالِك",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الجلسة. يُرجع عندما لا تطابق أي جلسة نشطة قيمة `sessionId` المقدمة سواء كجلسة التحقق من المستخدمين (KYC) أو جلسة التحقق من الشركات (KYB) — والجلسة التي تم حذفها تنتهي هنا أيضاً. نص الاستجابة هو غلاف `{\"detail\": ...}` القياسي.\n\n**سلسلتا `detail` متمايزتان.** إذا كان `sessionId` غير معروف كجلسة KYC وجلسة KYB معاً، يفشل البحث المسبق عن المالك قبل المصادقة وتتلقى `{\"detail\": \"Not found.\"}` — يحدث هذا قبل التحقق من بيانات الاعتماد، لذلك يتم إرجاعه حتى للطلبات غير المصادق عليها. إذا كانت الجلسة موجودة ولكن لا يمكن استردادها ضمن التطبيق المصادق عليه (على سبيل المثال سجل قديم أو تم حذفه للتو)، يُرجع العرض `{\"detail\": \"Session not found.\"}`. يشير كلاهما إلى النتيجة نفسها — يتعذر الوصول إلى الجلسة — لذا تحقق من رمز الحالة `404` بدلاً من النص.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "Not found."
                    }
                  }
                },
                "examples": {
                  "Unknown session id": {
                    "summary": "sessionId غير معروف لهذا التطبيق",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Session not retrievable": {
                    "summary": "الجلسة موجودة ولكن لا يمكن استردادها لهذا التطبيق",
                    "value": {
                      "detail": "Session not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. تقتصر طلبات GET على **600 طلب في الدقيقة لكل بيانات اعتماد** (مفتاح API أو Bearer token أو عنوان IP المصدر في حال عدم المصادقة). تحقق من `Retry-After` / `X-RateLimit-Reset` وانتظر قبل إعادة المحاولة. إذا واجهت هذا الحد أثناء الاستقصاء الدوري للقرارات، فقم بالتبديل إلى webhook لـ `status.updated` واسترجع القرار مرة واحدة لكل تغيير في الحالة بدلاً من ذلك.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني التي يجب انتظارها قبل إعادة محاولة إرسال الطلب.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الحد الأقصى لعدد الطلبات المسموح بها في النافذة الحالية (600 لطلبات GET).",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "طابع Unix الزمني (بالثواني) الذي تتم عنده إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1750000000
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "تفسير سهل القراءة لتجاوز حد المعدل.",
                      "example": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "summary": "أكثر من 600 طلب GET في دقيقة واحدة من نفس بيانات الاعتماد",
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق التي تريد استرداد قرارها. هذا هو `session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`. يعمل نفس المسار مع كل من جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB) — يطابق الخادم المعرّف عبر كلا نوعي الجلسات.\n\n**يجب أن يكون UUID صالحًا.** يطابق المسار قيم UUID صالحة البنية فقط، لذا يتم رفض أي قيمة غير صالحة البنية بواسطة موجه URL قبل تشغيل أي كود برمجي للتطبيق وتكون الاستجابة صفحة **HTML** برمز `404` بدلاً من تنسيق JSON لـ `{\"detail\": ...}` الموضح أدناه. تحقق من صحة تنسيق UUID من جانب العميل حتى تتمكن من التمييز بين خطأ في الإدخال وبين خطأ `404` حقيقي ناتج عن جلسة غير موجودة.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "قائمة مفصولة بفواصل للأقسام الإضافية في payload. القيم المدعومة: `events` و`resubmissions`، منفردة أو معاً (`events,resubmissions`). عند تمرير `include=events`، تتضمن الاستجابة بشكل إضافي المخطط الزمني لأحداث الجلسة (`events`، بما في ذلك أحداث التوجيه `WORKFLOW_BRANCH_EVALUATED` / `WORKFLOW_STATUS_NODE_REACHED` الموضحة في صفحة استرداد الجلسة)، وسجل النشاط الكامل (`activity_reviews`)، وعلامات قائمة الحظر (`blocklisted`)، وتفصيل التكلفة لكل جلسة (`cost_breakdown`)، والبيانات الوصفية لسير العمل (`workflow_type` و`workflow_version` و`workflow_version_id` و`workflow_terminal_node_id` - آخر عقدة حالة مسجلة لسير العمل قامت بتعيين حالة الجلسة، أو `null` إذا لم يتم تسجيل أي منها؛ وهو سجل تاريخي للمصدر لا يتم مسحه بالموافقات اليدوية أو حالات الرفض أو عمليات إعادة الإرسال، ويُستبدل بعقدة حالة لاحقة في سير العمل)، والبيانات الوصفية للجلسة (`api_service` — سلسلة نصية أو `null`، يتم تعيينها فقط لجلسات API المستقلة؛ و`session_type` — `API` أو `HOSTED` أو `MIGRATED`؛ و`has_device_nfc_support` — قيمة منطقية). يتغير حقلان مقارنة بالشكل الأساسي: يتم **حذف** مميز `session_kind` ذي المستوى الأعلى (شكل الأحداث متاح فقط لجلسات المستخدمين)، وتتحول مصفوفة `features` من سلاسل نصية عادية إلى كائنات بتنسيق `{feature, node_id}` — حيث يُبلّغ عن ميزة البريد الإلكتروني كـ `EMAIL` بدلاً من `EMAIL_VERIFICATION`. يُستخدم هذا الشكل الموسع بشكل أساسي بواسطة Didit Console؛ ويجب على معظم عمليات تكامل API حذف هذا المعامل. **قيود KYB:** ينطبق `include=events` فقط على جلسات المستخدمين (KYC). ترجع جلسات الشركات (`session_kind = \"business\"`) دائماً شكل قرار الشركات القياسي — ولا يتم إرجاع `events` و`activity_reviews` و`blocklisted` و`cost_breakdown` والبيانات الوصفية الإضافية لـ `workflow_*`/الجلسة لجلسات الشركات مطلقاً، وتظل مصفوفة `features` الخاصة بها مصفوفة سلاسل نصية عادية. مع `include=resubmissions` (جلسات المستخدمين والشركات على حد سواء)، تحتوي الاستجابة أيضاً على `resubmissions`: إدخال واحد لكل طلب إعادة إرسال، الأقدم أولاً، يحتوي كل منها على `number` و`created_at` و`previous_status` و`nodes` و`reasons` و`requested_by` و`results` (ما أرجعته الخطوات المعاد إرسالها قبل الطلب، تحت نفس المفاتيح وبنفس شكل النتائج الحالية). يحمل كل عنصر في `cost_breakdown` الحقول `usage_type` و`price` و`details` و`created_at`: وتتم فوترة الخطوة المعاد إرسالها والتي يتم تشغيلها مرة أخرى كعنصر جديد.",
            "schema": {
              "type": "string",
              "enum": [
                "events",
                "resubmissions",
                "events,resubmissions"
              ],
              "example": "events"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X GET 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/decision/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Accept: application/json'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.retrieve_decision(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.retrieveDecision(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.RetrieveDecision(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsRetrieveDecisionParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().retrieveDecision(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->retrieveDecision('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.retrieve_decision(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.RetrieveDecisionAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/delete/": {
      "delete": {
        "summary": "حذف جلسة تحقق (KYC أو KYB)",
        "description": "حذف جلسة تحقق واحدة، سواء كانت جلسة التحقق من المستخدمين (KYC) أو جلسة التحقق من الشركات (KYB)، باستخدام `session_id` الخاص بها. يتم التحقق من المعرّف مقابل جلسات KYC أولاً، ثم جلسات KYB، لذا يتم حذف كلا النوعين من خلال عنوان URL هذا فقط.\n\n**ما يتم حذفه:**\n- الجلسة وكل محاولة تحقق تحتوي عليها، بما في ذلك النتائج التي حلت محلها إعادة الإرسال: القرار، والبيانات المستخرجة، وجميع سجلات الميزات ذات الصلة (التحقق من الهوية، والوجه، وكشف الحيوية، ومطابقة الوجه، وفحص AML، وفحوصات السجل، وتحليل IP، وما إلى ذلك)، ومراجعاتها وسجل نشاطها.\n- جميع الملفات المخزنة المملوكة للجلسة: صور الوجهين الأمامي/الخلفي للمستند (النسخ الكاملة، والمقتطعة، والمموهة للخصوصية)، ومقاطع فيديو التقاط المستند، والقصاصات الشخصية، وصور الوجه والتوقيع من شريحة NFC، والصور المرجعية للوجه، ومقاطع فيديو كشف الحيوية، وصور المصدر/الهدف لمطابقة الوجه، ومستندات إثبات العنوان، وأي ملفات إضافية مرفوعة (KYC)؛ ومستندات الشركة المرفوعة والملفات الإضافية (KYB). مستندات التوقيع الإلكتروني، وملفات PDF الموقعة، وملفات PDF للأدلة وصور التوقيع (KYC و KYB): تتوقف مسارات تنزيلها عن العمل. تتوقف عناوين URL للوسائط الصادرة سابقاً (`https://<media-host>/...`) عن العمل.\n- بيانات الوجه الخاصة بالجلسة. يتم حذف تضمين الوجه الخاص بها أيضاً، ما لم تختر الاحتفاظ بقالب خالٍ من الصور (راجع **البيانات البيومترية للوجه**).\n- عمليات تسليم webhook التي لا تزال في قائمة الانتظار للجلسة، وإعادة محاولاتها. لا تتأثر عمليات webhook التي تم تسليمها بالفعل.\n- بالنسبة لجلسة التحقق من الشركات (KYB): عمليات التحقق التي أنشأتها للأشخاص الرئيسيين (KYC) ومالكي الشركات (KYB)، بشكل متكرر، ويتم الإبلاغ عنها كـ `deleted_child_verifications`. لا يتم حذف عملية التحقق التي ترتبط بها فقط، مثل جلسة KYC موجودة مسبقاً ومقبولة تمت إعادة استخدامها.\n\nتختفي الجلسة من كل endpoint للقراءة فوراً: يعرض `GET /v3/session/{sessionId}/decision/` الرمز `404` ويتوقف `GET /v3/sessions/` عن إدراجها. تتوقف مراقبة AML المستمرة ومراقبة سجل KYB التي بدأتها عمليات التحقق المحذوفة.\n\n**ما لا يتأثر:** **لا** تتم إزالة إدخالات قائمة الحظر التي تم إنشاؤها من هذه الجلسة (الوجه أو المستند)؛ قم بإدارة هذه الإدخالات باستخدام endpoints قائمة الحظر. رموز المشاركة المميزة الصادرة للجلسة لا يتم إبطالها، ولكن لا يتبقى شيء لتستورده: الاستيراد باستخدام أحدها يعرض `400` مع `{\"share_token\": [\"Original session does not exist.\"]}`. الأرصدة المستهلكة بالفعل **لا** تُسترد. الكيان الأصل، سواء كان المستخدم أو الشركة، **لا** يُحذف؛ استخدم `POST /v3/users/delete/` أو `POST /v3/businesses/delete/` لتلك الكيانات. إذا كانت الصورة الشخصية لملف تعريف المستخدم مأخوذة من هذه الجلسة، فستتم إزالة الصورة الشخصية معها.\n\n**البيانات البيومترية للوجه:** بشكل افتراضي، يتم حذف تضمين الوجه الخاص بالجلسة مع الجلسة (`face_retention_outcome: deleted`). يحتفظ التطبيق الذي اشترك في الاحتفاظ بالقالب البيومتري (`face_retention_policy: retain_until_user_deleted` في `PATCH /v3/webhook/`)، أو الطلب الذي يحتوي على `retain_face_embeddings: true`، بقالب بيومتري واحد للوجه يُدار بشكل منفصل وخالٍ من الصور مرتبط بمستخدم الجلسة (`retained_with_user`) حتى يستمر عمل كشف التكرار، والبحث بالوجه، والمصادقة البيومترية. لا يحتوي القالب أبداً على صورة الوجه أو الوسائط أو حقول الهوية أو القرار أو معرّف الجلسة المحذوفة؛ إنها بيانات بيومترية يتم حذفها عند `biometric_template_expires_at`، أو قبل ذلك عند حذف المستخدم، أو مسح الخصوصية، أو إجراء مسح صريح من خلال `/v3/biometric-templates/`. لا يمكن لجلسة بدون مستخدم مرتبط الاحتفاظ بقالب (`ineligible_no_vendor_user`). أرسل `deletion_instruction: privacy_erasure` لطلبات أصحاب البيانات: يؤدي ذلك إلى مسح كل قالب تم الاحتفاظ به لهذا المستخدم ولا يحتفظ أبداً بقالب جديد.\n\n**غير قابلة للإلغاء:** الحذف نهائي ولا توجد endpoint للاستعادة. قم بتصدير أي شيء تحتاجه (على سبيل المثال، ملف PDF للقرار) قبل استدعائه.\n\n**الآثار الجانبية:** لا يتم إرسال أي webhook لعمليات الحذف.\n\n**الاستجابة:** `200 OK` بمجرد اكتمال الحذف، مع نص JSON يوضح `face_retention_outcome`، وتاريخ انتهاء صلاحية القالب المحتفظ به، وبالنسبة لجلسة KYB، `deleted_child_verifications`. كانت الإصدارات السابقة من هذه الـ endpoint تعرض `204 No Content`؛ يرجى تحديث البرامج العميلة التي تعتمد على `204`. احتفظ بـ `instruction_id` في سجل المسح الخاص بك.\n\n**الـ idempotency:** لا تتمتع بخاصية idempotency على مستوى HTTP: يعرض الاستدعاء الأول `200`؛ وتكراره يعرض `404` لأن الجلسة لم تعد موجودة. بعد الرمز `503`، تظل الجلسة موجودة؛ كرر الطلب نفسه لإنهاء حذفها.\n\n**المصادقة:** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`؛ يجب أن تنتمي الجلسة إلى ذلك التطبيق. يجوز لرموز وصول مستخدم لوحة التحكم (`Authorization: Bearer ...`) أيضاً استدعاء هذه الـ endpoint عندما تحمل الإذن `delete:sessions`. تعرض حالات فشل المصادقة وفشل الأذونات الرمز `403`؛ لا تعرض واجهة برمجة التطبيقات هذه الرمز `401` أبداً.\n\n**حد المعدل:** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE؛ وتجاوزها يعرض الرمز `429`.\n\nلحذف جلسات KYC بشكل جماعي باستخدام `session_number` الرقمي الخاص بها، استخدم `POST /v3/sessions/delete/` بدلاً من ذلك.\n\n**التقارير التنظيمية المودعة:** إذا كانت البيانات المحددة موجودة في تقرير تنظيمي نهائي، فسيتم رفض الطلب بأكمله برمز `409` ولن يتم حذف أي شيء. يستخدم جسم الاستجابة `code: in_filed_report` ويحدد كل تقرير باستخدام `uuid` و `report_number` و `report_type` و `case_uuid`. احذف التقارير، ثم كرر الطلب.",
        "operationId": "delete_v3_session_by_id",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID (`session_id`) لجلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB) المراد حذفها، كما تم إرجاعه عند إنشاء الجلسة. يجب أن يكون معرّف UUID قياسياً مفصولاً بشرطات — أي قيمة ليست بصيغة UUID لا تتطابق مع المسار وترجع `404`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "تم حذف الجلسة. يوضّح جسم الاستجابة ما حدث لبيانات الوجه البيومترية للجلسة، وبالنسبة لجلسة KYB، عدد عمليات التحقق التي أنشأتها وتم حذفها معها.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "الجلسة المحذوفة."
                    },
                    "session_number": {
                      "type": "integer",
                      "nullable": true,
                      "description": "رقم الجلسة المحذوفة."
                    },
                    "face_retention_outcome": {
                      "type": "string",
                      "enum": [
                        "retained_with_user",
                        "deleted",
                        "none",
                        "ineligible_no_vendor_user"
                      ],
                      "description": "ما حدث للبيانات البيومترية للوجه الخاصة بالجلسة. `deleted`: تم حذف تضمين الوجه مع الجلسة (افتراضي). `retained_with_user`: يتم حذف الجلسة ويظل قالب بيومتري واحد خالٍ من الصور مرتبطاً بالمستخدم؛ راجع `biometric_template_uuid`. `none`: لم تتضمن الجلسة أي تضمين للوجه (على سبيل المثال جلسة KYB، أو جلسة KYC بدون صورة سيلفي لكشف الحيوية). `ineligible_no_vendor_user`: تم طلب الاحتفاظ ولكن لا يوجد مستخدم مرتبط بالجلسة، لذا تم حذف التضمين مع الجلسة. لا يتم الإبلاغ عن فشل مخزن البيانات البيومترية مطلقاً عبر هذا الحقل في هذا الـ endpoint: بل يُرجع `503` ولا يتم حذف الجلسة."
                    },
                    "biometric_template_uuid": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true,
                      "description": "معرّف القالب البيومتري المحتفظ به عندما تكون قيمة `face_retention_outcome` هي `retained_with_user`؛ و`null` بخلاف ذلك. يمكنك إدارته عبر `/v3/biometric-templates/{template_uuid}/`."
                    },
                    "biometric_template_expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "متى يُحذف القالب البيومتري المحتفظ به، عندما تكون قيمة `face_retention_outcome` هي `retained_with_user`؛ وتكون `null` عند عدم الاحتفاظ بأي قالب."
                    },
                    "deleted_child_verifications": {
                      "type": "integer",
                      "description": "لجلسة التحقق من الشركات (KYB): عدد عمليات التحقق التي أنشأتها (جلسات KYC للأشخاص الرئيسيين وجلسات KYB للشركات المالكة، بشكل تكراري) والتي حُذفت معها. دائماً `0` لجلسة KYC."
                    }
                  }
                },
                "examples": {
                  "Deleted (default)": {
                    "value": {
                      "session_id": "4c5c7f3a-3b1d-4b7e-9c39-2b4f7e6a1d02",
                      "session_number": 1024,
                      "face_retention_outcome": "deleted",
                      "biometric_template_uuid": null,
                      "biometric_template_expires_at": null,
                      "deleted_child_verifications": 0
                    }
                  },
                  "Retained with User": {
                    "value": {
                      "session_id": "4c5c7f3a-3b1d-4b7e-9c39-2b4f7e6a1d02",
                      "session_number": 1024,
                      "face_retention_outcome": "retained_with_user",
                      "biometric_template_uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
                      "biometric_template_expires_at": "2027-10-09T10:15:00Z",
                      "deleted_child_verifications": 0
                    }
                  },
                  "Ineligible: no User": {
                    "summary": "طُلب الاحتفاظ في جلسة تم إنشاؤها بدون vendor_data",
                    "value": {
                      "session_id": "7a1e9c2d-5f4b-4c3a-8e2d-1b0a9f8e7d6c",
                      "session_number": 1031,
                      "face_retention_outcome": "ineligible_no_vendor_user",
                      "biometric_template_uuid": null,
                      "biometric_template_expires_at": null,
                      "deleted_child_verifications": 0
                    }
                  },
                  "KYB session": {
                    "value": {
                      "session_id": "0f3c9b7e-2d1a-4e5f-8c6b-7a9d8e1f2c3b",
                      "session_number": 88,
                      "face_retention_outcome": "none",
                      "biometric_template_uuid": null,
                      "biometric_template_expires_at": null,
                      "deleted_child_verifications": 3
                    },
                    "summary": "عملية تحقق من الشركة تم حذفها مع عمليات التحقق الثلاث التي أنشأتها لأشخاصها الرئيسيين"
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — لم يُحذف أي شيء.",
            "content": {
              "application/json": {
                "examples": {
                  "Privacy erasure cannot retain": {
                    "value": {
                      "retain_face_embeddings": [
                        "Privacy erasure cannot retain biometric templates."
                      ]
                    }
                  },
                  "No finite retention duration": {
                    "summary": "طُلب الاحتفاظ بدون face_retention_days في الطلب أو التطبيق",
                    "value": {
                      "detail": "A finite biometric-template retention duration is required."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو الإذن. يؤدي المفتاح المفقود أيضاً إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. استثناء: عندما لا يشير `sessionId` إلى جلسة نشطة، يُرجع البحث عن المالك قبل المصادقة الرمز `404` أولاً، حتى مع وجود بيانات اعتماد مفقودة أو غير صالحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid API key": {
                    "summary": "لا يوجد رأس x-api-key، أو أن المفتاح غير صالح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Insufficient permission": {
                    "summary": "رمز token للمستخدم بدون delete:sessions، أو بيانات اعتماد لتطبيق لا يملك الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة KYC أو KYB نشطة بهذا المعرّف `session_id` — المعرّف غير معروف أو تم حذف الجلسة بالفعل (تكرار عملية حذف ناجحة يؤدي إلى هذه النتيجة).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not Found": {
                    "summary": "جلسة غير معروفة أو محذوفة بالفعل",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد معدل الكتابة المشترك (300 طلب POST/PATCH/DELETE في الدقيقة لكل مفتاح API). افحص `Retry-After` ورؤوس الاستجابة `X-RateLimit-*` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "تم استنفاد ميزانية الكتابة",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "تعذر إكمال الحذف لعدم توفر خدمة تخزين أو مخزن بيومتري أو مزود مراقبة. لا تزال الجلسة موجودة؛ كرر الطلب نفسه حتى يُرجع `200`. قد يكون بعض ملفاتها المخزنة أو تضمين الوجه الخاص بها قد حُذف بالفعل، لذا لا تعتمد عليها بعد تلقي `503`. تتقارب عمليات إعادة المحاولة نحو قالب واحد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Session deletion unavailable": {
                    "summary": "خدمة تخزين أو مزود مراقبة كان غير متاح",
                    "value": {
                      "detail": "The session could not be deleted because a storage service or a monitoring provider is unavailable. The session is still in place; repeat the request to finish deleting it."
                    }
                  },
                  "Biometric store unavailable": {
                    "summary": "كان مخزن البيانات البيومترية غير متاح أثناء الاحتفاظ بالقالب أو مسحه",
                    "value": {
                      "detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "الجلسة جزء من تقرير تنظيمي نهائي. لم يتم حذف أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InFiledReportError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl (default policy)",
            "source": "curl -X DELETE \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/delete/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "curl",
            "label": "curl (retain template)",
            "source": "curl -X DELETE \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/delete/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"retain_face_embeddings\": true, \"face_retention_days\": 365}'"
          },
          {
            "lang": "curl",
            "label": "curl (privacy erasure)",
            "source": "curl -X DELETE \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/delete/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"deletion_instruction\": \"privacy_erasure\", \"instruction_id\": \"dsar-2026-0142\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n    retain_face_embeddings=True,\n    face_retention_days=365,\n    instruction_id=\"post-approval-cleanup-2026-08\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.delete(\"11111111-2222-3333-4444-555555555555\", {\n  retain_face_embeddings: true,\n  face_retention_days: 365,\n  instruction_id: \"post-approval-cleanup-2026-08\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Delete(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsDeleteParams{\n\tRetainFaceEmbeddings: didit.Bool(true),\n\tFaceRetentionDays:    didit.Int(365),\n\tInstructionID:        didit.String(\"post-approval-cleanup-2026-08\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().delete(\"11111111-2222-3333-4444-555555555555\", SessionsDeleteParams.builder()\n        .retainFaceEmbeddings(true)\n        .faceRetentionDays(365L)\n        .instructionId(\"post-approval-cleanup-2026-08\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->delete('11111111-2222-3333-4444-555555555555', [\n    'retain_face_embeddings' => true,\n    'face_retention_days' => 365,\n    'instruction_id' => 'post-approval-cleanup-2026-08',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.delete(\n  \"11111111-2222-3333-4444-555555555555\",\n  retain_face_embeddings: true,\n  face_retention_days: 365,\n  instruction_id: \"post-approval-cleanup-2026-08\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.DeleteAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsDeleteParams\n{\n    RetainFaceEmbeddings = true,\n    FaceRetentionDays = 365,\n    InstructionId = \"post-approval-cleanup-2026-08\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": false,
          "description": "اختياري. احذف نص الطلب بالكامل لاتباع سياسة الاحتفاظ بالبيانات الخاصة بالتطبيق مع حذف تشغيلي.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "retain_face_embeddings": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "تجاوز `face_retention_policy` الخاصة بالتطبيق لعملية الحذف هذه. القيمة `true` تحتفظ بقالب بيومتري واحد للوجه خالٍ من الصور ومرتبط بمستخدم الجلسة بعد حذف الجلسة؛ والقيمة `false` تحذف تضمين الوجه مع الجلسة؛ احذف المعامل أو عيّنه كـ `null` لاتباع سياسة التطبيق. يتم تجاهله لجلسات KYB وللجلسات التي لا تحتوي على تضمين للوجه.",
                    "example": true
                  },
                  "face_retention_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "مدة الاحتفاظ المحدودة، بالأيام، للقالب المحتفظ به. مطلوبة عند الاحتفاظ بالقالب ما لم يكن التطبيق قد عيّن بالفعل `face_retention_days`. يتم تعيين `expires_at` للقالب وفقاً للتاريخ الأقرب بين هذه المدة، وفترة الاحتفاظ بالبيانات العامة للتطبيق، و`face_retention_deadline`.",
                    "example": 365
                  },
                  "face_retention_deadline": {
                    "type": "string",
                    "format": "date-time",
                    "description": "انتهاء صلاحية نهائي اختياري لقالب تم الاحتفاظ به. يجب أن يكون في المستقبل.",
                    "example": "2027-08-28T00:00:00Z"
                  },
                  "deletion_instruction": {
                    "type": "string",
                    "enum": [
                      "operational_session_delete",
                      "privacy_erasure"
                    ],
                    "default": "operational_session_delete",
                    "description": "فئة التعليمات التي تقدمها. يقوم `operational_session_delete` بحذف الجلسة والاحتفاظ بالقالب فقط عندما تنص السياسة أو `retain_face_embeddings` على ذلك. بينما يقوم `privacy_erasure` بمسح كل قالب بيومتري تم الاحتفاظ به ومرتبط بمستخدم الجلسة قبل حذف الجلسة، ولا يمكن تجاوزه بواسطة سياسة التطبيق، ولا يمكن دمجه مع `retain_face_embeddings: true` (`400`).",
                    "example": "operational_session_delete"
                  },
                  "instruction_id": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "مرجعك الدائم لتعليمات الحذف هذه (على سبيل المثال معرّف تذكرة المسح). يُسجل في سجل التدقيق وعلى أي قالب يتم الاحتفاظ به. تنشئه Didit عند إغفاله.",
                    "example": "dsar-2026-0142"
                  }
                }
              },
              "examples": {
                "Retain a biometric template": {
                  "summary": "حذف الجلسة، والاحتفاظ بقالب خالٍ من الصور لمدة 365 يوماً",
                  "value": {
                    "retain_face_embeddings": true,
                    "face_retention_days": 365,
                    "instruction_id": "post-approval-cleanup-2026-08"
                  }
                },
                "Force deletion on an opted-in application": {
                  "summary": "حذف تضمين الوجه بغض النظر عن سياسة التطبيق",
                  "value": {
                    "retain_face_embeddings": false
                  }
                },
                "Privacy erasure": {
                  "summary": "طلب صاحب البيانات: حذف الجلسة وتطهير كل قالب تم الاحتفاظ به لهذا الشخص",
                  "value": {
                    "deletion_instruction": "privacy_erasure",
                    "instruction_id": "dsar-2026-0142"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/session/{sessionId}/generate-pdf/": {
      "get": {
        "summary": "تنزيل تقرير PDF لجلسة التحقق",
        "description": "عرض وتنزيل تقرير PDF جاهز للامتثال لجلسة تحقق مكتملة. يخدم نفس المسار كلاً من جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB) — يُطابق الخادم `sessionId` مع كلا نوعي الجلسات ويختار قالب التقرير المناسب.\n\n**الحالات المؤهلة.** يجب أن تحمل الجلسة بالفعل حالة نهائية أو قابلة للمراجعة:\n\n- جلسات KYC: `Approved`، أو `Declined`، أو `In Review`، أو `Kyc Expired`.\n- جلسات KYB: `Approved`، أو `Declined`، أو `In Review`.\n\nتُرجع أي حالة أخرى (`Not Started`، أو `In Progress`، أو `Expired`، أو `Abandoned`، …) رمز `403` مع نص `detail` توضيحي — انظر استجابة `403` أدناه.\n\n**ما يحتويه التقرير.** يعكس ملف PDF عرض الجلسة في لوحة التحكم في لحظة الطلب:\n\n- **KYC** — حالة الجلسة الإجمالية، وقائمة التحذيرات، وقسم واحد لكل ميزة تم تنفيذها: التحقق من الهوية (صور المستندات بالإضافة إلى الحقول المستخرجة)، وNFC، وكشف الحيوية، ومطابقة الوجه، والتحقق من البريد الإلكتروني، والتحقق من رقم الهاتف، وإثبات العنوان، وإجابات الاستبيانات، والتحقق من قواعد البيانات، وفحص AML، وتحليل عنوان IP — متبوعاً بوسوم الجلسة، ونشاط المراجعة في لوحة التحكم (التعليقات وتغييرات الحالة)، والجدول الزمني لأحداث الجلسة.\n- **KYB** — عمليات التحقق من السجل (بيانات الشركة)، وفحوصات AML، والتحقق من مستندات الشركة، وفحوصات الأشخاص الرئيسيين، والردود على الاستبيانات، والتحقق من رقم الهاتف/البريد الإلكتروني، وتحليلات عنوان IP، والجدول الزمني لأحداث الجلسة، متبوعة بالوسوم ونشاط المراجعة.\n\n**العلامة التجارية.** إذا كان تطبيقك يتضمن تخصيص العلامة البيضاء، فسيتم إنشاء التقرير مع شعارك وروابط إلى عنوان URL لسياسة الخصوصية الخاصة بك؛ وإلا فإنه يحمل العلامة التجارية لـ Didit. يتم إنشاء التقارير باللغة الإنجليزية — لا يوجد معامل للغة.\n\n**عدم التخزين المؤقت.** يُعيد كل استدعاء إنشاء ملف PDF من بيانات الجلسة الحالية، لذلك يعكس التقرير الذي تم إنشاؤه بعد مراجعة يدوية قرار المراجِع. يمكن أن ينتج عن استدعاءين لنفس الجلسة ملفان مختلفان من حيث البايتات — احتفظ بنسخة من الملف المُنزّل إذا كنت بحاجة إلى نسخة غير قابلة للتغيير.\n\n**زمن الاستجابة.** تقوم عملية العرض بتنزيل كل صورة مخزنة (أوجه المستندات، وصور السيلفي، والملفات الإضافية) قبل تكوين ملف PDF، لذا قد تستغرق الجلسات كثيفة الوسائط عدة ثوانٍ. استخدم مهلة قراءة سخية في العميل (يوصى بـ 60 ثانية) وقم بدفق محتوى الاستجابة مباشرة إلى القرص.\n\n**الشرطة المائلة في النهاية.** ينتهي المسار القياسي بشرطة مائلة في النهاية (`…/generate-pdf/`). يتم تقديم الطلب بدونها مباشرة مع نفس الاستجابة — لا توجد إعادة توجيه `301`، لذا لا يتعين على أي عميل اتباع عمليات إعادة التوجيه ولا يحتاج `curl` إلى `-L`. استخدم عنوان URL المزود بشرطة مائلة كما هو موضح في الأمثلة.\n\nإذا كنت بحاجة إلى البيانات الأساسية بتنسيق JSON بدلاً من تقرير تم إنشاؤه، فاستخدم `GET /v3/session/{sessionId}/decision/`. للحصول على جميع جلسات مستخدم واحد التي يمكن إعداد تقارير عنها في مستند واحد، استخدم `GET /v3/users/{vendor_data}/generate-pdf/`.",
        "operationId": "get_v3_session_generate_pdf",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "generate_pdf",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB) المراد عرضها — وهو `session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`. يعمل المسار نفسه لكلا نوعي الجلسات؛ استخدم اسم الملف في `Content-Disposition` بالاستجابة لمعرفة نوع التقرير الذي تلقيته.\n\n**يجب أن يكون معرّف UUID منسقاً بشكل سليم وبأحرف صغيرة.** يتطابق المسار فقط مع معرّفات UUID الصالحة، لذا يتم رفض أي قيمة غير صحيحة التنسيق بواسطة موجه URL قبل تشغيل أي تعليمات برمجية للتطبيق، وتكون الاستجابة صفحة **HTML** برمز `404` بدلاً من غلاف JSON `{\"detail\": ...}` الموضح أدناه. لا يتطابق محول UUID للمسار إلا مع الصيغة القياسية ذات الأحرف الصغيرة — ويتم رفض معرّفات UUID الست عشرية ذات الأحرف الكبيرة برمز HTML 404.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "مستند PDF المُصيَّر، يتم إرجاعه مباشرة كملف ثنائي `application/pdf` — لا يوجد غلاف JSON ولا إعادة توجيه عبر رابط تنزيل. يبدأ جسم الاستجابة ببايتات `%PDF` السحرية (PDF 1.7). احفظه في ملف بصيغة `.pdf` أو مرره مباشرة كبث إلى المتصل بك.",
            "headers": {
              "Content-Disposition": {
                "description": "`attachment; filename=session_{sessionId}.pdf` لجلسات KYC، و`attachment; filename=business_{sessionId}.pdf` لجلسات KYB — وتوضح لك البادئة قالب التقرير الذي تم إنشاؤه.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=session_11111111-2222-3333-4444-555555555555.pdf"
                }
              },
              "Content-Length": {
                "description": "الحجم الإجمالي لملف PDF بالبايت؛ لا يتم تقسيم المحتوى إلى أجزاء.",
                "schema": {
                  "type": "integer",
                  "example": 25191
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض أو حالة الجلسة. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بين أوضاع الفشل من خلال نص `detail`:\n\n- `\"Authentication credentials were not provided or are invalid.\"` — لا يوجد رأس `x-api-key` (ولا يوجد token لـ `Authorization: Bearer`)، أو فشل فحص بيانات الاعتماد المقدمة (ملغاة أو منتهية الصلاحية أو غير صالحة التنسيق).\n- `\"You do not have permission to perform this action.\"` — بيانات الاعتماد صالحة ولكن لا يمكنها قراءة هذه الجلسة: يفتقر Bearer token الخاص بمستخدم لوحة التحكم إلى إذن `read:sessions` أو لا يمكنه الوصول إلى التطبيق المالك، أو ينتمي مفتاح API إلى مؤسسة مختلفة عن الجلسة.\n- `\"You can only generate a PDF for sessions in review, declined, approved or kyc expired\"` — جلسة KYC موجودة ولكنها ليست في حالة مؤهلة بعد (على سبيل المثال `Not Started` أو `In Progress`). انتظر حدث webhook من نوع `status.updated` قبل طلب التقرير.\n- `\"You can only generate a PDF for sessions in review, declined or approved\"` — الشرط نفسه لجلسات KYB.\n\nلاحظ أنه بالنسبة لـ `sessionId` غير معروف تماماً، يتحقق endpoint من التطبيق المالك قبل التحقق من صحة بيانات الاعتماد، لذا فإن الجلسة المفقودة تُرجع `404` حتى عندما تكون بيانات الاعتماد مفقودة أو غير صالحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "You can only generate a PDF for sessions in review, declined, approved or kyc expired"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل فحص المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Insufficient permissions": {
                    "summary": "بيانات اعتماد صالحة تفتقر إلى read:sessions أو حق الوصول إلى التطبيق المالِك",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "KYC session not finished": {
                    "summary": "جلسة KYC لا تزال لم تبدأ / قيد التقدم",
                    "value": {
                      "detail": "You can only generate a PDF for sessions in review, declined, approved or kyc expired"
                    }
                  },
                  "KYB session not finished": {
                    "summary": "جلسة KYB لا تزال لم تبدأ / قيد التقدم",
                    "value": {
                      "detail": "You can only generate a PDF for sessions in review, declined or approved"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة نشطة بهذا المعرّف `sessionId` — لم يتم إنشاؤها مطلقاً، أو تم حذفها. يتم تحديد المالك قبل التحقق من صحة بيانات الاعتماد، لذلك يتم إرجاع رمز الحالة `404` هذا حتى للطلبات غير المصادق عليها. بناءً على عملية البحث التي تعذرت، تكون سلسلة `detail` إما `\"Not found.\"` (الحالة الشائعة) أو `\"Session not found.\"`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "Not found."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "summary": "sessionId لا يطابق أي جلسة KYC أو KYB",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Recently deleted session": {
                    "summary": "تم حذف الجلسة بين عمليات البحث",
                    "value": {
                      "detail": "Session not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. يمتلك إنشاء ملفات PDF حداً مخصصاً قدره **50 طلباً في الدقيقة لكل بيانات اعتماد** (مفتاح API أو Bearer token أو عنوان IP المصدر في حال عدم المصادقة)، بالإضافة إلى حد GET العام البالغ 600/دقيقة. انتظر عدد الثواني المحدد في `Retry-After` (الموضح أيضاً في رؤوس `X-RateLimit-*`)، ثم أعد المحاولة. لا يتم تخزين التقارير مؤقتاً على جانب الخادم، لذا قم بتنزيل كل تقرير مرة واحدة واحفظ الملف بدلاً من إعادة جلبه.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني التي يجب انتظارها قبل إعادة محاولة إرسال الطلب.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الحد الأقصى لعدد عمليات إنشاء PDF المسموح بها في النافذة الحالية (50).",
                "schema": {
                  "type": "integer",
                  "example": 50
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "طابع Unix الزمني (بالثواني) الذي تتم عنده إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1750000000
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "تفسير سهل القراءة لتجاوز حد المعدل.",
                      "example": "Session PDF generation rate limit exceeded. You can make up to 50 requests per minute."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "summary": "أكثر من 50 عملية إنشاء لملفات PDF في دقيقة واحدة من نفس بيانات الاعتماد",
                    "value": {
                      "detail": "Session PDF generation rate limit exceeded. You can make up to 50 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --fail \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/generate-pdf/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  --output report.pdf"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.generate_pdf(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.generatePdf(\"11111111-2222-3333-4444-555555555555\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.GeneratePDF(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().generatePdf(\"11111111-2222-3333-4444-555555555555\")\n        .writeTo(Path.of(\"download.pdf\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->sessions->generatePdf('11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.pdf');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.generate_pdf(\"11111111-2222-3333-4444-555555555555\")\nFile.binwrite(\"download.pdf\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.GeneratePdfAsync(\"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.pdf\");"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/sandbox/arm/": {
      "post": {
        "summary": "تجهيز سيناريو البيئة التجريبية في جلسة",
        "description": "احفظ سيناريو البيئة التجريبية في جلسة بحالة `Not Started` وأضف قيمه السحرية المضمنة (البريد الإلكتروني، أو الهاتف، أو حقول `expected_details`) إلى الجلسة، حتى تعيد الجهات المزودة الوهمية إنتاج نتيجة السيناريو بمجرد تشغيل سير العمل. هذا هو الـ endpoint الذي تستدعيه أداة اختيار السيناريو قبل سير العمل في واجهة مستخدم التحقق المستضافة من Didit عندما يختار المختبِر نتيجة قبل بدء الالتقاط. يمكنك بناء أداة الاختيار الخاصة بك بناءً عليه، أو استدعاؤه مباشرةً من أداة اختبار البيئة التجريبية.\n\nقم بالمصادقة باستخدام `Session-Token` الخاص بالجلسة (يُعاد في `session_token` عبر [Create Session](/ar/sessions-api/create-session))، وليس `x-api-key` الخاص بتطبيقك: هذا الـ endpoint مخصص للاستدعاء من جانب العميل، وليس من الواجهة الخلفية لديك. لا يُقبل السيناريو إلا عندما تكون الحالة `status` هي `Not Started`. استدعاؤه مجدداً بينما لا تزال الحالة `Not Started` يعيد تجهيز الجلسة: حيث يستبدل القيم السحرية للسيناريو الجديد ويمسح فقط القيم التي كتبها السيناريو *السابق*، بحيث تظل أي قيمة كتبها المستخدم يدوياً بالفعل (البريد الإلكتروني، الاسم الأول، إلخ) محفوظة بعد إعادة التجهيز. يتم رفض تجهيز أي جلسة تجاوزت حالة `Not Started`، أو تنتمي إلى تطبيق إنتاج مباشر (غير تجريبي).\n\nراجع [Sandbox & Test Data](/ar/integration/sandbox-testing) للاطلاع على كتالوج السيناريوهات الكامل والطريقتين الأخريين لتوجيه النتيجة: `sandbox_scenario` عند إنشاء الجلسة، وكتابة القيم السحرية مباشرةً.",
        "operationId": "post_v3_session_sandbox_arm",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "arm_sandbox",
          "auth": "device_token",
          "server": false
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "SessionTokenAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق في البيئة التجريبية المطلوب تفعيلها. يجب أن يتطابق مع الجلسة المرمزة في Session-Token المستخدم للمصادقة.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "scenario"
                ],
                "properties": {
                  "scenario": {
                    "type": "string",
                    "description": "المعرّف النصي للسيناريو المراد تجهيزه. راجع الدليل في GET /v1/sandbox/scenarios/ أو جدول السيناريوهات في [البيئة التجريبية وبيانات الاختبار](/ar/integration/sandbox-testing).",
                    "example": "decline_document_expired"
                  }
                }
              },
              "examples": {
                "Arm": {
                  "summary": "تجهيز سيناريو تطابق AML مع شخص معرض سياسياً",
                  "value": {
                    "scenario": "decline_aml_hit"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تجهيز السيناريو. أصبحت قيمه السحرية موجودة في الجلسة الآن. تعكس `status` الحالة الحالية للجلسة، والتي لا يغيرها هذا الاستدعاء مطلقاً: فهي دائماً `Not Started` عند النجاح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scenario": {
                      "type": "string",
                      "description": "معرّف slug للسيناريو المفعّل (يعكس الطلب)."
                    },
                    "status": {
                      "type": "string",
                      "example": "Not Started"
                    }
                  }
                },
                "examples": {
                  "Armed": {
                    "summary": "تم تجهيز السيناريو لجلسة بحالة Not Started",
                    "value": {
                      "session_id": "11111111-2222-3333-4444-555555555555",
                      "scenario": "decline_aml_hit",
                      "status": "Not Started"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق: الاسم التعريفي للسيناريو غير معروف، أو أن الجلسة قد تجاوزت بالفعل مرحلة `Not Started`.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown Scenario": {
                    "summary": "السيناريو ليس موجوداً في الكتالوج",
                    "value": {
                      "scenario": [
                        "Unknown sandbox scenario: 'not-a-real-scenario'."
                      ]
                    }
                  },
                  "Already Started": {
                    "summary": "تجاوزت الجلسة حالة Not Started",
                    "value": [
                      "Scenario can only be armed before the verification starts."
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يؤدي Session-Token إلى `session_id` هذا، أو أن الجلسة تنتمي إلى تطبيق في بيئة الإنتاج (غير تجريبية).",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "summary": "جلسة مباشرة، أو عدم تطابق بين session_id / token",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/sandbox/arm/ \\\n  -H 'Session-Token: YOUR_SESSION_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"scenario\": \"decline_aml_hit\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import requests\n\nresponse = requests.post(\n    \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/sandbox/arm/\",\n    headers={\n        \"Session-Token\": \"YOUR_SESSION_TOKEN\",\n        \"Content-Type\": \"application/json\",\n    },\n    json={\"scenario\": \"decline_aml_hit\"},\n)\nresponse.raise_for_status()\nprint(response.json())  # {'session_id': '...', 'scenario': 'decline_aml_hit', 'status': 'Not Started'}"
          },
          {
            "lang": "javascript",
            "label": "JavaScript",
            "source": "const response = await fetch(\n  'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/sandbox/arm/',\n  {\n    method: 'POST',\n    headers: {\n      'Session-Token': sessionToken,\n      'Content-Type': 'application/json',\n    },\n    body: JSON.stringify({ scenario: 'decline_aml_hit' }),\n  },\n);\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst { session_id, scenario, status } = await response.json();"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/update-status/": {
      "patch": {
        "summary": "الموافقة على جلسة التحقق أو رفضها أو طلب إعادة إرسالها",
        "description": "تجاوز القرار النهائي لجلسة تحقق KYC أو KYB يدويًا. اضبط `new_status` على `Approved` أو `Declined` لتسجيل قرار يدوي، أو على `Resubmitted` لمسح خطوات تحقق معينة والسماح للمستخدم بإعادة إجرائها عبر رابط التحقق نفسه. يقبل الـ endpoint كلاً من معرفات جلسات المستخدمين (KYC) والشركات (KYB).\n\nاستدعه بمجرد وصول الجلسة إلى حالة قابلة للمراجعة: يجب أن تكون الحالة الحالية `Approved` أو `Declined` أو `In Review` أو `Kyc Expired` أو `Abandoned` أو `Resubmitted`. الجلسات التي لا تزال في حالة `Not Started` أو `In Progress` أو `Awaiting User`، أو التي انتهت كـ `Expired`، تُرجع `400`. يحتاج مفتاح API الخاص بك إلى إذن `write:sessions` (يحتاج مفتاح API محدود النطاق إلى حق الوصول للكتابة على القرارات). يعمل فحص الحالة المؤهلة قبل التحقق من صحة نص الطلب، لذا تُرجع الجلسة غير المؤهلة خطأ `Wrong Current Status` حتى عندما يكون payload غير صالح أيضًا.\n\nبالنسبة لـ `Resubmitted`، مرّر `nodes_to_resubmit` لاختيار خطوات سير العمل التي يجب على المستخدم إعادتها، أو احذفه للتحديد التلقائي لمحاولات الميزات الحالية الموجودة في حالة قابلة لإعادة الإرسال (`Declined`، `In Review`، `Not Finished`، `Expired`). لا يتم تحديد الميزات التي لم تتم محاولتها من قبل تلقائيًا: اذكرها صراحةً في `nodes_to_resubmit`، وإلا فإن الطلب يُرجع `400` عند عدم وجود محاولة مسجلة تتطلب إعادة الإرسال. تنتقل النتائج السابقة للخطوات المحددة إلى سجل إعادة الإرسال (يتم إرجاعه بواسطة Get Decision مع `include=resubmissions`)، ويُعاد ترتيب الخطوات لتطابق مخطط سير العمل، وتُعاد نافذة انتهاء صلاحية الجلسة للبدء من جديد، ويصبح رابط التحقق الأصلي قابلاً للاستخدام مرة أخرى. خطوات الواجهة الخلفية فقط (`AML`، `DATABASE_VALIDATION`، `IP_ANALYSIS`) في بداية القائمة تعمل فورًا دون تفاعل المستخدم؛ وإذا كانت كل خطوة مُعاد إرسالها مقتصرة على الواجهة الخلفية فقط، تُحسم الجلسة مجددًا ضمن نفس الطلب. لا يمكن إعادة إرسال `KYB_REGISTRY` و`KYB_KEY_PEOPLE` مباشرة: أعد إرسال جلسات KYC الفرعية ذات الصلة بدلاً من ذلك ويُعاد احتساب جلسة الشركة الأم تلقائيًا.\n\nكل استدعاء يغيّر الحالة يُطلق حدث [webhook](/ar/integration/webhooks) `status.updated` بمجرد تطبيق التغيير ويُلحق إدخال نشاط (مع إسناد الفاعل والتعليق الخاص بك `comment`) إلى `reviews` الخاصة بالجلسة، ويكون ظاهرًا في [Get Decision](#get-/v3/session/-sessionId-/decision/) وفي الجدول الزمني للنشاط في لوحة التحكم. يتم أيضًا تحديث إجماليات الملف التعريفي للمستخدم المرتبطة بـ `vendor_data` الخاصة بالجلسة. يؤدي الرفض إلى تعطيل مراقبة AML المستمرة للجلسة؛ وتؤدي إعادة الموافقة إلى إعادة تفعيلها (من `Resubmitted` أو `Declined` أو `Kyc Expired`) عندما تكون المراقبة مُفعّلة في سير العمل. تؤدي الموافقة على جلسة KYC فرعية أو رفضها والتابعة لفحص الأشخاص الرئيسيين في KYB إلى إعادة احتساب حالة جلسة الشركة الأم. اضبط `send_email: true` (مع `email_address`) لإشعار المستخدم: إشعار بالحالة لـ `Approved`/`Declined`، أو بريد إلكتروني لإعادة الإرسال يحتوي على رابط التحقق وأسباب كل خطوة لـ `Resubmitted`. للتحقق من البريد الإلكتروني أولاً، عاينه باستخدام [Preview Decision Email](/ar/sessions-api/preview-decision-email) (`Approved`، `Declined`) أو [Preview Resubmission Email](/ar/sessions-api/preview-resubmission) (`Resubmitted`) ومرّر `preview_token` الخاص به كـ `email_preview_token`: يُرسل التحديث بعد ذلك البريد الإلكتروني الذي تمت معاينته تمامًا، أو يُرجع `409` قبل تغيير أي شيء عندما يتغير البريد الإلكتروني أو الجلسة منذ المعاينة أو إذا كان الإيصال أقدم من 15 دقيقة.\n\nتكرار `Approved` أو `Declined` على جلسة تحتوي بالفعل على تلك الحالة لا يغير شيئًا ويُرجع `200`: لا webhook، ولا إدخال نشاط، ولا بريد إلكتروني. تكرار `Resubmitted` يُرجع `400` (`The new status is the same as the current status.`). تُرجع بيانات الاعتماد المفقودة أو غير الصالحة والأذونات المفقودة `403`؛ ويُرجع مفتاح API محدود النطاق منتهي الصلاحية `401`.",
        "operationId": "patch_v3_session_update_status",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_status",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق المطلوب تحديثها. يقبل معرّفات جلسات المستخدمين (KYC) والشركات (KYB) — يطابق الخادم المعرّف عبر كلا نوعي الجلسات.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "new_status"
                ],
                "properties": {
                  "new_status": {
                    "type": "string",
                    "description": "الحالة المستهدفة. تسجّل `Approved` و`Declined` قراراً يدوياً نهائياً (يمكن لكل منهما أيضاً نقض الآخر). تمسح `Resubmitted` الخطوات المحددة وتُعيد الجلسة إلى المستخدم. تُرجع أي قيمة أخرى الرمز `400`.",
                    "enum": [
                      "Approved",
                      "Declined",
                      "Resubmitted"
                    ],
                    "example": "Approved"
                  },
                  "comment": {
                    "type": "string",
                    "description": "سبب التغيير بنص حر، يُخزَّن في مسار مراجعة الجلسة ويُعاد في مصفوفة `reviews` ضمن [Get Decision](#get-/v3/session/-sessionId-/decision/). على سبيل المثال `Duplicated user`.",
                    "example": "All checks passed manual review"
                  },
                  "nodes_to_resubmit": {
                    "type": "array",
                    "description": "خطوات سير العمل التي يجب على المستخدم إعادتها. يتم تطبيقها فقط عندما تكون قيمة `new_status` هي `Resubmitted`. بالنسبة للحالتين `Approved`/`Declined`، يظل التحقق من صحة المدخلات وفقاً للمخطط سارياً (أي قيمة غير صالحة لـ `feature` تُرجع `400`) ولكن المدخلات الصالحة وفقاً للمخطط يتم تجاهلها دلالياً. في حال حذفها، يحدد الخادم تلقائياً المحاولات الحالية لـ OCR وكشف الحيوية ومطابقة الوجه وPOA ورقم الهاتف والبريد الإلكتروني وفحص AML والتحقق من قواعد البيانات والاستبيانات التي تكون حالتها `Declined` أو `In Review` أو `Not Finished` أو `Expired` (لا يتم تحديد محاولات NFC وتحليل IP وتقدير العمر والبحث بالوجه ومستندات KYB تلقائياً على الإطلاق؛ ويتم تحديد محاولات الوجه بخلاف مطابقة الوجه كـ `LIVENESS`) — الميزات التي لم يحاول المستخدم إجراؤها مطلقاً (لا توجد محاولة مسجلة) لن يتم تحديدها، وبالتالي فإن الجلسة التي تحتوي على صفر من المحاولات تُرجع `400` (\"No features found that need resubmission\") على الرغم من عدم قبول أي شيء؛ مرّر `nodes_to_resubmit` صراحة في هذه الحالة. يتم تنفيذ الخطوات وفقاً لترتيب مخطط سير العمل بغض النظر عن الترتيب الذي ترسله بها. يتم رفض `KYB_REGISTRY` و`KYB_KEY_PEOPLE` والاسم البديل `KYB` بالرمز `400` — تُعاد حوسبة عمليات التحقق الرئيسية تلك من جلسات KYC الفرعية الخاصة بها.",
                    "items": {
                      "type": "object",
                      "required": [
                        "node_id",
                        "feature"
                      ],
                      "properties": {
                        "node_id": {
                          "type": "string",
                          "description": "معرّف العقدة كما يظهر في تعريف سير عمل الجلسة (على سبيل المثال `feature_ocr`، `feature_liveness`).",
                          "example": "feature_ocr"
                        },
                        "feature": {
                          "type": "string",
                          "description": "نوع الميزة للعقدة. يتم توحيد الأسماء المستعارة `ID_VERIFICATION` و`POA` و`PHONE` و`EMAIL` من جانب الخادم إلى `OCR` و`PROOF_OF_ADDRESS` و`PHONE_VERIFICATION` و`EMAIL_VERIFICATION`. تجتاز `KYB_REGISTRY` و`KYB_KEY_PEOPLE` و`KYB` التحقق من صحة المخطط ولكن يتم رفضها دائمًا مع قاعدة العمل `400` الموضحة في الأمثلة.",
                          "enum": [
                            "OCR",
                            "OCR_BACK",
                            "NFC",
                            "AML",
                            "FACE",
                            "LIVENESS",
                            "FACE_MATCH",
                            "IP_ANALYSIS",
                            "AGE_ESTIMATION",
                            "PROOF_OF_ADDRESS",
                            "PHONE_VERIFICATION",
                            "EMAIL_VERIFICATION",
                            "FACE_SEARCH",
                            "DATABASE_VALIDATION",
                            "QUESTIONNAIRE",
                            "DOCUMENT_AI",
                            "KYB_DOCUMENTS",
                            "ID_VERIFICATION",
                            "POA",
                            "PHONE",
                            "EMAIL",
                            "KYB_REGISTRY",
                            "KYB_KEY_PEOPLE",
                            "KYB",
                            "GEOLOCATION"
                          ],
                          "example": "OCR"
                        }
                      }
                    }
                  },
                  "send_email": {
                    "type": "boolean",
                    "description": "ما إذا كان سيتم إرسال بريد إلكتروني إلى المستخدم بشأن التغيير. يتطلب `email_address`. بالنسبة إلى `Approved`/`Declined`، يتلقى المستخدم إشعاراً بالحالة؛ وبالنسبة إلى `Resubmitted`، يتضمن البريد الإلكتروني رابط التحقق وأسباب إعادة الإرسال لكل خطوة.",
                    "default": false,
                    "example": false
                  },
                  "email_address": {
                    "type": "string",
                    "format": "email",
                    "description": "المستلم لبريد الإشعار الإلكتروني. **مطلوب عندما يكون `send_email` بقيمة `true`** — يؤدي حذفه إلى إرجاع `400`.",
                    "example": "user@example.com"
                  },
                  "email_language": {
                    "type": "string",
                    "description": "لغة البريد الإلكتروني للإشعار. يقبل أي سلسلة نصية على مستوى المخطط؛ تعود الرموز غير المدعومة تلقائياً وبصمت إلى اللغة الإنجليزية (`en`).",
                    "default": "en",
                    "example": "en"
                  },
                  "email_preview_token": {
                    "type": "string",
                    "writeOnly": true,
                    "minLength": 1,
                    "maxLength": 512,
                    "description": "إيصال اختياري من [معاينة بريد القرار الإلكتروني](/ar/sessions-api/preview-decision-email) (لـ `Approved` و `Declined`) أو [معاينة بريد إعادة التقديم الإلكتروني](/ar/sessions-api/preview-resubmission) (لـ `Resubmitted`): رمز `preview_token` الخاص به. صالح فقط مع `send_email: true`؛ بدونه يُرجع الطلب `400`. يجب أن يظل المستلم واللغة وحالة الجلسة والمرسل والبريد الإلكتروني (والخطوات المحددة، في حالة إعادة التقديم) متطابقة مع المعاينة، وتنتهي صلاحية الإيصال بعد 15 دقيقة. وإلا فإن الطلب يُرجع `409` قبل تغيير الجلسة أو إرسال بريد إلكتروني. يجوز لعمليات التكامل الحالية إغفال هذا الحقل."
                  }
                }
              },
              "examples": {
                "Approve Session": {
                  "summary": "الموافقة على جلسة بعد مراجعة يدوية",
                  "value": {
                    "new_status": "Approved",
                    "comment": "All checks passed manual review"
                  }
                },
                "Decline Session": {
                  "summary": "رفض جلسة",
                  "value": {
                    "new_status": "Declined",
                    "comment": "Suspected fraud"
                  }
                },
                "Resubmit Specific Steps": {
                  "summary": "طلب إعادة تقديم الخطوات المحددة، مع إرسال بريد إلكتروني",
                  "value": {
                    "new_status": "Resubmitted",
                    "nodes_to_resubmit": [
                      {
                        "node_id": "feature_ocr",
                        "feature": "OCR"
                      },
                      {
                        "node_id": "feature_liveness",
                        "feature": "LIVENESS"
                      }
                    ],
                    "send_email": true,
                    "email_address": "user@example.com",
                    "email_language": "en"
                  }
                },
                "Resubmit Auto-select": {
                  "summary": "طلب إعادة التقديم (تحديد تلقائي للخطوات غير المقبولة)",
                  "value": {
                    "new_status": "Resubmitted"
                  }
                },
                "Approve With Previewed Email": {
                  "summary": "الموافقة على البريد الإلكتروني الذي تم إرجاعه بواسطة Preview Decision Email وإرساله",
                  "value": {
                    "new_status": "Approved",
                    "send_email": true,
                    "email_address": "person@example.com",
                    "email_language": "en",
                    "email_preview_token": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث الحالة. تحتوي الاستجابة فقط على `session_id`؛ يمكنك جلب الجلسة المحدثة عبر [Get Decision](#get-/v3/session/-sessionId-/decision/). يتم تشغيل webhook الخاص بـ `status.updated` بمجرد تطبيق التغيير. يؤدي تكرار `Approved` أو `Declined` إلى إرجاع نفس نص الاستجابة دون تغيير أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف UUID للجلسة المحدّثة."
                    }
                  }
                },
                "examples": {
                  "Updated": {
                    "summary": "يتم إرجاعها لحالات المقبولة والمرفوضة والمعاد تقديمها على حد سواء",
                    "value": {
                      "session_id": "3472fb7c-8f7c-4d1a-9cf4-cf3d74ce1a60"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تصل أخطاء الحقول على شكل `{\"<field>\": [\"<message>\"]}` (تستخدم بعض حالات رفض قواعد العمل قيمة نصية بدلاً من ذلك: `{\"nodes_to_resubmit\": \"<message>\"}`)، وأخطاء تبديل الحالات على شكل `{\"detail\": \"<message>\"}`، وخطأ الحالة المتطابقة كمصفوفة JSON مجردة.",
            "content": {
              "application/json": {
                "examples": {
                  "Wrong Current Status": {
                    "summary": "الجلسة ليست في حالة قابلة للتحديث",
                    "value": {
                      "detail": "Only sessions with status Approved, Declined, In Review, Kyc Expired, Abandoned, Resubmitted can be updated. Current status: In Progress"
                    }
                  },
                  "Invalid Status Value": {
                    "summary": "حقل new_status يمثل حالة جلسة حقيقية ولكنه ليس إحدى الحالات Approved/Declined/Resubmitted",
                    "value": {
                      "new_status": [
                        "You can only update the status to 'Approved', 'Declined', or 'Resubmitted'."
                      ]
                    }
                  },
                  "Missing new_status": {
                    "summary": "تم إغفال حقل مطلوب",
                    "value": {
                      "new_status": [
                        "This field is required."
                      ]
                    }
                  },
                  "Same Status": {
                    "summary": "طُلبت إعادة الإرسال في جلسة تمت إعادة إرسالها بالفعل",
                    "value": [
                      "The new status is the same as the current status."
                    ]
                  },
                  "Email Address Required": {
                    "summary": "send_email بقيمة true بدون email_address",
                    "value": {
                      "email_address": [
                        "Email address is required when send_email is true."
                      ]
                    }
                  },
                  "Non-resubmittable Feature": {
                    "summary": "تستهدف إعادة الإرسال فحص KYB الأب",
                    "value": {
                      "nodes_to_resubmit": "The following features cannot be resubmitted directly: KYB_REGISTRY. Resubmit the relevant child KYC sessions instead; the parent will recompute automatically."
                    }
                  },
                  "Nothing To Resubmit": {
                    "summary": "لم يعثر الاختيار التلقائي على أي ميزات غير مقبولة",
                    "value": {
                      "nodes_to_resubmit": "No features found that need resubmission. All features are already approved."
                    }
                  },
                  "Invalid Feature Choice": {
                    "summary": "ميزة غير معروفة في nodes_to_resubmit",
                    "value": {
                      "nodes_to_resubmit": [
                        {
                          "feature": [
                            "\"BOGUS\" is not a valid choice. Valid choices are: OCR, OCR_BACK, NFC, AML, FACE, LIVENESS, FACE_MATCH, IP_ANALYSIS, AGE_ESTIMATION, PROOF_OF_ADDRESS, PHONE_VERIFICATION, EMAIL_VERIFICATION, FACE_SEARCH, DATABASE_VALIDATION, QUESTIONNAIRE, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, ID_VERIFICATION, POA, PHONE, EMAIL, KYB"
                          ]
                        }
                      ]
                    }
                  },
                  "Invalid Status Value (not a status at all)": {
                    "summary": "حقل new_status ليس قيمة صالحة من قيم StatusChoices",
                    "value": {
                      "new_status": [
                        "\"Bogus\" is not a valid choice."
                      ]
                    }
                  },
                  "Preview Receipt Without Email": {
                    "summary": "تم إرسال email_preview_token بدون send_email: true",
                    "value": {
                      "email_preview_token": [
                        "A preview receipt is only valid when the email is sent."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API Key": {
                    "summary": "مفتاح API محدد النطاق تجاوز تاريخ انتهاء صلاحيته",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة أو أذونات غير كافية، أو `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": "يفتقر مفتاح API إلى write:sessions",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة KYC أو KYB بمعرّف `session_id` هذا (الجلسات المحذوفة تُرجع أيضاً `404`).",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "summary": "session_id غير معروف",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تكرار إعادة إرسال تستهدف فقط الميزات المقتصرة على الواجهة الخلفية (AML، DATABASE_VALIDATION، IP_ANALYSIS) خلال فترة التهدئة البالغة 30 ثانية؛ لن يؤدي التكرار الفوري إلى تغيير النتيجة. تراجع وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Backend-only resubmit throttled": {
                    "value": {
                      "detail": "This session was already resubmitted for backend-only features within the last 30 seconds; repeating it cannot change the outcome. Wait before resubmitting again."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "تغيرت معاينة البريد الإلكتروني أو انتهت صلاحيتها. أنشئ معاينة جديدة قبل التأكيد؛ لا تحدث أي تغييرات في الجلسة أو تسليم البريد الإلكتروني.",
            "content": {
              "application/json": {
                "examples": {
                  "Preview Changed": {
                    "summary": "لم يعد الإيصال متطابقاً، أو مر عليه أكثر من 15 دقيقة",
                    "value": {
                      "detail": "This email preview changed or expired. Preview the message again before confirming."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-status/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"new_status\": \"Approved\",\n    \"comment\": \"All checks passed manual review\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_status(\n    \"11111111-2222-3333-4444-555555555555\",\n    new_status=\"Approved\",\n    comment=\"All checks passed manual review\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateStatus(\"11111111-2222-3333-4444-555555555555\", {\n  new_status: \"Approved\",\n  comment: \"All checks passed manual review\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateStatusParams{\n\tNewStatus: \"Approved\",\n\tComment:   didit.String(\"All checks passed manual review\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateStatus(\"11111111-2222-3333-4444-555555555555\", SessionsUpdateStatusParams.builder()\n        .newStatus(SessionsUpdateStatusParams.NewStatus.of(\"Approved\"))\n        .comment(\"All checks passed manual review\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateStatus('11111111-2222-3333-4444-555555555555', [\n    'new_status' => 'Approved',\n    'comment' => 'All checks passed manual review',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_status(\n  \"11111111-2222-3333-4444-555555555555\",\n  new_status: \"Approved\",\n  comment: \"All checks passed manual review\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateStatusAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdateStatusParams\n{\n    NewStatus = \"Approved\",\n    Comment = \"All checks passed manual review\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/id-verification/": {
      "post": {
        "summary": "التحقق من الهوية (OCR للمستند + فحوصات الاحتيال)",
        "description": "إجراء قراءة OCR لمستند الهوية وتشغيل عمليات التحقق من الاحتيال في المستندات في استدعاء واحد — يُرجع حقول حامل المستند المستخرجة، وبيانات MRZ المحللة، و`status` بقيمة `Approved` أو `Declined` أو `In Review`، وقائمة `warnings` توضح كل مشكلة تم العثور عليها. يدعم 14,000+ نوع مستند من 220+ دولة وإقليم.\n\n**طريقة العمل.** أرسل `front_image` للمستند (مطلوب) و`back_image` للمستندات ذات الوجهين. ارفع صوراً غير مقتصة تظهر فيها جميع زوايا المستند الأربع بوضوح — تكتشف الخدمة المستند وتضبط محاذاته وتقتصّه تلقائياً، لذا لا تقم باقتصاصه مسبقاً. يتم تصنيف المستند تلقائياً (لا تحدد الدولة أو نوع المستند أبداً)، وتتم قراءة المنطقة المرئية باستخدام OCR، وفك تشفير الـ MRZ وأي رموز باركود. بعد ذلك، تتحقق عمليات الفحص المتبادل من التواريخ وصيغ الأرقام وأرقام التحقق في MRZ، وتقارن المنطقة المرئية مع الـ MRZ. عند تعيين `perform_document_liveness=true`، يتم فحص الصور إضافياً للتحقق من إعادة العرض على الشاشات والنسخ المطبوعة والتلاعب بالصورة الشخصية.\n\n**منطق القرار.** تكون `status` هي `Approved` ما لم يؤدِّ تحذير واحد على الأقل إلى الرفض. تؤدي مخاطر الاحتيال والفشل الجسيم دائماً إلى الرفض: `DOCUMENT_EXPIRED` و`SCREEN_CAPTURE_DETECTED` و`PRINTED_COPY_DETECTED` و`PORTRAIT_MANIPULATION_DETECTED` و`PUBLIC_DOCUMENT_IMAGE_DETECTED`، بالإضافة إلى إخفاقات الاستخراج (`NAME_NOT_DETECTED` و`DATE_OF_BIRTH_NOT_DETECTED` و`DOCUMENT_NUMBER_NOT_DETECTED`). (تتواجد `PORTRAIT_IMAGE_NOT_DETECTED` و`INVALID_DATE` و`MRZ_NOT_DETECTED` في جلسات سير العمل لكن لا ينتجها هذا الـ endpoint المستقل أبداً. وتُرجع `COULD_NOT_DETECT_DOCUMENT_TYPE` هنا عندما لا تتطابق الصورة الأمامية مع تصميم مستند رسمي معروف بدرجة ثقة عالية، وترفض الطلب.) يمكن تكوين ثلاث مجموعات مخاطر لكل طلب عبر `invalid_mrz_action` و`inconsistent_data_action` و`expiration_date_not_detected_action` (`DECLINE` أو `NO_ACTION`). كافة التحذيرات الأخرى (مثل `POSSIBLE_DUPLICATED_USER`) هي تحذيرات إعلامية ولا تؤدي إلى الرفض بمفردها أبداً. عندما يكون `perform_document_liveness=true` (الافتراضي) ولا يُرجع فحص التزوير أي درجة قابلة للاستخدام — كأن يفشل المزود أو يجيب برمز مختلف عن 200 أو يجيب بـ HTTP 200 مع `status=\"ERR\"` - يُرجع الاستدعاء `200` مع `status: \"In Review\"` وتحذير `DOCUMENT_LIVENESS_NOT_COMPUTED` (`log_type: \"warning\"`) بدلاً من `Approved`: فالفحص الذي لم يعمل لا يُعد دليلاً على أن المستند أصلي. هذا التصعيد غير قابل للتكوين ولا يلغي أبداً حالة `Declined`؛ أما مع `perform_document_liveness=false` فيتم تخطي الفحص وتتبع الحالة التحذيرات المتبقية كما في السابق. المستند الذي لا يمكن معالجته على الإطلاق يُرجع `400` مع `{\"error\": \"COULD_NOT_RECOGNIZE_DOCUMENT\"}`؛ والمستند القابل للقراءة ولكن به مشكلات يُرجع `200` مع `status: \"Declined\"` — تحقق دائماً من `id_verification.status` و`id_verification.warnings`، وليس رمز HTTP فقط.\n\n**الفوترة.** يستهلك كل رد `200` رصيداً واحداً لـ API التحقق من الهوية (يُدفع من رصيد خطتك أو رصيد الشحن). عندما لا يغطي رصيد المؤسسة تكلفة الاستدعاء، يُرجع الـ endpoint الرمز `403` مع خطأ عدم كفاية الرصيد قبل أي معالجة للصور.\n\n**الاحتفاظ بالجلسة (`save_api_request`، الافتراضي `true`).** عند تعيينه على `true`، يتم حفظ الاستدعاء كجلسة من نوع API: يظهر في Business Console، ويكون `request_id` المُرجع معرّف جلسة حقيقياً يمكنك تمريره إلى `GET /v3/session/{sessionId}/decision/`، ويتم تخزين صور المستند/الصورة الشخصية المقتصة وإرجاعها كروابط وسائط قصيرة الأجل (`https://<media-host>/ocr/...`)، ويتم إرسال webhook لحدث `status.updated` إلى وجهات webhook المكوّنة لديك. عند تعيينه على `false`، لا يتم تخزين أي شيء، ويكون `request_id` عبارة عن معرّف UUID للربط لمرة واحدة فقط، وتُرجع `portrait_image`/`front_image`/`back_image` مضمنة كنصوص JPEG بترميز base64.\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية كافة عمليات المعالجة والفوترة: بعد التحقق من صحة الطلب (المدخلات غير الصالحة لا تزال تُرجع `400`)، يُرجع الـ endpoint حمولة وهمية ثابتة بحالة `Approved` (بطاقة هوية أمريكية خيالية باسم \"Sandbox User\")، ولا يتم حفظ أي جلسة، ولا يُستهلك أي رصيد.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة الرمز `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا تُرجع هذه الـ API الرمز `401` أبداً.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع الـ endpoints الخاصة بـ POST/PATCH/DELETE؛ وتجاوز هذا الحد يُرجع `429`.",
        "operationId": "post_v3id-verification",
        "x-didit-sdk": {
          "resource": "id_verification",
          "method": "verify",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "front_image"
                ],
                "properties": {
                  "front_image": {
                    "type": "string",
                    "format": "binary",
                    "description": "الوجه الأمامي لمستند الهوية. الامتدادات المسموح بها: `tiff`، `jpg`، `jpeg`، `png`، `webp`، `pdf`. الحد الأقصى لحجم الرفع: **10 MB** (يتم رفض الملفات الأكبر حجماً بالرمز `400`). يتم تحويل ملفات PDF إلى صورة قبل إجراء OCR؛ تتطلب ملفات PDF المشفرة `front_image_password`. يتم ضغط الصور تلقائياً إلى ~0.5 MB تقريباً وتطبيق اتجاه EXIF. ارفع الصورة الملتقطة كاملة وغير مقتطعة مع ظهور جميع الزوايا الأربع للمستند."
                  },
                  "front_image_password": {
                    "type": "string",
                    "description": "كلمة المرور لفك تشفير `front_image` عندما يكون ملف PDF مشفراً. إرسال ملف PDF مشفر بدون كلمة مرور (أو بكلمة مرور خاطئة) يُرجع الرمز `400`.",
                    "writeOnly": true
                  },
                  "back_image": {
                    "type": "string",
                    "format": "binary",
                    "description": "الجانب الخلفي للمستند — أرسله كلما كان للمستند جانب خلفي (تحمل العديد من بطاقات الهوية منطقة MRZ أو رمزًا شريطيًا على الظهر؛ يؤدي حذفه ببساطة إلى ترك حقول MRZ والجانب الخلفي فارغة في الاستجابة — لا يُطلق هذا الـ endpoint تحذيرًا بشأن فقدان MRZ). ينطبق عليه نفس قيود التنسيق والحجم الخاصة بـ `front_image`. عند حذفه، تكون قيمة `back_image` وحقول الجانب الخلفي `null` في الاستجابة."
                  },
                  "back_image_password": {
                    "type": "string",
                    "description": "كلمة المرور لفك تشفير `back_image` عندما يكون ملف PDF مشفراً.",
                    "writeOnly": true
                  },
                  "perform_document_liveness": {
                    "type": "boolean",
                    "default": true,
                    "description": "يفحص كلا الصورتين للكشف عن احتيال العرض: إعادة تشغيل الشاشة (`SCREEN_CAPTURE_DETECTED`)، والنسخ المطبوعة (`PRINTED_COPY_DETECTED`)، والتلاعب بالصورة الشخصية (`PORTRAIT_MANIPULATION_DETECTED`). يؤدي أيٌّ منها إلى الرفض التلقائي. مفعلة افتراضياً؛ اضبطها على `false` لتخطي فحص الاحتيال وتقليل زمن الاستجابة. عند تفعيلها وعدم إرجاع المزود لأي درجة قابلة للاستخدام، تكون الاستجابة `In Review` مع تحذير `DOCUMENT_LIVENESS_NOT_COMPUTED` بدلاً من `Approved`.",
                    "example": true
                  },
                  "minimum_age": {
                    "type": "integer",
                    "nullable": true,
                    "default": null,
                    "minimum": 1,
                    "maximum": 120,
                    "description": "مقبول ويتم التحقق من صحته (1–120) ولكن **لا يتم تطبيقه حاليًا** بواسطة هذا endpoint — فهو لا يصدر أبدًا تحذير `MINIMUM_AGE_NOT_MET` من هذا الحقل. قم بفرض قواعد العمر بناءً على `date_of_birth`/`age` المُرجعة، أو استخدم سير عمل جلسة تحقق مع قيود العمر."
                  },
                  "expiration_date_not_detected_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتبع عند تعذر قراءة تاريخ الانتهاء (`EXPIRATION_DATE_NOT_DETECTED`). القيمة الافتراضية هي `NO_ACTION` لأن العديد من مستندات الهوية لا تطبع تاريخ انتهاء. ملاحظة: تاريخ الانتهاء *المكتشف والمنقضي* يؤدي دائماً إلى الرفض (`DOCUMENT_EXPIRED`)، بغض النظر عن هذا الخيار."
                  },
                  "invalid_mrz_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتخذ عندما تفشل منطقة MRZ المستخرجة في التحقق من أرقام التحقق (`MRZ_VALIDATION_FAILED`). لا يؤدي غياب MRZ إلى إطلاق أي تحذير في هذا الـ endpoint. ينطبق فقط على المستندات التي تحتوي على MRZ. الخيار `REVIEW` غير مدعوم في هذا الـ endpoint ويُرجع `400`."
                  },
                  "inconsistent_data_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتبع عند وجود عدم اتساق داخلي في البيانات المستخرجة: `DATA_INCONSISTENT`، أو `MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME` (اختلاف المنطقة المرئية عن MRZ)، أو `DOCUMENT_NAME_DIFFERENT_FROM_OTHER_APPROVED_DOCUMENTS`."
                  },
                  "critical_field_occlusion_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتبع عند تغطية حقل مطبوع مهم فعلياً في الصورة الملتقطة (`CRITICAL_FIELD_OCCLUSION_DETECTED`) - رقم الهوية، أو الاسم، أو تاريخ الميلاد، أو تاريخ الانتهاء. يتم الرفض افتراضياً، مثل مخاطر سلامة المستندات الأخرى في هذا الـ endpoint: فتغطية الأرقام التي تتم مطابقة التقرير معها هي المظهر الذي يبدو عليه المستند الخاضع للحجب. يتم استبعاد القيمة المقروءة للحقل المغطى من الاستخراج في كلتا الحالتين، لذا غالباً ما يرافقه تحذير `*_NOT_DETECTED` المطابق. لا يدعم هذا الـ endpoint القيمة `REVIEW` ويرجع الرمز `400`."
                  },
                  "document_or_personal_number_format_mismatch_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتبع عندما لا يطابق رقمٌ التنسيقَ الذي تستخدمه الجهة المصدرة له لنوع المستند هذا (`DOCUMENT_NUMBER_FORMAT_MISMATCH`، و`PERSONAL_NUMBER_FORMAT_MISMATCH`). القيمة الافتراضية هي `NO_ACTION`، والتي تسجل التحذير دون تغيير الحالة. لا يدعم هذا الـ endpoint القيمة `REVIEW` ويرجع الرمز `400`."
                  },
                  "preferred_characters": {
                    "type": "string",
                    "enum": [
                      "latin",
                      "non_latin"
                    ],
                    "default": "latin",
                    "description": "نظام الكتابة المفضل لحقول الاسم/العنوان في المستندات التي تطبع نصوصاً لاتينية وغير لاتينية (العربية، السيريلية، CJK، …). يُرجع `latin` قيماً بالحروف اللاتينية/منسوخة صوتياً؛ ويفضل `non_latin` نظام الكتابة الأصلي."
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "عندما تكون القيمة `true` (الافتراضية)، يتم حفظ الاستدعاء كجلسة من نوع API — مرئية في Business Console، ويمكن استرجاعها عبر `GET /v3/session/{sessionId}/decision/` باستخدام `request_id` المُرجع، ويتم الإشعار بها عبر webhook لحدث `status.updated`، مع إرجاع صور المستندات كروابط URL للوسائط. عندما تكون القيمة `false`، لا يتم تخزين أي شيء، ويكون `request_id` عبارة عن معرّف UUID مؤقت، ويتم إرجاع الصور مضمنة كسلاسل base64 JPEG.",
                    "example": true
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "سلسلة نصية مبهمة اختيارية (معرّف المستخدم الداخلي لديك، البريد الإلكتروني، UUID...) تُخزَّن في الجلسة المحفوظة وتُعاد في الاستجابة. استخدمها لربط استدعاءات API بسجلاتك الخاصة ولتصفية الجلسات لاحقاً.",
                    "example": "user-123"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "كائن JSON اختياري يُخزن مع الجلسة (عندما يكون `save_api_request=true`) ويُعاد في الاستجابة. في طلبات multipart، أرسله كحقل سلسلة نصية بترميز JSON (مثل `metadata={\"flow\":\"onboarding\"}`) — حيث يتم تحليله إلى كائن.",
                    "example": {
                      "flow": "onboarding"
                    }
                  }
                }
              },
              "example": {
                "front_image": "(binary JPEG/PNG/PDF of the document front)",
                "back_image": "(binary JPEG/PNG/PDF of the document back)",
                "perform_document_liveness": true,
                "save_api_request": true,
                "vendor_data": "user-123",
                "metadata": {
                  "flow": "onboarding"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تمت معالجة المستند. تكون قيمة `id_verification.status` إما `Approved` أو `Declined` أو `In Review`؛ وتُفصّل كل مشكلة تم اكتشافها في `id_verification.warnings`. يتم إرجاع `In Review` عندما لا يسفر فحص حيوية المستند المطلوب عن نتيجة قابلة للاستخدام (`DOCUMENT_LIVENESS_NOT_COMPUTED`). المستند الذي يحتوي على مشاكل سيظل يُرجع `200` مع `status: \"Declined\"` — افحص نص الاستجابة، وليس فقط رمز HTTP. عندما تكون `save_api_request=true`، يكون `request_id` هو معرّف الجلسة المحفوظ وتكون حقول الصور عبارة عن روابط وسائط قصيرة الأجل؛ ومع `save_api_request=false` تكون سلاسل base64 JPEG مضمنة.",
            "content": {
              "application/json": {
                "examples": {
                  "Approved": {
                    "summary": "تمت قراءة بطاقة الهوية ذات الوجهين بنجاح (تم الحفظ — الصور كروابط وسائط)",
                    "value": {
                      "request_id": "11d219ed-d59c-4b1d-8d65-9b933f12d5b8",
                      "id_verification": {
                        "status": "Approved",
                        "document_type": "Identity Card",
                        "document_subtype": "ID_CARD_GENERIC",
                        "document_number": "CBX164224",
                        "personal_number": "20446581H",
                        "portrait_image": "https://<media-host>/ocr/11d219ed-d59c-4b1d-8d65-9b933f12d5b8-portrait_image-8c2f.jpg?signature=...",
                        "front_image": "https://<media-host>/ocr/11d219ed-d59c-4b1d-8d65-9b933f12d5b8-front_image-4a1e.jpg?signature=...",
                        "back_image": "https://<media-host>/ocr/11d219ed-d59c-4b1d-8d65-9b933f12d5b8-back_image-77b0.jpg?signature=...",
                        "front_image_camera_front": null,
                        "back_image_camera_front": null,
                        "front_image_camera_front_face_match_score": null,
                        "back_image_camera_front_face_match_score": null,
                        "front_image_quality_score": {
                          "focus_score": 78.0,
                          "brightness_score": 83.2,
                          "brightness_issue": "ok",
                          "is_document_fully_visible": true,
                          "resolution_score": 40.7,
                          "overall_score": 70.2
                        },
                        "back_image_quality_score": {
                          "focus_score": 100.0,
                          "brightness_score": 95.6,
                          "brightness_issue": "ok",
                          "is_document_fully_visible": true,
                          "resolution_score": 43.0,
                          "overall_score": 84.4
                        },
                        "date_of_birth": "1980-01-13",
                        "age": 46,
                        "expiration_date": "2032-03-31",
                        "date_of_issue": "2022-03-31",
                        "issuing_state": "ESP",
                        "issuing_state_name": "Spain",
                        "first_name": "Julio Francisco",
                        "last_name": "Fores Sena",
                        "full_name": "Julio Francisco Fores Sena",
                        "gender": "M",
                        "address": "Brda. Urb. El Cardonal 0052 52 Po3 B,Taco,San Cristobal De La Laguna,Santa Cruz De Tenerife",
                        "formatted_address": "Av. el Cardonal, 52, b, 38108 La Laguna, Santa Cruz de Tenerife, Spain",
                        "place_of_birth": "Valencia, Valencia",
                        "marital_status": "UNKNOWN",
                        "nationality": "ESP",
                        "extra_fields": {
                          "first_surname": "Fores",
                          "second_surname": "Sena"
                        },
                        "mrz": {
                          "surname": "FORES SENA",
                          "name": "JULIO FRANCISCO",
                          "country": "ESP",
                          "nationality": "ESP",
                          "birth_date": "800113",
                          "expiry_date": "320331",
                          "sex": "M",
                          "document_type": "ID",
                          "document_number": "CBX164224",
                          "optional_data": "20446581H",
                          "optional_data_2": "",
                          "birth_date_hash": "9",
                          "expiry_date_hash": "8",
                          "document_number_hash": "3",
                          "final_hash": "3",
                          "personal_number": "20446581H",
                          "warnings": [],
                          "errors": [],
                          "mrz_type": "TD1",
                          "mrz_string": "IDESPCBX164224320446581H<<<<<<\n8001139M3203318ESP<<<<<<<<<<<3\nFORES<SENA<<JULIO<FRANCISCO<<<",
                          "mrz_key": "CBX164224380011393203318"
                        },
                        "parsed_address": {
                          "street_1": "Avenida el Cardonal 52",
                          "street_2": "b",
                          "city": "La Laguna",
                          "region": "Canarias",
                          "country": "ES",
                          "postal_code": "38108",
                          "address_type": "Avenida",
                          "formatted_address": "Av. el Cardonal, 52, b, 38108 La Laguna, Santa Cruz de Tenerife, Spain",
                          "raw_results": {
                            "address_components": [
                              {
                                "long_name": "b",
                                "short_name": "b",
                                "types": [
                                  "subpremise"
                                ]
                              },
                              {
                                "long_name": "52",
                                "short_name": "52",
                                "types": [
                                  "street_number"
                                ]
                              },
                              {
                                "long_name": "Avenida el Cardonal",
                                "short_name": "Av. el Cardonal",
                                "types": [
                                  "route"
                                ]
                              },
                              {
                                "long_name": "La Laguna",
                                "short_name": "La Laguna",
                                "types": [
                                  "locality",
                                  "political"
                                ]
                              },
                              {
                                "long_name": "Spain",
                                "short_name": "ES",
                                "types": [
                                  "country",
                                  "political"
                                ]
                              },
                              {
                                "long_name": "38108",
                                "short_name": "38108",
                                "types": [
                                  "postal_code"
                                ]
                              }
                            ],
                            "formatted_address": "Av. el Cardonal, 52, b, 38108 La Laguna, Santa Cruz de Tenerife, Spain",
                            "geometry": {
                              "location": {
                                "lat": 28.4501161,
                                "lng": -16.3004407
                              },
                              "location_type": "ROOFTOP"
                            },
                            "types": [
                              "street_address",
                              "subpremise"
                            ]
                          },
                          "document_location": {
                            "latitude": 28.4501161,
                            "longitude": -16.3004407
                          },
                          "label": "Spain Identity Card Address",
                          "is_verified": true,
                          "category": "Residential"
                        },
                        "warnings": [],
                        "barcodes": []
                      },
                      "vendor_data": "user-123",
                      "metadata": {
                        "flow": "onboarding"
                      },
                      "created_at": "2026-06-12T02:21:56.013573+00:00"
                    }
                  },
                  "Declined - expired document": {
                    "summary": "رفع الوجه الأمامي فقط لبطاقة هوية منتهية الصلاحية",
                    "value": {
                      "request_id": "f61681b8-9422-4378-ac3e-04c6a247fb45",
                      "id_verification": {
                        "status": "Declined",
                        "document_type": "Identity Card",
                        "document_subtype": "ID_CARD_GENERIC",
                        "document_number": "BNK123072",
                        "personal_number": "21771255F",
                        "portrait_image": "https://<media-host>/ocr/f61681b8-9422-4378-ac3e-04c6a247fb45-portrait_image-1d9a.jpg?signature=...",
                        "front_image": "https://<media-host>/ocr/f61681b8-9422-4378-ac3e-04c6a247fb45-front_image-5c2b.jpg?signature=...",
                        "back_image": null,
                        "front_image_camera_front": null,
                        "back_image_camera_front": null,
                        "front_image_camera_front_face_match_score": null,
                        "back_image_camera_front_face_match_score": null,
                        "front_image_quality_score": {
                          "focus_score": 100.0,
                          "brightness_score": 95.7,
                          "brightness_issue": "ok",
                          "is_document_fully_visible": true,
                          "resolution_score": 22.2,
                          "overall_score": 79.3
                        },
                        "back_image_quality_score": null,
                        "date_of_birth": "1997-01-30",
                        "age": 29,
                        "expiration_date": "2025-11-26",
                        "date_of_issue": null,
                        "issuing_state": "ESP",
                        "issuing_state_name": "Spain",
                        "first_name": "Lucia",
                        "last_name": "Marin Castro",
                        "full_name": "Lucia Marin Castro",
                        "gender": "F",
                        "address": null,
                        "formatted_address": null,
                        "place_of_birth": null,
                        "marital_status": "UNKNOWN",
                        "nationality": "ESP",
                        "extra_fields": {
                          "first_surname": "Marin",
                          "second_surname": "Castro"
                        },
                        "mrz": {},
                        "parsed_address": null,
                        "warnings": [
                          {
                            "risk": "DOCUMENT_EXPIRED",
                            "feature": "ID_VERIFICATION",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Document expired",
                            "long_description": "The document's expiration date has passed, rendering it no longer valid for use."
                          }
                        ],
                        "barcodes": []
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T02:25:48.117204+00:00"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة المحفوظة عندما تكون `save_api_request=true` (يمكن استخدامه مع `GET /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID ارتباط مؤقت."
                    },
                    "id_verification": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "Approved",
                            "Declined",
                            "In Review"
                          ],
                          "description": "`Approved` عندما لا يؤدي أي تحذير إلى الرفض ويُعطي فحص حيوية المستند المطلوب نتيجة قابلة للاستخدام؛ و`In Review` عندما لا يُعطي هذا الفحص المطلوب أي نتيجة قابلة للاستخدام (`DOCUMENT_LIVENESS_NOT_COMPUTED`)؛ و`Declined` عندما يؤدي تحذير إلى الرفض — وتوضح قائمة `warnings` السبب."
                        },
                        "document_type": {
                          "type": "string",
                          "nullable": true,
                          "description": "الاسم المعروض لنوع المستند المكتشف: `Identity Card`، أو `Passport`، أو `Driver's License`، أو `Residence Permit`، أو `Health Insurance Card`، أو `Tax Card`. يكون `null` عندما يتعذر تصنيف المستند.",
                          "example": "Identity Card"
                        },
                        "document_subtype": {
                          "type": "string",
                          "nullable": true,
                          "description": "النوع الفرعي الأكثر دقة عند توفره (مثل `ID_CARD_GENERIC`، و`EPASSPORT`).",
                          "example": "ID_CARD_GENERIC"
                        },
                        "document_number": {
                          "type": "string",
                          "nullable": true,
                          "example": "CBX164224"
                        },
                        "personal_number": {
                          "type": "string",
                          "nullable": true,
                          "description": "الرقم الشخصي/الوطني الثانوي المطبوع على بعض المستندات.",
                          "example": "20446581H"
                        },
                        "portrait_image": {
                          "type": "string",
                          "nullable": true,
                          "description": "صورة شخصية مقتصة من المستند. رابط وسائط قصير الأجل (`https://<media-host>/ocr/...`) عندما تكون قيمة `save_api_request=true` (افتراضياً)؛ أو سلسلة JPEG مضمنة بترميز base64 عندما تكون قيمة `save_api_request=false`. وتكون القيمة `null` في حال عدم اكتشاف أي صورة شخصية."
                        },
                        "front_image": {
                          "type": "string",
                          "nullable": true,
                          "description": "قص محاذٍ للوجه الأمامي للمستند. رابط وسائط عند الحفظ، أو سلسلة base64 JPEG مضمنة بخلاف ذلك."
                        },
                        "back_image": {
                          "type": "string",
                          "nullable": true,
                          "description": "قص محاذٍ للوجه الخلفي للمستند. `null` عندما لا يتم تحميل `back_image`."
                        },
                        "front_image_camera_front": {
                          "type": "string",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint (يتم ملؤه فقط في جلسات التحقق عبر التقاط الكاميرا)."
                        },
                        "back_image_camera_front": {
                          "type": "string",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint."
                        },
                        "front_image_camera_front_face_match_score": {
                          "type": "number",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint."
                        },
                        "back_image_camera_front_face_match_score": {
                          "type": "number",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint."
                        },
                        "front_image_quality_score": {
                          "type": "object",
                          "nullable": true,
                          "description": "بيانات تشخيص جودة الالتقاط للصورة المرفوعة (`null` إذا لم يتم توفير الجانب أو تعذر احتساب الدرجات). جميع الدرجات تتراوح بين 0 و100.",
                          "properties": {
                            "focus_score": {
                              "type": "number",
                              "format": "float",
                              "description": "حدة الصورة المقتصة من المستند (القيمة الأعلى تعني حدة أكبر)."
                            },
                            "brightness_score": {
                              "type": "number",
                              "format": "float",
                              "description": "جودة التعرض (الأعلى أفضل)."
                            },
                            "brightness_issue": {
                              "type": "string",
                              "nullable": true,
                              "description": "`ok` عندما يكون التعريض الضوئي جيداً، وإلا فستكون المشكلة المكتشفة (مثل: داكن جداً / ساطع جداً)."
                            },
                            "is_document_fully_visible": {
                              "type": "boolean",
                              "nullable": true,
                              "description": "ما إذا كانت زوايا المستند الأربع كلها داخل الإطار."
                            },
                            "resolution_score": {
                              "type": "number",
                              "format": "float",
                              "description": "الدقة الفعلية لمنطقة المستند."
                            },
                            "overall_score": {
                              "type": "number",
                              "format": "float",
                              "description": "درجة الجودة المجمعة."
                            }
                          }
                        },
                        "back_image_quality_score": {
                          "type": "object",
                          "nullable": true,
                          "description": "بيانات تشخيص جودة الالتقاط للصورة المرفوعة (`null` إذا لم يتم توفير الجانب أو تعذر احتساب الدرجات). جميع الدرجات تتراوح بين 0 و100.",
                          "properties": {
                            "focus_score": {
                              "type": "number",
                              "format": "float",
                              "description": "حدة الصورة المقتصة من المستند (القيمة الأعلى تعني حدة أكبر)."
                            },
                            "brightness_score": {
                              "type": "number",
                              "format": "float",
                              "description": "جودة التعرض (الأعلى أفضل)."
                            },
                            "brightness_issue": {
                              "type": "string",
                              "nullable": true,
                              "description": "`ok` عندما يكون التعريض الضوئي جيداً، وإلا فستكون المشكلة المكتشفة (مثل: داكن جداً / ساطع جداً)."
                            },
                            "is_document_fully_visible": {
                              "type": "boolean",
                              "nullable": true,
                              "description": "ما إذا كانت زوايا المستند الأربع كلها داخل الإطار."
                            },
                            "resolution_score": {
                              "type": "number",
                              "format": "float",
                              "description": "الدقة الفعلية لمنطقة المستند."
                            },
                            "overall_score": {
                              "type": "number",
                              "format": "float",
                              "description": "درجة الجودة المجمعة."
                            }
                          }
                        },
                        "date_of_birth": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "example": "1980-01-13"
                        },
                        "age": {
                          "type": "integer",
                          "nullable": true,
                          "description": "عمر صاحب المستند بالسنوات، محسوباً من `date_of_birth`.",
                          "example": 46
                        },
                        "expiration_date": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "example": "2032-03-31"
                        },
                        "date_of_issue": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "example": "2022-03-31"
                        },
                        "issuing_state": {
                          "type": "string",
                          "nullable": true,
                          "description": "دولة الإصدار (ISO 3166-1 alpha-3).",
                          "example": "ESP"
                        },
                        "issuing_state_name": {
                          "type": "string",
                          "nullable": true,
                          "example": "Spain"
                        },
                        "first_name": {
                          "type": "string",
                          "nullable": true,
                          "example": "Julio Francisco"
                        },
                        "last_name": {
                          "type": "string",
                          "nullable": true,
                          "example": "Fores Sena"
                        },
                        "full_name": {
                          "type": "string",
                          "nullable": true,
                          "example": "Julio Francisco Fores Sena"
                        },
                        "gender": {
                          "type": "string",
                          "nullable": true,
                          "description": "`M` أو `F` أو `null` عندما لا تكون مطبوعة أو مكتشفة.",
                          "example": "M"
                        },
                        "address": {
                          "type": "string",
                          "nullable": true,
                          "description": "العنوان تماماً كما هو مطبوع على المستند."
                        },
                        "formatted_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "النسخة المحددة جغرافياً والموحدة من `address`."
                        },
                        "place_of_birth": {
                          "type": "string",
                          "nullable": true,
                          "example": "Valencia, Valencia"
                        },
                        "marital_status": {
                          "type": "string",
                          "nullable": true,
                          "description": "`UNKNOWN` ما لم يطبع المستند الحالة الاجتماعية.",
                          "example": "UNKNOWN"
                        },
                        "nationality": {
                          "type": "string",
                          "nullable": true,
                          "description": "جنسية صاحب المستند (ISO 3166-1 alpha-3).",
                          "example": "ESP"
                        },
                        "extra_fields": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": true,
                          "description": "بيانات إضافية خاصة بالمستند ليس لها عمود مخصص (مثل `first_surname`/`second_surname` في بطاقات الهوية الإسبانية، وفئات الترخيص في رخص القيادة)."
                        },
                        "mrz": {
                          "type": "object",
                          "description": "منطقة القراءة الآلية المحللة. **كائن فارغ** (`{}`) عندما لا يحتوي المستند على MRZ أو تعذرت قراءتها — تحقق أيضاً من قائمة `warnings` في تلك الحالة. تستخدم التواريخ داخل MRZ التنسيق الخام `YYMMDD`.",
                          "properties": {
                            "surname": {
                              "type": "string",
                              "example": "FORES SENA"
                            },
                            "name": {
                              "type": "string",
                              "example": "JULIO FRANCISCO"
                            },
                            "country": {
                              "type": "string",
                              "description": "دولة الإصدار (ISO 3166-1 alpha-3).",
                              "example": "ESP"
                            },
                            "nationality": {
                              "type": "string",
                              "description": "جنسية صاحب المستند (ISO 3166-1 alpha-3).",
                              "example": "ESP"
                            },
                            "birth_date": {
                              "type": "string",
                              "description": "تاريخ الميلاد الخام من MRZ (`YYMMDD`).",
                              "example": "800113"
                            },
                            "expiry_date": {
                              "type": "string",
                              "description": "تاريخ الانتهاء الخام من MRZ (`YYMMDD`).",
                              "example": "320331"
                            },
                            "sex": {
                              "type": "string",
                              "example": "M"
                            },
                            "document_type": {
                              "type": "string",
                              "description": "رمز نوع المستند في MRZ (مثل `ID`، `P`).",
                              "example": "ID"
                            },
                            "document_number": {
                              "type": "string",
                              "example": "CBX164224"
                            },
                            "optional_data": {
                              "type": "string",
                              "nullable": true,
                              "example": "20446581H"
                            },
                            "optional_data_2": {
                              "type": "string",
                              "nullable": true,
                              "example": ""
                            },
                            "birth_date_hash": {
                              "type": "string",
                              "description": "رقم التحقق من MRZ لتاريخ الميلاد.",
                              "example": "9"
                            },
                            "expiry_date_hash": {
                              "type": "string",
                              "description": "رقم التحقق من MRZ لتاريخ الانتهاء.",
                              "example": "8"
                            },
                            "document_number_hash": {
                              "type": "string",
                              "description": "رقم التحقق من MRZ لرقم المستند.",
                              "example": "3"
                            },
                            "final_hash": {
                              "type": "string",
                              "description": "رقم التحقق المركب لـ MRZ.",
                              "example": "3"
                            },
                            "personal_number": {
                              "type": "string",
                              "nullable": true,
                              "example": "20446581H"
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "تحذيرات غير حرجة عند تحليل MRZ."
                            },
                            "errors": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "أخطاء رقم التحقق/التحليل في MRZ. تظهر الأخطاء غير الفارغة كتحذير `MRZ_VALIDATION_FAILED`."
                            },
                            "mrz_type": {
                              "type": "string",
                              "description": "تخطيط MRZ: `TD1` (بطاقات الهوية، 3 أسطر)، أو `TD2`، أو `TD3` (جوازات السفر، سطرين).",
                              "example": "TD1"
                            },
                            "mrz_string": {
                              "type": "string",
                              "description": "نص MRZ الخام كما تمت قراءته، مع فصل الأسطر بواسطة `\\n`."
                            },
                            "mrz_key": {
                              "type": "string",
                              "description": "مفتاح مركب (رقم المستند + أرقام التحقق) يُستخدم لعمليات الفحص المتقاطع."
                            }
                          }
                        },
                        "parsed_address": {
                          "type": "object",
                          "nullable": true,
                          "description": "تفصيل مهيكل ومحدد جغرافياً لـ `address`. تكون قيمته `null` عندما لا يحمل المستند أي عنوان أو يتعذر تحليله.",
                          "properties": {
                            "street_1": {
                              "type": "string",
                              "nullable": true,
                              "example": "Avenida el Cardonal 52"
                            },
                            "street_2": {
                              "type": "string",
                              "nullable": true,
                              "example": "b"
                            },
                            "city": {
                              "type": "string",
                              "nullable": true,
                              "example": "La Laguna"
                            },
                            "region": {
                              "type": "string",
                              "nullable": true,
                              "example": "Canarias"
                            },
                            "country": {
                              "type": "string",
                              "nullable": true,
                              "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2.",
                              "example": "ES"
                            },
                            "postal_code": {
                              "type": "string",
                              "nullable": true,
                              "example": "38108"
                            },
                            "address_type": {
                              "type": "string",
                              "nullable": true,
                              "example": "Avenida"
                            },
                            "formatted_address": {
                              "type": "string",
                              "nullable": true,
                              "description": "سلسلة عنوان مرمز جغرافياً قياسية.",
                              "example": "Av. el Cardonal, 52, b, 38108 La Laguna, Santa Cruz de Tenerife, Spain"
                            },
                            "raw_results": {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "payload الخام الخاص بالترميز الجغرافي (`address_components`، `geometry.location`، `place_id`، …) للمستهلكين المتقدمين."
                            },
                            "document_location": {
                              "type": "object",
                              "nullable": true,
                              "properties": {
                                "latitude": {
                                  "type": "number"
                                },
                                "longitude": {
                                  "type": "number"
                                }
                              },
                              "description": "الإحداثيات الجغرافية لعنوان المستند."
                            },
                            "label": {
                              "type": "string",
                              "nullable": true,
                              "description": "أي حقل في المستند تمت قراءة العنوان منه.",
                              "example": "Spain Identity Card Address"
                            },
                            "is_verified": {
                              "type": "boolean",
                              "description": "ما إذا كان الترميز الجغرافي قد أكد وجود العنوان."
                            },
                            "category": {
                              "type": "string",
                              "nullable": true,
                              "description": "فئة العنوان (مثل `Residential`، `Commercial`).",
                              "example": "Residential"
                            }
                          }
                        },
                        "warnings": {
                          "type": "array",
                          "description": "فارغ عند الموافقة السليمة. يوضح كل إدخال خطراً واحداً تم اكتشافه؛ تُعيّن الإدخالات ذات `log_type: \"error\"` الـ `status` إلى `Declined`، بينما يُعيّنه `DOCUMENT_LIVENESS_NOT_COMPUTED` (`log_type: \"warning\"`) إلى `In Review`.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "risk": {
                                "type": "string",
                                "description": "رمز مخاطر مقروء آلياً. مخاطر تؤدي دائماً إلى الرفض: `DOCUMENT_EXPIRED`، و`MINIMUM_AGE_NOT_MET`، و`PORTRAIT_IMAGE_NOT_DETECTED`، و`SCREEN_CAPTURE_DETECTED`، و`PRINTED_COPY_DETECTED`، و`PORTRAIT_MANIPULATION_DETECTED`، و`PUBLIC_DOCUMENT_IMAGE_DETECTED`، و`INVALID_DATE`، و`COULD_NOT_RECOGNIZE_DOCUMENT` (خاص بالرمز 400 فقط، ولا يكون تحذيراً أبداً)، و`DOCUMENT_NUMBER_NOT_DETECTED`، و`COULD_NOT_DETECT_DOCUMENT_TYPE`، و`NAME_NOT_DETECTED`، و`DATE_OF_BIRTH_NOT_DETECTED`. تحكمها خيارات الطلب: `MRZ_NOT_DETECTED` / `MRZ_VALIDATION_FAILED` (`invalid_mrz_action`)، و`DATA_INCONSISTENT` / `MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME` / `DOCUMENT_NAME_DIFFERENT_FROM_OTHER_APPROVED_DOCUMENTS` (`inconsistent_data_action`)، و`EXPIRATION_DATE_NOT_DETECTED` (`expiration_date_not_detected_action`). المخاطر الأخرى (مثل `POSSIBLE_DUPLICATED_USER`) هي معلوماتية. يتم إطلاق `DOCUMENT_LIVENESS_NOT_COMPUTED` عندما يكون `perform_document_liveness=true` ولكن فحص التزوير لم يُرجع أي درجة قابلة للاستخدام؛ حيث يُعيّن `status` إلى `In Review`. كما يتم إرجاع `COULD_NOT_DETECT_DOCUMENT_TYPE` عندما لا تتطابق الجهة الأمامية من المستند مع تصميم مستند رسمي معروف بدرجة ثقة عالية، على سبيل المثال مستند معدّل أو مُنشأ بواسطة الكمبيوتر، أو تصميم غير مدعوم بعد.",
                                "example": "DOCUMENT_EXPIRED"
                              },
                              "feature": {
                                "type": "string",
                                "enum": [
                                  "ID_VERIFICATION"
                                ],
                                "description": "الميزة التي أصدرت التحذير. دائماً `ID_VERIFICATION` في هذا الـ endpoint."
                              },
                              "additional_data": {
                                "type": "object",
                                "nullable": true,
                                "additionalProperties": true,
                                "description": "سياق إضافي لبعض المخاطر (على سبيل المثال، يتضمن `POSSIBLE_DUPLICATED_USER` الحقل `duplicated_session_id`)؛ ويكون `null` لمعظمها."
                              },
                              "log_type": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warning",
                                  "information"
                                ],
                                "description": "مستوى الخطورة. تحذيرات `error` تنقل `status` إلى `Declined`؛ وتحذيرات `warning` (فقط `DOCUMENT_LIVENESS_NOT_COMPUTED`، عندما لا يُنتج فحص التزوير المطلوب أي درجة صالحة للاستخدام) تنقل `status` إلى `In Review`؛ وإدخالات `information` استشارية ولا تغيّر الحالة أبداً."
                              },
                              "short_description": {
                                "type": "string",
                                "description": "ملخص للمخاطر في سطر واحد مقروء للبشر."
                              },
                              "long_description": {
                                "type": "string",
                                "description": "تفسير سهل القراءة للمخاطر."
                              }
                            }
                          }
                        },
                        "barcodes": {
                          "type": "array",
                          "description": "الرموز الشريطية التي تم فك ترميزها من المستند (PDF417، QR، …). فارغة عندما لا يحتوي المستند على أي منها أو يتعذر قراءة أي منها.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "نوع الرمز الشريطي (مثل `PDF417`، و`QR_CODE`، و`UNKNOWN`)."
                              },
                              "position": {
                                "type": "object",
                                "nullable": true,
                                "additionalProperties": true,
                                "description": "موقع الباركود في الصورة، عند توفره."
                              },
                              "data": {
                                "type": "string",
                                "description": "payload مفكوك الترميز."
                              },
                              "data_raw": {
                                "type": "string",
                                "description": "payload الخام (غير المفكك)، عندما يكون مختلفاً."
                              },
                              "side": {
                                "type": "string",
                                "nullable": true,
                                "description": "`front` أو `back`."
                              }
                            }
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، أو `null`."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "نسخة مطابقة من كائن `metadata` الذي أرسلته، أو `null`."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "طابع زمني بتنسيق ISO 8601 (بالتوقيت العالمي المنسق UTC) لوقت إنشاء الاستجابة."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق أو المعالجة. تُرجع المشكلات على مستوى الحقول غلاف DRF القياسي (مصفوفة واحدة من الرسائل لكل حقل مخالف). وتُرجع مشكلات ملفات PDF المشفرة `{\"detail\": ...}`. وتُرجع صورة المستند التي يتعذر التعرف فيها على أي مستند على الإطلاق `{\"error\": \"COULD_NOT_RECOGNIZE_DOCUMENT\"}`. ويمكن أن تفشل عمليات رفع PDF بالإضافة إلى ذلك مع \"The submitted PDF file is corrupted or invalid.\" أو خطأ عدم وجود صفحات.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing front image": {
                    "summary": "`front_image` غير مدرجة في بيانات النموذج",
                    "value": {
                      "front_image": [
                        "No file was submitted."
                      ]
                    }
                  },
                  "Unsupported file extension": {
                    "summary": "امتداد الملف خارج tiff/jpg/jpeg/png/webp/pdf",
                    "value": {
                      "front_image": [
                        "File extension “txt” is not allowed. Allowed extensions are: tiff, jpg, jpeg, png, webp, pdf."
                      ]
                    }
                  },
                  "File too large": {
                    "summary": "يتجاوز الملف المرفوع حد 10 ميجابايت",
                    "value": {
                      "front_image": [
                        "File size should not exceed 10 MB"
                      ]
                    }
                  },
                  "Invalid option value": {
                    "summary": "تقبل الخيارات DECLINE أو NO_ACTION فقط",
                    "value": {
                      "invalid_mrz_action": [
                        "\"REVIEW\" is not a valid choice."
                      ]
                    }
                  },
                  "Encrypted PDF": {
                    "summary": "تم تحميل ملف PDF بدون كلمة المرور المطلوبة",
                    "value": {
                      "detail": "The PDF is encrypted. Please upload a decrypted PDF or a photo instead."
                    }
                  },
                  "Wrong PDF password": {
                    "summary": "`front_image_password` / `back_image_password` لا يفك تشفير ملف PDF",
                    "value": {
                      "detail": "The PDF password is incorrect. Please provide the correct password."
                    }
                  },
                  "Document not recognized": {
                    "summary": "تعذر اكتشاف أي مستند هوية في الصورة",
                    "value": {
                      "error": "COULD_NOT_RECOGNIZE_DOCUMENT"
                    }
                  },
                  "PDF conversion failure": {
                    "summary": "تعذر تحويل ملف PDF المرفوع إلى صورة",
                    "value": {
                      "error": "Failed to convert front image PDF."
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DocumentProcessingBusy"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST 'https://verification.didit.me/v3/id-verification/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'front_image=@./id_front.jpg' \\\n  -F 'back_image=@./id_back.jpg' \\\n  -F 'perform_document_liveness=true' \\\n  -F 'save_api_request=true' \\\n  -F 'vendor_data=user-123'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_verification.verify(\n    front_image=open(\"front_image.jpg\", \"rb\"),\n    back_image=open(\"back_image.jpg\", \"rb\"),\n    perform_document_liveness=True,\n    save_api_request=True,\n    vendor_data=\"user-123\",\n    metadata={\"flow\": \"onboarding\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idVerification.verify({\n  front_image: await fileFromPath(\"front_image.jpg\"),\n  back_image: await fileFromPath(\"back_image.jpg\"),\n  perform_document_liveness: true,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"onboarding\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDVerification.Verify(ctx, didit.IDVerificationVerifyParams{\n\tFrontImage:              didit.FileFromPath(\"front_image.jpg\"),\n\tBackImage:               didit.Some(didit.FileFromPath(\"back_image.jpg\")),\n\tPerformDocumentLiveness: didit.Bool(true),\n\tSaveAPIRequest:          didit.Bool(true),\n\tVendorData:              didit.String(\"user-123\"),\n\tMetadata:                didit.Some(map[string]any{\"flow\": \"onboarding\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.IdVerificationVerifyParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idVerification().verify(IdVerificationVerifyParams.builder()\n        .frontImage(Path.of(\"front_image.jpg\"))\n        .backImage(Path.of(\"back_image.jpg\"))\n        .performDocumentLiveness(true)\n        .saveApiRequest(true)\n        .vendorData(\"user-123\")\n        .metadata(Map.of(\"flow\", \"onboarding\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idVerification->verify([\n    'front_image' => File::fromPath('front_image.jpg'),\n    'back_image' => File::fromPath('back_image.jpg'),\n    'perform_document_liveness' => true,\n    'save_api_request' => true,\n    'vendor_data' => 'user-123',\n    'metadata' => ['flow' => 'onboarding'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_verification.verify(\n  front_image: Pathname(\"front_image.jpg\"),\n  back_image: Pathname(\"back_image.jpg\"),\n  perform_document_liveness: true,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"onboarding\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdVerification.VerifyAsync(new IdVerificationVerifyParams\n{\n    FrontImage = FileUpload.FromPath(\"front_image.jpg\"),\n    BackImage = FileUpload.FromPath(\"back_image.jpg\"),\n    PerformDocumentLiveness = true,\n    SaveApiRequest = true,\n    VendorData = \"user-123\",\n    Metadata = new Dictionary<string, object> { [\"flow\"] = \"onboarding\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/face-match/": {
      "post": {
        "summary": "مطابقة الوجه",
        "description": "قارن بين صورتي وجه (1:1) واحصل على `score` للتشابه (0–100) بالإضافة إلى `status` بقيمة `Approved`/`Declined`.\n\n**آلية العمل.** يتم فك ترميز الصورتين وتحليلهما بواسطة نموذج بيومتري (اضبط `rotate_image=true` إذا كانت الصور الملتقطة قد تكون جانبية أو مقلوبة)، ثم يتم احتساب درجة التشابه بين الوجهين. تُرجع النتيجة التي تكون **أعلى تماماً** من `face_match_score_decline_threshold` (القيمة الافتراضية `30`) الحالة `status: \"Approved\"`؛ بينما تُرجع النتيجة المساوية له أو الأقل منه `Declined` مع تحذير `LOW_FACE_MATCH_SIMILARITY`. إذا تعذر احتساب الدرجة لأي زوج من الوجوه على الإطلاق، فسيستمر الاستدعاء في إرجاع `200` مع `status: \"Declined\"` وتحذير `NO_REFERENCE_IMAGE` — تكون قيمة `score` هي `null` في مسار الحفظ الافتراضي، أو `0` مع `save_api_request=false`. أرسل وجهاً واحداً واضحاً ومواجهاً للكاميرا لكل صورة للحصول على أفضل النتائج.\n\n**الفوترة.** تستهلك كل استجابة `200` رصيداً واحداً من API مطابقة الوجه (يُدفع من رصيد خطتك أو رصيد شحن الرصيد). عندما لا يتمكن رصيد المؤسسة من تغطية الاستدعاء، يُرجع endpoint الرمز `403` مع خطأ عدم كفاية الرصيد قبل معالجة أي صورة.\n\n**استمرار الجلسة (`save_api_request`، القيمة الافتراضية `true`).** عندما تكون القيمة `true`، يتم حفظ الاستدعاء كجلسة من نوع API: يظهر في Business Console، ويكون `request_id` المُرجع معرّف جلسة حقيقياً يمكنك تمريره إلى `GET /v3/session/{sessionId}/decision/`، ويتم تخزين كلتا الصورتين كصورتي المصدر/الهدف لمطابقة الوجه في الجلسة، ويتم إرسال حدث webhook من نوع `status.updated` إلى وجهات webhook التي قمت بتهيئتها. عندما تكون القيمة `false`، لا يتم تخزين أي شيء ويكون `request_id` عبارة عن UUID ارتباط يُستخدم لمرة واحدة ولا يمكن البحث عنه لاحقاً.\n\n**فهرس البحث بالوجه.** لا يُسجّل هذا الـ endpoint الوجوه أبداً في فهرس البحث بالوجه الخاص بك ولا يُجري أبداً فحص قائمة الحظر أو التكرار — استخدم `POST /v3/passive-liveness/` أو `POST /v3/face-search/` لهذه الأغراض.\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية جميع عمليات المعالجة والفوترة: بعد التحقق من صحة الطلب (المدخلات المشوهة لا تزال تُرجع `400`)، يُرجع endpoint payload تجريبية ثابتة بحالة `Approved`، ولا يتم حفظ أي جلسة، ولا يُستهلك أي رصيد.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا تُرجع واجهة API هذه الرمز `401` أبداً.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE؛ وتجاوزها يُرجع `429`.",
        "operationId": "post_v3face-match",
        "x-didit-sdk": {
          "resource": "face_match",
          "method": "compare",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "user_image",
                  "ref_image"
                ],
                "properties": {
                  "user_image": {
                    "type": "string",
                    "format": "binary",
                    "description": "صورة وجه لشخص حي أو صورة وجه مرشحة للتحقق منها (مثل صورة سيلفي). أرسل صورة أمامية واحدة مع ظهور وجه الشخص بوضوح وإضاءة جيدة. الامتدادات المسموح بها: `tiff`، `jpg`، `jpeg`، `png`، `webp`. أقصى حجم للرفع: **5 MB** (تُرفض الملفات الأكبر بـ `400`). يتم ضغط الصور تلقائيًا إلى ~0.5 MB قبل المعالجة، لذا فإن الدقة العالية جدًا لا تُحسّن الدقة."
                  },
                  "ref_image": {
                    "type": "string",
                    "format": "binary",
                    "description": "صورة وجه مرجعية للمقارنة معها (مثل صورة مستند الهوية أو صورة مسجلة مسبقاً). نفس قيود التنسيق والحجم الخاصة بـ `user_image`."
                  },
                  "face_match_score_decline_threshold": {
                    "type": "number",
                    "format": "float",
                    "default": 30,
                    "minimum": 0,
                    "maximum": 100,
                    "description": "حد التشابه (0–100) الذي يحدد `status` في الاستجابة. تؤدي الدرجة المحسوبة **المساوية لهذه القيمة أو الأقل منها** إلى تعيين `status` على `Declined` وإضافة تحذير `LOW_FACE_MATCH_SIMILARITY`؛ وتُرجع الدرجة الأعلى منها تماماً حالة `Approved`. القيمة الافتراضية `30` متساهلة — ارفعها (على سبيل المثال `50`–`60`) لإجراء تحقق أكثر صرامة. تُرجع القيم خارج النطاق 0–100 الرمز `400`.",
                    "example": 50
                  },
                  "rotate_image": {
                    "type": "boolean",
                    "default": false,
                    "description": "عندما تكون `true`، تجرب الخدمة صور الإدخال بزيادات قدرها 90 درجة (0، 90، 180، 270) وتستخدم الاتجاه الذي يحقق أفضل كشف للوجه — مفيد للصور الملتقطة عبر الهاتف مع فقدان اتجاه EXIF. يضيف تأخيراً في الاستجابة، لذا لا تفعّله إلا إذا كنت لا تستطيع ضمان أن تكون الصور بالاتجاه الصحيح للأعلى.",
                    "example": false
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "عندما تكون القيمة `true` (الافتراضية)، يتم حفظ الاستدعاء كجلسة من نوع API — مرئية في Business Console، ويمكن استرجاعها عبر `GET /v3/session/{sessionId}/decision/` باستخدام `request_id` المُرجع، ويتم الإشعار بها عبر webhook لحدث `status.updated`. عندما تكون القيمة `false`، لا يتم تخزين أي شيء ويكون `request_id` عبارة عن معرّف UUID مؤقت للربط بالاستجابة فقط.",
                    "example": true
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "سلسلة نصية مبهمة اختيارية (معرّف المستخدم الداخلي لديك، البريد الإلكتروني، UUID...) تُخزَّن في الجلسة المحفوظة وتُعاد في الاستجابة. استخدمها لربط استدعاءات API بسجلاتك الخاصة ولتصفية الجلسات لاحقاً.",
                    "example": "user-123"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "كائن JSON اختياري يُخزن مع الجلسة (عندما يكون `save_api_request=true`) ويُعاد في الاستجابة. في طلبات multipart، أرسله كحقل سلسلة نصية بترميز JSON (مثل `metadata={\"flow\":\"login\"}`) — حيث يتم تحليله إلى كائن.",
                    "example": {
                      "flow": "login",
                      "device_id": "abc123"
                    }
                  }
                }
              },
              "example": {
                "user_image": "(binary JPEG/PNG of the live selfie)",
                "ref_image": "(binary JPEG/PNG of the reference photo)",
                "face_match_score_decline_threshold": 50,
                "rotate_image": false,
                "save_api_request": true,
                "vendor_data": "user-123",
                "metadata": {
                  "flow": "login"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم احتساب مطابقة الوجه. الخاصية `face_match.score` عبارة عن رقم عشري بين 0 و100 (بمنزلتين عشريتين)؛ وتكون الحالة `status` هي `Approved` عندما تكون الدرجة أعلى تماماً من `face_match_score_decline_threshold`، وإلا فتكون `Declined` مع تحذير توضيحي. إذا كان الزوج ذا تشابه منخفض أو تعذر احتساب درجته فإنه يظل يُرجع `200` — تحقّق من `face_match.status` و`face_match.warnings`، وليس من رمز HTTP فقط. عندما تكون `save_api_request=true`، يكون `request_id` هو معرّف الجلسة المحفوظة.",
            "content": {
              "application/json": {
                "examples": {
                  "Approved": {
                    "summary": "الشخص نفسه — النتيجة أعلى من الحد",
                    "value": {
                      "request_id": "f9f5a777-8002-44c6-baaf-128bcfd6e226",
                      "face_match": {
                        "status": "Approved",
                        "score": 99.41,
                        "user_image": {
                          "entities": [
                            {
                              "bbox": [
                                661,
                                728,
                                1688,
                                2188
                              ],
                              "confidence": 0.732973,
                              "age": 26.91,
                              "gender": "male",
                              "race": null
                            }
                          ],
                          "best_angle": 0
                        },
                        "ref_image": {
                          "entities": [
                            {
                              "bbox": [
                                653,
                                745,
                                1691,
                                2185
                              ],
                              "confidence": 0.722082,
                              "age": 27.0,
                              "gender": "male",
                              "race": null
                            }
                          ],
                          "best_angle": 0
                        },
                        "warnings": []
                      },
                      "vendor_data": "user-123",
                      "metadata": {
                        "flow": "login"
                      },
                      "created_at": "2026-06-12T01:04:42.763237+00:00"
                    }
                  },
                  "Declined - low similarity": {
                    "summary": "الدرجة عند حد الرفض أو أدنى منه",
                    "value": {
                      "request_id": "7cdda24e-311a-46d3-a3bb-e5d9b564ce73",
                      "face_match": {
                        "status": "Declined",
                        "score": 24.87,
                        "user_image": {
                          "entities": [
                            {
                              "bbox": [
                                661,
                                728,
                                1688,
                                2188
                              ],
                              "confidence": 0.732973,
                              "age": 26.91,
                              "gender": "male",
                              "race": null
                            }
                          ],
                          "best_angle": 0
                        },
                        "ref_image": {
                          "entities": [
                            {
                              "bbox": [
                                156,
                                234,
                                679,
                                898
                              ],
                              "confidence": 0.717775,
                              "age": 41.2,
                              "gender": "male",
                              "race": null
                            }
                          ],
                          "best_angle": 0
                        },
                        "warnings": [
                          {
                            "risk": "LOW_FACE_MATCH_SIMILARITY",
                            "feature": "FACEMATCH",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Low face match similarity",
                            "long_description": "The facial features of the provided image don't closely match the reference image, suggesting a potential identity mismatch."
                          }
                        ]
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T01:08:19.859116+00:00"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة المحفوظة عندما تكون `save_api_request=true` (يمكن استخدامه مع `GET /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID ارتباط مؤقت."
                    },
                    "face_match": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "Approved",
                            "Declined"
                          ],
                          "description": "`Approved` عندما تكون درجة التشابه أعلى من `face_match_score_decline_threshold` بشكل صارم وأمكن احتساب الدرجة؛ و`Declined` خلاف ذلك (يوضح تحذير السبب)."
                        },
                        "score": {
                          "type": "number",
                          "format": "float",
                          "nullable": true,
                          "minimum": 0,
                          "maximum": 100,
                          "description": "درجة التشابه من 0 إلى 100 — ثقة النموذج في أن الصورتين تعودان للشخص نفسه. يتم تقريبها إلى منزلتين عشريتين فقط عندما تكون قيمة `save_api_request` هي true؛ ومع `save_api_request=false` يتم إرجاع القيمة العشرية الخام. تكون `null` عندما يتعذر احتساب الدرجة لأي زوج من الوجوه (مع القيمة الافتراضية `save_api_request=true`)؛ ومع `save_api_request=false` قد تظهر الحالة نفسها على أنها `score: 0`. في كلتا الحالتين، يظهر تحذير `NO_REFERENCE_IMAGE` وتكون `status` هي `Declined`.",
                          "example": 99.41
                        },
                        "user_image": {
                          "type": "object",
                          "description": "نتائج كشف الوجه للصور التي تم تحليلها.",
                          "properties": {
                            "entities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "bbox": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer"
                                    },
                                    "minItems": 4,
                                    "maxItems": 4,
                                    "description": "المربع المحيط للوجه المكتشف كإحداثيات بكسل `[x_min, y_min, x_max, y_max]` في الصورة المُعالجة.",
                                    "example": [
                                      661,
                                      728,
                                      1688,
                                      2188
                                    ]
                                  },
                                  "confidence": {
                                    "type": "number",
                                    "format": "float",
                                    "minimum": 0,
                                    "maximum": 1,
                                    "description": "درجة الثقة في كشف الوجه (0–1).",
                                    "example": 0.732973
                                  },
                                  "age": {
                                    "type": "number",
                                    "format": "float",
                                    "description": "العمر المقدّر بالنموذج للوجه المكتشف، بالسنوات. لأغراض إعلامية فقط — لا يؤثر على قرار مطابقة الوجه.",
                                    "example": 26.91
                                  },
                                  "gender": {
                                    "type": "string",
                                    "description": "الجنس المتوقع بالنموذج للوجه المكتشف (`male` أو `female`). لأغراض إعلامية فقط.",
                                    "example": "male"
                                  },
                                  "race": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "حقل محجوز — دائماً `null` في الاستجابات من هذا endpoint.",
                                    "example": null
                                  }
                                }
                              },
                              "description": "إدخال واحد لكل وجه مكتشف."
                            },
                            "best_angle": {
                              "type": "integer",
                              "description": "زاوية التدوير (بالدرجات: 0 أو 90 أو 180 أو 270) التي حققت أفضل كشف للوجه. تكون غير صفرية فقط عندما يصحح `rotate_image=true` الاتجاه.",
                              "example": 0
                            }
                          }
                        },
                        "ref_image": {
                          "type": "object",
                          "description": "نتائج كشف الوجه للصورة المرجعية، بنفس بنية `user_image`.",
                          "properties": {
                            "entities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "bbox": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer"
                                    },
                                    "minItems": 4,
                                    "maxItems": 4,
                                    "description": "المربع المحيط للوجه المكتشف كإحداثيات بكسل `[x_min, y_min, x_max, y_max]` في الصورة المُعالجة.",
                                    "example": [
                                      661,
                                      728,
                                      1688,
                                      2188
                                    ]
                                  },
                                  "confidence": {
                                    "type": "number",
                                    "format": "float",
                                    "minimum": 0,
                                    "maximum": 1,
                                    "description": "درجة الثقة في كشف الوجه (0–1).",
                                    "example": 0.732973
                                  },
                                  "age": {
                                    "type": "number",
                                    "format": "float",
                                    "description": "العمر المقدّر بالنموذج للوجه المكتشف، بالسنوات. لأغراض إعلامية فقط — لا يؤثر على قرار مطابقة الوجه.",
                                    "example": 26.91
                                  },
                                  "gender": {
                                    "type": "string",
                                    "description": "الجنس المتوقع بالنموذج للوجه المكتشف (`male` أو `female`). لأغراض إعلامية فقط.",
                                    "example": "male"
                                  },
                                  "race": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "حقل محجوز — دائماً `null` في الاستجابات من هذا endpoint.",
                                    "example": null
                                  }
                                }
                              },
                              "description": "إدخال واحد لكل وجه مكتشف."
                            },
                            "best_angle": {
                              "type": "integer",
                              "example": 0
                            }
                          }
                        },
                        "warnings": {
                          "type": "array",
                          "description": "فارغ عند الموافقة السليمة. `NO_REFERENCE_IMAGE` (`error`) — تعذر احتساب درجات أي زوج من الوجوه؛ `LOW_FACE_MATCH_SIMILARITY` (`error`) — النتيجة عند حد الرفض أو دونه. يؤدي أيٌّ من هذه الإدخالات إلى تعيين `status` إلى `Declined`.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "risk": {
                                "type": "string",
                                "enum": [
                                  "NO_REFERENCE_IMAGE",
                                  "LOW_FACE_MATCH_SIMILARITY"
                                ],
                                "description": "رمز مخاطر مقروء آلياً."
                              },
                              "feature": {
                                "type": "string",
                                "enum": [
                                  "FACEMATCH"
                                ],
                                "description": "الميزة التي أصدرت التحذير. دائماً `FACEMATCH` في هذا الـ endpoint."
                              },
                              "additional_data": {
                                "type": "object",
                                "nullable": true,
                                "additionalProperties": true,
                                "description": "دائماً `null` للتحذيرات الخاصة بمطابقة الوجه."
                              },
                              "log_type": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warning",
                                  "information"
                                ],
                                "description": "مستوى الخطورة. تحذيرات `error` تنقل `status` إلى `Declined`؛ وإدخالات `warning` و`information` استشارية ولا تؤدي إلى الرفض بمفردها أبداً."
                              },
                              "short_description": {
                                "type": "string",
                                "description": "ملخص للمخاطر في سطر واحد مقروء للبشر."
                              },
                              "long_description": {
                                "type": "string",
                                "description": "تفسير سهل القراءة للمخاطر."
                              }
                            }
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، أو `null`."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "نسخة مطابقة من كائن `metadata` الذي أرسلته، أو `null`."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "طابع زمني بتنسيق ISO 8601 (بالتوقيت العالمي المنسق UTC) لوقت إنشاء الاستجابة، مثل `2026-06-12T01:04:42.763237+00:00`."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. يتم إرجاعه عندما تكون الصورة المطلوبة مفقودة، أو يتجاوز حجمها 5 MB، أو يكون امتدادها غير مدعوم، أو عندما يكون أحد الخيارات خارج النطاق. يكون نص الاستجابة هو غلاف أخطاء الحقول القياسي لـ DRF: مصفوفة واحدة من الرسائل لكل حقل مخالف.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing required image": {
                    "summary": "`ref_image` (أو `user_image`) غير مدرج في بيانات النموذج",
                    "value": {
                      "ref_image": [
                        "No file was submitted."
                      ]
                    }
                  },
                  "Unsupported file extension": {
                    "summary": "امتداد الملف خارج tiff/jpg/jpeg/png/webp",
                    "value": {
                      "user_image": [
                        "File extension “txt” is not allowed. Allowed extensions are: tiff, jpg, jpeg, png, webp."
                      ]
                    }
                  },
                  "File too large": {
                    "summary": "يتجاوز الملف المرفوع حد 5 ميجابايت",
                    "value": {
                      "user_image": [
                        "File size should not exceed 5 MB"
                      ]
                    }
                  },
                  "Threshold out of range": {
                    "summary": "`face_match_score_decline_threshold` خارج النطاق 0–100",
                    "value": {
                      "face_match_score_decline_threshold": [
                        "Ensure this value is less than or equal to 100."
                      ]
                    }
                  }
                }
              }
            }
          },
          "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/face-match/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'user_image=@./selfie.jpg' \\\n  -F 'ref_image=@./id_portrait.jpg' \\\n  -F 'face_match_score_decline_threshold=50' \\\n  -F 'save_api_request=true' \\\n  -F 'vendor_data=user-123'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.face_match.compare(\n    user_image=open(\"user_image.jpg\", \"rb\"),\n    ref_image=open(\"ref_image.jpg\", \"rb\"),\n    face_match_score_decline_threshold=50.0,\n    rotate_image=False,\n    save_api_request=True,\n    vendor_data=\"user-123\",\n    metadata={\"flow\": \"login\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.faceMatch.compare({\n  user_image: await fileFromPath(\"user_image.jpg\"),\n  ref_image: await fileFromPath(\"ref_image.jpg\"),\n  face_match_score_decline_threshold: 50.0,\n  rotate_image: false,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"login\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FaceMatch.Compare(ctx, didit.FaceMatchCompareParams{\n\tUserImage:                      didit.FileFromPath(\"user_image.jpg\"),\n\tRefImage:                       didit.FileFromPath(\"ref_image.jpg\"),\n\tFaceMatchScoreDeclineThreshold: didit.Float(50.0),\n\tRotateImage:                    didit.Bool(false),\n\tSaveAPIRequest:                 didit.Bool(true),\n\tVendorData:                     didit.String(\"user-123\"),\n\tMetadata:                       didit.Some(map[string]any{\"flow\": \"login\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.FaceMatchCompareParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.faceMatch().compare(FaceMatchCompareParams.builder()\n        .userImage(Path.of(\"user_image.jpg\"))\n        .refImage(Path.of(\"ref_image.jpg\"))\n        .faceMatchScoreDeclineThreshold(50.0)\n        .rotateImage(false)\n        .saveApiRequest(true)\n        .vendorData(\"user-123\")\n        .metadata(Map.of(\"flow\", \"login\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->faceMatch->compare([\n    'user_image' => File::fromPath('user_image.jpg'),\n    'ref_image' => File::fromPath('ref_image.jpg'),\n    'face_match_score_decline_threshold' => 50.0,\n    'rotate_image' => false,\n    'save_api_request' => true,\n    'vendor_data' => 'user-123',\n    'metadata' => ['flow' => 'login'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.face_match.compare(\n  user_image: Pathname(\"user_image.jpg\"),\n  ref_image: Pathname(\"ref_image.jpg\"),\n  face_match_score_decline_threshold: 50.0,\n  rotate_image: false,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"login\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FaceMatch.CompareAsync(new FaceMatchCompareParams\n{\n    UserImage = FileUpload.FromPath(\"user_image.jpg\"),\n    RefImage = FileUpload.FromPath(\"ref_image.jpg\"),\n    FaceMatchScoreDeclineThreshold = 50.0,\n    RotateImage = false,\n    SaveApiRequest = true,\n    VendorData = \"user-123\",\n    Metadata = new Dictionary<string, object> { [\"flow\"] = \"login\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/age-estimation/": {
      "post": {
        "summary": "تقدير العمر (عمر الوجه + كشف الحيوية السلبي)",
        "description": "تقدير عمر الشخص من صورة وجه واحدة وإجراء فحص كشف الحيوية السلبي في نفس الاستدعاء — يُرجع `age_estimation` المتوقع بواسطة النموذج (بالسنوات)، و`score` للحيوية (0–100)، و`status` بقيمة `Approved`/`Declined`. العمر **متوقع بواسطة النموذج من الوجه، وليس متحققاً منه مقابل مستند** — استخدمه لبوابات التحقق من العمر والفحوصات منخفضة الاحتكاك، وليس كإثبات قانوني للعمر.\n\n**آلية العمل.** تُحلل الصورة بحثاً عن الوجوه (اضبط `rotate_image=true` إذا كانت الصور الملتقطة قد تكون جانبية أو مقلوبة)؛ يحصل كل وجه مكتشف على عمر تقديري، وأكبر وجه في الإطار هو ما يحدد `age_estimation`. بالتوازي مع ذلك، يسجل نموذج كشف الحيوية السلبي درجة تقيس ما إذا كانت الصورة تُظهر شخصاً حياً (دون الحاجة إلى تفاعل من المستخدم) ويكتشف هجمات العرض (صور للصور، الشاشات، الأقنعة). أرسل وجهاً واحداً واضحاً وموجهاً للأمام ومضاءً جيداً لكل صورة للحصول على أفضل النتائج.\n\n**منطق القرار.** أي تحذير يؤدي إلى الرفض: تكون قيمة `status` هي `Approved` فقط عندما تكون مصفوفة `warnings` فارغة. تؤدي درجة الحيوية `score` التي تساوي `face_liveness_score_decline_threshold` أو تقل عنها (القيمة الافتراضية `30`) إلى إضافة `LOW_LIVENESS_SCORE`؛ يؤدي اكتشاف هجوم إلى إضافة `LIVENESS_FACE_ATTACK`؛ عدم العثور على أي وجه بواسطة نموذج كشف الحيوية يضيف `NO_FACE_DETECTED`؛ عدم القدرة على تقدير عمر الوجه يضيف `AGE_NOT_DETECTED` (تكون قيمة `age_estimation` هي `null`)؛ تقدير عمر أقل من `age_estimation_decline_threshold` (القيمة الافتراضية `18`) يضيف `AGE_BELOW_MINIMUM`. تستحق الأعمار الحدية القريبة من الحد الخاص بك استخدام التحقق القائم على المستندات كإجراء بديل — حيث يزداد هامش خطأ النموذج للوجوه القريبة من الحد.\n\n**الفوترة.** يستهلك كل استجابة `200` رصيداً واحداً لـ API تقدير العمر (يُدفع من رصيد الخطة أو رصيد شحن الرصيد). عندما لا يغطي رصيد المؤسسة تكلفة الاستدعاء، يُرجع الـ endpoint الرمز `403` مع خطأ عدم كفاية الرصيد قبل إجراء أي معالجة للصورة.\n\n**حفظ الجلسة (`save_api_request`، القيمة الافتراضية `true`).** عندما تكون القيمة `true`، يُحفظ الاستدعاء كجلسة من نوع API: يظهر في Business Console، ويكون `request_id` المُرجع معرّف جلسة حقيقياً يمكنك تمريره إلى `GET /v3/session/{sessionId}/decision/` (تُعرض النتيجة هناك في `liveness_checks[]`، مع `features: [\"AGE_ESTIMATION\"]`)، وتُخزن صورة الوجه المقصوصة والصورة المرجعية، ويُضاف تضمين الوجه إلى فهرس الوجوه الخاص بتطبيقك (المستخدم في البحث بالوجه واكتشاف التكرار)، ويتم إرسال حدث webhook من نوع `status.updated`. وعندما تكون القيمة `false`، لا يتم تخزين أي شيء ويكون `request_id` معرّف UUID لربط العمليات لمرة واحدة لا يمكن البحث عنه لاحقاً.\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية جميع عمليات المعالجة والفوترة: بعد التحقق من صحة الطلب (المدخلات غير الصحيحة لا تزال تُرجع `400`)، يُرجع الـ endpoint payload وهمياً ثابتاً بقيمة `Approved` (`age_estimation: 30`، دون تحذيرات)، ولا يتم حفظ أي جلسة، ولا يُستهلك أي رصيد.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة الرمز `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا يُرجع هذا الـ API أبداً الرمز `401`.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع الـ endpoints الخاصة بـ POST/PATCH/DELETE؛ وتجاوزها يُرجع `429`.",
        "operationId": "post_v3age-estimation",
        "x-didit-sdk": {
          "resource": "age_estimation",
          "method": "estimate",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "user_image"
                ],
                "properties": {
                  "user_image": {
                    "type": "string",
                    "format": "binary",
                    "description": "صورة الوجه المراد تحليلها (مثل صورة سيلفي). أرسل صورة أمامية واحدة يكون فيها وجه الشخص ظاهراً بوضوح ومضاءً جيداً. الامتدادات المسموح بها: `tiff`، `jpg`، `jpeg`، `png`، `webp` (لا يُسمح بملفات PDF). الحد الأقصى لحجم الرفع: **5 MB** (تُرفض الملفات الأكبر حجماً برمز `400`). تُضغط الصور تلقائياً إلى نحو 0.3 MB قبل المعالجة، لذا فإن الدقات العالية جداً لا تزيد من الدقة."
                  },
                  "face_liveness_score_decline_threshold": {
                    "type": "number",
                    "format": "float",
                    "default": 30,
                    "minimum": 0,
                    "maximum": 100,
                    "description": "حد كشف الحيوية (0–100). تضيف قيمة `score` الخاصة بكشف الحيوية التي تكون **عند أو أقل من** هذه القيمة تحذير `LOW_LIVENESS_SCORE` ويتم الرفض. ارفعها لمكافحة أكثر صرامة للانتحال؛ تُرجع القيم خارج النطاق 0–100 الخطأ `400`.",
                    "example": 30
                  },
                  "age_estimation_decline_threshold": {
                    "type": "integer",
                    "default": 18,
                    "minimum": 0,
                    "maximum": 100,
                    "description": "الحد الأدنى المقبول للعمر التقديري بالسنوات. العمر التقديري **الأقل** من هذه القيمة يضيف تحذير `AGE_BELOW_MINIMUM` ويؤدي إلى الرفض. عيّن `0` لتعطيل التحقق من العمر (يقوم الاستدعاء بعد ذلك بتشغيل كشف الحيوية + تقدير العمر فقط دون اتخاذ قرار بناءً على العمر).",
                    "example": 18
                  },
                  "rotate_image": {
                    "type": "boolean",
                    "default": false,
                    "description": "عندما تكون `true`، تجرب الخدمة صورة الإدخال بزيادات قدرها 90 درجة (0، 90، 180، 270) وتستخدم الاتجاه الذي يحقق أفضل كشف للوجه — مفيد للصور الملتقطة عبر الهاتف مع فقدان اتجاه EXIF. يضيف تأخيراً في الاستجابة، لذا لا تفعّله إلا إذا كنت لا تستطيع ضمان أن تكون الصور بالاتجاه الصحيح للأعلى.",
                    "example": false
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "عندما تكون القيمة `true` (الافتراضية)، يتم حفظ الاستدعاء كجلسة من نوع API — مرئية في Business Console، ويمكن استرجاعها عبر `GET /v3/session/{sessionId}/decision/` باستخدام `request_id` المُرجع، ويتم الإشعار بها عبر webhook لحدث `status.updated`، مع إضافة الوجه المكتشف إلى فهرس الوجوه لتطبيقك. عندما تكون القيمة `false`، لا يتم تخزين أي شيء ويكون `request_id` عبارة عن معرّف UUID مؤقت للربط بالاستجابة فقط.",
                    "example": true
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "سلسلة نصية مبهمة اختيارية (معرّف المستخدم الداخلي لديك، البريد الإلكتروني، UUID...) تُخزَّن في الجلسة المحفوظة وتُعاد في الاستجابة. استخدمها لربط استدعاءات API بسجلاتك الخاصة ولتصفية الجلسات لاحقاً.",
                    "example": "user-123"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "كائن JSON اختياري يُخزن مع الجلسة (عندما يكون `save_api_request=true`) ويُعاد في الاستجابة. في طلبات multipart، أرسله كحقل سلسلة نصية بترميز JSON (مثل `metadata={\"flow\":\"age-gate\"}`) — حيث يتم تحليله إلى كائن.",
                    "example": {
                      "flow": "age-gate"
                    }
                  }
                }
              },
              "example": {
                "user_image": "(binary JPEG/PNG of the selfie)",
                "face_liveness_score_decline_threshold": 30,
                "age_estimation_decline_threshold": 18,
                "rotate_image": false,
                "save_api_request": true,
                "vendor_data": "user-123",
                "metadata": {
                  "flow": "age-gate"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل تقدير العمر وكشف الحيوية السلبي. `age_estimation.age_estimation` هو العمر المتوقع بالسنوات من النموذج لأكبر وجه تم اكتشافه (`null` إذا لم يوجد)؛ و`age_estimation.score` هي درجة كشف الحيوية السلبي (0–100)؛ وتكون `status` بقيمة `Approved` فقط عندما يكون `warnings` فارغاً. تظل عمليات الالتقاط لقاصر أو محاولة انتحال تُرجع `200` مع `status: \"Declined\"` — تحقق من نص الاستجابة، وليس فقط رمز حالة HTTP. عندما تكون `save_api_request=true`، فإن `request_id` يكون معرّف الجلسة الدائمة.",
            "content": {
              "application/json": {
                "examples": {
                  "Approved": {
                    "summary": "وجه حي لشخص بالغ — تم اجتياز كلا الفحصين",
                    "value": {
                      "request_id": "0c40ba43-64ab-4e2e-b4b8-7d1f12f81bc1",
                      "age_estimation": {
                        "status": "Approved",
                        "method": "PASSIVE",
                        "score": 97.5,
                        "user_image": {
                          "entities": [
                            {
                              "age": 27.33,
                              "bbox": [
                                40,
                                40,
                                100,
                                100
                              ],
                              "confidence": 0.7177750468254089,
                              "gender": "male"
                            }
                          ],
                          "best_angle": 0
                        },
                        "age_estimation": 27.33,
                        "warnings": []
                      },
                      "vendor_data": "user-123",
                      "metadata": {
                        "flow": "age-gate"
                      },
                      "created_at": "2026-06-12T02:24:11.512941+00:00"
                    }
                  },
                  "Declined - age below threshold": {
                    "summary": "العمر التقديري أقل من `age_estimation_decline_threshold`",
                    "value": {
                      "request_id": "9be41a6f-2f4e-4f57-92f4-b3a4f6f0a1c2",
                      "age_estimation": {
                        "status": "Declined",
                        "method": "PASSIVE",
                        "score": 95.0,
                        "user_image": {
                          "entities": [
                            {
                              "age": 16.5,
                              "bbox": [
                                40,
                                40,
                                100,
                                100
                              ],
                              "confidence": 0.7177750468254089,
                              "gender": "female"
                            }
                          ],
                          "best_angle": 0
                        },
                        "age_estimation": 16.5,
                        "warnings": [
                          {
                            "risk": "AGE_BELOW_MINIMUM",
                            "feature": "LIVENESS",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Age below minimum",
                            "long_description": "The age of the face is below the minimum age threshold for the application."
                          }
                        ]
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T02:26:40.118332+00:00"
                    }
                  },
                  "Declined - liveness too low": {
                    "summary": "درجة كشف الحيوية عند أو أقل من حد الرفض (احتمال وجود انتحال)",
                    "value": {
                      "request_id": "5f6f2f1f-7c4f-43b9-8d62-0a8f4c2d9e77",
                      "age_estimation": {
                        "status": "Declined",
                        "method": "PASSIVE",
                        "score": 5.0,
                        "user_image": {
                          "entities": [
                            {
                              "age": 25.0,
                              "bbox": [
                                40,
                                40,
                                100,
                                100
                              ],
                              "confidence": 0.7177750468254089,
                              "gender": "male"
                            }
                          ],
                          "best_angle": 0
                        },
                        "age_estimation": 25.0,
                        "warnings": [
                          {
                            "risk": "LOW_LIVENESS_SCORE",
                            "feature": "LIVENESS",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Low liveness score",
                            "long_description": "The liveness check resulted in a low score, indicating potential use of non-live facial representations or poor-quality biometric data."
                          }
                        ]
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T02:27:02.901547+00:00"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة المحفوظة عندما تكون `save_api_request=true` (يمكن استخدامه مع `GET /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID ارتباط مؤقت."
                    },
                    "age_estimation": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "Approved",
                            "Declined"
                          ],
                          "description": "`Approved` عند عدم إطلاق أي تحذيرات؛ و`Declined` خلاف ذلك (كل تحذير يُنتجه هذا الـ endpoint يؤدي إلى الرفض)."
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "PASSIVE"
                          ],
                          "description": "طريقة كشف الحيوية. دائمًا `PASSIVE` في هذا الـ endpoint (صورة واحدة، دون تحدٍ للمستخدم)."
                        },
                        "score": {
                          "type": "number",
                          "format": "float",
                          "nullable": true,
                          "minimum": 0,
                          "maximum": 100,
                          "description": "درجة كشف الحيوية السلبي من 0 إلى 100 — ثقة النموذج في أن الصورة تُظهر شخصاً حقيقياً. تُقارن بـ `face_liveness_score_decline_threshold`؛ وإذا كانت مساوية له أو أقل منه، يُرفض الاستدعاء بـ `LOW_LIVENESS_SCORE`. تكون `null` عندما لا يُرجع نموذج كشف الحيوية أي درجة ثقة — ويظل الاستدعاء مرفوضاً بـ `LOW_LIVENESS_SCORE` لأن القيمة الفارغة (null) تُعامل معاملة 0 في مقارنة الحد الأدنى.",
                          "example": 97.5
                        },
                        "user_image": {
                          "type": "object",
                          "description": "نتائج كشف الوجه للصورة التي تم تحليلها.",
                          "properties": {
                            "entities": {
                              "type": "array",
                              "description": "إدخال واحد لكل وجه مكتشف. يكون فارغاً إذا لم يتم العثور على أي وجه (وعندئذٍ يكون `age_estimation` بقيمة `null` ويُضاف تحذير `AGE_NOT_DETECTED`).",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "age": {
                                    "type": "number",
                                    "format": "float",
                                    "description": "العمر المقدّر بالنموذج لهذا الوجه، بالسنوات.",
                                    "example": 27.33
                                  },
                                  "bbox": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer"
                                    },
                                    "minItems": 4,
                                    "maxItems": 4,
                                    "description": "المربع المحيط للوجه المكتشف كإحداثيات بكسل `[x_min, y_min, x_max, y_max]` في الصورة المُعالجة.",
                                    "example": [
                                      40,
                                      40,
                                      100,
                                      100
                                    ]
                                  },
                                  "confidence": {
                                    "type": "number",
                                    "format": "float",
                                    "minimum": 0,
                                    "maximum": 1,
                                    "description": "درجة الثقة في كشف الوجه (0–1).",
                                    "example": 0.7177750468254089
                                  },
                                  "gender": {
                                    "type": "string",
                                    "description": "الجنس المتوقع بالنموذج للوجه المكتشف (`male` أو `female`). لأغراض إعلامية فقط.",
                                    "example": "male"
                                  }
                                }
                              }
                            },
                            "best_angle": {
                              "type": "integer",
                              "nullable": true,
                              "description": "زاوية التدوير (بالدرجات: 0 أو 90 أو 180 أو 270) التي حققت أفضل كشف للوجه. تكون غير صفرية فقط عندما يصحح `rotate_image=true` الاتجاه.",
                              "example": 0
                            }
                          }
                        },
                        "age_estimation": {
                          "type": "number",
                          "format": "float",
                          "nullable": true,
                          "description": "العمر المتوقع بالنموذج بالسنوات للوجه المكتشف **الأكبر**. يكون `null` عندما يتعذر تقدير عمر الوجه (يُضاف تحذير `AGE_NOT_DETECTED` ويتم رفض الاستدعاء).",
                          "example": 27.33
                        },
                        "warnings": {
                          "type": "array",
                          "description": "فارغ عند الموافقة السليمة. يؤدي أي إدخال إلى تعيين `status` إلى `Declined`.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "risk": {
                                "type": "string",
                                "enum": [
                                  "NO_FACE_DETECTED",
                                  "LOW_LIVENESS_SCORE",
                                  "LIVENESS_FACE_ATTACK",
                                  "AGE_NOT_DETECTED",
                                  "AGE_BELOW_MINIMUM"
                                ],
                                "description": "رمز مخاطر مقروء آلياً. `NO_FACE_DETECTED` — لم يعثر نموذج كشف الحيوية على أي وجه؛ `LOW_LIVENESS_SCORE` — درجة (`score`) كشف الحيوية تساوي أو تقل عن `face_liveness_score_decline_threshold`؛ `LIVENESS_FACE_ATTACK` — تم رصد هجوم العرض (صورة/شاشة/قناع)؛ `AGE_NOT_DETECTED` — تعذر تقدير عمر الوجه؛ `AGE_BELOW_MINIMUM` — العمر المقدر أقل من `age_estimation_decline_threshold`. الرمزان `NO_FACE_DETECTED` و`LOW_LIVENESS_SCORE` متنافيان — عند عدم العثور على أي وجه يتم إصدار `NO_FACE_DETECTED` فقط."
                              },
                              "feature": {
                                "type": "string",
                                "enum": [
                                  "LIVENESS"
                                ],
                                "description": "الميزة التي أصدرت التحذير. دائماً `LIVENESS` في هذا الـ endpoint."
                              },
                              "additional_data": {
                                "type": "object",
                                "nullable": true,
                                "additionalProperties": true,
                                "description": "دائماً `null` للتحذيرات الخاصة بتقدير العمر."
                              },
                              "log_type": {
                                "type": "string",
                                "enum": [
                                  "error"
                                ],
                                "description": "مستوى الخطورة. كل تحذير ينتجه هذا الـ endpoint يُعد `error` ويضبط `status` على `Declined`."
                              },
                              "short_description": {
                                "type": "string",
                                "description": "ملخص للمخاطر في سطر واحد مقروء للبشر."
                              },
                              "long_description": {
                                "type": "string",
                                "description": "تفسير سهل القراءة للمخاطر."
                              }
                            }
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، أو `null`."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "نسخة مطابقة من كائن `metadata` الذي أرسلته، أو `null`."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "طابع زمني بتنسيق ISO 8601 (بالتوقيت العالمي المنسق UTC) لوقت إنشاء الاستجابة."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. يتم إرجاعه عندما تكون `user_image` مفقودة، أو يتجاوز حجمها 5 MB، أو يكون امتدادها غير مدعوم، أو عندما يكون الحد خارج النطاق. يكون نص الاستجابة هو غلاف أخطاء الحقول القياسي لـ DRF: مصفوفة واحدة من الرسائل لكل حقل مخالف.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing user image": {
                    "summary": "لم يتم تضمين `user_image` في بيانات النموذج",
                    "value": {
                      "user_image": [
                        "No file was submitted."
                      ]
                    }
                  },
                  "Unsupported file extension": {
                    "summary": "امتداد الملف خارج tiff/jpg/jpeg/png/webp",
                    "value": {
                      "user_image": [
                        "File extension “txt” is not allowed. Allowed extensions are: tiff, jpg, jpeg, png, webp."
                      ]
                    }
                  },
                  "File too large": {
                    "summary": "يتجاوز الملف المرفوع حد 5 ميجابايت",
                    "value": {
                      "user_image": [
                        "File size should not exceed 5 MB"
                      ]
                    }
                  },
                  "Threshold out of range": {
                    "summary": "`face_liveness_score_decline_threshold` خارج النطاق 0–100",
                    "value": {
                      "face_liveness_score_decline_threshold": [
                        "Ensure this value is less than or equal to 100."
                      ]
                    }
                  }
                }
              }
            }
          },
          "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/age-estimation/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'user_image=@./selfie.jpg' \\\n  -F 'age_estimation_decline_threshold=18' \\\n  -F 'face_liveness_score_decline_threshold=30' \\\n  -F 'save_api_request=true' \\\n  -F 'vendor_data=user-123'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.age_estimation.estimate(\n    user_image=open(\"user_image.jpg\", \"rb\"),\n    face_liveness_score_decline_threshold=30.0,\n    age_estimation_decline_threshold=18,\n    rotate_image=False,\n    save_api_request=True,\n    vendor_data=\"user-123\",\n    metadata={\"flow\": \"age-gate\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.ageEstimation.estimate({\n  user_image: await fileFromPath(\"user_image.jpg\"),\n  face_liveness_score_decline_threshold: 30.0,\n  age_estimation_decline_threshold: 18,\n  rotate_image: false,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"age-gate\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AgeEstimation.Estimate(ctx, didit.AgeEstimationEstimateParams{\n\tUserImage:                         didit.FileFromPath(\"user_image.jpg\"),\n\tFaceLivenessScoreDeclineThreshold: didit.Float(30.0),\n\tAgeEstimationDeclineThreshold:     didit.Int(18),\n\tRotateImage:                       didit.Bool(false),\n\tSaveAPIRequest:                    didit.Bool(true),\n\tVendorData:                        didit.String(\"user-123\"),\n\tMetadata:                          didit.Some(map[string]any{\"flow\": \"age-gate\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.AgeEstimationEstimateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.ageEstimation().estimate(AgeEstimationEstimateParams.builder()\n        .userImage(Path.of(\"user_image.jpg\"))\n        .faceLivenessScoreDeclineThreshold(30.0)\n        .ageEstimationDeclineThreshold(18L)\n        .rotateImage(false)\n        .saveApiRequest(true)\n        .vendorData(\"user-123\")\n        .metadata(Map.of(\"flow\", \"age-gate\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->ageEstimation->estimate([\n    'user_image' => File::fromPath('user_image.jpg'),\n    'face_liveness_score_decline_threshold' => 30.0,\n    'age_estimation_decline_threshold' => 18,\n    'rotate_image' => false,\n    'save_api_request' => true,\n    'vendor_data' => 'user-123',\n    'metadata' => ['flow' => 'age-gate'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.age_estimation.estimate(\n  user_image: Pathname(\"user_image.jpg\"),\n  face_liveness_score_decline_threshold: 30.0,\n  age_estimation_decline_threshold: 18,\n  rotate_image: false,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"age-gate\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.AgeEstimation.EstimateAsync(new AgeEstimationEstimateParams\n{\n    UserImage = FileUpload.FromPath(\"user_image.jpg\"),\n    FaceLivenessScoreDeclineThreshold = 30.0,\n    AgeEstimationDeclineThreshold = 18,\n    RotateImage = false,\n    SaveApiRequest = true,\n    VendorData = \"user-123\",\n    Metadata = new Dictionary<string, object> { [\"flow\"] = \"age-gate\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/poa/": {
      "post": {
        "summary": "إثبات العنوان (OCR للمستند + عمليات التحقق من العنوان)",
        "description": "استخراج والتحقق من مستند إثبات العنوان — فواتير المرافق، وكشوف الحسابات البنكية، والمستندات الصادرة عن الجهات الحكومية — في استدعاء واحد. يُرجع جهة الإصدار، وتواريخ الإصدار/الانتهاء، واسم حامل المستند، والعنوان بصيغته الأولية والمعالجة/المحددة جغرافياً، و`status` بقيمة `Approved`/`Declined`، وقائمة `warnings` توضح كل مشكلة تم العثور عليها.\n\n**زمن الاستجابة.** يعتمد الاستخراج على نماذج LLM: تستغرق الاستدعاءات النموذجية **5–15 ثانية**، وملفات PDF متعددة الصفحات حتى **~30 ثانية**. قم بتكوين مهلة العميل لتكون **45 ثانية على الأقل** ولا تقم بإعادة المحاولة قبل اكتمال الاستدعاء.\n\n**آلية العمل.** يتم تصنيف المستند (صورة أو PDF، حتى 15 MB؛ تتطلب ملفات PDF المشفرة `document_password`) إلى نوع مستند ونوع فرعي (مثل `UTILITY_BILL` / `WATER_BILL`)، ويتم استخراج جهة الإصدار، والتواريخ، واسم حامل المستند، والعنوان باستخدام استخراج يعتمد على نماذج LLM. تتم معالجة العنوان وتحديده جغرافياً في `poa_parsed_address`. يقوم الفحص الجنائي لملفات PDF/EXIF بالتحقق من التلاعب — التعديل بعد التوقيع الرقمي، ومحررات PDF المعروفة، والتلاعب بالنصوص المتراكبة، وعمليات إعادة التصدير المشبوهة — مما يظهر `SUSPECTED_DOCUMENT_MANIPULATION` أو `DOCUMENT_METADATA_MISMATCH`. حقل النص الذي تم إفراغه وإعادة كتابته بخط آخر، حيث لا يحتوي الملف نفسه على دليل يثبت ما إذا كان محتواه قد تغير، يظهر `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT`. يتم التحقق من عمر المستند مقارنة بـ `poa_document_age_months`، واللغة مقارنة بـ `poa_languages_allowed`. إذا قمت بتمرير `expected_address`، أو `expected_country`، أو `expected_first_name`/`expected_last_name`، تتم مطابقة القيم المستخرجة ووضع علامات على أي عدم تطابق.\n\n**منطق القرار.** تكون `status` هي `Approved` ما لم تؤدِ إحدى التحذيرات على الأقل إلى الرفض. تؤدي حالات الفشل الصريحة دائماً إلى الرفض: `MISSING_ADDRESS_INFORMATION`، و`POA_DOCUMENT_EXPIRED`، و`INVALID_DOCUMENT_TYPE`، و`UNABLE_TO_VALIDATE_DOCUMENT_AGE`، بالإضافة إلى `UNABLE_TO_EXTRACT_ISSUE_DATE` و`POA_NAME_NOT_DETECTED` (غير قابلة للتكوين في هذا الـ endpoint). تتوفر خمس مجموعات مخاطر قابلة للتكوين لكل طلب عبر خيارات `poa_*_action` (`DECLINE` أو `NO_ACTION`، وجميعها مضبوطة افتراضياً على `DECLINE`). يُعد `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION` و`UNPARSABLE_OR_INVALID_ADDRESS` تحذيرات إعلامية في هذا الـ endpoint ولا تؤدي إلى الرفض أبداً. المستند الذي لا يمكن معالجته على الإطلاق يُرجع `400`؛ بينما يُرجع الـ endpoint للمستند المقروء ذي المشكلات الرمز `200` مع `status: \"Declined\"` — تحقق دائماً من `poa.status` و`poa.warnings`، وليس فقط رمز استجابة HTTP.\n\n**الفوترة.** يستهلك كل رد `200` رصيد API واحد لإثبات العنوان (يُدفع من رصيد خطتك أو رصيد شحن الرصيد). عندما لا يتمكن رصيد المؤسسة من تغطية الاستدعاء، يُرجع الـ endpoint الرمز `403` مع خطأ عدم كفاية الرصيد قبل معالجة أي مستند.\n\n**حفظ الجلسة (`save_api_request`، القيمة الافتراضية `true`).** عند ضبطه على `true`، يتم حفظ الاستدعاء كجلسة من نوع API: يظهر في Business Console، ويتم تخزين المستند المرفوع، ويكون `request_id` المُرجع هو معرف جلسة حقيقي يمكنك تمريره إلى `GET /v3/session/{sessionId}/decision/` (يعرض القرار بالإضافة إلى ذلك `document_file` والفحص الجنائي في `document_metadata`، والذي لا تتضمنه هذه الاستجابة)، ويتم إرسال حدث webhook باسم `status.updated`. عند ضبطه على `false`، لا يتم تخزين أي شيء ويكون `request_id` عبارة عن UUID ارتباط يُستخدم لمرة واحدة ولا يمكن البحث عنه لاحقاً.\n\n**البيئة التجريبية.** تتخطى مفاتيح API في البيئة التجريبية جميع عمليات المعالجة والفوترة: بعد التحقق من صحة الطلب (تظل المدخلات غير الصالحة تُرجع `400`)، يُرجع الـ endpoint نموذج payload وهمي وثابت بقيمة `Approved` (فاتورة كهرباء خيالية لشركة \"Sandbox Power Co.\")، ولا يتم حفظ أي جلسة، ولا يُستهلك أي رصيد.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا تُرجع واجهة API هذه الرمز `401` أبداً.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE؛ وتجاوزها يُرجع `429`.\n\nملاحظة: يوجد `FUTURE_ISSUE_DATE` و`POOR_DOCUMENT_QUALITY` في جلسات سير العمل، ولكن لا يتم إنتاجهما أبداً بواسطة هذا الـ endpoint المستقل — لا يتم رفض المستند ذي التاريخ المستقبلي تلقائياً هنا.",
        "operationId": "post_v3poa",
        "x-didit-sdk": {
          "resource": "proof_of_address",
          "method": "verify",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "document"
                ],
                "properties": {
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "مستند إثبات العنوان. الامتدادات المسموح بها: `tiff`، و`jpg`، و`jpeg`، و`png`، و`pdf`، و`webp`. الحد الأقصى لحجم الرفع: **15 MB** (يتم رفض الملفات الأكبر حجماً بالرمز `400`). ملفات PDF متعددة الصفحات مدعومة (توقع استجابة أبطأ)؛ وتتطلب ملفات PDF المشفرة `document_password`. يتم ضغط الصور تلقائياً قبل معالجتها."
                  },
                  "document_password": {
                    "type": "string",
                    "description": "كلمة المرور لفك تشفير `document` عندما يكون ملف PDF مشفراً. إرسال ملف PDF مشفر بدون كلمة مرور (أو بكلمة مرور خاطئة) يُرجع الرمز `400`.",
                    "writeOnly": true
                  },
                  "expected_address": {
                    "type": "string",
                    "description": "العنوان المراد التحقق منه مقابل المستند. يتم تحديد موقعه الجغرافي ومقارنته بالعنوان المستخرج؛ وأي عدم تطابق (أو عنوان متوقع يتعذر تحديد موقعه الجغرافي/التحقق منه) يضيف `ADDRESS_MISMATCH_WITH_PROVIDED`، الخاضع لـ `poa_address_mismatch_action`. وتتم إعادة إرسال الصيغة المحددة جغرافياً في `expected_details_formatted_address` / `expected_details_parsed_address`.",
                    "example": "Av. Monseñor Tavella 1291, Salta, Argentina"
                  },
                  "expected_country": {
                    "type": "string",
                    "description": "الدولة المراد التحقق منها مقابل المستند (رمز ISO 3166-1، مثل `ARG` أو `AR`). يضيف عدم التطابق مع دولة المستند `POA_COUNTRY_MISMATCH_WITH_PROVIDED`، وتتحكم به `poa_address_mismatch_action`.",
                    "example": "ARG"
                  },
                  "expected_first_name": {
                    "type": "string",
                    "description": "الاسم الأول للتحقق منه ومطابقته مع `name_on_document` (مطابقة تقريبية، تأخذ في الاعتبار الترجمة الصوتية). الدرجة الأقل من حد المطابقة تضيف `NAME_MISMATCH_WITH_PROVIDED`، وتخضع لـ `poa_address_mismatch_action`.",
                    "example": "Sophia"
                  },
                  "expected_last_name": {
                    "type": "string",
                    "description": "اسم العائلة للتحقق منه مقابل `name_on_document`، مدمجاً مع `expected_first_name` لاحتساب درجة التطابق.",
                    "example": "Martinez"
                  },
                  "poa_languages_allowed": {
                    "type": "string",
                    "description": "قائمة مفصولة بفواصل بلغات المستندات المقبولة كرموز ISO 639-1 (مثل `en,es,fr`). عند إغفالها أو تركها فارغة، يتم قبول **جميع اللغات المدعومة البالغ عددها 51 لغة**. يضيف المستند المكتوب بلغة خارج القائمة `UNSUPPORTED_DOCUMENT_LANGUAGE` (تخضع لـ `poa_unsupported_language_action`)؛ ويعيد الرمز غير المعروف في القائمة `400` مع المجموعة الكاملة من الرموز المدعومة.",
                    "example": "en,es"
                  },
                  "poa_document_age_months": {
                    "type": "string",
                    "description": "أزواج `key:value` مفصولة بفواصل تحدد الحد الأقصى لعمر المستند بالأشهر لكل نوع مستند — المفاتيح: `utility_bill`، `bank_statement`، `government_issued_document`، `other_poa_document`؛ القيم: من `1` إلى `120`، أو `-1` لغير محدود (بدون فحص العمر). القيم الافتراضية عند الإغفال: `utility_bill:3,bank_statement:3,government_issued_document:12,other_poa_document:12`. يُرفض المستند الأقدم من حده مع `POA_DOCUMENT_EXPIRED`. **تنبيه:** عند تقديم هذا الحقل، اذكر *كل* نوع تقبله — يتم التعامل مع الأنواع المُغفلة على أنها غير مقبولة (إشعار `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION`) ويتم تخطي فحص العمر الخاص بها.",
                    "example": "utility_bill:3,bank_statement:6"
                  },
                  "poa_name_mismatch_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "مقبول ولكن **لا يتم تطبيقه حاليًا** — تتبع تحذيرات عدم تطابق الأسماء (`NAME_MISMATCH_WITH_PROVIDED`) الإجراء `poa_address_mismatch_action` بدلاً من ذلك. قم بتعيين `poa_address_mismatch_action` للتحكم في سلوك عدم تطابق كل من الاسم والعنوان."
                  },
                  "poa_document_issues_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتبع عند وجود مشكلات في سلامة الملف — عملياً ينتج فقط `DOCUMENT_METADATA_MISMATCH` عن هذا الـ endpoint."
                  },
                  "poa_document_authenticity_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتبع عند الاشتباه في تلاعب بالمستند (`SUSPECTED_DOCUMENT_MANIPULATION`) — كأن يتم تعديل ملف PDF بعد التوقيع الرقمي، أو معالجته بمحرر PDF معروف، أو إظهار تلاعب بنصوص متراكبة، أو وجود تواريخ EXIF غير متسقة. يحكم أيضاً `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` (حقل نصي أعيدت كتابته ولا يمكن للملف إثبات تغييره أو عدمه): `DECLINE` يرفضه أيضاً، و`NO_ACTION` يبقيه كتحذير."
                  },
                  "poa_unsupported_language_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتخذ عندما تكون لغة المستند خارج `poa_languages_allowed` (`UNSUPPORTED_DOCUMENT_LANGUAGE`)."
                  },
                  "poa_address_mismatch_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتخذ عندما تتعارض التفاصيل المستخرجة مع حقول `expected_*`: تتبع جميع حالات `ADDRESS_MISMATCH_WITH_PROVIDED` و`NAME_MISMATCH_WITH_PROVIDED` و`POA_COUNTRY_MISMATCH_WITH_PROVIDED` هذا الإجراء."
                  },
                  "poa_issuer_not_identified_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتبع عند تعذر تحديد الشركة/المؤسسة المصدرة على المستند (`ISSUER_NOT_IDENTIFIED`)."
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "عندما تكون القيمة `true` (الافتراضية)، يتم حفظ الاستدعاء كجلسة من نوع API — مرئية في Business Console، ويمكن استرجاعها عبر `GET /v3/session/{sessionId}/decision/` باستخدام `request_id` المُرجع، ويتم الإشعار بها عبر webhook لحدث `status.updated`، مع تخزين المستند المرفوع. عندما تكون القيمة `false`، لا يتم تخزين أي شيء ويكون `request_id` عبارة عن معرّف UUID مؤقت للربط بالاستجابة فقط.",
                    "example": true
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "سلسلة نصية مبهمة اختيارية (معرّف المستخدم الداخلي لديك، البريد الإلكتروني، UUID...) تُخزَّن في الجلسة المحفوظة وتُعاد في الاستجابة. استخدمها لربط استدعاءات API بسجلاتك الخاصة ولتصفية الجلسات لاحقاً.",
                    "example": "user-123"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "كائن JSON اختياري يُخزن مع الجلسة (عندما يكون `save_api_request=true`) ويُعاد في الاستجابة. في طلبات multipart، أرسله كحقل سلسلة نصية بترميز JSON (مثل `metadata={\"flow\":\"onboarding\"}`) — حيث يتم تحليله إلى كائن.",
                    "example": {
                      "flow": "onboarding"
                    }
                  }
                }
              },
              "example": {
                "document": "(binary JPEG/PNG/PDF of the utility bill or bank statement)",
                "expected_address": "Av. Monseñor Tavella 1291, Salta, Argentina",
                "expected_country": "ARG",
                "expected_first_name": "Sophia",
                "expected_last_name": "Martinez",
                "poa_languages_allowed": "en,es",
                "save_api_request": true,
                "vendor_data": "user-123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تمت معالجة المستند. تكون قيمة `poa.status` إما `Approved` أو `Declined`؛ وتُفصّل كل مشكلة تم اكتشافها في `poa.warnings`. المستند منتهي الصلاحية أو غير المتطابق أو المشبوه سيظل يُرجع `200` مع `status: \"Declined\"` — افحص نص الاستجابة، وليس فقط رمز HTTP. عندما تكون `save_api_request=true`، يكون `request_id` هو معرّف الجلسة المحفوظ.",
            "content": {
              "application/json": {
                "examples": {
                  "Approved": {
                    "summary": "تمت قراءة فاتورة المرافق بوضوح، بدون فحوصات للتفاصيل المتوقعة",
                    "value": {
                      "request_id": "4b523a8d-ed32-45e4-8aa8-a89eda459d88",
                      "poa": {
                        "issuing_state": "ARG",
                        "document_type": "UTILITY_BILL",
                        "document_subtype": "WATER_BILL",
                        "document_language": "es",
                        "issuer": "Aguas del Norte",
                        "issue_date": "2026-04-10",
                        "expiration_date": null,
                        "poa_address": "AVDA. MONSEÑOR TAVELLA N° 1291, B° VILLA LAVALLE CP: 4400, CAPITAL - SALTA",
                        "poa_formatted_address": "Av. Monseñor Tavella 1291 b, A4400 Salta, Argentina",
                        "poa_parsed_address": {
                          "street_1": "Avenida Monseñor Tavella 1291",
                          "street_2": "b",
                          "city": "Salta",
                          "region": "Salta",
                          "country": "AR",
                          "postal_code": "A4400",
                          "document_location": {
                            "latitude": -24.8208682,
                            "longitude": -65.4130954
                          }
                        },
                        "expected_details_address": null,
                        "expected_details_formatted_address": null,
                        "expected_details_parsed_address": null,
                        "name_on_document": "OESTE EMBOTELLADORA S.A.",
                        "extra_fields": {
                          "bank_account_number": null,
                          "bank_iban": null,
                          "bank_sort_code": null,
                          "bank_routing_number": null,
                          "bank_swift_bic": null,
                          "bank_branch_name": null,
                          "bank_branch_address": null,
                          "document_phone_number": null,
                          "additional_names": [
                            "LA EMBOTELLADORA DEL NORTE SA"
                          ]
                        },
                        "detected_codes": [
                          {
                            "type": "QR_CODE",
                            "page_number": 1,
                            "position": [
                              [
                                820,
                                1120
                              ],
                              [
                                1002,
                                1120
                              ],
                              [
                                1002,
                                1302
                              ],
                              [
                                820,
                                1302
                              ]
                            ],
                            "x": 820,
                            "y": 1120,
                            "width": 182,
                            "height": 182,
                            "page_width": 1190,
                            "page_height": 1684,
                            "raw_payload": "aHR0cHM6Ly9hZ3Vhc2RlbG5vcnRlLmNvbS9mYWN0dXJhLzk5ODgxMQ==",
                            "parsed_payload": "https://aguasdelnorte.com/factura/998811"
                          },
                          {
                            "type": "CODE_128",
                            "page_number": 1,
                            "position": [
                              [
                                112,
                                1480
                              ],
                              [
                                560,
                                1480
                              ],
                              [
                                560,
                                1540
                              ],
                              [
                                112,
                                1540
                              ]
                            ],
                            "x": 112,
                            "y": 1480,
                            "width": 448,
                            "height": 60,
                            "page_width": 1190,
                            "page_height": 1684,
                            "raw_payload": "MDA5OTg4MTEwMDA0Mg==",
                            "parsed_payload": "0099881100042"
                          }
                        ],
                        "status": "Approved",
                        "warnings": []
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T02:29:02.439655+00:00"
                    }
                  },
                  "Declined - document too old": {
                    "summary": "تاريخ الإصدار أقدم من `poa_document_age_months` المسموح به",
                    "value": {
                      "request_id": "f61681b8-9422-4378-ac3e-04c6a247fb45",
                      "poa": {
                        "issuing_state": "ARG",
                        "document_type": "UTILITY_BILL",
                        "document_subtype": "WATER_BILL",
                        "document_language": "es",
                        "issuer": "Aguas del Norte",
                        "issue_date": "2021-02-10",
                        "expiration_date": null,
                        "poa_address": "AVDA. MONSEÑOR TAVELLA N° 1291, B° VILLA LAVALLE CP: 4400, CAPITAL - SALTA",
                        "poa_formatted_address": "Av. Monseñor Tavella 1291 b, A4400 Salta, Argentina",
                        "poa_parsed_address": {
                          "street_1": "Avenida Monseñor Tavella 1291",
                          "street_2": "b",
                          "city": "Salta",
                          "region": "Salta",
                          "country": "AR",
                          "postal_code": "A4400",
                          "document_location": {
                            "latitude": -24.8208682,
                            "longitude": -65.4130954
                          }
                        },
                        "expected_details_address": null,
                        "expected_details_formatted_address": null,
                        "expected_details_parsed_address": null,
                        "name_on_document": "OESTE EMBOTELLADORA S.A.",
                        "extra_fields": {
                          "bank_account_number": null,
                          "bank_iban": null,
                          "bank_sort_code": null,
                          "bank_routing_number": null,
                          "bank_swift_bic": null,
                          "bank_branch_name": null,
                          "bank_branch_address": null,
                          "document_phone_number": null,
                          "additional_names": [
                            "LA EMBOTELLADORA DEL NORTE SA"
                          ]
                        },
                        "status": "Declined",
                        "warnings": [
                          {
                            "risk": "POA_DOCUMENT_EXPIRED",
                            "feature": "PROOF_OF_ADDRESS",
                            "additional_data": {
                              "expiration_reason": "age_window",
                              "max_age_months": 3,
                              "document_subtype": "WATER_BILL",
                              "document_type": "UTILITY_BILL",
                              "issue_date": "2021-02-10"
                            },
                            "log_type": "error",
                            "short_description": "Document expired",
                            "long_description": "The submitted document is older than the maximum accepted age of 3 months from its issue date, which exceeds the acceptable time period for validity."
                          }
                        ]
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T02:23:02.165493+00:00"
                    }
                  },
                  "Declined - name mismatch": {
                    "summary": "`expected_first_name`/`expected_last_name` لا يتطابقان مع `name_on_document`",
                    "value": {
                      "request_id": "0a7f2f9c-58f1-4b8e-b1e3-2f6f9d4f7a21",
                      "poa": {
                        "issuing_state": "ARG",
                        "document_type": "UTILITY_BILL",
                        "document_subtype": "WATER_BILL",
                        "document_language": "es",
                        "issuer": "Aguas del Norte",
                        "issue_date": "2021-02-10",
                        "expiration_date": null,
                        "poa_address": "AVDA. MONSEÑOR TAVELLA N° 1291, B° VILLA LAVALLE CP: 4400, CAPITAL - SALTA",
                        "poa_formatted_address": "Av. Monseñor Tavella 1291 b, A4400 Salta, Argentina",
                        "poa_parsed_address": {
                          "street_1": "Avenida Monseñor Tavella 1291",
                          "street_2": "b",
                          "city": "Salta",
                          "region": "Salta",
                          "country": "AR",
                          "postal_code": "A4400",
                          "document_location": {
                            "latitude": -24.8208682,
                            "longitude": -65.4130954
                          }
                        },
                        "expected_details_address": null,
                        "expected_details_formatted_address": null,
                        "expected_details_parsed_address": null,
                        "name_on_document": "OESTE EMBOTELLADORA S.A.",
                        "extra_fields": {
                          "bank_account_number": null,
                          "bank_iban": null,
                          "bank_sort_code": null,
                          "bank_routing_number": null,
                          "bank_swift_bic": null,
                          "bank_branch_name": null,
                          "bank_branch_address": null,
                          "document_phone_number": null,
                          "additional_names": [
                            "LA EMBOTELLADORA DEL NORTE SA"
                          ]
                        },
                        "status": "Declined",
                        "warnings": [
                          {
                            "risk": "NAME_MISMATCH_WITH_PROVIDED",
                            "feature": "PROOF_OF_ADDRESS",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Name mismatch with provided information",
                            "long_description": "The full name on the document does not match the name from the user's verified identity documents, or the full name sent by API."
                          }
                        ]
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T02:27:21.330172+00:00"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة المحفوظة عندما تكون `save_api_request=true` (يمكن استخدامه مع `GET /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID ارتباط مؤقت."
                    },
                    "poa": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "Approved",
                            "Declined"
                          ],
                          "description": "`Approved` عندما لا يؤدي أي تحذير إلى الرفض؛ و`Declined` خلاف ذلك — توضح قائمة `warnings` السبب."
                        },
                        "issuing_state": {
                          "type": "string",
                          "nullable": true,
                          "description": "الدولة التي صدر فيها المستند، كما تم استخراجها من المستند — عادةً ISO 3166-1 alpha-3 (مثل `ARG`).",
                          "example": "ARG"
                        },
                        "document_type": {
                          "type": "string",
                          "enum": [
                            "UTILITY_BILL",
                            "BANK_STATEMENT",
                            "GOVERNMENT_ISSUED_DOCUMENT",
                            "OTHER_POA_DOCUMENT",
                            "UNKNOWN"
                          ],
                          "description": "فئة المستند المكتشفة. تعني `UNKNOWN` أنه تعذر تصنيف المستند كإثبات العنوان المقبول ويتم الرفض تلقائياً مع `INVALID_DOCUMENT_TYPE`. لا تكون null أبداً — ترجع إخفاقات التصنيف إلى `UNKNOWN`."
                        },
                        "document_subtype": {
                          "type": "string",
                          "description": "تصنيف أكثر دقة وتفصيلاً ضمن `document_type` — مثل `ELECTRICITY_BILL`، و`WATER_BILL`، و`GAS_BILL`، و`INTERNET_BILL`، و`PHONE_BILL` (فواتير المرافق)؛ و`ACCOUNT_STATEMENT`، و`CREDIT_CARD_STATEMENT` (كشوف الحسابات المصرفية)؛ و`TAX_ASSESSMENT`، و`RESIDENCY_CERTIFICATE` (المستندات الحكومية). وتكون `UNKNOWN` عندما يتعذر تحديد أي نوع فرعي. لا تكون null أبداً — إذ تعود حالات فشل التصنيف تلقائياً إلى `UNKNOWN`.",
                          "example": "WATER_BILL"
                        },
                        "document_language": {
                          "type": "string",
                          "nullable": true,
                          "description": "لغة المستند المكتشفة (ISO 639-1).",
                          "example": "es"
                        },
                        "issuer": {
                          "type": "string",
                          "nullable": true,
                          "description": "الشركة أو المؤسسة التي أصدرت المستند. تضيف القيمة `null`‏ `ISSUER_NOT_IDENTIFIED`.",
                          "example": "Aguas del Norte"
                        },
                        "issue_date": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "description": "تاريخ إصدار المستند (`YYYY-MM-DD`). القيمة `null` عند تعذر استخراجه — مما يؤدي إلى الرفض مع `UNABLE_TO_EXTRACT_ISSUE_DATE` في هذا الـ endpoint.",
                          "example": "2021-02-10"
                        },
                        "expiration_date": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "description": "تاريخ الانتهاء/الصلاحية الصريح المطبوع على المستند، إن وجد. مستقل عن فحص عمر المستند `poa_document_age_months`."
                        },
                        "poa_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "العنوان تماماً كما هو مطبوع على المستند. تؤدي القيمة `null` إلى الرفض التلقائي مع `MISSING_ADDRESS_INFORMATION`."
                        },
                        "poa_formatted_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "نسخة محددة جغرافياً وموحدة من `poa_address`.",
                          "example": "Av. Monseñor Tavella 1291 b, A4400 Salta, Argentina"
                        },
                        "poa_parsed_address": {
                          "type": "object",
                          "nullable": true,
                          "description": "تفصيل مهيكل ومحدد جغرافياً لعنوان المستند. تكون قيمته `null` عندما يتعذر تحليل العنوان.",
                          "properties": {
                            "street_1": {
                              "type": "string",
                              "nullable": true,
                              "example": "Avenida Monseñor Tavella 1291"
                            },
                            "street_2": {
                              "type": "string",
                              "nullable": true
                            },
                            "city": {
                              "type": "string",
                              "nullable": true,
                              "example": "Salta"
                            },
                            "region": {
                              "type": "string",
                              "nullable": true,
                              "example": "Salta"
                            },
                            "country": {
                              "type": "string",
                              "nullable": true,
                              "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2.",
                              "example": "AR"
                            },
                            "postal_code": {
                              "type": "string",
                              "nullable": true,
                              "example": "A4400"
                            },
                            "document_location": {
                              "type": "object",
                              "nullable": true,
                              "properties": {
                                "latitude": {
                                  "type": "number"
                                },
                                "longitude": {
                                  "type": "number"
                                }
                              },
                              "description": "الإحداثيات الجغرافية لعنوان المستند."
                            }
                          }
                        },
                        "expected_details_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "نسخة مطابقة من `expected_address` الذي أرسلته، أو `null`."
                        },
                        "expected_details_formatted_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "النسخة المحددة جغرافياً والموحدة من `expected_address`؛ وتكون `null` عند عدم تقديمها أو تعذر تحديدها جغرافياً."
                        },
                        "expected_details_parsed_address": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": true,
                          "description": "نتيجة التحديد الجغرافي الكاملة لـ `expected_address` (الشارع/المدينة/المنطقة/الدولة/الرمز البريدي بالإضافة إلى مخرجات أداة التحديد الجغرافي الخام وعلامة `is_verified`). تكون `null` عند عدم تقديم `expected_address`."
                        },
                        "name_on_document": {
                          "type": "string",
                          "nullable": true,
                          "description": "اسم حامل المستند الأساسي المستخرج من المستند؛ يُقارن مع `expected_first_name`/`expected_last_name` عند توفيرهما. تؤدي القيمة `null` إلى الرفض بالرمز `POA_NAME_NOT_DETECTED` في هذا الـ endpoint.",
                          "example": "OESTE EMBOTELLADORA S.A."
                        },
                        "extra_fields": {
                          "type": "object",
                          "description": "بيانات إضافية خاصة بالمستند. يتم ملء الحقول المصرفية لكشوف الحسابات المصرفية عند ظهورها مطبوعةً على المستند؛ وتكون `null` بخلاف ذلك.",
                          "properties": {
                            "bank_account_number": {
                              "type": "string",
                              "nullable": true
                            },
                            "bank_iban": {
                              "type": "string",
                              "nullable": true
                            },
                            "bank_sort_code": {
                              "type": "string",
                              "nullable": true
                            },
                            "bank_routing_number": {
                              "type": "string",
                              "nullable": true
                            },
                            "bank_swift_bic": {
                              "type": "string",
                              "nullable": true
                            },
                            "bank_branch_name": {
                              "type": "string",
                              "nullable": true
                            },
                            "bank_branch_address": {
                              "type": "string",
                              "nullable": true
                            },
                            "document_phone_number": {
                              "type": "string",
                              "nullable": true,
                              "description": "رقم هاتف التواصل المطبوع على المستند."
                            },
                            "additional_names": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "أسماء الحاملين الآخرين الموجودة في المستند (مثل أصحاب الحسابات المشتركة، أسماء الحسابات السابقة)."
                            }
                          }
                        },
                        "warnings": {
                          "type": "array",
                          "description": "فارغ عند الموافقة السليمة. يوضح كل إدخال خطراً واحداً تم اكتشافه؛ تُعيّن الإدخالات ذات `log_type: \"error\"` الـ `status` إلى `Declined`.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "risk": {
                                "type": "string",
                                "description": "رمز مخاطر مقروء آلياً. مخاطر تؤدي دائماً إلى الرفض: `MISSING_ADDRESS_INFORMATION`، و`POA_DOCUMENT_EXPIRED`، و`INVALID_DOCUMENT_TYPE`، و`UNABLE_TO_VALIDATE_DOCUMENT_AGE`، بالإضافة إلى `UNABLE_TO_EXTRACT_ISSUE_DATE` و`POA_NAME_NOT_DETECTED` (محددة مسبقاً للرفض في هذا الـ endpoint). تحكمها خيارات الطلب: `NAME_MISMATCH_WITH_PROVIDED` / `ADDRESS_MISMATCH_WITH_PROVIDED` / `POA_COUNTRY_MISMATCH_WITH_PROVIDED` (`poa_address_mismatch_action`)، و`POOR_DOCUMENT_QUALITY` (لا يصدر عن هذا الـ endpoint أبداً) / `DOCUMENT_METADATA_MISMATCH` (`poa_document_issues_action`)، و`SUSPECTED_DOCUMENT_MANIPULATION` و`POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` (`poa_document_authenticity_action`)، و`UNSUPPORTED_DOCUMENT_LANGUAGE` (`poa_unsupported_language_action`)، و`ISSUER_NOT_IDENTIFIED` (`poa_issuer_not_identified_action`). مخاطر معلوماتية في هذا الـ endpoint: `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION`، و`UNPARSABLE_OR_INVALID_ADDRESS`.",
                                "example": "POA_DOCUMENT_EXPIRED"
                              },
                              "feature": {
                                "type": "string",
                                "enum": [
                                  "PROOF_OF_ADDRESS"
                                ],
                                "description": "الميزة التي أصدرت التحذير. دائماً `PROOF_OF_ADDRESS` في هذا الـ endpoint."
                              },
                              "additional_data": {
                                "type": "object",
                                "nullable": true,
                                "additionalProperties": true,
                                "description": "سياق إضافي لبعض المخاطر — على سبيل المثال، يتضمن `POA_DOCUMENT_EXPIRED` كلاً من `expiration_reason` (`printed_expiration` أو `age_window`)، و`document_type`، و`document_subtype`، و`issue_date`، بالإضافة إلى `expiration_date` في مسار `printed_expiration` أو `max_age_months` في مسار `age_window`؛ ويتضمن `SUSPECTED_DOCUMENT_MANIPULATION` كلاً من `reason` و`detection_method`؛ ويتضمن `POA_DOCUMENT_UNPROVEN_TEXT_REPLACEMENT` كلاً من `reason`، و`detection_method` (`unproven_text_replacement`)، و`replaced_text`، و`manipulated_regions`، و`manipulated_blocks`. ويكون `null` لمعظم المخاطر."
                              },
                              "log_type": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "information"
                                ],
                                "description": "مستوى الخطورة. تحذيرات `error` تنقل `status` إلى `Declined`؛ وإدخالات `information` استشارية ولا تؤدي إلى الرفض بمفردها أبداً. (لا يُنتج هذا الـ endpoint تحذيرات من نوع `warning` — حيث تقبل خياراته `DECLINE` أو `NO_ACTION` فقط)."
                              },
                              "short_description": {
                                "type": "string",
                                "description": "ملخص للمخاطر في سطر واحد مقروء للبشر."
                              },
                              "long_description": {
                                "type": "string",
                                "description": "تفسير سهل القراءة للمخاطر."
                              }
                            }
                          }
                        },
                        "detected_codes": {
                          "type": "array",
                          "description": "رموز QR والرموز الشريطية المكتشفة في كل صفحة تمت معالجتها من المستند. تكون فارغة عند عدم العثور على أي منها. رمز QR الذي تم تحديد مكانه ولكن تعذر فك تشفيره يحتوي على `parsed_payload: null`.",
                          "items": {
                            "$ref": "#/components/schemas/DocumentAIDetectedCode"
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، أو `null`."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "نسخة مطابقة من كائن `metadata` الذي أرسلته، أو `null`."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "طابع زمني بتنسيق ISO 8601 (بالتوقيت العالمي المنسق UTC) لوقت إنشاء الاستجابة."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق أو المعالجة. تُرجع المشكلات على مستوى الحقول غلاف DRF القياسي (مصفوفة واحدة من الرسائل لكل حقل مخالف). وتُرجع مشكلات ملفات PDF المشفرة `{\"detail\": ...}`. والمستند الذي يتعذر على مسار الاستخراج معالجته يُرجع `{\"error\": [\"Error extracting POA information\"]}`.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing document": {
                    "summary": "`document` غير مدرج في بيانات النموذج",
                    "value": {
                      "document": [
                        "No file was submitted."
                      ]
                    }
                  },
                  "Unsupported file extension": {
                    "summary": "امتداد الملف خارج tiff/jpg/jpeg/png/pdf/webp",
                    "value": {
                      "document": [
                        "File extension “txt” is not allowed. Allowed extensions are: tiff, jpg, jpeg, png, pdf, webp."
                      ]
                    }
                  },
                  "File too large": {
                    "summary": "يتجاوز الملف المرفوع حد 15 ميجابايت",
                    "value": {
                      "document": [
                        "File size should not exceed 15 MB"
                      ]
                    }
                  },
                  "Encrypted PDF": {
                    "summary": "تم تحميل ملف PDF بدون كلمة المرور المطلوبة",
                    "value": {
                      "detail": "The PDF is encrypted. Please upload a decrypted PDF or a photo instead."
                    }
                  },
                  "Wrong PDF password": {
                    "summary": "`document_password` لا يفك تشفير ملف PDF",
                    "value": {
                      "detail": "The PDF password is incorrect. Please provide the correct password."
                    }
                  },
                  "Invalid language code": {
                    "summary": "`poa_languages_allowed` يحتوي على رمز غير مدعوم",
                    "value": {
                      "poa_languages_allowed": [
                        "Invalid language code: 'xx'. Must be one of the supported languages: ['ar', 'bn', 'hy', 'bg', 'bs', 'ca', 'cnr', 'sq', 'zh', 'hr', 'cs', 'da', 'nl', 'en', 'et', 'fi', 'fr', 'ka', 'kk', 'de', 'el', 'he', 'hi', 'hu', 'id', 'it', 'ja', 'ko', 'ky', 'lv', 'lt', 'mk', 'mn', 'ms', 'no', 'fa', 'pl', 'pt', 'ro', 'ru', 'sr', 'sk', 'sl', 'so', 'es', 'sv', 'th', 'tr', 'uk', 'uz', 'vi']."
                      ]
                    }
                  },
                  "Invalid document age value": {
                    "summary": "قيمة `poa_document_age_months` خارج النطاق 1–120 / -1",
                    "value": {
                      "poa_document_age_months": [
                        "Invalid integer value for 'utility_bill': '999'. Must be -1 (unlimited) or a positive integer between 1 and 120."
                      ]
                    }
                  },
                  "Extraction failure": {
                    "summary": "تعذر معالجة المستند بواسطة مسار الاستخراج",
                    "value": {
                      "error": [
                        "Error extracting POA information"
                      ]
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DocumentProcessingBusy"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST 'https://verification.didit.me/v3/poa/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'document=@./utility-bill.pdf' \\\n  -F 'expected_address=Av. Monseñor Tavella 1291, Salta, Argentina' \\\n  -F 'expected_country=ARG' \\\n  -F 'expected_first_name=Sophia' \\\n  -F 'expected_last_name=Martinez' \\\n  -F 'poa_languages_allowed=en,es' \\\n  -F 'vendor_data=user-123' \\\n  --max-time 45"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.proof_of_address.verify(\n    document=open(\"document.pdf\", \"rb\"),\n    expected_address=\"Av. Monseñor Tavella 1291, Salta, Argentina\",\n    expected_country=\"ARG\",\n    expected_first_name=\"Sophia\",\n    expected_last_name=\"Martinez\",\n    poa_languages_allowed=\"en,es\",\n    save_api_request=True,\n    vendor_data=\"user-123\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.proofOfAddress.verify({\n  document: await fileFromPath(\"document.pdf\"),\n  expected_address: \"Av. Monseñor Tavella 1291, Salta, Argentina\",\n  expected_country: \"ARG\",\n  expected_first_name: \"Sophia\",\n  expected_last_name: \"Martinez\",\n  poa_languages_allowed: \"en,es\",\n  save_api_request: true,\n  vendor_data: \"user-123\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.ProofOfAddress.Verify(ctx, didit.ProofOfAddressVerifyParams{\n\tDocument:            didit.FileFromPath(\"document.pdf\"),\n\tExpectedAddress:     didit.String(\"Av. Monseñor Tavella 1291, Salta, Argentina\"),\n\tExpectedCountry:     didit.String(\"ARG\"),\n\tExpectedFirstName:   didit.String(\"Sophia\"),\n\tExpectedLastName:    didit.String(\"Martinez\"),\n\tPOALanguagesAllowed: didit.String(\"en,es\"),\n\tSaveAPIRequest:      didit.Bool(true),\n\tVendorData:          didit.String(\"user-123\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.ProofOfAddressVerifyParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.proofOfAddress().verify(ProofOfAddressVerifyParams.builder()\n        .document(Path.of(\"document.pdf\"))\n        .expectedAddress(\"Av. Monseñor Tavella 1291, Salta, Argentina\")\n        .expectedCountry(\"ARG\")\n        .expectedFirstName(\"Sophia\")\n        .expectedLastName(\"Martinez\")\n        .poaLanguagesAllowed(\"en,es\")\n        .saveApiRequest(true)\n        .vendorData(\"user-123\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->proofOfAddress->verify([\n    'document' => File::fromPath('document.pdf'),\n    'expected_address' => 'Av. Monseñor Tavella 1291, Salta, Argentina',\n    'expected_country' => 'ARG',\n    'expected_first_name' => 'Sophia',\n    'expected_last_name' => 'Martinez',\n    'poa_languages_allowed' => 'en,es',\n    'save_api_request' => true,\n    'vendor_data' => 'user-123',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.proof_of_address.verify(\n  document: Pathname(\"document.pdf\"),\n  expected_address: \"Av. Monseñor Tavella 1291, Salta, Argentina\",\n  expected_country: \"ARG\",\n  expected_first_name: \"Sophia\",\n  expected_last_name: \"Martinez\",\n  poa_languages_allowed: \"en,es\",\n  save_api_request: true,\n  vendor_data: \"user-123\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.ProofOfAddress.VerifyAsync(new ProofOfAddressVerifyParams\n{\n    Document = FileUpload.FromPath(\"document.pdf\"),\n    ExpectedAddress = \"Av. Monseñor Tavella 1291, Salta, Argentina\",\n    ExpectedCountry = \"ARG\",\n    ExpectedFirstName = \"Sophia\",\n    ExpectedLastName = \"Martinez\",\n    PoaLanguagesAllowed = \"en,es\",\n    SaveApiRequest = true,\n    VendorData = \"user-123\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/document-ai/": {
      "post": {
        "summary": "Document AI (استخراج الحقول المخصصة + عمليات التحقق من التلاعب)",
        "description": "استخرج الحقول التي تحددها **أنت** من أي مستند داعم — قسائم الرواتب، وإثبات الأموال، وخطابات مصدر الثروة، والبيانات الضريبية، والعقود، والفواتير — في استدعاء واحد. أرسل الملف بالإضافة إلى تعريف `fields` (المفتاح، والاسم، وتعليمات الاستخراج، والنوع) واحصل على قيم ذات نوع محدد (`text`، أو `number`، أو `date` بتنسيق `YYYY-MM-DD`)، ودرجة تطابق اسم اختيارية مقابل الشخص أو الشركة المتوقعة، وإشارات التلاعب في PDF/EXIF، و`status` بقيمة `Approved`/`Declined`/`In Review`، وقائمة `warnings` توضح كل مشكلة تم العثور عليها. هذا هو المقابل من خادم إلى خادم لخطوة سير العمل المستضافة Document AI (راجع `/core-technology/document-ai/overview`)؛ حيث يستخدم نموذج الاستخراج الافتراضي الخاص بـ Didit ولا يتيح اختيار مزود الخدمة.\n\n**زمن الاستجابة.** يعتمد الاستخراج على LLM: تستغرق الاستدعاءات النموذجية **5–15 ثانية**، وتصل في ملفات PDF متعددة الصفحات إلى **~30 ثانية**. اضبط مهلة العميل على **45 ثانية على الأقل** ولا تُعد المحاولة قبل اكتمال الاستدعاء.\n\n**تنسيق الطلب.** `multipart/form-data` فقط. `fields` هو **سلسلة مصفوفة واحدة مرمزة بتنسيق JSON** (من 1 إلى 30 عنصرًا، بحد أقصى 16 KB)؛ ويتم رفض مصفوفات النماذج ذات نمط الأقواس بالرمز `400`. كل عنصر هو `{key, name, instruction, type, required, is_full_name}` — حيث يمثل `key` مفتاح JSON الذي تستلمه (`^[a-z0-9_]{1,64}$`، فريد)، ويوضح `instruction` للنموذج ما يجب قراءته، و`type` هو `text` (افتراضي) | `number` | `date`، ويؤدي `required` إلى إطلاق `DOCUMENT_AI_MISSING_REQUIRED_FIELDS` عندما يتعذر قراءة القيمة، ويمكن لحقل واحد على الأكثر تعيين `is_full_name: true` لتمييز القيمة التي ستتم مقارنتها بالاسم المتوقع.\n\n**مطابقة الاسم.** مرّر `expected_first_name` + `expected_last_name` (شخص) **أو** `expected_company_name` (+ `expected_company_country` اختياريًا) — وليس كلاهما. تتم مقارنة قيمة الحقل `is_full_name` (أو، في حال عدم تحديد أي حقل، أول حقل نصي يبدو مفتاحه كاسم) بشكل تقريبي؛ ويتم دائمًا إرجاع `name_match_score` (0–100) و`name_on_document` عندما يتوفر كلا الطرفين، كما تؤدي أي درجة أقل من `document_ai_name_match_score_threshold` (الافتراضي 80) إلى إضافة `DOCUMENT_AI_NAME_MISMATCH`، وتخضع لـ `document_ai_name_mismatch_action`.\n\n**منطق القرار.** ترتبط كل حالة مخاطر بإجراء قابل للتكوين: `DECLINE` → `status: \"Declined\"`، و`REVIEW` → `status: \"In Review\"`، و`NO_ACTION` → لأغراض إعلامية فقط. تعكس الإعدادات الافتراضية خطوة سير العمل: مستند غير مقروء `REVIEW`، وحقول مطلوبة مفقودة `REVIEW`، واشتباه في التلاعب `DECLINE`، وعدم تطابق الاسم `NO_ACTION`، وملف غير مدعوم `REVIEW`. إذا تعذر معالجة المستند على الإطلاق، يُرجع الطلب `400`؛ أما المستند المقروء الذي يحتوي على مشكلات فيُرجع `200` مع `Declined`/`In Review` — تحقق دائمًا من `document_ai.status` و`document_ai.warnings`، وليس رمز HTTP فقط.\n\n**الفوترة.** تستهلك كل استجابة `200` رصيد API واحدًا لـ Document AI — **$0.20 لكل مستند** بحسب السعر المعلن، يُدفع من رصيد خطتك أو رصيد شحن الرصيد. عندما يتعذر على رصيد المؤسسة تغطية الاستدعاء، يُرجع الـ endpoint الرمز `403` قبل إجراء أي معالجة. تُرجع مفاتيح API الخاصة بالبيئة التجريبية استجابة تجريبية حتمية ولا تخضع لأي رسوم.\n\n**الحفظ الدائم.** عند تعيين `save_api_request=true` (افتراضيًا)، يتم تخزين الاستدعاء كجلسة من نوع API: حيث يتم الاحتفاظ بالمستند والقيم المستخرجة وتعاريف الحقول ولقطة مطابقة الاسم، وتظهر الجلسة في Business Console، ويعمل `request_id` مع `GET /v3/session/{sessionId}/decision/`.",
        "operationId": "post_v3document-ai",
        "x-didit-sdk": {
          "resource": "document_ai",
          "method": "analyze",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "document",
                  "fields"
                ],
                "properties": {
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "المستند المراد قراءته. الامتدادات المسموح بها: `tiff`، `jpg`، `jpeg`، `png`، `pdf`، `webp`، `zip`. الحد الأقصى لحجم الرفع: **30 MB** (تُرفض الملفات الأكبر حجماً بالرمز `400`). ملفات PDF متعددة الصفحات مدعومة (توقّع زمن استجابة أعلى)؛ تُرفض ملفات PDF المشفرة بالرمز `400`. تُضغط الصور تلقائياً قبل المعالجة."
                  },
                  "fields": {
                    "type": "string",
                    "description": "سلسلة مصفوفة واحدة بترميز JSON تحتوي على **1–30** من تعريفات الحقول (بحد أقصى 16 كيلوبايت). كل عنصر: `key` (مطلوب، `^[a-z0-9_]{1,64}$`، فريد — المفتاح المُرجع في `extracted_data`)، و`name` (≤100 حرف، يظهر في الرسائل)، و`instruction` (≤500 حرف، ما يجب على النموذج قراءته)، و`type` (`text` افتراضي | `number` | `date`)، و`required` (منطقي، افتراضياً `false`)، و`is_full_name` (منطقي، افتراضياً `false`، واحد على الأكثر لكل طلب). تُرجع مصفوفات النماذج بنمط الأقواس، أو JSON غير الصالح، أو المفاتيح المكررة، أو وجود أكثر من `is_full_name` واحد الخطأ `400` قبل أي معالجة أو فوترة.",
                    "example": "[{\"key\": \"employer_name\", \"name\": \"Employer name\", \"instruction\": \"The employer or company issuing the payslip.\", \"type\": \"text\", \"required\": true, \"is_full_name\": false}, {\"key\": \"employee_name\", \"name\": \"Employee name\", \"instruction\": \"The full name of the employee as printed on the payslip.\", \"type\": \"text\", \"required\": true, \"is_full_name\": true}, {\"key\": \"net_pay\", \"name\": \"Net pay\", \"instruction\": \"The net amount paid to the employee for the period.\", \"type\": \"number\", \"required\": true, \"is_full_name\": false}, {\"key\": \"pay_date\", \"name\": \"Pay date\", \"instruction\": \"The payment date shown on the payslip.\", \"type\": \"date\", \"required\": false, \"is_full_name\": false}]"
                  },
                  "expected_first_name": {
                    "type": "string",
                    "description": "الاسم الأول للتحقق منه ومطابقته مع حقل الاسم في المستند (مطابقة تقريبية، تأخذ في الاعتبار الترجمة الصوتية). يُستخدم مع `expected_last_name`؛ ولا يمكن دمجه مع `expected_company_name`.",
                    "example": "Sophia"
                  },
                  "expected_last_name": {
                    "type": "string",
                    "description": "اسم العائلة للتحقق منه مقابل حقل الاسم في المستند، مدمجاً مع `expected_first_name` لاحتساب `name_match_score`.",
                    "example": "Martinez"
                  },
                  "expected_company_name": {
                    "type": "string",
                    "description": "اسم الشركة للتحقق منه بمطابقته مع حقل الاسم في المستند (لمستندات الشركات). لا يمكن دمجه مع `expected_first_name` / `expected_last_name` (لا توجد قيمة توضيحية عن قصد — عينة الطلب المنشأة تستخدم حقول الأشخاص؛ استبدلها بهذا الحقل عند التحقق من مستند شركة)."
                  },
                  "expected_company_country": {
                    "type": "string",
                    "description": "رمز دولة اختياري وفق معيار ISO 3166-1 alpha-2 (حرفان بتنسيق ASCII، مثل `FR`) يضبط معايير تطبيع اسم الشركة لـ `expected_company_name`. يُستخدم فقط مع `expected_company_name`."
                  },
                  "document_ai_name_match_score_threshold": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "default": 80,
                    "description": "الحد الأدنى لـ `name_match_score` (من 0 إلى 100) لاعتبار الاسم متطابقًا. تؤدي الدرجة الأقل إلى إضافة `DOCUMENT_AI_NAME_MISMATCH`، ويحكمها `document_ai_name_mismatch_action`.",
                    "example": 80
                  },
                  "document_ai_unreadable_document_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "REVIEW",
                      "NO_ACTION"
                    ],
                    "default": "REVIEW",
                    "description": "الإجراء المتبع عندما يتعذر قراءة أي حقل من المستند (`DOCUMENT_AI_UNREADABLE_DOCUMENT`)."
                  },
                  "document_ai_missing_required_fields_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "REVIEW",
                      "NO_ACTION"
                    ],
                    "default": "REVIEW",
                    "description": "الإجراء المتبع عندما يتعذر قراءة حقل واحد على الأقل من الحقول المطلوبة `required` (`DOCUMENT_AI_MISSING_REQUIRED_FIELDS`؛ وتسردهم `additional_data.missing_fields`)."
                  },
                  "document_ai_document_tampering_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "REVIEW",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "الإجراء المتبع عند الاشتباه في تلاعب عبر التحليل الجنائي لـ PDF/EXIF — تعديل بعد التوقيع الرقمي، أو محرر PDF معروف، أو تلاعب بنصوص متراكبة، أو إعادة تصدير مريبة، أو شذوذ في الصورة (`DOCUMENT_AI_SUSPECTED_MANIPULATION`)."
                  },
                  "document_ai_name_mismatch_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "REVIEW",
                      "NO_ACTION"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتبع عندما يكون `name_match_score` أقل من الحد الأدنى (`DOCUMENT_AI_NAME_MISMATCH`)."
                  },
                  "document_ai_unsupported_file_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "REVIEW",
                      "NO_ACTION"
                    ],
                    "default": "REVIEW",
                    "description": "الإجراء المتخذ عندما يكون الملف المرفوع فارغاً أو غير قابل للمعالجة (`DOCUMENT_AI_UNSUPPORTED_FILE`)."
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "عندما تكون القيمة `true` (الافتراضية)، يتم حفظ الاستدعاء كجلسة من نوع API — مرئية في Business Console، ويمكن استرجاعها عبر `GET /v3/session/{sessionId}/decision/` باستخدام `request_id` المُرجع، مع تخزين المستند المرفوع والقيم المستخرجة وتعاريف الحقول ولقطة مطابقة الاسم. عندما تكون القيمة `false`، لا يتم تخزين أي شيء ويكون `request_id` عبارة عن معرّف UUID مؤقت للربط بالاستجابة فقط؛ مع استمرار فوترة الاستدعاء.",
                    "example": true
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "سلسلة نصية مبهمة اختيارية (معرّف المستخدم الداخلي لديك، البريد الإلكتروني، UUID...) تُخزَّن في الجلسة المحفوظة وتُعاد في الاستجابة. استخدمها لربط استدعاءات API بسجلاتك الخاصة ولتصفية الجلسات لاحقاً.",
                    "example": "user-123"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "كائن JSON اختياري يُخزن مع الجلسة (عندما يكون `save_api_request=true`) ويُعاد في الاستجابة. في طلبات multipart، أرسله كحقل سلسلة نصية بترميز JSON (مثل `metadata={\"flow\":\"onboarding\"}`) — حيث يتم تحليله إلى كائن.",
                    "example": {
                      "flow": "onboarding"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تمت معالجة المستند. تكون قيمة `document_ai.status` إما `Approved` أو `Declined` أو `In Review`؛ وتُفصّل كل مشكلة تم اكتشافها في `document_ai.warnings`. المستند الذي يحتوي على مشاكل سيظل يُرجع `200` — افحص نص الاستجابة، وليس فقط رمز HTTP. عندما تكون `save_api_request=true`، يكون `request_id` هو معرّف الجلسة المحفوظ.",
            "content": {
              "application/json": {
                "examples": {
                  "Approved": {
                    "summary": "تمت قراءة قسيمة الراتب بنجاح، وتطابق الاسم",
                    "value": {
                      "request_id": "9d6a3b1e-2f0c-4a8e-9b7d-1c2e3f4a5b6c",
                      "document_ai": {
                        "status": "Approved",
                        "extracted_data": {
                          "employer_name": "Acme Payments Ltd",
                          "employee_name": "Sophia Martinez",
                          "net_pay": 3120.5,
                          "pay_date": "2026-07-31"
                        },
                        "detected_codes": [
                          {
                            "type": "CODE_128",
                            "page_number": 1,
                            "position": [
                              [
                                96,
                                456
                              ],
                              [
                                96,
                                616
                              ],
                              [
                                1012,
                                611
                              ],
                              [
                                1015,
                                456
                              ]
                            ],
                            "x": 96,
                            "y": 456,
                            "width": 919,
                            "height": 160,
                            "page_width": 1200,
                            "page_height": 1700,
                            "raw_payload": "SU5WLTIwMjYtMDA0Mg==",
                            "parsed_payload": "INV-2026-0042"
                          }
                        ],
                        "fields": [
                          {
                            "key": "employer_name",
                            "name": "Employer name",
                            "instruction": "The employer or company issuing the payslip.",
                            "type": "text",
                            "required": true,
                            "is_full_name": false
                          },
                          {
                            "key": "employee_name",
                            "name": "Employee name",
                            "instruction": "The full name of the employee as printed on the payslip.",
                            "type": "text",
                            "required": true,
                            "is_full_name": true
                          },
                          {
                            "key": "net_pay",
                            "name": "Net pay",
                            "instruction": "The net amount paid to the employee for the period.",
                            "type": "number",
                            "required": true,
                            "is_full_name": false
                          },
                          {
                            "key": "pay_date",
                            "name": "Pay date",
                            "instruction": "The payment date shown on the payslip.",
                            "type": "date",
                            "required": false,
                            "is_full_name": false
                          }
                        ],
                        "name_match_score": 100.0,
                        "name_on_document": "Sophia Martinez",
                        "warnings": []
                      },
                      "vendor_data": "user-123",
                      "metadata": {
                        "flow": "onboarding"
                      },
                      "created_at": "2026-08-19T16:40:12.318Z"
                    }
                  },
                  "In Review — missing required field": {
                    "summary": "تعذرت قراءة `net_pay`؛ الإجراء الافتراضي هو REVIEW",
                    "value": {
                      "request_id": "3f2a9c7b-5d4e-4b1a-8c6f-0e9d8c7b6a5f",
                      "document_ai": {
                        "status": "In Review",
                        "extracted_data": {
                          "employer_name": "Acme Payments Ltd",
                          "employee_name": "Sophia Martinez",
                          "net_pay": null,
                          "pay_date": "2026-07-31"
                        },
                        "detected_codes": [],
                        "fields": [
                          {
                            "key": "employer_name",
                            "name": "Employer name",
                            "instruction": "The employer or company issuing the payslip.",
                            "type": "text",
                            "required": true,
                            "is_full_name": false
                          },
                          {
                            "key": "employee_name",
                            "name": "Employee name",
                            "instruction": "The full name of the employee as printed on the payslip.",
                            "type": "text",
                            "required": true,
                            "is_full_name": true
                          },
                          {
                            "key": "net_pay",
                            "name": "Net pay",
                            "instruction": "The net amount paid to the employee for the period.",
                            "type": "number",
                            "required": true,
                            "is_full_name": false
                          },
                          {
                            "key": "pay_date",
                            "name": "Pay date",
                            "instruction": "The payment date shown on the payslip.",
                            "type": "date",
                            "required": false,
                            "is_full_name": false
                          }
                        ],
                        "name_match_score": 100.0,
                        "name_on_document": "Sophia Martinez",
                        "warnings": [
                          {
                            "risk": "DOCUMENT_AI_MISSING_REQUIRED_FIELDS",
                            "feature": "DOCUMENT_AI",
                            "additional_data": {
                              "missing_fields": [
                                "Net pay"
                              ]
                            },
                            "log_type": "warning",
                            "short_description": "Required fields could not be extracted",
                            "long_description": "One or more fields configured as required could not be extracted from the uploaded document."
                          }
                        ]
                      },
                      "vendor_data": null,
                      "metadata": null,
                      "created_at": "2026-08-19T16:41:05.002Z"
                    }
                  },
                  "Declined — suspected manipulation": {
                    "summary": "التحليل الجنائي لملف PDF رصد محررًا معروفًا؛ الإجراء الافتراضي هو DECLINE",
                    "value": {
                      "request_id": "7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
                      "document_ai": {
                        "status": "Declined",
                        "extracted_data": {
                          "employer_name": "Acme Payments Ltd",
                          "employee_name": "Sophia Martinez",
                          "net_pay": 3120.5,
                          "pay_date": "2026-07-31"
                        },
                        "detected_codes": [],
                        "fields": [
                          {
                            "key": "employer_name",
                            "name": "Employer name",
                            "instruction": "The employer or company issuing the payslip.",
                            "type": "text",
                            "required": true,
                            "is_full_name": false
                          },
                          {
                            "key": "employee_name",
                            "name": "Employee name",
                            "instruction": "The full name of the employee as printed on the payslip.",
                            "type": "text",
                            "required": true,
                            "is_full_name": true
                          },
                          {
                            "key": "net_pay",
                            "name": "Net pay",
                            "instruction": "The net amount paid to the employee for the period.",
                            "type": "number",
                            "required": true,
                            "is_full_name": false
                          },
                          {
                            "key": "pay_date",
                            "name": "Pay date",
                            "instruction": "The payment date shown on the payslip.",
                            "type": "date",
                            "required": false,
                            "is_full_name": false
                          }
                        ],
                        "name_match_score": null,
                        "name_on_document": "Sophia Martinez",
                        "warnings": [
                          {
                            "risk": "DOCUMENT_AI_SUSPECTED_MANIPULATION",
                            "feature": "DOCUMENT_AI",
                            "additional_data": {
                              "detection_method": "known_editor",
                              "processed_by_known_editor": "ilovepdf"
                            },
                            "log_type": "error",
                            "short_description": "Suspected document manipulation",
                            "long_description": "The system detected signs of potential manipulation or editing in the uploaded document."
                          }
                        ]
                      },
                      "vendor_data": null,
                      "metadata": null,
                      "created_at": "2026-08-19T16:42:40.771Z"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة المحفوظة عندما تكون `save_api_request=true` (يمكن استخدامه مع `GET /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID ارتباط مؤقت."
                    },
                    "document_ai": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "Approved",
                            "Declined",
                            "In Review"
                          ],
                          "description": "`Approved` عندما لا يؤدي أي تحذير إلى الرفض أو المراجعة؛ و`Declined` عندما يؤدي خطر واحد على الأقل إلى `DECLINE`؛ وخلاف ذلك `In Review` عندما يؤدي خطر واحد على الأقل إلى `REVIEW`. توضح قائمة `warnings` السبب."
                        },
                        "extracted_data": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "إدخال واحد لكل مفتاح حقل مطلوب. تُكتب القيم بنوع البيانات الخاص بالحقل `type` — نصوص لـ `text`، وأرقام لـ `number`، ونصوص بصيغة `YYYY-MM-DD` لـ `date` — أو `null` إذا تعذرت قراءة القيمة.",
                          "example": {
                            "employer_name": "Acme Payments Ltd",
                            "employee_name": "Sophia Martinez",
                            "net_pay": 3120.5,
                            "pay_date": "2026-07-31"
                          }
                        },
                        "detected_codes": {
                          "type": "array",
                          "description": "رموز QR والرموز الشريطية المكتشفة في كل صفحة تمت معالجتها. تكون فارغة عند عدم العثور على أي منها. رمز QR الذي تم تحديد مكانه ولكن تعذر فك تشفيره يحتوي على `parsed_payload: null`.",
                          "items": {
                            "$ref": "#/components/schemas/DocumentAIDetectedCode"
                          }
                        },
                        "fields": {
                          "type": "array",
                          "description": "تعريفات الحقول الموحّدة التي استُخدمت لعملية الاستخراج هذه، وتتم إعادتها كاستجابة (كما تُخزّن مع الجلسة عندما تكون `save_api_request=true`).",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "instruction": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "number",
                                  "date"
                                ]
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "is_full_name": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "name_match_score": {
                          "type": "number",
                          "nullable": true,
                          "minimum": 0,
                          "maximum": 100,
                          "description": "التشابه التقريبي (0–100) بين `name_on_document` واسم الشخص/الشركة المتوقع. يتم إرجاعه كلما توفرت قيمة الاسم والاسم المتوقع معاً — في حالات التطابق **و**عدم التطابق؛ ويكون `null` خلاف ذلك.",
                          "example": 96.0
                        },
                        "name_on_document": {
                          "type": "string",
                          "nullable": true,
                          "description": "قيمة الاسم المأخوذة من المستند (الحقل `is_full_name`، أو أول حقل نصي يشبه الاسم) التي تمت مقارنتها بالاسم المتوقع. تكون `null` عندما لا تتوفر أي قيمة للاسم.",
                          "example": "Sophia Martinez"
                        },
                        "warnings": {
                          "type": "array",
                          "description": "فارغ عند الموافقة السليمة. يوضح كل إدخال خطراً واحداً تم اكتشافه؛ تُعيّن الإدخالات ذات `log_type: \"error\"` الـ `status` إلى `Declined`، وتُعيّنه الإدخالات ذات `log_type: \"warning\"` إلى `In Review`.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "risk": {
                                "type": "string",
                                "enum": [
                                  "DOCUMENT_AI_UNREADABLE_DOCUMENT",
                                  "DOCUMENT_AI_MISSING_REQUIRED_FIELDS",
                                  "DOCUMENT_AI_SUSPECTED_MANIPULATION",
                                  "DOCUMENT_AI_NAME_MISMATCH",
                                  "DOCUMENT_AI_UNSUPPORTED_FILE"
                                ],
                                "description": "رمز مخاطر مقروء آلياً. يخضع كل منها لخيار الطلب `document_ai_*_action` المطابق له.",
                                "example": "DOCUMENT_AI_MISSING_REQUIRED_FIELDS"
                              },
                              "feature": {
                                "type": "string",
                                "enum": [
                                  "DOCUMENT_AI"
                                ],
                                "description": "الميزة التي أصدرت التحذير. دائماً `DOCUMENT_AI` في هذا الـ endpoint."
                              },
                              "additional_data": {
                                "type": "object",
                                "nullable": true,
                                "additionalProperties": true,
                                "description": "سياق إضافي للمخاطر: `{\"missing_fields\": [\"Net pay\"]}` للحقول المطلوبة المفقودة، و`{\"name_on_document\", \"score\", \"threshold\"}` لعدم تطابق الاسم، والاستنتاج الجنائي (`detection_method`، وتفاصيل المُنشئ/المُحرر) في حالات الاشتباه في التلاعب. ويكون `null` عند عدم وجود ما يمكن إضافته.",
                                "example": {
                                  "missing_fields": [
                                    "Net pay"
                                  ]
                                }
                              },
                              "log_type": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warning",
                                  "information"
                                ],
                                "description": "مستوى الخطورة المشتق من الإجراء المُهيّأ: `error` (DECLINE)، و`warning` (REVIEW)، و`information` (NO_ACTION)."
                              },
                              "short_description": {
                                "type": "string",
                                "description": "عبارة من سطر واحد مقروءة للبشر تصف المخاطر.",
                                "example": "Required fields could not be extracted"
                              },
                              "long_description": {
                                "type": "string",
                                "description": "تفسير سهل القراءة، مع دمج `additional_data` عند الاقتضاء."
                              }
                            }
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، أو `null`."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "نسخة مطابقة من كائن `metadata` الذي أرسلته، أو `null`."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "متى تمت معالجة الطلب (UTC، ISO 8601)."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق أو المعالجة. تُرجع المشكلات على مستوى الحقول غلاف DRF القياسي (مصفوفة واحدة من الرسائل لكل حقل مخالف). وتُرجع المستندات المشفرة أو غير القابلة للقراءة وإخفاقات الاستخراج `{\"error\": ...}`.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing document": {
                    "summary": "`document` غير مدرج في بيانات النموذج",
                    "value": {
                      "document": [
                        "No file was submitted."
                      ]
                    }
                  },
                  "Invalid fields payload": {
                    "summary": "`fields` ليست سلسلة واحدة لمصفوفة بترميز JSON",
                    "value": {
                      "fields": [
                        "fields must be a valid JSON array string."
                      ]
                    }
                  },
                  "Duplicate field keys": {
                    "summary": "عنصران يشتركان في نفس الـ `key`",
                    "value": {
                      "fields": [
                        "Every fields item must have a unique key."
                      ]
                    }
                  },
                  "Conflicting expectations": {
                    "summary": "تم إرسال توقعات الشخص والشركة معاً",
                    "value": {
                      "non_field_errors": [
                        "Provide either person expected-name fields or expected_company_name, not both."
                      ]
                    }
                  },
                  "Invalid metadata": {
                    "summary": "`metadata` ليس كائن JSON (أو يحتوي على حرف NUL)",
                    "value": {
                      "metadata": [
                        "Metadata must be a JSON object."
                      ]
                    }
                  },
                  "Oversized vendor_data": {
                    "summary": "تجاوز `vendor_data` الحد الأقصى البالغ 2,000 بايت",
                    "value": {
                      "vendor_data": [
                        "vendor_data is too long (maximum 2000 bytes)."
                      ]
                    }
                  },
                  "Encrypted PDF": {
                    "summary": "ملف PDF محمي بكلمة مرور",
                    "value": {
                      "error": "The PDF is encrypted. Please upload a decrypted PDF or a photo instead."
                    }
                  },
                  "Extraction failed": {
                    "summary": "تعذر على مسار الاستخراج معالجة المستند",
                    "value": {
                      "error": [
                        "Error extracting Document AI information"
                      ]
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "تم رفض الإذن. يُرجع عند فقدان الرأس `x-api-key`، وأيضاً عندما لا يتمكن رصيد المؤسسة الطالبة من تغطية الاستدعاء؛ ويُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`. يؤدي المفتاح المفقود إلى إرجاع `403` مع `{\"detail\": ...}`؛ ويؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يؤدي نقص الرصيد — والمؤسسات التي تتم فوترتها بموجب عقد ولا يتضمن جدول الأسعار الخاص بها بنداً لـ API Document AI — إلى إرجاع `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"
                    }
                  },
                  "Contract rate missing": {
                    "summary": "مؤسسة مفوترة بموجب عقد لا يحتوي جدول الأسعار الخاص بها على بند Document AI API",
                    "value": {
                      "error": "Document AI API is not included in your contract rate card. Contact support@didit.me to enable it."
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DocumentProcessingBusy"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.document_ai.analyze(\n    document=open(\"document.pdf\", \"rb\"),\n    fields=\"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.documentAi.analyze({\n  document: await fileFromPath(\"document.pdf\"),\n  fields: \"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.DocumentAi.Analyze(ctx, didit.DocumentAiAnalyzeParams{\n\tDocument: didit.FileFromPath(\"document.pdf\"),\n\tFields:   \"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.DocumentAiAnalyzeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.documentAi().analyze(DocumentAiAnalyzeParams.builder()\n        .document(Path.of(\"document.pdf\"))\n        .fields(\"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->documentAi->analyze([\n    'document' => File::fromPath('document.pdf'),\n    'fields' => '[{\"key\": \"employer_name\", \"name\": \"Employer name\", \"instruction\": \"The employer or company issuing the payslip.\", \"type\": \"text\", \"required\": true, \"is_full_name\": false}, {\"key\": \"employee_name\", \"name\": \"Employee name\", \"instruction\": \"The full name of the employee as printed on the payslip.\", \"type\": \"text\", \"required\": true, \"is_full_name\": true}, {\"key\": \"net_pay\", \"name\": \"Net pay\", \"instruction\": \"The net amount paid to the employee for the period.\", \"type\": \"number\", \"required\": true, \"is_full_name\": false}, {\"key\": \"pay_date\", \"name\": \"Pay date\", \"instruction\": \"The payment date shown on the payslip.\", \"type\": \"date\", \"required\": false, \"is_full_name\": false}]',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.document_ai.analyze(\n  document: Pathname(\"document.pdf\"),\n  fields: \"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.DocumentAi.AnalyzeAsync(new DocumentAiAnalyzeParams\n{\n    Document = FileUpload.FromPath(\"document.pdf\"),\n    Fields = \"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/aml/": {
      "post": {
        "summary": "فحص AML (مستقل)",
        "operationId": "post_v3aml",
        "x-didit-sdk": {
          "resource": "aml",
          "method": "screen",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "مفتاح اختياري لأمان إعادة المحاولة، حتى 255 حرفاً. تؤدي إعادة استخدام نفس المفتاح مع نفس نص الطلب إلى إرجاع الاستجابة الأصلية دون تشغيل أو فوترة فحص ثانٍ. تؤدي إعادة استخدام المفتاح مع نص مختلف إلى إرجاع `409`.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "description": "فحص شخص أو شركة مقابل مجموعات بيانات PEP والعقوبات وقوائم التحذير/المراقبة والأخبار السلبية في استدعاء واحد.\n\n**نموذج الدرجتين.** يحمل كل تطابق `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 تماماً لا تُصدر أي تحذير إطلاقاً).\n\n**أوزان درجة التطابق.** يجب أن يكون مجموع `aml_name_weight` + `aml_dob_weight` + `aml_country_weight` مساوياً لـ 100 تماماً (القيم الافتراضية 60/25/15). يتم استبعاد المكونات المفقودة من الطلب وإعادة ضبط النسب؛ ويعمل `document_number` المتطابق كمفتاح رئيسي يتجاوز `match_score` ليصبح 100.\n\n**زمن الاستجابة.** تكتمل عمليات الفحص العادية عادةً في غضون ثوانٍ قليلة. مع `include_adverse_media=true`، ينتظر الـ API إثراء الأخبار السلبية (توقف أولي لمدة 5 ثوانٍ تقريباً بالإضافة إلى ما يصل إلى 25 ثانية تقريباً من الاستقصاء) — اضبط مهلة العميل على **60 ثانية على الأقل**.\n\n**حفظ البيانات.** القيمة الافتراضية لـ `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`).\n\n**خاصية Idempotency.** أرسل رأس `Idempotency-Key` عند إعادة المحاولة بعد انتهاء المهلة أو حدوث خطأ عابر. يقتصر نطاق المفتاح على تطبيقك وجسم الطلب المطابق تماماً. يخزن الطلب المكتمل الأول استجابته؛ وتُرجع محاولات إعادة الطلب المتطابقة اللاحقة نفس الاستجابة دون تشغيل فحص AML آخر أو فوترته. إذا كان الطلب الأصلي لا يزال قيد التشغيل، أعد المحاولة لاحقاً باستخدام المفتاح نفسه. إذا تمت إعادة استخدام المفتاح نفسه مع جسم طلب مختلف، يُرجع الـ API الخطأ `409`.\n\n**الفوترة.** يتم خصم رصيد واحد لـ AML API بعد أول فحص ناجح. لا يتم فرض رسوم مرة أخرى على الاستجابات المكررة المستندة إلى خاصية idempotency؛ ويؤدي عدم كفاية الرصيد إلى إرجاع `403` قبل إجراء أي فحص جديد.\n\n**البيئة التجريبية.** تتخطى المفاتيح الصادرة من تطبيقات البيئة التجريبية الفحص والفوترة تماماً وتُرجع نتيجة وهمية — `Approved` بدون أي تطابقات ما لم تُمرر `sandbox_scenario`. تعمل `save_api_request` بنفس طريقة المفاتيح الحية، لذا يمكن استرداد فحص البيئة التجريبية المحفوظ عبر `GET /v3/session/{sessionId}/decision/` و`GET /v3/session/{sessionId}/generate-pdf/`.",
        "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"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/aml/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Idempotency-Key: aml-user-1234-2026-08-20' \\\n  -d '{\n    \"full_name\": \"Antonio Ejemplo Modelo\",\n    \"entity_type\": \"person\",\n    \"date_of_birth\": \"1972-02-29\",\n    \"nationality\": \"ES\",\n    \"include_adverse_media\": false,\n    \"vendor_data\": \"user-1234\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.aml.screen(\n    full_name=\"Antonio Ejemplo Modelo\",\n    entity_type=\"person\",\n    date_of_birth=\"1972-02-29\",\n    nationality=\"ES\",\n    include_adverse_media=False,\n    vendor_data=\"user-1234\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.aml.screen({\n  full_name: \"Antonio Ejemplo Modelo\",\n  entity_type: \"person\",\n  date_of_birth: \"1972-02-29\",\n  nationality: \"ES\",\n  include_adverse_media: false,\n  vendor_data: \"user-1234\",\n});\nconsole.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;\nimport me.didit.Didit;\nimport me.didit.types.AmlScreenParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.aml().screen(AmlScreenParams.builder()\n        .fullName(\"Antonio Ejemplo Modelo\")\n        .entityType(AmlScreenParams.EntityType.of(\"person\"))\n        .dateOfBirth(LocalDate.parse(\"1972-02-29\"))\n        .nationality(\"ES\")\n        .includeAdverseMedia(false)\n        .vendorData(\"user-1234\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->aml->screen([\n    'full_name' => 'Antonio Ejemplo Modelo',\n    'entity_type' => 'person',\n    'date_of_birth' => '1972-02-29',\n    'nationality' => 'ES',\n    'include_adverse_media' => false,\n    'vendor_data' => 'user-1234',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.aml.screen(\n  full_name: \"Antonio Ejemplo Modelo\",\n  entity_type: \"person\",\n  date_of_birth: \"1972-02-29\",\n  nationality: \"ES\",\n  include_adverse_media: false,\n  vendor_data: \"user-1234\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Aml.ScreenAsync(new AmlScreenParams\n{\n    FullName = \"Antonio Ejemplo Modelo\",\n    EntityType = new AmlScreenParamsEntityType(\"person\"),\n    DateOfBirth = \"1972-02-29\",\n    Nationality = \"ES\",\n    IncludeAdverseMedia = false,\n    VendorData = \"user-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "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"
                                      }
                                    },
                                    "relation": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "status": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "details": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "active": {
                                      "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.0,
                            "risk_score": 73.0,
                            "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.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.0,
                                  "PEP Level 1": 100.0
                                }
                              },
                              "custom_list": {}
                            },
                            "score_breakdown": {
                              "name_score": 89,
                              "name_weight": 60,
                              "name_weight_normalized": 60.0,
                              "name_contribution": 53.4,
                              "dob_score": 100,
                              "dob_weight": 25,
                              "dob_weight_normalized": 25.0,
                              "dob_contribution": 25.0,
                              "country_score": 100,
                              "country_weight": 15,
                              "country_weight_normalized": 15.0,
                              "country_contribution": 15.0,
                              "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.0,
                        "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"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/face-search/": {
      "post": {
        "summary": "البحث بالوجه",
        "description": "ابحث عن صورة وجه (1:N) مقابل فهرس البحث بالوجه الخاص بتطبيقك — الوجوه المُسجَّلة من جلسات التحقق، واستدعاءات API المستقلة المحفوظة، وعمليات تحميل صور وجوه الملفات الشخصية للمستخدمين مباشرة، وقوائم الحظر/السماح الخاصة بك — واحصل على مطابقات مرتبة حسب التشابه بالإضافة إلى تحذيرات قائمة الحظر والتكرار.\n\n**طريقة العمل.** يتم تضمين أكبر وجه تم اكتشافه في `user_image` والبحث عنه في الفهرس، ضمن نطاق تطبيقك. يتم إرجاع ما يصل إلى **5 تطابقات** تتجاوز الحد الأدنى للتشابه في `matches`، ويحتوي كل منها على `similarity_percentage`، والجلسة الأصلية (`session_id` و`session_number` و`status` و`vendor_data`)، و`user_details` المستخرجة أثناء التحقق من المستندات لتلك الجلسة، وعلامتي `is_blocklisted` / `is_allowlisted`، ومميز `source` (`session` أو `imported` أو `list_entry`).\n\n- يرتب `search_type=most_similar` (الافتراضي) كل وجه مُسجَّل حسب التشابه — استخدمه لإزالة التكرار والتحقيق في شبكات الاحتيال.\n- يقصر `search_type=blocklisted_or_approved` المرشحين على الوجوه المدرجة في قائمة الحظر، والوجوه المدرجة في قائمة السماح، والوجوه من الجلسات المقبولة، ووجوه الملفات الشخصية للمستخدمين المستوردة، مع ترتيب الإدخالات المدرجة في قائمة الحظر أولاً — استخدمه عندما يكون الهدف الأساسي هو الفحص مقابل قائمة الحظر.\n\nتكون `status` بقيمة `Declined` فقط عند انطلاق تحذير `FACE_IN_BLOCKLIST` أو `POSSIBLE_FACE_IN_BLOCKLIST`؛ بينما لا تؤدي `DUPLICATED_FACE` / `POSSIBLE_DUPLICATED_FACE` (`information`) و`MULTIPLE_FACES_DETECTED` (`warning`) إلى الرفض مطلقاً. على عكس كشف الحيوية السلبي، **لا** يستبعد هذا الـ endpoint الجلسات السابقة التي تحتوي على `vendor_data` نفسها من المطابقة. يتم أيضاً تشغيل تحليل كشف الحيوية السلبي داخلياً وتخزينه مع الجلسة المحفوظة، لكن نتيجته ليست جزءاً من هذه الاستجابة.\n\n**الفوترة.** تستهلك كل استجابة `200` رصيد API واحداً للبحث بالوجه (يُدفع من رصيد خطتك أو رصيد الشحن). يؤدي عدم كفاية الرصيد إلى إرجاع `403` قبل معالجة أي صورة.\n\n**حفظ الجلسة وتسجيل الوجه (`save_api_request`، القيمة الافتراضية `true`).** عندما تكون القيمة `true`، يتم حفظ الاستدعاء كجلسة من نوع API‏ (Business Console، و`GET /v3/session/{sessionId}/decision/` عبر `request_id` المُرجع، وwebhook الخاص بـ `status.updated`) ويتم تسجيل الوجه الذي تم البحث عنه في فهرس البحث بالوجه الخاص بك. يتم استبعاد الوجوه المُسجَّلة بواسطة استدعاءات البحث بالوجه من نتائج البحث بالوجه المستقبلية، بحيث لا تتطابق عمليات البحث المتكررة مع بعضها البعض مطلقاً. عندما تكون القيمة `false`، يكون الاستدعاء لمرة واحدة: لا يتم تخزين أي شيء، ولا يتم تسجيل الوجه، وتكون قيم `match_image_url` مسارات تخزين داخلية وليست عناوين URL قابلة للتنزيل.\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية كل المعالجة والفوترة: بعد التحقق من صحة الطلب (المدخلات غير الصالحة لا تزال تُرجع `400`)، يُرجع الـ endpoint نموذج payload وهمياً ثابتاً بحالة `Approved`، ولا يتم حفظ أي جلسة، ولا يتم استهلاك أي رصيد.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة `403`‏ (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا يُرجع هذا الـ API الرمز `401` مطلقاً.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE؛ يؤدي تجاوزها إلى إرجاع `429`.",
        "operationId": "post_v3face-search",
        "x-didit-sdk": {
          "resource": "face_search",
          "method": "search",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "user_image"
                ],
                "properties": {
                  "user_image": {
                    "type": "string",
                    "format": "binary",
                    "description": "صورة وجه أمامية للبحث بها. الامتدادات المسموح بها: `tiff`، `jpg`، `jpeg`، `png`، `webp`. الحد الأقصى لحجم الرفع: **5 MB** (يتم رفض الملفات الأكبر حجماً بالرمز `400`). يتم ضغط الصور تلقائياً إلى ~0.5 MB قبل المعالجة، لذا فإن دقة الصور العالية جداً لا تحسّن دقة النتائج. يجب أن تحتوي الصورة على وجه واحد قابل للاكتشاف على الأقل — وإلا فسيُرجع endpoint الرمز `400`. عند وجود عدة وجوه، يتم البحث عن الوجه الأكبر ويُضاف تحذير `MULTIPLE_FACES_DETECTED`."
                  },
                  "search_type": {
                    "type": "string",
                    "default": "most_similar",
                    "enum": [
                      "most_similar",
                      "blocklisted_or_approved"
                    ],
                    "description": "سياسة البحث. يقوم `most_similar` (الافتراضي) بترتيب كل وجه مسجل في تطبيقك حسب درجة التشابه. بينما يقصر `blocklisted_or_approved` المرشحين على الوجوه المدرجة في قائمة الحظر، والوجوه المدرجة في القائمة المسموح بها، والوجوه من الجلسات المقبولة، والوجوه المستوردة من الملفات التعريفية للمستخدمين — مع ترتيب الإدخالات المدرجة في قائمة الحظر أولاً.",
                    "example": "most_similar"
                  },
                  "rotate_image": {
                    "type": "boolean",
                    "default": false,
                    "description": "عندما تكون `true`، تجرب الخدمة تدوير الإدخال بزيادات قدرها 90 درجة وتستخدم الاتجاه الذي يحقق أفضل كشف للوجه. مفيد عند فقدان اتجاه EXIF. يضيف تأخيراً في الاستجابة.",
                    "example": false
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "عندما تكون `true` (الافتراضي)، يتم حفظ الاستدعاء كجلسة من نوع API، وإرسال webhook من نوع `status.updated`، وتوقيع قيم `match_image_url` مسبقاً، وتسجيل الوجه الذي تم البحث عنه في فهرس البحث بالوجه الخاص بك (تُستثنى عمليات تسجيل البحث بالوجه من عمليات البحث المستقبلية). عندما تكون `false`، يكون البحث لمرة واحدة فقط — لا يتم تخزين أي جلسة ولا يتم تسجيل الوجه.",
                    "example": true
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "معرّف مبهم اختياري (معرّف المستخدم لديك، البريد الإلكتروني، UUID...) يتم تخزينه في الجلسة المحفوظة وإعادته. لا يستبعد وجوه نفس المستخدم من نتائج البحث.",
                    "example": "user-123"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "كائن JSON اختياري يُخزن مع الجلسة (عندما يكون `save_api_request=true`) ويُعاد في الاستجابة. في طلبات multipart، أرسله كحقل سلسلة نصية بترميز JSON — حيث يتم تحليله إلى كائن.",
                    "example": {
                      "flow": "dedup_check"
                    }
                  }
                }
              },
              "example": {
                "user_image": "(binary JPEG/PNG selfie)",
                "search_type": "most_similar",
                "rotate_image": false,
                "save_api_request": true,
                "vendor_data": "user-123",
                "metadata": {
                  "flow": "dedup_check"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل البحث بالوجه. يحتوي الحقل `face_search.matches` على ما يصل إلى 5 وجوه مشابهة مرتبة حسب درجة التشابه؛ وتشير المصفوفة الفارغة إلى عدم تجاوز أي وجه مُسجّل للحد الأدنى من التشابه. تكون الحالة `status` هي `Declined` فقط عند التطابق مع قائمة الحظر — أما التطابقات المكررة وحدها فترجع `Approved`، لذا تحقّق من `matches` و`warnings`، وليس من `status` فقط. عندما تكون `save_api_request=true`، يكون `request_id` هو معرّف الجلسة المحفوظة. يحمل كل تطابق `source` (سواء `session`، أو `imported`، أو `list_entry`، أو `retained_template`)، و`vendor_user_id`، و`biometric_template_id`؛ ويأتي التطابق من نوع `retained_template` من قالب بيومتري خالٍ من الصور يتم الاحتفاظ به بعد حذف الجلسة المصدرية وتكون حقول الجلسة و`match_image_url` و`user_details` الخاصة به بقيمة `null`.",
            "content": {
              "application/json": {
                "examples": {
                  "Blocklist hit (Declined)": {
                    "summary": "الوجه يطابق وجهاً مدرجاً في قائمة الحظر",
                    "value": {
                      "request_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
                      "face_search": {
                        "status": "Declined",
                        "total_matches": 1,
                        "matches": [
                          {
                            "session_id": "882c42d5-8a4d-4d20-8080-a22f57822c86",
                            "session_number": 323442,
                            "similarity_percentage": 99.99,
                            "source": "session",
                            "vendor_data": "user-1",
                            "verification_date": "2025-01-01T00:00:00Z",
                            "user_details": {
                              "full_name": "Jane Marie Doe",
                              "document_type": "ID",
                              "document_number": "X1234567"
                            },
                            "match_image_url": "https://<media-host>/face/3f6a1c2e/reference.jpg",
                            "status": "Approved",
                            "is_blocklisted": true,
                            "is_allowlisted": false,
                            "api_service": null,
                            "vendor_user_id": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f",
                            "biometric_template_id": null
                          }
                        ],
                        "user_image": {
                          "entities": [
                            {
                              "bbox": [
                                40,
                                40,
                                120,
                                120
                              ],
                              "confidence": 0.732973
                            }
                          ],
                          "best_angle": 0
                        },
                        "warnings": [
                          {
                            "risk": "FACE_IN_BLOCKLIST",
                            "feature": "LIVENESS",
                            "additional_data": {
                              "blocklisted_session_id": "882c42d5-8a4d-4d20-8080-a22f57822c86",
                              "blocklisted_session_number": 323442,
                              "api_service": null
                            },
                            "log_type": "error",
                            "short_description": "Face in blocklist",
                            "long_description": "The system identified a face in the blocklist, which means the face is not allowed to be verified."
                          }
                        ]
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T01:04:42.763237+00:00"
                    }
                  },
                  "Duplicate found (Approved)": {
                    "summary": "ظهر الوجه بالفعل في جلسة مقبولة أخرى — معلوماتي فقط، بدون رفض",
                    "value": {
                      "request_id": "5e0c3a1f-7b2d-4c8e-9f10-2a3b4c5d6e7f",
                      "face_search": {
                        "status": "Approved",
                        "total_matches": 1,
                        "matches": [
                          {
                            "session_id": "1f2e3d4c-5b6a-7980-1122-334455667788",
                            "session_number": 1024,
                            "similarity_percentage": 87.42,
                            "source": "session",
                            "vendor_data": "user-9",
                            "verification_date": "2025-11-20T09:15:00Z",
                            "user_details": null,
                            "match_image_url": "https://<media-host>/face/9c8b7a6d/reference.jpg",
                            "status": "Approved",
                            "is_blocklisted": false,
                            "is_allowlisted": false,
                            "api_service": "PASSIVE_LIVENESS",
                            "vendor_user_id": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f",
                            "biometric_template_id": null
                          }
                        ],
                        "user_image": {
                          "entities": [
                            {
                              "bbox": [
                                40,
                                40,
                                120,
                                120
                              ],
                              "confidence": 0.732973
                            }
                          ],
                          "best_angle": 0
                        },
                        "warnings": [
                          {
                            "risk": "DUPLICATED_FACE",
                            "feature": "LIVENESS",
                            "additional_data": {
                              "duplicated_session_id": "1f2e3d4c-5b6a-7980-1122-334455667788",
                              "duplicated_session_number": 1024,
                              "api_service": "PASSIVE_LIVENESS"
                            },
                            "log_type": "information",
                            "short_description": "Duplicated face from other approved session",
                            "long_description": "The system identified a duplicated face from another approved session, requiring further investigation."
                          }
                        ]
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T01:04:42.763237+00:00"
                    }
                  },
                  "No matches (Approved)": {
                    "summary": "لم يتجاوز أي وجه مسجل الحد الأدنى للتشابه",
                    "value": {
                      "request_id": "9d8c7b6a-5f4e-3d2c-1b0a-998877665544",
                      "face_search": {
                        "status": "Approved",
                        "total_matches": 0,
                        "matches": [],
                        "user_image": {
                          "entities": [
                            {
                              "bbox": [
                                40,
                                40,
                                120,
                                120
                              ],
                              "confidence": 0.732973
                            }
                          ],
                          "best_angle": 0
                        },
                        "warnings": []
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T01:04:42.763237+00:00"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة المحفوظة عندما تكون `save_api_request=true` (يمكن استخدامه مع `GET /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID ارتباط مؤقت."
                    },
                    "face_search": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "Approved",
                            "Declined"
                          ],
                          "description": "`Declined` فقط عند إطلاق تحذير `FACE_IN_BLOCKLIST` أو `POSSIBLE_FACE_IN_BLOCKLIST`. لا تؤدي التطابقات المكررة وتحذيرات الوجوه المتعددة إلى الرفض أبداً."
                        },
                        "total_matches": {
                          "type": "integer",
                          "description": "عدد الإدخالات في `matches` (0–5).",
                          "example": 1
                        },
                        "matches": {
                          "type": "array",
                          "maxItems": 5,
                          "description": "ما يصل إلى 5 وجوه من فهرس البحث بالوجه الخاص بك والتي تتجاوز الحد الأدنى للتشابه، مرتبة حسب التشابه (مع تصنيف الإدخالات المدرجة في قائمة الحظر أولاً عندما تكون `search_type=blocklisted_or_approved`). تكون فارغة عندما لا يكون أي وجه مسجل مشابهاً بدرجة كافية.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "session_id": {
                                "type": "string",
                                "format": "uuid",
                                "nullable": true,
                                "description": "معرّف جلسة التحقق التي ينتمي إليها الوجه المطابق. يكون `null` عندما يكون `source` هو `imported` أو `list_entry` أو `retained_template`.",
                                "example": "882c42d5-8a4d-4d20-8080-a22f57822c86"
                              },
                              "session_number": {
                                "type": "integer",
                                "nullable": true,
                                "description": "رقم الجلسة السهل القراءة المعروض في Business Console. يكون `null` لحالات التطابق التي لا تخص جلسة.",
                                "example": 323442
                              },
                              "similarity_percentage": {
                                "type": "number",
                                "format": "float",
                                "minimum": 0,
                                "maximum": 100,
                                "description": "التشابه بين الوجه المُرسَل والوجه المطابق (0–100).",
                                "example": 99.99
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "session",
                                  "imported",
                                  "list_entry",
                                  "retained_template"
                                ],
                                "description": "مصدر تسجيل الوجه المتطابق: `session` — جلسة تحقق أو استدعاء API مستقل ومحفوظ؛ `imported` — وجه تم رفعه مباشرة إلى ملف تعريف المستخدم؛ `list_entry` — وجه مرتبط بإحدى قوائمك؛ `retained_template` — قالب بيومتري بدون صورة مخزّن لدى المستخدم، ومُدرج تحت `/v3/biometric-templates/`."
                              },
                              "vendor_data": {
                                "type": "string",
                                "nullable": true,
                                "description": "`vendor_data` للجلسة المطابقة أو المستخدم المرتبط للوجوه المستوردة والوجوه ذات القوالب المحتفظ بها.",
                                "example": "user-1"
                              },
                              "vendor_user_id": {
                                "type": "string",
                                "format": "uuid",
                                "nullable": true,
                                "description": "معرّف المستخدم المرتبط. يكون `null` لمدخلات القوائم وتطابقات الجلسات غير المرتبطة بمستخدم.",
                                "example": "2f7c1a9e-4b28-4a6d-97f1-83576f80e1b4"
                              },
                              "biometric_template_id": {
                                "type": "string",
                                "format": "uuid",
                                "nullable": true,
                                "description": "معرّف القالب البيومتري المحتفظ به. يتم تعيينه فقط عندما يكون `source` هو `retained_template`؛ و`null` بخلاف ذلك.",
                                "example": null
                              },
                              "verification_date": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "description": "متى تم التقاط الوجه المطابق في الأصل، أو متى تم إنشاء قالب محتفظ به (`YYYY-MM-DDThh:mm:ssZ`). وتكون `null` لتطابقات `list_entry`.",
                                "example": "2025-01-01T00:00:00Z"
                              },
                              "user_details": {
                                "type": "object",
                                "nullable": true,
                                "description": "بيانات الهوية المستخرجة أثناء التحقق من مستندات الجلسة المتطابقة. تكون `null` عندما لا تحتوي الجلسة المتطابقة على بيانات مستند (مثل جلسات كشف الحيوية فقط)، وتكون دائماً `null` للتطابقات من نوع `retained_template`. أما بالنسبة للتطابقات ذات `source: imported`، فيتم ملؤها من ملف تعريف المستخدم بدلاً من ذلك: يتم تعيين `full_name`، وتكون قيمة `document_type`/`document_number` هي null.",
                                "properties": {
                                  "full_name": {
                                    "type": "string",
                                    "nullable": true,
                                    "example": "Jane Marie Doe"
                                  },
                                  "document_type": {
                                    "type": "string",
                                    "nullable": true,
                                    "example": "ID"
                                  },
                                  "document_number": {
                                    "type": "string",
                                    "nullable": true,
                                    "example": "X1234567"
                                  }
                                }
                              },
                              "match_image_url": {
                                "type": "string",
                                "nullable": true,
                                "description": "رابط URL محدد الصلاحية زمنيًا (`https://<media-host>/...`) للصورة المرجعية للوجه المطابق عندما يكون `save_api_request=true`. أما مع `save_api_request=false`، فهذا مسار تخزين داخلي لا يمكن تنزيله مباشرةً. يكون دائمًا `null` للمطابقات من نوع `retained_template` لأن القوالب المحتفظ بها لا تحتوي على صورة.",
                                "example": "https://<media-host>/face/3f6a1c2e/reference.jpg"
                              },
                              "status": {
                                "type": "string",
                                "nullable": true,
                                "description": "حالة الجلسة المتطابقة (`Approved`، `Declined`، `In Review`، …). تكون `null` للتطابقات من نوع `imported`/`list_entry`.",
                                "example": "Approved"
                              },
                              "is_blocklisted": {
                                "type": "boolean",
                                "description": "تكون `true` عندما يكون الوجه المطابق مدرجاً في قائمة حظر الوجوه الخاصة بك. أي مطابقة مشابهة بدرجة كافية ومدرجة في قائمة الحظر تؤدي إلى رفض البحث."
                              },
                              "is_allowlisted": {
                                "type": "boolean",
                                "description": "تكون `true` عندما يكون الوجه المطابق مدرجاً في إحدى قوائم السماح الخاصة بك. تؤدي المطابقات في قائمة السماح إلى منع تحذيرات التكرار."
                              },
                              "api_service": {
                                "type": "string",
                                "nullable": true,
                                "description": "يتم تعيينه عندما يتم تسجيل الوجه المطابق عبر استدعاء API مستقل (مثل `PASSIVE_LIVENESS`)؛ وتكون القيمة `null` لجلسات التحقق العادية والوجوه المستوردة.",
                                "example": null
                              }
                            }
                          }
                        },
                        "user_image": {
                          "type": "object",
                          "description": "نتائج كشف الوجه للصورة المُرسلة. تتضمن المدخلات هنا الحقلين `bbox` و`confidence` فقط.",
                          "properties": {
                            "entities": {
                              "type": "array",
                              "description": "إدخال واحد لكل وجه مكتشف. ويتم البحث باستخدام الوجه الأكبر.",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "bbox": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer"
                                    },
                                    "minItems": 4,
                                    "maxItems": 4,
                                    "description": "المربع المحيط `[x_min, y_min, x_max, y_max]` بالبكسل.",
                                    "example": [
                                      40,
                                      40,
                                      120,
                                      120
                                    ]
                                  },
                                  "confidence": {
                                    "type": "number",
                                    "format": "float",
                                    "minimum": 0,
                                    "maximum": 1,
                                    "description": "درجة الثقة في كشف الوجه (0–1).",
                                    "example": 0.732973
                                  }
                                }
                              }
                            },
                            "best_angle": {
                              "type": "integer",
                              "description": "زاوية التدوير (بالدرجات) التي حققت أفضل كشف للوجه؛ ولا تكون غير صفرية إلا عندما يصحح `rotate_image=true` الاتجاه. لا تكون null أبداً في هذا الـ endpoint (تكون قيمتها الافتراضية 0 إذا أغفلها النموذج).",
                              "example": 0
                            }
                          }
                        },
                        "warnings": {
                          "type": "array",
                          "description": "إشارات المخاطر. تؤدي `FACE_IN_BLOCKLIST` / `POSSIBLE_FACE_IN_BLOCKLIST` (`error`) إلى رفض البحث؛ بينما تُعد `MULTIPLE_FACES_DETECTED` (`warning`) و`DUPLICATED_FACE` / `POSSIBLE_DUPLICATED_FACE` (`information`) إشارات استرشادية.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "risk": {
                                "type": "string",
                                "enum": [
                                  "MULTIPLE_FACES_DETECTED",
                                  "FACE_IN_BLOCKLIST",
                                  "POSSIBLE_FACE_IN_BLOCKLIST",
                                  "DUPLICATED_FACE",
                                  "POSSIBLE_DUPLICATED_FACE"
                                ],
                                "description": "رمز مخاطر مقروء آلياً."
                              },
                              "feature": {
                                "type": "string",
                                "enum": [
                                  "LIVENESS"
                                ],
                                "description": "الميزة التي أصدرت التحذير. دائماً `LIVENESS` في هذا الـ endpoint."
                              },
                              "additional_data": {
                                "type": "object",
                                "nullable": true,
                                "additionalProperties": true,
                                "description": "`null` لـ `MULTIPLE_FACES_DETECTED`. تحمل التطابقات مع قائمة الحظر `{blocklisted_session_id, blocklisted_session_number, api_service}`؛ بينما تحمل التطابقات المكررة `{duplicated_session_id, duplicated_session_number, api_service}` التي تشير إلى أول جلسة متطابقة."
                              },
                              "log_type": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warning",
                                  "information"
                                ],
                                "description": "مستوى الخطورة. تحذيرات `error` تنقل `status` إلى `Declined`؛ وإدخالات `warning` و`information` استشارية ولا تؤدي إلى الرفض بمفردها أبداً."
                              },
                              "short_description": {
                                "type": "string",
                                "description": "ملخص للمخاطر في سطر واحد مقروء للبشر."
                              },
                              "long_description": {
                                "type": "string",
                                "description": "تفسير سهل القراءة للمخاطر."
                              }
                            }
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، أو `null`."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "نسخة مطابقة من كائن `metadata` الذي أرسلته، أو `null`."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "طابع زمني بتنسيق ISO 8601 (بالتوقيت العالمي المنسق UTC) لوقت إنشاء الاستجابة، مثل `2026-06-12T01:04:42.763237+00:00`."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. يتم إرجاعه عندما تكون `user_image` مفقودة، أو يتجاوز حجمها 5 MB، أو يكون امتدادها غير مدعوم، أو عند **عدم اكتشاف أي وجه** في الصورة المُرسلة. تستخدم أخطاء الحقول غلاف `{field: [messages]}` الخاص بـ DRF؛ بينما تستخدم حالات فشل اكتشاف الوجه `{\"error\": ...}`.",
            "content": {
              "application/json": {
                "examples": {
                  "No face detected": {
                    "summary": "تم فك ترميز الصورة بنجاح ولكنها لا تحتوي على أي وجه يمكن اكتشافه",
                    "value": {
                      "error": "No face detected in the image"
                    }
                  },
                  "Missing image": {
                    "summary": "لم يتم تضمين `user_image` في بيانات النموذج",
                    "value": {
                      "user_image": [
                        "No file was submitted."
                      ]
                    }
                  },
                  "Unsupported file extension": {
                    "summary": "امتداد الملف خارج tiff/jpg/jpeg/png/webp",
                    "value": {
                      "user_image": [
                        "File extension “txt” is not allowed. Allowed extensions are: tiff, jpg, jpeg, png, webp."
                      ]
                    }
                  },
                  "File too large": {
                    "summary": "يتجاوز الملف المرفوع حد 5 ميجابايت",
                    "value": {
                      "user_image": [
                        "File size should not exceed 5 MB"
                      ]
                    }
                  }
                }
              }
            }
          },
          "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/face-search/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'user_image=@./selfie.jpg' \\\n  -F 'search_type=most_similar' \\\n  -F 'save_api_request=true' \\\n  -F 'vendor_data=user-123'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.face_search.search(\n    user_image=open(\"user_image.jpg\", \"rb\"),\n    search_type=\"most_similar\",\n    rotate_image=False,\n    save_api_request=True,\n    vendor_data=\"user-123\",\n    metadata={\"flow\": \"dedup_check\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.faceSearch.search({\n  user_image: await fileFromPath(\"user_image.jpg\"),\n  search_type: \"most_similar\",\n  rotate_image: false,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"dedup_check\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FaceSearch.Search(ctx, didit.FaceSearchSearchParams{\n\tUserImage:      didit.FileFromPath(\"user_image.jpg\"),\n\tSearchType:     didit.Some(didit.FaceSearchSearchParamsSearchType(\"most_similar\")),\n\tRotateImage:    didit.Bool(false),\n\tSaveAPIRequest: didit.Bool(true),\n\tVendorData:     didit.String(\"user-123\"),\n\tMetadata:       didit.Some(map[string]any{\"flow\": \"dedup_check\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.FaceSearchSearchParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.faceSearch().search(FaceSearchSearchParams.builder()\n        .userImage(Path.of(\"user_image.jpg\"))\n        .searchType(FaceSearchSearchParams.SearchType.of(\"most_similar\"))\n        .rotateImage(false)\n        .saveApiRequest(true)\n        .vendorData(\"user-123\")\n        .metadata(Map.of(\"flow\", \"dedup_check\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->faceSearch->search([\n    'user_image' => File::fromPath('user_image.jpg'),\n    'search_type' => 'most_similar',\n    'rotate_image' => false,\n    'save_api_request' => true,\n    'vendor_data' => 'user-123',\n    'metadata' => ['flow' => 'dedup_check'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.face_search.search(\n  user_image: Pathname(\"user_image.jpg\"),\n  search_type: \"most_similar\",\n  rotate_image: false,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"dedup_check\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FaceSearch.SearchAsync(new FaceSearchSearchParams\n{\n    UserImage = FileUpload.FromPath(\"user_image.jpg\"),\n    SearchType = new FaceSearchSearchParamsSearchType(\"most_similar\"),\n    RotateImage = false,\n    SaveApiRequest = true,\n    VendorData = \"user-123\",\n    Metadata = new Dictionary<string, object> { [\"flow\"] = \"dedup_check\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/sessions/": {
      "get": {
        "summary": "عرض قائمة بجلسات التحقق (KYC و/أو KYB) مع خيارات التصفية والتقسيم إلى صفحات",
        "description": "يُرجع قائمة مقسمة إلى صفحات من جلسات التحقق للتطبيق المحدد بواسطة مفتاح API الخاص بك، بدءاً من الأحدث (تنازلياً حسب `session_number`).\n\n**الرابط الأساسي:** المسار هو `/v3/sessions/` (بشرطة مائلة لاحقة). تتلقى الطلبات المرسلة إلى `/v3/sessions` بدون الشرطة المائلة إعادة توجيه `301` إلى الرابط المشتمل على الشرطة المائلة مع الاحتفاظ بسلسلة الاستعلام؛ وتتبع معظم عملاء HTTP ذلك تلقائياً عند طلبات GET.\n\n**متى تستخدم هذا الـ endpoint مقابل webhooks.** استخدم هذا الـ endpoint للوحات التحكم، والبحث في الأنظمة الخلفية، ومطابقة البيانات، وعمليات التصدير المجمعة. لا تعتمد على الاستقصاء الدوري له لتتبع تقدم عمليات التحقق الفردية - قم بإعداد [webhooks](/ar/integration/webhooks) بدلاً من ذلك، والتي ترسل أحداث `status.updated` فور حدوث أي تغيير في الجلسة. للحصول على النتيجة الكاملة لجلسة واحدة، استدعِ `GET /v3/session/{sessionId}/decision/`.\n\n**جلسات KYC وKYB.** يحدد `session_kind` الأنواع المدرجة في القائمة:\n- `user` (افتراضي) - جلسات التحقق من المستخدمين (KYC) فقط. سلوك متوافق مع الإصدارات السابقة.\n- `business` - جلسات التحقق من الشركات (KYB) فقط. تختلف صفوفها ويكون حجمها أصغر (راجع مخطط الاستجابة).\n- `all` - كلا النوعين في استجابة واحدة: يتم دمج صفحة KYC وصفحة KYB لنفس `limit`/`offset` في `results` (صفوف KYC أولاً)، بحيث يمكن أن تحتوي الصفحة على ما يصل إلى `2 x limit` صفاً. يمثل `count` مجموع كلا النوعين، ويعكس `next`/`previous` تقسيم الصفحات من جانب KYC. للتقسيم الدقيق لصفحات البيانات المختلطة، استدعِ `user` و`business` بشكل منفصل.\n\nيحمل كل صف معرّف تمييز `session_kind` (`\"user\"` أو `\"business\"`).\n\n**تقسيم الصفحات.** نظام limit/offset القياسي: `limit` (افتراضياً 50) و`offset` (افتراضياً 0)، مع روابط صفحات جاهزة في `next`/`previous`. بالنسبة لصفوف KYC، يكون `count` دقيقاً. أما بالنسبة لصفوف KYB، فيُحسب `count` عبر فحص محدود ويبلغ حده الأقصى 100 - عندما يكون هناك أكثر من 100 تطابق، يظل عند 100، لذا تنقّل بين الصفحات باستخدام `next` (أو بالتحقق مما إذا كانت الصفحة قد عادت مكتملة) بدلاً من حساب إجمالي الصفحات من `count`.\n\n**دلالات عوامل التصفية.** تتحد جميع عوامل التصفية باستخدام المعامل «و» (AND) وتنطبق على صفوف KYC. عندما يكون `session_kind` هو `business` أو `all`، يلتزم جانب KYB بالمعاملات المشتركة `vendor_data` و`status` و`workflow_id` و`country` (رمز دولة سجل الشركة) و`date_from` و`date_to` و`search` (اسم الشركة، أو رقم التسجيل — اكتب أرقام التسجيل بدون فواصل، مثل `DPC001` وليس `DPC-001` — أو vendor_data، أو رقم الجلسة، أو المعرّف الفريد للجلسة UUID) و`warning` و`organization_name`؛ ويتم تجاهل باقي عوامل التصفية المخصصة لـ KYC فقط مع صفوف KYB. المعاملات المفصولة بفواصل (`status`، `country`، `document_type`، `region`، `workflow_id`، `document_name`، `warning`، `organization_name`، `session_type`) تطابق أي قيمة من القيم المدرجة (المعامل «أو» (OR) داخل المعامل). المعامل `vendor_data` يمثل تطابقاً تاماً - استخدم `search` للمطابقة الجزئية. القيم غير المعروفة في عوامل تصفية القوائم تُرجع ببساطة بدون صفوف (بدون خطأ)؛ أما القيم ذات التنسيق غير الصحيح (`date_from`، `date_to`، `didit_internal_id`، `api_service`، `session_kind`) فتُرجع `400` مع كائن خطأ لكل حقل.\n\n**البحث.** يتكيف `search` مع المدخلات: يُستخدم معرّف UUID الكامل للبحث عن `session_id`؛ وتطابق الأرقام (مع إمكانية وجود `+ - . space`) بادئة رقم الجلسة، أو أرقام المستند/الأرقام الشخصية، أو بادئة رقم الهاتف، أو `vendor_data`؛ وتطابق القيم التي تحتوي على `@` بادئات البريد الإلكتروني؛ وأي نص آخر يطابق الأسماء (بدون حساسية للحركات والتشكيل) و`vendor_data`.\n\nلا يُفرض حد معدل ثابت لكل endpoint، ولكن يُرجى إبقاء الاستقصاء الدوري للقائمة غير متكرر والاعتماد على webhooks للتحديثات المباشرة.",
        "operationId": "get_v3_sessions",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "session_kind",
            "in": "query",
            "required": false,
            "description": "أي نوع من الجلسات سيتم إدراجه: `user` (KYC فقط، افتراضي)، أو `business` (KYB فقط)، أو `all` (كلاهما، مدمجان - راجع الوصف لمعرفة دلالات تقسيم الصفحات المدمج). المطابقة غير حساسة لحالة الأحرف (يعمل `BUSINESS`)؛ وأي قيمة أخرى لا تُعدّ صيغةً من صيغ حالة الأحرف لـ `user`/`business`/`all` تُرجع `400`.",
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "business",
                "all"
              ],
              "default": "user"
            },
            "example": "all"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "الحد الأقصى لعدد الصفوف لكل صفحة (لكل نوع عند `session_kind=all`). القيمة الافتراضية هي 50.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "example": 20
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "عدد الصفوف المراد تخطيها قبل أول صف مُرجع. القيمة الافتراضية هي 0. يُفضّل تتبّع عناوين URL في `next`/`previous` من الاستجابة.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "example": 20
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "قائمة مفصولة بفواصل لحالات الجلسة لتضمينها، مثل `Approved,In Review`. القيم حساسة لحالة الأحرف؛ راجع [حالات التحقق](/ar/integration/verification-statuses). القيم غير المعروفة لا تطابق أي شيء.",
            "schema": {
              "type": "string"
            },
            "example": "Approved,In Review"
          },
          {
            "name": "vendor_data",
            "in": "query",
            "required": false,
            "description": "عنصر تصفية للتطابق التام على `vendor_data` الذي أرسلته عند إنشاء الجلسة (معرّف المستخدم/الشركة الخاص بك). للمطابقات الجزئية، استخدم `search` بدلاً من ذلك.",
            "schema": {
              "type": "string"
            },
            "example": "your-user-id-123"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "المرجع الكامل المعروض مثل `S-0001` (مستخدم) أو `B-0001` (شركة) يطابق فقط رقم الجلسة ونوعها؛ لا تؤثر الأصفار البادئة وحالة الأحرف على المطابقة. بحث ذكي في النص الحر. يطابق معرّف UUID الكامل حقل `session_id`؛ بينما يطابق الإدخال الرقمي بادئة رقم الجلسة، أو أرقام المستندات/الأرقام الشخصية، أو بادئة الهاتف، أو `vendor_data`؛ ويطابق الإدخال الذي يحتوي على `@` بادئات البريد الإلكتروني؛ وتطابق النصوص الأخرى الأسماء (دون حساسية لعلامات التشكيل) و`vendor_data`. كما يطابق النص الحر الذي يحتوي على أرقام حقول البحث عن أرقام المستندات/الأرقام الشخصية وبادئات أرقام الجلسات بالإضافة إلى ذلك.",
            "schema": {
              "type": "string"
            },
            "example": "jane doe"
          },
          {
            "name": "workflow_id",
            "in": "query",
            "required": false,
            "description": "معرّفات سير العمل بصيغة UUID مفصولة بفواصل (يمكنك العثور عليها في صفحة Workflows في Console). يتم تجاهل معرّفات UUID غير الصالحة في القائمة؛ وإذا لم يكن أي منها صالحاً، فستكون النتيجة فارغة.",
            "schema": {
              "type": "string"
            },
            "example": "9f9b1234-aaaa-bbbb-cccc-1234567890ab"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "فقط الجلسات التي تم إنشاؤها في هذا التاريخ (UTC) أو بعده، بالتنسيق `YYYY-MM-DD`. التواريخ غير الصحيحة تُرجع `400`.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-06-01"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "فقط الجلسات التي تم إنشاؤها حتى هذا التاريخ (UTC)، بالتنسيق `YYYY-MM-DD`. بالنسبة لصفوف KYC، يتم تضمين اليوم بأكمله؛ أما بالنسبة لصفوف KYB، فإن المقارنة تكون `created_at <= date_to` (منتصف الليل)، لذا استخدم تاريخ اليوم التالي لتضمين يوم كامل من جلسات KYB.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-06-30"
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "معرّفات الوسوم مفصولة بفواصل (`tags` الخاصة بتطبيقك). تُرجع الجلسات التي تحمل أياً منها. يتم تجاهل المعرّفات التي لا تمثل UUIDs صالحة، وعندما لا يكون أي منها صالحاً تكون القائمة فارغة."
          },
          {
            "name": "decided_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "تاريخ ووقت بتنسيق ISO 8601. يُرجع الجلسات التي تغيرت حالتها آخر مرة عنده أو بعده. يقوم بالتصفية بناءً على وقت آخر تغيير للحالة، وليس وقت الإنشاء."
          },
          {
            "name": "decided_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "تاريخ ووقت بتنسيق ISO 8601. يُرجع الجلسات التي تغيرت حالتها آخر مرة قبله. يمكن دمجه مع `decided_from` للحصول على نطاق نصف مفتوح."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "تصفية الدولة مفصولة بفواصل. لصفوف KYC: رموز ISO 3166-1 alpha-3 لدولة إصدار مستند الهوية (مثل `ESP,USA`)، والتي قد تختلف عن الجنسية. لصفوف KYB: رمز دولة الشركة المسجلة.",
            "schema": {
              "type": "string"
            },
            "example": "ESP,USA"
          },
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "description": "رموز أنواع مستندات الهوية المفصولة بفواصل والتي تم التحقق منها في الجلسة (صفوف KYC فقط): `P` (جواز سفر)، `ID` (بطاقة هوية)، `DL` (رخصة قيادة)، `RP` (تصريح إقامة)، `SSC` (بطاقة الضمان الاجتماعي)، `HIC` (بطاقة التأمين الصحي)، `WP` (تصريح عمل)، `TC` (بطاقة ضريبية)، `VISA`، `PSC` (بطاقة الخدمات العامة)، `BC` (شهادة ميلاد)، `OTHER`. لاحظ أن حقل الاستجابة `document_type` يحتوي على اسم العرض، وليس الرمز.",
            "schema": {
              "type": "string"
            },
            "example": "P,ID"
          },
          {
            "name": "document_name",
            "in": "query",
            "required": false,
            "description": "أسماء المستندات الدقيقة؛ يمكن تمرير عدة أسماء مفصولة بفواصل، ولكن لا يتم تقسيم القيمة عند الفواصل إلا إذا كانت تحتوي على أكثر من فاصل ` - ` واحد (تتم مطابقة الاسم المنفرد الذي يحتوي على فاصلة مدمجة بالكامل). الأسماء كما تم التعرف عليها بواسطة التحقق من المستندات (الوجه الأمامي أو الخلفي)، على سبيل المثال `Spain - Id Card (2021)`. صفوف KYC فقط.",
            "schema": {
              "type": "string"
            },
            "example": "Spain - Id Card (2021)"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "قيم المنطقة/الولاية للمستند مفصولة بفواصل (للمستندات الصادرة حسب المنطقة، مثل رخص القيادة الأمريكية). صفوف KYC فقط.",
            "schema": {
              "type": "string"
            },
            "example": "CA,TX"
          },
          {
            "name": "didit_internal_id",
            "in": "query",
            "required": false,
            "description": "التصفية حسب معرّف المستخدم الداخلي لدى Didit (حقل الاستجابة `didit_internal_id`) لإدراج جميع جلسات مستخدم واحد تم التحقق منه. يجب أن يكون UUID صالحاً؛ وترجع القيم غير صحيحة التنسيق `400`. صفوف KYC فقط.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "d9e78474-6c8d-4f2a-bb90-6f5c2f3a1147"
          },
          {
            "name": "session_type",
            "in": "query",
            "required": false,
            "description": "قنوات إنشاء الجلسة مفصولة بفواصل: `API`، `HOSTED`، `MIGRATED`. القيمة الخاصة `ALL` (أو حذف المعامل) تعطل التصفية. لصفوف KYC فقط.",
            "schema": {
              "type": "string"
            },
            "example": "HOSTED"
          },
          {
            "name": "api_service",
            "in": "query",
            "required": false,
            "description": "تصفية جلسات API المستقلة حسب الخدمة. تُرجع القيم غير الصالحة `400`. لصفوف KYC فقط.",
            "schema": {
              "type": "string",
              "enum": [
                "ID_VERIFICATION",
                "FACE_MATCH",
                "AGE_ESTIMATION",
                "FACE_SEARCH",
                "POA",
                "AML",
                "KYB_REGISTRY",
                "PASSIVE_LIVENESS",
                "DATABASE_VALIDATION",
                "PHONE_VERIFICATION",
                "EMAIL_VERIFICATION"
              ]
            },
            "example": "AML"
          },
          {
            "name": "screened_full_name",
            "in": "query",
            "required": false,
            "description": "بحث في الأسماء غير حساس لعلامات التشكيل داخل البيانات التي تم فحصها عبر AML والتحقق من قواعد البيانات. عند دمجه مع `api_service=AML` أو `api_service=DATABASE_VALIDATION`، يقتصر البحث على البيانات التي تم فحصها لتلك الميزة فقط. صفوف KYC فقط.",
            "schema": {
              "type": "string"
            },
            "example": "Jane Doe"
          },
          {
            "name": "warning",
            "in": "query",
            "required": false,
            "description": "رموز مخاطر التحذيرات مفصولة بفواصل؛ تُرجع الجلسات التي أثارت أياً منها (مثل `POSSIBLE_FRAUD`). رموز المخاطر مدرجة لكل ميزة في [توثيق التحذيرات](/ar/integration/webhooks). تنطبق على صفوف KYC، وتنطبق مع رموز تحذيرات الشركات على صفوف KYB.",
            "schema": {
              "type": "string"
            },
            "example": "POSSIBLE_FRAUD"
          },
          {
            "name": "status_initialized_as_in_review",
            "in": "query",
            "required": false,
            "description": "عندما تكون `true`، يتم تضمين الجلسات فقط التي كان قرارها في البداية `In Review` (مفيد لتدقيق حجم المراجعة اليدوية). صفوف KYC فقط.",
            "schema": {
              "type": "boolean"
            },
            "example": true
          },
          {
            "name": "is_kyc_to_be_reviewed",
            "in": "query",
            "required": false,
            "description": "تُرجع القيمة `true` الجلسات التي تم تمييز التحقق من المستندات فيها لإجراء مراجعة يدوية؛ وتُرجع القيمة `false` الجلسات التي لم يتم تمييز التحقق من المستندات فيها صراحةً. اترك المعامل دون تحديد للتعطيل. لصفوف KYC فقط.",
            "schema": {
              "type": "boolean"
            },
            "example": true
          },
          {
            "name": "euuid",
            "in": "query",
            "required": false,
            "description": "التصفية حسب euuid للمستخدم النهائي (UUID المعيّن للمستخدم الذي يجري التحقق، والمستخدم في الروابط العميقة للوحة التحكم). يجب أن يكون UUID صالحاً؛ تؤدي القيم غير الصالحة إلى ظهور خطأ 400 في الحقل. لصفوف KYC فقط.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0f8fad5b-d9cb-469f-a165-70867728950e"
          },
          {
            "name": "organization_name",
            "in": "query",
            "required": false,
            "description": "أسماء المؤسسات مفصولة بفواصل. مخصصة للوحة التحكم؛ مع مفتاح API (المحدد نطاقه بالفعل لتطبيق واحد)، فإنها تطابق فقط اسم مؤسستك.",
            "schema": {
              "type": "string"
            },
            "example": "Acme Inc"
          }
        ],
        "responses": {
          "200": {
            "description": "قائمة جلسات مقسّمة إلى صفحات. عناصر `results` هي صفوف KYC أو صفوف KYB أو كلاهما اعتماداً على `session_kind`؛ يتم التمييز بينها باستخدام حقل `session_kind` الخاص بكل صف.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد الجلسات المطابقة لعوامل التصفية: دقيق حتى 100 ويقتصر على 100 كحد أقصى بعد ذلك، لذا لا تستخدمه كإجمالي. استخدم `next` لمعرفة ما إذا كانت هناك صفحات أخرى. بالنسبة إلى `session_kind=all`، فهو مجموع كلا النوعين، مع اقتصار كل منهما على 100 كحد أقصى.",
                      "example": 2
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة.",
                      "example": "https://verification.didit.me/v3/sessions/?limit=20&offset=20"
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى.",
                      "example": null
                    },
                    "results": {
                      "type": "array",
                      "description": "صفوف الجلسات، الأحدث أولاً. مع `session_kind=all`، تأتي صفوف KYC أولاً، ثم صفوف KYB.",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/UserSessionListItem"
                          },
                          {
                            "$ref": "#/components/schemas/BusinessSessionListItem"
                          }
                        ],
                        "discriminator": {
                          "propertyName": "session_kind",
                          "mapping": {
                            "user": "#/components/schemas/UserSessionListItem",
                            "business": "#/components/schemas/BusinessSessionListItem"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "KYC sessions (default)": {
                    "summary": "session_kind=user - جلسة واحدة مكتملة وجلسة واحدة لم تبدأ",
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "session_id": "5b3720ed-d429-42ef-b67f-37ea805f48ee",
                          "session_kind": "user",
                          "session_number": 720,
                          "session_url": "https://verify.didit.me/session/CuXoBYCYVO5Y",
                          "portrait_image": "https://<media-host>/portraits/5b3720ed.jpg?X-Amz-Expires=3600&X-Amz-Signature=...",
                          "document_type": "Passport",
                          "full_name": "Jane Marie Doe",
                          "country": "ESP",
                          "status": "Approved",
                          "vendor_data": "your-user-id-123",
                          "didit_internal_id": "d9e78474-6c8d-4f2a-bb90-6f5c2f3a1147",
                          "created_at": "2026-06-09T12:26:54.328364Z",
                          "features": [
                            {
                              "feature": "ID_VERIFICATION",
                              "status": "Approved"
                            },
                            {
                              "feature": "LIVENESS",
                              "status": "Approved"
                            },
                            {
                              "feature": "FACE_MATCH",
                              "status": "Approved"
                            },
                            {
                              "feature": "AML",
                              "status": "Approved"
                            },
                            {
                              "feature": "IP_ANALYSIS",
                              "status": "Approved"
                            }
                          ],
                          "phone_number": {
                            "number": "+14155552671",
                            "is_verified": true
                          },
                          "email_address": {
                            "email": "jane@example.com",
                            "is_verified": true
                          },
                          "additional_details": {
                            "aml": {
                              "total_hits": 0,
                              "entity_type": "person",
                              "is_adverse_media_fetched": false
                            },
                            "liveness": {
                              "method": "PASSIVE",
                              "score": 0.98
                            },
                            "face_match": {
                              "score": 0.95
                            }
                          }
                        },
                        {
                          "session_id": "038ad62f-5ebd-46c2-afe9-4b2956bf687f",
                          "session_kind": "user",
                          "session_number": 719,
                          "session_url": "https://verify.didit.me/session/7RGKiO6ioGH6",
                          "portrait_image": null,
                          "document_type": null,
                          "full_name": null,
                          "country": null,
                          "status": "Not Started",
                          "vendor_data": "your-user-id-124",
                          "didit_internal_id": "eb4e679d-ca4b-461f-9685-687bac29ebdb",
                          "created_at": "2026-06-09T08:02:23.343053Z",
                          "features": [
                            {
                              "feature": "ID_VERIFICATION",
                              "status": "Not Finished"
                            },
                            {
                              "feature": "LIVENESS",
                              "status": "Not Finished"
                            },
                            {
                              "feature": "FACE_MATCH",
                              "status": "Not Finished"
                            },
                            {
                              "feature": "AML",
                              "status": "Not Finished"
                            },
                            {
                              "feature": "IP_ANALYSIS",
                              "status": "Not Finished"
                            }
                          ],
                          "phone_number": null,
                          "email_address": null,
                          "additional_details": null
                        }
                      ]
                    }
                  },
                  "Mixed KYC + KYB (session_kind=all)": {
                    "summary": "session_kind=all - صف KYC يليه صف KYB",
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "session_id": "5b3720ed-d429-42ef-b67f-37ea805f48ee",
                          "session_kind": "user",
                          "session_number": 720,
                          "session_url": "https://verify.didit.me/session/CuXoBYCYVO5Y",
                          "portrait_image": null,
                          "document_type": "Identity Card",
                          "full_name": "Jane Marie Doe",
                          "country": "ESP",
                          "status": "In Review",
                          "vendor_data": "your-user-id-123",
                          "didit_internal_id": "d9e78474-6c8d-4f2a-bb90-6f5c2f3a1147",
                          "created_at": "2026-06-09T12:26:54.328364Z",
                          "features": [
                            {
                              "feature": "ID_VERIFICATION",
                              "status": "In Review"
                            },
                            {
                              "feature": "LIVENESS",
                              "status": "Approved"
                            }
                          ],
                          "phone_number": null,
                          "email_address": null,
                          "additional_details": {
                            "liveness": {
                              "method": "PASSIVE",
                              "score": 0.98
                            }
                          }
                        },
                        {
                          "session_id": "8a1f63c2-1b9e-4f3a-9c41-2f6a1f0b7d52",
                          "session_kind": "business",
                          "session_number": 42,
                          "status": "Approved",
                          "vendor_data": "your-company-id-77",
                          "created_at": "2026-06-08T09:14:02.118450Z",
                          "workflow_id": "9f9b1234-aaaa-bbbb-cccc-1234567890ab",
                          "workflow_type": "kyb",
                          "workflow_label": "Standard KYB",
                          "company_name": "Acme Holdings S.L.",
                          "registration_number": "B12345678",
                          "country": "ES"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "301": {
            "description": "إعادة التوجيه إلى عنوان URL الأساسي المنتهي بشرطة مائلة. يُعاد عندما يكون مسار الطلب `/v3/sessions` (بدون شرطة مائلة في النهاية)؛ حيث يشير الرأس `Location` إلى `/v3/sessions/` مع الاحتفاظ بسلسلة الاستعلام. عادةً ما تتبعه عملاء GET تلقائياً."
          },
          "400": {
            "description": "معامل استعلام غير صالح. جسم الاستجابة هو كائن مفهرس بالمعامل المخالف.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid session_kind": {
                    "summary": "session_kind ليس واحداً من user/business/all",
                    "value": {
                      "session_kind": "Must be \"user\", \"business\", or \"all\"."
                    }
                  },
                  "Invalid date": {
                    "summary": "صيغة date_from/date_to غير صالحة",
                    "value": {
                      "date_from": [
                        "Enter a valid date."
                      ]
                    }
                  },
                  "Invalid didit_internal_id": {
                    "summary": "didit_internal_id ليس UUID",
                    "value": {
                      "didit_internal_id": [
                        "Enter a valid UUID."
                      ]
                    }
                  },
                  "Invalid api_service": {
                    "summary": "api_service ليس ضمن الخيارات المسموح بها",
                    "value": {
                      "api_service": [
                        "Select a valid choice. FOO is not one of the available choices."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو مشوه أو ملغى. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.\n\n**تطبيق محذوف:** لبضع دقائق بعد حذف تطبيق، قد يستجيب الطلب الذي تم إجراؤه باستخدام أحد مفاتيح API الخاصة به بـ `{\"detail\": \"This application was deleted.\", \"code\": \"application_deleted\"}`. لا تعد المحاولة: لم يعد التطبيق ومفاتيح API الخاصة به موجودين. بعد مرور تلك الدقائق القليلة، يتم رفض المفتاح كأي مفتاح آخر غير صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "You do not have permission to perform this action."
                    },
                    "code": {
                      "type": "string",
                      "description": "سبب مقروء آلياً، لا يتوفر إلا عند حدوث بعض حالات الفشل. `application_deleted`: مفتاح API يخص تطبيقاً تم حذفه.",
                      "example": "application_deleted"
                    }
                  },
                  "required": [
                    "detail"
                  ]
                },
                "examples": {
                  "Forbidden": {
                    "summary": "x-api-key مفقود أو غير صالح",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "ApplicationDeleted": {
                    "summary": "مفتاح API لتطبيق محذوف",
                    "value": {
                      "detail": "This application was deleted.",
                      "code": "application_deleted"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -s 'https://verification.didit.me/v3/sessions/?status=Approved,In%20Review&date_from=2026-06-01&limit=20' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.ListAutoPaging(ctx, didit.SessionsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->sessions->list() as $item) {\n    print_r($item);\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/share/": {
      "post": {
        "summary": "إنشاء token مشاركة لجلسة تحقق مكتملة",
        "description": "إنشاء JWT قصير الأجل يتيح لتطبيق Didit معين استيراد هذه الجلسة المكتملة. يُستخدم مع `POST /v3/session/import-shared/`.",
        "operationId": "post_v3_session_share",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "share",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "تم إصدار token المشاركة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "share_token": {
                      "type": "string",
                      "description": "JWT موقّع بـ HS256. مرِّر هذا كما هو كـ `share_token` إلى [`POST /v3/session/import-shared/`](/sessions-api/import-shared-session) في التطبيق المستهدف.",
                      "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                    },
                    "for_application_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "يُكرر UUID الخاص بالتطبيق المستهدف المرتبط به الـ token.",
                      "example": "a5f3bca2-46e2-411e-90ef-a580900a57ee"
                    },
                    "session_kind": {
                      "type": "string",
                      "enum": [
                        "user",
                        "business"
                      ],
                      "description": "ما إذا كانت الجلسة المصدر هي جلسة التحقق من المستخدمين (KYC) أو جلسة التحقق من الشركات (KYB)."
                    }
                  }
                },
                "examples": {
                  "User session": {
                    "summary": "مشاركة جلسة KYC",
                    "value": {
                      "share_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiMjBiYjNjM2ItNjE0Ni00MzlmLTg0YTQtYmQzMGQwMGFjNmEyIiwiZnJvbV9hcHBsaWNhdGlvbl9pZCI6ImRiZDIwZTM0LTQyZTktNGYyYy1iYTkxLWNmMDc2MjAxNmY2NCIsImZvcl9hcHBsaWNhdGlvbl9pZCI6ImE1ZjNiY2EyLTQ2ZTItNDExZS05MGVmLWE1ODA5MDBhNTdlZSIsImlhdCI6MTc1MzYzMDY2NiwiZXhwIjoxNzUzNjM0MjY2fQ.JJ9pNE_hqZsOtbR0XYZIWw4JzidjdEl279iUrsIkhGE",
                      "for_application_id": "a5f3bca2-46e2-411e-90ef-a580900a57ee",
                      "session_kind": "user"
                    }
                  },
                  "Business session": {
                    "summary": "مشاركة جلسة KYB",
                    "value": {
                      "share_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
                      "for_application_id": "a5f3bca2-46e2-411e-90ef-a580900a57ee",
                      "session_kind": "business"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "بيانات اعتماد مفقودة أو غير صالحة. على عكس معظم الـ endpoints في الإصدار v3، يقوم هذا الـ endpoint بالمصادقة من خلال الـ decorator الخاص بالأذونات ويُرجع `401` عند عدم تقديم token/مفتاح صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Unauthorized": {
                    "summary": "غير مصرح به",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة بقيمة `session_id` المحددة في تطبيقك.",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "summary": "لم يتم العثور على الجلسة",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تتم فهرسة أخطاء الحقول بحسب اسم الحقل؛ ويصل خطأ عدم الاكتمال تحت مفتاح `detail` (كمصفوفة).",
            "content": {
              "application/json": {
                "examples": {
                  "Wrong status": {
                    "summary": "جلسة المصدر لم تكتمل",
                    "value": {
                      "detail": [
                        "Only finished sessions (\"Approved\", \"Declined\", \"In Review\") can be shared."
                      ]
                    }
                  },
                  "Target missing": {
                    "summary": "التطبيق المستهدف غير موجود",
                    "value": {
                      "for_application_id": [
                        "Target application does not exist."
                      ]
                    }
                  },
                  "Self-share": {
                    "summary": "الهدف هو التطبيق المستدعي",
                    "value": {
                      "for_application_id": [
                        "Cannot share a session with the same application."
                      ]
                    }
                  },
                  "TTL bounds": {
                    "summary": "ttl_in_seconds خارج الحدود المسموح بها",
                    "value": {
                      "ttl_in_seconds": [
                        "Ensure this value is greater than or equal to 60."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات الاعتماد صالحة ولكن ينقصها إذن `write:sessions` لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "No Permission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "لا يوجد إذن"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق المصدر لإنشاء token لها.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "for_application_id"
                ],
                "properties": {
                  "for_application_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "معرّف UUID لتطبيق Didit الذي سيسترد الـ token. يجب أن يكون موجوداً، وألا يكون محذوفاً، ويجب أن يختلف عن التطبيق المستدعي. يمكنك العثور عليه في Business Console ضمن **Settings → Application**.",
                    "example": "a5f3bca2-46e2-411e-90ef-a580900a57ee"
                  },
                  "ttl_in_seconds": {
                    "type": "integer",
                    "description": "عمر token بالثواني. الحد الأدنى `60`، والحد الأقصى `86400` (24 ساعة). القيمة الافتراضية هي `3600` (ساعة واحدة).",
                    "minimum": 60,
                    "maximum": 86400,
                    "default": 3600,
                    "example": 3600
                  }
                }
              },
              "example": {
                "for_application_id": "a5f3bca2-46e2-411e-90ef-a580900a57ee",
                "ttl_in_seconds": 7200
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/share/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"for_application_id\": \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n    \"ttl_in_seconds\": 7200\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.share(\n    \"11111111-2222-3333-4444-555555555555\",\n    for_application_id=\"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n    ttl_in_seconds=7200,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.share(\"11111111-2222-3333-4444-555555555555\", {\n  for_application_id: \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n  ttl_in_seconds: 7200,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Share(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsShareParams{\n\tForApplicationID: \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n\tTTLInSeconds:     didit.Int(7200),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsShareParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().share(\"11111111-2222-3333-4444-555555555555\", SessionsShareParams.builder()\n        .forApplicationId(\"a5f3bca2-46e2-411e-90ef-a580900a57ee\")\n        .ttlInSeconds(7200L)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->share('11111111-2222-3333-4444-555555555555', [\n    'for_application_id' => 'a5f3bca2-46e2-411e-90ef-a580900a57ee',\n    'ttl_in_seconds' => 7200,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.share(\n  \"11111111-2222-3333-4444-555555555555\",\n  for_application_id: \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n  ttl_in_seconds: 7200\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ShareAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsShareParams\n{\n    ForApplicationId = \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n    TtlInSeconds = 7200,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/import-shared/": {
      "post": {
        "summary": "استرداد رمز مشاركة لنسخ جلسة تحقق إلى تطبيقك",
        "description": "استرداد رمز مشاركة لنسخ جلسة KYC أو KYB إلى التطبيق المستدعي باستخدام `session_id` جديد. العملية ليست idempotent — يتم استرداد الرمز مرة واحدة لكل مستلم.",
        "operationId": "post_v3_session_import_shared",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "import_shared",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "responses": {
          "201": {
            "description": "تم استنساخ الجلسة. جسم الاستجابة هو payload لقرار V3 لكلا النوعين، ويتم التمييز بينهما بواسطة `session_kind`: النوع `\"user\"` (KYC) مع كتل ميزات قائمة على القوائم مثل `id_verifications` و`liveness_checks` و`aml_screenings`؛ والنوع `\"business\"` (KYB) مع كتل مثل `registry_checks` و`key_people_checks`. يتضمن كلاهما `shared_from_session` — معرّف الجلسة `session_id` للجلسة الأصلية في التطبيق المصدر. مع `trust_review: false` يتم فرض `status` للجلسة المستنسخة لتصبح `In Review`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDecision"
                },
                "examples": {
                  "User session imported": {
                    "summary": "جلسة KYC مستنسخة (مقتطعة — في الواقع payload كامل لقرار الإصدار 3)",
                    "value": {
                      "session_id": "11111111-2222-3333-4444-555555555555",
                      "session_kind": "user",
                      "shared_from_session": "99999999-8888-7777-6666-555555555555",
                      "session_number": 43762,
                      "session_url": null,
                      "status": "In Review",
                      "workflow_id": "9f9b1234-aaaa-bbbb-cccc-1234567890ab",
                      "vendor_data": "user-1",
                      "created_at": "2026-05-17T08:42:11Z",
                      "expires_at": "2026-05-24T08:42:11Z"
                    }
                  },
                  "Business session imported": {
                    "summary": "جلسة KYB مستنسخة (مقتطعة — في الواقع payload كامل لقرار KYB الإصدار 3)",
                    "value": {
                      "session_id": "22222222-3333-4444-5555-666666666666",
                      "session_kind": "business",
                      "shared_from_session": "88888888-7777-6666-5555-444444444444",
                      "session_number": 982,
                      "session_url": null,
                      "status": "Approved",
                      "workflow_id": "9f9b1234-aaaa-bbbb-cccc-1234567890ab",
                      "vendor_data": "company-1"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة (الـ token غير صالح، أو منتهي الصلاحية، أو الوجهة غير صحيحة، أو يشير إلى جلسة لم تعد موجودة).",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Share Token": {
                    "summary": "رمز JWT غير صالح",
                    "value": {
                      "share_token": [
                        "Invalid share token."
                      ]
                    }
                  },
                  "Expired Share Token": {
                    "summary": "تجاوز الـ token تاريخ الانتهاء `exp`",
                    "value": {
                      "share_token": [
                        "Share token has expired."
                      ]
                    }
                  },
                  "Wrong audience": {
                    "summary": "الـ token غير مرتبط بهذا التطبيق",
                    "value": {
                      "share_token": [
                        "This token is not valid for this application."
                      ]
                    }
                  },
                  "Original missing": {
                    "summary": "تم حذف جلسة المصدر",
                    "value": {
                      "share_token": [
                        "Original session does not exist."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو تم استيراد جلسة المصدر هذه بالفعل إلى التطبيق الطالب (استرداد واحد لكل مستلِم).",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "summary": "محظور",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Already imported": {
                    "summary": "تم استيراد المصدر بالفعل مرة واحدة",
                    "value": {
                      "detail": "This session has already been shared with your application."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا ينتمي `workflow_id` إلى التطبيق المستدعي.",
            "content": {
              "application/json": {
                "examples": {
                  "Workflow not found": {
                    "summary": "سير العمل غير معروف",
                    "value": {
                      "detail": "Workflow does not exist for this application."
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "share_token",
                  "trust_review",
                  "workflow_id"
                ],
                "properties": {
                  "share_token": {
                    "type": "string",
                    "description": "رمز JWT للمشاركة صادر عن [`POST /v3/session/{sessionId}/share/`](/sessions-api/share-session).",
                    "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                  },
                  "trust_review": {
                    "type": "boolean",
                    "description": "إذا كانت القيمة `true`، تحتفظ الجلسة المستنسخة بالحالة النهائية `status` للمصدر. وإذا كانت `false`، يتم تحويلها إجبارياً إلى `In Review`.",
                    "example": false
                  },
                  "workflow_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "معرّف UUID لسير العمل في التطبيق المستدعي. يتم رفض المعرّفات العابرة للتطبيقات بالرمز `404`.",
                    "example": "9f9b1234-aaaa-bbbb-cccc-1234567890ab"
                  },
                  "vendor_data": {
                    "type": "string",
                    "nullable": true,
                    "description": "تجاوز اختياري لـ `vendor_data` الخاصة بالجلسة المستنسخة.",
                    "example": "user-1"
                  }
                }
              },
              "example": {
                "share_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
                "trust_review": false,
                "workflow_id": "9f9b1234-aaaa-bbbb-cccc-1234567890ab",
                "vendor_data": "user-1"
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST \\\n  https://verification.didit.me/v3/session/import-shared/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"share_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n    \"trust_review\": false,\n    \"workflow_id\": \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n    \"vendor_data\": \"user-1\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.import_shared(\n    share_token=\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n    trust_review=False,\n    workflow_id=\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n    vendor_data=\"user-1\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.importShared({\n  share_token: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  trust_review: false,\n  workflow_id: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n  vendor_data: \"user-1\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ImportShared(ctx, didit.SessionsImportSharedParams{\n\tShareToken:  \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n\tTrustReview: false,\n\tWorkflowID:  \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n\tVendorData:  didit.String(\"user-1\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsImportSharedParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().importShared(SessionsImportSharedParams.builder()\n        .shareToken(\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\")\n        .trustReview(false)\n        .workflowId(\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\")\n        .vendorData(\"user-1\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->importShared([\n    'share_token' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\n    'trust_review' => false,\n    'workflow_id' => '9f9b1234-aaaa-bbbb-cccc-1234567890ab',\n    'vendor_data' => 'user-1',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.import_shared(\n  share_token: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  trust_review: false,\n  workflow_id: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n  vendor_data: \"user-1\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ImportSharedAsync(new SessionsImportSharedParams\n{\n    ShareToken = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n    TrustReview = false,\n    WorkflowId = \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n    VendorData = \"user-1\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/kyb/search/": {
      "post": {
        "summary": "البحث عن الشركات في سجل KYB (مستقل)",
        "operationId": "post_v3_kyb_search",
        "x-didit-sdk": {
          "resource": "kyb",
          "method": "search",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [],
        "description": "ابحث في سجلات الشركات الرسمية عن الشركات المرشحة بالاسم و/أو رقم التسجيل. هذه هي الخطوة 1 من مسار السجل المكون من خطوتين: يُرجع **البحث** مرشحين ببيانات خفيفة، ثم يسترجع `POST /v3/kyb/select/` الملف التعريفي الكامل لمرشح واحد.\n\n**فوترة البحث.** تبلغ تكلفة عمليات البحث الناجحة التي تستخدم مصدراً مدفوعاً لبيانات الشركات USD 0.50 لكل طلب، بغض النظر عن عدد المرشحين. لا يتم احتساب رسوم على النتائج الفارغة وحالات الفشل والنتائج المقدمة من مصادر أخرى فقط. يتم حجز السعر المطبق قبل البحث؛ ويؤدي عدم كفاية الرصيد إلى إرجاع 403 مع الرمز `insufficient_credits`. تنطبق أسعار العقود حيثما تم الاتفاق عليها، ويؤدي عدم ضبط سعر بحث العقد إلى إرجاع 403. عمليات البحث في البيئة التجريبية مجانية. قد يؤدي تكرار بحث ناجح إلى فرض رسوم إضافية؛ لا يضيف تسليم الاستدعاء رسوماً إضافية. تتم فوترة استرجاع الملف التعريفي بشكل منفصل. تنطبق رسوم البحث هذه أيضاً على v2. يعود المرشحون دائماً مع `fetch_status: \"pending\"`: إذ لا يتم جلب بيانات الشركة الكاملة (وفوترتها) إلا عند التحديد.\n\n**معرّف `kyb_response_id` مؤقت.** هو معرّف لكل عملية بحث وليس معرّف شركة ثابتاً. قم بالتحديد فوراً بعد البحث، وأعد البحث للحصول على معرّف جديد بدلاً من تخزينه.\n\n**يحدد `tier` سلسلة المزودين.** يحدد `tier` مستوى السجل الذي يُجرى البحث فيه: `basic` (الافتراضي، سلسلة Lite)، أو `shareholders` أو `ubo`. يستخدم البحث سلسلة المزودين التي تخدم ذلك المستوى، وليست دائماً السلسلة نفسها التي يقرأ منها بحث Lite، لذا فإن بحث Lite الفارغ ليس دليلاً على أن السجل لا يحتوي على الشركة — ابحث مجدداً عند المستوى الذي تحتاجه. يتم البحث في الدولة التي لا توفر المستوى المحدد عند أعلى مستوى توفره حتى ذلك المستوى. استرجع المرشح من endpoint الذي يقدم ذلك المستوى: `POST /v3/kyb/select/` (Lite)، أو `POST /v3/kyb/shareholders/` أو `POST /v3/kyb/ubo/`.\n\n**المصادقة.** يقبل `POST /v3/kyb/search/` (وكذلك `/v2/`) مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. أما `POST /v1/kyb/search/` المستضاف فهو المسار المعتمد على مصادقة الجلسة الذي يستدعيه سير عمل التحقق المستضاف: فهو يستجيب بـ `403` لمفتاح API ولا يأخذ أي `tier` — حيث تختار إعدادات سجل KYB في سير العمل السلسلة المطلوبة.\n\n**وضعان.**\n- *متزامن (افتراضي):* يستطلع الـ API السجل بشكل دوري حتى تكتمل عملية البحث ويُرجع القائمة النهائية للمرشحين (`search_resolved: true`).\n- *غير متزامن:* قم بتمرير `webhook_url` وسيرد الـ API على الفور — عادةً مع `search_status: \"pending\"` وقائمة مرشحين فارغة — ثم يرسل استدعاء `kyb.registry_search.resolved` عبر POST إلى رابطك عند انتهاء السجل. جسم الاستدعاء هو `{\"event_id\", \"event_type\": \"kyb.registry_search.resolved\", \"request_id\", \"vendor_data\", \"metadata\", \"search_status\", \"search_resolved\", \"kyb_registry\", \"timestamp\", \"created_at\"}` — لاحظ أن `timestamp` و`created_at` في الاستدعاء هما أعداد صحيحة بنظام epoch، بخلاف `created_at` بصيغة ISO في هذا الـ endpoint — ويتم إرساله **غير موقّع** (الرأس `X-Didit-Unsigned-Callback: true`، ودون `X-Signature`).\n\n**رموز الدول.** رموز ISO 3166-1 alpha-2 (`GB`، `DE`)، بالإضافة إلى رموز التقسيم الفرعي `XX-YY` حيث تكون السجلات إقليمية — على سبيل المثال `US-CA` لكاليفورنيا.\n\n**البيئة التجريبية.** تُرجع المفاتيح من تطبيقات البيئة التجريبية مرشحاً ثابتاً واحداً دون الاتصال بأي سجل.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "country_code"
                ],
                "properties": {
                  "country_code": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "رمز ISO 3166-1 alpha-2 للدولة المطلوب البحث في سجل الشركات الخاص بها. على سبيل المثال، `GB`. عندما تعمل سجلات الشركات على مستوى الولاية أو المقاطعة، ألحق رمز التقسيم الفرعي ISO 3166-2 بصيغة `XX-YY`: يبحث `US-CA` في سجل كاليفورنيا. تتطلب عمليات البحث في الولايات المتحدة دائماً التقسيم الفرعي — ويتم رفض إدخال `US` بمفرده. غير حساس لحالة الأحرف؛ ويتم توحيده إلى أحرف كبيرة.",
                    "example": "GB"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "اسم الشركة المراد البحث عنها. يلزم توفير `name` أو `registration_number`.",
                    "example": "Tesco"
                  },
                  "registration_number": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "رقم تسجيل السجل المطلوب البحث عنه. يلزم إدخال إما `name` أو `registration_number`."
                  },
                  "tier": {
                    "type": "string",
                    "enum": [
                      "basic",
                      "shareholders",
                      "ubo"
                    ],
                    "default": "basic",
                    "description": "مستوى السجل الذي تعمل سلسلة المزود الخاصة به في هذا البحث. يبحث `basic` (الافتراضي) في سلسلة Lite الخاصة بالدولة؛ بينما يبحث `shareholders` و`ubo` في سلسلة الملكية الخاصة بذلك المستوى، والتي قد تكون مصدراً مختلفاً، لذا فإن بحث Lite الفارغ لا يثبت أن السجل يفتقر إلى الشركة. أما الدولة التي لا توفر المستوى المذكور، فيتم البحث فيها بأعلى مستوى تقدمه حتى ذلك المستوى. استرد المرشح من الـ endpoint التي تبيع المستوى الذي بحثت عنه: `POST /v3/kyb/select/` (Lite)، أو `POST /v3/kyb/shareholders/`، أو `POST /v3/kyb/ubo/`.",
                    "example": "basic"
                  },
                  "search_type": {
                    "type": "string",
                    "enum": [
                      "contains"
                    ],
                    "default": "contains",
                    "description": "استراتيجية مطابقة الأسماء المطبقة بواسطة بحث السجل. `contains` هي القيمة الوحيدة المقبولة: لا يوجد أي مصدر سجل خلف البحث يوفّر وضع البادئة أو المطابقة التقريبية، لذا يُرفض استخدام `start_with` و`fuzzy` مع إرجاع `400` (`not a valid choice`)."
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "المعرّف الخاص بك لعملية البحث هذه؛ تتم إعادته وتضمينه في استدعاء webhook."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON بصيغة حرة؛ تتم إعادته في الاستجابة وتضمينه في استدعاء webhook."
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 500,
                    "description": "يحوّل البحث إلى الوضع غير المتزامن: تستجيب API على الفور وتُرسل طلب POST لـ callback غير موقّع من نوع `kyb.registry_search.resolved` إلى عنوان URL هذا عندما تصبح قائمة المرشحين جاهزة."
                  }
                }
              },
              "example": {
                "country_code": "GB",
                "name": "Tesco",
                "search_type": "contains",
                "vendor_data": "company-1234"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/kyb/search/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"country_code\": \"GB\",\n    \"name\": \"Tesco\",\n    \"search_type\": \"contains\",\n    \"vendor_data\": \"company-1234\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.kyb.search(\n    country_code=\"GB\",\n    name=\"Tesco\",\n    search_type=\"contains\",\n    vendor_data=\"company-1234\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.kyb.search({\n  country_code: \"GB\",\n  name: \"Tesco\",\n  search_type: \"contains\",\n  vendor_data: \"company-1234\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.KYB.Search(ctx, didit.KYBSearchParams{\n\tCountryCode: \"GB\",\n\tName:        didit.String(\"Tesco\"),\n\tSearchType:  didit.Some(didit.KYBSearchParamsSearchType(\"contains\")),\n\tVendorData:  didit.String(\"company-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.KybSearchParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.kyb().search(KybSearchParams.builder()\n        .countryCode(\"GB\")\n        .name(\"Tesco\")\n        .searchType(KybSearchParams.SearchType.of(\"contains\"))\n        .vendorData(\"company-1234\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->kyb->search([\n    'country_code' => 'GB',\n    'name' => 'Tesco',\n    'search_type' => 'contains',\n    'vendor_data' => 'company-1234',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.kyb.search(\n  country_code: \"GB\",\n  name: \"Tesco\",\n  search_type: \"contains\",\n  vendor_data: \"company-1234\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Kyb.SearchAsync(new KybSearchParams\n{\n    CountryCode = \"GB\",\n    Name = \"Tesco\",\n    SearchType = new KybSearchParamsSearchType(\"contains\"),\n    VendorData = \"company-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم قبول البحث. يُرجع الوضع المتزامن قائمة المرشحين النهائية؛ بينما يُرجع وضع webhook الاستجابة فوراً (غالباً `search_status: \"pending\"`) ويسلّم القائمة النهائية عبر استدعاء `kyb.registry_search.resolved`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "مع `webhook_url`: معرّف طلب البحث الدائم، ويُعاد كـ `request_id` في رد الاستدعاء `kyb.registry_search.resolved`. بدون `webhook_url`: معرّف UUID ارتباطي مؤقت (لا يتم تخزين البحث)."
                    },
                    "kyb_registry": {
                      "$ref": "#/components/schemas/KYBRegistrySearchResults"
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "تكرار لقيمة `vendor_data` التي أرسلتها."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "description": "نسخة مطابقة من `metadata` التي أرسلتها."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "examples": {
                  "Resolved search": {
                    "summary": "الوضع المتزامن — قائمة المرشحين النهائية",
                    "value": {
                      "request_id": "0c7e9a40-3a13-4f7e-8a44-9d2e2f1c5b6a",
                      "kyb_registry": {
                        "companies": [
                          {
                            "kyb_response_id": "69aeeb95febb0f1704042259",
                            "name": "Tesco PLC",
                            "registration_number": "00445790",
                            "status": "active",
                            "type": "Public Limited Company",
                            "risk_level": null,
                            "fetch_status": "pending"
                          },
                          {
                            "kyb_response_id": "69aeeb95febb0f170404225a",
                            "name": "E-TESCO LTD",
                            "registration_number": "15168476",
                            "status": "active",
                            "type": "Private Limited Company",
                            "risk_level": null,
                            "fetch_status": "pending"
                          }
                        ],
                        "pagination": {
                          "total": 2,
                          "page": 1,
                          "per_page": 25
                        },
                        "search_status": "resolved",
                        "search_resolved": true
                      },
                      "vendor_data": "company-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:40:00.000000+00:00"
                    }
                  },
                  "Pending search (webhook mode)": {
                    "summary": "تم تقديم `webhook_url` — تصل النتائج المرشحة عبر استدعاء kyb.registry_search.resolved",
                    "value": {
                      "request_id": "5f2d8c1b-7e4a-4b9c-9f0d-3a6e8c2b1d4f",
                      "kyb_registry": {
                        "companies": [],
                        "pagination": {
                          "total": 0,
                          "page": 1,
                          "per_page": 25
                        },
                        "search_status": "pending",
                        "search_resolved": false
                      },
                      "vendor_data": "company-1234",
                      "metadata": {
                        "source": "onboarding"
                      },
                      "created_at": "2026-06-11T10:41:00.000000+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تستخدم المشكلات على مستوى الحقول غلاف DRF القياسي؛ وتُبلغ قاعدة الاسم/رقم التسجيل تحت `non_field_errors`. الدولة التي لا تغطيها سجلات الشركات تُرجع الرد `400` مع `code: kyb_registry_country_unsupported`.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing search criteria": {
                    "summary": "لم يتم تقديم `name` ولا `registration_number`",
                    "value": {
                      "non_field_errors": [
                        "Either 'name' or 'registration_number' is required."
                      ]
                    }
                  },
                  "Invalid country_code": {
                    "summary": "يجب أن يكون `XX` (alpha-2) أو تقسيماً فرعياً `XX-YY`",
                    "value": {
                      "country_code": [
                        "country_code must be a 2-letter ISO code."
                      ]
                    }
                  },
                  "Invalid search_type": {
                    "summary": "يُقبل `contains` فقط",
                    "value": {
                      "search_type": [
                        "\"start_with\" is not a valid choice."
                      ]
                    }
                  },
                  "Invalid webhook_url": {
                    "summary": "يجب أن يكون `webhook_url` عنوان URL صالحاً",
                    "value": {
                      "webhook_url": [
                        "Enter a valid URL."
                      ]
                    }
                  },
                  "Country not covered": {
                    "summary": "لا يغطي سجل الشركات هذه الدولة",
                    "value": {
                      "detail": "Company registry search is not available for this country. Enter the company details manually to continue.",
                      "code": "kyb_registry_country_unsupported"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "تم رفض الإذن. يُرجع عند فقدان الرأس `x-api-key`؛ ويُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`. يؤدي المفتاح المفقود إلى إرجاع `403` مع `{\"detail\": ...}`؛ ويؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يُرجع أيضاً قبل البحث عندما يتعذر تغطية رسوم البحث المطبقة (`code: \"insufficient_credits\"`)، أو عند فقدان سعر البحث التعاقدي.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "summary": "لا يوجد رأس `x-api-key`، أو أن المفتاح غير صالح/ملغى",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل، أو تم استنفاد الحصة المخصصة للبحث. تشترك نقاط endpoint الخاصة بـ POST/PATCH/DELETE في ميزانية قدرها 300 طلب كتابة في الدقيقة لكل مفتاح API (إنشاء المعاملات واستيعاب الأحداث لهما ميزانية منفصلة تبلغ 600)، مع رؤوس `X-RateLimit-*` و`Retry-After`. وبشكل منفصل، تقتصر عمليات البحث المدفوعة في السجلات على 600 عملية لكل تطبيق في الساعة: بعد ذلك تكون الاستجابة `429` مع `code: kyb_registry_search_limit_reached`، بينما تستمر عمليات البحث التي تعتمد على المصادر المجانية فقط في العمل. انتظر وابحث مرة أخرى لاحقاً.",
            "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."
                    }
                  },
                  "Search allowance spent": {
                    "summary": "أكثر من 600 عملية بحث مدفوعة خلال الساعة الماضية",
                    "value": {
                      "detail": "The maximum number of company registry searches for this session has been reached. Enter the company details manually to continue.",
                      "code": "kyb_registry_search_limit_reached"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "مزود سجل KYB غير متاح مؤقتاً - استجابة 5xx أو انتهاء المهلة أو فشل الاتصال من السجل المصدر. لا تتم فوترة البحث. أعد المحاولة لاحقاً، أو، في سير عمل التحقق المستضاف من Didit، يُعرض تلقائياً على المستخدم إدخال بيانات الشركة يدوياً بدلاً من مجرد خطأ إعادة المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Registry provider outage": {
                    "summary": "لم يستجب مزود سجل الشركات لعملية البحث",
                    "value": {
                      "detail": "The KYB registry provider is temporarily unavailable. Please try again shortly.",
                      "code": "kyb_registry_provider_unavailable"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/kyb/select/": {
      "post": {
        "summary": "تحديد شركة في سجل KYB — المستوى Lite (مستقل)",
        "operationId": "post_v3_kyb_select",
        "x-didit-sdk": {
          "resource": "kyb",
          "method": "select",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [],
        "description": "استرداد ملف السجل التجاري من فئة **Lite** لمرشح واحد تم إرجاعه بواسطة `POST /v3/kyb/search/` — تفاصيل الشركة، والعنوان المسجل، والمعرّفات، والحالة، والنشاط، والمسؤولون، بالإضافة إلى payload السجل التجاري الخام. تُباع بيانات المساهمين والمستفيدين الحقيقيين عبر `POST /v3/kyb/shareholders/` و`POST /v3/kyb/ubo/`.\n\n**الاقتران مع البحث.** مرِّر `kyb_response_id` الخاص بالمرشح تماماً كما تم إرجاعه بواسطة بحث من التطبيق نفسه. المعرّف مؤقت ومقتصر على عملية البحث تلك — اختر على الفور، وأعد البحث للحصول على معرّف جديد بدلاً من تخزينه.\n\n**الفوترة.** تتم فوترة كل عملية اختيار وفقاً لسعر فئة Lite الخاص بالدولة (أي رسوم بحث تكون منفصلة)؛ راجع [أسعار السجل التجاري لـ KYB](/ar/getting-started/kyb-registry-pricing). يتم التحقق من الرصيد قبل أي استدعاء للسجل التجاري (`403` عند عدم كفايته) وتُسجل التكلفة مقابل جلسة الشركة المنشأة.\n\n**الحفظ الدائم إلزامي.** تُنشئ كل عملية اختيار جلسة شركة (معرّفها هو `request_id`) حتى يمكن تتبع الفوترة واسترجاع البيانات؛ وتظهر في لوحة التحكم. يتم قبول `save_api_request` للتناسق ولكن يجب أن تكون `true` (القيمة الافتراضية) — وإرسال `false` يُرجع `400`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KYBRegistryCandidateRequest"
              },
              "example": {
                "kyb_response_id": "69aeeb95febb0f1704042259",
                "vendor_data": "company-1234"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/kyb/select/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"kyb_response_id\": \"69aeeb95febb0f1704042259\",\n    \"vendor_data\": \"company-1234\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.kyb.select(\n    kyb_response_id=\"69aeeb95febb0f1704042259\",\n    vendor_data=\"company-1234\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.kyb.select({\n  kyb_response_id: \"69aeeb95febb0f1704042259\",\n  vendor_data: \"company-1234\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.KYB.Select(ctx, didit.KYBRegistryCandidateRequest{\n\tKYBResponseID: \"69aeeb95febb0f1704042259\",\n\tVendorData:    didit.String(\"company-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.KYBRegistryCandidateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.kyb().select(KYBRegistryCandidateRequest.builder()\n        .kybResponseId(\"69aeeb95febb0f1704042259\")\n        .vendorData(\"company-1234\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->kyb->select([\n    'kyb_response_id' => '69aeeb95febb0f1704042259',\n    'vendor_data' => 'company-1234',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.kyb.select(\n  kyb_response_id: \"69aeeb95febb0f1704042259\",\n  vendor_data: \"company-1234\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Kyb.SelectAsync(new KYBRegistryCandidateRequest\n{\n    KybResponseId = \"69aeeb95febb0f1704042259\",\n    VendorData = \"company-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم جلب الشركة وتمت فوترتها. يحمل `kyb_registry` الملف التعريفي الكامل؛ تحقق من `data_resolved` — عندما يكون `false`، كان السجل لا يزال قيد المعالجة وسيكتمل السجل المخزن تلقائياً بمجرد حله.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف جلسة الشركة التي تم إنشاؤها لعملية الاسترداد هذه. يستمر السجل المخزن (المرئي في لوحة التحكم) في التحديث إذا تمكّن السجل من حلّ البيانات بعد إرسال الاستجابة."
                    },
                    "registry_tier_requested": {
                      "type": "string",
                      "enum": [
                        "basic",
                        "shareholders",
                        "ubo"
                      ],
                      "description": "المستوى الذي يبيعه هذا الـ endpoint: `basic` (Lite) للاختيار، `shareholders`، `ubo`."
                    },
                    "registry_tier_delivered": {
                      "type": "string",
                      "enum": [
                        "basic",
                        "shareholders",
                        "ubo"
                      ],
                      "description": "المستوى الذي تم تسليمه وفوترته فعلياً. يكون أقل من المطلوب عندما لا تحتوي سجلات الدولة على بيانات ملكية، أو عندما لا يحتوي السجل على أي سجل ملكية لهذه الشركة."
                    },
                    "kyb_registry": {
                      "type": "object",
                      "description": "الملف التعريفي الكامل للشركة في السجل.",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "format": "uuid",
                          "description": "معرّف Didit لسجل هذه الشركة."
                        },
                        "node_id": {
                          "type": "string",
                          "example": "feature_kyb_registry"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "Not Finished",
                            "Approved",
                            "Declined",
                            "In Review"
                          ],
                          "description": "تقييم Didit لفحص السجل (على سبيل المثال `In Review` عندما لا تكون الشركة نشطة في السجل أو يتعذر استخلاص بيانات الملكية)."
                        },
                        "registry_status": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "active",
                            "dissolved",
                            "deregistered",
                            "see full details",
                            "authorised",
                            "appointed representative",
                            "unauthorised",
                            "inactive",
                            "no longer authorised",
                            "closed",
                            "struck off"
                          ],
                          "description": "حالة الشركة المعيارية كما أبلغ عنها السجل."
                        },
                        "data_resolved": {
                          "type": "boolean",
                          "description": "تكون القيمة `true` بمجرد أن يُرجع السجل الملف التعريفي الكامل. وتكون `false` عندما يظل السجل قيد المعالجة بعد الاستقصاء — ويكتمل السجل المخزن تلقائياً بمجرد انتهاء السجل من المعالجة."
                        },
                        "company_name": {
                          "type": "string",
                          "example": "Tesco PLC"
                        },
                        "registration_number": {
                          "type": "string",
                          "nullable": true,
                          "example": "00445790"
                        },
                        "country_code": {
                          "type": "string",
                          "description": "ISO 3166-1 alpha-2.",
                          "example": "GB"
                        },
                        "region": {
                          "type": "string",
                          "nullable": true,
                          "description": "رمز التقسيم الفرعي عندما يكون السجل إقليمياً (مثل `CA` لـ `US-CA`)؛ ويكون فارغاً خلاف ذلك."
                        },
                        "company_type": {
                          "type": "string",
                          "nullable": true,
                          "example": "Public Limited Company"
                        },
                        "incorporation_date": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "example": "1947-11-27"
                        },
                        "registered_address": {
                          "type": "string",
                          "nullable": true,
                          "example": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA"
                        },
                        "tax_number": {
                          "type": "string",
                          "nullable": true,
                          "example": "GB412 8925 93"
                        },
                        "risk_level": {
                          "type": "string",
                          "nullable": true,
                          "description": "مستوى المخاطر كما ورد في السجل، عند توفره."
                        },
                        "verification_status": {
                          "type": "string",
                          "enum": [
                            "verified",
                            "failed",
                            "unknown"
                          ],
                          "nullable": true,
                          "description": "حالة التحقق عبر الولايات القضائية: `verified` عندما تُثبت حالة السجل الوضع القانوني القائم للشركة (`active`)، و`failed` عندما تفيد بأن الشركة لم تعد قائمة (على سبيل المثال `dissolved`)، وتكون `unknown` في الحالات الأخرى. وتكون القيمة `null` للشركة التي لم تأتِ من سجل وطالما أن التحديد لا يزال `pending`."
                        },
                        "is_from_registry": {
                          "type": "boolean",
                          "description": "دائماً `true` لهذا الـ endpoint — تم استرداد الملف التعريفي من سجل رسمي."
                        },
                        "fetch_status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "resolved"
                          ],
                          "description": "دورة حياة جلب السجل. تُطابقها `data_resolved`."
                        },
                        "alternative_names": {
                          "type": "string",
                          "nullable": true,
                          "description": "أسماء الشركات البديلة، أو التجارية، أو السابقة، أو باللغة الأصلية كنص، عند الإبلاغ عنها."
                        },
                        "nature_of_business": {
                          "type": "string",
                          "nullable": true,
                          "description": "وصف النشاط أو رمز التصنيف، عند الإبلاغ عنه."
                        },
                        "registered_capital": {
                          "type": "string",
                          "nullable": true
                        },
                        "registered_capital_amount": {
                          "type": "string",
                          "nullable": true,
                          "description": "المبلغ العشري كسلسلة نصية، عند الإبلاغ عنه."
                        },
                        "registered_capital_currency": {
                          "type": "string",
                          "nullable": true,
                          "description": "رمز ISO 4217، عند الإبلاغ عنه."
                        },
                        "website": {
                          "type": "string",
                          "nullable": true,
                          "example": "https://www.tesco.com/"
                        },
                        "email": {
                          "type": "string",
                          "nullable": true,
                          "example": "customer.service@tesco.co.uk"
                        },
                        "phone": {
                          "type": "string",
                          "nullable": true,
                          "example": "03301231688"
                        },
                        "legal_entity_identifier": {
                          "type": "string",
                          "nullable": true,
                          "description": "معرّف الكيان القانوني (LEI)، عند الإبلاغ عنه."
                        },
                        "location_of_registration": {
                          "type": "string",
                          "nullable": true,
                          "description": "السجل/الاختصاص القضائي المسجلة به الشركة، عند توفره."
                        },
                        "vat_number": {
                          "type": "string",
                          "nullable": true,
                          "description": "رقم ضريبة القيمة المضافة في الاتحاد الأوروبي (EU VAT)، عند جمعه أثناء خطوة السجل المستضاف أو تعديله لاحقاً. في وقت التحديد، لا يكون هذا الحقل معيناً في العادة — إذ يتم التحقق من صحة ضريبة القيمة المضافة والرقم الضريبي عندما يرسل المستخدم النهائي خطوة السجل في المسار المستضاف."
                        },
                        "vat_validation_status": {
                          "type": "string",
                          "enum": [
                            "valid",
                            "invalid",
                            "format_valid",
                            "invalid_format",
                            "could_not_validate",
                            "not_applicable"
                          ],
                          "description": "نتيجة التحقق من صحة رقم ضريبة القيمة المضافة أو، عند عدم وجوده، `tax_number`، عند الإرسال إلى السجل. `valid` / `invalid`: يتم تحديدها بواسطة السجل الرسمي للدولة (EU VIES، والنرويج، وسويسرا، والبرازيل، وكولومبيا، وكوستاريكا، والإكوادور، وباراغواي؛ وبولندا أيضاً عبر سجل ضريبة القيمة المضافة المحلي الخاص بها). `format_valid` / `invalid_format`: يتم تحديدها بناءً على قواعد التنسيق وأرقام التحقق الخاصة بالدولة عند تعذر الاستعلام من أي سجل. `could_not_validate`: كان السجل غير متاح. `not_applicable`: لا يوجد رقم، أو دولة بدون سجل أو قواعد، أو جلسة في البيئة التجريبية."
                        },
                        "vat_validated_number": {
                          "type": "string",
                          "nullable": true,
                          "description": "الرقم الذي تم التحقق منه، كما يعرفه المصدر (على سبيل المثال، رقم ضريبة القيمة المضافة المشتق من SIREN الفرنسي أو RSIN الهولندي). يكون `null` عند عدم تشغيل أي فحص."
                        },
                        "vat_validation_source": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "eu_vies",
                            "pl_vat_white_list",
                            "no_brreg",
                            "ch_uid_register",
                            "br_receita_federal",
                            "co_rues",
                            "cr_hacienda",
                            "ec_sri",
                            "py_dnit",
                            "format_rules",
                            null
                          ],
                          "description": "المصدر الذي حدد `vat_validation_status`: إما سجل رسمي، أو `format_rules`. تكون قيمته `null` عند عدم تشغيل أي فحص."
                        },
                        "vat_validated_name": {
                          "type": "string",
                          "nullable": true,
                          "description": "الاسم المسجل لدى المصدر الذي تحقق من صحة الرقم، عند إفصاحه عن اسم. يُعيّن فقط عندما تكون الحالة `valid`."
                        },
                        "vat_validated_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "العنوان المسجل لدى المصدر الذي تحقق من الرقم، عندما يكشف عنه. يتم تعيينه فقط عندما تكون الحالة `valid`."
                        },
                        "vat_checked_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "الطابع الزمني للفحص. يكون `null` في حال عدم تشغيل أي فحص."
                        },
                        "financial_summary": {
                          "type": "object",
                          "nullable": true,
                          "description": "تفاصيل الأسهم/رأس المال كما وردت في السجل (العملة، إجمالي الأسهم، فئات الأسهم)، عند توفرها."
                        },
                        "officers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string",
                                "example": "MELISSA BETHELL"
                              },
                              "designation": {
                                "type": "string",
                                "nullable": true,
                                "description": "التسمية الخام من السجل (مثل `Director`، `Secretary`)."
                              },
                              "role": {
                                "type": "string",
                                "description": "الدور المعياري المشتق من التسمية. مجموعة قيم النموذج الكاملة المكوّنة من 17 قيمة؛ وعادة ما يُصدِر تحليل السجل في هذا الـ endpoint القيم director أو non_executive_director أو secretary أو chairman أو company_officer.",
                                "enum": [
                                  "director",
                                  "non_executive_director",
                                  "secretary",
                                  "chairman",
                                  "ubo",
                                  "shareholder",
                                  "representative",
                                  "founder",
                                  "legal_advisor",
                                  "authorized_signatory",
                                  "trustee",
                                  "beneficiary",
                                  "company_officer",
                                  "settlor",
                                  "protector",
                                  "investor",
                                  "other"
                                ]
                              },
                              "nationality": {
                                "type": "string",
                                "nullable": true
                              },
                              "is_active": {
                                "type": "boolean",
                                "description": "`false` عندما يحدد السجل أن التعيين قد انتهى بالاستقالة."
                              },
                              "kyc_status": {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  "Approved",
                                  "Declined",
                                  "Pending"
                                ],
                                "description": "حالة جلسة KYC المرتبطة، في حال تم بدء جلسة لهذا المسؤول. تكون `null` بخلاف ذلك."
                              },
                              "kyc_session_url": {
                                "type": "string",
                                "nullable": true,
                                "description": "رابط التحقق لجلسة KYC المرتبطة، في حال وجودها."
                              },
                              "first_name": {
                                "type": "string",
                                "nullable": true,
                                "description": "الاسم الشخصي عندما يذكره سجل الشركات صراحةً؛ لا يُستنتج من الاسم الكامل."
                              },
                              "last_name": {
                                "type": "string",
                                "nullable": true,
                                "description": "اسم العائلة عندما يُبلّغ عنه السجل صراحةً."
                              },
                              "address": {
                                "type": "string",
                                "nullable": true,
                                "description": "عنوان المسؤول الوارد من السجل."
                              },
                              "appointment_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ تعيين المسؤول.",
                                "format": "date"
                              },
                              "termination_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ انتهاء التعيين، عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "date_of_birth": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ الميلاد الكامل المبلغ عنه في السجل. يكون فارغاً (Null) عندما تكون سنة أو شهر الميلاد فقط معروفان.",
                                "format": "date"
                              },
                              "date_of_birth_year": {
                                "type": "integer",
                                "nullable": true,
                                "minimum": 1,
                                "maximum": 9999,
                                "description": "سنة الميلاد كما وردت في السجل، بما في ذلك الحالات التي لا يتوفر فيها التاريخ بالكامل."
                              },
                              "date_of_birth_month": {
                                "type": "integer",
                                "nullable": true,
                                "minimum": 1,
                                "maximum": 12,
                                "description": "شهر الميلاد كما ورد في السجل. يكون Null عندما تكون السنة فقط هي المعروفة."
                              }
                            }
                          },
                          "description": "المديرون وأمناء السر والمسؤولون الآخرون المستخرجون من السجل."
                        },
                        "beneficial_owners": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "first_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "last_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "entity_type": {
                                "type": "string",
                                "enum": [
                                  "person",
                                  "company"
                                ],
                                "description": "ما إذا كان المالك شخصاً طبيعياً أو كياناً اعتبارياً."
                              },
                              "roles": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "الأدوار المعيارية (مثل `ubo` و`shareholder`)."
                              },
                              "ownership_min_shares": {
                                "type": "string",
                                "nullable": true,
                                "description": "الحد الأدنى لنطاق الملكية المبلغ عنه بواسطة السجل (مثل `25%`)."
                              },
                              "ownership_max_shares": {
                                "type": "string",
                                "nullable": true,
                                "description": "الحد الأعلى لنطاق الملكية الذي يبلّغ عنه السجل."
                              },
                              "is_active": {
                                "type": "boolean"
                              },
                              "kyc_status": {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  "Approved",
                                  "Declined",
                                  "Pending"
                                ]
                              },
                              "kyc_session_url": {
                                "type": "string",
                                "nullable": true
                              },
                              "effective_ownership_percent": {
                                "type": "number",
                                "nullable": true,
                                "description": "نسبة الملكية المحللة (الحد الأقصى، مع الرجوع إلى الحد الأدنى)."
                              },
                              "company_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "registration_number": {
                                "type": "string",
                                "nullable": true
                              },
                              "country_of_birth": {
                                "type": "string",
                                "nullable": true
                              },
                              "email": {
                                "type": "string",
                                "nullable": true
                              },
                              "nationality": {
                                "type": "string",
                                "nullable": true
                              },
                              "designation": {
                                "type": "string",
                                "nullable": true
                              },
                              "voting_min_shares": {
                                "type": "string",
                                "nullable": true
                              },
                              "voting_max_shares": {
                                "type": "string",
                                "nullable": true
                              },
                              "date_of_birth": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ الميلاد الكامل عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "appointment_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ التعيين عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "shareholding": {
                                "$ref": "#/components/schemas/KYBRegistryShareholding"
                              }
                            }
                          },
                          "description": "المستفيدون الحقيقيون / الأشخاص ذوو السيطرة الفعلية المستخرجون من سجل الشركات. يمكن أن يكون فارغاً إذا كان السجل لا يكشف عن بيانات الملكية."
                        },
                        "addresses": {
                          "type": "array",
                          "nullable": true,
                          "description": "كل عنوان ينص عليه السجل، بصيغة معيارية واحدة. يكون Null عندما لا ينص على أي عنوان.",
                          "items": {
                            "$ref": "#/components/schemas/KYBRegistryAddress"
                          }
                        },
                        "industries": {
                          "type": "array",
                          "nullable": true,
                          "description": "الأنشطة التي يصنف السجل الشركة تحتها، بصيغة قياسية موحدة. تكون null عند عدم ذكر أي نشاط.",
                          "items": {
                            "$ref": "#/components/schemas/KYBRegistryIndustry"
                          }
                        },
                        "accounts": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": true,
                          "description": "تواريخ إيداعات السجل، عند توفرها. تستخدم الإقرارات السنوية والاجتماعات العامة last_annual_return_date وlast_agm_date؛ وهي تختلف عن الحسابات المالية."
                        },
                        "registry_data": {
                          "$ref": "#/components/schemas/KYBRegistryData"
                        },
                        "user_provided_data": {
                          "type": "object",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint (يُستخدم بواسطة مسار KYB المستضاف عندما يقوم المستخدمون النهائيون بتعديل بيانات السجل)."
                        },
                        "confirmed_by_user_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint."
                        },
                        "last_console_edit_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "يتم تعيينه عندما يقوم مراجِع في لوحة التحكم بتعديل السجل لاحقاً."
                        },
                        "is_editable": {
                          "type": "boolean",
                          "description": "ما إذا كان لا يزال من الممكن تعديل البيانات المستمدة من السجل في المسار المستضاف/لوحة التحكم."
                        },
                        "registry_tier_delivered": {
                          "type": "string",
                          "enum": [
                            "basic",
                            "shareholders",
                            "ubo"
                          ],
                          "description": "مطابق لحقل `registry_tier_delivered` في المستوى الأعلى."
                        },
                        "registry_ownership_status": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "not_requested",
                            "delivered",
                            "not_held",
                            "unavailable"
                          ],
                          "description": "`delivered` عند استرداد بيانات الملكية، و`not_held` عندما يستجيب سجل الملكية ولا يدرج هذه الشركة (راجع `registry_data.ownership_error`)، و`unavailable` عند طلب مستوى ملكية ولكن لم يتوفر لدى السجل أي بيانات لهذه الشركة أو تعذر الاستعلام منه (راجع `registry_data.ownership_error`)، و`not_requested` في المستوى Lite."
                        },
                        "ownership": {
                          "$ref": "#/components/schemas/KYBRegistryOwnership"
                        },
                        "registry_tier": {
                          "type": "string",
                          "nullable": true,
                          "description": "مستوى سجل الشركات الذي طلبه سير العمل: `basic`، أو `shareholders`، أو `ubo`. موجود أيضاً في `ownership.tier_requested`."
                        },
                        "registry_monitoring": {
                          "type": "object",
                          "nullable": true,
                          "description": "أحدث مراقبة لسجل الشركات للشركة، أو `null` في حال عدم وجود أي منها.",
                          "properties": {
                            "uuid": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "status": {
                              "type": "string"
                            },
                            "unavailable_reason": {
                              "type": "string",
                              "nullable": true
                            },
                            "enrolled_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "cancelled_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "last_bill_date": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "next_bill_date": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "last_event_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "events_count": {
                              "type": "integer"
                            },
                            "watched_fields": {
                              "description": "حقول الشركة التي تراقبها أداة المراقبة."
                            }
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "تكرار لقيمة `vendor_data` التي أرسلتها."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "description": "نسخة مطابقة من `metadata` التي أرسلتها."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "examples": {
                  "Resolved company": {
                    "summary": "الملف التعريفي الكامل من السجل (تم اختصار قائمة المسؤولين للإيجاز)",
                    "value": {
                      "request_id": "9d4f2c7a-1b3e-4a5c-8d6f-0e9a8b7c6d5e",
                      "kyb_registry": {
                        "uuid": "f1e2d3c4-b5a6-4789-9c0d-1e2f3a4b5c6d",
                        "node_id": "feature_kyb_registry",
                        "status": "In Review",
                        "registry_status": "active",
                        "data_resolved": true,
                        "company_name": "Tesco PLC",
                        "registration_number": "00445790",
                        "country_code": "GB",
                        "region": "",
                        "company_type": "Public Limited Company",
                        "incorporation_date": "1947-11-27",
                        "registered_address": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA",
                        "tax_number": "GB412 8925 93",
                        "risk_level": "low risk",
                        "verification_status": "verified",
                        "is_from_registry": true,
                        "fetch_status": "resolved",
                        "alternative_names": "TESCO STORES (HOLDINGS) PUBLIC LIMITED COMPANY",
                        "nature_of_business": null,
                        "registered_capital": null,
                        "registered_capital_amount": null,
                        "registered_capital_currency": null,
                        "website": "https://www.tesco.com/",
                        "email": "customer.service@tesco.co.uk",
                        "phone": "03301231688",
                        "legal_entity_identifier": null,
                        "location_of_registration": null,
                        "financial_summary": {
                          "currency": "Pound (£)",
                          "total_number_of_shares": "8174378721",
                          "meta_detail": {
                            "Class_Of_Share": "Ordinary"
                          }
                        },
                        "officers": [
                          {
                            "uuid": "a1b2c3d4-e5f6-4789-9a0b-1c2d3e4f5a6b",
                            "name": "CHRISTOPHER JON TAYLOR",
                            "designation": "Secretary",
                            "role": "secretary",
                            "nationality": null,
                            "is_active": true,
                            "kyc_status": null,
                            "kyc_session_url": null
                          },
                          {
                            "uuid": "b2c3d4e5-f6a7-4890-8b1c-2d3e4f5a6b7c",
                            "name": "MELISSA BETHELL",
                            "designation": "Director",
                            "role": "director",
                            "nationality": "British",
                            "is_active": true,
                            "kyc_status": null,
                            "kyc_session_url": null
                          }
                        ],
                        "beneficial_owners": [],
                        "addresses": [
                          {
                            "address": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA",
                            "type": "legal_entity_registry_address",
                            "description": "registered office address"
                          }
                        ],
                        "industries": null,
                        "accounts": {
                          "last_account": "26 February 2025",
                          "next_account": "26 February 2026",
                          "due_by_date": "26 August 2026"
                        },
                        "registry_data": {},
                        "user_provided_data": null,
                        "confirmed_by_user_at": null,
                        "last_console_edit_at": null,
                        "is_editable": true
                      },
                      "vendor_data": "company-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:45:00.000000+00:00"
                    }
                  },
                  "Pending (registry still resolving)": {
                    "summary": "ظل التحديد معلقاً بعد الاستقصاء — حقول متفرقة، وتكتمل تلقائياً من جانب الخادم",
                    "value": {
                      "request_id": "9d4f2c7a-1b3e-4a5c-8d6f-0e9a8b7c6d5e",
                      "kyb_registry": {
                        "uuid": "7c0a4f7e-2b1d-4f6a-9c3e-8d5b2a1f0e9d",
                        "node_id": "feature_kyb_registry",
                        "status": "Not Finished",
                        "registry_status": null,
                        "data_resolved": false,
                        "company_name": "Tesco PLC",
                        "registration_number": "00445790",
                        "country_code": "GB",
                        "region": null,
                        "company_type": null,
                        "incorporation_date": null,
                        "registered_address": null,
                        "tax_number": null,
                        "risk_level": null,
                        "verification_status": null,
                        "is_from_registry": true,
                        "fetch_status": "pending",
                        "alternative_names": null,
                        "nature_of_business": null,
                        "registered_capital": null,
                        "registered_capital_amount": null,
                        "registered_capital_currency": null,
                        "website": null,
                        "email": null,
                        "phone": null,
                        "legal_entity_identifier": null,
                        "location_of_registration": null,
                        "financial_summary": {},
                        "officers": [],
                        "beneficial_owners": [],
                        "addresses": null,
                        "industries": null,
                        "accounts": null,
                        "registry_data": {},
                        "user_provided_data": null,
                        "confirmed_by_user_at": null,
                        "last_console_edit_at": null,
                        "is_editable": true
                      },
                      "vendor_data": "company-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:45:00.000000+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تستخدم المشكلات على مستوى الحقول غلاف DRF القياسي. الدولة التي لا تغطيها سجلات الشركات تُرجع الرد `400` مع `code: kyb_registry_country_unsupported`.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing kyb_response_id": {
                    "summary": "`kyb_response_id` مطلوب",
                    "value": {
                      "kyb_response_id": [
                        "This field is required."
                      ]
                    }
                  },
                  "save_api_request=false rejected": {
                    "summary": "يتم الاحتفاظ بالتحديدات دائماً",
                    "value": {
                      "save_api_request": [
                        "KYB registry select must be saved so billing and retrieval can be tracked."
                      ]
                    }
                  },
                  "Country not covered": {
                    "summary": "لا يغطي سجل الشركات هذه الدولة",
                    "value": {
                      "detail": "Company registry search is not available for this country. Enter the company details manually to continue.",
                      "code": "kyb_registry_country_unsupported"
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/passive-liveness/": {
      "post": {
        "summary": "كشف الحيوية السلبي",
        "description": "اكتشف هجمات العرض — الصور المطبوعة، وإعادة تشغيل الشاشة، والأقنعة، والتزييف العميق — من صورة وجه واحدة. لا يلزم وجود فيديو، أو حركة، أو تفاعل من المستخدم.\n\n**كيف يعمل.** يتم تحليل الصورة بواسطة نموذج بيومتري؛ ويتم تقييم أكبر وجه تم اكتشافه واحتساب `score` الحيوية (0–100). تصبح `status` هي `Declined` عند إطلاق أي تحذير بدرجة خطورة `error`:\n- `NO_FACE_DETECTED` — لم يعثر نموذج الحيوية على أي وجه،\n- `LOW_LIVENESS_SCORE` — الدرجة تساوي أو تقل عن `face_liveness_score_decline_threshold` (القيمة الافتراضية `30`)،\n- `LIVENESS_FACE_ATTACK` — اكتشف النموذج هجوم العرض،\n- `FACE_IN_BLOCKLIST` / `POSSIBLE_FACE_IN_BLOCKLIST` — يطابق الوجه مدخلاً في قائمة الحظر الخاصة بالوجوه لديك.\n\nتُعد `MULTIPLE_FACES_DETECTED` إشارة بدرجة خطورة `warning` (لا تؤدي إلى الرفض)، وتُعد `DUPLICATED_FACE` / `POSSIBLE_DUPLICATED_FACE` إشارات بدرجة خطورة `information` تفيد بأن الوجه نفسه قد ظهر بالفعل في جلسة أخرى مقبولة (لا تؤدي إلى الرفض أبداً). تصف `face_quality` و`face_luminance` (0–100، قد تكون فارغة) جودة الالتقاط.\n\n**فحص قائمة الحظر والتكرار.** يتم تشغيله مع **كل** استدعاء — سواء مع `save_api_request` أو بدونها — عن طريق مطابقة الوجه المكتشف مع فهرس البحث بالوجه الخاص بتطبيقك. يتم استبعاد الوجوه السابقة التي تحمل نفس `vendor_data` من البحث في كامل الفهرس — وبذلك فإن إعادة تشغيل كشف الحيوية لنفس المستخدم لا تؤدي إلى إطلاق `DUPLICATED_FACE`، كما أن الوجه المدرج في قائمة الحظر والناتج عن جلسة تحمل نفس `vendor_data` الخاصة بالمتصل لا يتم تمييزه أيضاً (يتم تجاوز فحص `FACE_IN_BLOCKLIST` للوجوه التي تحمل نفس `vendor_data`).\n\n**الفوترة.** يستهلك كل رد `200` رصيداً واحداً من Passive Liveness API (يُدفع من رصيد خطتك أو رصيد شحن الحساب). يؤدي عدم كفاية الرصيد إلى إرجاع `403` قبل إجراء أي معالجة للصور.\n\n**الاحتفاظ بالجلسة وتسجيل الوجه (`save_api_request`، القيمة الافتراضية `true`).** عندما تكون القيمة `true`، يتم حفظ الاستدعاء كجلسة من نوع API (في Business Console، و`GET /v3/session/{sessionId}/decision/` عبر `request_id` المُرجع، وحدث webhook من نوع `status.updated`)، ويتم تخزين الصورة المرجعية واقتصاص الوجه، ويتم **تسجيل الوجه المكتشف في فهرس البحث بالوجه لديك** حتى تتمكن استدعاءات البحث بالوجه اللاحقة وعمليات التحقق من التكرار من مطابقته. عندما تكون القيمة `false`، يكون الاستدعاء لمرة واحدة: لا يتم تخزين أي شيء ولا يتم تسجيل الوجه (مع استمرار تشغيل فحص قائمة الحظر/التكرار).\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية جميع عمليات المعالجة والفوترة: فبعد التحقق من صحة الطلب (المدخلات غير الصحيحة لا تزال تُرجع `400`)، يُرجع endpoint payload تجريبي ثابت بحالة `Approved`، ولا يتم الاحتفاظ بأي جلسة، ولا يُستهلك أي رصيد.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا يُرجع هذا الـ API أبداً `401`.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE؛ يؤدي تجاوزها إلى إرجاع `429`.",
        "operationId": "post_v3passive-liveness",
        "x-didit-sdk": {
          "resource": "passive_liveness",
          "method": "check",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "user_image"
                ],
                "properties": {
                  "user_image": {
                    "type": "string",
                    "format": "binary",
                    "description": "صورة وجه أمامية (مثل صورة سيلفي). الامتدادات المسموح بها: `tiff`، `jpg`، `jpeg`، `png`، `webp`. الحد الأقصى لحجم الرفع: **5 MB** (يتم رفض الملفات الأكبر حجماً بالرمز `400`). يتم ضغط الصور تلقائياً إلى ~0.5 MB قبل المعالجة، لذا فإن دقة الصورة العالية جداً لا تحسّن دقة النتائج. يجب أن تحتوي الصورة على شخص واحد — عند وجود عدة وجوه، يتم تقييم الوجه الأكبر ويُضاف تحذير `MULTIPLE_FACES_DETECTED`."
                  },
                  "face_liveness_score_decline_threshold": {
                    "type": "number",
                    "format": "float",
                    "default": 30,
                    "minimum": 0,
                    "maximum": 100,
                    "description": "حد درجة كشف الحيوية (0–100). تُصدر الدرجة المحسوبة التي تكون **عند أو أقل من** هذه القيمة تحذير `LOW_LIVENESS_SCORE` وتُعيّن `status` إلى `Declined`. القيمة الافتراضية `30`؛ ارفعها لاتباع نهج أكثر صرامة لمكافحة الانتحال. تُرجع القيم خارج النطاق 0–100 الخطأ `400`.",
                    "example": 30
                  },
                  "rotate_image": {
                    "type": "boolean",
                    "default": false,
                    "description": "عندما تكون `true`، تجرب الخدمة تدوير الإدخال بزيادات قدرها 90 درجة وتستخدم الاتجاه الذي يحقق أفضل كشف للوجه. مفيد عند فقدان اتجاه EXIF. يضيف تأخيراً في الاستجابة.",
                    "example": false
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "عندما تكون `true` (الافتراضي)، يتم حفظ الاستدعاء كجلسة من نوع API، وتخزين صور الوجه، وإرسال webhook من نوع `status.updated`، وتسجيل الوجه المكتشف في فهرس البحث بالوجه الخاص بك. عندما تكون `false`، يكون الاستدعاء لمرة واحدة فقط — لا يتم تخزين أي شيء ولا يتم تسجيل الوجه. يعمل فحص قائمة الحظر والتكرار في كلتا الحالتين.",
                    "example": true
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "معرّف مبهم اختياري (معرّف المستخدم لديك، البريد الإلكتروني، UUID...) يتم تخزينه في الجلسة المحفوظة وإعادته. يُستخدم أيضاً لاستبعاد الجلسات السابقة التي تحتوي على نفس `vendor_data` من فحص تكرار الوجه، بحيث لا تؤدي إعادة التحقق من نفس المستخدم إلى ظهور `DUPLICATED_FACE`.",
                    "example": "user-123"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "كائن JSON اختياري يُخزن مع الجلسة (عندما يكون `save_api_request=true`) ويُعاد في الاستجابة. في طلبات multipart، أرسله كحقل سلسلة نصية بترميز JSON — حيث يتم تحليله إلى كائن.",
                    "example": {
                      "flow": "withdrawal"
                    }
                  }
                }
              },
              "example": {
                "user_image": "(binary JPEG/PNG selfie)",
                "face_liveness_score_decline_threshold": 30,
                "rotate_image": false,
                "save_api_request": true,
                "vendor_data": "user-123",
                "metadata": {
                  "flow": "withdrawal"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل كشف الحيوية السلبي. يمثل `liveness.score` درجة ثقة النموذج من 0 إلى 100 بأن الصورة تُظهر شخصاً حقيقياً؛ وتكون `status` هي `Approved` ما لم يُطلق تحذير بدرجة خطورة `error`. يُرجع الوجه المنتحل أو المدرج في قائمة الحظر الرمز `200` أيضاً — تحقق من `liveness.status` و`liveness.warnings`، وليس من رمز HTTP فقط. عندما تكون `save_api_request=true`، فإن `request_id` يمثل معرّف الجلسة المحفوظة.",
            "content": {
              "application/json": {
                "examples": {
                  "Approved": {
                    "summary": "وجه حي — لا توجد تحذيرات",
                    "value": {
                      "request_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
                      "liveness": {
                        "status": "Approved",
                        "method": "PASSIVE",
                        "score": 95.0,
                        "user_image": {
                          "entities": [
                            {
                              "bbox": [
                                661,
                                728,
                                1688,
                                2188
                              ],
                              "confidence": 0.732973,
                              "age": 26.91,
                              "gender": "male",
                              "race": null
                            }
                          ],
                          "best_angle": 0
                        },
                        "warnings": [],
                        "face_quality": 84.21,
                        "face_luminance": 50.33
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T01:04:42.763237+00:00"
                    }
                  },
                  "Declined - presentation attack": {
                    "summary": "وضع النموذج علامة تحذير لوجود انتحال (طباعة، إعادة تشغيل، قناع…)",
                    "value": {
                      "request_id": "f1c8c9b2-d3e4-4f5a-9b8c-7d6e5f4a3b2c",
                      "liveness": {
                        "status": "Declined",
                        "method": "PASSIVE",
                        "score": 12.5,
                        "user_image": {
                          "entities": [
                            {
                              "bbox": [
                                100,
                                120,
                                420,
                                540
                              ],
                              "confidence": 0.81,
                              "age": 30.1,
                              "gender": "female",
                              "race": null
                            }
                          ],
                          "best_angle": 0
                        },
                        "warnings": [
                          {
                            "risk": "LOW_LIVENESS_SCORE",
                            "feature": "LIVENESS",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Low liveness score",
                            "long_description": "The liveness check resulted in a low score, indicating potential use of non-live facial representations or poor-quality biometric data."
                          },
                          {
                            "risk": "LIVENESS_FACE_ATTACK",
                            "feature": "LIVENESS",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Liveness Face Attack",
                            "long_description": "The system detected a potential attempt to bypass the liveness check."
                          }
                        ],
                        "face_quality": 72.4,
                        "face_luminance": 48.2
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T01:04:42.763237+00:00"
                    }
                  },
                  "Declined - face on blocklist": {
                    "summary": "وجه حي، ولكنه يطابق إدخالاً في قائمة الحظر",
                    "value": {
                      "request_id": "0b54a1de-22aa-4e0f-9c84-5a2b1f3c4d5e",
                      "liveness": {
                        "status": "Declined",
                        "method": "PASSIVE",
                        "score": 93.75,
                        "user_image": {
                          "entities": [
                            {
                              "bbox": [
                                40,
                                40,
                                100,
                                100
                              ],
                              "confidence": 0.722082,
                              "age": 27.0,
                              "gender": "male",
                              "race": null
                            }
                          ],
                          "best_angle": 0
                        },
                        "warnings": [
                          {
                            "risk": "FACE_IN_BLOCKLIST",
                            "feature": "LIVENESS",
                            "additional_data": {
                              "blocklisted_session_id": "882c42d5-8a4d-4d20-8080-a22f57822c86",
                              "blocklisted_session_number": 3242,
                              "api_service": null
                            },
                            "log_type": "error",
                            "short_description": "Face in blocklist",
                            "long_description": "The system identified a face in the blocklist, which means the face is not allowed to be verified."
                          }
                        ],
                        "face_quality": null,
                        "face_luminance": null
                      },
                      "vendor_data": "user-123",
                      "metadata": null,
                      "created_at": "2026-06-12T01:04:42.763237+00:00"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة المحفوظة عندما تكون `save_api_request=true` (يمكن استخدامه مع `GET /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID ارتباط مؤقت."
                    },
                    "liveness": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "Approved",
                            "Declined"
                          ],
                          "description": "`Declined` عند إطلاق تحذير واحد على الأقل بمستوى خطورة `error` (عدم وجود وجه، أو درجة منخفضة، أو هجوم العرض، أو مطابقة في قائمة الحظر)؛ و`Approved` خلاف ذلك. لا تتسبب مدخلات `warning`/`information` (وجوه متعددة، تطابقات مكررة) في الرفض بمفردها أبداً."
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "PASSIVE"
                          ],
                          "description": "دائماً `PASSIVE` لهذا الـ endpoint."
                        },
                        "score": {
                          "type": "number",
                          "format": "float",
                          "nullable": true,
                          "minimum": 0,
                          "maximum": 100,
                          "description": "درجة الثقة في كشف الحيوية (0–100، بمنزلتين عشريتين) بأن الصورة تُظهر شخصًا حيًا وليس انتحالًا. تكون `null` عندما لا يُرجع النموذج أي درجة ثقة.",
                          "example": 95.0
                        },
                        "user_image": {
                          "type": "object",
                          "description": "نتائج كشف الوجه للصورة المُرسلة.",
                          "properties": {
                            "entities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "bbox": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer"
                                    },
                                    "minItems": 4,
                                    "maxItems": 4,
                                    "description": "المربع المحيط للوجه المكتشف كإحداثيات بكسل `[x_min, y_min, x_max, y_max]` في الصورة المُعالجة.",
                                    "example": [
                                      661,
                                      728,
                                      1688,
                                      2188
                                    ]
                                  },
                                  "confidence": {
                                    "type": "number",
                                    "format": "float",
                                    "minimum": 0,
                                    "maximum": 1,
                                    "description": "درجة الثقة في كشف الوجه (0–1).",
                                    "example": 0.732973
                                  },
                                  "age": {
                                    "type": "number",
                                    "format": "float",
                                    "description": "العمر المقدّر بالنموذج للوجه المكتشف، بالسنوات. لأغراض إعلامية فقط — لا يؤثر على قرار كشف الحيوية.",
                                    "example": 26.91
                                  },
                                  "gender": {
                                    "type": "string",
                                    "description": "الجنس المتوقع بالنموذج للوجه المكتشف (`male` أو `female`). لأغراض إعلامية فقط.",
                                    "example": "male"
                                  },
                                  "race": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "حقل محجوز — دائماً `null` في الاستجابات من هذا endpoint.",
                                    "example": null
                                  }
                                }
                              },
                              "description": "إدخال واحد لكل وجه مكتشف. ويتم تقييم الوجه الأكبر."
                            },
                            "best_angle": {
                              "type": "integer",
                              "nullable": true,
                              "description": "زاوية التدوير (بالدرجات) التي حققت أفضل كشف للوجه؛ ولا تكون غير صفرية إلا عندما يصحح `rotate_image=true` الاتجاه.",
                              "example": 0
                            }
                          }
                        },
                        "warnings": {
                          "type": "array",
                          "description": "إشارات المخاطر. الشدة `error` (تؤدي إلى الرفض): `NO_FACE_DETECTED`، و`LOW_LIVENESS_SCORE` (الدرجة عند الحد أو دونه)، و`LIVENESS_FACE_ATTACK`، و`FACE_IN_BLOCKLIST`، و`POSSIBLE_FACE_IN_BLOCKLIST`. الشدة `warning` (تتطلب مراجعة، دون رفض): `MULTIPLE_FACES_DETECTED`. الشدة `information` (دون رفض): `DUPLICATED_FACE`، و`POSSIBLE_DUPLICATED_FACE` — حيث ظهر الوجه نفسه مسبقاً في جلسة مقبولة أخرى.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "risk": {
                                "type": "string",
                                "enum": [
                                  "NO_FACE_DETECTED",
                                  "LOW_LIVENESS_SCORE",
                                  "LIVENESS_FACE_ATTACK",
                                  "MULTIPLE_FACES_DETECTED",
                                  "FACE_IN_BLOCKLIST",
                                  "POSSIBLE_FACE_IN_BLOCKLIST",
                                  "DUPLICATED_FACE",
                                  "POSSIBLE_DUPLICATED_FACE"
                                ],
                                "description": "رمز مخاطر مقروء آلياً."
                              },
                              "feature": {
                                "type": "string",
                                "enum": [
                                  "LIVENESS"
                                ],
                                "description": "الميزة التي أصدرت التحذير. دائماً `LIVENESS` في هذا الـ endpoint."
                              },
                              "additional_data": {
                                "type": "object",
                                "nullable": true,
                                "additionalProperties": true,
                                "description": "`null` لمعظم التحذيرات. تحمل نتائج قائمة الحظر `{blocklisted_session_id, blocklisted_session_number, api_service}`؛ وتحمل النتائج المكررة `{duplicated_session_id, duplicated_session_number, api_service}` مشيرةً إلى الجلسة المطابقة."
                              },
                              "log_type": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warning",
                                  "information"
                                ],
                                "description": "مستوى الخطورة. تحذيرات `error` تنقل `status` إلى `Declined`؛ وإدخالات `warning` و`information` استشارية ولا تؤدي إلى الرفض بمفردها أبداً."
                              },
                              "short_description": {
                                "type": "string",
                                "description": "ملخص للمخاطر في سطر واحد مقروء للبشر."
                              },
                              "long_description": {
                                "type": "string",
                                "description": "تفسير سهل القراءة للمخاطر."
                              }
                            }
                          }
                        },
                        "face_quality": {
                          "type": "number",
                          "format": "float",
                          "nullable": true,
                          "minimum": 0,
                          "maximum": 100,
                          "description": "درجة جودة التقاط الوجه المكتشف، موحدة القياس بين 0 و100. تكون `null` إذا لم يتمكن النموذج من تقديم قيمة موثوقة.",
                          "example": 84.21
                        },
                        "face_luminance": {
                          "type": "number",
                          "format": "float",
                          "nullable": true,
                          "minimum": 0,
                          "maximum": 100,
                          "description": "سطوع الوجه المكتشف، مُطبَّع إلى 0–100. القيمة `null` عندما يكون غير متاح.",
                          "example": 50.33
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، أو `null`."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "نسخة مطابقة من كائن `metadata` الذي أرسلته، أو `null`."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "طابع زمني بتنسيق ISO 8601 (بالتوقيت العالمي المنسق UTC) لوقت إنشاء الاستجابة، مثل `2026-06-12T01:04:42.763237+00:00`."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. يتم إرجاعه عندما تكون `user_image` مفقودة، أو يتجاوز حجمها 5 MB، أو يكون امتدادها غير مدعوم، أو تفشل عملية فك ترميز الصورة من جانب الخادم، أو عندما يكون أحد الخيارات خارج النطاق. تستخدم أخطاء الحقول غلاف `{field: [messages]}` الخاص بـ DRF؛ بينما تستخدم حالات فشل فك ترميز الصورة `{\"error\": ...}`.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing image": {
                    "summary": "لم يتم تضمين `user_image` في بيانات النموذج",
                    "value": {
                      "user_image": [
                        "No file was submitted."
                      ]
                    }
                  },
                  "Invalid image format": {
                    "summary": "امتداد مسموح به ولكن محتوى الصورة غير قابل لفك الترميز",
                    "value": {
                      "error": "Invalid user image format.",
                      "code": "invalid_image"
                    }
                  },
                  "Unsupported file extension": {
                    "summary": "امتداد الملف خارج tiff/jpg/jpeg/png/webp",
                    "value": {
                      "user_image": [
                        "File extension “txt” is not allowed. Allowed extensions are: tiff, jpg, jpeg, png, webp."
                      ]
                    }
                  },
                  "File too large": {
                    "summary": "يتجاوز الملف المرفوع حد 5 ميجابايت",
                    "value": {
                      "user_image": [
                        "File size should not exceed 5 MB"
                      ]
                    }
                  }
                }
              }
            }
          },
          "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/passive-liveness/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'user_image=@./selfie.jpg' \\\n  -F 'face_liveness_score_decline_threshold=30' \\\n  -F 'save_api_request=true' \\\n  -F 'vendor_data=user-123'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.passive_liveness.check(\n    user_image=open(\"user_image.jpg\", \"rb\"),\n    face_liveness_score_decline_threshold=30.0,\n    rotate_image=False,\n    save_api_request=True,\n    vendor_data=\"user-123\",\n    metadata={\"flow\": \"withdrawal\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.passiveLiveness.check({\n  user_image: await fileFromPath(\"user_image.jpg\"),\n  face_liveness_score_decline_threshold: 30.0,\n  rotate_image: false,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"withdrawal\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.PassiveLiveness.Check(ctx, didit.PassiveLivenessCheckParams{\n\tUserImage:                         didit.FileFromPath(\"user_image.jpg\"),\n\tFaceLivenessScoreDeclineThreshold: didit.Float(30.0),\n\tRotateImage:                       didit.Bool(false),\n\tSaveAPIRequest:                    didit.Bool(true),\n\tVendorData:                        didit.String(\"user-123\"),\n\tMetadata:                          didit.Some(map[string]any{\"flow\": \"withdrawal\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.PassiveLivenessCheckParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.passiveLiveness().check(PassiveLivenessCheckParams.builder()\n        .userImage(Path.of(\"user_image.jpg\"))\n        .faceLivenessScoreDeclineThreshold(30.0)\n        .rotateImage(false)\n        .saveApiRequest(true)\n        .vendorData(\"user-123\")\n        .metadata(Map.of(\"flow\", \"withdrawal\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->passiveLiveness->check([\n    'user_image' => File::fromPath('user_image.jpg'),\n    'face_liveness_score_decline_threshold' => 30.0,\n    'rotate_image' => false,\n    'save_api_request' => true,\n    'vendor_data' => 'user-123',\n    'metadata' => ['flow' => 'withdrawal'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.passive_liveness.check(\n  user_image: Pathname(\"user_image.jpg\"),\n  face_liveness_score_decline_threshold: 30.0,\n  rotate_image: false,\n  save_api_request: true,\n  vendor_data: \"user-123\",\n  metadata: { flow: \"withdrawal\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.PassiveLiveness.CheckAsync(new PassiveLivenessCheckParams\n{\n    UserImage = FileUpload.FromPath(\"user_image.jpg\"),\n    FaceLivenessScoreDeclineThreshold = 30.0,\n    RotateImage = false,\n    SaveApiRequest = true,\n    VendorData = \"user-123\",\n    Metadata = new Dictionary<string, object> { [\"flow\"] = \"withdrawal\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/database-validation/": {
      "post": {
        "summary": "التحقق من قواعد البيانات (مستقل)",
        "operationId": "post_v3database-validation",
        "x-didit-sdk": {
          "resource": "database_validation",
          "method": "validate",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [],
        "description": "التحقق من بيانات هوية الشخص مقابل المصادر الحكومية ومصادر السجلات الرسمية — CPF في البرازيل، وRENAPER في الأرجنتين، وسجلات DNI في إسبانيا وبيرو، وINE في المكسيك، و100+ خدمة أخرى عبر 60+ دولة.\n\n**اختيار الخدمة.** تتيح كل دولة خدمة واحدة أو أكثر من خدمات الدليل المحددة بواسطة `service_id` (مثل `bra_cpf`، و`arg_renaper`، و`pan_cedula_sib`). حدد الخدمات التي تريدها باستخدام مصفوفة `services` — وإذا حذفتها، فسيتم تشغيل خدمة افتراضية **واحدة** فقط (الخدمة المباشرة الأقدم في تلك الدولة). يؤدي إرسال `services` أيضًا إلى تبديل الاستجابة إلى الشكل الموسع مع `services_used` و`match_score`. استكشف الخدمات، وحقولها المطلوبة، وأسعارها عبر `GET /v1/organization/database-validation-countries/` (وهو endpoint للدليل غير موثق في هذه المواصفات) أو محرر سير العمل في Business Console. تُميز بعض الخدمات بعلامة `requires_consent=true` في الدليل وتتطلب `consent=true`؛ بينما تتطلب خدمات أخرى التسجيل لمؤسستك قبل أن تتمكن من استدعائها.\n\n**حقول الإدخال.** يُعد `identification_number` حقلاً عامًا يتم تعيينه إلى الحقل المناسب الخاص بالدولة تلقائيًا (راجع وصفه). يتم فرض قواعد تنسيق الدولة قبل استدعاء أي مزود (على سبيل المثال، يجب أن يتكون BRA CPF من 11 رقمًا بالضبط)، ولا تتم فوترة حالات فشل التنسيق أبدًا. تحتاج الخدمات البيومترية إلى تحميل `selfie` (بتنسيق multipart فقط)؛ وتتطلب خدمة RENAPER في الأرجنتين حقل `gender` بالإضافة إلى ذلك.\n\n**النتائج.** تُرجع كل خدمة خريطة `validation` لكل حقل بالإضافة إلى `outcome_code` محايد بالنسبة للمزودين (`MATCH`، `PARTIAL_MATCH`، `NO_MATCH`، `DOCUMENT_NOT_FOUND`، `INVALID_DOCUMENT_FORMAT`، `INVALID_INPUT`، `MINOR_BLOCKED`، `DECEASED`، `BIOMETRIC_NO_MATCH`، `BIOMETRIC_IMAGE_UNUSABLE`، `INCONCLUSIVE`، `DOCUMENT_SUPERSEDED`، `REGISTRY_UNAVAILABLE`، `REGISTRY_ERROR`). لاحِظ الفروق: `NO_MATCH` هو عدم تطابق قاطع، و`INCONCLUSIVE` يعني أن السجل لم يتمكن من التأكيد بأي من الطريقتين (مراجعة، وليس رفضًا)، و`BIOMETRIC_IMAGE_UNUSABLE` مشكلة فنية في الصورة السيلفي (إعادة التقاط)، بخلاف `BIOMETRIC_NO_MATCH` القاطع. يجمع `match_type` الإجمالي عبر الخدمات (أي تطابق كامل → `full_match`، وإلا فإن أي تطابق جزئي → `partial_match`، وإلا `no_match`) ويقوم `no_match_action`/`partial_match_action` بترجمته إلى `status` النهائي. يتم اشتقاق `validation_type`: `two_by_two` عندما تسفر خدمتان مميزتان أو أكثر عن تطابق كامل (على رقم الهوية، أو على الاسم الكامل + تاريخ الميلاد معًا، أو على العنوان دون تناقضات)، وإلا يكون `one_by_one`.\n\n**الاحتفاظ بالبيانات.** القيمة الافتراضية لـ `save_api_request` هي **true**: يتم تخزين النتيجة كجلسة (يعمل `request_id` مع `GET /v3/session/{sessionId}/decision/`)، وتظهر في لوحة التحكم، وتُطلق حدث webhook من نوع `status.updated`. كما يتحكم أيضًا في شكل `validations` — كائنات لكل خدمة عند الحفظ، وخريطة `{field: match}` مدمجة عند عدم الحفظ.\n\n**الفوترة.** لكل خدمة: يتم تحصيل سعر الدليل الخاص بكل خدمة تُرجع نتيجة قابلة للفوترة. لا تتم فوترة الخدمات الفاشلة أو التي تم تخطيها، ولا تترتب أي تكلفة على الطلبات المرفوضة برمز `400`. يغطي فحص الرصيد المسبق مجموع أسعار الخدمات المحددة (ويُرجع `403` في حالة عدم الكفاية).\n\n**حالات الفشل.** عندما لا تُرجع أي خدمة محددة نتيجة قابلة للاستخدام، تُرجع واجهة API الرمز `400` مع `validation_errors` إذا كانت كل محاولة لم تتم الإجابة عليها قد رفضت المدخلات صراحة (`provider_rejected_input`، `retryable: false`). صحح المدخلات قبل المحاولة مرة أخرى. وإلا فإنها تُرجع `502` مع `validation_errors` (`empty_provider_response`، `retryable: true`)، بما في ذلك المحاولات التي تجمع بين رفض المدخلات وعدم توفر خيارات التراجع الاحتياطية؛ ولا تتم فوترة أي شيء (تظل الجلسة مسجلة بالحالة `Not Finished` عندما يكون `save_api_request=true`). وعندما تفشل بعض الخدمات فقط، تتضمن الاستجابة `200` حالات الفشل هذه في `database_validation.errors`.\n\n**البيئة التجريبية.** تتخطى المفاتيح الخاصة بتطبيقات البيئة التجريبية استدعاءات السجلات والفوترة وتُرجع استجابة `full_match` ثابتة — يتضمن payload البيئة التجريبية دائمًا `services_used` و`match_score: 100` بغض النظر عن كيفية إرسال `services`، لذا لا تتحقق من منطق تفعيل الشكل الموسع في بيئة الإنتاج أو من كون `match_score` كسرًا يتراوح بين 0.0 و1.0 مقابل استجابات البيئة التجريبية.\n\nأرسل الطلب بتنسيق `application/json`، أو كـ `multipart/form-data` عند تحميل `selfie`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "issuing_state"
                ],
                "properties": {
                  "issuing_state": {
                    "type": "string",
                    "description": "رمز الدولة وفقاً لـ ISO 3166-1 **alpha-3** للسجل المراد التحقق منه (مثل `BRA`، `ESP`، `COL`). يحدد الخدمات المتاحة. الرموز غير المدعومة تُرجع `400` مع القائمة الكاملة للخيارات الصالحة.",
                    "example": "BRA"
                  },
                  "services": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "معرّفات `service_id` من الدليل لتشغيلها لهذه الدولة (مثل `[\"bra_cpf\"]`). يقبل أيضاً سلسلة نصية مفردة أو سلسلة مفصولة بفواصل/مرمزة بتنسيق JSON. **إذا تم حذفه أو تُرك فارغاً، فسيتم تشغيل خدمة افتراضية واحدة فقط** — وهي الخدمة العاملة الأقدم للدولة؛ أما الخدمات الأحدث والبيومترية وخدمات الدفع حسب الاستخدام فيجب تحديدها صراحةً. إرسال `services` يغيّر شكل الاستجابة إلى الشكل الموسع (يضيف `services_used` و`match_score`). يجب أن يكون كل معرّف موجوداً ونشطاً في `issuing_state`؛ والخدمات التي تتطلب التسجيل تُرجع الرمز `400` حتى يتم تفعيلها لمؤسستك. يمكنك استكشاف الخدمات المتاحة لكل دولة عبر `GET /v1/organization/database-validation-countries/` (وهو endpoint للدليل غير موثق في هذه المواصفة) أو عبر محرر سير العمل في Business Console.",
                    "example": [
                      "bra_cpf"
                    ]
                  },
                  "validation_type": {
                    "type": "string",
                    "deprecated": true,
                    "description": "مهمل. يُقبل للتوافق مع الإصدارات السابقة ولكن يتم تجاهله — يُشتق `validation_type` في الاستجابة الآن من عدد الخدمات التي تطابقت بالكامل. استخدم `services` لتحديد خدمات معينة."
                  },
                  "consent": {
                    "type": "boolean",
                    "default": false,
                    "description": "يُضبط على `true` عندما يوافق المستخدم النهائي صراحةً على خدمات التحقق المحددة. مطلوب للخدمات التي تحمل العلامة `requires_consent=true` في الدليل — وبدونه تُرجع هذه الخدمات رمز `400` مع `services_requiring_consent`."
                  },
                  "identification_number": {
                    "type": "string",
                    "description": "رقم التعريف الشامل — يتم تعيينه تلقائيًا إلى الحقل المخصص للدولة الصحيحة، لذا يمكنك استخدامه بدلاً من `personal_number`/`tax_number`/`document_number`: ARG→document_number (DNI)، BOL→document_number (CI)، BRA→tax_number (CPF، 11 رقماً)، CHL→personal_number (RUT)، COL→personal_number (Cédula)، CRI→personal_number (Cédula)، DOM→personal_number (Cédula، 11 رقماً)، ECU→personal_number (Cédula، 10 أرقام)، ESP→personal_number (DNI/NIE)، GTM→document_number (DPI)، HND→document_number (DNI)، MEX→personal_number (CURP، 18 حرفاً)، PAN→personal_number (Cédula)، PER→personal_number (DNI، 8 أرقام)، PRY→document_number (CI)، SLV→document_number (DUI)، URY→personal_number (CI)، VEN→document_number (Cédula). لا يتجاوز أبدًا أي حقل مخصص للدولة تم تقديمه صراحةً."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "الاسم الأول للفرد. مطلوب في بعض الخدمات/الدول.",
                    "example": "John"
                  },
                  "last_name": {
                    "type": "string",
                    "description": "اسم العائلة للفرد. مطلوب في بعض الخدمات/الدول.",
                    "example": "Doe"
                  },
                  "middle_name": {
                    "type": "string",
                    "description": "الاسم الأوسط، يُستخدم بواسطة خدمات بعض الدول (أستراليا، نيوزيلندا، ...)."
                  },
                  "full_name": {
                    "type": "string",
                    "description": "الاسم الكامل — تقبل بعض الخدمات هذا بدلاً من الاسم الأول/اسم العائلة (مثل خدمات CHN، التي تطابق الاسم بنظام الكتابة الأصلي)."
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ الميلاد، `YYYY-MM-DD`. مطلوب من قبل العديد من الخدمات.",
                    "example": "1980-01-01"
                  },
                  "personal_number": {
                    "type": "string",
                    "description": "معرّف شخصي فريد صادر عن الحكومة. يُستخدم في: CHL (RUT)، COL (Cédula)، CRI، DOM، ECU، ESP (DNI/NIE)، MEX (CURP)، PAN (Cédula)، PER (DNI)، URY. يُفضَّل استخدام `identification_number` بدلاً منه."
                  },
                  "tax_number": {
                    "type": "string",
                    "description": "الرقم الضريبي. يُستخدم من قبل: BRA (CPF، مكون من 11 رقماً). فكّر في استخدام `identification_number` بدلاً منه."
                  },
                  "document_number": {
                    "type": "string",
                    "description": "رقم المستند. يُستخدم بواسطة: ARG (DNI)، وBOL (CI)، وGTM (DPI)، وHND (DNI)، وPRY (CI)، وSLV (DUI)، وVEN (Cédula). فكّر في استخدام `identification_number` بدلاً من ذلك."
                  },
                  "document_type": {
                    "type": "string",
                    "enum": [
                      "P",
                      "DL",
                      "ID",
                      "RP",
                      "SSC",
                      "HIC",
                      "WP",
                      "TC",
                      "VISA",
                      "PSC",
                      "BC",
                      "OTHER"
                    ],
                    "description": "نوع المستند الذي يتم التحقق منه: `P` جواز سفر، `DL` رخصة قيادة، `ID` بطاقة هوية وطنية، `RP` تصريح إقامة (بالإضافة إلى `SSC`، `HIC`، `WP`، `TC`، `VISA`، `PSC`، `BC`، `OTHER`). مطلوب لبعض الخدمات (مثل ESP)."
                  },
                  "expiration_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ انتهاء المستند، `YYYY-MM-DD`. مطلوب للتحقق في إسبانيا (ESP).",
                    "example": "2030-01-15"
                  },
                  "date_of_issue": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ إصدار المستند، `YYYY-MM-DD` (fecha de expedición). مطلوب للتحقق من cédula في كولومبيا (COL).",
                    "example": "2015-06-20"
                  },
                  "nationality": {
                    "type": "string",
                    "description": "الجنسية وفق معيار ISO 3166-1 alpha-3. مطلوبة من قِبل بعض الخدمات."
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "M",
                      "F",
                      "X"
                    ],
                    "description": "الجنس: `M`، أو `F`، أو `X` (آخر/غير معروف). مطلوب للتحقق من RENAPER في الأرجنتين (`arg_renaper`)."
                  },
                  "address": {
                    "description": "عنوان السكن. يُفضّل الكائن المهيكل `{\"street_1\":\"123 Main St\",\"street_2\":\"Apt 4B\",\"city\":\"Springfield\",\"region\":\"IL\",\"postal_code\":\"62701\",\"country\":\"US\"}`؛ لا تزال السلسلة النصية الكاملة في سطر واحد مقبولة. مطلوب لخدمات التحقق من العنوان؛ وعندما تحدد الخدمة متطلبات العنوان، فإن الأجزاء المفقودة تُرجع `400` مع `address_fields_required_by`.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "street_1": {
                            "type": "string"
                          },
                          "street_2": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "region": {
                            "type": "string"
                          },
                          "postal_code": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "string",
                        "description": "العنوان الكامل في سطر واحد (قديم)."
                      }
                    ]
                  },
                  "address_element_1": {
                    "type": "string",
                    "description": "عنوان الشارع بما في ذلك رقم الشارع ونوعه. إذا تم حذفه، فسيتم استنتاجه من `address`."
                  },
                  "address_element_2": {
                    "type": "string",
                    "description": "شقة، وحدة، مبنى، طابق، أو سطر عنوان إضافي. أرسله فقط عندما يتوفر لديك بشكل صريح."
                  },
                  "address_element_3": {
                    "type": "string",
                    "description": "المدينة، أو الضاحية، أو الحي، أو المنطقة، أو المجاورة. إذا تم حذفه، فسيتم استنتاجه من `address`."
                  },
                  "address_element_4": {
                    "type": "string",
                    "description": "الولاية أو المقاطعة أو المنطقة أو البلدة. إذا تم حذفه، يُستنتج من `address`."
                  },
                  "address_element_5": {
                    "type": "string",
                    "description": "الرمز البريدي. يُقبل `postal_code` كاسم بديل."
                  },
                  "postal_code": {
                    "type": "string",
                    "description": "الرمز البريدي للخدمات المعتمدة على العنوان (اسم بديل لـ `address_element_5`)."
                  },
                  "driver_license_number": {
                    "type": "string",
                    "description": "رقم رخصة القيادة لخدمات التحقق من المستندات الحكومية (AUS، NZL، IND)."
                  },
                  "driver_license_card_number": {
                    "type": "string",
                    "description": "رقم بطاقة رخصة القيادة الفعلية، حيث يُطلب بشكل منفصل عن رقم الرخصة (أستراليا)."
                  },
                  "driver_license_state": {
                    "type": "string",
                    "description": "ولاية أو إقليم إصدار رخصة القيادة (AUS)."
                  },
                  "driver_license_version": {
                    "type": "string",
                    "description": "رمز إصدار رخصة القيادة (NZL)."
                  },
                  "passport_number": {
                    "type": "string",
                    "description": "رقم جواز السفر لخدمات التحقق الحكومية من جوازات السفر (AUS وNZL وIND وCHN)."
                  },
                  "passport_expiration_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ انتهاء جواز السفر، بصيغة `YYYY-MM-DD`، لخدمات التحقق من جوازات السفر."
                  },
                  "passport_file_number": {
                    "type": "string",
                    "description": "رقم ملف جواز السفر (IND)."
                  },
                  "passport_issue_country": {
                    "type": "string",
                    "description": "دولة إصدار جواز السفر (ISO 3166-1 alpha-3) لخدمات التحقق من جوازات السفر."
                  },
                  "medicare_card_number": {
                    "type": "string",
                    "description": "رقم بطاقة Medicare (أستراليا)."
                  },
                  "immi_card_number": {
                    "type": "string",
                    "description": "رقم بطاقة ImmiCard الأسترالية."
                  },
                  "immi_card_expiry_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ انتهاء بطاقة ImmiCard الأسترالية."
                  },
                  "citizenship_certificate_number": {
                    "type": "string",
                    "description": "رقم شهادة المواطنة (أستراليا)."
                  },
                  "birth_registration_number": {
                    "type": "string",
                    "description": "رقم تسجيل شهادة الميلاد (أستراليا)."
                  },
                  "birth_registration_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ تسجيل شهادة الميلاد (أستراليا)."
                  },
                  "birth_registration_state": {
                    "type": "string",
                    "description": "ولاية تسجيل شهادة الميلاد (أستراليا)."
                  },
                  "marriage_certificate_number": {
                    "type": "string",
                    "description": "رقم شهادة الزواج (أستراليا)."
                  },
                  "change_of_name_certificate_number": {
                    "type": "string",
                    "description": "رقم شهادة تغيير الاسم (AUS)."
                  },
                  "first_partner_name": {
                    "type": "string",
                    "description": "الاسم الأول للشريك في عقد الزواج (أستراليا)."
                  },
                  "last_partner_name": {
                    "type": "string",
                    "description": "اسم العائلة للشريك في وثيقة الزواج (AUS)."
                  },
                  "voter_id": {
                    "type": "string",
                    "description": "رقم تسجيل الناخب (IND EPIC، IRL)."
                  },
                  "epic_card": {
                    "type": "string",
                    "description": "رقم بطاقة الناخب EPIC للهند."
                  },
                  "pan": {
                    "type": "string",
                    "description": "الهند: رقم الحساب الدائم (PAN)."
                  },
                  "national_id": {
                    "type": "string",
                    "description": "رقم الهوية الوطنية (CHN، وMYS، وKEN، وKHM، وNGA، وZAF، و…)."
                  },
                  "cic": {
                    "type": "string",
                    "description": "رمز تعريف بطاقة الهوية (CIC) التابع لـ INE/IFE المكسيكي، 9 أرقام. يُستخدم بواسطة خدمة صلاحية بيانات اعتماد MEX INE (`mex_ine_vigencia`)."
                  },
                  "identificador_ciudadano": {
                    "type": "string",
                    "description": "مُعرّف المواطن (Identificador del Ciudadano) للمعهد الانتخابي الوطني المكسيكي INE (9 أرقام). يُستخدم مع `cic` لنماذج INE الحديثة (E/F/G/H) في `mex_ine_vigencia`."
                  },
                  "ocr": {
                    "type": "string",
                    "description": "رقم OCR للمعهد الانتخابي الوطني المكسيكي INE (13 رقمًا، ظهر البطاقة). يُستخدم مع `cic` للنموذج D في `mex_ine_vigencia`."
                  },
                  "voter_number": {
                    "type": "string",
                    "description": "مفتاح الناخب (Clave de Elector) للمعهد الانتخابي الوطني المكسيكي INE (18 حرفًا). يُستخدم مع `emission_number` لنماذج IFE القديمة (A/B/C) في `mex_ine_vigencia`."
                  },
                  "emission_number": {
                    "type": "string",
                    "description": "رقم الإصدار (Número de Emisión) للمعهد الانتخابي الوطني المكسيكي INE. يُستخدم مع `voter_number` لنماذج IFE القديمة (A/B/C) في `mex_ine_vigencia`."
                  },
                  "bvn": {
                    "type": "string",
                    "description": "رقم التحقق المصرفي النيجيري."
                  },
                  "bank_card_number": {
                    "type": "string",
                    "description": "رقم البطاقة البنكية (التحقق من البطاقة البنكية في CHN)."
                  },
                  "company_registration_number": {
                    "type": "string",
                    "description": "رقم تسجيل الشركة الصادر عن سجل الشركات: مثل CNPJ في البرازيل (على سبيل المثال `11222333000181`)، ورقم التسجيل في جنوب إفريقيا (على سبيل المثال `1936/007721/06`). مطلوب لخدمات سجل الشركات ومديري الشركات (`bra_company_registry`، `bra_company_directors`، `zaf_company_registry`، `zaf_company_directors`)."
                  },
                  "company_name": {
                    "type": "string",
                    "description": "اسم الشركة المسجل، بعد مطابقته مع قيد السجل. اختياري لـ `zaf_company_registry`."
                  },
                  "initials": {
                    "type": "string",
                    "description": "الأحرف الأولى من اسم الشخص كما هي مطبوعة على المستند. مطلوبة لـ `zaf_drivers_license`؛ ومقبولة لـ `zaf_bank_account_holder`."
                  },
                  "licence_number": {
                    "type": "string",
                    "description": "رقم رخصة القيادة كما هو مطبوع على البطاقة، لـ `zaf_drivers_license`. عند حذفه، يُستخدم `document_number`."
                  },
                  "refugee_file_number": {
                    "type": "string",
                    "description": "رقم ملف اللاجئ الصادر عن وزارة الشؤون الداخلية في جنوب أفريقيا. مطلوب لـ `zaf_refugee`."
                  },
                  "bank_name": {
                    "type": "string",
                    "description": "اسم البنك الذي يحتفظ بالحساب. يتطلبه `zaf_bank_account_holder`."
                  },
                  "bank_account_number": {
                    "type": "string",
                    "description": "رقم الحساب البنكي. مطلوب بواسطة `zaf_bank_account_holder`؛ ومقبول بواسطة `zaf_fraud_prevention`."
                  },
                  "account_type": {
                    "type": "string",
                    "description": "نوع الحساب البنكي لـ `zaf_bank_account_holder`: `current`، أو `savings`، أو `transmission`، أو `subscriptionShare`، أو `notKnown`، دون حساسية لحالة الأحرف. تُرجع أي قيمة أخرى `400`. احذفه عندما لا تعرف النوع: سيتم بعد ذلك الإبلاغ عن التحقق المتبادل من نوع الحساب بأنه غير مؤكد."
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "رقم الهاتف المحمول للتواصل، للخدمات التي تتحقق من إمكانية التواصل (`zaf_bank_account_holder`، `zaf_fraud_prevention`، `zaf_refugee`)."
                  },
                  "right_thumb": {
                    "type": "string",
                    "description": "بصمة الإبهام الأيمن بترميز Base64 لـ `zaf_dha_fingerprint_match`، مع `left_thumb` أو بمفردها."
                  },
                  "left_thumb": {
                    "type": "string",
                    "description": "بصمة الإبهام الأيسر بترميز Base64 لـ `zaf_dha_fingerprint_match`، مع `right_thumb` أو بمفردها."
                  },
                  "score_level": {
                    "type": "integer",
                    "description": "الحد الأدنى لمستوى الدرجة البيومترية لـ `zaf_criminal_face_screening`. القيمة الافتراضية هي `3`."
                  },
                  "max_matches": {
                    "type": "integer",
                    "description": "الحد الأقصى لعدد التطابقات المرشحة التي يرجعها `zaf_criminal_face_screening`. القيمة الافتراضية هي `1`."
                  },
                  "vehicle_register_number": {
                    "type": "string",
                    "description": "رقم تسجيل المركبة. مطلوب، مع `vehicle_licence_plate` و`vin`، بواسطة `zaf_vehicle_ownership`."
                  },
                  "vehicle_licence_plate": {
                    "type": "string",
                    "description": "رقم لوحة ترخيص المركبة. مطلوب، مع `vehicle_register_number` و`vin`، بواسطة `zaf_vehicle_ownership`."
                  },
                  "vin": {
                    "type": "string",
                    "description": "رقم تعريف المركبة (VIN أو رقم الشاسيه). مطلوب، مع `vehicle_register_number` و`vehicle_licence_plate`، بواسطة `zaf_vehicle_ownership`."
                  },
                  "ssn": {
                    "type": "string",
                    "description": "رقم الضمان الاجتماعي (الولايات المتحدة الأمريكية)."
                  },
                  "phone": {
                    "type": "string",
                    "description": "رقم الهاتف لخدمات التحقق من رقم الهاتف."
                  },
                  "landline": {
                    "type": "string",
                    "description": "رقم الهاتف الأرضي لخدمات التحقق من رقم الهاتف."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "عنوان البريد الإلكتروني لخدمات التحقق من الهوية."
                  },
                  "country_of_residence": {
                    "type": "string",
                    "description": "دولة الإقامة وفق المعيار ISO 3166-1 alpha-2. تُستخدم بواسطة خدمات إثراء الهوية العالمية (مثل `glb_identity_enrichment`) لتركيز البحث.",
                    "example": "US"
                  },
                  "partial_match_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "NO_ACTION",
                    "description": "ما يفعله `partial_match` بحالة `database_validation.status`. القيمة الافتراضية هي `NO_ACTION` (تبقى الحالة `Approved`، مع تحذير)."
                  },
                  "no_match_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "ما يفعله `no_match` بحالة `database_validation.status`. القيمة الافتراضية هي `DECLINE`."
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "حفظ التحقق كجلسة (الظهور في لوحة التحكم، endpoint القرار، webhook الخاص بـ `status.updated`). يُغيّر أيضاً شكل استجابة `validations`: كائنات لكل خدمة عندما تكون القيمة `true` (افتراضياً)، وخريطة حقول مدمجة عندما تكون `false`."
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "المعرّف الخاص بك للمستخدم الذي تم التحقق منه؛ تتم إعادته وتخزينه مع الجلسة."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON بصيغة حرة يُخزن مع الطلب وتتم إعادته في الاستجابة."
                  }
                }
              },
              "example": {
                "issuing_state": "BRA",
                "services": [
                  "bra_cpf"
                ],
                "identification_number": "12345678900",
                "first_name": "John",
                "last_name": "Doe",
                "date_of_birth": "1980-01-01",
                "vendor_data": "user-1234"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "issuing_state"
                ],
                "properties": {
                  "issuing_state": {
                    "type": "string",
                    "description": "رمز الدولة وفقاً لـ ISO 3166-1 **alpha-3** للسجل المراد التحقق منه (مثل `BRA`، `ESP`، `COL`). يحدد الخدمات المتاحة. الرموز غير المدعومة تُرجع `400` مع القائمة الكاملة للخيارات الصالحة.",
                    "example": "BRA"
                  },
                  "services": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "معرّفات `service_id` من الدليل لتشغيلها لهذه الدولة (مثل `[\"bra_cpf\"]`). يقبل أيضاً سلسلة نصية مفردة أو سلسلة مفصولة بفواصل/مرمزة بتنسيق JSON. **إذا تم حذفه أو تُرك فارغاً، فسيتم تشغيل خدمة افتراضية واحدة فقط** — وهي الخدمة العاملة الأقدم للدولة؛ أما الخدمات الأحدث والبيومترية وخدمات الدفع حسب الاستخدام فيجب تحديدها صراحةً. إرسال `services` يغيّر شكل الاستجابة إلى الشكل الموسع (يضيف `services_used` و`match_score`). يجب أن يكون كل معرّف موجوداً ونشطاً في `issuing_state`؛ والخدمات التي تتطلب التسجيل تُرجع الرمز `400` حتى يتم تفعيلها لمؤسستك. يمكنك استكشاف الخدمات المتاحة لكل دولة عبر `GET /v1/organization/database-validation-countries/` (وهو endpoint للدليل غير موثق في هذه المواصفة) أو عبر محرر سير العمل في Business Console.",
                    "example": [
                      "bra_cpf"
                    ]
                  },
                  "validation_type": {
                    "type": "string",
                    "deprecated": true,
                    "description": "مهمل. يُقبل للتوافق مع الإصدارات السابقة ولكن يتم تجاهله — يُشتق `validation_type` في الاستجابة الآن من عدد الخدمات التي تطابقت بالكامل. استخدم `services` لتحديد خدمات معينة."
                  },
                  "consent": {
                    "type": "boolean",
                    "default": false,
                    "description": "يُضبط على `true` عندما يوافق المستخدم النهائي صراحةً على خدمات التحقق المحددة. مطلوب للخدمات التي تحمل العلامة `requires_consent=true` في الدليل — وبدونه تُرجع هذه الخدمات رمز `400` مع `services_requiring_consent`."
                  },
                  "identification_number": {
                    "type": "string",
                    "description": "رقم التعريف الشامل — يتم تعيينه تلقائيًا إلى الحقل المخصص للدولة الصحيحة، لذا يمكنك استخدامه بدلاً من `personal_number`/`tax_number`/`document_number`: ARG→document_number (DNI)، BOL→document_number (CI)، BRA→tax_number (CPF، 11 رقماً)، CHL→personal_number (RUT)، COL→personal_number (Cédula)، CRI→personal_number (Cédula)، DOM→personal_number (Cédula، 11 رقماً)، ECU→personal_number (Cédula، 10 أرقام)، ESP→personal_number (DNI/NIE)، GTM→document_number (DPI)، HND→document_number (DNI)، MEX→personal_number (CURP، 18 حرفاً)، PAN→personal_number (Cédula)، PER→personal_number (DNI، 8 أرقام)، PRY→document_number (CI)، SLV→document_number (DUI)، URY→personal_number (CI)، VEN→document_number (Cédula). لا يتجاوز أبدًا أي حقل مخصص للدولة تم تقديمه صراحةً."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "الاسم الأول للفرد. مطلوب في بعض الخدمات/الدول.",
                    "example": "John"
                  },
                  "last_name": {
                    "type": "string",
                    "description": "اسم العائلة للفرد. مطلوب في بعض الخدمات/الدول.",
                    "example": "Doe"
                  },
                  "middle_name": {
                    "type": "string",
                    "description": "الاسم الأوسط، يُستخدم بواسطة خدمات بعض الدول (أستراليا، نيوزيلندا، ...)."
                  },
                  "full_name": {
                    "type": "string",
                    "description": "الاسم الكامل — تقبل بعض الخدمات هذا بدلاً من الاسم الأول/اسم العائلة (مثل خدمات CHN، التي تطابق الاسم بنظام الكتابة الأصلي)."
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ الميلاد، `YYYY-MM-DD`. مطلوب من قبل العديد من الخدمات.",
                    "example": "1980-01-01"
                  },
                  "personal_number": {
                    "type": "string",
                    "description": "معرّف شخصي فريد صادر عن الحكومة. يُستخدم في: CHL (RUT)، COL (Cédula)، CRI، DOM، ECU، ESP (DNI/NIE)، MEX (CURP)، PAN (Cédula)، PER (DNI)، URY. يُفضَّل استخدام `identification_number` بدلاً منه."
                  },
                  "tax_number": {
                    "type": "string",
                    "description": "الرقم الضريبي. يُستخدم من قبل: BRA (CPF، مكون من 11 رقماً). فكّر في استخدام `identification_number` بدلاً منه."
                  },
                  "document_number": {
                    "type": "string",
                    "description": "رقم المستند. يُستخدم بواسطة: ARG (DNI)، وBOL (CI)، وGTM (DPI)، وHND (DNI)، وPRY (CI)، وSLV (DUI)، وVEN (Cédula). فكّر في استخدام `identification_number` بدلاً من ذلك."
                  },
                  "document_type": {
                    "type": "string",
                    "enum": [
                      "P",
                      "DL",
                      "ID",
                      "RP",
                      "SSC",
                      "HIC",
                      "WP",
                      "TC",
                      "VISA",
                      "PSC",
                      "BC",
                      "OTHER"
                    ],
                    "description": "نوع المستند الذي يتم التحقق منه: `P` جواز سفر، `DL` رخصة قيادة، `ID` بطاقة هوية وطنية، `RP` تصريح إقامة (بالإضافة إلى `SSC`، `HIC`، `WP`، `TC`، `VISA`، `PSC`، `BC`، `OTHER`). مطلوب لبعض الخدمات (مثل ESP)."
                  },
                  "expiration_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ انتهاء المستند، `YYYY-MM-DD`. مطلوب للتحقق في إسبانيا (ESP).",
                    "example": "2030-01-15"
                  },
                  "date_of_issue": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ إصدار المستند، `YYYY-MM-DD` (fecha de expedición). مطلوب للتحقق من cédula في كولومبيا (COL).",
                    "example": "2015-06-20"
                  },
                  "nationality": {
                    "type": "string",
                    "description": "الجنسية وفق معيار ISO 3166-1 alpha-3. مطلوبة من قِبل بعض الخدمات."
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "M",
                      "F",
                      "X"
                    ],
                    "description": "الجنس: `M`، أو `F`، أو `X` (آخر/غير معروف). مطلوب للتحقق من RENAPER في الأرجنتين (`arg_renaper`)."
                  },
                  "address": {
                    "description": "عنوان السكن. يُفضّل الكائن المهيكل `{\"street_1\":\"123 Main St\",\"street_2\":\"Apt 4B\",\"city\":\"Springfield\",\"region\":\"IL\",\"postal_code\":\"62701\",\"country\":\"US\"}`؛ لا تزال السلسلة النصية الكاملة في سطر واحد مقبولة. مطلوب لخدمات التحقق من العنوان؛ وعندما تحدد الخدمة متطلبات العنوان، فإن الأجزاء المفقودة تُرجع `400` مع `address_fields_required_by`.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "street_1": {
                            "type": "string"
                          },
                          "street_2": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "region": {
                            "type": "string"
                          },
                          "postal_code": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "string",
                        "description": "العنوان الكامل في سطر واحد (قديم)."
                      }
                    ]
                  },
                  "address_element_1": {
                    "type": "string",
                    "description": "عنوان الشارع بما في ذلك رقم الشارع ونوعه. إذا تم حذفه، فسيتم استنتاجه من `address`."
                  },
                  "address_element_2": {
                    "type": "string",
                    "description": "شقة، وحدة، مبنى، طابق، أو سطر عنوان إضافي. أرسله فقط عندما يتوفر لديك بشكل صريح."
                  },
                  "address_element_3": {
                    "type": "string",
                    "description": "المدينة، أو الضاحية، أو الحي، أو المنطقة، أو المجاورة. إذا تم حذفه، فسيتم استنتاجه من `address`."
                  },
                  "address_element_4": {
                    "type": "string",
                    "description": "الولاية أو المقاطعة أو المنطقة أو البلدة. إذا تم حذفه، يُستنتج من `address`."
                  },
                  "address_element_5": {
                    "type": "string",
                    "description": "الرمز البريدي. يُقبل `postal_code` كاسم بديل."
                  },
                  "postal_code": {
                    "type": "string",
                    "description": "الرمز البريدي للخدمات المعتمدة على العنوان (اسم بديل لـ `address_element_5`)."
                  },
                  "driver_license_number": {
                    "type": "string",
                    "description": "رقم رخصة القيادة لخدمات التحقق من المستندات الحكومية (AUS، NZL، IND)."
                  },
                  "driver_license_card_number": {
                    "type": "string",
                    "description": "رقم بطاقة رخصة القيادة الفعلية، حيث يُطلب بشكل منفصل عن رقم الرخصة (أستراليا)."
                  },
                  "driver_license_state": {
                    "type": "string",
                    "description": "ولاية أو إقليم إصدار رخصة القيادة (AUS)."
                  },
                  "driver_license_version": {
                    "type": "string",
                    "description": "رمز إصدار رخصة القيادة (NZL)."
                  },
                  "passport_number": {
                    "type": "string",
                    "description": "رقم جواز السفر لخدمات التحقق الحكومية من جوازات السفر (AUS وNZL وIND وCHN)."
                  },
                  "passport_expiration_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ انتهاء جواز السفر، بصيغة `YYYY-MM-DD`، لخدمات التحقق من جوازات السفر."
                  },
                  "passport_file_number": {
                    "type": "string",
                    "description": "رقم ملف جواز السفر (IND)."
                  },
                  "passport_issue_country": {
                    "type": "string",
                    "description": "دولة إصدار جواز السفر (ISO 3166-1 alpha-3) لخدمات التحقق من جوازات السفر."
                  },
                  "medicare_card_number": {
                    "type": "string",
                    "description": "رقم بطاقة Medicare (أستراليا)."
                  },
                  "immi_card_number": {
                    "type": "string",
                    "description": "رقم بطاقة ImmiCard الأسترالية."
                  },
                  "immi_card_expiry_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ انتهاء بطاقة ImmiCard الأسترالية."
                  },
                  "citizenship_certificate_number": {
                    "type": "string",
                    "description": "رقم شهادة المواطنة (أستراليا)."
                  },
                  "birth_registration_number": {
                    "type": "string",
                    "description": "رقم تسجيل شهادة الميلاد (أستراليا)."
                  },
                  "birth_registration_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ تسجيل شهادة الميلاد (أستراليا)."
                  },
                  "birth_registration_state": {
                    "type": "string",
                    "description": "ولاية تسجيل شهادة الميلاد (أستراليا)."
                  },
                  "marriage_certificate_number": {
                    "type": "string",
                    "description": "رقم شهادة الزواج (أستراليا)."
                  },
                  "change_of_name_certificate_number": {
                    "type": "string",
                    "description": "رقم شهادة تغيير الاسم (AUS)."
                  },
                  "first_partner_name": {
                    "type": "string",
                    "description": "الاسم الأول للشريك في عقد الزواج (أستراليا)."
                  },
                  "last_partner_name": {
                    "type": "string",
                    "description": "اسم العائلة للشريك في وثيقة الزواج (AUS)."
                  },
                  "voter_id": {
                    "type": "string",
                    "description": "رقم تسجيل الناخب (IND EPIC، IRL)."
                  },
                  "epic_card": {
                    "type": "string",
                    "description": "رقم بطاقة الناخب EPIC للهند."
                  },
                  "pan": {
                    "type": "string",
                    "description": "الهند: رقم الحساب الدائم (PAN)."
                  },
                  "national_id": {
                    "type": "string",
                    "description": "رقم الهوية الوطنية (CHN، وMYS، وKEN، وKHM، وNGA، وZAF، و…)."
                  },
                  "cic": {
                    "type": "string",
                    "description": "رمز تعريف بطاقة الهوية (CIC) التابع لـ INE/IFE المكسيكي، 9 أرقام. يُستخدم بواسطة خدمة صلاحية بيانات اعتماد MEX INE (`mex_ine_vigencia`)."
                  },
                  "identificador_ciudadano": {
                    "type": "string",
                    "description": "مُعرّف المواطن (Identificador del Ciudadano) للمعهد الانتخابي الوطني المكسيكي INE (9 أرقام). يُستخدم مع `cic` لنماذج INE الحديثة (E/F/G/H) في `mex_ine_vigencia`."
                  },
                  "ocr": {
                    "type": "string",
                    "description": "رقم OCR للمعهد الانتخابي الوطني المكسيكي INE (13 رقمًا، ظهر البطاقة). يُستخدم مع `cic` للنموذج D في `mex_ine_vigencia`."
                  },
                  "voter_number": {
                    "type": "string",
                    "description": "مفتاح الناخب (Clave de Elector) للمعهد الانتخابي الوطني المكسيكي INE (18 حرفًا). يُستخدم مع `emission_number` لنماذج IFE القديمة (A/B/C) في `mex_ine_vigencia`."
                  },
                  "emission_number": {
                    "type": "string",
                    "description": "رقم الإصدار (Número de Emisión) للمعهد الانتخابي الوطني المكسيكي INE. يُستخدم مع `voter_number` لنماذج IFE القديمة (A/B/C) في `mex_ine_vigencia`."
                  },
                  "bvn": {
                    "type": "string",
                    "description": "رقم التحقق المصرفي النيجيري."
                  },
                  "bank_card_number": {
                    "type": "string",
                    "description": "رقم البطاقة البنكية (التحقق من البطاقة البنكية في CHN)."
                  },
                  "company_registration_number": {
                    "type": "string",
                    "description": "رقم تسجيل الشركة الصادر عن سجل الشركات: مثل CNPJ في البرازيل (على سبيل المثال `11222333000181`)، ورقم التسجيل في جنوب إفريقيا (على سبيل المثال `1936/007721/06`). مطلوب لخدمات سجل الشركات ومديري الشركات (`bra_company_registry`، `bra_company_directors`، `zaf_company_registry`، `zaf_company_directors`)."
                  },
                  "company_name": {
                    "type": "string",
                    "description": "اسم الشركة المسجل، بعد مطابقته مع قيد السجل. اختياري لـ `zaf_company_registry`."
                  },
                  "initials": {
                    "type": "string",
                    "description": "الأحرف الأولى من اسم الشخص كما هي مطبوعة على المستند. مطلوبة لـ `zaf_drivers_license`؛ ومقبولة لـ `zaf_bank_account_holder`."
                  },
                  "licence_number": {
                    "type": "string",
                    "description": "رقم رخصة القيادة كما هو مطبوع على البطاقة، لـ `zaf_drivers_license`. عند حذفه، يُستخدم `document_number`."
                  },
                  "refugee_file_number": {
                    "type": "string",
                    "description": "رقم ملف اللاجئ الصادر عن وزارة الشؤون الداخلية في جنوب أفريقيا. مطلوب لـ `zaf_refugee`."
                  },
                  "bank_name": {
                    "type": "string",
                    "description": "اسم البنك الذي يحتفظ بالحساب. يتطلبه `zaf_bank_account_holder`."
                  },
                  "bank_account_number": {
                    "type": "string",
                    "description": "رقم الحساب البنكي. مطلوب بواسطة `zaf_bank_account_holder`؛ ومقبول بواسطة `zaf_fraud_prevention`."
                  },
                  "account_type": {
                    "type": "string",
                    "description": "نوع الحساب البنكي لـ `zaf_bank_account_holder`: `current`، أو `savings`، أو `transmission`، أو `subscriptionShare`، أو `notKnown`، دون حساسية لحالة الأحرف. تُرجع أي قيمة أخرى `400`. احذفه عندما لا تعرف النوع: سيتم بعد ذلك الإبلاغ عن التحقق المتبادل من نوع الحساب بأنه غير مؤكد."
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "رقم الهاتف المحمول للتواصل، للخدمات التي تتحقق من إمكانية التواصل (`zaf_bank_account_holder`، `zaf_fraud_prevention`، `zaf_refugee`)."
                  },
                  "right_thumb": {
                    "type": "string",
                    "description": "بصمة الإبهام الأيمن بترميز Base64 لـ `zaf_dha_fingerprint_match`، مع `left_thumb` أو بمفردها."
                  },
                  "left_thumb": {
                    "type": "string",
                    "description": "بصمة الإبهام الأيسر بترميز Base64 لـ `zaf_dha_fingerprint_match`، مع `right_thumb` أو بمفردها."
                  },
                  "score_level": {
                    "type": "integer",
                    "description": "الحد الأدنى لمستوى الدرجة البيومترية لـ `zaf_criminal_face_screening`. القيمة الافتراضية هي `3`."
                  },
                  "max_matches": {
                    "type": "integer",
                    "description": "الحد الأقصى لعدد التطابقات المرشحة التي يرجعها `zaf_criminal_face_screening`. القيمة الافتراضية هي `1`."
                  },
                  "vehicle_register_number": {
                    "type": "string",
                    "description": "رقم تسجيل المركبة. مطلوب، مع `vehicle_licence_plate` و`vin`، بواسطة `zaf_vehicle_ownership`."
                  },
                  "vehicle_licence_plate": {
                    "type": "string",
                    "description": "رقم لوحة ترخيص المركبة. مطلوب، مع `vehicle_register_number` و`vin`، بواسطة `zaf_vehicle_ownership`."
                  },
                  "vin": {
                    "type": "string",
                    "description": "رقم تعريف المركبة (VIN أو رقم الشاسيه). مطلوب، مع `vehicle_register_number` و`vehicle_licence_plate`، بواسطة `zaf_vehicle_ownership`."
                  },
                  "ssn": {
                    "type": "string",
                    "description": "رقم الضمان الاجتماعي (الولايات المتحدة الأمريكية)."
                  },
                  "phone": {
                    "type": "string",
                    "description": "رقم الهاتف لخدمات التحقق من رقم الهاتف."
                  },
                  "landline": {
                    "type": "string",
                    "description": "رقم الهاتف الأرضي لخدمات التحقق من رقم الهاتف."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "عنوان البريد الإلكتروني لخدمات التحقق من الهوية."
                  },
                  "country_of_residence": {
                    "type": "string",
                    "description": "دولة الإقامة وفق المعيار ISO 3166-1 alpha-2. تُستخدم بواسطة خدمات إثراء الهوية العالمية (مثل `glb_identity_enrichment`) لتركيز البحث.",
                    "example": "US"
                  },
                  "partial_match_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "NO_ACTION",
                    "description": "ما يفعله `partial_match` بحالة `database_validation.status`. القيمة الافتراضية هي `NO_ACTION` (تبقى الحالة `Approved`، مع تحذير)."
                  },
                  "no_match_action": {
                    "type": "string",
                    "enum": [
                      "DECLINE",
                      "NO_ACTION"
                    ],
                    "default": "DECLINE",
                    "description": "ما يفعله `no_match` بحالة `database_validation.status`. القيمة الافتراضية هي `DECLINE`."
                  },
                  "save_api_request": {
                    "type": "boolean",
                    "default": true,
                    "description": "حفظ التحقق كجلسة (الظهور في لوحة التحكم، endpoint القرار، webhook الخاص بـ `status.updated`). يُغيّر أيضاً شكل استجابة `validations`: كائنات لكل خدمة عندما تكون القيمة `true` (افتراضياً)، وخريطة حقول مدمجة عندما تكون `false`."
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "المعرّف الخاص بك للمستخدم الذي تم التحقق منه؛ تتم إعادته وتخزينه مع الجلسة."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON بصيغة حرة يُخزن مع الطلب وتتم إعادته في الاستجابة."
                  },
                  "selfie": {
                    "type": "string",
                    "format": "binary",
                    "description": "صورة سيلفي (`jpg` و`jpeg` و`png` و`webp`؛ بحد أقصى 2 MB — يتم ضغط الصور إلى ~1.5 MB قبل الرفع إلى السجل) لخدمات التحقق البيومتري، مثل RENAPER في الأرجنتين (`arg_renaper`) وSIB في بنما (`pan_cedula_sib` و`pan_cedula_sib_plus`). مطلوبة عندما تُدرجها الخدمة المحددة كحقل مطلوب. متاحة فقط عبر `multipart/form-data`."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/database-validation/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"issuing_state\": \"BRA\",\n    \"services\": [\"bra_cpf\"],\n    \"identification_number\": \"12345678900\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"date_of_birth\": \"1980-01-01\",\n    \"vendor_data\": \"user-1234\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.database_validation.validate(\n    issuing_state=\"BRA\",\n    services=[\"bra_cpf\"],\n    identification_number=\"12345678900\",\n    first_name=\"John\",\n    last_name=\"Doe\",\n    date_of_birth=\"1980-01-01\",\n    vendor_data=\"user-1234\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.databaseValidation.validate({\n  issuing_state: \"BRA\",\n  services: [\"bra_cpf\"],\n  identification_number: \"12345678900\",\n  first_name: \"John\",\n  last_name: \"Doe\",\n  date_of_birth: \"1980-01-01\",\n  vendor_data: \"user-1234\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.DatabaseValidation.Validate(ctx, didit.DatabaseValidationValidateParams{\n\tIssuingState:         \"BRA\",\n\tServices:             didit.Some([]string{\"bra_cpf\"}),\n\tIdentificationNumber: didit.String(\"12345678900\"),\n\tFirstName:            didit.String(\"John\"),\n\tLastName:             didit.String(\"Doe\"),\n\tDateOfBirth:          didit.String(\"1980-01-01\"),\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;\nimport java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.DatabaseValidationValidateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.databaseValidation().validate(DatabaseValidationValidateParams.builder()\n        .issuingState(\"BRA\")\n        .services(List.of(\"bra_cpf\"))\n        .identificationNumber(\"12345678900\")\n        .firstName(\"John\")\n        .lastName(\"Doe\")\n        .dateOfBirth(LocalDate.parse(\"1980-01-01\"))\n        .vendorData(\"user-1234\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->databaseValidation->validate([\n    'issuing_state' => 'BRA',\n    'services' => ['bra_cpf'],\n    'identification_number' => '12345678900',\n    'first_name' => 'John',\n    'last_name' => 'Doe',\n    'date_of_birth' => '1980-01-01',\n    'vendor_data' => 'user-1234',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.database_validation.validate(\n  issuing_state: \"BRA\",\n  services: [\"bra_cpf\"],\n  identification_number: \"12345678900\",\n  first_name: \"John\",\n  last_name: \"Doe\",\n  date_of_birth: \"1980-01-01\",\n  vendor_data: \"user-1234\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.DatabaseValidation.ValidateAsync(new DatabaseValidationValidateParams\n{\n    IssuingState = \"BRA\",\n    Services = new string[] { \"bra_cpf\" },\n    IdentificationNumber = \"12345678900\",\n    FirstName = \"John\",\n    LastName = \"Doe\",\n    DateOfBirth = \"1980-01-01\",\n    VendorData = \"user-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "اكتمل التحقق — أرجعت خدمة واحدة محددة على الأقل نتيجة قابلة للاستخدام. افحص `database_validation.match_type` لمعرفة النتيجة الإجمالية، و`validations` لمقارنات الحقول و`outcome_code`s لكل خدمة، و`errors` (عند وجودها) للخدمات التي تعذر تشغيلها.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة المحفوظة عندما تكون `save_api_request=true` (يمكن استخدامه مع `GET /v3/session/{sessionId}/decision/`)؛ وإلا فسيكون UUID ارتباط مؤقت."
                    },
                    "database_validation": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "Approved",
                            "Declined",
                            "In Review"
                          ],
                          "description": "`Declined` عندما يُشغّل `match_type` الإجمالي إجراء `DECLINE` (القيمة الافتراضية لـ `no_match_action` هي `DECLINE`، ولـ `partial_match_action` هي `NO_ACTION`)؛ و`In Review` عندما لا تُنتج أي خدمة مقارنة قابلة للاستخدام، على سبيل المثال عندما تعود الخدمة الوحيدة المحددة بـ `REGISTRY_UNAVAILABLE` أو `INCONCLUSIVE`؛ و`Approved` خلاف ذلك. يمكن أن يكون الطلب الذي حدد خدمات متعددة `Approved` بناءً على تطابق خدمة واحدة بينما كانت خدمة أخرى غير متاحة، لذا تحقق من `errors` و`outcome_code` الخاصة بكل خدمة أيضاً."
                        },
                        "issuing_state": {
                          "type": "string",
                          "description": "نسخة مطابقة لدولة ISO 3166-1 alpha-3 التي تم التحقق مقابلها.",
                          "example": "BRA"
                        },
                        "validation_type": {
                          "type": "string",
                          "enum": [
                            "one_by_one",
                            "two_by_two"
                          ],
                          "description": "مستمدة من النتائج: `two_by_two` عندما تُسفر خدمتان متميزتان أو أكثر عن تطابق كامل (على رقم التعريف، أو على الاسم الكامل + تاريخ الميلاد معاً، أو على العنوان دون أي تعارضات)؛ و`one_by_one` في الحالات الأخرى. (حقل الطلب الذي يحمل الاسم نفسه قديم ولم يعد مستخدماً ويتم تجاهله)."
                        },
                        "screened_data": {
                          "type": "object",
                          "description": "تكرار لحقول الإدخال التي تم إرسالها إلى الخدمات المحددة (تتم تسوية التواريخ إلى `YYYY-MM-DD`؛ وعند إرسال `selfie`، يتم إرجاعها كرابط URL موقّع مسبقاً؛ وتتم إضافة `consent_obtained: true` عند تقديم الموافقة)."
                        },
                        "match_type": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "full_match",
                            "partial_match",
                            "no_match"
                          ],
                          "description": "النتيجة الإجمالية المجمعة عبر الخدمات مع مقارنات على مستوى الحقول: أي `full_match` ← `full_match`؛ وإلا أي `partial_match` ← `partial_match`؛ وإلا `no_match`. يمكن للخدمات التي تعتمد على النتيجة فقط، مثل الفحص الجنائي البيومتري، إرجاع `null`؛ افحص كل عنصر في `validations` لمعرفة `outcome_code` الخاص به."
                        },
                        "validations": {
                          "description": "يعتمد الشكل على `save_api_request`. **`true` (افتراضي):** مصفوفة من الكائنات الخاصة بكل خدمة (`service_id`، و`service_name`، و`validation`، و`outcome_code`، و`outcome_detail`، و`source_data`). **`false`:** كائن أحادي مسطح يدمج نتائج جميع الخدمات على مستوى الحقول (`{\"full_name\": \"full_match\", ...}`).",
                          "oneOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "description": "نتيجة التحقق لكل خدمة (تُرجع عندما يكون `save_api_request=true`، وهو الإعداد الافتراضي).",
                                "properties": {
                                  "service_id": {
                                    "type": "string",
                                    "description": "معرّف الدليل للخدمة التي أنتجت هذه النتيجة (مثل `bra_cpf`).",
                                    "example": "bra_cpf"
                                  },
                                  "service_name": {
                                    "type": "string",
                                    "description": "اسم الكتالوج السهل القراءة للخدمة.",
                                    "example": "Brazil - CPF status check"
                                  },
                                  "validation": {
                                    "type": "object",
                                    "description": "مقارنة حقل بحقل بين مدخلاتك والسجل الرسمي. المفاتيح هي أسماء الحقول القياسية (`full_name`، `date_of_birth`، `identification_number`، `address`، …)؛ والقيم هي `full_match`، أو `partial_match`، أو `no_match`.",
                                    "additionalProperties": {
                                      "type": "string",
                                      "enum": [
                                        "full_match",
                                        "partial_match",
                                        "no_match"
                                      ]
                                    }
                                  },
                                  "outcome_code": {
                                    "type": "string",
                                    "enum": [
                                      "MATCH",
                                      "PARTIAL_MATCH",
                                      "NO_MATCH",
                                      "DOCUMENT_NOT_FOUND",
                                      "INVALID_DOCUMENT_FORMAT",
                                      "INVALID_INPUT",
                                      "MINOR_BLOCKED",
                                      "DECEASED",
                                      "BIOMETRIC_NO_MATCH",
                                      "BIOMETRIC_IMAGE_UNUSABLE",
                                      "INCONCLUSIVE",
                                      "DOCUMENT_SUPERSEDED",
                                      "REGISTRY_UNAVAILABLE",
                                      "REGISTRY_ERROR"
                                    ],
                                    "description": "النتيجة المحايدة للمزود لعملية البحث في السجل. تصف `MATCH`/`PARTIAL_MATCH`/`NO_MATCH` المقارنة؛ وتعني `DOCUMENT_NOT_FOUND` أن المعرّف غير موجود في السجل؛ وتعني `INCONCLUSIVE` أن السجل لم يتمكن من التأكيد بأي من الاتجاهين (تم توجيهها للمراجعة — وليست عدم تطابق)؛ و`BIOMETRIC_NO_MATCH` هي عدم تطابق مؤكد للوجه بينما `BIOMETRIC_IMAGE_UNUSABLE` هي مشكلة تقنية في الصورة (أعد التقاط صورة سيلفي)؛ و`DECEASED`/`MINOR_BLOCKED` هي نتائج لسياسات السجل؛ وتعني `DOCUMENT_SUPERSEDED` أن الهوية متطابقة ولكن إصدار المستند المقدم ليس هو المحفوظ في الملف (تم إصدار نسخة أحدث)؛ وتعني `INVALID_DOCUMENT_FORMAT`/`INVALID_INPUT` أن السجل نفسه رفض البيانات المرسلة إليه؛ وتشير `REGISTRY_UNAVAILABLE`/`REGISTRY_ERROR` إلى إخفاقات في المصدر الأساسي."
                                  },
                                  "outcome_detail": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "تفاصيل الحالة الخام من المصدر التي تدعم رمز النتيجة (مثل رمز حالة HTTP أو رمز حالة السجل)."
                                  },
                                  "source_data": {
                                    "type": "object",
                                    "nullable": true,
                                    "description": "عرض مُنقّى ومُطبّع لسجل الشركة باستخدام أسماء الحقول القياسية (`identification_number`، و`first_name`، و`last_name`، و`date_of_birth`، بالإضافة إلى العلامات الخاصة بالسجل). يتم إرجاع حقول الصور، عند وجودها، كروابط URL موقّعة مسبقاً."
                                  }
                                }
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string",
                                "enum": [
                                  "full_match",
                                  "partial_match",
                                  "no_match"
                                ]
                              },
                              "description": "نتائج مدمجة على مستوى الحقل (بصيغة عديمة الحالة `save_api_request=false`)."
                            }
                          ]
                        },
                        "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": "`DATABASE_VALIDATION_NO_MATCH` أو `DATABASE_VALIDATION_PARTIAL_MATCH` عند الانطباق؛ وفارغ في حالة التطابق التام."
                        },
                        "errors": {
                          "type": "array",
                          "description": "موجود فقط عند فشل بعض الخدمات المحددة (وليس كلها). يحمل كل إدخال `service_id` و `code` و `message` و `retryable`. الخدمة المُبلغ عنها هنا تكون غائبة عن `validations` و `services_used`، ولا تتم فوترتها. هذه المصفوفة هي المكان الوحيد الذي تظهر فيه، لذا تحقق منها حتى عندما تكون `status` هي `Approved`.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "service_id": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string",
                                "example": "empty_provider_response"
                              },
                              "message": {
                                "type": "string"
                              },
                              "retryable": {
                                "type": "boolean",
                                "description": "تكون `true` عندما لا تصدر الخدمة أي إجابة ويمكن أن تنجح إعادة المحاولة لاحقاً؛ وتكون `false` عندما يرفض المصدر البيانات المرسلة إليه ويجب تصحيح الإدخال أولاً.",
                                "example": true
                              }
                            }
                          }
                        },
                        "services_used": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "معرّفات الدليل للخدمات التي أرجعت نتيجة خاضعة للفوترة. **موجودة فقط عندما يُرسل الطلب `services` بشكل صريح.**"
                        },
                        "match_score": {
                          "type": "number",
                          "description": "نسبة (0.0–1.0) من الخدمات التي جرت محاولتها وأسفرت عن تطابق كامل (في رقم الهوية، أو في الاسم الكامل + تاريخ الميلاد معاً، أو في العنوان دون أي تناقضات). **تكون موجودة فقط عندما يرسل الطلب `services` صراحة.**"
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "تكرار لقيمة `vendor_data` التي أرسلتها."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "description": "نسخة مطابقة من `metadata` التي أرسلتها."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "examples": {
                  "Full match (Approved)": {
                    "summary": "الافتراضي save_api_request=true — كائنات `validations` لكل خدمة",
                    "value": {
                      "request_id": "7f9a1c0e-1f2b-4f6e-9d3a-2b1c0e7f9a1c",
                      "database_validation": {
                        "status": "Approved",
                        "issuing_state": "BRA",
                        "validation_type": "one_by_one",
                        "screened_data": {
                          "tax_number": "12345678900",
                          "first_name": "John",
                          "last_name": "Doe",
                          "date_of_birth": "1980-01-01"
                        },
                        "match_type": "full_match",
                        "validations": [
                          {
                            "validation": {
                              "full_name": "full_match",
                              "date_of_birth": "full_match",
                              "identification_number": "full_match"
                            },
                            "outcome_code": "MATCH",
                            "outcome_detail": "200",
                            "service_id": "bra_cpf",
                            "service_name": "Brazil - CPF status check",
                            "source_data": {
                              "identification_number": "12345678900",
                              "first_name": "JOHN",
                              "last_name": "DOE",
                              "date_of_birth": "1980-01-01",
                              "lgpd_minor": false,
                              "minor_under_16": false,
                              "minor_under_18": false
                            }
                          }
                        ],
                        "warnings": []
                      },
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:30:00.000000+00:00"
                    }
                  },
                  "Explicit services (extended shape)": {
                    "summary": "الطلب أرسل `services` — تضيف الاستجابة `services_used` و`match_score`",
                    "value": {
                      "request_id": "b3e7c1a2-9d4f-4f0b-8a6c-5e2d1f0a9b3e",
                      "database_validation": {
                        "status": "Approved",
                        "issuing_state": "BRA",
                        "validation_type": "one_by_one",
                        "screened_data": {
                          "tax_number": "12345678900",
                          "first_name": "John",
                          "last_name": "Doe",
                          "date_of_birth": "1980-01-01"
                        },
                        "match_type": "full_match",
                        "validations": [
                          {
                            "validation": {
                              "full_name": "full_match",
                              "date_of_birth": "full_match",
                              "identification_number": "full_match"
                            },
                            "outcome_code": "MATCH",
                            "outcome_detail": "200",
                            "service_id": "bra_cpf",
                            "service_name": "Brazil - CPF status check",
                            "source_data": {
                              "identification_number": "12345678900",
                              "first_name": "JOHN",
                              "last_name": "DOE",
                              "date_of_birth": "1980-01-01",
                              "lgpd_minor": false,
                              "minor_under_16": false,
                              "minor_under_18": false
                            }
                          }
                        ],
                        "warnings": [],
                        "services_used": [
                          "bra_cpf"
                        ],
                        "match_score": 1.0
                      },
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:30:00.000000+00:00"
                    }
                  },
                  "No match (Declined)": {
                    "summary": "بيانات السجل التجاري لا تتطابق — القيمة الافتراضية `no_match_action=DECLINE`",
                    "value": {
                      "request_id": "0a1b2c3d-4e5f-6789-abcd-ef0123456789",
                      "database_validation": {
                        "status": "Declined",
                        "issuing_state": "BRA",
                        "validation_type": "one_by_one",
                        "screened_data": {
                          "tax_number": "12345678900",
                          "first_name": "John",
                          "last_name": "Doe",
                          "date_of_birth": "1980-01-01"
                        },
                        "match_type": "no_match",
                        "validations": [
                          {
                            "validation": {
                              "full_name": "no_match",
                              "date_of_birth": "no_match",
                              "identification_number": "no_match"
                            },
                            "outcome_code": "NO_MATCH",
                            "outcome_detail": "200",
                            "service_id": "bra_cpf",
                            "service_name": "Brazil - CPF status check",
                            "source_data": {
                              "identification_number": "00987654321",
                              "first_name": "TOTALLY",
                              "last_name": "DIFFERENT NAME",
                              "date_of_birth": "1999-01-01",
                              "lgpd_minor": false,
                              "minor_under_16": false,
                              "minor_under_18": false
                            }
                          }
                        ],
                        "warnings": [
                          {
                            "feature": "DATABASE_VALIDATION",
                            "risk": "DATABASE_VALIDATION_NO_MATCH",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Database validation no match",
                            "long_description": "The system identified a no match in the database validation, requiring further investigation."
                          }
                        ]
                      },
                      "vendor_data": null,
                      "metadata": null,
                      "created_at": "2026-06-11T10:31:00.000000+00:00"
                    }
                  },
                  "Stateless (save_api_request=false)": {
                    "summary": "تندمج `validations` في خريطة حقول مدمجة؛ لا يتم تخزين أي شيء",
                    "value": {
                      "request_id": "c4d5e6f7-8901-2345-6789-abcdef012345",
                      "database_validation": {
                        "status": "Approved",
                        "issuing_state": "BRA",
                        "validation_type": "one_by_one",
                        "screened_data": {
                          "tax_number": "12345678900",
                          "first_name": "John",
                          "last_name": "Doe",
                          "date_of_birth": "1980-01-01"
                        },
                        "match_type": "full_match",
                        "validations": {
                          "full_name": "full_match",
                          "date_of_birth": "full_match",
                          "identification_number": "full_match"
                        },
                        "warnings": []
                      },
                      "vendor_data": null,
                      "metadata": null,
                      "created_at": "2026-06-11T10:32:00.000000+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة - لا تتم فوترة أي شيء. تحدث أخطاء حقول الفحص الأولي قبل أي استدعاء خارجي. إذا رفضت كل محاولة لم تتم الإجابة عنها المدخلات صراحةً، فإن الاستجابة تتضمن بدلاً من ذلك `validation_errors` مع `code: provider_rejected_input` و`retryable: false`؛ قم بتصحيح المدخلات قبل إعادة المحاولة. تستخدم المشاكل على مستوى الحقول غلاف DRF القياسي؛ وتعيد مشاكل الكتالوج مصفوفة `services` (بالإضافة إلى `requires_onboarding` أو `services_requiring_consent` عند الاقتضاء)؛ وتتضمن أخطاء الحقول المفقودة `fields_required_by` لربط كل حقل مفقود بالخدمات التي تتطلبه؛ أما الخدمات التي تحتاج إلى معرّف إضافي واحد على الأقل (مثل `usa_states_credit_bureau`، والتي لا يمكنها التحقق من الاسم بمفرده) فتعيد `any_field_required_by` لربط كل خدمة بالحقول التي يجب توفر واحد منها على الأقل؛ وتعيد مشاكل التنسيق التي يتم فحصها لكل خدمة `invalid_fields_by_service`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid issuing_state": {
                    "summary": "الدولة غير مدعومة — تسرد الرسالة كل رمز alpha-3 صالح",
                    "value": {
                      "error": [
                        "Invalid issuing state. Valid options are: ARE, ARG, AUS, AUT, BEL, BGD, BOL, BRA, CAN, CHE, CHL, CHN, CIV, COL, CRI, CZE, DEU, DNK, DOM, ECU, ESP, FIN, FRA, GBR, GHA, GLB, GRC, GTM, HKG, HND, IDN, IND, IRL, ITA, KEN, KHM, MAR, MEX, MYS, NGA, NLD, NOR, NZL, OMN, PAN, PER, PHL, POL, PRT, PRY, QAT, SGP, SLV, SVK, SWE, THA, UGA, URY, USA, VEN, ZAF, ZMB, ZWE"
                      ]
                    }
                  },
                  "Missing required fields": {
                    "summary": "اتحاد الحقول المطلوبة عبر الخدمات المحددة، مع تلميح الحقل الشامل",
                    "value": {
                      "error": [
                        "Missing required fields: tax_number (or use 'identification_number' which maps to 'tax_number' for BRA)"
                      ],
                      "fields_required_by": {
                        "tax_number": [
                          "bra_cpf"
                        ]
                      }
                    }
                  },
                  "Unknown service id": {
                    "summary": "`services` يحتوي على معرّف غير موجود في الدليل",
                    "value": {
                      "services": [
                        "Unknown service_id(s): ['bogus_service']"
                      ]
                    }
                  },
                  "Service not live for country": {
                    "summary": "`services` يحدد خدمة من دولة أخرى (أو إدخالاً وهمياً)",
                    "value": {
                      "services": [
                        "Services not currently live for PER: ['bra_cpf']. Available services: ['per_dni', 'per_residential', 'per_tax_registration']"
                      ]
                    }
                  },
                  "Service requires onboarding": {
                    "summary": "الخدمة موجودة ولكن لم يتم تفعيلها لمؤسستك بعد",
                    "value": {
                      "services": [
                        "Services require onboarding before they can be enabled for AUS: ['aus_australia_driver_licence']. Contact Didit support to activate them."
                      ],
                      "requires_onboarding": [
                        "aus_australia_driver_licence"
                      ]
                    }
                  },
                  "Consent missing": {
                    "summary": "خدمة محددة تم تمييزها بـ requires_consent=true ولم تكن `consent` بقيمة `true`",
                    "value": {
                      "consent": [
                        "Explicit end-user consent is required for these database validation services: ['chn_national_id']. Send `consent=true`."
                      ],
                      "services_requiring_consent": [
                        "chn_national_id"
                      ]
                    }
                  },
                  "Country format rule violation": {
                    "summary": "المعرّف لا يستوفي قاعدة تنسيق الدولة (الطول/الأرقام/التعبير النمطي)",
                    "value": {
                      "tax_number": [
                        "Invalid tax number for BRA: Brazilian CPF (exactly 11 digits). Must be exactly 11 characters long (got 10)."
                      ]
                    }
                  },
                  "Service-specific format violation": {
                    "summary": "فشل حقل في تلبية متطلبات التنسيق الخاصة بالخدمة المحددة",
                    "value": {
                      "error": [
                        "One or more fields do not match the format required by the selected service."
                      ],
                      "invalid_fields_by_service": {
                        "chn_national_id": [
                          "national_id_format"
                        ]
                      }
                    }
                  },
                  "Input refused by every attempt": {
                    "summary": "صحح المدخلات قبل إعادة المحاولة",
                    "value": {
                      "error": "The source refused to run this query with the supplied input.",
                      "validation_errors": [
                        {
                          "service_id": "bra_cpf",
                          "code": "provider_rejected_input",
                          "message": "The source refused to run this query with the supplied input.",
                          "retryable": false
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "error": {
                      "description": "توضيح على مستوى الطلب أو أخطاء الفحص الأولي للحقول.",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      ]
                    },
                    "validation_errors": {
                      "type": "array",
                      "description": "موجود عندما ترفض كل محاولة لم تتم الإجابة عنها البيانات المُدخلة بعد الفحص المسبق.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "service_id": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "retryable": {
                            "type": "boolean",
                            "description": "ما إذا كانت إعادة المحاولة لاحقاً يمكن أن تحل فشل الخدمة هذا. تعني القيمة False تصحيح المدخلات المقدمة أولاً."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "لم تُرجع أي خدمة محددة نتيجة صالحة للاستخدام. افحص كل إدخال في validation_errors قبل إعادة المحاولة؛ رمز HTTP 502 وحده لا يثبت وجود فشل مؤقت. يشير empty_provider_response مع retryable: true إلى نتائج غير متاحة أو غير مفسرة، بما في ذلك رفض المزوّد الأساسي متبوعاً بمزوّد بديل غير متاح. في المقابل، تتطلب إدخالات provider_invalid_input وprovider_validation_error القديمة إدخالاً مصححاً وقد تحذف retryable. لا تتم فوترة أي شيء. عندما تكون save_api_request=true، تُسجّل المحاولة الفاشلة كجلسة بالحالة «غير مكتملة». ترجع حالات الفشل الجزئي الرمز 200 مع database_validation.errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "validation_errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "service_id": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "retryable": {
                            "type": "boolean",
                            "description": "ما إذا كانت إعادة المحاولة لاحقاً يمكن أن تحل فشل الخدمة هذا. تعني القيمة False تصحيح المدخلات المقدمة أولاً."
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Provider returned no result": {
                    "summary": "فشلت كل خدمة محددة",
                    "value": {
                      "error": "Database validation could not be performed. The external validation service did not return a result. Please try again later.",
                      "validation_errors": [
                        {
                          "service_id": "bra_cpf",
                          "code": "empty_provider_response",
                          "message": "The provider did not return a database validation result.",
                          "retryable": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/phone/send/": {
      "post": {
        "summary": "إرسال رمز عبر الهاتف",
        "description": "أرسل رمزاً لمرة واحدة (OTP) إلى رقم هاتف عبر WhatsApp أو SMS أو أي قناة مدعومة أخرى، ثم تحقق منه باستخدام [`POST /v3/phone/check/`](/ar/standalone-apis/phone-check).\n\n**كيفية الربط بين الإرسال والتحقق.** تعتمد حالة التحقق على التطبيق الخاص بك بالإضافة إلى `phone_number` بصيغة E.164 — ولا يتطلب استدعاء التحقق `request_id`. ينشئ كل إرسال جديد عملية تحقق معلقة تظل صالحة لمدة **5 دقائق**: استدعِ التحقق بنفس الرقم والرمز الذي استلمه المستخدم قبل إغلاق هذه النافذة الزمنية. يؤدي استدعاء الإرسال مرة أخرى لنفس الرقم أثناء وجود عملية تحقق معلقة إلى إعادة إرسال رمز لنفس عملية التحقق تلك (`status: \"Retry\"`، ونفس `request_id`). يتم إرفاق إعادة محاولة واحدة كحد أقصى بهذه الطريقة (إجمالي عمليتي إرسال)؛ وأي إرسال إضافي يبدأ عملية تحقق جديدة بـ`request_id` جديد. تُحسب نافذة الـ 5 دقائق من وقت الإرسال الأول ولا يتم تمديدها بواسطة عمليات إعادة المحاولة.\n\n**قنوات التسليم.** يحدد `options.preferred_channel` القناة (`whatsapp` افتراضياً؛ كما يتم دعم `sms` و`telegram` و`voice` و`rcs` و`viber` و`zalo`). عندما تكون القناة المفضلة غير متوفرة للدولة الوجهة أو للرقم، ينتقل التسليم تلقائياً إلى SMS — ويظل الإرسال يُبلغ عن حالة `Success`، بينما تظهر القناة الفعلية المستخدمة في استجابة التحقق (`phone.verification_method` وأحداث `lifecycle`).\n\n**الهوية البصرية.** تحمل رموز SMS اسم مرسل SMS الخاص بتطبيقك، والذي تم تعيينه في Business Console، دون أي تكلفة إضافية. مرر `options.sms_sender_name` لتوقيع رمز واحد باسم آخر، أو `options.use_white_label_customization: true` للاعتماد على اسم العلامة البيضاء العام الخاص بك في حال عدم تعيين اسم مرسل. تستخدم رموز WhatsApp رسالة ثابتة؛ اربط رقم WhatsApp Business الخاص بك في Business Console لإرسالها باسم شركتك ورقمها، لتتم الفوترة وفقاً لرسوم Didit فقط.\n\n**حالات الإرسال.** `Success` — تم إرسال OTP لعملية تحقق جديدة؛ `Retry` — أُعيد إرسال OTP لعملية التحقق المعلقة؛ `Blocked` — رفضت طبقة مكافحة الاحتيال الإرسال (راجع `reason`، مثل `repeated_attempts`، `suspicious`، `spam`). يؤدي الإرسال بحالة `Blocked` إلى إنهاء التحقق فوراً كـ `Declined` مع تحذير عالي المخاطر، وبالتالي فإن التحقق اللاحق يُرجع `Expired or Not Found`.\n\n**الفوترة.** يعتمد السعر على الدولة الوجهة والقناة التي تُسلّم الرسالة فعلياً — راجع [أسعار التحقق من رقم الهاتف](/ar/getting-started/phone-verification-pricing). الإرسال بحالة `Blocked` فقط هو المجاني دائماً: أي محاولة إرسال أخرى غير مفوترة يتم احتساب تكلفتها عند إنهاء التحقق أو انتهاء صلاحيته، حتى لو لم يتم تأكيد التسليم مطلقاً أو أبلغ مزود التسليم بتعذر تسليم الرسالة. عمليات التحقق مجانية دائماً. كإجراء لمكافحة إساءة الاستخدام، يتم تعطيل التحقق من رقم الهاتف حتى أول شحن للرصيد لمؤسستك (`403`).\n\n**استمرار الجلسة.** يتم حفظ كل عملية تحقق جديدة كجلسة من نوع API: يمثل `request_id` معرف جلسة حقيقياً يمكنك تمريره إلى `GET /v3/session/{sessionId}/decision/`، ويظهر التحقق في Business Console، وتنطلق أحداث webhook الخاصة بـ `status.updated` مع تقدم العملية.\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية عمليتي التسليم والفوترة: بعد التحقق من صحة الطلب (المدخلات غير الصحيحة لا تزال تُرجع `400`)، يُرجع endpoint payload ثابتاً بالحالة `Success` مع `request_id` عشوائي؛ ولا يتم إرسال أي رسالة ولا يتم حفظ أي شيء. استخدم الرمز `123456` في التحقق ضمن البيئة التجريبية.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة الرمز `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا يُرجع هذا الـ API الرمز `401` أبداً.\n\n**حدود المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE، بالإضافة إلى حد أقصى لمكافحة إساءة الاستخدام يبلغ 4 محاولات إرسال لكل رقم هاتف في الساعة؛ وتجاوز أي منهما يُرجع `429`.",
        "operationId": "post_v3phone_send",
        "x-didit-sdk": {
          "resource": "phone",
          "method": "send_code",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/phone/send/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone_number\": \"+14155552671\",\n    \"options\": {\n      \"code_size\": 6,\n      \"preferred_channel\": \"whatsapp\",\n      \"locale\": \"en-US\"\n    },\n    \"vendor_data\": \"user-1234\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.phone.send_code(\n    phone_number=\"+14155552671\",\n    options={\n        \"locale\": \"en-US\",\n        \"preferred_channel\": \"whatsapp\",\n    },\n    vendor_data=\"user-1234\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.phone.sendCode({\n  phone_number: \"+14155552671\",\n  options: {\n    locale: \"en-US\",\n    preferred_channel: \"whatsapp\",\n  },\n  vendor_data: \"user-1234\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Phone.SendCode(ctx, didit.PhoneSendCodeParams{\n\tPhoneNumber: \"+14155552671\",\n\tOptions: didit.Some(didit.PhoneSendCodeParamsOptions{\n\t\tLocale:           didit.String(\"en-US\"),\n\t\tPreferredChannel: didit.Some(didit.PhoneSendCodeParamsOptionsPreferredChannel(\"whatsapp\")),\n\t}),\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 me.didit.Didit;\nimport me.didit.types.PhoneSendCodeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.phone().sendCode(PhoneSendCodeParams.builder()\n        .phoneNumber(\"+14155552671\")\n        .options(PhoneSendCodeParams.Options.builder()\n                .locale(\"en-US\")\n                .preferredChannel(PhoneSendCodeParams.Options.PreferredChannel.of(\"whatsapp\"))\n                .build())\n        .vendorData(\"user-1234\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->phone->sendCode([\n    'phone_number' => '+14155552671',\n    'options' => [\n        'locale' => 'en-US',\n        'preferred_channel' => 'whatsapp',\n    ],\n    'vendor_data' => 'user-1234',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.phone.send_code(\n  phone_number: \"+14155552671\",\n  options: {\n    locale: \"en-US\",\n    preferred_channel: \"whatsapp\",\n  },\n  vendor_data: \"user-1234\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Phone.SendCodeAsync(new PhoneSendCodeParams\n{\n    PhoneNumber = \"+14155552671\",\n    Options = new PhoneSendCodeParamsOptions\n    {\n        Locale = \"en-US\",\n        PreferredChannel = new PhoneSendCodeParamsOptionsPreferredChannel(\"whatsapp\"),\n    },\n    VendorData = \"user-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone_number": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "رقم هاتف المستلم بتنسيق E.164 — يبدأ بعلامة `+` ورمز الدولة (مثال: `+14155552671`). يتم التحقق من صحة الأرقام وتوحيد تنسيقها إلى E.164؛ وتؤدي الأرقام غير القابلة للتحليل أو غير الصالحة إلى إرجاع الرمز `400` مع خطأ في الحقل `phone_number`.",
                    "example": "+14155552671"
                  },
                  "options": {
                    "type": "object",
                    "description": "خيارات تسليم رمز لمرة واحدة. جميع الحقول اختيارية.",
                    "properties": {
                      "code_size": {
                        "type": "integer",
                        "minimum": 4,
                        "maximum": 8,
                        "default": 6,
                        "description": "عدد الأرقام في رمز OTP."
                      },
                      "locale": {
                        "type": "string",
                        "maxLength": 5,
                        "pattern": "^[a-z]{2,3}(-[A-Z]{2,3})?$",
                        "description": "رمز BCP-47 اللغوي المستخدم لترجمة رسالة التحقق محليًا (مثل `en-US`، و`fr`، و`es`). تُرجع التنسيقات غير الصالحة `400`.",
                        "example": "en-US"
                      },
                      "preferred_channel": {
                        "type": "string",
                        "enum": [
                          "whatsapp",
                          "sms",
                          "telegram",
                          "voice",
                          "rcs",
                          "viber",
                          "zalo"
                        ],
                        "default": "whatsapp",
                        "description": "قناة التسليم المفضلة. إذا كانت القناة غير متوفرة لدولة الوجهة أو الرقم، تتراجع الرسالة تلقائياً إلى الرسائل القصيرة (SMS) — مع استمرار الإبلاغ عن الإرسال كـ `Success`."
                      },
                      "use_white_label_customization": {
                        "type": "boolean",
                        "default": false,
                        "description": "عندما تكون `true`، يتم الإرسال بالعلامة البيضاء: إذا لم يكن لتطبيقك اسم مرسل لرسائل SMS، فستذكر رسالة SMS اسمك العام للعلامة البيضاء بدلاً من ذلك (\"123456 هو رمز التحقق الخاص بك لـ Acme Bank\"). عند تعيين اسم مرسل SMS الخاص بك، يُستخدم مع هذه العلامة أو بدونها. ينطبق على رسائل SMS، بما في ذلك الرجوع التلقائي إلى SMS من قناة أخرى؛ تُرسل رموز WhatsApp برسالة ثابتة ولا تحمل علامة تجارية. القيمة الافتراضية هي `false`."
                      },
                      "sms_sender_name": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 30,
                        "example": "Acme Bank",
                        "description": "الاسم الذي تحمله الرسالة النصية القصيرة SMS لهذا الرمز (\"123456 هو رمز التحقق الخاص بك لـ Acme Bank\")، بدلاً من اسم مرسل الرسائل القصيرة لتطبيقك. مجاناً. من 1 إلى 30 حرفاً: حروف وأرقام ومسافات و' & - ! فقط، وليس أرقاماً فقط، مع مسافات مفردة بين الكلمات؛ يؤدي إرسال أي قيمة أخرى إلى إرجاع `400` وعدم إرسال الرمز. في حال إغفاله أو تعيينه كـ `null` أو تركه فارغاً، يُستخدم اسم مرسل الرسائل القصيرة لتطبيقك. يمكن لكل تطبيق البدء في استخدام ما يصل إلى اسمين جديدين يومياً (UTC)؛ وبعد ذلك، يُرسل الرمز باسم تطبيقك. ينطبق على رسائل SMS، بما في ذلك الاحتياط إلى SMS من قناة أخرى؛ لا تحمل رموز WhatsApp أي علامة تجارية.",
                        "pattern": "^$|^(?![\\d ]+$)[\\p{L}\\p{N}'&!-]+( [\\p{L}\\p{N}'&!-]+)*$"
                      }
                    }
                  },
                  "signals": {
                    "type": "object",
                    "description": "إشارات اختيارية للجهاز والشبكة حول المستخدم النهائي، تُمرَّر إلى طبقة مكافحة الاحتيال لتحسين اكتشاف حركة المرور المسيئة أو الآلية. جميع الحقول اختيارية.",
                    "properties": {
                      "ip": {
                        "type": "string",
                        "description": "عنوان IP لجهاز المستخدم النهائي. IPv4 أو IPv6.",
                        "example": "192.0.2.1"
                      },
                      "device_id": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "المعرّف الفريد لجهاز المستخدم النهائي. نظام Android: `ANDROID_ID`؛ نظام iOS: `identifierForVendor`.",
                        "example": "8F0B8FDD-C2CB-4387-B20A-56E9B2E5A0D2"
                      },
                      "device_platform": {
                        "type": "string",
                        "enum": [
                          "android",
                          "ios",
                          "ipados",
                          "tvos",
                          "web"
                        ],
                        "description": "منصة جهاز المستخدم النهائي."
                      },
                      "device_model": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "طراز جهاز المستخدم النهائي.",
                        "example": "iPhone17,2"
                      },
                      "os_version": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "إصدار نظام التشغيل لجهاز المستخدم النهائي.",
                        "example": "18.0.1"
                      },
                      "app_version": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "إصدار تطبيقك.",
                        "example": "1.2.34"
                      },
                      "user_agent": {
                        "type": "string",
                        "maxLength": 512,
                        "description": "وكيل المستخدم لمتصفح المستخدم النهائي أو تطبيقه.",
                        "example": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1"
                      }
                    }
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "معرّف اختياري يتحكم فيه المتصل (معرّف المستخدم الداخلي لديك، أو بريد إلكتروني، أو UUID، وما إلى ذلك) يُحفظ في الجلسة ويُعاد في استجابة الإرسال، واستجابة فحص التطابق، وwebhook، وBusiness Console. استخدمه لربط `request_id` الخاص بـ Didit بسجل المستخدم لديك."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON اختياري حرّ التنسيق يُحفظ في الجلسة ويُعاد في استجابة الإرسال، واستجابة فحص المطابقة، وwebhooks، وBusiness Console."
                  }
                },
                "required": [
                  "phone_number"
                ]
              },
              "examples": {
                "WhatsApp (default)": {
                  "summary": "رمز OTP مكوّن من 6 أرقام عبر WhatsApp، مع الرجوع التلقائي إلى SMS",
                  "value": {
                    "phone_number": "+14155552671",
                    "options": {
                      "preferred_channel": "whatsapp",
                      "locale": "en-US"
                    },
                    "vendor_data": "user-1234"
                  }
                },
                "SMS with custom code length": {
                  "summary": "فرض التسليم عبر SMS برمز مكون من 4 أرقام",
                  "value": {
                    "phone_number": "+34699999999",
                    "options": {
                      "preferred_channel": "sms",
                      "code_size": 4,
                      "locale": "es"
                    }
                  }
                },
                "With fraud signals": {
                  "summary": "إعادة توجيه إشارات الجهاز لتعزيز فحص مكافحة الاحتيال",
                  "value": {
                    "phone_number": "+14155552671",
                    "signals": {
                      "ip": "192.0.2.1",
                      "device_id": "8F0B8FDD-C2CB-4387-B20A-56E9B2E5A0D2",
                      "device_platform": "ios",
                      "device_model": "iPhone17,2",
                      "os_version": "18.0.1",
                      "app_version": "1.2.34"
                    },
                    "vendor_data": "user-1234"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تأكيد استلام الإرسال. تحقق من `status`: تشير `Success` و`Retry` إلى أن الرمز في طريقه للإرسال؛ بينما تعني `Blocked` أن طبقة مكافحة الاحتيال قد رفضت العملية وأنه قد تم إنهاء التحقق مسبقاً بحالة `Declined`. تمثل `request_id` معرف الجلسة المحفوظ (نفس المعرف عند استخدام `Retry`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneVerificationSendResponse"
                },
                "examples": {
                  "Success": {
                    "summary": "تم إرسال رمز لمرة واحدة لعملية تحقق جديدة",
                    "value": {
                      "request_id": "e39cb057-92fc-4b59-b84e-02fec29a0f24",
                      "status": "Success",
                      "reason": null,
                      "vendor_data": "user-1234",
                      "metadata": null
                    }
                  },
                  "Retry": {
                    "summary": "الإرسال الثاني للرقم نفسه خلال نافذة الـ 5 دقائق — نفس request_id",
                    "value": {
                      "request_id": "e39cb057-92fc-4b59-b84e-02fec29a0f24",
                      "status": "Retry",
                      "reason": null,
                      "vendor_data": "user-1234",
                      "metadata": null
                    }
                  },
                  "Blocked": {
                    "summary": "رفض لمكافحة الاحتيال — تم إنهاء التحقق بحالة مرفوضة، ولم تتم فوترة أي شيء",
                    "value": {
                      "request_id": "0d8af1f4-0c43-46d7-b75c-6e4e22c0a7b3",
                      "status": "Blocked",
                      "reason": "repeated_attempts",
                      "vendor_data": "user-1234",
                      "metadata": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تُرجع المدخلات المشوهة غلاف أخطاء الحقول الخاص بـ DRF (مصفوفة واحدة من الرسائل لكل حقل مخالف، متداخلة تحت `options` بالنسبة لأخطاء الخيارات). أما الرقم الذي يتم تحليله بنجاح ولكن يُرفض في وقت الإرسال (غير قابل للوصول، أو نوع خط غير مؤهل مثل الرمز القصير) فيُرجع غلاف `{\"detail\": ...}` بدلاً من ذلك.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid phone number (field error)": {
                    "summary": "الرقم غير صالح بتنسيق E.164",
                    "value": {
                      "phone_number": [
                        "Invalid phone number provided."
                      ]
                    }
                  },
                  "Missing phone number": {
                    "summary": "`phone_number` غير مدرج في نص الطلب",
                    "value": {
                      "phone_number": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid options": {
                    "summary": "قيمة `code_size` خارج النطاق، أو `locale` غير صالحة، أو `preferred_channel` غير معروفة",
                    "value": {
                      "options": {
                        "code_size": [
                          "Ensure this value is less than or equal to 8."
                        ],
                        "locale": [
                          "Ensure this field has no more than 5 characters."
                        ],
                        "preferred_channel": [
                          "\"carrier_pigeon\" is not a valid choice."
                        ]
                      }
                    }
                  },
                  "Number rejected at send time": {
                    "summary": "تنسيق E.164 صالح ولكن الرقم لا يمكنه تلقي OTP",
                    "value": {
                      "detail": "Invalid phone number provided."
                    }
                  },
                  "Ineligible line type": {
                    "summary": "نوع الخط لا يمكنه استقبال رمز لمرة واحدة (OTP) (مثل الرموز القصيرة)",
                    "value": {
                      "detail": "Invalid phone line type provided."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "تم رفض الإذن. يُرجع عند فقدان الرأس `x-api-key` (`{\"detail\": ...}`)؛ ويُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`. يُرجع أيضاً قبل أي إرسال عندما لا تكون المؤسسة قد قامت بشحن الرصيد من قبل (بوابة مكافحة سوء الاستخدام) أو عندما لا يغطي رصيدها سعر الإرسال إلى الوجهة (`{\"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."
                    }
                  },
                  "Top-up required": {
                    "summary": "يظل التحقق من رقم الهاتف معطلاً حتى أول عملية شحن رصيد للمؤسسة",
                    "value": {
                      "detail": "To protect against abuse, phone verification is disabled until your first top-up."
                    }
                  },
                  "Not enough credits": {
                    "summary": "رصيد المؤسسة لا يمكنه تغطية سعر الإرسال",
                    "value": {
                      "error": "You don't have enough credits to perform this request."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. تشترك نقاط endpoint الخاصة بـ POST/PATCH/DELETE في ميزانية قدرها 300 طلب كتابة في الدقيقة لكل مفتاح API (إنشاء المعاملات واستيعاب الأحداث لهما ميزانية منفصلة تبلغ 600). بالإضافة إلى ذلك، يُطبق على مستوى المنبع حد أقصى لمكافحة إساءة الاستخدام يبلغ 4 محاولات تحقق لكل رقم هاتف في الساعة. تتضمن الاستجابة رؤوس `X-RateLimit-Limit` و`X-RateLimit-Remaining` و`X-RateLimit-Reset` و`Retry-After`. ملاحظة: ترافق رؤوس `X-RateLimit-*`/`Retry-After` فقط استجابة 429 الخاصة بحد الكتابة البالغ 300/دقيقة؛ بينما لا تتضمن استجابة 429 للحد الأقصى لكل رقم أي رؤوس لحد المعدل.",
            "content": {
              "application/json": {
                "examples": {
                  "Per-number cap": {
                    "summary": "أكثر من 4 محاولات تحقق لنفس الرقم خلال الساعة الماضية",
                    "value": {
                      "detail": "Maximum verification attempts reached for this phone number. Only 4 authentication attempts are allowed per hour. Try again later or use a different number."
                    }
                  },
                  "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"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "مزود التحقق من رقم الهاتف غير متاح مؤقتاً - استجابة 5xx، أو انتهاء المهلة، أو فشل في الاتصال تعذر حله بعد محاولات إعادة المحاولة المدمجة. من الآمن إعادة المحاولة؛ لم تتم فوترة أي شيء ولم تُستهلك أي محاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Provider outage": {
                    "summary": "لم يجب المزود على طلب الإرسال",
                    "value": {
                      "detail": "Phone verification is temporarily unavailable. Please try again shortly.",
                      "code": "phone_provider_unavailable"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "فشل غير متوقع أثناء إنشاء التحقق وليس بسبب انقطاع معروف لدى المزود. يمكن إعادة المحاولة بأمان.",
            "content": {
              "application/json": {
                "examples": {
                  "Provider error": {
                    "summary": "تعذر بدء تسليم رمز لمرة واحدة",
                    "value": {
                      "detail": "Error creating phone verification"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/phone/check/": {
      "post": {
        "summary": "التحقق من رمز الهاتف",
        "description": "تحقق من رمز OTP المُسلَّم عبر [`POST /v3/phone/send/`](/ar/standalone-apis/phone-send) واحصل على نتيجة التحقق النهائية بالإضافة إلى معلومات الهاتف: اسم شركة الاتصالات ونوع الخط، وعلامات الأرقام الافتراضية (VoIP) والقابلة للاستخدام لمرة واحدة، والاستخدام المكرر للرقم عبر جلساتك.\n\n**كيف يعثر الفحص على عملية التحقق.** يتم التطابق استناداً إلى تطبيقك بالإضافة إلى `phone_number` بتنسيق E.164 — ولا يُعدّ `request_id` مدخلاً. يتم فحص أحدث عملية تحقق معلقة تم إنشاؤها خلال آخر **5 دقائق**. إذا لم تكن هناك أي عملية (لم تُرسل مطلقاً، أو تم إنهاؤها بالفعل، أو أقدم من 5 دقائق)، يعيد الـ endpoint الرمز `200` مع `status: \"Expired or Not Found\"`.\n\n**حد المحاولات المسموح به.** تتيح كل عملية تحقق **3 محاولات لإدخال الرمز**. يؤدي إدخال أول رمزين خاطئين إلى إرجاع `status: \"Failed\"` مع عدد المحاولات المتبقية و`phone: null`؛ وتؤدي المحاولة الثالثة الخاطئة للرمز إلى إنهاء عملية التحقق كـ `Declined` مع تحذير `VERIFICATION_CODE_ATTEMPTS_EXCEEDED` وإرجاع تقرير الهاتف كاملاً.\n\n**النتائج.** `Approved` — الرمز صحيح ولا توجد مخاطر موجبة للرفض. `Declined` — نهائية: كان الرمز صحيحاً ولكن طابقت مخاطر موجبة للرفض (إجراء `DECLINE` أدناه، أو رقم مدرج في قائمة الحظر أو عالي المخاطر)، أو تم استنفاد حد المحاولات. `Failed` — رمز خاطئ مع بقاء محاولات متاحة. `Expired or Not Found` — لا يوجد شيء لفحصه. في حالتي `Approved`/`Declined`، يتطابق `request_id` مع `request_id` الخاص بالإرسال (معرّف الجلسة) ويحتوي `phone` على التقرير الكامل (`carrier`، و`is_virtual`، و`is_disposable`، و`warnings`، و`lifecycle`، و`matches`)؛ أما في حالتي `Failed` و`Expired or Not Found`، فيكون `request_id` عبارة عن معرّف UUID عشوائي يُستخدم لمرة واحدة.\n\n**إجراءات المخاطر.** تحدد المعاملات `duplicated_phone_number_action` و`disposable_number_action` و`voip_number_action` ما يحدث عند اكتشاف الخطر المقابل مع رمز صحيح: يغير `DECLINE` الحالة النهائية إلى `Declined`؛ بينما يسجل `NO_ACTION` (الافتراضي) الخطر في `phone.warnings` دون التأثير على الحالة.\n\n**الفوترة.** عمليات الفحص مجانية — وتتم فوترة التسليم من جانب الإرسال (راجع [أسعار التحقق من رقم الهاتف](/ar/getting-started/phone-verification-pricing)).\n\n**استمرارية الجلسة.** يؤدي الفحص المكتمل إلى تحديث الجلسة التي تم إنشاؤها عبر الإرسال (مرئية في Business Console، ويمكن الاستعلام عنها عبر `GET /v3/session/{sessionId}/decision/`) ويُطلق حدث webhook من نوع `status.updated`.\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية كل عمليات المعالجة: أي رمز ذي تنسيق سليم (من 4 إلى 8 أرقام، بما في ذلك `123456`) يعيد payload ثابتاً بحالة `Approved` مع كائن `phone` مبسط ومسطح (`status`، و`phone_number`، و`country_code`، و`carrier_name`، و`line_type`، و`flags`)؛ بينما يظل الإدخال غير السليم يعيد الرمز `400`. لا يتم حفظ أي شيء.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تؤدي بيانات الاعتماد المفقودة أو غير الصالحة إلى إرجاع `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا يعيد هذا الـ API الرمز `401` أبداً.\n\n**حدود المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API، بالإضافة إلى الحد الأقصى لمكافحة إساءة الاستخدام لدى المزود الرئيسي البالغ 4 محاولات لكل رقم في الساعة؛ يؤدي تجاوز أي منهما إلى إرجاع `429`.\n\n**البصمة الاجتماعية.** اضبط `enable_social` على `true` لإضافة كتلة `phone_social`: المنصات عبر الإنترنت التي تم تسجيل هذا الرقم فيها، مع أعداد لكل فئة وأي تفاصيل ملف شخصي متاحة. وتعني القيمة `profiles_registered: 0` أنه تم فحص المنصات ولم يتم العثور على الرقم في أي منها - وهي إجابة صالحة خاضعة للفوترة. وتغيب هذه الكتلة إذا لم يُطلب الملحق الإضافي أو تعذر إكمال الفحص، ولا تتم فوترتها في هذه الحالة. تضيف الفوترة وحدة `phone_social` واحدة لكل طلب فوق السعر الخاص بهذا الـ endpoint.",
        "operationId": "post_v3phone_check",
        "x-didit-sdk": {
          "resource": "phone",
          "method": "check_code",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/phone/check/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone_number\": \"+14155552671\",\n    \"code\": \"123456\",\n    \"voip_number_action\": \"DECLINE\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.phone.check_code(\n    phone_number=\"+14155552671\",\n    code=\"123456\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.phone.checkCode({\n  phone_number: \"+14155552671\",\n  code: \"123456\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Phone.CheckCode(ctx, didit.PhoneCheckCodeParams{\n\tPhoneNumber: \"+14155552671\",\n\tCode:        \"123456\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.PhoneCheckCodeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.phone().checkCode(PhoneCheckCodeParams.builder()\n        .phoneNumber(\"+14155552671\")\n        .code(\"123456\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->phone->checkCode([\n    'phone_number' => '+14155552671',\n    'code' => '123456',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.phone.check_code(\n  phone_number: \"+14155552671\",\n  code: \"123456\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Phone.CheckCodeAsync(new PhoneCheckCodeParams\n{\n    PhoneNumber = \"+14155552671\",\n    Code = \"123456\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone_number": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "رقم الهاتف نفسه المستخدم في استدعاء [`POST /v3/phone/send/`](/ar/standalone-apis/phone-send) المطابق، بتنسيق E.164. هذا ما يربط التحقق بعملية الإرسال.",
                    "example": "+14155552671"
                  },
                  "code": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 8,
                    "pattern": "^[0-9]{4,8}$",
                    "description": "رمز OTP الذي استلمه المستخدم النهائي. يجب أن يتكون من 4 إلى 8 أرقام — أي شيء آخر يُرجع `400` دون استهلاك أي محاولة. الرمز المكتمل التنسيق ولكن الخاطئ يُرجع `200` مع `status: \"Failed\"` ويستهلك إحدى المحاولات الثلاث.",
                    "example": "123456"
                  },
                  "duplicated_phone_number_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتخذ عند استخدام نفس الرقم مسبقاً من قبل مستخدم مختلف (بيانات `vendor_data` مختلفة) لتطبيقك. يؤدي خيار `DECLINE` إلى تحويل `status` النهائي إلى `Declined`؛ ويسجل خيار `NO_ACTION` المخاطر في `phone.warnings` ويملأ `phone.matches`."
                  },
                  "disposable_number_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتبع عندما يشير فحص شركة الاتصالات إلى أن الرقم مؤقت أو للاستخدام الواحد (`phone.is_disposable`). يحول `DECLINE` القيمة النهائية لـ `status` إلى `Declined`؛ ويسجل `NO_ACTION` الخطر في `phone.warnings`."
                  },
                  "voip_number_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتبع عندما يبلغ فحص شركة الاتصالات عن نوع خط افتراضي — `voip` أو `isp` أو `vpn` (`phone.is_virtual`). يحول `DECLINE` القيمة النهائية لـ `status` إلى `Declined`؛ ويسجل `NO_ACTION` الخطر في `phone.warnings`."
                  },
                  "enable_enrichment": {
                    "type": "boolean",
                    "default": false,
                    "description": "عندما تكون `true`، يتم أيضاً تشغيل استخبارات الهاتف على الرقم: درجة المخاطر، ونوع الخط، وما إذا كان قد تم نقله مؤخراً، ومؤشر الثقة. تتم الفوترة كوحدة `phone_intelligence_api` واحدة لكل طلب ($0.05 بسعر القائمة) بالإضافة إلى سعر endpoint هذا نفسه. يُرجع الطلب `403` عندما لا يكفي رصيدك لتغطية التكلفة.",
                    "example": false
                  },
                  "phone_intelligence_score_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء عند تجاوز درجة مخاطر معلومات الهاتف للحد المعين. القيمة `DECLINE` تحول الـ `status` النهائي إلى `Declined`؛ والقيمة `NO_ACTION` تسجل الإشارة دون رفض. يسري مفعوله فقط عندما يكون `enable_enrichment` مضبوطاً على `true`."
                  },
                  "phone_type_risk_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء عندما يكون الرقم من نوع خط عالي المخاطر. القيمة `DECLINE` تحول الـ `status` النهائي إلى `Declined`؛ والقيمة `NO_ACTION` تسجل الإشارة دون رفض. يسري مفعوله فقط عندما يكون `enable_enrichment` مضبوطاً على `true`."
                  },
                  "recent_port_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء عند نقل الرقم إلى مشغل شبكة آخر مؤخراً. القيمة `DECLINE` تحول الـ `status` النهائي إلى `Declined`؛ والقيمة `NO_ACTION` تسجل الإشارة دون رفض. يسري مفعوله فقط عندما يكون `enable_enrichment` مضبوطاً على `true`."
                  },
                  "low_phone_trust_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء عندما يكون مؤشر الثقة لمعلومات الهاتف مساوياً للحد المعين أو أقل منه. القيمة `DECLINE` تحول الـ `status` النهائي إلى `Declined`؛ والقيمة `NO_ACTION` تسجل الإشارة دون رفض. يسري مفعوله فقط عندما يكون `enable_enrichment` مضبوطاً على `true`."
                  },
                  "enable_social": {
                    "type": "boolean",
                    "default": false,
                    "description": "عند التعيين على true، يتم أيضاً البحث عن الأثر الرقمي الاجتماعي للرقم - منصات المراسلة والمنصات الاجتماعية والتجارة الإلكترونية والمهنية المسجل عليها. يُفوتر كوحدة `phone_social` واحدة لكل طلب بالإضافة إلى سعر هذا الـ endpoint نفسه.",
                    "example": true
                  },
                  "phone_no_social_presence_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء عندما يجد فحص الأثر الاجتماعي أن الرقم غير مسجل على أي من المنصات التي يغطيها. يُقبل فقط NO_ACTION وDECLINE في هذا الـ endpoint؛ يتوفر REVIEW في مفتاح تهيئة سير العمل الذي يحمل نفس الاسم."
                  }
                },
                "required": [
                  "phone_number",
                  "code"
                ]
              },
              "examples": {
                "Default": {
                  "summary": "تسجيل أي مخاطر ولكن دون الرفض التلقائي مطلقاً",
                  "value": {
                    "phone_number": "+14155552671",
                    "code": "123456"
                  }
                },
                "Strict risk policy": {
                  "summary": "الرفض التلقائي لخطوط VoIP والخطوط المؤقتة",
                  "value": {
                    "phone_number": "+14155552671",
                    "code": "123456",
                    "voip_number_action": "DECLINE",
                    "disposable_number_action": "DECLINE"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل التحقق — تُرجع الرموز الخاطئة وعمليات التحقق المفقودة أيضاً الرمز `200`؛ تحقّق من `status`، وليس رمز HTTP. يتم ملء `phone` فقط في النتائج النهائية (`Approved`/`Declined`)، ويكون `null` عند `Failed`، وغير موجود عند `Expired or Not Found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneVerificationCheckResponse"
                },
                "examples": {
                  "Approved": {
                    "summary": "رمز صحيح — تقرير هاتف كامل يتضمن شركة الاتصالات، ودورة الحياة، والتطابقات",
                    "value": {
                      "request_id": "e39cb057-92fc-4b59-b84e-02fec29a0f24",
                      "status": "Approved",
                      "message": "The verification code is correct.",
                      "phone": {
                        "status": "Approved",
                        "phone_number_prefix": "+1",
                        "phone_number": "4155552671",
                        "full_number": "+14155552671",
                        "country_code": "US",
                        "country_name": "United States",
                        "carrier": {
                          "name": "AT&T",
                          "type": "mobile"
                        },
                        "is_disposable": false,
                        "is_virtual": false,
                        "verification_method": "whatsapp",
                        "verification_attempts": 1,
                        "verified_at": "2026-06-12T01:24:47.311323Z",
                        "warnings": [],
                        "lifecycle": [
                          {
                            "type": "PHONE_VERIFICATION_MESSAGE_SENT",
                            "timestamp": "2026-06-12T01:23:39.580554+00:00",
                            "details": {
                              "status": "Success",
                              "reason": null,
                              "channel": "whatsapp",
                              "actual_channel": "whatsapp"
                            },
                            "fee": 0.0509
                          },
                          {
                            "type": "PHONE_DELIVERY_DELIVERED",
                            "timestamp": "2026-06-12T01:23:43.118220+00:00",
                            "details": {
                              "channel": "whatsapp",
                              "status": "delivered"
                            },
                            "fee": 0
                          },
                          {
                            "type": "VALID_CODE_ENTERED",
                            "timestamp": "2026-06-12T01:24:47.311201+00:00",
                            "details": {
                              "code_tried": "123456",
                              "status": "Approved"
                            },
                            "fee": 0
                          },
                          {
                            "type": "PHONE_VERIFICATION_APPROVED",
                            "timestamp": "2026-06-12T01:24:47.384292+00:00",
                            "details": null,
                            "fee": 0
                          }
                        ],
                        "matches": []
                      },
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:47.401719+00:00"
                    }
                  },
                  "Failed (attempts remaining)": {
                    "summary": "رمز خاطئ — يمكن للمستخدم إعادة المحاولة؛ request_id هنا هو UUID يستخدم لمرة واحدة",
                    "value": {
                      "request_id": "11111111-2222-3333-4444-555555555555",
                      "status": "Failed",
                      "message": "The verification code is incorrect. Attempts remaining: 2",
                      "phone": null,
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:21.512340+00:00"
                    }
                  },
                  "Declined (max attempts)": {
                    "summary": "الرمز الخاطئ الثالث — تم إنهاء التحقق كـ Declined",
                    "value": {
                      "request_id": "e39cb057-92fc-4b59-b84e-02fec29a0f24",
                      "status": "Declined",
                      "message": "The verification code is incorrect. Maximum attempts reached.",
                      "phone": {
                        "status": "Declined",
                        "phone_number_prefix": "+1",
                        "phone_number": "4155552671",
                        "full_number": "+14155552671",
                        "country_code": "US",
                        "country_name": "United States",
                        "carrier": {
                          "name": "AT&T",
                          "type": "mobile"
                        },
                        "is_disposable": false,
                        "is_virtual": false,
                        "verification_method": "whatsapp",
                        "verification_attempts": 1,
                        "verified_at": null,
                        "warnings": [
                          {
                            "feature": "PHONE",
                            "risk": "VERIFICATION_CODE_ATTEMPTS_EXCEEDED",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Verification code attempts exceeded",
                            "long_description": "The system detected that the phone number has exceeded the maximum number of verification code attempts."
                          }
                        ],
                        "lifecycle": [
                          {
                            "type": "PHONE_VERIFICATION_MESSAGE_SENT",
                            "timestamp": "2026-06-12T01:23:39.580554+00:00",
                            "details": {
                              "status": "Success",
                              "reason": null,
                              "channel": "whatsapp",
                              "actual_channel": "whatsapp"
                            },
                            "fee": 0.0509
                          },
                          {
                            "type": "INVALID_CODE_ENTERED",
                            "timestamp": "2026-06-12T01:24:01.118220+00:00",
                            "details": {
                              "code_tried": "111111",
                              "status": "Failed"
                            },
                            "fee": 0
                          },
                          {
                            "type": "INVALID_CODE_ENTERED",
                            "timestamp": "2026-06-12T01:24:21.512340+00:00",
                            "details": {
                              "code_tried": "222222",
                              "status": "Failed"
                            },
                            "fee": 0
                          },
                          {
                            "type": "INVALID_CODE_ENTERED",
                            "timestamp": "2026-06-12T01:24:47.311201+00:00",
                            "details": {
                              "code_tried": "333333",
                              "status": "Failed"
                            },
                            "fee": 0
                          },
                          {
                            "type": "PHONE_VERIFICATION_DECLINED",
                            "timestamp": "2026-06-12T01:24:47.384292+00:00",
                            "details": {
                              "reason": "VERIFICATION_CODE_ATTEMPTS_EXCEEDED"
                            },
                            "fee": 0
                          }
                        ],
                        "matches": []
                      },
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:47.401719+00:00"
                    }
                  },
                  "Declined (risk policy)": {
                    "summary": "رمز صحيح، لكن الخط يعمل بتقنية VoIP وvoip_number_action=DECLINE",
                    "value": {
                      "request_id": "7f1c9d2e-44a1-4b6e-9a3e-5b8e6f1c2d3a",
                      "status": "Declined",
                      "message": "The verification code is correct.",
                      "phone": {
                        "status": "Declined",
                        "phone_number_prefix": "+1",
                        "phone_number": "5005550006",
                        "full_number": "+15005550006",
                        "country_code": "US",
                        "country_name": "United States",
                        "carrier": {
                          "name": "CLEC LLC",
                          "type": "voip"
                        },
                        "is_disposable": false,
                        "is_virtual": true,
                        "verification_method": "sms",
                        "verification_attempts": 1,
                        "verified_at": "2026-06-12T01:24:47.311323Z",
                        "warnings": [
                          {
                            "feature": "PHONE",
                            "risk": "VOIP_NUMBER_DETECTED",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "VoIP number detected",
                            "long_description": "The system detected that the phone number is a VoIP number, which is not allowed."
                          }
                        ],
                        "lifecycle": [
                          {
                            "type": "PHONE_VERIFICATION_MESSAGE_SENT",
                            "timestamp": "2026-06-12T01:23:39.580554+00:00",
                            "details": {
                              "status": "Success",
                              "reason": null,
                              "channel": "whatsapp",
                              "actual_channel": "sms"
                            },
                            "fee": 0.0509
                          },
                          {
                            "type": "VALID_CODE_ENTERED",
                            "timestamp": "2026-06-12T01:24:47.311201+00:00",
                            "details": {
                              "code_tried": "123456",
                              "status": "Approved"
                            },
                            "fee": 0
                          },
                          {
                            "type": "PHONE_VERIFICATION_DECLINED",
                            "timestamp": "2026-06-12T01:24:47.384292+00:00",
                            "details": {
                              "reason": "VOIP_NUMBER_DETECTED"
                            },
                            "fee": 0
                          }
                        ],
                        "matches": []
                      },
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:47.401719+00:00"
                    }
                  },
                  "Expired or Not Found": {
                    "summary": "لا توجد عملية تحقق معلقة لهذا الرقم خلال آخر 5 دقائق",
                    "value": {
                      "request_id": "69cc35c6-280a-47a6-ab8c-4f32abc02ed0",
                      "status": "Expired or Not Found",
                      "message": "No pending phone verification found in the last 5 minutes.",
                      "vendor_data": null,
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:47.311323+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — غلاف أخطاء الحقول الخاص بـ DRF: مصفوفة رسائل واحدة لكل حقل مخالف.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid code format": {
                    "summary": "`code` ليس مكونًا من 4–8 أرقام",
                    "value": {
                      "code": [
                        "Invalid code format. Enter 4 to 8 numeric digits."
                      ]
                    }
                  },
                  "Invalid phone number": {
                    "summary": "`phone_number` ليس بتنسيق E.164 صالح",
                    "value": {
                      "phone_number": [
                        "Invalid phone number provided."
                      ]
                    }
                  },
                  "Invalid action": {
                    "summary": "تقبل إجراءات المخاطر NO_ACTION أو DECLINE فقط",
                    "value": {
                      "voip_number_action": [
                        "\"REVIEW\" is not a valid choice."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "تم رفض الإذن. يُرجع عند فقدان الرأس `x-api-key`؛ ويُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`. عمليات الفحص مجانية، لذا لا يوجد فحص للرصيد هنا.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "summary": "لا يوجد رأس `x-api-key`، أو أن المفتاح غير صالح/ملغى",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. تشترك نقاط endpoint الخاصة بـ POST/PATCH/DELETE في ميزانية قدرها 300 طلب كتابة في الدقيقة لكل مفتاح API (إنشاء المعاملات واستيعاب الأحداث لهما ميزانية منفصلة تبلغ 600). بالإضافة إلى ذلك، يُطبق على مستوى المنبع حد أقصى لمكافحة إساءة الاستخدام يبلغ 4 محاولات تحقق لكل رقم هاتف في الساعة. تتضمن الاستجابة رؤوس `X-RateLimit-Limit` و`X-RateLimit-Remaining` و`X-RateLimit-Reset` و`Retry-After`. ملاحظة: ترافق رؤوس `X-RateLimit-*`/`Retry-After` فقط استجابة 429 الخاصة بحد الكتابة البالغ 300/دقيقة؛ بينما لا تتضمن استجابة 429 للحد الأقصى لكل رقم أي رؤوس لحد المعدل.",
            "content": {
              "application/json": {
                "examples": {
                  "Per-number cap": {
                    "summary": "أكثر من 4 محاولات تحقق لنفس الرقم خلال الساعة الماضية",
                    "value": {
                      "detail": "Maximum verification attempts reached for this phone number. Only 4 authentication attempts are allowed per hour. Try again later or use a different number."
                    }
                  },
                  "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"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "مزود التحقق من رقم الهاتف غير متاح مؤقتاً - استجابة 5xx، أو انتهاء المهلة، أو فشل في الاتصال تعذر حله بعد محاولات إعادة المحاولة المدمجة. من الآمن إعادة المحاولة؛ لم تُستهلك ميزانية المحاولات.",
            "content": {
              "application/json": {
                "examples": {
                  "Provider outage": {
                    "summary": "لم يجب المزود على طلب الفحص",
                    "value": {
                      "detail": "Phone verification is temporarily unavailable. Please try again shortly.",
                      "code": "phone_provider_unavailable"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "فشل غير متوقع أثناء التحقق من الرمز في الخدمة upstream وليس بسبب انقطاع معروف لدى المزود. يمكن إعادة المحاولة بأمان؛ لا تُستهلك ميزانية المحاولات إلا من خلال عمليات الفحص المكتملة.",
            "content": {
              "application/json": {
                "examples": {
                  "Provider error": {
                    "summary": "تعذّر إكمال التحقق من الرمز",
                    "value": {
                      "detail": "Error checking phone verification"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/bank/account-check/": {
      "post": {
        "summary": "التحقق من حساب بنكي",
        "description": "تحقق من أن الحساب البنكي يخص الشخص أو الشركة التي تحددها، قبل إرسال الأموال إليه. لا حاجة لجلسة أو تسجيل دخول: أرسل الاسم والحساب، واقرأ النتيجة. هذا هو [فحص الحساب](/ar/core-technology/bank-verification/account-check) الخاص بخطوة التحقق من البنك، ويتم تشغيله من واجهتك الخلفية.\n\n**ما ترسل.** حقل `country` الخاص بالحساب (ISO 3166-1 alpha-3)، وحقل `account` بالطريقة التي تكتبها بها تلك الدولة، واسم `holder`: إما `full_name` لشخص أو `business_name` لشركة. يتحقق اسم الشركة من حساب تجاري.\n\n**ما تتلقاه.** تكون قيمة `result` إما `match` أو `close_match` أو `no_match` أو `cannot_verify`. في حالة `close_match`، يكون `holder_name` هو الاسم الذي يحتفظ به البنك للحساب، عندما يُرجعه البنك. يعود `account` محجوباً باستثناء آخر 4 أحرف.\n\n**الفوترة.** تتم فوترة كل فحص يجيب عليه البنك مرة واحدة بسعر فحص الحساب الخاص بدولة الحساب، أياً كانت النتيجة: تتم أيضاً فوترة `no_match`، والحساب غير الموجود، و`cannot_verify`. لا تتم فوترة أي طلب يُجاب عليه بخطأ على الإطلاق.\n\n**كل طلب هو فحص جديد.** لا يوجد مفتاح idempotency ولا يوجد endpoint لقراءة الفحص مرة أخرى، لذا فإن أي طلب تتم إعادة المحاولة فيه يُنفَّذ وتتم فوترته مجدداً. احرص على تخزين الاستجابة.\n\n**البيئة التجريبية.** استخدم مفتاح API للبيئة التجريبية مع تفاصيل الحساب التجريبية. لا يستدعي مفتاح البيئة التجريبية أي بنك ولا تُفرض عليه أي رسوم. تحدد آخر 4 أحرف من رقم IBAN، أو من رقم الحساب، الإجابة: `0001` تُرجع `close_match` مع `holder_name`، و`0002` تُرجع `close_match` بدونه، و`0003` و`0006` تُرجعان `no_match`، و`0004` تُرجع `cannot_verify`، و`0005` تُرجع `503`، و`0009` تُرجع `400`. وأي نهاية أخرى تُرجع `match`.\n\n**مفاتيح API.** يحتاج مفتاح API ذو نطاق إلى إذن كتابة للجلسات.",
        "operationId": "post_v3_bank_account_check",
        "tags": [
          "Standalone APIs"
        ],
        "x-didit-sdk": {
          "resource": "bank",
          "method": "account_check",
          "auth": "api_key",
          "server": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankAccountCheckRequest"
              },
              "examples": {
                "Person, Nigeria": {
                  "summary": "رمز بنكي ورقم حساب، تم التحقق منهما مقابل اسم الشخص",
                  "value": {
                    "country": "NGA",
                    "account": {
                      "bank_code": "000014",
                      "account_number": "0123450001"
                    },
                    "holder": {
                      "full_name": "Maria Oliveira"
                    },
                    "vendor_data": "payout_20481"
                  }
                },
                "Company, Nigeria": {
                  "summary": "رمز بنكي ورقم حساب، تم التحقق منهما مقابل اسم الشركة",
                  "value": {
                    "country": "NGA",
                    "account": {
                      "bank_code": "000014",
                      "account_number": "0123456789"
                    },
                    "holder": {
                      "business_name": "Northwind Trading Ltd"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "استجاب البنك. تتم فوترة الفحص، أياً كانت النتيجة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountCheckResponse"
                },
                "examples": {
                  "Close match": {
                    "summary": "يحتفظ البنك بالحساب تحت اسم مطابق تقريباً",
                    "value": {
                      "request_id": "c2f4a9e0-7b1d-4c3a-9e55-1d0a6b8f2a47",
                      "result": "close_match",
                      "holder_name": "MARIA R OLIVEIRA",
                      "account": "****0001",
                      "vendor_data": "payout_20481",
                      "created_at": "2026-10-21T14:32:08Z"
                    }
                  },
                  "Match": {
                    "summary": "يحتفظ البنك بالحساب تحت الاسم المُرسل",
                    "value": {
                      "request_id": "5b0e2d7c-41a8-4f6e-9c3b-8e7d1a2f6c90",
                      "result": "match",
                      "holder_name": null,
                      "account": "****6789",
                      "vendor_data": null,
                      "created_at": "2026-10-21T14:35:41Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "مرفوض كما تم إرساله، وغير مفوتر. يحدد `field` حقل نص الطلب المطلوب تصحيحه ويوضح `reason` السبب، مع نفس الأسباب التي يعرضها نموذج الحساب المستضاف. يتم الإبلاغ عن الحقل المرفوض الأول فقط.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountCheckError"
                },
                "examples": {
                  "Missing field": {
                    "summary": "يتطلب التحقق في هذه الدولة رمز البنك",
                    "value": {
                      "detail": "The bank code is not valid (required).",
                      "code": "invalid_account_input",
                      "field": "account.bank_code",
                      "reason": "required"
                    }
                  },
                  "Invalid IBAN": {
                    "summary": "طول رقم IBAN غير صحيح بالنسبة لدولته",
                    "value": {
                      "detail": "The iban is not valid (length).",
                      "code": "invalid_account_input",
                      "field": "account.iban",
                      "reason": "length"
                    }
                  },
                  "Refused by the bank": {
                    "summary": "رفض البنك الحساب كما أُرسل",
                    "value": {
                      "detail": "The account was refused as typed (rejected).",
                      "code": "invalid_account_input",
                      "field": "account.account_number",
                      "reason": "rejected"
                    }
                  },
                  "No name": {
                    "summary": "لا يحتوي `holder` على `full_name` ولا على `business_name`",
                    "value": {
                      "detail": "Send full_name for a person or business_name for a company.",
                      "code": "invalid_account_input",
                      "field": "holder",
                      "reason": "required"
                    }
                  },
                  "Consent required": {
                    "summary": "يتطلب التحقق من الحساب في هذه الدولة موافقة صاحب الحساب",
                    "value": {
                      "detail": "Account checks in this country need the account holder's explicit consent. Ask for it, then send `consent=true`.",
                      "code": "invalid_account_input",
                      "field": "consent",
                      "reason": "required"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountCheckError"
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "لا يمكن دفع تكلفة الفحص، لذا لم يتم تشغيله. اشحن رصيدك، ثم أرسله مجدداً.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountCheckError"
                },
                "examples": {
                  "Out of credit": {
                    "summary": "لا يمكن لرصيدك تغطية عملية فحص واحدة",
                    "value": {
                      "detail": "You don't have enough credits to perform this request. Please top up at https://business.didit.me",
                      "code": "insufficient_credits"
                    }
                  },
                  "Not in your contract": {
                    "summary": "لا يتضمن عقدك سعراً لواجهة برمجة تطبيقات فحص الحساب",
                    "value": {
                      "detail": "Your contract does not price the Account check API. Contact your account manager.",
                      "code": "contract_rate_missing"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` أو bearer token مفقود أو غير صالح، أو أن الطلب ورد من عنوان خارج قائمة عناوين IP الخاصة بالمفتاح، أو أن مفتاحاً محدد النطاق لا يملك صلاحية كتابة للجلسات.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountCheckError"
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد مفتاح API أو token صالح",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "No sessions write": {
                    "summary": "مفتاح ذو نطاق محدد دون إذن وصول للكتابة إلى الجلسات",
                    "value": {
                      "detail": "This API key has no write access to sessions."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد فحص حساب يدعم هذا الحساب حتى الآن، لذا لم يتم فحص أي شيء أو إصدار فاتورة بشأنه. `country_not_covered`: لا يوجد فحص يدعم دولته، أو نوع حسابه (فرد أو شركة) هناك. `bank_not_covered`: لا يوجد فحص يدعم بنكه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountCheckError"
                },
                "examples": {
                  "Country not covered": {
                    "summary": "لا يوجد فحص حساب يدعم الدولة",
                    "value": {
                      "detail": "No account check serves this country yet.",
                      "code": "country_not_covered"
                    }
                  },
                  "Bank not covered": {
                    "summary": "لا يوجد فحص حساب يدعم بنك الحساب",
                    "value": {
                      "detail": "No account check serves this account's bank yet.",
                      "code": "bank_not_covered"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          },
          "503": {
            "description": "تعذر على البنك الاستجابة. لم يُفحص شيء ولم تتم فوترته؛ أعد إرسال الفحص لاحقاً.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountCheckError"
                },
                "examples": {
                  "Unavailable": {
                    "summary": "لم يستجب البنك",
                    "value": {
                      "detail": "The account check is temporarily unavailable and this request was not charged. Please try again.",
                      "code": "account_check_unavailable"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/bank/account-check/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"country\": \"NGA\",\n    \"account\": {\"bank_code\": \"000014\", \"account_number\": \"0123450001\"},\n    \"holder\": {\"full_name\": \"Maria Oliveira\"},\n    \"vendor_data\": \"payout_20481\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.bank.account_check(\n    country=\"NGA\",\n    account={\n        \"account_number\": \"0123450001\",\n        \"bank_code\": \"000014\",\n    },\n    holder={\n        \"full_name\": \"Maria Oliveira\",\n    },\n    vendor_data=\"payout_20481\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.bank.accountCheck({\n  country: \"NGA\",\n  account: {\n    account_number: \"0123450001\",\n    bank_code: \"000014\",\n  },\n  holder: {\n    full_name: \"Maria Oliveira\",\n  },\n  vendor_data: \"payout_20481\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Bank.AccountCheck(ctx, didit.BankAccountCheckRequest{\n\tCountry: \"NGA\",\n\tAccount: didit.BankAccountCheckRequestAccount{\n\t\tAccountNumber: didit.String(\"0123450001\"),\n\t\tBankCode:      didit.String(\"000014\"),\n\t},\n\tHolder: didit.BankAccountCheckHolder{\n\t\tFullName: didit.String(\"Maria Oliveira\"),\n\t},\n\tVendorData: didit.String(\"payout_20481\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.BankAccountCheckHolder;\nimport me.didit.types.BankAccountCheckPersonHolder;\nimport me.didit.types.BankAccountCheckRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.bank().accountCheck(BankAccountCheckRequest.builder()\n        .country(\"NGA\")\n        .account(BankAccountCheckRequest.Account.builder()\n                .accountNumber(\"0123450001\")\n                .bankCode(\"000014\")\n                .build())\n        .holder(BankAccountCheckHolder.ofBankAccountCheckPersonHolder(BankAccountCheckPersonHolder.builder()\n                .fullName(\"Maria Oliveira\")\n                .build()))\n        .vendorData(\"payout_20481\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->bank->accountCheck([\n    'country' => 'NGA',\n    'account' => [\n        'account_number' => '0123450001',\n        'bank_code' => '000014',\n    ],\n    'holder' => [\n        'full_name' => 'Maria Oliveira',\n    ],\n    'vendor_data' => 'payout_20481',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.bank.account_check(\n  country: \"NGA\",\n  account: {\n    account_number: \"0123450001\",\n    bank_code: \"000014\",\n  },\n  holder: {\n    full_name: \"Maria Oliveira\",\n  },\n  vendor_data: \"payout_20481\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Bank.AccountCheckAsync(new BankAccountCheckRequest\n{\n    Country = \"NGA\",\n    Account = new()\n    {\n        AccountNumber = \"0123450001\",\n        BankCode = \"000014\",\n    },\n    Holder = new()\n    {\n        FullName = \"Maria Oliveira\",\n    },\n    VendorData = \"payout_20481\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/email/send/": {
      "post": {
        "summary": "إرسال رمز عبر البريد الإلكتروني",
        "description": "أرسل رمزاً لمرة واحدة (OTP) إلى عنوان بريد إلكتروني، ثم تحقق منه باستخدام [`POST /v3/email/check/`](/ar/standalone-apis/email-check).\n\n**كيف يقترن الإرسال بالتحقق.** ترتبط حالة التحقق بتطبيقك مضافاً إليه عنوان `email` — لا يتطلب استدعاء التحقق المعامل `request_id`. يُنشئ كل إرسال جديد عملية تحقق معلقة تظل صالحة لمدة **5 دقائق**: استدعِ عملية التحقق باستخدام نفس العنوان والرمز الذي استلمه المستخدم قبل إغلاق هذه النافذة الزمنية. يؤدي استدعاء الإرسال مرة أخرى لنفس العنوان أثناء وجود عملية تحقق معلقة إلى إنشاء رمز جديد لنفس عملية التحقق (`status: \"Retry\"`، ونفس `request_id`)؛ ويتوقف الرمز السابق عن العمل. يتم إرفاق إعادة محاولة واحدة فقط كحد أقصى بهذه الطريقة (عمليتا إرسال في المجموع)؛ وأي إرسال إضافي يبدأ عملية تحقق جديدة تماماً بمعرّف `request_id` جديد. تُحسب نافذة الـ 5 دقائق بدءاً من أول عملية إرسال ولا يتم تمديدها بواسطة إعادات المحاولة.\n\n**الفحص المسبق لقابلية التسليم.** قبل إرسال أي شيء، يخضع العنوان للتحقق من بنيته النحوية والتحقق من سجلات DNS/MX. تُرجع العناوين التي لا يمكنها استلام الرسائل الرمز `200` مع `status: \"Undeliverable\"` و`reason: \"email_can_not_be_delivered\"` — ولا يتم إرسال أي بريد إلكتروني، ولا تتم فوترة أي شيء، ويتم إنهاء عملية التحقق على الفور بحالة `Declined` (يُرجع فحص المتابعة `Expired or Not Found`). يؤدي الإرسال الذي يفشل لسبب لا يتعلق بالعنوان (تعذر تسليم البريد الإلكتروني لمرحلة الإرسال) إلى إرجاع الرمز `503` بدلاً من ذلك: ولا يتم إرسال أي رمز، ولا تتم فوترة أي شيء، وتظل عملية التحقق مفتوحة ويمكن تكرار نفس الطلب.\n\n**تنسيق الرمز والعلامة التجارية.** تتكون الرموز من 4 إلى 8 خانات (`options.code_size`، والافتراضي 6)، وهي رقمية بشكل افتراضي؛ اضبط `options.alphanumeric_code: true` لاستخدام أحرف كبيرة وأرقام (مقارنة التحقق غير حساسة لحالة الأحرف). يتم توطين قالب البريد الإلكتروني عبر `options.locale` (54 لغة مدعومة) ويمكنه استخدام العلامة التجارية لتطبيقك عبر خيار العلامة البيضاء `options.use_white_label_customization`.\n\n**الفوترة.** رصيد API واحد للتحقق من البريد الإلكتروني لكل عملية إرسال ناجحة (`status: \"Success\"`)، ويتم خصمه في وقت الإرسال. عمليات الإرسال ذات الحالة `Retry` و`Undeliverable` مجانية، وعمليات الفحص مجانية أيضاً.\n\n**استمرار الجلسة.** يتم حفظ كل عملية تحقق جديدة كجلسة من نوع API: يمثل `request_id` معرّف جلسة حقيقياً يمكنك تمريره إلى `GET /v3/session/{sessionId}/decision/`، وتظهر عملية التحقق في Business Console، وتنطلق أحداث webhook الخاصة بـ `status.updated` أثناء تقدمها.\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية مرحلتي التسليم والفوترة: بعد التحقق من صحة الطلب (لا يزال الإدخال المشوّه يُرجع الرمز `400`)، يُرجع endpoint الـ payload الثابت `Success` مع معرّف `request_id` عشوائي؛ ولا يتم إرسال أي بريد إلكتروني ولا يتم حفظ أي شيء. استخدم الرمز `123456` في فحص البيئة التجريبية.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة الرمز `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا يُرجع هذا الـ API أبداً الرمز `401`.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE؛ وتجاوزها يُرجع `429`.",
        "operationId": "post_v3email_send",
        "x-didit-sdk": {
          "resource": "email",
          "method": "send_code",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/email/send/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"email\": \"alice@example.com\",\n    \"options\": { \"code_size\": 6, \"locale\": \"en\" },\n    \"vendor_data\": \"user-1234\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.email.send_code(\n    email=\"alice@example.com\",\n    options={\n        \"locale\": \"en\",\n    },\n    vendor_data=\"user-1234\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.email.sendCode({\n  email: \"alice@example.com\",\n  options: {\n    locale: \"en\",\n  },\n  vendor_data: \"user-1234\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Email.SendCode(ctx, didit.EmailSendCodeParams{\n\tEmail: \"alice@example.com\",\n\tOptions: didit.Some(didit.EmailSendCodeParamsOptions{\n\t\tLocale: didit.Some(didit.EmailSendCodeParamsOptionsLocale(\"en\")),\n\t}),\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 me.didit.Didit;\nimport me.didit.types.EmailSendCodeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.email().sendCode(EmailSendCodeParams.builder()\n        .email(\"alice@example.com\")\n        .options(EmailSendCodeParams.Options.builder()\n                .locale(EmailSendCodeParams.Options.Locale.of(\"en\"))\n                .build())\n        .vendorData(\"user-1234\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->email->sendCode([\n    'email' => 'alice@example.com',\n    'options' => [\n        'locale' => 'en',\n    ],\n    'vendor_data' => 'user-1234',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.email.send_code(\n  email: \"alice@example.com\",\n  options: {\n    locale: \"en\",\n  },\n  vendor_data: \"user-1234\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Email.SendCodeAsync(new EmailSendCodeParams\n{\n    Email = \"alice@example.com\",\n    Options = new EmailSendCodeParamsOptions\n    {\n        Locale = new EmailSendCodeParamsOptionsLocale(\"en\"),\n    },\n    VendorData = \"user-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "عنوان البريد الإلكتروني للمستلم. تُرجع العناوين المشوهة غير الصالحة `400`؛ أما العناوين الصالحة لغوياً ولكنها لا تستطيع تلقي البريد (فشل التحقق من DNS/MX) فتُرجع `200` مع `status: \"Undeliverable\"`.",
                    "example": "alice@example.com"
                  },
                  "options": {
                    "type": "object",
                    "description": "تنسيق رمز لمرة واحدة، والتوطين، وخيارات العلامة التجارية. جميع الحقول اختيارية.",
                    "properties": {
                      "code_size": {
                        "type": "integer",
                        "minimum": 4,
                        "maximum": 8,
                        "default": 6,
                        "description": "عدد الأحرف في رمز OTP (أرقام افتراضياً؛ أحرف كبيرة وأرقام عندما يكون `alphanumeric_code` مضبوطاً على `true`)."
                      },
                      "alphanumeric_code": {
                        "type": "boolean",
                        "default": false,
                        "description": "عندما تكون `true`، يتكون OTP من أحرف كبيرة `A–Z` وأرقام `0–9` بدلاً من الأرقام فقط. لا تتأثر مقارنة `/v3/email/check/` بحالة الأحرف."
                      },
                      "locale": {
                        "type": "string",
                        "maxLength": 5,
                        "enum": [
                          "en",
                          "ar",
                          "bn",
                          "bg",
                          "bs",
                          "ca",
                          "cs",
                          "da",
                          "de",
                          "el",
                          "es",
                          "et",
                          "fa",
                          "fi",
                          "fr",
                          "he",
                          "hi",
                          "hr",
                          "hu",
                          "hy",
                          "id",
                          "it",
                          "ja",
                          "ka",
                          "kk",
                          "ko",
                          "ky",
                          "lt",
                          "lv",
                          "cnr",
                          "mk",
                          "mn",
                          "ms",
                          "nl",
                          "no",
                          "pl",
                          "pt-BR",
                          "pt",
                          "ro",
                          "ru",
                          "sk",
                          "sl",
                          "so",
                          "sq",
                          "sr",
                          "sv",
                          "th",
                          "tr",
                          "uk",
                          "uz",
                          "vi",
                          "zh-CN",
                          "zh-TW",
                          "zh"
                        ],
                        "description": "لغة قالب البريد الإلكتروني لرمز OTP. القيمة الافتراضية هي `en`. تُرجع القيم غير المدعومة الخطأ `400` مع سرد لجميع اللغات المدعومة.",
                        "example": "en"
                      },
                      "use_white_label_customization": {
                        "type": "boolean",
                        "default": false,
                        "description": "عندما تكون `true`، يستخدم بريد OTP الإلكتروني تخصيص العلامة البيضاء لتطبيقك (الشعار، والألوان، والعلامة التجارية للمرسل) بدلاً من قالب Didit الافتراضي."
                      }
                    }
                  },
                  "signals": {
                    "type": "object",
                    "description": "إشارات اختيارية للجهاز والشبكة حول المستخدم النهائي، تُمرَّر إلى طبقة مكافحة الاحتيال لتحسين اكتشاف حركة المرور المسيئة أو الآلية. جميع الحقول اختيارية.",
                    "properties": {
                      "ip": {
                        "type": "string",
                        "description": "عنوان IP لجهاز المستخدم النهائي. IPv4 أو IPv6.",
                        "example": "192.0.2.1"
                      },
                      "device_id": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "المعرّف الفريد لجهاز المستخدم النهائي. نظام Android: `ANDROID_ID`؛ نظام iOS: `identifierForVendor`.",
                        "example": "8F0B8FDD-C2CB-4387-B20A-56E9B2E5A0D2"
                      },
                      "device_platform": {
                        "type": "string",
                        "enum": [
                          "android",
                          "ios",
                          "ipados",
                          "tvos",
                          "web"
                        ],
                        "description": "منصة جهاز المستخدم النهائي."
                      },
                      "device_model": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "طراز جهاز المستخدم النهائي.",
                        "example": "iPhone17,2"
                      },
                      "os_version": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "إصدار نظام التشغيل لجهاز المستخدم النهائي.",
                        "example": "18.0.1"
                      },
                      "app_version": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "إصدار تطبيقك.",
                        "example": "1.2.34"
                      },
                      "user_agent": {
                        "type": "string",
                        "maxLength": 512,
                        "description": "وكيل المستخدم لمتصفح المستخدم النهائي أو تطبيقه.",
                        "example": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1"
                      }
                    }
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "معرّف اختياري يتحكم فيه المتصل (معرّف المستخدم الداخلي لديك، أو بريد إلكتروني، أو UUID، وما إلى ذلك) يُحفظ في الجلسة ويُعاد في استجابة الإرسال، واستجابة فحص التطابق، وwebhook، وBusiness Console. استخدمه لربط `request_id` الخاص بـ Didit بسجل المستخدم لديك."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON اختياري حرّ التنسيق يُحفظ في الجلسة ويُعاد في استجابة الإرسال، واستجابة فحص المطابقة، وwebhooks، وBusiness Console."
                  }
                },
                "required": [
                  "email"
                ]
              },
              "examples": {
                "Numeric 6-digit code": {
                  "summary": "افتراضي — رمز رقمي مكوّن من 6 أرقام باللغة الإنجليزية",
                  "value": {
                    "email": "alice@example.com",
                    "options": {
                      "locale": "en"
                    },
                    "vendor_data": "user-1234"
                  }
                },
                "Alphanumeric 8-character code": {
                  "summary": "أحرف كبيرة + أرقام، قالب إسباني",
                  "value": {
                    "email": "bob@example.com",
                    "options": {
                      "code_size": 8,
                      "alphanumeric_code": true,
                      "locale": "es"
                    }
                  }
                },
                "White-label branding": {
                  "summary": "أرسل البريد الإلكتروني الذي يحتوي على رمز OTP مع تخصيص العلامة البيضاء لتطبيقك",
                  "value": {
                    "email": "carol@example.com",
                    "options": {
                      "locale": "en",
                      "use_white_label_customization": true
                    },
                    "vendor_data": "user-5678"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تأكيد استلام الإرسال. تحقق من `status`: تعني `Success` و`Retry` أن الرمز في طريقه للإرسال؛ بينما تعني `Undeliverable` أن العنوان لا يمكنه استلام البريد وأنه قد تم إنهاء التحقق مسبقاً بحالة `Declined`. تمثل `request_id` معرف الجلسة المحفوظ (نفس المعرف عند استخدام `Retry`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerificationSendResponse"
                },
                "examples": {
                  "Success": {
                    "summary": "تم إرسال رمز لمرة واحدة عبر البريد الإلكتروني لعملية تحقق جديدة (تخضع للفوترة)",
                    "value": {
                      "request_id": "e39cb057-92fc-4b59-b84e-02fec29a0f24",
                      "status": "Success",
                      "reason": null,
                      "vendor_data": "user-1234",
                      "metadata": null
                    }
                  },
                  "Retry": {
                    "summary": "الإرسال الثاني خلال نافذة الـ 5 دقائق — رمز جديد، نفس request_id، مجاني",
                    "value": {
                      "request_id": "e39cb057-92fc-4b59-b84e-02fec29a0f24",
                      "status": "Retry",
                      "reason": null,
                      "vendor_data": "user-1234",
                      "metadata": null
                    }
                  },
                  "Undeliverable": {
                    "summary": "فشل العنوان في التحقق من DNS/MX — تم إنهاء التحقق بالحالة مرفوضة، ولم تتم فوترة أي شيء",
                    "value": {
                      "request_id": "cb1a5011-344d-444d-bdce-218904745d7f",
                      "status": "Undeliverable",
                      "reason": "email_can_not_be_delivered",
                      "vendor_data": "user-1234",
                      "metadata": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — غلاف أخطاء الحقول الخاص بـ DRF: مصفوفة رسائل واحدة لكل حقل مخالف، متداخلة تحت `options` لأخطاء الخيارات.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid email": {
                    "summary": "عنوان بريد إلكتروني غير صالح",
                    "value": {
                      "email": [
                        "Enter a valid email address."
                      ]
                    }
                  },
                  "Unsupported locale": {
                    "summary": "`options.locale` خارج المجموعة المدعومة",
                    "value": {
                      "options": {
                        "locale": [
                          "Invalid locale. Supported locales are en, ar, bn, bg, bs, ca, cs, da, de, el, es, et, fa, fi, fr, he, hi, hr, hu, hy, id, it, ja, ka, kk, ko, ky, lt, lv, cnr, mk, mn, ms, nl, no, pl, pt-BR, pt, ro, ru, sk, sl, so, sq, sr, sv, th, tr, uk, uz, vi, zh-CN, zh-TW, zh."
                        ]
                      }
                    }
                  },
                  "Code size out of range": {
                    "summary": "`options.code_size` خارج النطاق 4–8",
                    "value": {
                      "options": {
                        "code_size": [
                          "Ensure this value is less than or equal to 8."
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "تم رفض الإذن. يُرجع عند فقدان الرأس `x-api-key` (`{\"detail\": ...}`)؛ ويُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`. يُرجع أيضاً قبل أي إرسال عندما لا يغطي رصيد المؤسسة رصيداً واحداً لـ API التحقق من البريد الإلكتروني (`{\"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."
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "تعذر إرسال البريد الإلكتروني لسبب لا علاقة له بالعنوان (تعذر الوصول إلى مزود خدمة البريد الإلكتروني، أو انتهت مهلة الاتصال، أو رفض الإرسال نفسه)، لذلك لم يُرسل أي رمز ولم تتم فوترة أي شيء أو احتسابه كمحاولة إرسال. كرر الطلب نفسه.",
            "content": {
              "application/json": {
                "examples": {
                  "Email delivery unavailable": {
                    "summary": "فشل مزود خدمة البريد الإلكتروني بعد إعادة محاولة تلقائية واحدة",
                    "value": {
                      "detail": "Email delivery is temporarily unavailable. Please try again."
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/email/check/": {
      "post": {
        "summary": "التحقق من رمز البريد الإلكتروني",
        "description": "تحقق من رمز OTP المُرسَل بواسطة [`POST /v3/email/send/`](/ar/standalone-apis/email-send) واحصل على نتيجة التحقق النهائية بالإضافة إلى معلومات استخبارات البريد الإلكتروني: قابلية التسليم، والتعرض للاختراق (`is_breached` وقائمة `breaches` من قاعدة بيانات استخبارات الاختراقات)، واكتشاف موفري البريد المؤقت، والاستخدام المتكرر للعنوان عبر جلساتك.\n\n**كيف يعثر الفحص على عملية التحقق.** تتم المطابقة بناءً على تطبيقك بالإضافة إلى عنوان `email` — ولا يُعد `request_id` معاملاً للمُدخلات. يتم فحص أحدث عملية تحقق معلقة تم إنشاؤها خلال آخر **5 دقائق**. إذا لم تكن هناك أي عملية (لم يتم الإرسال مطلقاً، أو تم إنهاؤها بالفعل، أو كانت غير قابلة للتسليم وقت الإرسال، أو أقدم من 5 دقائق)، فإن الـ endpoint يرجع `200` مع `status: \"Expired or Not Found\"`.\n\n**عدد المحاولات المتاحة.** تتيح كل عملية تحقق **3 محاولات للرمز**. يؤدي إدخال أول رمزين غير صحيحين إلى إرجاع `status: \"Failed\"` مع المحاولات المتبقية و`email: null`؛ أما الرمز غير الصحيح الثالث فيُنهي عملية التحقق بالحالة `Declined` مع تحذير `EMAIL_CODE_ATTEMPTS_EXCEEDED` ويُرجع تقرير البريد الإلكتروني الكامل. تتم مقارنة الرموز دون حساسية لحالة الأحرف (وهو أمر مهم لعمليات إرسال `alphanumeric_code`)؛ والرمز المرسل الأحدث هو الوحيد الصالح.\n\n**النتائج.** `Approved` — رمز صحيح ولا توجد مخاطر تستوجب الرفض. `Declined` — حالة نهائية: كان الرمز صحيحاً ولكن تطابق خطر يستوجب الرفض (إجراء `DECLINE` أدناه، أو عنوان في قائمة الحظر، أو تبين أن العنوان غير قابل للتسليم عند الإنهاء)، أو استنفاد عدد المحاولات المتاحة. `Failed` — رمز خاطئ، مع وجود محاولات متبقية. `Expired or Not Found` — لا يوجد ما يمكن فحصه. في حالتي `Approved`/`Declined`، يكون `request_id` مساوياً لـ `request_id` الخاص بالإرسال (معرّف الجلسة) ويحمل `email` التقرير الكامل (`is_breached`، و`breaches`، و`is_disposable`، و`is_undeliverable`، و`warnings`، و`lifecycle`، و`matches`)؛ وفي حالتي `Failed` و`Expired or Not Found`، يكون `request_id` عبارة عن UUID عشوائي يُنشأ لمرة واحدة.\n\n**إجراءات المخاطر.** تحدد معاملات `duplicated_email_action` و`breached_email_action` و`disposable_email_action` ما يحدث عند اكتشاف الخطر المقابل مع إدخال رمز صحيح: يُغيّر `DECLINE` الحالة النهائية إلى `Declined`؛ بينما يُسجل `NO_ACTION` (الافتراضي) الخطر في `email.warnings` دون التأثير على الحالة.\n\n**الفوترة.** الفحوصات مجانية — يُستهلك الرصيد بواسطة عملية الإرسال الناجحة.\n\n**استمرارية الجلسة.** يُحدّث الفحص المكتمل الجلسة التي تم إنشاؤها بواسطة الإرسال (تكون مرئية في Business Console، وقابلة للاستعلام عبر `GET /v3/session/{sessionId}/decision/`) ويُطلق حدث webhook من نوع `status.updated`.\n\n**البيئة التجريبية.** تتخطى مفاتيح API الخاصة بالبيئة التجريبية كافة عمليات المعالجة: يُرجع أي رمز ذي بنية صحيحة (بما في ذلك `123456`) payload ثابتاً بالحالة `Approved` مع كائن `email` مبسط (`status` و`email` و`is_breached` و`is_disposable` و`is_undeliverable`)؛ وتظل المدخلات غير صالحة البنية تُرجع `400`. لا يتم حفظ أي شيء.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في الرأس `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة الرمز `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — لا تُرجع واجهة API هذه الرمز `401` مطلقاً.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoints الخاصة بـ POST/PATCH/DELETE؛ ويؤدي تجاوزها إلى إرجاع `429`.\n\n**البصمة على وسائل التواصل الاجتماعي.** اضبط `enable_social` على `true` لإضافة كتلة `email_social`: المنصات عبر الإنترنت المسجل عليها هذا العنوان، مع أعداد لكل فئة وأي تفاصيل ملف شخصي متاحة. وتعني `profiles_registered: 0` أنه تم فحص المنصات ولم يتم العثور على العنوان في أي منها - وهي إجابة صالحة وخاضعة للفوترة. تكون الكتلة غائبة إذا لم يتم طلب هذه الإضافة أو تعذر إكمال الفحص، ولا تتم فوترتها في هذه الحالة. تضيف الفوترة وحدة `email_social` واحدة لكل طلب بالإضافة إلى سعر الـ endpoint نفسه.",
        "operationId": "post_v3email_check",
        "x-didit-sdk": {
          "resource": "email",
          "method": "check_code",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/email/check/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"email\": \"alice@example.com\",\n    \"code\": \"123456\",\n    \"disposable_email_action\": \"DECLINE\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.email.check_code(\n    email=\"alice@example.com\",\n    code=\"123456\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.email.checkCode({\n  email: \"alice@example.com\",\n  code: \"123456\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Email.CheckCode(ctx, didit.EmailCheckCodeParams{\n\tEmail: \"alice@example.com\",\n\tCode:  \"123456\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.EmailCheckCodeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.email().checkCode(EmailCheckCodeParams.builder()\n        .email(\"alice@example.com\")\n        .code(\"123456\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->email->checkCode([\n    'email' => 'alice@example.com',\n    'code' => '123456',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.email.check_code(\n  email: \"alice@example.com\",\n  code: \"123456\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Email.CheckCodeAsync(new EmailCheckCodeParams\n{\n    Email = \"alice@example.com\",\n    Code = \"123456\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "عنوان البريد الإلكتروني نفسه المستخدم في استدعاء [`POST /v3/email/send/`](/ar/standalone-apis/email-send) المطابق. هذا ما يربط التحقق بعملية الإرسال.",
                    "example": "alice@example.com"
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "رمز OTP الذي استلمه المستخدم النهائي: من 4 إلى 8 أرقام، أو من 4 إلى 8 أحرف/أرقام عند استخدام `alphanumeric_code: true` في وقت الإرسال. المقارنة لا تتأثر بحالة الأحرف.",
                    "example": "123456"
                  },
                  "duplicated_email_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتخذ عند استخدام نفس العنوان مسبقاً وقبوله من قبل مستخدم مختلف (يتم احتساب عمليات التحقق المقبولة سابقاً فقط) (بيانات `vendor_data` مختلفة) لتطبيقك. يؤدي خيار `DECLINE` إلى تحويل `status` النهائي إلى `Declined`؛ ويسجل خيار `NO_ACTION` المخاطر في `email.warnings` ويملأ `email.matches`."
                  },
                  "breached_email_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتبع عندما يظهر العنوان في تسريبات بيانات معروفة (`email.is_breached`). يحول `DECLINE` القيمة النهائية لـ `status` إلى `Declined`؛ ويسجل `NO_ACTION` الخطر في `email.warnings`."
                  },
                  "disposable_email_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتخذ عندما ينتمي النطاق إلى موفر بريد إلكتروني مؤقت أو يمكن التخلص منه (`email.is_disposable`). يؤدي خيار `DECLINE` إلى تحويل `status` النهائي إلى `Declined`؛ ويسجل خيار `NO_ACTION` المخاطر في `email.warnings`."
                  },
                  "enable_enrichment": {
                    "type": "boolean",
                    "default": false,
                    "description": "عندما تكون `true`، يتم أيضاً تشغيل استخبارات البريد الإلكتروني على العنوان: درجة المخاطر وسجل الاختراقات الخاص به. تتم الفوترة كوحدة `email_intelligence_api` واحدة لكل طلب ($0.05 بسعر القائمة) بالإضافة إلى سعر endpoint هذا نفسه. يُرجع الطلب `403` عندما لا يكفي رصيدك لتغطيته.",
                    "example": false
                  },
                  "email_intelligence_score_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء عند تجاوز درجة مخاطر معلومات البريد الإلكتروني للحد المعين. القيمة `DECLINE` تحول الـ `status` النهائي إلى `Declined`؛ والقيمة `NO_ACTION` تسجل الإشارة دون رفض. يسري مفعوله فقط عندما يكون `enable_enrichment` مضبوطاً على `true`."
                  },
                  "recent_email_breach_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتخذ عندما يظهر العنوان في تسريب بيانات معروف حديث. يغير `DECLINE` الـ `status` النهائي إلى `Declined`؛ ويسجل `NO_ACTION` الإشارة دون رفض. يسري مفعوله فقط عندما يكون `enable_enrichment` مضبوطاً على `true`."
                  },
                  "frequent_email_breach_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء المتخذ عندما يظهر العنوان في العديد من تسريبات البيانات المعروفة. يغير `DECLINE` الـ `status` النهائي إلى `Declined`؛ ويسجل `NO_ACTION` الإشارة دون رفض. يسري مفعوله فقط عندما يكون `enable_enrichment` مضبوطاً على `true`."
                  },
                  "enable_social": {
                    "type": "boolean",
                    "default": false,
                    "description": "عند التعيين على true، يتم أيضاً البحث عن الأثر الرقمي الاجتماعي للعنوان - منصات البريد الإلكتروني والمنصات الاجتماعية والمهنية والتجارة الإلكترونية والترفيه المسجل عليها. يُفوتر كوحدة `email_social` واحدة لكل طلب بالإضافة إلى سعر هذا الـ endpoint نفسه.",
                    "example": true
                  },
                  "email_no_social_presence_action": {
                    "type": "string",
                    "enum": [
                      "NO_ACTION",
                      "DECLINE"
                    ],
                    "default": "NO_ACTION",
                    "description": "الإجراء عندما يجد فحص الأثر الاجتماعي أن العنوان غير مسجل على أي من المنصات التي يغطيها. يُقبل فقط NO_ACTION وDECLINE في هذا الـ endpoint؛ يتوفر REVIEW في مفتاح تهيئة سير العمل الذي يحمل نفس الاسم."
                  }
                },
                "required": [
                  "email",
                  "code"
                ]
              },
              "examples": {
                "Default": {
                  "summary": "تسجيل أي مخاطر ولكن دون الرفض التلقائي مطلقاً",
                  "value": {
                    "email": "alice@example.com",
                    "code": "123456"
                  }
                },
                "Strict risk policy": {
                  "summary": "الرفض التلقائي لصناديق البريد المؤقتة والمخترقة",
                  "value": {
                    "email": "alice@example.com",
                    "code": "123456",
                    "disposable_email_action": "DECLINE",
                    "breached_email_action": "DECLINE"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل التحقق — تُرجع الرموز الخاطئة وعمليات التحقق المفقودة أيضاً الرمز `200`؛ تحقّق من `status`، وليس رمز HTTP. يتم ملء `email` فقط في النتائج النهائية (`Approved`/`Declined`)، ويكون `null` عند `Failed`، وغير موجود عند `Expired or Not Found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerificationCheckResponse"
                },
                "examples": {
                  "Approved": {
                    "summary": "رمز صحيح — عنوان سليم، تقرير بريد إلكتروني كامل",
                    "value": {
                      "request_id": "e39cb057-92fc-4b59-b84e-02fec29a0f24",
                      "status": "Approved",
                      "message": "The verification code is correct.",
                      "email": {
                        "status": "Approved",
                        "email": "alice@example.com",
                        "is_breached": false,
                        "breaches": [],
                        "is_disposable": false,
                        "is_undeliverable": false,
                        "verification_attempts": 1,
                        "verified_at": "2026-06-12T01:24:47.311323Z",
                        "warnings": [],
                        "lifecycle": [
                          {
                            "type": "EMAIL_VERIFICATION_MESSAGE_SENT",
                            "timestamp": "2026-06-12T01:23:39.580554+00:00",
                            "details": {
                              "status": "Success",
                              "reason": null
                            },
                            "fee": 0.02
                          },
                          {
                            "type": "VALID_CODE_ENTERED",
                            "timestamp": "2026-06-12T01:24:47.311201+00:00",
                            "details": {
                              "code_tried": "123456",
                              "status": "Approved"
                            },
                            "fee": 0
                          },
                          {
                            "type": "EMAIL_VERIFICATION_APPROVED",
                            "timestamp": "2026-06-12T01:24:47.384292+00:00",
                            "details": null,
                            "fee": 0
                          }
                        ],
                        "matches": []
                      },
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:47.401719+00:00"
                    }
                  },
                  "Approved with breach exposure": {
                    "summary": "رمز صحيح؛ تم تسجيل التعرض للاختراق كتحذير (breached_email_action=NO_ACTION)",
                    "value": {
                      "request_id": "3a1f2b6c-9d4e-4f7a-8b2c-1e5d6f7a8b9c",
                      "status": "Approved",
                      "message": "The verification code is correct.",
                      "email": {
                        "status": "Approved",
                        "email": "bob@example.com",
                        "is_breached": true,
                        "breaches": [
                          {
                            "name": "ExampleApp",
                            "domain": "exampleapp.com",
                            "breach_date": "2019-03-21",
                            "breach_emails_count": 763117,
                            "description": "In March 2019, the social platform ExampleApp suffered a data breach that exposed email addresses and passwords.",
                            "logo_path": "https://<media-host>/logos/ExampleApp.png",
                            "data_classes": [
                              "email_addresses",
                              "passwords"
                            ],
                            "is_verified": true
                          }
                        ],
                        "is_disposable": false,
                        "is_undeliverable": false,
                        "verification_attempts": 1,
                        "verified_at": "2026-06-12T01:24:47.311323Z",
                        "warnings": [
                          {
                            "feature": "EMAIL",
                            "risk": "BREACHED_EMAIL_DETECTED",
                            "additional_data": null,
                            "log_type": "information",
                            "short_description": "Breached email detected",
                            "long_description": "This email address was found in one or more known data breaches."
                          }
                        ],
                        "lifecycle": [
                          {
                            "type": "EMAIL_VERIFICATION_MESSAGE_SENT",
                            "timestamp": "2026-06-12T01:23:39.580554+00:00",
                            "details": {
                              "status": "Success",
                              "reason": null
                            },
                            "fee": 0.02
                          },
                          {
                            "type": "VALID_CODE_ENTERED",
                            "timestamp": "2026-06-12T01:24:47.311201+00:00",
                            "details": {
                              "code_tried": "835126",
                              "status": "Approved"
                            },
                            "fee": 0
                          },
                          {
                            "type": "EMAIL_VERIFICATION_APPROVED",
                            "timestamp": "2026-06-12T01:24:47.384292+00:00",
                            "details": null,
                            "fee": 0
                          }
                        ],
                        "matches": []
                      },
                      "vendor_data": "user-5678",
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:47.401719+00:00"
                    }
                  },
                  "Failed (attempts remaining)": {
                    "summary": "رمز خاطئ — يمكن للمستخدم إعادة المحاولة؛ request_id هنا هو UUID يستخدم لمرة واحدة",
                    "value": {
                      "request_id": "11111111-2222-3333-4444-555555555555",
                      "status": "Failed",
                      "message": "The verification code is incorrect. Attempts remaining: 2",
                      "email": null,
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:21.512340+00:00"
                    }
                  },
                  "Declined (risk policy)": {
                    "summary": "رمز صحيح، لكن العنوان مؤقت وdisposable_email_action=DECLINE",
                    "value": {
                      "request_id": "8c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
                      "status": "Declined",
                      "message": "The verification code is correct.",
                      "email": {
                        "status": "Declined",
                        "email": "tempuser42@mailinator.com",
                        "is_breached": false,
                        "breaches": [],
                        "is_disposable": true,
                        "is_undeliverable": false,
                        "verification_attempts": 1,
                        "verified_at": "2026-06-12T01:24:47.311323Z",
                        "warnings": [
                          {
                            "feature": "EMAIL",
                            "risk": "DISPOSABLE_EMAIL_DETECTED",
                            "additional_data": null,
                            "log_type": "error",
                            "short_description": "Disposable email detected",
                            "long_description": "The system detected that the email is disposable, which is not allowed."
                          }
                        ],
                        "lifecycle": [
                          {
                            "type": "EMAIL_VERIFICATION_MESSAGE_SENT",
                            "timestamp": "2026-06-12T01:23:39.580554+00:00",
                            "details": {
                              "status": "Success",
                              "reason": null
                            },
                            "fee": 0.02
                          },
                          {
                            "type": "VALID_CODE_ENTERED",
                            "timestamp": "2026-06-12T01:24:47.311201+00:00",
                            "details": {
                              "code_tried": "123456",
                              "status": "Approved"
                            },
                            "fee": 0
                          },
                          {
                            "type": "EMAIL_VERIFICATION_DECLINED",
                            "timestamp": "2026-06-12T01:24:47.384292+00:00",
                            "details": {
                              "reason": "DISPOSABLE_EMAIL_DETECTED"
                            },
                            "fee": 0
                          }
                        ],
                        "matches": []
                      },
                      "vendor_data": "user-1234",
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:47.401719+00:00"
                    }
                  },
                  "Expired or Not Found": {
                    "summary": "لا يوجد تحقق معلق لهذا العنوان في آخر 5 دقائق",
                    "value": {
                      "request_id": "88808a77-06e9-4cb0-85f5-9c052ddfd987",
                      "status": "Expired or Not Found",
                      "message": "No pending email verification found in the last 5 minutes.",
                      "vendor_data": null,
                      "metadata": null,
                      "created_at": "2026-06-12T01:24:59.887904+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — غلاف أخطاء الحقول الخاص بـ DRF: مصفوفة رسائل واحدة لكل حقل مخالف.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid email": {
                    "summary": "عنوان بريد إلكتروني غير صالح",
                    "value": {
                      "email": [
                        "Enter a valid email address."
                      ]
                    }
                  },
                  "Missing code": {
                    "summary": "`code` غير مدرج في نص الطلب",
                    "value": {
                      "code": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "تم رفض الإذن. يُرجع عند فقدان الرأس `x-api-key`؛ ويُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`. عمليات الفحص مجانية، لذا لا يوجد فحص للرصيد هنا.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "summary": "لا يوجد رأس `x-api-key`، أو أن المفتاح غير صالح/ملغى",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "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": []
          }
        ]
      }
    },
    "/v3/workflows/": {
      "get": {
        "summary": "عرض قائمة بسير العمل",
        "description": "عرض قائمة بسير العمل الخاصة بك، مرتبة من الأحدث أولاً، داخل غلاف تقسيم الصفحات limit/offset (`{count, next, previous, results}`، حجم الصفحة الافتراضي 50). يمثل كل صف إصدارًا واحدًا؛ و`workflow_id` هو معرّف المجموعة الثابت وتستخدم الجلسات الجديدة أحدث إصدار `published`.",
        "operationId": "list_workflows",
        "x-didit-sdk": {
          "resource": "workflows",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50
            },
            "description": "حجم الصفحة (عدد سير العمل في كل صفحة)."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "عدد الصفوف المراد تخطيها قبل أول سير عمل مُرجع."
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة واحدة من مسارات سير العمل مرتبة تنازلياً حسب `created_at`، مغلفة في غلاف تقسيم الصفحات. كل عنصر في `results` هو `WorkflowListItem`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "العدد الإجمالي لإصدارات سير العمل الخاصة بالتطبيق."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowListItem"
                      }
                    }
                  }
                },
                "examples": {
                  "Two workflows": {
                    "summary": "سير عمل KYC افتراضي ومسودة سير عمل KYC + AML",
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "a1b2c3d4-5678-90ab-cdef-111111111111",
                          "workflow_id": "a1b2c3d4-5678-90ab-cdef-111111111111",
                          "workflow_label": "Standard KYC",
                          "workflow_type": "kyc",
                          "is_default": true,
                          "is_archived": false,
                          "is_white_label_enabled": false,
                          "total_price": 0.15,
                          "min_price": 0.15,
                          "max_price": 0.15,
                          "features": "OCR + LIVENESS + FACE_MATCH",
                          "is_simple_workflow": true,
                          "is_editable": false,
                          "workflow_url": "https://verify.didit.me/u/_yljPOx8RWG3UAz5ZRQGVQ",
                          "max_retry_attempts": 3,
                          "retry_window_days": 7,
                          "session_expiration_time": 604800,
                          "version": 2,
                          "status": "published",
                          "has_draft": false,
                          "created_by": {
                            "name": "Alex Mateo",
                            "email": "alex@example.com",
                            "type": "user"
                          },
                          "updated_at": "2026-04-12T10:30:00Z"
                        },
                        {
                          "uuid": "b2c3d4e5-6789-01bc-defa-222222222222",
                          "workflow_id": "b2c3d4e5-6789-01bc-defa-222222222222",
                          "workflow_label": "Full Verification + AML",
                          "workflow_type": "kyc",
                          "is_default": false,
                          "is_archived": false,
                          "is_white_label_enabled": false,
                          "total_price": 0.25,
                          "min_price": 0.25,
                          "max_price": 0.25,
                          "features": "OCR + LIVENESS + FACE_MATCH + AML",
                          "is_simple_workflow": true,
                          "is_editable": true,
                          "workflow_url": "https://verify.didit.me/u/Aq3kPOx8RWG3UAz5ZRQGVQ",
                          "max_retry_attempts": 3,
                          "retry_window_days": 7,
                          "session_expiration_time": 604800,
                          "version": 1,
                          "status": "draft",
                          "has_draft": true,
                          "created_by": null,
                          "updated_at": "2026-04-15T18:05:21Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو ينتمي إلى تطبيق مختلف. نص الاستجابة: `{\"detail\": \"You do not have permission to perform this action.\"}`. قم بتحديث token عبر [Auth API](/ar/auth-api/get-credentials) وأعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي والتزم بأي رأس `Retry-After`."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم أثناء إنشاء القائمة. يمكن إعادة محاولة الطلب بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X GET 'https://verification.didit.me/v3/workflows/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Accept: application/json'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.workflows.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.workflows.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Workflows.ListAutoPaging(ctx, didit.WorkflowsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.workflows().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->workflows->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.workflows.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Workflows.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "summary": "إنشاء سير عمل",
        "description": "أنشئ سير عمل بسيطاً. أرسل `features` بترتيب التنفيذ (تُطبق قواعد الترتيب)؛ القيمة الافتراضية هي الإصدار الأول v1 `published`. يقبل نص الطلب الحقول المدرجة في `SimpleWorkflowRequest` فقط — وأي مفتاح آخر (بما في ذلك `workflow_type`) يتم رفضه برمز 400. لا تتمتع العملية بخاصية idempotency — كل استدعاء يُنشئ سير عمل جديداً. الحد الأقصى 50 سير عمل لكل تطبيق.",
        "operationId": "create_workflow",
        "x-didit-sdk": {
          "resource": "workflows",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Workflows"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimpleWorkflowRequest"
              },
              "examples": {
                "Simple KYC": {
                  "summary": "سير عمل خطي للتحقق من الهوية وكشف الحيوية ومطابقة الوجه",
                  "value": {
                    "workflow_label": "Standard KYC",
                    "features": [
                      {
                        "feature": "OCR",
                        "config": {
                          "duplicated_user_action": "review"
                        }
                      },
                      {
                        "feature": "LIVENESS",
                        "config": {
                          "face_liveness_method": "passive"
                        }
                      },
                      {
                        "feature": "FACE_MATCH",
                        "config": {
                          "face_match_score_decline_threshold": 40,
                          "face_match_score_review_threshold": 60
                        }
                      }
                    ]
                  }
                },
                "KYC + AML": {
                  "summary": "تشغيل فحص AML بعد التحقق من الهوية",
                  "value": {
                    "workflow_label": "KYC with AML",
                    "features": [
                      {
                        "feature": "OCR"
                      },
                      {
                        "feature": "AML",
                        "config": {
                          "aml_score_review_threshold": 70,
                          "aml_score_approve_threshold": 30
                        }
                      }
                    ]
                  }
                },
                "Questionnaire workflow": {
                  "summary": "تشغيل استبيان تم إنشاؤه عبر POST /v3/questionnaires/",
                  "value": {
                    "workflow_label": "Source of Funds",
                    "features": [
                      {
                        "feature": "QUESTIONNAIRE",
                        "config": {
                          "questionnaire_uuid": "11111111-2222-3333-4444-555555555555",
                          "review_questionnaire_manually": true
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "تم إنشاء سير العمل. نص الاستجابة هو التكوين الكامل لسير العمل — نفس التسلسل الخام لـ `VerificationSettings` الذي يعود من `GET /v3/workflows/{settings_uuid}/` (حوالي 190 حقلاً: كل تبديل ميزة، وحد، وإجراء، و`workflow_graph` المُنشأ)، وليس عنصر القائمة المضغوط. قم بتخزين `uuid` (المعروض أيضاً باسم `workflow_id`) لتتمكن من الرجوع إليه في استدعاءات إنشاء الجلسة لاحقاً. ملاحظة: `features` هي سلسلة متصلة بـ `\" + \"` والأسعار هي أرقام JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                },
                "examples": {
                  "Created (abbreviated)": {
                    "summary": "الحقول الرئيسية لكائن التكوين الكامل",
                    "value": {
                      "uuid": "c3d4e5f6-7890-12cd-ef34-333333333333",
                      "workflow_id": "c3d4e5f6-7890-12cd-ef34-333333333333",
                      "workflow_label": "Standard KYC",
                      "workflow_type": null,
                      "is_default": false,
                      "is_archived": false,
                      "total_price": 0.15,
                      "min_price": 0.15,
                      "max_price": 0.15,
                      "features": "OCR + LIVENESS + FACE_MATCH",
                      "is_simple_workflow": false,
                      "is_editable": false,
                      "workflow_url": "https://verify.didit.me/u/w9TkPOx8RWG3UAz5ZRQGVQ",
                      "workflow_graph": {
                        "start_node": "ocr",
                        "nodes": "... one node per feature plus a final status node ..."
                      },
                      "max_retry_attempts": 3,
                      "retry_window_days": 7,
                      "session_expiration_time": 604800,
                      "version": 1,
                      "status": "published",
                      "published_at": "2026-05-17T10:30:00Z",
                      "created_at": "2026-05-17T10:30:00Z",
                      "updated_at": "2026-05-17T10:30:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. الأسباب الشائعة: مفتاح من المستوى الأعلى خارج القائمة البيضاء المقبولة (مثل `workflow_type`)، أو قيمة `feature` غير معروفة، أو وضع ميزة قبل متطلبها السابق (مثل `FACE_MATCH` قبل `OCR`)، أو استخدام ميزة سلبية (`AML`، `IP_ANALYSIS`، `DATABASE_VALIDATION`، `KYB_KEY_PEOPLE`) كخطوة أولى، أو ميزة `QUESTIONNAIRE` التي لا يتوفر `config.questionnaire_uuid` الخاص بها لهذا التطبيق، أو ميزة `SIGNATURE` التي سيتم إطلاقها بدون مستند للتوقيع، أو ميزة `SIGNATURE` بمستوى `signature_level: \"aes\"` في حين أن التوقيع المتقدم (AES) غير متاح (`aes_not_available`، راجع `signature_availability` في سير العمل)، أو حد خارج النطاق. نص الاستجابة هو كائن خطأ في التحقق من DRF — المفاتيح هي أسماء الحقول، والقيم عبارة عن مصفوفات من الرسائل المقروءة بشرياً.",
            "content": {
              "application/json": {
                "examples": {
                  "Advanced (AES) not available": {
                    "value": {
                      "features": {
                        "signature_level": [
                          "Node 'signature': Advanced (AES) is not available yet (aes_not_available)."
                        ]
                      }
                    }
                  },
                  "Signature step with no document": {
                    "value": {
                      "features": {
                        "non_field_errors": [
                          "Node 'signature': Add a document to sign, or let each session bring its own."
                        ]
                      }
                    }
                  },
                  "Missing feature": {
                    "value": {
                      "features": [
                        "At least one feature is required."
                      ]
                    }
                  },
                  "Unknown top-level field": {
                    "value": {
                      "workflow_type": [
                        "The v3 workflow API only accepts `workflow_label`, `is_default`, `status`, `features`, `is_white_label_enabled`, `is_desktop_allowed`, `max_retry_attempts`, `retry_window_days`, `session_expiration_time`, `face_liveness_max_attempts`, `face_match_max_attempts`."
                      ]
                    }
                  },
                  "Unknown feature": {
                    "value": {
                      "features": [
                        "Invalid feature 'FOO'. Allowed values: AGE_ESTIMATION, AML, DATABASE_VALIDATION, EMAIL_VERIFICATION, FACE_MATCH, IP_ANALYSIS, KYB_DOCUMENTS, KYB_KEY_PEOPLE, KYB_REGISTRY, LIVENESS, NFC, OCR, PHONE_VERIFICATION, PROOF_OF_ADDRESS, QUESTIONNAIRE."
                      ]
                    }
                  },
                  "Ordering": {
                    "value": {
                      "features": [
                        "Feature 'FACE_MATCH' must appear after one of: OCR."
                      ]
                    }
                  },
                  "Questionnaire not found": {
                    "value": {
                      "features": "Questionnaire '11111111-2222-3333-4444-555555555555' was not found for this application. Create the questionnaire first, then use its questionnaire_id."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف. قم بالتحديث عبر [Auth API](/ar/auth-api/get-credentials) وأعد المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "نوع وسائط غير مدعوم. عيّن `Content-Type: application/json` وأرسل نص طلب بصيغة JSON."
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم أثناء إنشاء سير العمل. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST 'https://verification.didit.me/v3/workflows/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"workflow_label\": \"Standard KYC\",\n    \"features\": [\n      {\"feature\": \"OCR\"},\n      {\"feature\": \"LIVENESS\", \"config\": {\"face_liveness_method\": \"passive\"}},\n      {\"feature\": \"FACE_MATCH\", \"config\": {\"face_match_score_decline_threshold\": 40, \"face_match_score_review_threshold\": 60}}\n    ]\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.workflows.create(\n    workflow_label=\"Standard KYC\",\n    features=[{\n        \"feature\": \"OCR\",\n        \"config\": {\"duplicated_user_action\": \"review\"},\n    }, {\n        \"feature\": \"LIVENESS\",\n        \"config\": {\"face_liveness_method\": \"passive\"},\n    }, {\n        \"feature\": \"FACE_MATCH\",\n        \"config\": {\"face_match_score_decline_threshold\": 40, \"face_match_score_review_threshold\": 60},\n    }],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.workflows.create({\n  workflow_label: \"Standard KYC\",\n  features: [{\n    feature: \"OCR\",\n    config: { duplicated_user_action: \"review\" },\n  }, {\n    feature: \"LIVENESS\",\n    config: { face_liveness_method: \"passive\" },\n  }, {\n    feature: \"FACE_MATCH\",\n    config: { face_match_score_decline_threshold: 40, face_match_score_review_threshold: 60 },\n  }],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Workflows.Create(ctx, didit.SimpleWorkflowRequest{\n\tWorkflowLabel: didit.String(\"Standard KYC\"),\n\tFeatures: []didit.SimpleWorkflowFeature{{\n\t\tFeature: \"OCR\",\n\t\tConfig:  didit.Some(map[string]any{\"duplicated_user_action\": \"review\"}),\n\t}, {\n\t\tFeature: \"LIVENESS\",\n\t\tConfig:  didit.Some(map[string]any{\"face_liveness_method\": \"passive\"}),\n\t}, {\n\t\tFeature: \"FACE_MATCH\",\n\t\tConfig:  didit.Some(map[string]any{\"face_match_score_decline_threshold\": 40, \"face_match_score_review_threshold\": 60}),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SimpleWorkflowFeature;\nimport me.didit.types.SimpleWorkflowRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.workflows().create(SimpleWorkflowRequest.builder()\n        .workflowLabel(\"Standard KYC\")\n        .features(List.of(\n                SimpleWorkflowFeature.builder()\n                        .feature(SimpleWorkflowFeature.Feature.of(\"OCR\"))\n                        .config(Map.of(\"duplicated_user_action\", \"review\"))\n                        .build(),\n                SimpleWorkflowFeature.builder()\n                        .feature(SimpleWorkflowFeature.Feature.of(\"LIVENESS\"))\n                        .config(Map.of(\"face_liveness_method\", \"passive\"))\n                        .build(),\n                SimpleWorkflowFeature.builder()\n                        .feature(SimpleWorkflowFeature.Feature.of(\"FACE_MATCH\"))\n                        .config(Map.of(\"face_match_score_decline_threshold\", 40, \"face_match_score_review_threshold\", 60))\n                        .build()))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->workflows->create([\n    'workflow_label' => 'Standard KYC',\n    'features' => [[\n        'feature' => 'OCR',\n        'config' => ['duplicated_user_action' => 'review'],\n    ], [\n        'feature' => 'LIVENESS',\n        'config' => ['face_liveness_method' => 'passive'],\n    ], [\n        'feature' => 'FACE_MATCH',\n        'config' => ['face_match_score_decline_threshold' => 40, 'face_match_score_review_threshold' => 60],\n    ]],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.workflows.create(\n  workflow_label: \"Standard KYC\",\n  features: [{\n    feature: \"OCR\",\n    config: { duplicated_user_action: \"review\" },\n  }, {\n    feature: \"LIVENESS\",\n    config: { face_liveness_method: \"passive\" },\n  }, {\n    feature: \"FACE_MATCH\",\n    config: { face_match_score_decline_threshold: 40, face_match_score_review_threshold: 60 },\n  }]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Workflows.CreateAsync(new SimpleWorkflowRequest\n{\n    WorkflowLabel = \"Standard KYC\",\n    Features = new SimpleWorkflowFeature[]\n    {\n        new()\n        {\n            Feature = \"OCR\",\n            Config = new Dictionary<string, object> { [\"duplicated_user_action\"] = \"review\" },\n        },\n        new()\n        {\n            Feature = \"LIVENESS\",\n            Config = new Dictionary<string, object> { [\"face_liveness_method\"] = \"passive\" },\n        },\n        new()\n        {\n            Feature = \"FACE_MATCH\",\n            Config = new Dictionary<string, object> { [\"face_match_score_decline_threshold\"] = 40, [\"face_match_score_review_threshold\"] = 60 },\n        },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/workflows/{settings_uuid}/": {
      "get": {
        "summary": "الحصول على سير العمل",
        "description": "جلب التكوين الكامل لإصدار سير عمل واحد عبر `settings_uuid`: مفاتيح تبديل الميزات، والحدود، والمستندات المسموح بها، والمخطط، وسياسة إعادة المحاولة، وإعدادات الاستدعاءات، والأسعار.",
        "operationId": "get_workflow",
        "x-didit-sdk": {
          "resource": "workflows",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "name": "settings_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرف UUID لكل إصدار من سير العمل (قيمة `uuid` التي يرجعها endpoint القائمة). لكل إصدار من سير العمل `settings_uuid` خاص به."
          }
        ],
        "responses": {
          "200": {
            "description": "تكوين سير العمل الكامل. التنسيق هو تسلسل `VerificationSettings` الخام (نحو 190 حقلاً: كل خيار تفعيل ميزة، وحد، وإجراء تحذير، وتكوين المستندات المسموح بها، و`workflow_graph`، وسياسة إعادة المحاولة، وعمليات الاستدعاء، والأسعار). المثال أدناه مختصر. ملاحظات: `features` عبارة عن سلسلة نصية مجمعة بـ `\" + \"` (مثل `\"OCR + LIVENESS\"`)، والأسعار هي أرقام بتنسيق JSON، وتكون قيمة `is_editable` هي `true` فقط لإصدارات `draft`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                },
                "examples": {
                  "KYC workflow with face match (abbreviated)": {
                    "value": {
                      "uuid": "a1b2c3d4-5678-90ab-cdef-111111111111",
                      "workflow_id": "a1b2c3d4-5678-90ab-cdef-111111111111",
                      "workflow_label": "Standard KYC",
                      "workflow_type": "kyc",
                      "is_default": true,
                      "is_archived": false,
                      "is_liveness_enabled": true,
                      "face_liveness_method": "passive",
                      "face_liveness_score_decline_threshold": 50,
                      "face_liveness_score_review_threshold": 70,
                      "is_face_match_enabled": true,
                      "face_match_score_decline_threshold": 40,
                      "face_match_score_review_threshold": 60,
                      "is_aml_enabled": false,
                      "is_phone_verification_enabled": false,
                      "is_email_verification_enabled": false,
                      "is_database_validation_enabled": false,
                      "is_ip_analysis_enabled": false,
                      "is_nfc_enabled": false,
                      "duplicated_user_action": "no_action",
                      "documents_allowed": {
                        "ESP": {
                          "P": {
                            "sides": 1,
                            "enabled": 1,
                            "subtypes": [
                              "EPASSPORT",
                              "PASSPORT_GENERIC"
                            ],
                            "preferred_characters": "latin",
                            "expiration_check_mode": "strict"
                          }
                        }
                      },
                      "max_retry_attempts": 3,
                      "retry_window_days": 7,
                      "session_expiration_time": 604800,
                      "version": 2,
                      "status": "published",
                      "published_at": "2026-04-12T10:30:00Z",
                      "is_simple_workflow": false,
                      "is_editable": false,
                      "workflow_url": "https://verify.didit.me/u/_yljPOx8RWG3UAz5ZRQGVQ",
                      "total_price": 0.15,
                      "min_price": 0.15,
                      "max_price": 0.15,
                      "features": "OCR + LIVENESS + FACE_MATCH",
                      "created_at": "2025-01-15T10:30:00Z",
                      "updated_at": "2026-04-12T10:30:00Z"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد سير عمل بقيمة `settings_uuid` هذه للتطبيق الذي تمت مصادقته. إما أن معرّف UUID غير صحيح أو أنه يتبع تطبيقاً آخر — لا تميز Didit عمداً بين الحالتين لتجنب كشف وجود سجلات تابعة لتطبيقات أخرى.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X GET 'https://verification.didit.me/v3/workflows/a1b2c3d4-5678-90ab-cdef-111111111111/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.workflows.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.workflows.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Workflows.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.workflows().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->workflows->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.workflows.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Workflows.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "patch": {
        "summary": "تحديث سير العمل",
        "description": "تحديث سير العمل. يعتمد تحديد الإصدارات على حقل `status` الذي ترسله والحالة الحالية للإصدار: (1) عدم وجود `status` لإصدار **منشور** ← يتم تحديث الإصدار المنشور في مكانه (نفس `uuid`، ونفس `version`)؛ (2) عدم وجود `status` لـ **مسودة** ← يتم تحديث المسودة ونشرها على الفور؛ (3) ‏`status: \"published\"` لإصدار **منشور** ← يتم إنشاء إصدار منشور جديد ضمن نفس `workflow_id` (معرّف `uuid` جديد، و`version` + 1) وإرجاعه، وتُحذف أي مسودة موجودة في المجموعة؛ (4) ‏`status: \"draft\"` يبقي المسودة كمسودة (حفظ تلقائي) ولكن يتم رفضه برمز 400 للإصدار المنشور (`\"Cannot revert a published version to draft.\"`). يقبل نص الطلب نفس القائمة البيضاء الصارمة للحقول كما في الإنشاء — ويتم رفض المفاتيح غير المعروفة برمز 400.",
        "operationId": "update_workflow",
        "x-didit-sdk": {
          "resource": "workflows",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "name": "settings_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرف UUID لكل إصدار من سير العمل المطلوب تحديثه."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimpleWorkflowUpdateRequest"
              },
              "examples": {
                "Replace features": {
                  "summary": "أرسل كامل ترتيب الميزات المطلوب",
                  "value": {
                    "features": [
                      {
                        "feature": "OCR"
                      },
                      {
                        "feature": "AML"
                      }
                    ]
                  }
                },
                "Rename": {
                  "summary": "إعادة تسمية سير العمل",
                  "value": {
                    "workflow_label": "Premium KYC"
                  }
                },
                "Set as default": {
                  "summary": "تعيين سير العمل هذا ليكون الافتراضي للتطبيق",
                  "value": {
                    "is_default": true
                  }
                },
                "Update config": {
                  "summary": "تغيير تكوين الميزة",
                  "value": {
                    "features": [
                      {
                        "feature": "OCR"
                      },
                      {
                        "feature": "LIVENESS",
                        "config": {
                          "face_liveness_method": "passive"
                        }
                      }
                    ]
                  }
                },
                "Publish a draft": {
                  "summary": "ترقية مسودة إلى منشورة",
                  "value": {
                    "status": "published"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث سير العمل. يمثل نص الاستجابة التكوين الكامل (FULL) للإصدار الناتج (نفس البنية الخام لـ `VerificationSettings` كما في `GET /v3/workflows/{settings_uuid}/`). عندما يُنشئ التحديث إصداراً جديداً (إرسال `status: \"published\"` على صف منشور)، يختلف كل من `uuid` و`version` المُرجَعين عن تلك التي قمت بتعديلها — استخدم `uuid` المُرجَع للاستدعاءات اللاحقة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — مفتاح ذو مستوى أعلى خارج القائمة المسموح بها، أو ميزة غير معروفة، أو ترتيب غير صالح، أو حد خارج النطاق، أو الإشارة إلى استبيان غير موجود، أو ميزة `SIGNATURE` ستصبح نشطة في بيئة الإنتاج دون وجود مستند للتوقيع عليه، أو ميزة `SIGNATURE` جديدة عند `signature_level: \"aes\"` بينما المستوى المتقدم (AES) غير متاح (`aes_not_available`، راجع `signature_availability` في سير العمل؛ الخطوة التي تخزن بالفعل `aes` تحتفظ بها)، أو إرسال `status: \"draft\"` لإصدار منشور (`\"Cannot revert a published version to draft.\"`). نص الاستجابة هو خطأ في التحقق من الصحة من DRF مفهرس بحسب اسم الحقل."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد سير عمل بقيمة `settings_uuid` هذه للتطبيق الذي تمت مصادقته."
          },
          "415": {
            "description": "نوع وسائط غير مدعوم. عيّن `Content-Type: application/json`."
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/workflows/a1b2c3d4-5678-90ab-cdef-111111111111/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"workflow_label\": \"Premium KYC\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.workflows.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    features=[{\n        \"feature\": \"OCR\",\n    }, {\n        \"feature\": \"AML\",\n    }],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.workflows.update(\"11111111-2222-3333-4444-555555555555\", {\n  features: [{\n    feature: \"OCR\",\n  }, {\n    feature: \"AML\",\n  }],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Workflows.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SimpleWorkflowUpdateRequest{\n\tFeatures: didit.Some([]didit.SimpleWorkflowFeature{{\n\t\tFeature: \"OCR\",\n\t}, {\n\t\tFeature: \"AML\",\n\t}}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SimpleWorkflowFeature;\nimport me.didit.types.SimpleWorkflowUpdateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.workflows().update(\"11111111-2222-3333-4444-555555555555\", SimpleWorkflowUpdateRequest.builder()\n        .features(List.of(\n                SimpleWorkflowFeature.builder()\n                        .feature(SimpleWorkflowFeature.Feature.of(\"OCR\"))\n                        .build(),\n                SimpleWorkflowFeature.builder()\n                        .feature(SimpleWorkflowFeature.Feature.of(\"AML\"))\n                        .build()))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->workflows->update('11111111-2222-3333-4444-555555555555', [\n    'features' => [[\n        'feature' => 'OCR',\n    ], [\n        'feature' => 'AML',\n    ]],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.workflows.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  features: [{\n    feature: \"OCR\",\n  }, {\n    feature: \"AML\",\n  }]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Workflows.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new SimpleWorkflowUpdateRequest\n{\n    Features = new SimpleWorkflowFeature[]\n    {\n        new()\n        {\n            Feature = \"OCR\",\n        },\n        new()\n        {\n            Feature = \"AML\",\n        },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "summary": "حذف سير العمل",
        "description": "حذف إصدار سير عمل واحد نهائياً (لا يمكن التراجع). تحتفظ الجلسات الحالية بنتائج التحقق الخاصة بها ولكن تتم إزالة مرجع سير العمل الخاص بها؛ ولا تُحذف الإصدارات الأخرى في نفس مجموعة `workflow_id`.",
        "operationId": "delete_workflow",
        "x-didit-sdk": {
          "resource": "workflows",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "name": "settings_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرف UUID لكل إصدار من سير العمل المطلوب حذفه."
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف سير العمل. نص الاستجابة فارغ."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد سير عمل بقيمة `settings_uuid` هذه للتطبيق الذي تمت مصادقته.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/workflows/a1b2c3d4-5678-90ab-cdef-111111111111/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.workflows.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.workflows.delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Workflows.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.workflows().delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->workflows->delete('11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.workflows.delete(\"11111111-2222-3333-4444-555555555555\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Workflows.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");"
          }
        ]
      }
    },
    "/v3/questionnaires/": {
      "get": {
        "summary": "عرض الاستبيانات",
        "description": "عرض قائمة بالاستبيانات الخاصة بك، مرتبة من الأحدث أولاً، داخل غلاف تقسيم الصفحات limit/offset (`{count, next, previous, results}`، حجم الصفحة الافتراضي 50). يمثل كل صف إصدارًا واحدًا؛ و`questionnaire_group_id` هو معرّف المجموعة الثابت الذي يُحل إلى أحدث إصدار `published`.",
        "operationId": "list_questionnaires",
        "x-didit-sdk": {
          "resource": "questionnaires",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50
            },
            "description": "حجم الصفحة (عدد الاستبيانات في كل صفحة)."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "عدد الصفوف المراد تخطيها قبل أول استبيان مُرجع."
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة واحدة من الاستبيانات مرتبة تنازلياً حسب `created_at`، مغلفة في غلاف تقسيم الصفحات. كل عنصر في `results` هو `QuestionnaireListItem`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "العدد الإجمالي لإصدارات الاستبيان الخاصة بالتطبيق."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuestionnaireListItem"
                      }
                    }
                  }
                },
                "examples": {
                  "One questionnaire": {
                    "summary": "استبيان ثنائي اللغة بسيط",
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "11111111-2222-3333-4444-555555555555",
                          "title": "KYC Questionnaire",
                          "description": "Additional verification questions",
                          "languages": [
                            "en",
                            "es"
                          ],
                          "default_language": "en",
                          "is_active": true,
                          "is_simple_questionnaire": true,
                          "created_at": "2026-04-23T09:55:00Z",
                          "updated_at": "2026-04-23T10:00:00Z",
                          "question_types": [
                            "SHORT_TEXT",
                            "MULTIPLE_CHOICE",
                            "FILE_UPLOAD"
                          ],
                          "workflow_names": [],
                          "questionnaire_group_id": "11111111-2222-3333-4444-555555555555",
                          "version": 1,
                          "status": "published",
                          "published_at": "2026-04-23T10:00:00Z",
                          "is_editable": false
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم أثناء إنشاء القائمة. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X GET 'https://verification.didit.me/v3/questionnaires/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.questionnaires.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.questionnaires.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Questionnaires.ListAutoPaging(ctx, didit.QuestionnairesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.questionnaires().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->questionnaires->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.questionnaires.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Questionnaires.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "summary": "إنشاء استبيان",
        "description": "أنشئ استبياناً خطياً بسيطاً. أرسل `form_elements` بترتيب العرض؛ تتطلب المجموعات المتفرعة والقابلة للتكرار استخدام لوحة التحكم. القيمة الافتراضية هي الإصدار الأول v1 `published`.",
        "operationId": "create_questionnaire",
        "x-didit-sdk": {
          "resource": "questionnaires",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Questionnaires"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimpleQuestionnaireRequest"
              },
              "examples": {
                "Simple": {
                  "summary": "استبيان أساسي",
                  "value": {
                    "title": "Customer Onboarding",
                    "description": "Additional information needed for verification",
                    "default_language": "en",
                    "languages": [
                      "en"
                    ],
                    "is_active": true,
                    "form_elements": [
                      {
                        "id": "occupation",
                        "element_type": "short_text",
                        "label": {
                          "en": "What is your occupation?"
                        },
                        "is_required": true,
                        "placeholder": {
                          "en": "Software engineer"
                        }
                      },
                      {
                        "id": "source_of_funds",
                        "element_type": "multiple_choice",
                        "label": {
                          "en": "Source of funds"
                        },
                        "is_required": true,
                        "options": [
                          {
                            "value": "employment",
                            "label": {
                              "en": "Employment"
                            }
                          },
                          {
                            "value": "business",
                            "label": {
                              "en": "Business"
                            }
                          },
                          {
                            "value": "investments",
                            "label": {
                              "en": "Investments"
                            }
                          },
                          {
                            "value": "other",
                            "label": {
                              "en": "Other"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "تم إنشاء الاستبيان. تتضمن الاستجابة `questionnaire_id` — قم بتخزينه للإشارة إلى هذا الاستبيان من سير العمل أو استدعاءات التحديث/الحذف المستقبلية.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                },
                "examples": {
                  "Created": {
                    "value": {
                      "questionnaire_id": "11111111-2222-3333-4444-555555555555",
                      "title": "Customer Onboarding",
                      "description": "Additional information needed for verification",
                      "languages": [
                        "en"
                      ],
                      "default_language": "en",
                      "is_active": true,
                      "is_simple_questionnaire": true,
                      "graph": {
                        "start_node": "occupation",
                        "nodes": {
                          "occupation": {
                            "element_type": "SHORT_TEXT",
                            "is_required": true,
                            "title": {
                              "en": "What is your occupation?"
                            },
                            "next": "source_of_funds"
                          },
                          "source_of_funds": {
                            "element_type": "MULTIPLE_CHOICE",
                            "is_required": true,
                            "title": {
                              "en": "Source of funds"
                            },
                            "choices": [
                              {
                                "value": "employment",
                                "label": {
                                  "en": "Employment"
                                }
                              },
                              {
                                "value": "business",
                                "label": {
                                  "en": "Business"
                                }
                              }
                            ],
                            "next": null
                          }
                        }
                      },
                      "sections": [],
                      "questionnaire_group_id": "11111111-2222-3333-4444-555555555555",
                      "version": 1,
                      "status": "published",
                      "published_at": "2026-04-23T10:00:00Z",
                      "is_editable": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. الأسباب الشائعة: قيمة `element_type` غير معروفة، أو حقل قابل للترجمة تنقصه الترجمة لإحدى لغات `languages`، أو `languages` لا تتضمن `en`، أو `default_language` غير موجود في `languages`، أو خيار بدون `label`، أو سؤال يحتوي على `branches`/`required_if`/`repeatable_config` (غير مدعومة من قِبل هذا الـ endpoint)، أو إرسال `graph` أولي بدلاً من `form_elements`. نص الاستجابة عبارة عن خطأ في التحقق من DRF مفهرس بحسب اسم الحقل.",
            "content": {
              "application/json": {
                "examples": {
                  "Graph not accepted": {
                    "value": {
                      "graph": "The v3 questionnaire API only accepts simple `form_elements`, not `graph`."
                    }
                  },
                  "Missing label": {
                    "value": {
                      "form_elements": [
                        {
                          "label": [
                            "This field is required."
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "نوع وسائط غير مدعوم. عيّن `Content-Type: application/json` وأرسل نص طلب بصيغة JSON."
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم أثناء إنشاء الاستبيان. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST 'https://verification.didit.me/v3/questionnaires/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"title\": \"Customer Onboarding\",\n    \"default_language\": \"en\",\n    \"languages\": [\"en\"],\n    \"form_elements\": [\n      {\n        \"id\": \"occupation\",\n        \"element_type\": \"short_text\",\n        \"label\": {\"en\": \"What is your occupation?\"},\n        \"is_required\": true\n      }\n    ]\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.questionnaires.create(\n    title=\"Customer Onboarding\",\n    description=\"Additional information needed for verification\",\n    languages=[\"en\"],\n    default_language=\"en\",\n    is_active=True,\n    form_elements=[{\n        \"id\": \"occupation\",\n        \"element_type\": \"short_text\",\n        \"label\": {\"en\": \"What is your occupation?\"},\n        \"placeholder\": {\"en\": \"Software engineer\"},\n        \"is_required\": True,\n    }, {\n        \"id\": \"source_of_funds\",\n        \"element_type\": \"multiple_choice\",\n        \"label\": {\"en\": \"Source of funds\"},\n        \"is_required\": True,\n        \"options\": [{\n            \"value\": \"employment\",\n            \"label\": {\"en\": \"Employment\"},\n        }, {\n            \"value\": \"business\",\n            \"label\": {\"en\": \"Business\"},\n        }, {\n            \"value\": \"investments\",\n            \"label\": {\"en\": \"Investments\"},\n        }, {\n            \"value\": \"other\",\n            \"label\": {\"en\": \"Other\"},\n        }],\n    }],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.questionnaires.create({\n  title: \"Customer Onboarding\",\n  description: \"Additional information needed for verification\",\n  languages: [\"en\"],\n  default_language: \"en\",\n  is_active: true,\n  form_elements: [{\n    id: \"occupation\",\n    element_type: \"short_text\",\n    label: { en: \"What is your occupation?\" },\n    placeholder: { en: \"Software engineer\" },\n    is_required: true,\n  }, {\n    id: \"source_of_funds\",\n    element_type: \"multiple_choice\",\n    label: { en: \"Source of funds\" },\n    is_required: true,\n    options: [{\n      value: \"employment\",\n      label: { en: \"Employment\" },\n    }, {\n      value: \"business\",\n      label: { en: \"Business\" },\n    }, {\n      value: \"investments\",\n      label: { en: \"Investments\" },\n    }, {\n      value: \"other\",\n      label: { en: \"Other\" },\n    }],\n  }],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Create(ctx, didit.SimpleQuestionnaireRequest{\n\tTitle:           \"Customer Onboarding\",\n\tDescription:     didit.String(\"Additional information needed for verification\"),\n\tLanguages:       []string{\"en\"},\n\tDefaultLanguage: didit.String(\"en\"),\n\tIsActive:        didit.Bool(true),\n\tFormElements: []didit.SimpleQuestionnaireElement{{\n\t\tID:          didit.String(\"occupation\"),\n\t\tElementType: \"short_text\",\n\t\tLabel:       map[string]string{\"en\": \"What is your occupation?\"},\n\t\tPlaceholder: didit.Some(map[string]string{\"en\": \"Software engineer\"}),\n\t\tIsRequired:  didit.Bool(true),\n\t}, {\n\t\tID:          didit.String(\"source_of_funds\"),\n\t\tElementType: \"multiple_choice\",\n\t\tLabel:       map[string]string{\"en\": \"Source of funds\"},\n\t\tIsRequired:  didit.Bool(true),\n\t\tOptions: didit.Some([]didit.SimpleQuestionnaireElementOptions{{\n\t\t\tValue: didit.String(\"employment\"),\n\t\t\tLabel: map[string]string{\"en\": \"Employment\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"business\"),\n\t\t\tLabel: map[string]string{\"en\": \"Business\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"investments\"),\n\t\t\tLabel: map[string]string{\"en\": \"Investments\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"other\"),\n\t\t\tLabel: map[string]string{\"en\": \"Other\"},\n\t\t}}),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SimpleQuestionnaireElement;\nimport me.didit.types.SimpleQuestionnaireRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.questionnaires().create(SimpleQuestionnaireRequest.builder()\n        .title(\"Customer Onboarding\")\n        .description(\"Additional information needed for verification\")\n        .languages(List.of(\"en\"))\n        .defaultLanguage(\"en\")\n        .isActive(true)\n        .formElements(List.of(\n                SimpleQuestionnaireElement.builder()\n                        .id(\"occupation\")\n                        .elementType(SimpleQuestionnaireElement.ElementType.of(\"short_text\"))\n                        .label(Map.of(\"en\", \"What is your occupation?\"))\n                        .placeholder(Map.of(\"en\", \"Software engineer\"))\n                        .isRequired(true)\n                        .build(),\n                SimpleQuestionnaireElement.builder()\n                        .id(\"source_of_funds\")\n                        .elementType(SimpleQuestionnaireElement.ElementType.of(\"multiple_choice\"))\n                        .label(Map.of(\"en\", \"Source of funds\"))\n                        .isRequired(true)\n                        .options(List.of(\n                                SimpleQuestionnaireElement.Options.builder()\n                                        .value(\"employment\")\n                                        .label(Map.of(\"en\", \"Employment\"))\n                                        .build(),\n                                SimpleQuestionnaireElement.Options.builder()\n                                        .value(\"business\")\n                                        .label(Map.of(\"en\", \"Business\"))\n                                        .build(),\n                                SimpleQuestionnaireElement.Options.builder()\n                                        .value(\"investments\")\n                                        .label(Map.of(\"en\", \"Investments\"))\n                                        .build(),\n                                SimpleQuestionnaireElement.Options.builder()\n                                        .value(\"other\")\n                                        .label(Map.of(\"en\", \"Other\"))\n                                        .build()))\n                        .build()))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->questionnaires->create([\n    'title' => 'Customer Onboarding',\n    'description' => 'Additional information needed for verification',\n    'languages' => ['en'],\n    'default_language' => 'en',\n    'is_active' => true,\n    'form_elements' => [[\n        'id' => 'occupation',\n        'element_type' => 'short_text',\n        'label' => ['en' => 'What is your occupation?'],\n        'placeholder' => ['en' => 'Software engineer'],\n        'is_required' => true,\n    ], [\n        'id' => 'source_of_funds',\n        'element_type' => 'multiple_choice',\n        'label' => ['en' => 'Source of funds'],\n        'is_required' => true,\n        'options' => [[\n            'value' => 'employment',\n            'label' => ['en' => 'Employment'],\n        ], [\n            'value' => 'business',\n            'label' => ['en' => 'Business'],\n        ], [\n            'value' => 'investments',\n            'label' => ['en' => 'Investments'],\n        ], [\n            'value' => 'other',\n            'label' => ['en' => 'Other'],\n        ]],\n    ]],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.questionnaires.create(\n  title: \"Customer Onboarding\",\n  description: \"Additional information needed for verification\",\n  languages: [\"en\"],\n  default_language: \"en\",\n  is_active: true,\n  form_elements: [{\n    id: \"occupation\",\n    element_type: \"short_text\",\n    label: { en: \"What is your occupation?\" },\n    placeholder: { en: \"Software engineer\" },\n    is_required: true,\n  }, {\n    id: \"source_of_funds\",\n    element_type: \"multiple_choice\",\n    label: { en: \"Source of funds\" },\n    is_required: true,\n    options: [{\n      value: \"employment\",\n      label: { en: \"Employment\" },\n    }, {\n      value: \"business\",\n      label: { en: \"Business\" },\n    }, {\n      value: \"investments\",\n      label: { en: \"Investments\" },\n    }, {\n      value: \"other\",\n      label: { en: \"Other\" },\n    }],\n  }]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Questionnaires.CreateAsync(new SimpleQuestionnaireRequest\n{\n    Title = \"Customer Onboarding\",\n    Description = \"Additional information needed for verification\",\n    Languages = new string[] { \"en\" },\n    DefaultLanguage = \"en\",\n    IsActive = true,\n    FormElements = new SimpleQuestionnaireElement[]\n    {\n        new()\n        {\n            Id = \"occupation\",\n            ElementType = \"short_text\",\n            Label = new Dictionary<string, string> { [\"en\"] = \"What is your occupation?\" },\n            Placeholder = new Dictionary<string, string> { [\"en\"] = \"Software engineer\" },\n            IsRequired = true,\n        },\n        new()\n        {\n            Id = \"source_of_funds\",\n            ElementType = \"multiple_choice\",\n            Label = new Dictionary<string, string> { [\"en\"] = \"Source of funds\" },\n            IsRequired = true,\n            Options = new SimpleQuestionnaireElementOptions[]\n            {\n                new()\n                {\n                    Value = \"employment\",\n                    Label = new Dictionary<string, string> { [\"en\"] = \"Employment\" },\n                },\n                new()\n                {\n                    Value = \"business\",\n                    Label = new Dictionary<string, string> { [\"en\"] = \"Business\" },\n                },\n                new()\n                {\n                    Value = \"investments\",\n                    Label = new Dictionary<string, string> { [\"en\"] = \"Investments\" },\n                },\n                new()\n                {\n                    Value = \"other\",\n                    Label = new Dictionary<string, string> { [\"en\"] = \"Other\" },\n                },\n            },\n        },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/questionnaires/{questionnaire_uuid}/": {
      "get": {
        "summary": "الحصول على الاستبيان",
        "description": "جلب التفاصيل الكاملة للاستبيان لإصدار واحد عبر `questionnaire_uuid`: العنوان، و`languages`، و`graph` المتعارف عليه، و`sections` المشتقة، وبيانات تعريف الإصدار.",
        "operationId": "get_questionnaire",
        "x-didit-sdk": {
          "resource": "questionnaires",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "questionnaire_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرف UUID لكل إصدار من الاستبيان (قيمة `uuid` التي يرجعها endpoint القائمة، ويُرجع أيضاً كـ `questionnaire_id` في endpoint التفاصيل)."
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل الاستبيان الكاملة بما في ذلك `graph` القياسي، وعرض `sections` المشتق، والبيانات الوصفية للإصدار، وحقل `is_editable`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                },
                "examples": {
                  "Published questionnaire": {
                    "value": {
                      "questionnaire_id": "11111111-2222-3333-4444-555555555555",
                      "title": "Customer Onboarding",
                      "description": "Additional information needed for verification",
                      "languages": [
                        "en"
                      ],
                      "default_language": "en",
                      "is_active": true,
                      "is_simple_questionnaire": true,
                      "graph": {
                        "start_node": "occupation",
                        "nodes": {
                          "occupation": {
                            "element_type": "SHORT_TEXT",
                            "is_required": true,
                            "title": {
                              "en": "What is your occupation?"
                            },
                            "next": "source_of_funds"
                          },
                          "source_of_funds": {
                            "element_type": "MULTIPLE_CHOICE",
                            "is_required": true,
                            "title": {
                              "en": "Source of funds"
                            },
                            "choices": [
                              {
                                "value": "employment",
                                "label": {
                                  "en": "Employment"
                                }
                              },
                              {
                                "value": "business",
                                "label": {
                                  "en": "Business"
                                }
                              }
                            ],
                            "next": null
                          }
                        }
                      },
                      "sections": [
                        {
                          "title": {},
                          "description": {},
                          "items": [
                            {
                              "uuid": "11111111-2222-3333-4444-666666666666",
                              "value": "occupation",
                              "element_type": "SHORT_TEXT",
                              "is_required": true,
                              "title": {
                                "en": "What is your occupation?"
                              }
                            }
                          ]
                        }
                      ],
                      "questionnaire_group_id": "11111111-2222-3333-4444-555555555555",
                      "version": 1,
                      "status": "published",
                      "published_at": "2026-04-23T10:00:00Z",
                      "is_editable": false
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد استبيان بهذا الـ `questionnaire_uuid` للتطبيق المُصادَق عليه. إما أن معرّف UUID غير صحيح أو أنه يتبع تطبيقاً آخر — لا تميز واجهة API عمداً بين الحالتين.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X GET 'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.questionnaires.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.questionnaires.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.questionnaires().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->questionnaires->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.questionnaires.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Questionnaires.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "patch": {
        "summary": "تحديث الاستبيان",
        "description": "تحديث استبيان. يعتمد تحديد الإصدارات على حقل `status` الذي ترسله والحالة الحالية للإصدار: (1) عدم وجود `status` لإصدار **منشور** ← يتم تحديث الإصدار المنشور في مكانه (نفس `questionnaire_id`، ونفس `version`)؛ (2) عدم وجود `status` لـ **مسودة** ← يتم تحديث المسودة ونشرها على الفور؛ (3) ‏`status: \"published\"` لإصدار **منشور** ← يتم إنشاء إصدار منشور جديد ضمن نفس `questionnaire_group_id` (معرّف `questionnaire_id` جديد، و`version` + 1) وإرجاعه، وتُحذف أي مسودة موجودة في المجموعة؛ (4) ‏`status: \"draft\"` يبقي المسودة كمسودة (حفظ تلقائي) ولكن يتم رفضه برمز 400 للإصدار المنشور (`\"Cannot revert a published version to draft.\"`).",
        "operationId": "update_questionnaire",
        "x-didit-sdk": {
          "resource": "questionnaires",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "questionnaire_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرف UUID لكل إصدار من الاستبيان المطلوب تحديثه."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimpleQuestionnaireUpdateRequest"
              },
              "examples": {
                "Rename": {
                  "summary": "إعادة تسمية استبيان",
                  "value": {
                    "title": "Updated Customer Onboarding"
                  }
                },
                "Replace questions": {
                  "summary": "استبدال قائمة الأسئلة الخطية الكاملة",
                  "value": {
                    "form_elements": [
                      {
                        "id": "occupation",
                        "element_type": "short_text",
                        "label": {
                          "en": "What is your occupation?"
                        },
                        "is_required": true
                      },
                      {
                        "id": "source_of_funds",
                        "element_type": "multiple_choice",
                        "label": {
                          "en": "Source of funds"
                        },
                        "options": [
                          {
                            "value": "employment",
                            "label": {
                              "en": "Employment"
                            }
                          },
                          {
                            "value": "business",
                            "label": {
                              "en": "Business"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث الاستبيان. يمثل محتوى الاستجابة أحدث حالة للإصدار الناتج — الإصدار المحدث في مكانه، أو الإصدار المنشور المنشأ حديثاً عند إرسالك `status: \"published\"` في صف منشور (في هذه الحالة يختلف `questionnaire_id` و`version` عما قمت بتعديله). يمثل `questionnaire_id` في الاستجابة معرّف UUID الخاص بالإصدار؛ استخدم `questionnaire_group_id` إذا كنت بحاجة إلى معرّف المجموعة الثابت.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق — قيمة `element_type` غير معروفة، أو ترجمة مفقودة، أو حقول تفريع/شرطية غير مدعومة، أو `languages` لا تتضمن `en`، أو `default_language` غير موجود في `languages`، أو خيار بدون تسمية، أو إرسال `graph` خام، أو `status: \"draft\"` لنسخة منشورة (`\"Cannot revert a published version to draft.\"`). نص الاستجابة عبارة عن خطأ في التحقق من DRF مفهرس بحسب اسم الحقل."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد استبيان بهذا `questionnaire_uuid` للتطبيق المُصادَق عليه."
          },
          "415": {
            "description": "نوع وسائط غير مدعوم. عيّن `Content-Type: application/json`."
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\": \"Updated Customer Onboarding\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.questionnaires.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    title=\"Updated Customer Onboarding\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.questionnaires.update(\"11111111-2222-3333-4444-555555555555\", {\n  title: \"Updated Customer Onboarding\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SimpleQuestionnaireUpdateRequest{\n\tTitle: didit.String(\"Updated Customer Onboarding\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SimpleQuestionnaireUpdateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.questionnaires().update(\"11111111-2222-3333-4444-555555555555\", SimpleQuestionnaireUpdateRequest.builder()\n        .title(\"Updated Customer Onboarding\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->questionnaires->update('11111111-2222-3333-4444-555555555555', [\n    'title' => 'Updated Customer Onboarding',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.questionnaires.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  title: \"Updated Customer Onboarding\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Questionnaires.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new SimpleQuestionnaireUpdateRequest\n{\n    Title = \"Updated Customer Onboarding\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "summary": "حذف الاستبيان",
        "description": "حذف إصدار استبيان واحد نهائياً (لا يمكن التراجع عنه). تُحذف ردود الاستبيان المخزنة المرتبطة بهذا الإصدار معه، وتفقد الجلسات التي تشير إليه الرابط؛ ولا تُحذف الإصدارات الأخرى في المجموعة نفسها. تستمر مسارات سير العمل التي أشارت إليه في العمل، ولكن خطوة الاستبيان لا تعود قادرة على تحميله.",
        "operationId": "delete_questionnaire",
        "x-didit-sdk": {
          "resource": "questionnaires",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "questionnaire_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرف UUID لكل إصدار من الاستبيان المطلوب حذفه."
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف الاستبيان. نص الاستجابة فارغ."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد استبيان بهذا `questionnaire_uuid` للتطبيق المُصادَق عليه.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          },
          "500": {
            "description": "خطأ غير متوقع في الخادم. يمكن إعادة المحاولة بأمان."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.questionnaires.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.questionnaires.delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Questionnaires.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.questionnaires().delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->questionnaires->delete('11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.questionnaires.delete(\"11111111-2222-3333-4444-555555555555\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Questionnaires.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");"
          }
        ]
      }
    },
    "/v3/users/": {
      "get": {
        "summary": "عرض قائمة بالمستخدمين",
        "description": "سرد [المستخدمين](/entities/users) الذين يجمعهم Didit من جلسات KYC التي تشترك في نفس `vendor_data` (سلسلة نصية حرة، وليست معرّف UUID)، بالإضافة إلى المستخدمين الذين تم إنشاؤهم عبر API. القائمة مقسمة لصفحات، ومرتبة حسب `last_session_at` تنازلياً. لا يدعم هذا الـ endpoint معاملات التصفية أو البحث — يمكنك جلب الصفحات وإجراء التصفية من جانب العميل.",
        "operationId": "list_users",
        "x-didit-sdk": {
          "resource": "users",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "description": "حجم الصفحة. القيمة الافتراضية 50 عند إغفاله. لا يوجد حد أقصى مفروض، ولكن حافظ على صغر حجم الصفحات لتقليل زمن الاستجابة."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "description": "إزاحة تستند إلى الصفر للسجل الأول المراد إرجاعه. يُفضل اتباع رابط `next` من الصفحة السابقة بدلاً من حساب ذلك يدوياً."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/users/?limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.users.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.users.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Users.ListAutoPaging(ctx, didit.UsersListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.users().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->users->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.users.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Users.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "قائمة مقسمة إلى صفحات بالمستخدمين مع حالة التحقق وعدد الجلسات وتفصيل الميزات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد الصفوف المتطابقة — دقيق حتى 100، ويقتصر على 100 كحد أقصى بعد ذلك لتحسين الأداء. لا تستخدمه لاكتشاف الصفحة الأخيرة؛ اعتمد بدلاً من ذلك على كون `next` بقيمة `null`."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserListItem"
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "didit_internal_id": "f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418",
                          "vendor_data": "user-abc-123",
                          "display_name": null,
                          "full_name": "John Michael Doe",
                          "date_of_birth": "1990-05-15",
                          "effective_name": "John Michael Doe",
                          "status": "ACTIVE",
                          "portrait_image_url": "https://<media-host>/...",
                          "session_count": 3,
                          "approved_count": 2,
                          "declined_count": 0,
                          "in_review_count": 1,
                          "issuing_states": [
                            "USA"
                          ],
                          "approved_emails": [
                            "john@example.com"
                          ],
                          "approved_phones": [
                            "+14155551234"
                          ],
                          "features": {
                            "ID_VERIFICATION": "Approved",
                            "LIVENESS": "Approved",
                            "FACE_MATCH": "Approved",
                            "AML": "Approved"
                          },
                          "features_list": [
                            {
                              "feature": "ID_VERIFICATION",
                              "status": "Approved"
                            },
                            {
                              "feature": "LIVENESS",
                              "status": "Approved"
                            },
                            {
                              "feature": "FACE_MATCH",
                              "status": "Approved"
                            },
                            {
                              "feature": "AML",
                              "status": "Approved"
                            }
                          ],
                          "last_session_at": "2025-06-15T10:30:00Z",
                          "last_activity_at": "2025-06-15T10:30:00Z",
                          "first_session_at": "2025-06-01T08:00:00Z",
                          "tags": [
                            {
                              "uuid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                              "name": "VIP",
                              "color": "#2567FF"
                            }
                          ],
                          "created_at": "2025-06-01T08:00:00Z"
                        },
                        {
                          "didit_internal_id": "6ed99d53-e8f5-4cf8-9ac1-4a506cb40f6b",
                          "vendor_data": null,
                          "display_name": "Jane S.",
                          "full_name": "Jane Elizabeth Smith",
                          "date_of_birth": "1985-11-22",
                          "effective_name": "Jane S.",
                          "status": "FLAGGED",
                          "portrait_image_url": null,
                          "session_count": 1,
                          "approved_count": 0,
                          "declined_count": 0,
                          "in_review_count": 1,
                          "issuing_states": [],
                          "approved_emails": [],
                          "approved_phones": [],
                          "features": {
                            "ID_VERIFICATION": "In Review"
                          },
                          "features_list": [
                            {
                              "feature": "ID_VERIFICATION",
                              "status": "In Review"
                            }
                          ],
                          "last_session_at": "2025-06-20T14:00:00Z",
                          "last_activity_at": "2025-06-20T14:05:00Z",
                          "first_session_at": "2025-06-20T14:00:00Z",
                          "tags": [],
                          "created_at": "2025-06-20T14:00:00Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "لم يتم توفير بيانات اعتماد. الطلبات المرسلة إلى مسارات `/v3/users/*` بدون رأس `x-api-key` (أو رمز `Authorization: Bearer`) يتم رفضها بواسطة برمجية المصادقة الوسيطة قبل وصولها إلى الـ API.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing credentials": {
                    "value": {
                      "detail": "You must be authenticated with a valid access token to access this endpoint."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "لا يمكن للمفتاح سرد المستخدمين لهذا التطبيق. يؤدي غياب المفتاح إلى إرجاع `403`؛ بينما يُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/users/{vendor_data}/": {
      "get": {
        "summary": "الحصول على المستخدم",
        "description": "جلب [مستخدم](/entities/users) واحد حسب `vendor_data` (تطابق تام). يضيف `metadata` و`comments` و`updated_at` إلى عرض القائمة، ويحوّل `tags` إلى شكل ارتباط العلامات التفصيلي.",
        "operationId": "get_user",
        "x-didit-sdk": {
          "resource": "users",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "vendor_data",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "معرّفك الفريد للمستخدم — سلسلة نصية حرة (وليس UUID). هذه هي نفس القيمة التي مررتها كـ `vendor_data` عند إنشاء الجلسة التي عرّفت هذا المستخدم للمرة الأولى، وتتم مطابقتها تماماً كما أُرسلت.",
            "example": "user-abc-123"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/users/user-abc-123/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.retrieve(\n    \"user-abc-123\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.retrieve(\"user-abc-123\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.Retrieve(ctx, \"user-abc-123\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().retrieve(\"user-abc-123\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->users->retrieve('user-abc-123');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.retrieve(\"user-abc-123\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.RetrieveAsync(\"user-abc-123\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل المستخدم الكاملة بما في ذلك البيانات الوصفية، والتعليقات/سجل النشاط، وبيانات الجلسة المجمعة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDetailItem"
                },
                "examples": {
                  "Active user": {
                    "value": {
                      "didit_internal_id": "f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418",
                      "vendor_data": "user-abc-123",
                      "display_name": null,
                      "full_name": "John Michael Doe",
                      "date_of_birth": "1990-05-15",
                      "effective_name": "John Michael Doe",
                      "status": "ACTIVE",
                      "metadata": {
                        "tier": "premium",
                        "source": "website"
                      },
                      "portrait_image_url": "https://<media-host>/...",
                      "session_count": 3,
                      "approved_count": 2,
                      "declined_count": 0,
                      "in_review_count": 1,
                      "issuing_states": [
                        "USA"
                      ],
                      "approved_emails": [
                        "john@example.com"
                      ],
                      "approved_phones": [
                        "+14155551234"
                      ],
                      "features": {
                        "ID_VERIFICATION": "Approved",
                        "LIVENESS": "Approved",
                        "FACE_MATCH": "Approved",
                        "AML": "Approved"
                      },
                      "features_list": [
                        {
                          "feature": "ID_VERIFICATION",
                          "status": "Approved"
                        },
                        {
                          "feature": "LIVENESS",
                          "status": "Approved"
                        },
                        {
                          "feature": "FACE_MATCH",
                          "status": "Approved"
                        },
                        {
                          "feature": "AML",
                          "status": "Approved"
                        }
                      ],
                      "last_session_at": "2025-06-15T10:30:00Z",
                      "last_activity_at": "2025-06-15T10:30:00Z",
                      "first_session_at": "2025-06-01T08:00:00Z",
                      "tags": [
                        {
                          "uuid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                          "tag": {
                            "uuid": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
                            "name": "VIP",
                            "color": "#2567FF",
                            "description": null,
                            "source": "custom",
                            "created_at": "2025-05-01T09:00:00Z",
                            "updated_at": "2025-05-01T09:00:00Z"
                          },
                          "added_by_email": "analyst@acme.com",
                          "added_by_name": "Jane Analyst",
                          "created_at": "2025-06-02T11:00:00Z"
                        }
                      ],
                      "comments": [
                        {
                          "uuid": "c1111111-2222-4333-8444-555555555555",
                          "comment_type": "STATUS_CHANGED",
                          "comment": null,
                          "actor_email": "analyst@acme.com",
                          "actor_name": "Jane Analyst",
                          "previous_status": "FLAGGED",
                          "new_status": "ACTIVE",
                          "previous_value": null,
                          "new_value": null,
                          "changed_fields": [],
                          "metadata": null,
                          "mentioned_emails": [],
                          "created_at": "2025-06-01T10:30:00Z"
                        }
                      ],
                      "created_at": "2025-06-01T08:00:00Z",
                      "updated_at": "2025-06-15T10:30:00Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "لم يتم توفير بيانات اعتماد. الطلبات المرسلة إلى مسارات `/v3/users/*` بدون رأس `x-api-key` (أو رمز `Authorization: Bearer`) يتم رفضها بواسطة برمجية المصادقة الوسيطة قبل وصولها إلى الـ API.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing credentials": {
                    "value": {
                      "detail": "You must be authenticated with a valid access token to access this endpoint."
                    }
                  }
                }
              }
            }
          },
          "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": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث المستخدم",
        "description": "تحديث جزئي لمستخدم: `display_name`، `full_name`، `date_of_birth`، `status`، `metadata`، `approved_emails`/`approved_phones`/`issuing_states`. يتم استبدال `metadata` بالكامل. يعمل تغيير `status` هنا تماماً مثل [تحديث حالة المستخدم](#patch-/v3/users/-vendor_data-/update-status/): حيث يسجل نشاط `STATUS_CHANGED` مع `reason` الاختياري، ويؤدي تعيين `BLOCKED` إلى إضافة `vendor_data` إلى قائمة الحظر الخاصة بالنظام (تؤدي إزالته من حالة `BLOCKED` إلى إزالة ذلك الإدخال). تُسجل التغييرات في `display_name` أو `full_name` أو `date_of_birth` أو `metadata` كنشاط `PROFILE_UPDATED`.",
        "operationId": "update_user",
        "x-didit-sdk": {
          "resource": "users",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "vendor_data",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "معرّفك الفريد للمستخدم (سلسلة نصية حرة، وليس UUID).",
            "example": "user-abc-123"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/users/user-abc-123/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"display_name\": \"Jane S.\", \"status\": \"FLAGGED\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.update(\n    \"user-abc-123\",\n    display_name=\"Jane S.\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.update(\"user-abc-123\", {\n  display_name: \"Jane S.\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.Update(ctx, \"user-abc-123\", didit.UsersUpdateParams{\n\tDisplayName: didit.String(\"Jane S.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.UsersUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().update(\"user-abc-123\", UsersUpdateParams.builder()\n        .displayName(\"Jane S.\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->users->update('user-abc-123', [\n    'display_name' => 'Jane S.',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.update(\n  \"user-abc-123\",\n  display_name: \"Jane S.\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.UpdateAsync(\"user-abc-123\", new UsersUpdateParams\n{\n    DisplayName = \"Jane S.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تحديث المستخدم. يتم إرجاع سجل المستخدم المحدث بالكامل (بنفس شكل Get User).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDetailItem"
                },
                "examples": {
                  "Updated": {
                    "value": {
                      "didit_internal_id": "f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418",
                      "vendor_data": "user-abc-123",
                      "display_name": "Jane S.",
                      "full_name": "Jane Elizabeth Smith",
                      "date_of_birth": "1985-11-22",
                      "effective_name": "Jane S.",
                      "status": "FLAGGED",
                      "metadata": {
                        "tier": "premium"
                      },
                      "portrait_image_url": "https://<media-host>/...",
                      "session_count": 3,
                      "approved_count": 2,
                      "declined_count": 0,
                      "in_review_count": 1,
                      "issuing_states": [
                        "USA"
                      ],
                      "approved_emails": [
                        "john@example.com"
                      ],
                      "approved_phones": [
                        "+14155551234"
                      ],
                      "features": {
                        "ID_VERIFICATION": "Approved",
                        "LIVENESS": "Approved",
                        "FACE_MATCH": "Approved",
                        "AML": "Approved"
                      },
                      "features_list": [
                        {
                          "feature": "ID_VERIFICATION",
                          "status": "Approved"
                        },
                        {
                          "feature": "LIVENESS",
                          "status": "Approved"
                        },
                        {
                          "feature": "FACE_MATCH",
                          "status": "Approved"
                        },
                        {
                          "feature": "AML",
                          "status": "Approved"
                        }
                      ],
                      "last_session_at": "2025-06-15T10:30:00Z",
                      "last_activity_at": "2025-06-15T10:30:00Z",
                      "first_session_at": "2025-06-01T08:00:00Z",
                      "tags": [
                        {
                          "uuid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                          "tag": {
                            "uuid": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
                            "name": "VIP",
                            "color": "#2567FF",
                            "description": null,
                            "source": "custom",
                            "created_at": "2025-05-01T09:00:00Z",
                            "updated_at": "2025-05-01T09:00:00Z"
                          },
                          "added_by_email": "analyst@acme.com",
                          "added_by_name": "Jane Analyst",
                          "created_at": "2025-06-02T11:00:00Z"
                        }
                      ],
                      "comments": [],
                      "created_at": "2025-06-01T08:00:00Z",
                      "updated_at": "2025-06-15T10:30:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح — عادةً ما يكون `status` غير معروفة أو `date_of_birth` ليس بتنسيق `YYYY-MM-DD`.",
            "content": {
              "application/json": {
                "examples": {
                  "Bad status": {
                    "value": {
                      "status": [
                        "\"INVALID\" is not a valid choice."
                      ]
                    }
                  },
                  "Bad date_of_birth": {
                    "value": {
                      "date_of_birth": [
                        "Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
                      ]
                    }
                  },
                  "Reason too long": {
                    "value": {
                      "reason": [
                        "Ensure this field has no more than 1000 characters."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "لم يتم توفير بيانات اعتماد. الطلبات المرسلة إلى مسارات `/v3/users/*` بدون رأس `x-api-key` (أو رمز `Authorization: Bearer`) يتم رفضها بواسطة برمجية المصادقة الوسيطة قبل وصولها إلى الـ API.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing credentials": {
                    "value": {
                      "detail": "You must be authenticated with a valid access token to access this endpoint."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "لا يمكن للمفتاح تحديث المستخدمين لهذا التطبيق. يؤدي غياب المفتاح إلى إرجاع `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": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "full_name": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 512,
                    "description": "الاسم الكامل للمستخدم"
                  },
                  "display_name": {
                    "type": "string",
                    "nullable": true,
                    "description": "اسم عرض مخصص لهذا المستخدم"
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date",
                    "nullable": true,
                    "description": "تاريخ الميلاد بصيغة YYYY-MM-DD"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "FLAGGED",
                      "BLOCKED"
                    ],
                    "description": "حالة دورة حياة المستخدم. يتم تسجيل التغيير كنشاط `STATUS_CHANGED`، وتؤدي القيمة `BLOCKED` إلى إضافة `vendor_data` إلى قائمة الحظر في النظام (والانتقال من `BLOCKED` يزيل هذا الإدخال)."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON عشوائي ترفقه بالمستخدم. **يستبدل بالكامل** البيانات الوصفية الحالية عند التحديث — قم بالدمج من جانب العميل إذا كنت تريد إضافة مفاتيح فقط."
                  },
                  "approved_emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "عناوين البريد الإلكتروني التي تم التحقق منها لهذا المستخدم، على سبيل المثال `[\"john@example.com\"]`. تستبدل القائمة المخزنة بالكامل."
                  },
                  "approved_phones": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "أرقام الهواتف التي تم التحقق منها لهذا المستخدم. تستبدل القائمة المخزنة بالكامل."
                  },
                  "issuing_states": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "دول الإصدار (ISO 3166-1 alpha-3)، على سبيل المثال `[\"USA\"]`. تستبدل القائمة المخزنة بالكامل."
                  },
                  "reason": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000,
                    "description": "سبب تغيير الحالة. يُسجّل في قيد تغيير الحالة ضمن سجل نشاط المستخدم (`comments[].comment`، و**Activity** في Business Console)، فقط عندما تتغير الحالة فعلياً. لا تتضمنه أحداث webhook."
                  }
                }
              },
              "examples": {
                "Rename": {
                  "summary": "عيّن اسم العرض",
                  "value": {
                    "display_name": "Jane S."
                  }
                },
                "Override status": {
                  "summary": "وضع علامة على المستخدم للمراجعة",
                  "value": {
                    "status": "FLAGGED"
                  }
                },
                "Add metadata": {
                  "summary": "استبدال كائن JSON للبيانات الوصفية",
                  "value": {
                    "metadata": {
                      "tier": "premium",
                      "risk_level": "low"
                    }
                  }
                },
                "Fix extracted DOB": {
                  "summary": "حقول الملف الشخصي الصحيحة المستخرجة",
                  "value": {
                    "full_name": "Jane Elizabeth Smith",
                    "date_of_birth": "1985-11-22"
                  }
                },
                "Flag with reason": {
                  "summary": "وضع علامة على المستخدم وتسجيل السبب",
                  "value": {
                    "status": "FLAGGED",
                    "reason": "Address does not match the billing country"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/users/{vendor_data}/generate-pdf/": {
      "get": {
        "summary": "تنزيل تقرير PDF لسجل المستخدم الكامل",
        "description": "توليد وتنزيل ملف PDF واحد جاهز للامتثال يحتوي على سجل التحقق الكامل للمستخدم المحدد بواسطة `vendor_data`. وهو نفس المستند الذي تُنشئه Console من **User detail → Actions → Download PDF**، وبذلك لم تعد عمليات تصدير الامتثال الدورية تتطلب نقر شخص في Console.\n\n**محتويات التقرير.** صفحة غلاف تتضمن ملخص الملف التعريفي (الاسم، وتاريخ الميلاد، والدول المصدرة، وعناوين البريد الإلكتروني وأرقام الهواتف المقبولة)، وأحدث حالة لكل ميزة، وعدادات الجلسات وفهرسًا للجلسات المضمنة — متبوعة بالتقرير القياسي لكل جلسة مضمنة، بترتيب زمني (الأقدم أولاً). يمثل كل تقرير جلسة نفس المستند الذي يُرجعه `GET /v3/session/{sessionId}/generate-pdf/` لتلك الجلسة.\n\n**الجلسات المؤهلة.** يتم تضمين جلسات التحقق من المستخدمين (KYC) التي تكون في حالة `Approved` أو `Declined` أو `In Review` أو `Kyc Expired` فقط؛ ويتم تخطي الجلسات في أي حالة أخرى. إذا لم يكن لدى المستخدم أي جلسة في إحدى هذه الحالات، يُرجع الـ endpoint الرمز `403` — راجع أدناه.\n\n**الحد الأقصى.** يقتصر التقرير على **أحدث 20** جلسة مؤهلة للتقرير. وعندما يكون لدى المستخدم أكثر من ذلك، يتم تضمين أحدث 20 جلسة وتوضح صفحة الغلاف عدد الجلسات الأقدم التي تم استبعادها. استخدم `GET /v3/sessions/?vendor_data=…` للحصول على القائمة الكاملة بتنسيق JSON.\n\n**العلامة التجارية.** إذا كان تطبيقك يتضمن تخصيص العلامة البيضاء، فسيتم إنشاء الغلاف وتقرير كل جلسة بشعارك ورابط سياسة الخصوصية الخاصة بك؛ وإلا فإنها ستحمل العلامة التجارية لـ Didit. يتم إنشاء التقارير باللغة الإنجليزية — ولا يوجد معامل للغة.\n\n**عدم التخزين المؤقت.** يُعيد كل استدعاء توليد ملف PDF استنادًا إلى البيانات الحالية، لذلك يعكس التقرير الذي تم إنشاؤه بعد مراجعة يدوية قرار المراجِع. يمكن أن ينتج عن استدعاءين لنفس المستخدم ملفان يختلفان في البايتات — احفظ الملف الذي تم تنزيله في الأرشيف إذا كنت بحاجة إلى نسخة غير قابلة للتغيير.\n\n**زمن الاستجابة.** عملية التوليد متزامنة وتقوم بتنزيل كل صورة مخزنة لكل جلسة مضمنة، لذا قد يستغرق الأمر عشرات الثواني للمستخدم الذي لديه العديد من الجلسات الكثيفة بالوسائط. استخدم مهلة قراءة سخية للعميل (يُوصى بـ 120 ثانية) وقم بتدفق المحتوى مباشرة إلى القرص. يتوقف التوليد عند حد زمني محدد من جانب الخادم بدلاً من الاستمرار حتى تنتهي مهلة العميل: وإذا تم الوصول إلى هذا الحد، تظل الاستجابة ملف PDF صالحًا يحتوي على أحدث الجلسات، وتوضح صفحة الغلاف عدد الجلسات التي تم إغفالها.\n\n**النطاق.** يتم تحديد المستخدم داخل التطبيق الذي يمتلك مفتاح API. لا يمكن لمفتاح تصدير مستخدم لتطبيق آخر على الإطلاق — فمثل هذا المستخدم غير موجود بالنسبة له ويُرجع الـ endpoint الرمز `404`.\n\n**الشرطة المائلة اللاحقة.** ينتهي المسار القياسي بشرطة مائلة لاحقة (`…/generate-pdf/`). وتتم معالجة الطلب الذي لا يحتوي عليها مباشرة بنفس الاستجابة — ولا توجد إعادة توجيه `301`، لذلك لا يحتاج أي عميل إلى تتبع عمليات إعادة التوجيه ولا يحتاج `curl` إلى الخيار `-L`. استخدم عنوان URL الذي يحتوي على الشرطة المائلة كما هو موضح في الأمثلة.",
        "operationId": "get_user_generate_pdf",
        "x-didit-sdk": {
          "resource": "users",
          "method": "generate_pdf",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "vendor_data",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "معرّفك الفريد للمستخدم — سلسلة نصية حرة (وليست UUID). هذه هي نفس القيمة التي مررتها كـ `vendor_data` عند إنشاء جلسات المستخدم، وتتم مطابقتها تماماً كما أُرسلت. قم بترميزها وفق ترميز URL؛ فالقيمة التي تحتوي على `/` لا يمكن الوصول إليها عبر هذا المسار.",
            "example": "user-abc-123"
          }
        ],
        "responses": {
          "200": {
            "description": "مستند PDF المُصيَّر، يتم إرجاعه مباشرة كملف ثنائي `application/pdf` — لا يوجد غلاف JSON ولا إعادة توجيه عبر رابط تنزيل. يبدأ جسم الاستجابة ببايتات `%PDF` السحرية. احفظه في ملف بصيغة `.pdf` أو مرره مباشرة كبث إلى المتصل بك.",
            "headers": {
              "Content-Disposition": {
                "description": "`attachment; filename=user_{didit_internal_id}.pdf` — تمت تسمية الملف وفقًا لمعرّف Didit الثابت للمستخدم (`didit_internal_id` في `GET /v3/users/{vendor_data}/`)، وليس وفقًا لـ `vendor_data`.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=user_f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418.pdf"
                }
              },
              "Content-Length": {
                "description": "الحجم الإجمالي لملف PDF بالبايت؛ لا يتم تقسيم المحتوى إلى أجزاء.",
                "schema": {
                  "type": "integer",
                  "example": 148213
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "لم يتم توفير بيانات اعتماد. الطلبات المرسلة إلى مسارات `/v3/users/*` بدون رأس `x-api-key` (أو رمز `Authorization: Bearer`) يتم رفضها بواسطة برمجية المصادقة الوسيطة قبل وصولها إلى الـ API.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing credentials": {
                    "value": {
                      "detail": "You must be authenticated with a valid access token to access this endpoint."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في التفويض أو الأهلية. يمكنك التمييز بينهما من خلال نص `detail`:\n\n- `\"You do not have permission to perform this action.\"` — مفتاح API غير صالح أو ملغى، أو أن الطلب يحمل token مستخدم لوحة التحكم بدلاً من مفتاح API للتطبيق.\n- `\"This user has no sessions in review, declined, approved or kyc expired to report.\"` — المستخدم موجود في تطبيقك ولكن لا توجد أي من جلساته في حالة يمكن إعداد تقرير عنها بعد (على سبيل المثال، لا تزال كل جلسة في حالة `In Progress`، أو تم إنشاء المستخدم عبر `POST /v3/users/create/` ولم يقم بالتحقق مطلقاً). انتظر حدث webhook من نوع `status.updated` قبل طلب التقرير.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "This user has no sessions in review, declined, approved or kyc expired to report."
                    }
                  }
                },
                "examples": {
                  "Invalid credentials": {
                    "summary": "مفتاح API ملغى أو غير صالح، أو token لمستخدم Console",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "No reportable sessions": {
                    "summary": "المستخدم موجود ولكن ليس لديه جلسة مقبولة (Approved) / مرفوضة (Declined) / قيد المراجعة (In Review) / منتهية الصلاحية لـ KYC (Kyc Expired)",
                    "value": {
                      "detail": "This user has no sessions in review, declined, approved or kyc expired to report."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد مستخدم بقيمة `vendor_data` المقدمة في التطبيق المرتبط بمفتاح API. مستخدمو التطبيقات الأخرى غير مرئيين لهذا المفتاح ويُرجعون الرمز `404` نفسه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "User not found."
                    }
                  }
                },
                "examples": {
                  "Unknown user": {
                    "summary": "vendor_data لا يطابق أي مستخدم لهذا التطبيق",
                    "value": {
                      "detail": "User not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. يمتلك إنشاء ملفات PDF حداً مخصصاً قدره **50 طلباً في الدقيقة لكل بيانات اعتماد** (مفتاح API أو Bearer token أو عنوان IP المصدر في حال عدم المصادقة)، مشتركاً بين هذا الـ endpoint و`GET /v3/session/{sessionId}/generate-pdf/`، بالإضافة إلى حد GET العام البالغ 600/دقيقة. انتظر عدد الثواني المحدد في `Retry-After` (الموضح أيضاً في رؤوس `X-RateLimit-*`)، ثم أعد المحاولة. لا يتم تخزين التقارير مؤقتاً على جانب الخادم، لذا قم بتنزيل كل تقرير مرة واحدة واحفظ الملف بدلاً من إعادة جلبه.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني التي يجب انتظارها قبل إعادة محاولة إرسال الطلب.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الحد الأقصى لعدد عمليات إنشاء PDF المسموح بها في النافذة الحالية (50).",
                "schema": {
                  "type": "integer",
                  "example": 50
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "طابع Unix الزمني (بالثواني) الذي تتم عنده إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1750000000
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "تفسير سهل القراءة لتجاوز حد المعدل.",
                      "example": "Session PDF generation rate limit exceeded. You can make up to 50 requests per minute."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "summary": "أكثر من 50 عملية إنشاء لملفات PDF في دقيقة واحدة من نفس بيانات الاعتماد",
                    "value": {
                      "detail": "Session PDF generation rate limit exceeded. You can make up to 50 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --fail \\\n  'https://verification.didit.me/v3/users/user-abc-123/generate-pdf/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  --output user-history.pdf"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.users.generate_pdf(\n    \"user-abc-123\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.users.generatePdf(\"user-abc-123\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Users.GeneratePDF(ctx, \"user-abc-123\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.users().generatePdf(\"user-abc-123\")\n        .writeTo(Path.of(\"download.pdf\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->users->generatePdf('user-abc-123');\n$content->saveTo('download.pdf');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.users.generate_pdf(\"user-abc-123\")\nFile.binwrite(\"download.pdf\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Users.GeneratePdfAsync(\"user-abc-123\");\nawait content.SaveToAsync(\"download.pdf\");"
          }
        ]
      }
    },
    "/v3/users/delete/": {
      "post": {
        "summary": "حذف المستخدمين دفعة واحدة",
        "description": "**حذف المستخدمين نهائياً**: تتم إزالة سجلات المستخدمين نهائياً. للحظر اليومي المعتاد، يُفضّل استخدام [تحديث حالة المستخدم](#patch-/v3/users/-vendor_data-/update-status/) مع `BLOCKED`. حدد المستخدمين باستخدام `vendor_data_list`، أو `didit_internal_id_list`، أو كليهما معاً؛ أو مرّر `delete_all: true`. لا يضيق هذا الـ endpoint أبداً نطاق `delete_all` باستخدام الفلاتر. يتم رفض فلاتر الأشخاص في Console مع رمز الحالة `400` (راجع الاستجابة `400`)، بحيث لا يتحول القصد المحدود إلى مسح كامل. استثناءان: لا يتم رفض `filter_has_approved_sessions` و`filter_has_declined_sessions` ولا يتم تطبيقهما، لذا مع `delete_all: true` سيظلان يحذفان كل مستخدم؛ لا تقم بإرسالهما.\n\n**القوالب البيومترية:** ما لم تقم بتعيين `retain_face_embeddings` إلى `true`، فسيتم مسح كل قالب بيومتري خالٍ من الصور تم الاحتفاظ به لهؤلاء المستخدمين بعد حذف الجلسة (راجع `/v3/biometric-templates/`) قبل حذف المستخدم، وبذلك يتوقف الشخص عن المطابقة في كشف التكرار والبحث بالوجه (Face Search). مع تعيين `retain_face_embeddings: true` و`face_retention_days`، فإنك تختار الاحتفاظ بقالب بيومتري واحد خالٍ من الصور لكل شخص لذلك العدد من الأيام، ولن يتم الاحتفاظ بأي شيء آخر عن الشخص. إذا تعذر مسح قالب بسبب عدم توفر مخزن بيومتري، يُرجع الاستدعاء `503`، ولا يُحذف أي مستخدم في الطلب، وتؤدي إعادة إرسال الطلب إلى إتمام المهمة.\n\n**التقارير التنظيمية المُقدَّمة:** إذا كانت البيانات المحددة واردة في تقرير تنظيمي نهائي، فسيتم رفض الطلب بأكمله مع رمز الحالة `409` ولن يُحذف أي شيء. يستخدم نص الاستجابة `code: in_filed_report` ويحدد كل تقرير باستخدام `uuid` و`report_number` و`report_type` و`case_uuid`. احذف التقارير، ثم أعد إرسال الطلب.",
        "operationId": "batch_delete_users",
        "x-didit-sdk": {
          "resource": "users",
          "method": "batch_delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "قدّم `vendor_data_list`، أو `didit_internal_id_list`، أو `delete_all: true`. يمكن الجمع بين القائمتين وتطبيق معامل الربط OR بينهما. عندما تكون قيمة `delete_all` هي `true`، فإن لها الأسبقية ويتم تجاهل كلتا القائمتين.",
                "properties": {
                  "vendor_data_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "المعرّفات الخاصة بك المراد حذفها، وتتم مطابقتها تماماً كما أُرسلت."
                  },
                  "didit_internal_id_list": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "معرّفات المستخدم الداخلية لـ Didit المطلوب حذفها - وهو `didit_internal_id` الذي تُرجعه endpoints الخاصة بالإنشاء والجلب."
                  },
                  "delete_all": {
                    "type": "boolean",
                    "default": false,
                    "description": "إذا كانت القيمة `true`، فسيتم حذف كل مستخدم في التطبيق."
                  },
                  "retain_face_embeddings": {
                    "type": "boolean",
                    "default": false,
                    "description": "اختيارك الصريح للاحتفاظ بقالب بيومتري واحد خالٍ من الصور لكل شخص تم حذفه للكشف عن التكرار، لمدة `face_retention_days`. يتم حذف كل شيء آخر متعلق بالشخص. أغفله، أو أرسل `false`، لحذف القوالب مع المستخدمين. عندما يكون `true`، يكون `face_retention_days` مطلوباً."
                  },
                  "face_retention_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "عدد الأيام التي يتم فيها الاحتفاظ بالقالب البيومتري الخالي من الصور عندما يكون `retain_face_embeddings` مضبوطاً على `true`. مطلوب معه، ويُرفض بدونه بخطأ `400` في `face_retention_days`.",
                    "example": 365
                  }
                }
              },
              "examples": {
                "Specific users": {
                  "summary": "حذف المستخدمين بواسطة vendor_data",
                  "value": {
                    "vendor_data_list": [
                      "user-123",
                      "user-456"
                    ]
                  }
                },
                "By Didit internal ID": {
                  "summary": "حذف المستخدمين بواسطة didit_internal_id",
                  "value": {
                    "didit_internal_id_list": [
                      "3f1c0d3e-8f0a-4c2e-9a3d-9b1f5f4a2c11"
                    ]
                  }
                },
                "All users": {
                  "summary": "مسح كل المستخدمين في هذا التطبيق",
                  "value": {
                    "delete_all": true
                  }
                },
                "Keep face templates": {
                  "summary": "حذف المستخدمين والاحتفاظ بقوالب الوجه مجهولة الهوية لمدة 365 يوماً",
                  "value": {
                    "vendor_data_list": [
                      "user-123"
                    ],
                    "retain_face_embeddings": true,
                    "face_retention_days": 365
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/users/delete/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendor_data_list\": [\"user-123\", \"user-456\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.batch_delete(\n    vendor_data_list=[\"user-123\", \"user-456\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.batchDelete({\n  vendor_data_list: [\"user-123\", \"user-456\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.BatchDelete(ctx, didit.UsersBatchDeleteParams{\n\tVendorDataList: didit.Some([]string{\"user-123\", \"user-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.UsersBatchDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().batchDelete(UsersBatchDeleteParams.builder()\n        .vendorDataList(List.of(\"user-123\", \"user-456\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->users->batchDelete([\n    'vendor_data_list' => ['user-123', 'user-456'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.batch_delete(vendor_data_list: [\"user-123\", \"user-456\"])\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.BatchDeleteAsync(new UsersBatchDeleteParams\n{\n    VendorDataList = new string[] { \"user-123\", \"user-456\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم حذف المستخدمين. يرجع عدد المستخدمين الذين تم حذفهم بالفعل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "integer",
                      "description": "عدد المستخدمين المحذوفين (يستثني قيم vendor_data التي لم تطابق أي شيء)."
                    }
                  }
                },
                "examples": {
                  "Deleted some": {
                    "value": {
                      "deleted": 2
                    }
                  },
                  "Nothing matched": {
                    "value": {
                      "deleted": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق؛ لم يتم حذف أي شيء. تُفهرس الأخطاء حسب اسم الحقل. في حال عدم وجود محدد (لا توجد أي من القائمتين وقيمة `delete_all` ليست `true`)، يكون نص الاستجابة هو `{\"vendor_data_list\": [\"This field is required unless delete_all is true.\"]}`؛ وتُرفض القائمة الفارغة تحت مفتاحها الخاص مع `\"This list may not be empty.\"`. ويُرفض أي عامل تصفية مخصص لـ Console فقط (`filter_search`، أو `filter_status`، أو `filter_country`، أو `filter_date_from`، أو `filter_date_to`، أو `filter_tag`، أو `filter_latest_verification_status`، أو `filter_risk`، أو `filter_has_sessions`، أو `filter_has_open_alerts`، أو `filter_aml_monitoring`، أو `filter_can_sign_in`، أو `filter_auth_status`، أو `filter_auth_method`، أو `filter_auth_mfa_enabled`) عندما يحمل قيمة، حتى لو كانت `false`، مع كائن مفهرس بكل حقل من هذا القبيل. ويُرفض أي مفتاح `filter_*` آخر غير معروف مع `\"Unknown filter.\"`.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing selector": {
                    "summary": "لم يتم تقديم list ولا delete_all",
                    "value": {
                      "vendor_data_list": [
                        "This field is required unless delete_all is true."
                      ]
                    }
                  },
                  "Console-only filter": {
                    "value": {
                      "filter_has_sessions": "This filter is Console-only and is not supported by this endpoint."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "لم يتم توفير بيانات اعتماد. الطلبات المرسلة إلى مسارات `/v3/users/*` بدون رأس `x-api-key` (أو رمز `Authorization: Bearer`) يتم رفضها بواسطة برمجية المصادقة الوسيطة قبل وصولها إلى الـ API.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing credentials": {
                    "value": {
                      "detail": "You must be authenticated with a valid access token to access this endpoint."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API غير صالح أو تم إلغاؤه، أو أن المفتاح لا يملك صلاحية حذف مستخدمين لهذا التطبيق. يُرجع المفتاح المفقود `403`؛ بينما يُرجع المفتاح الخاطئ أو المُلغى أو المنتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "كان مخزن البيانات البيومترية غير متاح أثناء الاحتفاظ بالقالب البيومتري أو مسحه. لم يُحذف أي شيء؛ كرر نفس الطلب. عمليات إعادة المحاولة تمتاز بخاصية idempotency وتلتقي عند قالب واحد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Retryable": {
                    "value": {
                      "detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "لم يتم حذف أي شيء. يوضح `code` السبب: `in_filed_report` عندما يتضمن التحديد شخصاً في تقرير تنظيمي نهائي، و`subject_deletion_in_progress` عندما يكون هناك طلب آخر لا يزال يحذف أحد الأشخاص المحددين. أعد المحاولة بعد انتهاء عملية الحذف تلك.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InFiledReportError"
                    },
                    {
                      "$ref": "#/components/schemas/SubjectDeletionInProgressError"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/sessions/delete/": {
      "post": {
        "summary": "حذف جلسات KYC بشكل جماعي حسب session_number",
        "description": "حذف جماعي لجلسات التحقق من المستخدمين (KYC) باستخدام `session_number` الرقمي الخاص بها، أو حذف كل جلسات KYC في تطبيقك باستخدام `delete_all: true`.\n\nإن `session_number` هو العداد التصاعدي السهل على المستخدم قراءته المعروض في قائمة جلسات Console والمُعاد كـ `session_number` بواسطة endpoint لإنشاء الجلسة واتخاذ القرار؛ وهو **ليس** معرف UUID الخاص بـ `session_id`. لحذف جلسة بواسطة UUID، أو لحذف جلسة التحقق من الشركات (KYB)، والتي لا يتعامل معها هذا الـ endpoint مطلقاً، استخدم `DELETE /v3/session/{sessionId}/delete/` بدلاً من ذلك.\n\n**يتم حذف ما يصل إلى 20 جلسة ضمن الطلب، وما زاد عن ذلك يُنفذ كمهمة.** يحدد عدد الجلسات المطابقة ذلك، سواء حُددت بواسطة `session_numbers` أو عبر `delete_all`:\n- ما يصل إلى 20 جلسة مطابقة: يتم حذفها قبل إرجاع الاستجابة، والتي تكون `200` مع إدخال واحد لكل جلسة في `results[]`.\n- أكثر من 20: تكون الاستجابة `202` مع مهمة حذف، ويتم حذف الجلسات في الخلفية. استطلع `GET /v3/sessions/delete/{job_id}/` بانتظام حتى تصبح `status` هي `COMPLETED` أو `FAILED`. تبلغ المهمة عن الأعداد لكل نتيجة، ولا توضح مطلقاً أي الجلسات تم حذفها. تحذف مهمة `delete_all` فقط الجلسات التي تم إنشاؤها قبل الطلب؛ ولا يتم حذف الجلسات التي بدأت أثناء تشغيلها.\n\nتحصل كل جلسة محذوفة على نفس المعاملة تماماً مثل endpoint حذف الجلسة الفردية: يتم حذف الجلسة، وكل محاولة تحقق تحتويها، وقرارها وبياناتها المستخرجة، وسجلات الميزات المرتبطة بها (التحقق من الهوية، الوجه، كشف الحيوية، مطابقة الوجه، وما إلى ذلك) وجميع ملفاتها المخزنة، وتختفي من كل endpoint للقراءة، وتتوقف عناوين URL للوسائط الصادرة سابقاً عن العمل. يتم إسقاط عمليات تسليم webhook التي لا تزال في قائمة الانتظار لجلسة محذوفة، وكذلك عمليات إعادة المحاولة الخاصة بها؛ ولا تتأثر أحداث webhook التي تم تسليمها بالفعل. **لا** تتم إزالة إدخالات قائمة الحظر، و**لا** يتم استرداد الرصيد المستهلك بالفعل، و**لا** يتم حذف كيانات User الأصلية (استخدم `POST /v3/users/delete/` لتلك الكيانات)؛ ولا يتم إرسال أي webhook لعملية الحذف. الحذف نهائي ولا يمكن التراجع عنه.\n\n**دلالات التحديد:**\n- مع `delete_all: true` يمكنك تضييق نطاق التحديد باستخدام تصفيات `GET /v3/sessions/`، مسبوقة بـ `filter_` (على سبيل المثال `filter_status`، `filter_workflow_id`، `filter_date_from`). التصفيات التي تقبل قيماً متعددة في List Sessions (`status`، `workflow_id`، `country`، `region`، `document_type`، `document_name`، `session_type`، `warning`، `organization_name`) تقبل سلسلة مفصولة بفواصل أو مصفوفة؛ بينما تقبل الأخرى قيمة واحدة. يتم تجاهل القيمة الفارغة. تنطبق التصفيات فقط جنباً إلى جنب مع `delete_all`، وتطبق مهمة الحذف نفس التصفيات.\n- أي مفتاح `filter_*` غير معروف، أو قيمة تصفية لا يمكن قراءتها، يؤدي إلى رفض الطلب بأكمله بالرمز `400` قبل حذف أي شيء، بحيث لا تؤدي التصفية المكتوبة بشكل خاطئ إلى توسيع نطاق الحذف ليشمل جميع الجلسات.\n- الإدخالات في `session_numbers` التي لا تطابق جلسة KYC نشطة في تطبيقك (أرقام غير معروفة، أو جلسات محذوفة بالفعل، أو جلسات مملوكة لتطبيق آخر) يتم **تخطيها بصمت**: لا تظهر في `results` ولا تُحتسب ضمن `total` الخاص بالمهمة.\n- إخفاقات التحقق من الصحة (إدخال غير رقمي، أو قائمة فارغة، أو عدم توفير أي من `session_numbers` أو `delete_all`، أو الاحتفاظ بالقالب الذي لا يستطيع التطبيق الوفاء به) ترفض **الطلب بأكمله** بالرمز `400` ولا تحذف أي شيء.\n- يتم حذف الجلسات في مجموعات. إذا تعذر حذف مجموعة (على سبيل المثال بسبب عدم توفر خدمة التخزين)، يتم الإبلاغ عن كل جلسة في تلك المجموعة كـ `face_retention_outcome: failed_retryable` وتبقى في مكانها؛ ولا تتأثر المجموعات الأخرى. كرر الطلب لتلك الجلسات. تعيد المهمة محاولة هذه المجموعة من تلقاء نفسها.\n- لا يوجد حد أقصى موثق لطول القائمة؛ ويعد حد المعدل المشترك للكتابة (أدناه) هو الحد العملي.\n\n**البيانات البيومترية للوجه:** الحقول الاختيارية `retain_face_embeddings`، `face_retention_days`، `face_retention_deadline`، `deletion_instruction`، و`instruction_id` لها نفس المعنى كما في `DELETE /v3/session/{sessionId}/delete/` وتنطبق على كل جلسة مطابقة. تبلغ كل نتيجة عن `face_retention_outcome` الخاصة بها.\n\n**الاستجابة:** `200 OK` مع `results[]` لما يصل إلى 20 جلسة مطابقة، أو `202 Accepted` مع مهمة حذف لما زاد عن ذلك. تؤكد كل نتيجة الحذف باستثناء `face_retention_outcome: failed_retryable`، والتي تبلغ عن جلسة لم يتم حذفها ويجب إعادة المحاولة لها. كانت الإصدارات السابقة من هذا الـ endpoint ترجع `204 No Content`؛ يرجى تحديث البرمجيات العميلة التي تعتمد على `204`.\n\n**الـ idempotency:** إعادة نفس الطلب لا تحذف أي شيء إضافي: الأرقام التي لم تعد تطابق جلسة يتم تخطيها.\n\n**`delete_all: true` (إجراء تدميري):** تحذف **كل** جلسات KYC المتبقية في التطبيق؛ ويتم تجاهل `session_numbers` عند تعيينها. لا توجد خطوة تأكيد ولا يمكن التراجع.\n\n**المصادقة:** مفتاح API في الرأس `x-api-key`. بيانات الاعتماد المفقودة أو غير الصالحة ترجع `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`)؛ لا ترجع واجهة برمجة التطبيقات هذه `401` مطلقاً.\n\n**حد المعدل:** ميزانية كتابة مشتركة تبلغ 300 طلب/دقيقة لكل مفتاح API عبر جميع endpoint الخاصة بـ POST/PATCH/DELETE؛ وتجاوزها يرجع `429`.\n\nيقبل هذا الـ endpoint مفاتيح API فقط. يتم رفض رموز Bearer الخاصة بمستخدم Business Console بالرمز `403` (على عكس حذف الجلسة الفردية، الذي يقبل كليهما).\n\n**التقارير التنظيمية المودعة:** إذا كانت البيانات المحددة موجودة في تقرير تنظيمي نهائي، يتم رفض الطلب بأكمله بالرمز `409` ولا يتم حذف أي شيء. يستخدم نص الاستجابة `code: in_filed_report` ويسمي كل تقرير بـ `uuid`، `report_number`، `report_type` و`case_uuid`. احذف التقارير، ثم كرر الطلب.",
        "operationId": "batch_delete_sessions",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "batch_delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_numbers": {
                    "type": "array",
                    "description": "قيم `session_number` الرقمية لجلسات KYC المراد حذفها، كسلاسل نصية تحتوي على أرقام فقط (يتم أيضاً قبول أرقام JSON وتحويلها تلقائياً). مطلوب ما لم يكن `delete_all` بقيمة `true`؛ تُرجع القائمة الفارغة الرمز `400`. يؤدي أي إدخال غير رقمي إلى رفض الطلب بالكامل بالرمز `400` (ما لم يكن `delete_all` بقيمة `true`، وفي هذه الحالة يتم تخطي التحقق وتجاهل المدخلات). الأرقام التي لا تطابق جلسة فعلية في تطبيقك يتم تخطيها دون إشعار.",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "example": "1001"
                    },
                    "minItems": 1,
                    "example": [
                      "1001",
                      "1002",
                      "1003"
                    ]
                  },
                  "delete_all": {
                    "type": "boolean",
                    "description": "عندما تكون `true`، تُحذف كل جلسة KYC متبقية في التطبيق الطالب ويتم تجاهل `session_numbers`، ما لم تقم بتضييق نطاق التحديد باستخدام مفاتيح `filter_*`. تُنفَّذ عملية الحذف لأكثر من 20 جلسة متطابقة كمهمة حذف (`202`) تغطي فقط الجلسات التي تم إنشاؤها قبل الطلب. القيمة الافتراضية هي `false`. لا يمكن التراجع عن هذا الإجراء؛ لا توجد خطوة تأكيد.",
                    "default": false,
                    "example": false
                  },
                  "retain_face_embeddings": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "تجاوز `face_retention_policy` الخاصة بالتطبيق لعملية الحذف هذه. القيمة `true` تحتفظ بقالب بيومتري واحد للوجه خالٍ من الصور ومرتبط بمستخدم الجلسة بعد حذف الجلسة؛ والقيمة `false` تحذف تضمين الوجه مع الجلسة؛ احذف المعامل أو عيّنه كـ `null` لاتباع سياسة التطبيق. يتم تجاهله لجلسات KYB وللجلسات التي لا تحتوي على تضمين للوجه.",
                    "example": true
                  },
                  "face_retention_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "مدة الاحتفاظ المحدودة، بالأيام، للقالب المحتفظ به. مطلوبة عند الاحتفاظ بالقالب ما لم يكن التطبيق قد عيّن بالفعل `face_retention_days`. يتم تعيين `expires_at` للقالب وفقاً للتاريخ الأقرب بين هذه المدة، وفترة الاحتفاظ بالبيانات العامة للتطبيق، و`face_retention_deadline`.",
                    "example": 365
                  },
                  "face_retention_deadline": {
                    "type": "string",
                    "format": "date-time",
                    "description": "انتهاء صلاحية نهائي اختياري لقالب تم الاحتفاظ به. يجب أن يكون في المستقبل.",
                    "example": "2027-08-28T00:00:00Z"
                  },
                  "deletion_instruction": {
                    "type": "string",
                    "enum": [
                      "operational_session_delete",
                      "privacy_erasure"
                    ],
                    "default": "operational_session_delete",
                    "description": "فئة التعليمات التي تقدمها. يقوم `operational_session_delete` بحذف الجلسة والاحتفاظ بالقالب فقط عندما تنص السياسة أو `retain_face_embeddings` على ذلك. بينما يقوم `privacy_erasure` بمسح كل قالب بيومتري تم الاحتفاظ به ومرتبط بمستخدم الجلسة قبل حذف الجلسة، ولا يمكن تجاوزه بواسطة سياسة التطبيق، ولا يمكن دمجه مع `retain_face_embeddings: true` (`400`).",
                    "example": "operational_session_delete"
                  },
                  "instruction_id": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "مرجعك الدائم لتعليمات الحذف هذه (على سبيل المثال معرّف تذكرة المسح). يُسجل في سجل التدقيق وعلى أي قالب يتم الاحتفاظ به. تنشئه Didit عند إغفاله.",
                    "example": "dsar-2026-0142"
                  },
                  "filter_status": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `status` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "filter_vendor_data": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `vendor_data` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيمة نفسها. قيمة واحدة، وليس قائمة: يتم دمج المصفوفة في نص واحد مفصول بفواصل، لذا لا تتم مطابقة عدة قيم كبدائل. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "string"
                  },
                  "filter_search": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `search` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيمة نفسها. قيمة واحدة، وليس قائمة: يتم دمج المصفوفة في نص واحد مفصول بفواصل، لذا لا تتم مطابقة عدة قيم كبدائل. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "string"
                  },
                  "filter_workflow_id": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `workflow_id` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "filter_date_from": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `date_from` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيمة نفسها. قيمة واحدة وليست قائمة: يتم دمج المصفوفة في قيمة واحدة مفصولة بفواصل، وبالتالي تُرفض القيم المتعددة بالرمز `400`. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "string",
                    "format": "date"
                  },
                  "filter_date_to": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `date_to` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيمة نفسها. قيمة واحدة وليست قائمة: يتم دمج المصفوفة في قيمة واحدة مفصولة بفواصل، وبالتالي تُرفض القيم المتعددة بالرمز `400`. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "string",
                    "format": "date"
                  },
                  "filter_country": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `country` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "filter_document_type": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `document_type` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "filter_document_name": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `document_name` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "filter_region": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `region` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "filter_didit_internal_id": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `didit_internal_id` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيمة نفسها. قيمة واحدة وليست قائمة: يتم دمج المصفوفة في قيمة واحدة مفصولة بفواصل، وبالتالي تُرفض القيم المتعددة بالرمز `400`. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "filter_session_type": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `session_type` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "filter_api_service": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `api_service` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيمة نفسها. قيمة واحدة وليست قائمة: يتم دمج المصفوفة في قيمة واحدة مفصولة بفواصل، وبالتالي تُرفض القيم المتعددة بالرمز `400`. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "string"
                  },
                  "filter_screened_full_name": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `screened_full_name` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيمة نفسها. قيمة واحدة، وليس قائمة: يتم دمج المصفوفة في نص واحد مفصول بفواصل، لذا لا تتم مطابقة عدة قيم كبدائل. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "string"
                  },
                  "filter_warning": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `warning` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "filter_status_initialized_as_in_review": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `status_initialized_as_in_review` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيم نفسها. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "boolean"
                  },
                  "filter_is_kyc_to_be_reviewed": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `is_kyc_to_be_reviewed` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيم نفسها. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "boolean"
                  },
                  "filter_euuid": {
                    "description": "يضيّق نطاق `delete_all` على الجلسات التي تطابق فلتر `euuid` الخاص بـ [سرد الجلسات](/ar/sessions-api/list-sessions)، بالقيمة نفسها. قيمة واحدة وليست قائمة: يتم دمج المصفوفة في قيمة واحدة مفصولة بفواصل، وبالتالي تُرفض القيم المتعددة بالرمز `400`. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "filter_organization_name": {
                    "description": "يُضيّق نطاق `delete_all` ليشمل الجلسات التي تطابق تصفية `organization_name` في [List Sessions](/ar/sessions-api/list-sessions)، بالقيم نفسها. سلسلة نصية مفصولة بفواصل أو مصفوفة. عند استخدام مفتاح API، لا يمكن أن يطابق سوى اسم مؤسستك الخاصة، لذا فإنه يحدد جميع جلساتك أو لا يحدد أيًا منها. يتم تجاهله بدون `delete_all`. يتم تجاهل القيمة الفارغة ولا تؤدي إلى تضييق نطاق التحديد.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  }
                }
              },
              "examples": {
                "Specific sessions": {
                  "summary": "حذف جلسات محددة بالرقم",
                  "value": {
                    "session_numbers": [
                      "1001",
                      "1002",
                      "1003"
                    ]
                  }
                },
                "All sessions": {
                  "summary": "حذف كل جلسات KYC في التطبيق",
                  "value": {
                    "delete_all": true
                  }
                },
                "Delete and retain templates": {
                  "summary": "حذف الجلسات مع الاحتفاظ بالقوالب البيومترية الخالية من الصور لمدة 365 يوماً",
                  "value": {
                    "session_numbers": [
                      "1001",
                      "1002"
                    ],
                    "retain_face_embeddings": true,
                    "face_retention_days": 365,
                    "instruction_id": "post-approval-cleanup-2026-08"
                  }
                },
                "Privacy erasure": {
                  "summary": "حذف الجلسات ومسح كل قالب محتفظ به للمستخدمين التابعين لها",
                  "value": {
                    "session_numbers": [
                      "1001"
                    ],
                    "deletion_instruction": "privacy_erasure",
                    "instruction_id": "dsar-2026-0142"
                  }
                },
                "Filtered delete_all": {
                  "summary": "حذف جميع الجلسات المرفوضة لسير عمل واحد تم إنشاؤها في سبتمبر 2026",
                  "value": {
                    "delete_all": true,
                    "filter_status": [
                      "Declined"
                    ],
                    "filter_workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                    "filter_date_from": "2026-09-01",
                    "filter_date_to": "2026-09-30"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تمت مطابقة ومعالجة ما يصل إلى 20 جلسة في الطلب. نتيجة واحدة لكل جلسة متطابقة؛ ويتم تخطي الأرقام التي لم تطابق أي شيء (غير معروفة أو محذوفة بالفعل) ولا تظهر. تؤكد النتيجة الحذف إلا عندما تكون قيمة `face_retention_outcome` هي `failed_retryable`: لم تُحذف تلك الجلسة ويجب إعادة المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "session_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "الجلسة المحذوفة."
                          },
                          "session_number": {
                            "type": "integer",
                            "nullable": true,
                            "description": "رقم الجلسة المحذوفة."
                          },
                          "face_retention_outcome": {
                            "type": "string",
                            "enum": [
                              "retained_with_user",
                              "deleted",
                              "none",
                              "ineligible_no_vendor_user",
                              "failed_retryable"
                            ],
                            "description": "ما حدث للبيانات البيومترية للوجه الخاصة بالجلسة. `deleted`: تم حذف تضمين الوجه مع الجلسة (افتراضي). `retained_with_user`: يتم حذف الجلسة ويظل قالب بيومتري واحد خالٍ من الصور مرتبطاً بالمستخدم (User)؛ راجع `biometric_template_uuid`. `none`: لم تتضمن الجلسة أي تضمين للوجه (على سبيل المثال جلسة KYC تقتصر على المستندات فقط بدون صورة سيلفي لكشف الحيوية؛ ولا يحدد هذا الـ endpoint جلسات KYB أبداً). `ineligible_no_vendor_user`: تم طلب الاحتفاظ ولكن لا يوجد مستخدم (User) مرتبط بالجلسة، لذا تم حذف التضمين مع الجلسة. `failed_retryable` (في endpoint الخاص بالدفعة فقط): تعذر حذف المجموعة التي تم حذف هذه الجلسة معها (خدمة تخزين، أو مخزن بيانات بيومترية، أو مزود مراقبة لم تكن متاحة)؛ لا تزال هذه الجلسة قائمة، كرر الطلب من أجلها."
                          },
                          "biometric_template_uuid": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "معرّف القالب البيومتري المحتفظ به عندما تكون قيمة `face_retention_outcome` هي `retained_with_user`؛ و`null` بخلاف ذلك. يمكنك إدارته عبر `/v3/biometric-templates/{template_uuid}/`."
                          },
                          "biometric_template_expires_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "متى يُحذف القالب البيومتري المحتفظ به، عندما تكون قيمة `face_retention_outcome` هي `retained_with_user`؛ وتكون `null` عند عدم الاحتفاظ بأي قالب."
                          },
                          "deleted_child_verifications": {
                            "type": "integer",
                            "description": "دائماً `0` في هذا الـ endpoint، الذي يحذف جلسات KYC فقط. حذف جلسة التحقق من الشركات (KYB) باستخدام `DELETE /v3/session/{sessionId}/delete/` يُبلغ عن عمليات التحقق التي أنشأتها وحُذفت معها."
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Mixed outcomes": {
                    "value": {
                      "results": [
                        {
                          "session_id": "4c5c7f3a-3b1d-4b7e-9c39-2b4f7e6a1d02",
                          "session_number": 1001,
                          "face_retention_outcome": "deleted",
                          "biometric_template_uuid": null,
                          "biometric_template_expires_at": null,
                          "deleted_child_verifications": 0
                        },
                        {
                          "session_id": "b8e1d2c3-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
                          "session_number": 1002,
                          "face_retention_outcome": "retained_with_user",
                          "biometric_template_uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
                          "biometric_template_expires_at": "2027-10-09T10:15:00Z",
                          "deleted_child_verifications": 0
                        },
                        {
                          "session_id": "7a1e9c2d-5f4b-4c3a-8e2d-1b0a9f8e7d6c",
                          "session_number": 1003,
                          "face_retention_outcome": "ineligible_no_vendor_user",
                          "biometric_template_uuid": null,
                          "biometric_template_expires_at": null,
                          "deleted_child_verifications": 0
                        },
                        {
                          "session_id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
                          "session_number": 1004,
                          "face_retention_outcome": "failed_retryable",
                          "biometric_template_uuid": null,
                          "biometric_template_expires_at": null,
                          "deleted_child_verifications": 0
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "تطابقت أكثر من 20 جلسة. يتم حذفها في الخلفية؛ قم بالاستقصاء الدوري عبر `GET /v3/sessions/delete/{job_id}/` حتى تصبح `status` هي `COMPLETED` أو `FAILED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDeletionJob"
                },
                "examples": {
                  "Job accepted": {
                    "value": {
                      "job_id": "5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b",
                      "status": "PENDING",
                      "total": 250,
                      "processed": 0,
                      "outcomes": {
                        "deleted": 0,
                        "none": 0,
                        "retained_with_user": 0,
                        "ineligible_no_vendor_user": 0,
                        "failed_retryable": 0,
                        "already_deleted": 0
                      },
                      "deleted_child_verifications": 0,
                      "error": null,
                      "created_at": "2026-10-09T10:15:00Z",
                      "completed_at": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — لم يُحذف أي شيء. قيم الأخطاء هي مصفوفات من سلاسل الرسائل النصية المفهرسة باسم الحقل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_numbers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": {
                    "description": "مفاتيح أخرى: مفتاح `filter_*` ليس عامل تصفية لـ List Sessions (`\"Unknown filter.\"`‎)، أو مفتاح `filter_*` لا يمكن قراءة قيمته (مفهرس بمفتاح `filter_*` هذا، مع مصفوفة من الرسائل)."
                  }
                },
                "examples": {
                  "Missing selector": {
                    "summary": "لم يتم تقديم session_numbers ولا delete_all",
                    "value": {
                      "session_numbers": [
                        "This field is required unless delete_all is true."
                      ]
                    }
                  },
                  "Empty list": {
                    "summary": "session_numbers مصفوفة فارغة",
                    "value": {
                      "session_numbers": [
                        "This list may not be empty."
                      ]
                    }
                  },
                  "Non-numeric entry": {
                    "summary": "session_numbers يحتوي على سلسلة نصية غير رقمية",
                    "value": {
                      "session_numbers": [
                        "All session_numbers must be numeric."
                      ]
                    }
                  },
                  "Privacy erasure cannot retain": {
                    "summary": "جمع بين deletion_instruction من نوع privacy_erasure مع ضبط retain_face_embeddings على true",
                    "value": {
                      "retain_face_embeddings": [
                        "Privacy erasure cannot retain biometric templates."
                      ]
                    }
                  },
                  "No finite retention duration": {
                    "summary": "طُلب الاحتفاظ بدون face_retention_days في الطلب أو التطبيق",
                    "value": {
                      "detail": "A finite biometric-template retention duration is required."
                    }
                  },
                  "Unknown filter": {
                    "summary": "مفتاح filter_* لا يتوفر لدى List Sessions",
                    "value": {
                      "filter_reviewer": "Unknown filter."
                    }
                  },
                  "Unreadable filter value": {
                    "summary": "قيمة تصفية يتعذر قراءتها",
                    "value": {
                      "filter_date_from": [
                        "Enter a valid date."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid API key": {
                    "summary": "لا يوجد رأس x-api-key، أو أن المفتاح غير صالح",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد معدل الكتابة المشترك (300 طلب POST/PATCH/DELETE في الدقيقة لكل مفتاح API). افحص `Retry-After` ورؤوس الاستجابة `X-RateLimit-*` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "تم استنفاد ميزانية الكتابة",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "جلسة محددة هي جزء من تقرير تنظيمي نهائي. لم يُحذف أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InFiledReportError"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST \\\n  https://verification.didit.me/v3/sessions/delete/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"session_numbers\": [\"1001\", \"1002\", \"1003\"]\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.batch_delete(\n    session_numbers=[\"1001\", \"1002\", \"1003\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.batchDelete({\n  session_numbers: [\"1001\", \"1002\", \"1003\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.BatchDelete(ctx, didit.SessionsBatchDeleteParams{\n\tSessionNumbers: didit.Some([]string{\"1001\", \"1002\", \"1003\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsBatchDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().batchDelete(SessionsBatchDeleteParams.builder()\n        .sessionNumbers(List.of(\"1001\", \"1002\", \"1003\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->batchDelete([\n    'session_numbers' => ['1001', '1002', '1003'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.batch_delete(session_numbers: [\"1001\", \"1002\", \"1003\"])\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.BatchDeleteAsync(new SessionsBatchDeleteParams\n{\n    SessionNumbers = new string[] { \"1001\", \"1002\", \"1003\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/sessions/delete/{job_id}/": {
      "get": {
        "summary": "الحصول على مهمة الحذف المجمّع للجلسات",
        "description": "تقدم عملية الحذف الجماعي للجلسات التي رد عليها `POST /v3/sessions/delete/` بالرمز `202` (أكثر من 20 جلسة مطابقة، تم تحديدها بواسطة `session_numbers` أو باستخدام `delete_all`). استقصِ كل بضع ثوانٍ بينما تكون `status` هي `PENDING` أو `PROCESSING`؛ وتوقف عندما تصبح `COMPLETED` أو `FAILED`.\n\nتبلغ المهمة عن عدد الجلسات التي انتهت بكل نتيجة وعدد الجلسات التي عالجتها، دون تحديد الجلسات التي حذفتها مطلقاً. وتحمل المهمة الفاشلة `FAILED` السبب في حقل `error`؛ وتظل الجلسات التي لم تصل إليها في مكانها، لذا كرر طلب الحذف لحذفها.\n\n**المصادقة:** مفتاح API في رأس `x-api-key`. تكون المهمة مرئية فقط للتطبيق الذي أنشأها؛ ويعيد أي `job_id` آخر الرمز `404`. تعيد بيانات الاعتماد المفقودة أو غير الصالحة الرمز `403`؛ ولا تعيد هذه الـ API الرمز `401` أبداً.",
        "operationId": "get_session_deletion_job",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "retrieve_deletion_job",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف `job_id` المُرجع مع الرمز `202` من `POST /v3/sessions/delete/`."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl 'https://verification.didit.me/v3/sessions/delete/JOB_ID/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.retrieve_deletion_job(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.retrieveDeletionJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.RetrieveDeletionJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().retrieveDeletionJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->retrieveDeletionJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.retrieve_deletion_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.RetrieveDeletionJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "المهمة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDeletionJob"
                },
                "examples": {
                  "Processing": {
                    "value": {
                      "job_id": "5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b",
                      "status": "PROCESSING",
                      "total": 250,
                      "processed": 100,
                      "outcomes": {
                        "deleted": 82,
                        "none": 18,
                        "retained_with_user": 0,
                        "ineligible_no_vendor_user": 0,
                        "failed_retryable": 0,
                        "already_deleted": 0
                      },
                      "deleted_child_verifications": 0,
                      "error": null,
                      "created_at": "2026-10-09T10:15:00Z",
                      "completed_at": null
                    }
                  },
                  "Completed": {
                    "value": {
                      "job_id": "5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b",
                      "status": "COMPLETED",
                      "total": 250,
                      "processed": 250,
                      "outcomes": {
                        "deleted": 204,
                        "none": 44,
                        "retained_with_user": 0,
                        "ineligible_no_vendor_user": 0,
                        "failed_retryable": 0,
                        "already_deleted": 2
                      },
                      "deleted_child_verifications": 0,
                      "error": null,
                      "created_at": "2026-10-09T10:15:00Z",
                      "completed_at": "2026-10-09T10:16:40Z"
                    }
                  },
                  "Failed": {
                    "value": {
                      "job_id": "5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b",
                      "status": "FAILED",
                      "total": 250,
                      "processed": 100,
                      "outcomes": {
                        "deleted": 82,
                        "none": 18,
                        "retained_with_user": 0,
                        "ineligible_no_vendor_user": 0,
                        "failed_retryable": 0,
                        "already_deleted": 0
                      },
                      "deleted_child_verifications": 0,
                      "error": "The deletion stopped before it finished. The sessions it had not reached are still in place; repeat the request to delete them.",
                      "created_at": "2026-10-09T10:15:00Z",
                      "completed_at": "2026-10-09T10:15:52Z"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid API key": {
                    "summary": "لا يوجد رأس x-api-key، أو أن المفتاح غير صالح",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد مهمة حذف بهذا المعرّف `job_id` للتطبيق المُستدعي. تكون المهام مرئية فقط للتطبيق الذي أنشأها."
          }
        }
      }
    },
    "/v3/sessions/{session_id}/reviews/": {
      "get": {
        "summary": "عرض مراجعات الجلسة وسجل النشاط",
        "description": "إرجاع مسار التدقيق / سجل النشاط لجلسة التحقق من المستخدمين (KYC)، من الأحدث إلى الأقدم، ضمن غلاف مقسّم لصفحات (`count` / `next` / `previous` / `results`، بواقع 50 مدخلاً لكل صفحة افتراضياً).\n\nتُكتب مدخلات السجل بواسطة كل طرف يتعامل مع الجلسة: القرارات اليدوية المتخذة عبر `PATCH /v3/session/{session_id}/update-status/` (والتي تسجل `previous_status` → `new_status`)، ونشاط المراجِع في Console (التعليقات مع إشارات `@email`، وتعديلات بيانات KYC/POA، وتحميلات/عمليات إزالة الملفات، وتغييرات الوسوم، وعرض صفحة التفاصيل)، وتطابقات مراقبة AML المستمرة، والملاحظات الملحقة عبر `POST` على نفس هذا المسار. قراءة هذا السجل تعادل من جانب API لوحة **Activity** في عرض الجلسة على Didit Console.\n\nجلسات التحقق من المستخدمين (KYC) فقط هي القابلة للوصول هنا؛ وتُرجع معرّفات جلسات التحقق من الشركات (KYB) الرمز `404`.",
        "operationId": "list_session_reviews",
        "x-didit-sdk": {
          "resource": "sessions.reviews",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من المستخدمين (KYC). يجب أن تنتمي إلى التطبيق نفسه الخاص بمفتاح API — تُرجع معرّفات UUID من تطبيقات أخرى والجلسات المحذوفة ومعرّفات جلسات التحقق من الشركات (KYB) الرمز `404`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "حجم الصفحة. القيمة الافتراضية `50`.",
            "schema": {
              "type": "integer",
              "default": 50,
              "example": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "عدد الإدخالات المراد تخطيها من بداية الخلاصة (المرتبة). القيمة الافتراضية هي `0`. يحتوي رابطا `next` / `previous` في الاستجابة على القيم الصحيحة للتنقل في الخلاصة.",
            "schema": {
              "type": "integer",
              "default": 0,
              "example": 0
            }
          },
          {
            "name": "ordering",
            "in": "query",
            "required": false,
            "description": "ترتيب الفرز. يعتمد الموجز افتراضياً الأحدث أولاً (`-created_at`)؛ قم بتمرير `created_at` لقراءته من الأقدم أولاً. يتم تجاهل القيم غير المعروفة دون إشعار (يُستخدم الترتيب الافتراضي)؛ كما تُقبل أسماء حقول serializer الأخرى أيضاً.",
            "schema": {
              "type": "string",
              "default": "-created_at",
              "example": "created_at"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "موجز نشاط مقسم إلى صفحات، الأحدث أولاً بشكل افتراضي. `count` هو إجمالي عدد المدخلات؛ و`next` / `previous` هما رابطا URL جاهزان للصفحات (`null` عند الأطراف). تعني قيمة `count` البالغة `0` مع `results` فارغة أنه لم يُسجَّل أي نشاط بعد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "العدد الإجمالي لإدخالات الخلاصة لهذه الجلسة (عبر جميع الصفحات).",
                      "example": 3
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL للصفحة التالية، أو `null` في الصفحة الأخيرة.",
                      "example": null
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL للصفحة السابقة، أو `null` في الصفحة الأولى.",
                      "example": null
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReviewItem"
                      },
                      "description": "إدخالات الموجز لهذه الصفحة."
                    }
                  }
                },
                "examples": {
                  "DecisionTrail": {
                    "summary": "موافقة يدوية بالإضافة إلى ملاحظات مضافة عبر API",
                    "value": {
                      "count": 3,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "de0561bc-5583-4409-9171-1a31a4c8a5f4",
                          "activity_type": "STATUS_UPDATED",
                          "actor_display": "API Client",
                          "actor_email": null,
                          "actor_type": "API_KEY",
                          "new_status": "Approved",
                          "previous_status": "In Review",
                          "comment": "Document re-checked manually; address matches.",
                          "mentioned_emails": [],
                          "previous_value": {
                            "status": "In Review"
                          },
                          "new_value": {
                            "status": "Approved"
                          },
                          "changed_fields": [
                            "status"
                          ],
                          "metadata": null,
                          "created_at": "2026-06-12T00:19:31.918735Z"
                        },
                        {
                          "uuid": "35370f58-5098-44ee-8a06-8c9af80b2455",
                          "activity_type": "STATUS_UPDATED",
                          "actor_display": "Unknown",
                          "actor_email": null,
                          "actor_type": "CONSOLE_USER",
                          "new_status": null,
                          "previous_status": null,
                          "comment": "Note without status.",
                          "mentioned_emails": [],
                          "previous_value": null,
                          "new_value": null,
                          "changed_fields": [],
                          "metadata": null,
                          "created_at": "2026-06-12T00:18:44.504157Z"
                        },
                        {
                          "uuid": "00338f82-f1c5-4f57-8614-c49bb258af1a",
                          "activity_type": "STATUS_UPDATED",
                          "actor_display": "Unknown",
                          "actor_email": null,
                          "actor_type": "CONSOLE_USER",
                          "new_status": "In Review",
                          "previous_status": null,
                          "comment": "Flagging for manual document re-check.",
                          "mentioned_emails": [],
                          "previous_value": null,
                          "new_value": null,
                          "changed_fields": [],
                          "metadata": null,
                          "created_at": "2026-06-12T00:18:44.466537Z"
                        }
                      ]
                    }
                  },
                  "PaginatedFirstPage": {
                    "summary": "الصفحة الأولى مع limit=2 — تحتوي next على رابط المتابعة",
                    "value": {
                      "count": 4,
                      "next": "https://verification.didit.me/v3/sessions/8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d/reviews/?limit=2&offset=2",
                      "previous": null,
                      "results": [
                        {
                          "uuid": "de0561bc-5583-4409-9171-1a31a4c8a5f4",
                          "activity_type": "STATUS_UPDATED",
                          "actor_display": "API Client",
                          "actor_email": null,
                          "actor_type": "API_KEY",
                          "new_status": "Approved",
                          "previous_status": "In Review",
                          "comment": "Document re-checked manually; address matches.",
                          "mentioned_emails": [],
                          "previous_value": {
                            "status": "In Review"
                          },
                          "new_value": {
                            "status": "Approved"
                          },
                          "changed_fields": [
                            "status"
                          ],
                          "metadata": null,
                          "created_at": "2026-06-12T00:19:31.918735Z"
                        },
                        {
                          "uuid": "bd4e6227-bdd2-42b2-a726-1d12f785a457",
                          "activity_type": "STATUS_UPDATED",
                          "actor_display": "Unknown",
                          "actor_email": null,
                          "actor_type": "CONSOLE_USER",
                          "new_status": null,
                          "previous_status": null,
                          "comment": null,
                          "mentioned_emails": [],
                          "previous_value": null,
                          "new_value": null,
                          "changed_fields": [],
                          "metadata": null,
                          "created_at": "2026-06-12T00:18:44.540238Z"
                        }
                      ]
                    }
                  },
                  "Empty": {
                    "summary": "جلسة ليس لها نشاط مسجل بعد",
                    "value": {
                      "count": 0,
                      "next": null,
                      "previous": null,
                      "results": []
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رمز `x-api-key` مفقود أو مشوه أو منتهي الصلاحية أو ملغى. يتم التحقق من المصادقة قبل البحث عن الجلسة، لذلك يعيد المفتاح المفقود `403` حتى في حال عدم وجود UUID للجلسة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "You do not have permission to perform this action."
                    }
                  }
                },
                "examples": {
                  "InvalidKey": {
                    "summary": "رأس x-api-key مفقود أو غير صالح",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة تحقق من المستخدمين (KYC) بهذا الـ UUID مرئية لتطبيقك: إما أن الـ UUID غير موجود، أو تم حذف الجلسة، أو أنها تنتمي إلى تطبيق مختلف. كما تُرجع معرّفات جلسات التحقق من الشركات (KYB) رمز `404` هنا — موجز المراجعات مخصص لجلسات KYC فقط.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "Session not found."
                    }
                  }
                },
                "examples": {
                  "NotFound": {
                    "summary": "‏UUID لجلسة غير معروف، أو محذوف، أو تابع لتطبيق آخر",
                    "value": {
                      "detail": "Session not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. تحقق من رؤوس الاستجابة `Retry-After` و`X-RateLimit-*`. راجع [تحديد المعدل](/ar/integration/rate-limiting)."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -s 'https://verification.didit.me/v3/sessions/8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d/reviews/?limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.reviews.list(\n    \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.reviews.list(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.Reviews.ListAutoPaging(ctx, \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", didit.SessionsReviewsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().reviews().list(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->sessions->reviews->list('8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.reviews.list(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.Reviews.ListAsync(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "summary": "إضافة ملاحظة مراجعة إلى سجل التدقيق للجلسة",
        "description": "إلحاق ملاحظة بموجز المراجعة / النشاط الخاص بجلسة التحقق من المستخدمين (KYC). **تسجل نقطة النهاية هذه إدخالاً فقط — ولا تغيّر الجلسة بأي حال.** تبقى `status` الجلسة دون تغيير، ولا يتم تشغيل أي تحقق من صحة انتقال الحالة، ولا يتم إطلاق أي webhook. للموافقة الفعلية على جلسة أو رفضها أو إعادة فتحها (وهو ما يكتب أيضاً إدخال `STATUS_UPDATED` منسوباً بالكامل إلى هذا الموجز)، استخدم `PATCH /v3/session/{session_id}/update-status/` بدلاً من ذلك.\n\nكلا حقلي النص اختياريان ويُقبل كائن JSON فارغ. يتم تخزين `new_status` فقط كتسمية على الإدخال ويقبل أياً من قيم حالات الجلسة العشر (حساس لحالة الأحرف). يتم تخزين إشارات `@email` داخل `comment` كنص عادي فقط — ولا تؤدي إلى إطلاق أي إشعارات على نقطة النهاية هذه، ويظل `mentioned_emails` للإدخال فارغاً.\n\nملاحظة حول الإسناد: الإدخالات المنشأة هنا لا تحمل أي معلومات عن الفاعل. تظهر في الموجز كالتالي: `actor_display: \"Unknown\"`، و`actor_type: \"CONSOLE_USER\"`، و`activity_type: \"STATUS_UPDATED\"` (القيم الافتراضية للتخزين)، وحقل `user` في نص استجابة `201` هو `\"Unknown\"`.",
        "operationId": "create_session_review",
        "x-didit-sdk": {
          "resource": "sessions.reviews",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "required": false,
            "description": "يُضبط على `application/json` عند إرسال نص طلب بتنسيق JSON.",
            "schema": {
              "type": "string",
              "example": "application/json"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من المستخدمين (KYC). يجب أن تنتمي إلى التطبيق نفسه الخاص بمفتاح API — تُرجع معرّفات UUID من تطبيقات أخرى والجلسات المحذوفة ومعرّفات جلسات التحقق من الشركات (KYB) الرمز `404`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "new_status": {
                    "type": "string",
                    "nullable": true,
                    "enum": [
                      "Not Started",
                      "In Progress",
                      "Approved",
                      "Declined",
                      "In Review",
                      "Expired",
                      "Abandoned",
                      "Kyc Expired",
                      "Resubmitted",
                      "Awaiting User"
                    ],
                    "description": "تسمية حالة اختيارية لتسجيلها في المدخل. تقبل أي قيمة لحالة الجلسة، وهي حساسة لحالة الأحرف (يتم رفض `\"approved\"` برمز `400`). تسجيل حالة هنا **لا** يغير الحالة الفعلية للجلسة — استخدم endpoint تحديث الحالة لذلك.",
                    "example": "In Review"
                  },
                  "comment": {
                    "type": "string",
                    "nullable": true,
                    "description": "ملاحظة اختيارية بنص حر (بدون حد مفروض للطول). يتم تخزينها حرفياً؛ لا تتم معالجة إشارات `@email` على هذا الـ endpoint.",
                    "example": "Flagging for manual document re-check."
                  }
                }
              },
              "examples": {
                "NoteWithStatusLabel": {
                  "summary": "ملاحظة تحمل تصنيف حالة (حالة الجلسة لم تتغير)",
                  "value": {
                    "new_status": "In Review",
                    "comment": "Flagging for manual document re-check."
                  }
                },
                "CommentOnly": {
                  "summary": "ملاحظة نصية بدون تسمية حالة",
                  "value": {
                    "comment": "Customer emailed an updated utility bill; awaiting upload."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "مُدخل مسجل في مسار التدقيق الخاص بالجلسة. تظل الجلسة نفسها دون تغيير — وتحتفظ `status` بقيمتها السابقة ولا يتم إرسال أي webhook. يظهر المُدخل الجديد أيضاً في أعلى `GET …/reviews/` (مع `actor_display: \"Unknown\"`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "string",
                      "description": "اسم العرض لمؤلف الإدخال. دائماً `\"Unknown\"` للإدخالات التي تم إنشاؤها عبر هذا الـ endpoint، لأنه لا يسجل إسناد الإدخال إلى فاعل.",
                      "example": "Unknown"
                    },
                    "new_status": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "Not Started",
                        "In Progress",
                        "Approved",
                        "Declined",
                        "In Review",
                        "Expired",
                        "Abandoned",
                        "Kyc Expired",
                        "Resubmitted",
                        "Awaiting User"
                      ],
                      "description": "تسمية الحالة المسجلة في المدخل، أو `null` إذا لم يتم إرسال أي منها. لا تتأثر الحالة الفعلية للجلسة.",
                      "example": "In Review"
                    },
                    "comment": {
                      "type": "string",
                      "nullable": true,
                      "description": "الملاحظة المسجّلة على المدخلة، أو `null` إذا لم يتم إرسال أي ملاحظة.",
                      "example": "Flagging for manual document re-check."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "وقت كتابة المُدخل، بتنسيق ISO 8601 UTC.",
                      "example": "2026-06-12T00:18:44.466537Z"
                    }
                  }
                },
                "examples": {
                  "NoteWithStatusLabel": {
                    "summary": "ملاحظة مع تصنيف حالة",
                    "value": {
                      "user": "Unknown",
                      "new_status": "In Review",
                      "comment": "Flagging for manual document re-check.",
                      "created_at": "2026-06-12T00:18:44.466537Z"
                    }
                  },
                  "CommentOnly": {
                    "summary": "ملاحظة نصية",
                    "value": {
                      "user": "Unknown",
                      "new_status": null,
                      "comment": "Note without status.",
                      "created_at": "2026-06-12T00:18:44.504157Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق، يتم إرجاعه كخريطة رسائل لكل حقل. السبب المعتاد هو أن قيمة `new_status` ليست واحدة من الحالات العشر المسموح بها — الفحص حساس لحالة الأحرف.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "new_status": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "\"approved\" is not a valid choice."
                      ]
                    }
                  }
                },
                "examples": {
                  "InvalidStatusChoice": {
                    "summary": "قيمة حالة بأحرف صغيرة / غير معروفة",
                    "value": {
                      "new_status": [
                        "\"approved\" is not a valid choice."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رمز `x-api-key` مفقود أو مشوه أو منتهي الصلاحية أو ملغى. يتم التحقق من المصادقة قبل البحث عن الجلسة، لذلك يعيد المفتاح المفقود `403` حتى في حال عدم وجود UUID للجلسة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "You do not have permission to perform this action."
                    }
                  }
                },
                "examples": {
                  "InvalidKey": {
                    "summary": "رأس x-api-key مفقود أو غير صالح",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة تحقق من المستخدمين (KYC) بهذا الـ UUID مرئية لتطبيقك: إما أن الـ UUID غير موجود، أو تم حذف الجلسة، أو أنها تنتمي إلى تطبيق مختلف. كما تُرجع معرّفات جلسات التحقق من الشركات (KYB) رمز `404` هنا — موجز المراجعات مخصص لجلسات KYC فقط.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "Session not found."
                    }
                  }
                },
                "examples": {
                  "NotFound": {
                    "summary": "‏UUID لجلسة غير معروف، أو محذوف، أو تابع لتطبيق آخر",
                    "value": {
                      "detail": "Session not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. تحقق من رؤوس الاستجابة `Retry-After` و`X-RateLimit-*`. راجع [تحديد المعدل](/ar/integration/rate-limiting)."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# Records an audit-trail note only -- the session's status does NOT change.\ncurl -s -X POST https://verification.didit.me/v3/sessions/8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d/reviews/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"new_status\": \"In Review\",\n    \"comment\": \"Flagging for manual document re-check.\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.reviews.create(\n    \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\",\n    new_status=\"In Review\",\n    comment=\"Flagging for manual document re-check.\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.reviews.create(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", {\n  new_status: \"In Review\",\n  comment: \"Flagging for manual document re-check.\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Reviews.Create(ctx, \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", didit.SessionsReviewsCreateParams{\n\tNewStatus: didit.Some(didit.SessionsReviewsCreateParamsNewStatus(\"In Review\")),\n\tComment:   didit.String(\"Flagging for manual document re-check.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsReviewsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().reviews().create(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", SessionsReviewsCreateParams.builder()\n        .newStatus(SessionsReviewsCreateParams.NewStatus.of(\"In Review\"))\n        .comment(\"Flagging for manual document re-check.\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->reviews->create('8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d', [\n    'new_status' => 'In Review',\n    'comment' => 'Flagging for manual document re-check.',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.reviews.create(\n  \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\",\n  new_status: \"In Review\",\n  comment: \"Flagging for manual document re-check.\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Reviews.CreateAsync(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", new SessionsReviewsCreateParams\n{\n    NewStatus = new SessionsReviewsCreateParamsNewStatus(\"In Review\"),\n    Comment = \"Flagging for manual document re-check.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/billing/balance/": {
      "get": {
        "summary": "الحصول على الرصيد",
        "description": "الحصول على الرصيد المدفوع مسبقاً الحالي بالدولار الأمريكي (على مستوى المؤسسة) بالإضافة إلى إعدادات إعادة الشحن التلقائي. المبالغ عبارة عن سلاسل نصية عشرية — حلّلها باستخدام مكتبة للأعداد العشرية.",
        "operationId": "get_billing_balance",
        "x-didit-sdk": {
          "resource": "billing",
          "method": "retrieve_balance",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Billing"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/billing/balance/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.billing.retrieve_balance()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.billing.retrieveBalance();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Billing.RetrieveBalance(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.billing().retrieveBalance();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->billing->retrieveBalance();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.billing.retrieve_balance\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Billing.RetrieveBalanceAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "رصيد الائتمان الحالي بالإضافة إلى إعدادات إعادة التعبئة التلقائية للمؤسسة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "balance",
                    "auto_refill_enabled"
                  ],
                  "properties": {
                    "balance": {
                      "type": "string",
                      "description": "الرصيد الائتماني مسبق الدفع الحالي بالدولار الأمريكي، كسلسلة نصية عشرية بنقطة ثابتة. يتناقص مع فوترة عمليات التحقق ويزداد عند تسوية شحن الرصيد."
                    },
                    "auto_refill_enabled": {
                      "type": "boolean",
                      "description": "عندما تكون `true`، ستقوم Didit تلقائياً بالخصم من طريقة الدفع المحفوظة لإضافة رصيد بمجرد أن يتجاوز الرصيد `auto_refill_threshold`. يتم تكوينه من Console ← الفوترة."
                    },
                    "auto_refill_amount": {
                      "type": "string",
                      "nullable": true,
                      "description": "المبلغ بالدولار الأمريكي الذي سيتم تحصيله وإضافته إلى الرصيد عند كل شحن تلقائي، بقيمته الاسمية. يُعيَّن من \\$50 إلى \\$20,000 في Console → الفوترة. تكون القيمة `null` عند تعطيل الشحن التلقائي أو عدم تعيينه."
                    },
                    "auto_refill_threshold": {
                      "type": "string",
                      "nullable": true,
                      "description": "حد التشغيل بالدولار الأمريكي (USD). يتم تشغيل إعادة التعبئة التلقائية عندما ينخفض `balance` عن هذه القيمة. تكون القيمة `null` عند تعطيل إعادة التعبئة التلقائية أو عدم تعيينها."
                    }
                  }
                },
                "examples": {
                  "Healthy balance with auto-refill": {
                    "value": {
                      "balance": "1234.5600",
                      "auto_refill_enabled": true,
                      "auto_refill_amount": "500.00",
                      "auto_refill_threshold": "100.00"
                    }
                  },
                  "Low balance, manual top-up only": {
                    "value": {
                      "balance": "12.0000",
                      "auto_refill_enabled": false,
                      "auto_refill_amount": null,
                      "auto_refill_threshold": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح قراءة بيانات الفوترة لهذه المؤسسة. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/billing/top-up/": {
      "post": {
        "summary": "شحن الرصيد",
        "description": "أضف أرصدة عبر جلسة Stripe Checkout مستضافة (**\\$50 إلى \\$20,000** لكل عملية شحن رصيد). تتوفر عمليات شحن الرصيد في خطط Free وGrowth وScale، وتُضاف بالقيمة الاسمية دون أي خصم أو مكافأة، وتستمر لمدة 12 شهراً؛ ولا يمكن للعقود السنوية في خطة Enterprise شحن الرصيد. أعد توجيه العميل إلى `checkout_session_url` المُرجع.",
        "operationId": "billing_top_up",
        "x-didit-sdk": {
          "resource": "billing",
          "method": "top_up",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Billing"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount_in_dollars"
                ],
                "properties": {
                  "amount_in_dollars": {
                    "type": "number",
                    "minimum": 50,
                    "maximum": 20000,
                    "description": "المبلغ المراد تحصيله بالدولار الأمريكي. **يجب أن يكون من 50 إلى 20,000.** يتلقى الرصيد نفس المبلغ، دون أي خصم أو مكافأة. تُضاف الضريبة تلقائياً عند الدفع بناءً على عنوان الفوترة الخاص بالعميل."
                  },
                  "success_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "رابط URL الذي تعيد صفحة الدفع المستضافة توجيه العميل إليه بعد نجاح الدفع. القيمة الافتراضية حالياً هي `https://console.didit.me`. مرّر رابط URL صالحاً بشكل صريح؛ فالمضيف الافتراضي غير متاح. ألحق العنصر النائب الحرفي `{CHECKOUT_SESSION_ID}` إذا كنت تريد أن تستبدل صفحة الدفع المستضافة معرّف الجلسة به."
                  },
                  "cancel_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "رابط URL الذي تعيد صفحة الدفع المستضافة توجيه العميل إليه عندما يلغي العميل نافذة الدفع أو يغلقها. القيمة الافتراضية حالياً هي `https://console.didit.me`. مرّر رابط URL صالحاً بشكل صريح؛ فالمضيف الافتراضي غير متاح."
                  }
                }
              },
              "examples": {
                "Minimum top-up": {
                  "value": {
                    "amount_in_dollars": 50
                  }
                },
                "Custom amount with redirects": {
                  "value": {
                    "amount_in_dollars": 500,
                    "success_url": "https://yourapp.com/billing/top-up/success",
                    "cancel_url": "https://yourapp.com/billing/top-up/cancel"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/billing/top-up/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"amount_in_dollars\": 500,\n    \"success_url\": \"https://yourapp.com/billing/success\",\n    \"cancel_url\": \"https://yourapp.com/billing/cancel\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.billing.top_up(\n    amount_in_dollars=50.0,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.billing.topUp({\n  amount_in_dollars: 50.0,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Billing.TopUp(ctx, didit.BillingTopUpParams{\n\tAmountInDollars: 50.0,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.BillingTopUpParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.billing().topUp(BillingTopUpParams.builder()\n        .amountInDollars(50.0)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->billing->topUp([\n    'amount_in_dollars' => 50.0,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.billing.top_up(amount_in_dollars: 50.0)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Billing.TopUpAsync(new BillingTopUpParams\n{\n    AmountInDollars = 50.0,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم إنشاء جلسة الدفع المستضافة. أعد توجيه المستخدم إلى `checkout_session_url` لإتمام الدفع.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "checkout_session_id",
                    "checkout_session_url"
                  ],
                  "properties": {
                    "checkout_session_id": {
                      "type": "string",
                      "description": "معرّف جلسة الدفع المستضافة (مثل `cs_test_a1B2c3...`). مفيد للتسوية من جانب الخادم."
                    },
                    "checkout_session_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "رابط URL لصفحة دفع مستضافة للاستخدام لمرة واحدة. أعد توجيه العميل إلى هنا لإتمام الدفع."
                    }
                  }
                },
                "examples": {
                  "Created": {
                    "value": {
                      "checkout_session_id": "cs_test_a1B2c3D4e5F6g7H8i9J0",
                      "checkout_session_url": "https://checkout.example.com/c/pay/cs_test_a1B2c3D4e5F6g7H8i9J0"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "payload غير صالح: المبلغ مفقود، أو ليس رقماً، أو أقل من الحد الأدنى \\$50 أو أعلى من الحد الأقصى \\$20,000، أو أن المؤسسة تعمل بموجب عقد Enterprise سنوي. جسم الخطأ هو مصفوفة JSON.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing amount": {
                    "value": [
                      "amount_in_dollars is required."
                    ]
                  },
                  "Not a number": {
                    "value": [
                      "amount_in_dollars must be a number."
                    ]
                  },
                  "Below minimum": {
                    "value": [
                      "Amount must be at least $50."
                    ]
                  },
                  "Above maximum": {
                    "value": [
                      "Amount must be at most $20,000."
                    ]
                  },
                  "Annual plan": {
                    "value": [
                      "You have an annual plan. Contact your account manager to top up."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح إنشاء جلسات شحن الرصيد لهذه المؤسسة. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/webhook/destinations/": {
      "get": {
        "summary": "عرض قائمة بوجهات webhook",
        "description": "سرد جميع وجهات webhook (مصفوفة غير مقسمة إلى صفحات، الأقدم أولاً). يتضمن كل عنصر إعدادات الوجهة، ومقاييس التسليم الخاصة بها لآخر 30 يوماً (`metrics_window_days`) مع إدخال `daily_points` واحد لكل يوم، وحالة التشغيل الخاصة بها (`health_status` و`failing_streak` و`failing_since` و`last_success_at`). لا تحتوي القائمة على كائن `summary` ولا تتضمن أبداً سر التوقيع: يُظهر كل عنصر `secret_last4` فقط. قم بجلب وجهة واحدة (`GET /v3/webhook/destinations/{destination_uuid}/`) لقراءة `secret_shared_key`.",
        "operationId": "list_webhook_destinations",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/webhook/destinations/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.list()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.list();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.List(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().list();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->destinations->list();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.webhooks.destinations.list.each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.ListAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "عرض وجهات webhook (بدون تقسيم إلى صفحات، الأقدم أولاً).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "معرّف الوجهة الثابت؛ يُستخدم كـ `{destination_uuid}` للتحديث/الحذف."
                      },
                      "label": {
                        "type": "string",
                        "description": "اسم سهل القراءة معروض في Console."
                      },
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "رابط الوجهة الذي يتلقى طلبات `POST` مع payload الخاص بـ webhook."
                      },
                      "enabled": {
                        "type": "boolean",
                        "description": "عندما تكون القيمة `false`، تتخطى Didit التسليم إلى هذه الوجهة دون إشعار."
                      },
                      "webhook_version": {
                        "type": "string",
                        "enum": [
                          "v1",
                          "v2",
                          "v3"
                        ],
                        "description": "إصدار مخطط payload المرسل إلى هذه الوجهة. الإصدار `v3` هو التنسيق الحالي/الموصى به."
                      },
                      "subscribed_events": {
                        "$ref": "#/components/schemas/WebhookSubscribedEvents"
                      },
                      "subscribed_events_count": {
                        "type": "integer",
                        "description": "طول `subscribed_events` المخزن مؤقتاً، وهو مفيد لعرض واجهة المستخدم."
                      },
                      "deliveries_count": {
                        "type": "integer",
                        "description": "محاولات التسليم (بما في ذلك عمليات إعادة المحاولة) التي تمت إلى هذه الوجهة في آخر 30 يوماً."
                      },
                      "failed_deliveries_count": {
                        "type": "integer",
                        "description": "محاولات التسليم خلال آخر 30 يوماً التي استجابت لها الوجهة برمز HTTP 400 أو أعلى، أو لم تستجب لها (انتهاء المهلة، أو رفض الاتصال، أو عنوان محظور)."
                      },
                      "average_response_time_ms": {
                        "type": "integer",
                        "nullable": true,
                        "description": "متوسط وقت الاستجابة بالمللي ثانية على مدار آخر 30 يومًا، مقربًا إلى عدد صحيح. يكون `null` عندما لا توجد عمليات تسليم في تلك النافذة."
                      },
                      "error_rate_percentage": {
                        "type": "integer",
                        "description": "`round(failed_deliveries_count / deliveries_count * 100)` على مدار آخر 30 يوماً؛ `0` عند عدم وجود عمليات تسليم."
                      },
                      "last_delivery_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "الطابع الزمني لأحدث محاولة تسليم (ناجحة أو فاشلة). يكون `null` إذا لم يتم التسليم مطلقًا."
                      },
                      "metrics_window_days": {
                        "type": "integer",
                        "description": "طول النافذة الزمنية بالأيام التي تغطيها الحقول `deliveries_count` و`failed_deliveries_count` و`average_response_time_ms` و`error_rate_percentage` و`daily_points`. القيمة دائماً `30`."
                      },
                      "health_status": {
                        "type": "string",
                        "enum": [
                          "healthy",
                          "degraded",
                          "failing"
                        ],
                        "description": "حالة التشغيل للتسليم. `failing`: فشل 3 أحداث متتالية أو أكثر في أول محاولة تسليم لها منذ آخر استجابة ناجحة للوجهة (راجع `failing_streak`). `degraded`: ليست في حالة failing، ولكن فشلت محاولة تسليم خلال آخر 24 ساعة ولم تنجح أي محاولة لاحقة في تسليم ذلك الحدث؛ وستؤدي إعادة المحاولة أو إعادة الإرسال التي تنجح في تسليمه إلى محو هذه الحالة. `healthy`: ليست في أي من الحالتين السابقتين. مستقلة عن `enabled`. المحاولة الفاشلة هي المحاولة التي تمت الاستجابة لها برمز HTTP 400 أو أعلى، أو لم تتم الاستجابة لها على الإطلاق."
                      },
                      "failing_streak": {
                        "type": "integer",
                        "description": "عدد الأحداث المتتالية التي فشلت محاولة تسليمها الأولى منذ آخر استجابة ناجحة للوجهة، خلال آخر 30 يوماً. لا تُحتسب عمليات إعادة المحاولة، وأي محاولة ناجحة، بما في ذلك إعادة المحاولة أو إعادة الإرسال، تنهي سلسلة الفشل. تكون القيمة `0` عندما لا يفشل أي حدث منذ آخر نجاح."
                      },
                      "failing_since": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "وقت إجراء أول محاولة فاشلة في `failing_streak` الحالية. تكون القيمة `null` عندما تكون `failing_streak` تساوي `0`."
                      },
                      "last_success_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "وقت آخر استجابة من الوجهة لتسليم بحالة HTTP أقل من 400، خلال آخر 30 يوماً. وتكون القيمة `null` إذا لم تُجب خلال تلك الفترة بتسليم ذي حالة HTTP أقل من 400."
                      },
                      "environment": {
                        "type": "string",
                        "enum": [
                          "live",
                          "sandbox"
                        ],
                        "description": "بيئة التطبيق الذي يملك الوجهة."
                      },
                      "daily_points": {
                        "type": "array",
                        "description": "إدخال واحد لكل يوم بتوقيت UTC خلال آخر 30 يوماً، بدءاً من الأقدم، بما في ذلك الأيام التي لم تشهد أي عمليات تسليم. يحتسب كل محاولة، بما في ذلك عمليات إعادة المحاولة.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "format": "date",
                              "description": "يوم UTC."
                            },
                            "total_deliveries": {
                              "type": "integer",
                              "description": "محاولات التسليم التي تمت في ذلك اليوم."
                            },
                            "failed_deliveries": {
                              "type": "integer",
                              "description": "المحاولات التي تمت في ذلك اليوم والتي تم الرد عليها برمز HTTP 400 أو أعلى، أو لم يتم الرد عليها على الإطلاق."
                            }
                          }
                        }
                      },
                      "secret_last4": {
                        "type": "string",
                        "description": "آخر أربعة أحرف من سر التوقيع الحالي للوجهة، لتتمكن من التمييز بين الأسرار. غير كافية للتحقق من التوقيع."
                      },
                      "created_by_email": {
                        "type": "string",
                        "nullable": true,
                        "description": "البريد الإلكتروني لعضو Business Console الذي أنشأ الوجهة. يكون `null` بالنسبة للوجهة التي تم إنشاؤها باستخدام مفتاح API."
                      },
                      "created_by_name": {
                        "type": "string",
                        "nullable": true,
                        "description": "اسم عضو Business Console الذي أنشأ الوجهة. `null` لوجهة تم إنشاؤها باستخدام مفتاح API."
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updated_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  }
                },
                "examples": {
                  "Two destinations": {
                    "value": [
                      {
                        "uuid": "11111111-2222-3333-4444-555555555555",
                        "label": "Production session webhooks",
                        "url": "https://yourapp.com/webhooks/didit",
                        "enabled": true,
                        "webhook_version": "v3",
                        "subscribed_events": [
                          "status.updated",
                          "data.updated"
                        ],
                        "subscribed_events_count": 2,
                        "deliveries_count": 12453,
                        "failed_deliveries_count": 14,
                        "average_response_time_ms": 187,
                        "error_rate_percentage": 0,
                        "last_delivery_at": "2026-05-17T09:21:18Z",
                        "metrics_window_days": 30,
                        "health_status": "healthy",
                        "failing_streak": 0,
                        "failing_since": null,
                        "last_success_at": "2026-05-17T09:21:18Z",
                        "environment": "live",
                        "daily_points": [
                          {
                            "date": "2026-04-18",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-19",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-20",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-21",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-22",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-23",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-24",
                            "total_deliveries": 415,
                            "failed_deliveries": 9
                          },
                          {
                            "date": "2026-04-25",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-26",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-27",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-28",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-29",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-30",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-01",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-02",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-03",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-04",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-05",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-06",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-07",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-08",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-09",
                            "total_deliveries": 415,
                            "failed_deliveries": 5
                          },
                          {
                            "date": "2026-05-10",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-11",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-12",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-13",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-14",
                            "total_deliveries": 415,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-15",
                            "total_deliveries": 416,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-16",
                            "total_deliveries": 416,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-17",
                            "total_deliveries": 416,
                            "failed_deliveries": 0
                          }
                        ],
                        "secret_last4": "0xnQ",
                        "created_by_email": null,
                        "created_by_name": null,
                        "created_at": "2026-01-04T08:00:00Z",
                        "updated_at": "2026-04-22T14:09:11Z"
                      },
                      {
                        "uuid": "22222222-3333-4444-5555-666666666666",
                        "label": "Staging mirror",
                        "url": "https://staging.yourapp.com/webhooks/didit",
                        "enabled": false,
                        "webhook_version": "v3",
                        "subscribed_events": [
                          "status.updated"
                        ],
                        "subscribed_events_count": 1,
                        "deliveries_count": 0,
                        "failed_deliveries_count": 0,
                        "average_response_time_ms": null,
                        "error_rate_percentage": 0,
                        "last_delivery_at": null,
                        "metrics_window_days": 30,
                        "health_status": "healthy",
                        "failing_streak": 0,
                        "failing_since": null,
                        "last_success_at": null,
                        "environment": "live",
                        "daily_points": [
                          {
                            "date": "2026-04-18",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-19",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-20",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-21",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-22",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-23",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-24",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-25",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-26",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-27",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-28",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-29",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-04-30",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-01",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-02",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-03",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-04",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-05",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-06",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-07",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-08",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-09",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-10",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-11",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-12",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-13",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-14",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-15",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-16",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          },
                          {
                            "date": "2026-05-17",
                            "total_deliveries": 0,
                            "failed_deliveries": 0
                          }
                        ],
                        "secret_last4": "k9Qe",
                        "created_by_email": "reviewer@example.com",
                        "created_by_name": "Example Reviewer",
                        "created_at": "2026-03-12T10:15:02Z",
                        "updated_at": "2026-03-12T10:15:02Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف. يُرجع المفتاح المفقود رمز الحالة `403`؛ بينما يُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية رمز الحالة `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء وجهة webhook",
        "description": "أنشئ وجهة webhook. تتضمن الاستجابة سر توقيع HMAC المُنشأ تلقائياً `secret_shared_key` (يمكن قراءته أيضاً لاحقاً عبر `GET /v3/webhook/destinations/{destination_uuid}/`). أرسل دائماً `subscribed_events` مع حدث واحد على الأقل (بدون أحرف بدل): يتم رفض القائمة الفارغة الصريحة برمز 400، ويؤدي حذف الحقل إلى إنشاء وجهة غير مشتركة في أي شيء، والتي لن تتلقى أي webhook أبداً. يجب أن يكون الزوج `(application, url)` فريداً بين وجهات التطبيق.",
        "operationId": "create_webhook_destination",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/webhook/destinations/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"label\": \"Production session webhooks\",\n    \"url\": \"https://yourapp.com/webhooks/didit\",\n    \"webhook_version\": \"v3\",\n    \"subscribed_events\": [\"status.updated\", \"data.updated\"]\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.create(\n    label=\"Production session webhooks\",\n    url=\"https://yourapp.com/webhooks/didit\",\n    webhook_version=\"v3\",\n    subscribed_events=[\"status.updated\", \"data.updated\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.create({\n  label: \"Production session webhooks\",\n  url: \"https://yourapp.com/webhooks/didit\",\n  webhook_version: \"v3\",\n  subscribed_events: [\"status.updated\", \"data.updated\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.Create(ctx, didit.WebhooksDestinationsCreateParams{\n\tLabel:            \"Production session webhooks\",\n\tURL:              \"https://yourapp.com/webhooks/didit\",\n\tWebhookVersion:   didit.Some(didit.WebhooksDestinationsCreateParamsWebhookVersion(\"v3\")),\n\tSubscribedEvents: didit.Some([]didit.WebhookEvent{didit.WebhookEvent(\"status.updated\"), didit.WebhookEvent(\"data.updated\")}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.WebhookEvent;\nimport me.didit.types.WebhooksDestinationsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().create(WebhooksDestinationsCreateParams.builder()\n        .label(\"Production session webhooks\")\n        .url(\"https://yourapp.com/webhooks/didit\")\n        .webhookVersion(WebhooksDestinationsCreateParams.WebhookVersion.of(\"v3\"))\n        .subscribedEvents(List.of(WebhookEvent.of(\"status.updated\"), WebhookEvent.of(\"data.updated\")))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->destinations->create([\n    'label' => 'Production session webhooks',\n    'url' => 'https://yourapp.com/webhooks/didit',\n    'webhook_version' => 'v3',\n    'subscribed_events' => ['status.updated', 'data.updated'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.create(\n  label: \"Production session webhooks\",\n  url: \"https://yourapp.com/webhooks/didit\",\n  webhook_version: \"v3\",\n  subscribed_events: [\"status.updated\", \"data.updated\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.CreateAsync(new WebhooksDestinationsCreateParams\n{\n    Label = \"Production session webhooks\",\n    Url = \"https://yourapp.com/webhooks/didit\",\n    WebhookVersion = new WebhooksDestinationsCreateParamsWebhookVersion(\"v3\"),\n    SubscribedEvents = new WebhookEvent[] { \"status.updated\", \"data.updated\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "label",
                  "url"
                ],
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "اسم سهل القراءة يُعرض في Console ← Webhooks. يساعد في التمييز بين الوجهات عندما يكون لديك عدة وجهات (مثل \"Prod\"، \"Staging mirror\")."
                  },
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "رابط HTTPS الذي سيتلقى طلبات `POST`. يجب أن يكون فريداً بين وجهات التطبيق. استخدم endpoint مستقراً ومؤمّناً: تعيد Didit محاولة عمليات التسليم الفاشلة وفق جدول زمني تصاعدي.",
                    "maxLength": 2000
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "عندما تكون القيمة `false`، يتم حفظ الوجهة ولكن Didit لن ترسل إليها أي webhooks. هذا مفيد لإعدادات بيئات الاختبار التي تريد إبقاءها معلقة مؤقتاً."
                  },
                  "webhook_version": {
                    "type": "string",
                    "enum": [
                      "v1",
                      "v2",
                      "v3"
                    ],
                    "description": "إصدار مخطط payload الذي سترسله Didit. الإصدار `v3` هو التنسيق الحالي/الموصى به؛ ويتم الاحتفاظ بالإصدارات الأقدم للتوافق مع عمليات التكامل القديمة."
                  },
                  "subscribed_events": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/WebhookSubscribedEvents"
                      }
                    ],
                    "description": "الأحداث المراد تسليمها. مطلوبة عملياً: يتم رفض `[]` الصريحة بالرمز 400، ويؤدي حذف الحقل إلى إنشاء وجهة بدون أي اشتراكات ولا تتلقى أي شيء."
                  }
                }
              },
              "examples": {
                "session_updates": {
                  "summary": "تحديثات حالة الجلسة والبيانات",
                  "value": {
                    "label": "Production session webhooks",
                    "url": "https://yourapp.com/webhooks/didit",
                    "webhook_version": "v3",
                    "subscribed_events": [
                      "status.updated",
                      "data.updated"
                    ]
                  }
                },
                "transaction_updates": {
                  "summary": "تحديثات مراقبة المعاملات",
                  "value": {
                    "label": "Transaction monitoring webhooks",
                    "url": "https://yourapp.com/webhooks/didit-transactions",
                    "webhook_version": "v3",
                    "subscribed_events": [
                      "transaction.created",
                      "transaction.status.updated"
                    ]
                  }
                },
                "entity_updates": {
                  "summary": "تحديثات كيانات المستخدم والشركة",
                  "value": {
                    "label": "Entity lifecycle webhooks",
                    "url": "https://yourapp.com/webhooks/didit-entities",
                    "webhook_version": "v3",
                    "subscribed_events": [
                      "user.status.updated",
                      "user.data.updated",
                      "business.status.updated",
                      "business.data.updated",
                      "activity.created"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "تم إنشاء الوجهة. `secret_shared_key` هو السر المشترك لتوقيع HMAC — خزّنه الآن.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الوجهة الثابت. يُستخدم كـ `{destination_uuid}` في الاستدعاءات اللاحقة."
                    },
                    "label": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "webhook_version": {
                      "type": "string",
                      "enum": [
                        "v1",
                        "v2",
                        "v3"
                      ]
                    },
                    "secret_shared_key": {
                      "type": "string",
                      "description": "سر توقيع HMAC يتم إنشاؤه تلقائياً ويكون مرتبطاً بهذه الوجهة (token آمن لعناوين URL بطول 43 حرفاً). استخدمه للتحقق من رؤوس التوقيع على webhooks الواردة. يتم إرجاعه دائماً بالكامل للمتصلين عبر مفتاح API؛ ويحتاج مستخدمو لوحة التحكم إلى إذن `read:webhooks`، وإلا فسيظهر لهم نص فارغ."
                    },
                    "secret_last4": {
                      "type": "string",
                      "description": "آخر أربعة أحرف من سر التوقيع الحالي للوجهة، لتتمكن من التمييز بين الأسرار. غير كافية للتحقق من التوقيع."
                    },
                    "previous_secret_expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "يُعيَّن لمدة 24 ساعة بعد تدوير سر التوقيع للوجهة في Business Console. حتى هذا الوقت، يحمل كل تسليم إلى الوجهة أيضاً `X-Signature-Previous` و `X-Signature-V2-Previous` و `X-Signature-Simple-Previous`، المنشأة باستخدام السر المُستبدل (انظر [التحقق من التوقيع](/ar/integration/webhooks#التحقق-من-التوقيع)). تكون القيمة `null` في حال عدم حدوث أي تدوير خلال آخر 24 ساعة."
                    },
                    "subscribed_events": {
                      "$ref": "#/components/schemas/WebhookSubscribedEvents"
                    },
                    "created_by_email": {
                      "type": "string",
                      "nullable": true,
                      "description": "البريد الإلكتروني لعضو Business Console الذي أنشأ الوجهة. يكون `null` بالنسبة للوجهة التي تم إنشاؤها باستخدام مفتاح API."
                    },
                    "created_by_name": {
                      "type": "string",
                      "nullable": true,
                      "description": "اسم عضو Business Console الذي أنشأ الوجهة. `null` لوجهة تم إنشاؤها باستخدام مفتاح API."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "health_status": {
                      "type": "string",
                      "enum": [
                        "healthy",
                        "degraded",
                        "failing"
                      ],
                      "description": "حالة التشغيل للتسليم. `failing`: فشل 3 أحداث متتالية أو أكثر في أول محاولة تسليم لها منذ آخر استجابة ناجحة للوجهة (راجع `failing_streak`). `degraded`: ليست في حالة failing، ولكن فشلت محاولة تسليم خلال آخر 24 ساعة ولم تنجح أي محاولة لاحقة في تسليم ذلك الحدث؛ وستؤدي إعادة المحاولة أو إعادة الإرسال التي تنجح في تسليمه إلى محو هذه الحالة. `healthy`: ليست في أي من الحالتين السابقتين. مستقلة عن `enabled`. المحاولة الفاشلة هي المحاولة التي تمت الاستجابة لها برمز HTTP 400 أو أعلى، أو لم تتم الاستجابة لها على الإطلاق."
                    },
                    "failing_streak": {
                      "type": "integer",
                      "description": "عدد الأحداث المتتالية التي فشلت محاولة تسليمها الأولى منذ آخر استجابة ناجحة للوجهة، خلال آخر 30 يوماً. لا تُحتسب عمليات إعادة المحاولة، وأي محاولة ناجحة، بما في ذلك إعادة المحاولة أو إعادة الإرسال، تنهي سلسلة الفشل. تكون القيمة `0` عندما لا يفشل أي حدث منذ آخر نجاح."
                    },
                    "failing_since": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "وقت إجراء أول محاولة فاشلة في `failing_streak` الحالية. تكون القيمة `null` عندما تكون `failing_streak` تساوي `0`."
                    },
                    "last_success_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "وقت آخر استجابة من الوجهة لتسليم بحالة HTTP أقل من 400، خلال آخر 30 يوماً. وتكون القيمة `null` إذا لم تُجب خلال تلك الفترة بتسليم ذي حالة HTTP أقل من 400."
                    },
                    "environment": {
                      "type": "string",
                      "enum": [
                        "live",
                        "sandbox"
                      ],
                      "description": "بيئة التطبيق الذي يملك الوجهة."
                    },
                    "summary": {
                      "type": "object",
                      "description": "مقاييس التسليم لآخر `metrics_window_days` (30) يوماً. `last_delivery_at` هي أحدث محاولة، بغض النظر عن وقت إجرائها.",
                      "properties": {
                        "total_deliveries": {
                          "type": "integer"
                        },
                        "failed_deliveries": {
                          "type": "integer"
                        },
                        "error_rate_percentage": {
                          "type": "integer"
                        },
                        "min_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "avg_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "max_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "last_delivery_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "metrics_window_days": {
                          "type": "integer",
                          "description": "طول النافذة الزمنية بالأيام التي تغطيها مقاييس الملخص الأخرى. القيمة دائماً `30`."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Created": {
                    "value": {
                      "uuid": "11111111-2222-3333-4444-555555555555",
                      "label": "Production session webhooks",
                      "url": "https://yourapp.com/webhooks/didit",
                      "enabled": true,
                      "webhook_version": "v3",
                      "secret_shared_key": "tno2NTeRC1ZK3sBOYlBJDyEzBVENl3pQ1AcZyAW0xnQ",
                      "secret_last4": "0xnQ",
                      "previous_secret_expires_at": null,
                      "subscribed_events": [
                        "status.updated",
                        "data.updated"
                      ],
                      "created_by_email": null,
                      "created_by_name": null,
                      "created_at": "2026-05-17T10:00:00Z",
                      "updated_at": "2026-05-17T10:00:00Z",
                      "health_status": "healthy",
                      "failing_streak": 0,
                      "failing_since": null,
                      "last_success_at": null,
                      "environment": "live",
                      "summary": {
                        "total_deliveries": 0,
                        "failed_deliveries": 0,
                        "error_rate_percentage": 0,
                        "min_response_time_ms": null,
                        "avg_response_time_ms": null,
                        "max_response_time_ms": null,
                        "last_delivery_at": null,
                        "metrics_window_days": 30
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق — عادةً بسبب تكرار عنوان URL، أو عدم وجود/عدم صلاحية `subscribed_events`، أو اسم حدث غير معروف.",
            "content": {
              "application/json": {
                "examples": {
                  "Duplicate URL": {
                    "value": {
                      "url": [
                        "This webhook destination already exists for the application."
                      ]
                    }
                  },
                  "Empty events list": {
                    "value": {
                      "subscribed_events": [
                        "At least one subscribed event is required."
                      ]
                    }
                  },
                  "Unknown event": {
                    "value": {
                      "subscribed_events": [
                        "Unsupported webhook events: foo.bar"
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف. يُرجع المفتاح المفقود رمز الحالة `403`؛ بينما يُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية رمز الحالة `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/webhook/destinations/{destination_uuid}/": {
      "get": {
        "summary": "الحصول على وجهة webhook",
        "description": "استرداد وجهة webhook واحدة مع سر التوقيع `secret_shared_key` الخاص بها، وحالة التشغيل (`health_status`، `failing_streak`، `failing_since`، `last_success_at`) و`summary` لعمليات التسليم لآخر 30 يوماً. يتلقى المتصلون عبر مفتاح API السر دائماً بالكامل؛ بينما يرى مستخدمو لوحة التحكم الذين لا يملكون `read:webhooks` سلسلة فارغة.",
        "operationId": "get_webhook_destination",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "destination_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للوجهة (الـ `uuid` المُرجع من الإنشاء / الإدراج).",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->destinations->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل وجهة webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "label": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "webhook_version": {
                      "type": "string",
                      "enum": [
                        "v1",
                        "v2",
                        "v3"
                      ]
                    },
                    "secret_shared_key": {
                      "type": "string",
                      "description": "سر توقيع HMAC (token آمن في عناوين URL بطول 43 حرفًا). يُعاد دائمًا بالكامل للمستدعين عبر مفتاح API؛ يحتاج مستخدمو لوحة التحكم إلى إذن `read:webhooks`، وإلا فسيكون نصًا فارغًا."
                    },
                    "secret_last4": {
                      "type": "string",
                      "description": "آخر أربعة أحرف من سر التوقيع الحالي للوجهة، لتتمكن من التمييز بين الأسرار. غير كافية للتحقق من التوقيع."
                    },
                    "previous_secret_expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "يُعيَّن لمدة 24 ساعة بعد تدوير سر التوقيع للوجهة في Business Console. حتى هذا الوقت، يحمل كل تسليم إلى الوجهة أيضاً `X-Signature-Previous` و `X-Signature-V2-Previous` و `X-Signature-Simple-Previous`، المنشأة باستخدام السر المُستبدل (انظر [التحقق من التوقيع](/ar/integration/webhooks#التحقق-من-التوقيع)). تكون القيمة `null` في حال عدم حدوث أي تدوير خلال آخر 24 ساعة."
                    },
                    "subscribed_events": {
                      "$ref": "#/components/schemas/WebhookSubscribedEvents"
                    },
                    "created_by_email": {
                      "type": "string",
                      "nullable": true,
                      "description": "البريد الإلكتروني لعضو Business Console الذي أنشأ الوجهة. يكون `null` بالنسبة للوجهة التي تم إنشاؤها باستخدام مفتاح API."
                    },
                    "created_by_name": {
                      "type": "string",
                      "nullable": true,
                      "description": "اسم عضو Business Console الذي أنشأ الوجهة. `null` لوجهة تم إنشاؤها باستخدام مفتاح API."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "health_status": {
                      "type": "string",
                      "enum": [
                        "healthy",
                        "degraded",
                        "failing"
                      ],
                      "description": "حالة التشغيل للتسليم. `failing`: فشل 3 أحداث متتالية أو أكثر في أول محاولة تسليم لها منذ آخر استجابة ناجحة للوجهة (راجع `failing_streak`). `degraded`: ليست في حالة failing، ولكن فشلت محاولة تسليم خلال آخر 24 ساعة ولم تنجح أي محاولة لاحقة في تسليم ذلك الحدث؛ وستؤدي إعادة المحاولة أو إعادة الإرسال التي تنجح في تسليمه إلى محو هذه الحالة. `healthy`: ليست في أي من الحالتين السابقتين. مستقلة عن `enabled`. المحاولة الفاشلة هي المحاولة التي تمت الاستجابة لها برمز HTTP 400 أو أعلى، أو لم تتم الاستجابة لها على الإطلاق."
                    },
                    "failing_streak": {
                      "type": "integer",
                      "description": "عدد الأحداث المتتالية التي فشلت محاولة تسليمها الأولى منذ آخر استجابة ناجحة للوجهة، خلال آخر 30 يوماً. لا تُحتسب عمليات إعادة المحاولة، وأي محاولة ناجحة، بما في ذلك إعادة المحاولة أو إعادة الإرسال، تنهي سلسلة الفشل. تكون القيمة `0` عندما لا يفشل أي حدث منذ آخر نجاح."
                    },
                    "failing_since": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "وقت إجراء أول محاولة فاشلة في `failing_streak` الحالية. تكون القيمة `null` عندما تكون `failing_streak` تساوي `0`."
                    },
                    "last_success_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "وقت آخر استجابة من الوجهة لتسليم بحالة HTTP أقل من 400، خلال آخر 30 يوماً. وتكون القيمة `null` إذا لم تُجب خلال تلك الفترة بتسليم ذي حالة HTTP أقل من 400."
                    },
                    "environment": {
                      "type": "string",
                      "enum": [
                        "live",
                        "sandbox"
                      ],
                      "description": "بيئة التطبيق الذي يملك الوجهة."
                    },
                    "summary": {
                      "type": "object",
                      "description": "مقاييس التسليم لآخر `metrics_window_days` (30) يوماً. `last_delivery_at` هي أحدث محاولة، بغض النظر عن وقت إجرائها.",
                      "properties": {
                        "total_deliveries": {
                          "type": "integer"
                        },
                        "failed_deliveries": {
                          "type": "integer"
                        },
                        "error_rate_percentage": {
                          "type": "integer"
                        },
                        "min_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "avg_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "max_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "last_delivery_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "metrics_window_days": {
                          "type": "integer",
                          "description": "طول النافذة الزمنية بالأيام التي تغطيها مقاييس الملخص الأخرى. القيمة دائماً `30`."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Healthy destination": {
                    "value": {
                      "uuid": "11111111-2222-3333-4444-555555555555",
                      "label": "Production session webhooks",
                      "url": "https://yourapp.com/webhooks/didit",
                      "enabled": true,
                      "webhook_version": "v3",
                      "secret_shared_key": "tno2NTeRC1ZK3sBOYlBJDyEzBVENl3pQ1AcZyAW0xnQ",
                      "secret_last4": "0xnQ",
                      "previous_secret_expires_at": null,
                      "subscribed_events": [
                        "status.updated",
                        "data.updated"
                      ],
                      "created_by_email": null,
                      "created_by_name": null,
                      "created_at": "2026-01-04T08:00:00Z",
                      "updated_at": "2026-04-22T14:09:11Z",
                      "health_status": "healthy",
                      "failing_streak": 0,
                      "failing_since": null,
                      "last_success_at": "2026-05-17T09:21:18Z",
                      "environment": "live",
                      "summary": {
                        "total_deliveries": 12453,
                        "failed_deliveries": 14,
                        "error_rate_percentage": 0,
                        "min_response_time_ms": 41,
                        "avg_response_time_ms": 187,
                        "max_response_time_ms": 2103,
                        "last_delivery_at": "2026-05-17T09:21:18Z",
                        "metrics_window_days": 30
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف. يُرجع المفتاح المفقود رمز الحالة `403`؛ بينما يُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية رمز الحالة `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد وجهة بهذا المعرّف UUID، أو أنها تنتمي إلى تطبيق مختلف، أو قد تم حذفها.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Webhook destination not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث وجهة webhook",
        "description": "تحديث وجهة webhook. **يتم استبدال `subscribed_events` بالكامل، وليس دمجه**: استرد أولاً، ثم أضف، ثم أعد الإرسال. لا يتم تدوير السر. يتم تجاهل `uuid` في نص الطلب: يحدد المسار اسم الوجهة.",
        "operationId": "update_webhook_destination",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "destination_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للوجهة المراد تحديثها.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "اسم جديد مقروء للمستخدمين."
                  },
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "رابط URL المستهدف الجديد. يجب أن يكون فريداً داخل التطبيق."
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "يُضبط على `false` لإيقاف عمليات التسليم مؤقتاً إلى هذه الوجهة دون حذفها."
                  },
                  "webhook_version": {
                    "type": "string",
                    "enum": [
                      "v1",
                      "v2",
                      "v3"
                    ],
                    "description": "إصدار مخطط payload الجديد لعمليات التسليم المستقبلية."
                  },
                  "subscribed_events": {
                    "$ref": "#/components/schemas/WebhookSubscribedEvents"
                  }
                }
              },
              "examples": {
                "Pause destination": {
                  "value": {
                    "enabled": false
                  }
                },
                "Add transaction events": {
                  "value": {
                    "subscribed_events": [
                      "status.updated",
                      "data.updated",
                      "transaction.created",
                      "transaction.status.updated"
                    ]
                  }
                },
                "Move target URL": {
                  "value": {
                    "label": "Production session webhooks v2",
                    "url": "https://api.yourapp.com/webhooks/didit/v2"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"subscribed_events\": [\n      \"status.updated\",\n      \"data.updated\",\n      \"transaction.created\"\n    ]\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    enabled=False,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.update(\"11111111-2222-3333-4444-555555555555\", {\n  enabled: false,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WebhooksDestinationsUpdateParams{\n\tEnabled: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.WebhooksDestinationsUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().update(\"11111111-2222-3333-4444-555555555555\", WebhooksDestinationsUpdateParams.builder()\n        .enabled(false)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->destinations->update('11111111-2222-3333-4444-555555555555', [\n    'enabled' => false,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  enabled: false\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new WebhooksDestinationsUpdateParams\n{\n    Enabled = false,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "وجهة webhook المحدّثة. المحتوى له نفس بنية `GET /v3/webhook/destinations/{destination_uuid}/`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "label": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "webhook_version": {
                      "type": "string",
                      "enum": [
                        "v1",
                        "v2",
                        "v3"
                      ]
                    },
                    "secret_shared_key": {
                      "type": "string"
                    },
                    "secret_last4": {
                      "type": "string",
                      "description": "آخر أربعة أحرف من سر التوقيع الحالي للوجهة، لتتمكن من التمييز بين الأسرار. غير كافية للتحقق من التوقيع."
                    },
                    "previous_secret_expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "يُعيَّن لمدة 24 ساعة بعد تدوير سر التوقيع للوجهة في Business Console. حتى هذا الوقت، يحمل كل تسليم إلى الوجهة أيضاً `X-Signature-Previous` و `X-Signature-V2-Previous` و `X-Signature-Simple-Previous`، المنشأة باستخدام السر المُستبدل (انظر [التحقق من التوقيع](/ar/integration/webhooks#التحقق-من-التوقيع)). تكون القيمة `null` في حال عدم حدوث أي تدوير خلال آخر 24 ساعة."
                    },
                    "subscribed_events": {
                      "$ref": "#/components/schemas/WebhookSubscribedEvents"
                    },
                    "created_by_email": {
                      "type": "string",
                      "nullable": true,
                      "description": "البريد الإلكتروني لعضو Business Console الذي أنشأ الوجهة. يكون `null` بالنسبة للوجهة التي تم إنشاؤها باستخدام مفتاح API."
                    },
                    "created_by_name": {
                      "type": "string",
                      "nullable": true,
                      "description": "اسم عضو Business Console الذي أنشأ الوجهة. `null` لوجهة تم إنشاؤها باستخدام مفتاح API."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "health_status": {
                      "type": "string",
                      "enum": [
                        "healthy",
                        "degraded",
                        "failing"
                      ],
                      "description": "حالة التشغيل للتسليم. `failing`: فشل 3 أحداث متتالية أو أكثر في أول محاولة تسليم لها منذ آخر استجابة ناجحة للوجهة (راجع `failing_streak`). `degraded`: ليست في حالة failing، ولكن فشلت محاولة تسليم خلال آخر 24 ساعة ولم تنجح أي محاولة لاحقة في تسليم ذلك الحدث؛ وستؤدي إعادة المحاولة أو إعادة الإرسال التي تنجح في تسليمه إلى محو هذه الحالة. `healthy`: ليست في أي من الحالتين السابقتين. مستقلة عن `enabled`. المحاولة الفاشلة هي المحاولة التي تمت الاستجابة لها برمز HTTP 400 أو أعلى، أو لم تتم الاستجابة لها على الإطلاق."
                    },
                    "failing_streak": {
                      "type": "integer",
                      "description": "عدد الأحداث المتتالية التي فشلت محاولة تسليمها الأولى منذ آخر استجابة ناجحة للوجهة، خلال آخر 30 يوماً. لا تُحتسب عمليات إعادة المحاولة، وأي محاولة ناجحة، بما في ذلك إعادة المحاولة أو إعادة الإرسال، تنهي سلسلة الفشل. تكون القيمة `0` عندما لا يفشل أي حدث منذ آخر نجاح."
                    },
                    "failing_since": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "وقت إجراء أول محاولة فاشلة في `failing_streak` الحالية. تكون القيمة `null` عندما تكون `failing_streak` تساوي `0`."
                    },
                    "last_success_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "وقت آخر استجابة من الوجهة لتسليم بحالة HTTP أقل من 400، خلال آخر 30 يوماً. وتكون القيمة `null` إذا لم تُجب خلال تلك الفترة بتسليم ذي حالة HTTP أقل من 400."
                    },
                    "environment": {
                      "type": "string",
                      "enum": [
                        "live",
                        "sandbox"
                      ],
                      "description": "بيئة التطبيق الذي يملك الوجهة."
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "total_deliveries": {
                          "type": "integer"
                        },
                        "failed_deliveries": {
                          "type": "integer"
                        },
                        "error_rate_percentage": {
                          "type": "integer"
                        },
                        "min_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "avg_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "max_response_time_ms": {
                          "type": "integer",
                          "nullable": true
                        },
                        "last_delivery_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "metrics_window_days": {
                          "type": "integer",
                          "description": "طول النافذة الزمنية بالأيام التي تغطيها مقاييس الملخص الأخرى. القيمة دائماً `30`."
                        }
                      },
                      "description": "مقاييس التسليم لآخر `metrics_window_days` (30) يوماً. `last_delivery_at` هي أحدث محاولة، بغض النظر عن وقت إجرائها."
                    }
                  }
                },
                "examples": {
                  "Paused": {
                    "value": {
                      "uuid": "11111111-2222-3333-4444-555555555555",
                      "label": "Production session webhooks",
                      "url": "https://yourapp.com/webhooks/didit",
                      "enabled": false,
                      "webhook_version": "v3",
                      "secret_shared_key": "tno2NTeRC1ZK3sBOYlBJDyEzBVENl3pQ1AcZyAW0xnQ",
                      "secret_last4": "0xnQ",
                      "previous_secret_expires_at": null,
                      "subscribed_events": [
                        "status.updated",
                        "data.updated"
                      ],
                      "created_by_email": null,
                      "created_by_name": null,
                      "created_at": "2026-01-04T08:00:00Z",
                      "updated_at": "2026-05-17T11:02:55Z",
                      "health_status": "healthy",
                      "failing_streak": 0,
                      "failing_since": null,
                      "last_success_at": "2026-05-17T09:21:18Z",
                      "environment": "live",
                      "summary": {
                        "total_deliveries": 12453,
                        "failed_deliveries": 14,
                        "error_rate_percentage": 0,
                        "min_response_time_ms": 41,
                        "avg_response_time_ms": 187,
                        "max_response_time_ms": 2103,
                        "last_delivery_at": "2026-05-17T09:21:18Z",
                        "metrics_window_days": 30
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق (عنوان URL مكرر، أو قائمة أحداث فارغة/تتضمن أحداثًا غير معروفة، أو نص طلب مشوه).",
            "content": {
              "application/json": {
                "examples": {
                  "Duplicate URL": {
                    "value": {
                      "url": [
                        "This webhook destination already exists for the application."
                      ]
                    }
                  },
                  "Empty events": {
                    "value": {
                      "subscribed_events": [
                        "At least one subscribed event is required."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف. يُرجع المفتاح المفقود رمز الحالة `403`؛ بينما يُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية رمز الحالة `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الوجهة ذات معرّف UUID هذا غير موجودة (أو تم حذفها، أو تنتمي إلى تطبيق آخر).",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Webhook destination not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "summary": "حذف وجهة webhook",
        "description": "حذف وجهة webhook ومفتاح التوقيع السري الخاص بها وسجل التسليم بالكامل نهائياً. لا يمكن التراجع عن هذا الإجراء. لن يُرسل أي webhook جديد إلى عنوان URL الخاص بالوجهة؛ وتستمر الوجهات الأخرى المشتركة في الأحداث نفسها بتلقيها. بعد ذلك لا تعود الوجهة تظهر في `GET /v3/webhook/destinations/`، ويستجيب كل مسار ضمن `/v3/webhook/destinations/{destination_uuid}/` بالرمز 404، بما في ذلك عمليات التسليم وتفاصيل التسليم وإعادة إرساله. يُعيَّن `webhook_url` القديم للتطبيق إلى عنوان URL الخاص بأقدم وجهة مفعلة متبقية، أو يتم مسحه في حال لم يتبق أي وجهة مفعلة. يؤدي استدعاء DELETE مرة أخرى إلى إرجاع 404.",
        "operationId": "delete_webhook_destination",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "destination_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للوجهة المراد حذفها.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.webhooks.destinations.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.webhooks.destinations.delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Webhooks.Destinations.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.webhooks().destinations().delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->webhooks->destinations->delete('11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.webhooks.destinations.delete(\"11111111-2222-3333-4444-555555555555\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Webhooks.Destinations.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف الوجهة وسر التوقيع وسجل التسليم نهائياً. لا يوجد نص استجابة."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف. يُرجع المفتاح المفقود رمز الحالة `403`؛ بينما يُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية رمز الحالة `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد وجهة بهذا المعرّف UUID للتطبيق (تم حذفها بالفعل أو لم تكن موجودة مطلقاً).",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Webhook destination not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/wallet-screening/": {
      "post": {
        "summary": "فحص عنوان محفظة",
        "description": "إجراء فحص AML عند الطلب لمحفظة/عنوان عملات مشفرة واحد دون إنشاء معاملة. يحدد مزود تحليلات البلوكتشين الذي تم إعداده لتطبيقك، ويفحص العنوان بشكل متزامن، ويعيد نتيجة المخاطر الموحدة. تتوفر شبكة LIGHTNING فقط مع اتصال BYOK من Elliptic أو Chainalysis مُضاف عبر Marketplace. لا يُكتب أي شيء في جدول المعاملات. يتم احتساب استخدام واحد لمراقبة AML لكل عملية فحص ناجحة (لا يتم محاسبة تطبيقات البيئة التجريبية).",
        "operationId": "screenWallet",
        "x-didit-sdk": {
          "resource": "wallet_screening",
          "method": "screen",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet_address"
                ],
                "properties": {
                  "wallet_address": {
                    "type": "string",
                    "description": "عنوان العملات المشفّرة أو معرّف الشبكة المراد فحصه. يجب أن يتطابق مع الشبكة المحددة (على سبيل المثال، عنوان مكون من 40 حرفاً سداسياً عشرياً يبدأ بـ `0x` لسلاسل EVM). الاسم المستعار: `address`.",
                    "example": "0x94f1b9b64e2932f6a2db338f616844400cd58e8a"
                  },
                  "blockchain": {
                    "type": "string",
                    "description": "معرّف شبكة اختياري. عند إغفاله، تتم قراءة الشبكة من تنسيق العنوان: العناوين التي تبدأ بـ `bc1` و `1` و `3` هي Bitcoin (BTC)، والعناوين التي تبدأ بـ `T` هي Tron (TRX)، ومفاتيح base58 العامة هي Solana (SOL). يُعد عنوان `0x` صالحاً على كل شبكة EVM، لذا فإن إغفال `blockchain` له يُرجع 422 مع الشبكات المرشحة في `candidate_chains`. يدعم الفحص المُدار BTC و ETH و LTC و XRP و BCH و DOGE و TRX و SOL و MATIC و BNB و BASE (Base) و OP (Optimism) و ARB (Arbitrum One) و AVAX (Avalanche C-Chain) و ADA (Cardano) و XLM (Stellar) و HBAR (Hedera). يُعد كل من USDT و USDC أسماء مستعارة قديمة لـ Ethereum، وليسا بحثاً متعدد الشبكات. تختلف تغطية موفر الخدمة المتصل. يتطلب LIGHTNING موفر خدمة متصل مدعوماً. يتم فحص CELO (Celo) و MODE (Mode) و PLUME (Plume) من خلال حساب TRM Labs متصل؛ ويُرجع الفحص المُدار رمز 400 لها. الاسم المستعار: `currency`.",
                    "enum": [
                      "BTC",
                      "LIGHTNING",
                      "ETH",
                      "LTC",
                      "XRP",
                      "BCH",
                      "DOGE",
                      "TRX",
                      "SOL",
                      "MATIC",
                      "BNB",
                      "USDT",
                      "USDC",
                      "BASE",
                      "OP",
                      "ARB",
                      "AVAX",
                      "ADA",
                      "XLM",
                      "HBAR",
                      "CELO",
                      "MODE",
                      "PLUME"
                    ],
                    "example": "ETH"
                  },
                  "direction": {
                    "type": "string",
                    "description": "اختياري. ما إذا كان يتم فحص العنوان كطرف مقابل وارد (إيداع) أو صادر (سحب). يقبل `inbound` أو `outbound` أو `deposit` أو `withdrawal`. يتم تعيينه افتراضياً على فحص محايد قبل التحويل عند حذفه. يتم تمرير هذا إلى المزود كمعلومات سياقية فقط؛ ولا يغير `risk_score` أو `severity` أو تفاصيل `source_of_funds`/`destination_of_funds` المسترجعة، والتي يتم إرجاع كلاهما دائماً بغض النظر عن `direction`. لذلك، فإن تغيير `direction` أو حذفه لا يتطلب إعادة فحص العنوان.",
                    "enum": [
                      "inbound",
                      "outbound",
                      "deposit",
                      "withdrawal"
                    ]
                  }
                }
              },
              "example": {
                "wallet_address": "0x94f1b9b64e2932f6a2db338f616844400cd58e8a",
                "blockchain": "ETH"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/wallet-screening/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"wallet_address\": \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n    \"blockchain\": \"ETH\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.wallet_screening.screen(\n    wallet_address=\"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n    blockchain=\"ETH\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.walletScreening.screen({\n  wallet_address: \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n  blockchain: \"ETH\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.WalletScreening.Screen(ctx, didit.WalletScreeningScreenParams{\n\tWalletAddress: \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n\tBlockchain:    didit.Some(didit.WalletScreeningScreenParamsBlockchain(\"ETH\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.WalletScreeningScreenParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.walletScreening().screen(WalletScreeningScreenParams.builder()\n        .walletAddress(\"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\")\n        .blockchain(WalletScreeningScreenParams.Blockchain.of(\"ETH\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->walletScreening->screen([\n    'wallet_address' => '0x94f1b9b64e2932f6a2db338f616844400cd58e8a',\n    'blockchain' => 'ETH',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.wallet_screening.screen(\n  wallet_address: \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n  blockchain: \"ETH\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.WalletScreening.ScreenAsync(new WalletScreeningScreenParams\n{\n    WalletAddress = \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n    Blockchain = new WalletScreeningScreenParamsBlockchain(\"ETH\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "نتيجة فحص المحافظ الموحّدة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletScreeningResult"
                },
                "example": {
                  "provider": "merklescience",
                  "screening_type": "WALLET_SCREENING",
                  "risk_score": 95,
                  "severity": "CRITICAL",
                  "status": "SCREENED",
                  "summary": "Merkle Science risk: Critical (5/5). SANCTIONS HIT. Dominant risk: sanctioned. Driven by: the address is attributed to Sanctions / OFAC (Example Sanctions)",
                  "wallet_address": "0x94f1b9b64e2932f6a2db338f616844400cd58e8a",
                  "transaction_hash": null,
                  "blockchain": "ETH",
                  "block_timestamp": null,
                  "total_value_usd": null,
                  "fee_usd": null,
                  "sender_rows": [],
                  "receiver_rows": [],
                  "transaction_flows": [],
                  "transaction_flows_status": null,
                  "transaction_flows_error": null,
                  "source_of_funds": [
                    {
                      "category": "sanctioned",
                      "percentage": 100.0,
                      "amount_usd": 9813695.0,
                      "entity_name": "Example Sanctions",
                      "entity_type": "Sanctions",
                      "entity_subtype": "OFAC",
                      "hops": null,
                      "description": "Sanctions / OFAC",
                      "is_direct": true,
                      "exposure_direction": "incoming",
                      "exposure_type": "direct",
                      "provider_entity_id": "118885",
                      "provider_entity_type_id": "30",
                      "provider_entity_subtype_id": "125",
                      "country": "",
                      "raw_amount": null,
                      "raw_currency": null
                    }
                  ],
                  "destination_of_funds": [
                    {
                      "category": "defi",
                      "percentage": 84.824453,
                      "amount_usd": 7783414.38,
                      "entity_name": "Example DeFi 7",
                      "entity_type": "DeFi",
                      "entity_subtype": "Bridges",
                      "hops": null,
                      "description": "DeFi / Bridges",
                      "is_direct": false,
                      "exposure_direction": "outgoing",
                      "exposure_type": "indirect",
                      "provider_entity_id": "118459",
                      "provider_entity_type_id": "33",
                      "provider_entity_subtype_id": "143",
                      "country": "",
                      "raw_amount": null,
                      "raw_currency": null
                    },
                    {
                      "category": "defi",
                      "percentage": 15.175547,
                      "amount_usd": 1392494.37,
                      "entity_name": "Example DeFi 2",
                      "entity_type": "DeFi",
                      "entity_subtype": "Yield Aggregator",
                      "hops": null,
                      "description": "DeFi / Yield Aggregator",
                      "is_direct": false,
                      "exposure_direction": "outgoing",
                      "exposure_type": "indirect",
                      "provider_entity_id": "90192",
                      "provider_entity_type_id": "33",
                      "provider_entity_subtype_id": "142",
                      "country": "",
                      "raw_amount": null,
                      "raw_currency": null
                    }
                  ],
                  "counterparty_connections": [
                    {
                      "entity_name": "Example Sanctions",
                      "entity_type": "Sanctions",
                      "entity_subtype": "OFAC",
                      "risk_level": "critical",
                      "categories": [
                        "sanctioned"
                      ],
                      "received_usd": null,
                      "sent_usd": null,
                      "received_hops": null,
                      "sent_hops": null,
                      "percentage": 0.0,
                      "is_direct": true,
                      "country": null,
                      "provider_entity_id": null
                    },
                    {
                      "entity_name": "Example Sanctions",
                      "entity_type": "Sanctions",
                      "entity_subtype": "OFAC",
                      "risk_level": "critical",
                      "categories": [
                        "sanctioned"
                      ],
                      "received_usd": null,
                      "sent_usd": null,
                      "received_hops": null,
                      "sent_hops": null,
                      "percentage": 0.0,
                      "is_direct": true,
                      "country": null,
                      "provider_entity_id": null
                    }
                  ],
                  "network_nodes": [],
                  "network_edges": [],
                  "sanctions_hit": true,
                  "pep_counterparty": null,
                  "dominant_risk_category": "sanctioned",
                  "risk_factors": [
                    {
                      "source": "attribution",
                      "category": "sanctioned",
                      "label": "Sanctions / OFAC",
                      "entity_name": "Example Sanctions",
                      "direction": "attribution",
                      "exposure_type": "attribution",
                      "amount_usd": null,
                      "percentage": 0.0,
                      "is_high_risk": true,
                      "description": "the address is attributed to Sanctions / OFAC (Example Sanctions)"
                    },
                    {
                      "source": "exposure",
                      "category": "sanctioned",
                      "label": "Sanctions / OFAC",
                      "entity_name": "Example Sanctions",
                      "direction": "incoming",
                      "exposure_type": "direct",
                      "amount_usd": 9813695.0,
                      "percentage": 51.679304,
                      "is_high_risk": true,
                      "description": "51.6793% direct incoming exposure to Sanctions / OFAC (Example Sanctions)"
                    },
                    {
                      "source": "exposure",
                      "category": "defi",
                      "label": "DeFi / Bridges",
                      "entity_name": "Example DeFi 7",
                      "direction": "outgoing",
                      "exposure_type": "indirect",
                      "amount_usd": 7783414.38,
                      "percentage": 40.987766,
                      "is_high_risk": false,
                      "description": "40.9878% indirect outgoing exposure to DeFi / Bridges (Example DeFi 7)"
                    },
                    {
                      "source": "exposure",
                      "category": "defi",
                      "label": "DeFi / Yield Aggregator",
                      "entity_name": "Example DeFi 2",
                      "direction": "outgoing",
                      "exposure_type": "indirect",
                      "amount_usd": 1392494.37,
                      "percentage": 7.33293,
                      "is_high_risk": false,
                      "description": "7.33293% indirect outgoing exposure to DeFi / Yield Aggregator (Example DeFi 2)"
                    }
                  ],
                  "raw_response": {
                    "...": "provider-specific details"
                  },
                  "report_signature": "<hmac-sha256 over the result, scoped to your application>"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — عنوان محفظة غير صحيح التنسيق، أو `wallet_address` مفقود، أو `blockchain` غير مدعومة، أو تم حذف `blockchain` لعنوان لا يحدد تنسيقه أي شبكة، أو LIGHTNING دون اتصال متجر BYOK عبر Elliptic أو Chainalysis."
          },
          "401": {
            "description": "`x-api-key` مفقود أو غير صالح."
          },
          "409": {
            "description": "لم يتم إعداد أي مزود AML للتطبيق، أو أن المزود الذي تم إعداده لا يدعم فحص المحافظ بعد. قم بإعداد مراقبة المعاملات أولاً."
          },
          "422": {
            "description": "أُغفل `blockchain` لعنوان `0x`، الذي تشترك فيه جميع شبكات EVM. لا يتم فحص أي شيء أو فوترته؛ أعد الإرسال مع تعيين `blockchain` إلى إحدى `candidate_chains`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockchain": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "A 0x address is valid on every EVM chain. Send blockchain as one of: ETH, BNB, MATIC, BASE, ARB, OP, CELO, MODE, PLUME."
                      ]
                    },
                    "candidate_chains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "ETH",
                        "BNB",
                        "MATIC",
                        "BASE",
                        "ARB",
                        "OP",
                        "CELO",
                        "MODE",
                        "PLUME"
                      ]
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "تعذر على مزود AML إكمال الفحص. أعد المحاولة لاحقاً."
          }
        }
      }
    },
    "/v3/wallet-screening/pdf/": {
      "post": {
        "summary": "عرض نتيجة فحص المحفظة كملف PDF",
        "description": "مكمّل عديم الحالة لـ `POST /v3/wallet-screening/`: أعد إرسال نص JSON الدقيق الذي أرجعه ذلك الـ endpoint — بما في ذلك `report_signature` الذي أضافه — واحصل على ملف PDF يحمل علامة Didit لنفس النتيجة. لا يتم استدعاء أي مزود، ولا تتم فوترة أي شيء ولا حفظ أي بيانات؛ يقتصر هذا فقط على إعادة عرض نتيجة أنشأتها Didit بالفعل. يربط التوقيع ملف PDF بنتيجة غير معدلة: يؤدي تعديل `risk_score` أو `severity` أو `sanctions_hit` أو أي حقل موقّع آخر قبل إعادة الإرسال إلى الفشل بالرمز `400`.",
        "operationId": "screenWalletPdf",
        "x-didit-sdk": {
          "resource": "wallet_screening",
          "method": "screen_pdf",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "description": "كائن JSON غير المعدل الذي تم إرجاعه بواسطة `POST /v3/wallet-screening/`، بما في ذلك `report_signature`.",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WalletScreeningResult"
                  }
                ],
                "required": [
                  "report_signature"
                ],
                "description": "الشكل نفسه لاستجابة `POST /v3/wallet-screening/` — قم بتمرير نص الاستجابة هذا حرفياً، بما في ذلك `report_signature`."
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# $RESULT is the saved JSON body from POST /v3/wallet-screening/\ncurl -X POST 'https://verification.didit.me/v3/wallet-screening/pdf/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d \"$RESULT\" \\\n  -o wallet_screening_report.pdf"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.wallet_screening.screen_pdf(\n    provider=\"your-provider\",\n    screening_type=\"WALLET_SCREENING\",\n    risk_score=1,\n    severity=\"UNKNOWN\",\n    status=\"SCREENED\",\n    summary=\"your-summary\",\n    wallet_address=\"your-wallet-address\",\n    blockchain=\"your-blockchain\",\n    source_of_funds=[{}],\n    destination_of_funds=[{}],\n    counterparty_connections=[{}],\n    sanctions_hit=True,\n    dominant_risk_category=\"your-dominant-risk-category\",\n    report_signature=\"your-report-signature\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.walletScreening.screenPdf({\n  provider: \"your-provider\",\n  screening_type: \"WALLET_SCREENING\",\n  risk_score: 1,\n  severity: \"UNKNOWN\",\n  status: \"SCREENED\",\n  summary: \"your-summary\",\n  wallet_address: \"your-wallet-address\",\n  blockchain: \"your-blockchain\",\n  source_of_funds: [{}],\n  destination_of_funds: [{}],\n  counterparty_connections: [{}],\n  sanctions_hit: true,\n  dominant_risk_category: \"your-dominant-risk-category\",\n  report_signature: \"your-report-signature\",\n});\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.WalletScreening.ScreenPDF(ctx, didit.WalletScreeningResultParam{\n\tProvider:                \"your-provider\",\n\tScreeningType:           \"WALLET_SCREENING\",\n\tRiskScore:               1,\n\tSeverity:                \"UNKNOWN\",\n\tStatus:                  \"SCREENED\",\n\tSummary:                 \"your-summary\",\n\tWalletAddress:           \"your-wallet-address\",\n\tBlockchain:              \"your-blockchain\",\n\tSourceOfFunds:           []didit.WalletScreeningResultParamSourceOfFunds{{}},\n\tDestinationOfFunds:      []didit.WalletScreeningResultParamDestinationOfFunds{{}},\n\tCounterpartyConnections: []didit.WalletScreeningResultParamCounterpartyConnections{{}},\n\tSanctionsHit:            true,\n\tDominantRiskCategory:    didit.String(\"your-dominant-risk-category\"),\n\tReportSignature:         \"your-report-signature\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.WalletScreeningResult;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.walletScreening().screenPdf(WalletScreeningResult.builder()\n        .provider(\"your-provider\")\n        .screeningType(WalletScreeningResult.ScreeningType.of(\"WALLET_SCREENING\"))\n        .riskScore(1L)\n        .severity(WalletScreeningResult.Severity.of(\"UNKNOWN\"))\n        .status(WalletScreeningResult.Status.of(\"SCREENED\"))\n        .summary(\"your-summary\")\n        .walletAddress(\"your-wallet-address\")\n        .blockchain(\"your-blockchain\")\n        .sourceOfFunds(List.of(WalletScreeningResult.SourceOfFunds.builder()\n                .build()))\n        .destinationOfFunds(List.of(WalletScreeningResult.DestinationOfFunds.builder()\n                .build()))\n        .counterpartyConnections(List.of(WalletScreeningResult.CounterpartyConnections.builder()\n                .build()))\n        .sanctionsHit(true)\n        .dominantRiskCategory(\"your-dominant-risk-category\")\n        .reportSignature(\"your-report-signature\")\n        .build())\n        .writeTo(Path.of(\"download.pdf\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->walletScreening->screenPdf([\n    'provider' => 'your-provider',\n    'screening_type' => 'WALLET_SCREENING',\n    'risk_score' => 1,\n    'severity' => 'UNKNOWN',\n    'status' => 'SCREENED',\n    'summary' => 'your-summary',\n    'wallet_address' => 'your-wallet-address',\n    'blockchain' => 'your-blockchain',\n    'source_of_funds' => [[]],\n    'destination_of_funds' => [[]],\n    'counterparty_connections' => [[]],\n    'sanctions_hit' => true,\n    'dominant_risk_category' => 'your-dominant-risk-category',\n    'report_signature' => 'your-report-signature',\n]);\n$content->saveTo('download.pdf');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.wallet_screening.screen_pdf(\n  provider: \"your-provider\",\n  screening_type: \"WALLET_SCREENING\",\n  risk_score: 1,\n  severity: \"UNKNOWN\",\n  status: \"SCREENED\",\n  summary: \"your-summary\",\n  wallet_address: \"your-wallet-address\",\n  blockchain: \"your-blockchain\",\n  source_of_funds: [{}],\n  destination_of_funds: [{}],\n  counterparty_connections: [{}],\n  sanctions_hit: true,\n  dominant_risk_category: \"your-dominant-risk-category\",\n  report_signature: \"your-report-signature\"\n)\nFile.binwrite(\"download.pdf\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.WalletScreening.ScreenPdfAsync(new WalletScreeningResult\n{\n    Provider = \"your-provider\",\n    ScreeningType = \"WALLET_SCREENING\",\n    RiskScore = 1,\n    Severity = \"UNKNOWN\",\n    Status = \"SCREENED\",\n    Summary = \"your-summary\",\n    WalletAddress = \"your-wallet-address\",\n    Blockchain = \"your-blockchain\",\n    SourceOfFunds = new WalletScreeningResultSourceOfFunds[] { new() },\n    DestinationOfFunds = new WalletScreeningResultDestinationOfFunds[] { new() },\n    CounterpartyConnections = new WalletScreeningResultCounterpartyConnections[] { new() },\n    SanctionsHit = true,\n    DominantRiskCategory = \"your-dominant-risk-category\",\n    ReportSignature = \"your-report-signature\",\n});\nawait content.SaveToAsync(\"download.pdf\");"
          }
        ],
        "responses": {
          "200": {
            "description": "مستند PDF المُصيَّر، يتم إرجاعه مباشرة كملف ثنائي `application/pdf` — لا يوجد غلاف JSON.",
            "headers": {
              "Content-Disposition": {
                "description": "`attachment; filename=wallet_screening_{address}.pdf`، المشتق من `wallet_address` (أو `transaction_hash`) في النتيجة المعاد نشرها.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=wallet_screening_0x28c6c06298d514db0899.pdf"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "نص الطلب ليس كائن JSON يطابق بنية نتيجة فحص المحافظ، أو أن `report_signature` مفقود أو لا يطابق الحقول المُعاد إرسالها (تم تعديله أو اقتطاعه قبل إعادة الإرسال).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "Not an object": {
                    "value": {
                      "non_field_errors": [
                        "Expected a JSON object matching a wallet-screening result."
                      ]
                    }
                  },
                  "Missing or invalid signature": {
                    "value": {
                      "report_signature": [
                        "This wallet-screening result is missing or fails its report signature - repost the exact JSON returned by the wallet-screening endpoint, unmodified."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`x-api-key` مفقود أو غير صالح."
          }
        }
      }
    },
    "/v3/transactions/": {
      "get": {
        "summary": "عرض قائمة بالمعاملات",
        "description": "قائمة مقسمة إلى صفحات بالمعاملات المراقبة، الأحدث أولاً (`txn_date` تنازليًا). يتم تحديد `count` بحد أقصى 100؛ استخدم `total_transactions` لمعرفة العدد الفعلي للصفوف. لا يدعم هذا الـ endpoint معاملات التصفية أو البحث.",
        "operationId": "listTransactions",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "description": "حجم الصفحة. القيمة الافتراضية 50 عند إغفاله. لا يوجد حد أقصى مفروض، ولكن حافظ على صغر حجم الصفحات لتقليل زمن الاستجابة."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "description": "إزاحة تستند إلى الصفر للسجل الأول المراد إرجاعه. يُفضل اتباع رابط `next` من الصفحة السابقة."
          },
          {
            "name": "travel_rule_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "إرجاع المعاملات فقط التي يكون تحويل Travel Rule الخاص بها بهذه الحالة بالضبط (على سبيل المثال `ON_HOLD` أو `AWAITING_COUNTERPARTY`). يتبع `count` عملية التصفية هذه؛ بينما يستمر `total_transactions` في عد كل معاملة في التطبيق."
          },
          {
            "name": "assignee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "مفصولة بفواصل؛ وتتطابق المعاملة عندما تستوفي أي قيمة. القيمة `unassigned` هي ما لم يتم تعيينه لأحد بعد، والقيمة `rules` هي ما قررته القواعد بمفردها دون مراجِع، ويطابق البريد الإلكتروني للعضو المراجِع المعيّن لها. تشير `me` إلى المراجِع المسجل دخوله في Console، لذا فإن مفتاح API الذي يرسل `me` يتلقى الرمز `400`."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/transactions/?limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.ListAutoPaging(ctx, didit.TransactionsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->transactions->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "قائمة مقسمة إلى صفحات بملخصات المعاملات، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد المعاملات المطابقة بحد أقصى (دقيق حتى 100، ومحدد بسقف بعد ذلك). استخدم `total_transactions` لمعرفة العدد الفعلي عند استخدام تقسيم الصفحات."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "total_transactions": {
                      "type": "integer",
                      "description": "العدد الإجمالي الدقيق للمعاملات (غير المحذوفة) للتطبيق. موجود في الاستجابات المقسمة إلى صفحات."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "format": "uuid",
                            "description": "معرّف Didit الثابت للمعاملة. يُستخدم كـ `{transaction_id}` في استدعاءات التفاصيل/الملاحظات/الاستدعاءات ذات الصلة."
                          },
                          "transaction_number": {
                            "type": "integer",
                            "description": "رقم المعاملة التسلسلي بنطاق التطبيق المعروض في وحدة التحكم (مثل `4123`)."
                          },
                          "txn_id": {
                            "type": "string",
                            "description": "معرّف مقدّم من العميل من استدعاء الإنشاء (بحد أقصى 128 حرفاً). فريد لكل تطبيق."
                          },
                          "transaction_type": {
                            "type": "string",
                            "description": "الفئة ذات المستوى الأعلى كما تم تخزينها: `finance`، `kyc`، `travelRule`، `userPlatformEvent`، `gamblingBet`، `gamblingLimitChange`، `gamblingBonusChange`، `auditTrailEvent`. يُرجى ملاحظة أن القيم المتعددة الكلمات يتم إرجاعها بصيغة camelCase حتى لو تم إرسالها بصيغة snake_case."
                          },
                          "action_type": {
                            "type": "string",
                            "description": "النوع الفرعي ضمن الفئة (مثل `deposit`، `withdrawal`، `transfer`)."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "APPROVED",
                              "IN_REVIEW",
                              "DECLINED",
                              "AWAITING_USER"
                            ],
                            "description": "قرار المراقبة الحالي."
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "INBOUND",
                              "OUTBOUND"
                            ],
                            "description": "الاتجاه بالنسبة إلى الشخص المعني. يُخزّن بأحرف كبيرة بصرف النظر عن حالة الأحرف المُرسلة."
                          },
                          "amount": {
                            "type": "string",
                            "description": "مبلغ المعاملة كسلسلة عشرية مع تجريد الأصفار اللاحقة (على سبيل المثال `\"1500\"`، `\"0.5\"`، `\"0.123456789012345678\"`). حتى 18 منزلة عشرية."
                          },
                          "currency": {
                            "type": "string",
                            "description": "رمز العملة الخاص بـ `amount`. يُقبل أي رمز أبجدي وفق معيار ISO 4217 (مثل `EUR`، و`USD`، و`NGN`)، وكذلك يُقبل رمز أصل مشفر (مثل `BTC`). يُفضل استخدام رمز متداول حالياً. ليس لكل رمز مقبول سعر صرف: عندما لا يتوفر سعر صرف للرمز (على سبيل المثال وحدة المحاسبة `XSU` وفق ISO، أو رمز عملة مشفرة لا تحدد Didit سعراً له)، يفشل التحويل التلقائي ويتم إرجاع `preferred_currency_amount` بقيمة فارغة (null) ما لم يقدّم الطلب قيمة محولة مسبقاً في `amount_in_default_currency`."
                          },
                          "preferred_currency_amount": {
                            "type": "string",
                            "nullable": true,
                            "description": "`amount` محولاً إلى العملة المفضلة للتطبيق، عندما يكون متاحًا."
                          },
                          "preferred_currency_code": {
                            "type": "string",
                            "nullable": true,
                            "description": "رمز العملة المفضلة المستخدم لـ `preferred_currency_amount` - العملة الأساسية للتطبيق، أي رمز متداول حالياً وفق معيار ISO 4217. الرمز الذي لا يتوفر له سعر صرف يترك `preferred_currency_amount` بقيمة null ما لم يقدّم الطلب `amount_in_default_currency` محوّلاً مسبقاً."
                          },
                          "payment_details": {
                            "type": "string",
                            "nullable": true,
                            "description": "مرجع الدفع أو الملاحظة بنص حر من الإرسال."
                          },
                          "score": {
                            "type": "integer",
                            "description": "درجة المخاطر (عادة من 0 إلى 100). القيمة الأعلى = مخاطر أكبر."
                          },
                          "severity": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "UNKNOWN",
                              "LOW",
                              "MEDIUM",
                              "HIGH",
                              "CRITICAL"
                            ],
                            "description": "شدة المخاطر المصنفة المحددة بواسطة القواعد/المزودين (`UNKNOWN`، `LOW`، `MEDIUM`، `HIGH`، `CRITICAL`). تكون `null` حتى يحددها إجراء ما."
                          },
                          "subject_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "الاسم الكامل للطرف `APPLICANT`."
                          },
                          "subject_vendor_data": {
                            "type": "string",
                            "nullable": true,
                            "description": "معرّفك الداخلي للمستخدم/الشركة لمقدم الطلب."
                          },
                          "subject_country": {
                            "type": "string",
                            "nullable": true,
                            "description": "رمز الدولة لمقدم الطلب، من `address.country` المُرسل (عادة ISO 3166-1 alpha-3)."
                          },
                          "counterparty_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "الاسم الكامل للطرف `COUNTERPARTY`، إن وجد."
                          },
                          "counterparty_vendor_data": {
                            "type": "string",
                            "nullable": true,
                            "description": "معرّفك الداخلي للطرف المقابل."
                          },
                          "counterparty_country": {
                            "type": "string",
                            "nullable": true,
                            "description": "رمز الدولة للطرف المقابل، من `address.country` المُرسل."
                          },
                          "tags": {
                            "type": "array",
                            "description": "العلامات المرفقة بالمعاملة (يدوياً أو عبر القواعد).",
                            "items": {
                              "type": "object",
                              "properties": {
                                "uuid": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "color": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "didit",
                                    "custom"
                                  ],
                                  "description": "ما إذا كان الوسم إعداداً مسبقاً من Didit أو وسماً مخصصاً."
                                }
                              }
                            }
                          },
                          "txn_date": {
                            "type": "string",
                            "format": "date-time",
                            "description": "وقت حدوث المعاملة (من `transaction_at` وقت الإنشاء)."
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "وقت تسجيل Didit للإرسال."
                          },
                          "decision_reason_code": {
                            "type": "string",
                            "nullable": true,
                            "description": "السبب المقروء آلياً للحالة الحالية `status` (مثل `WALLET_HIGH_RISK`)."
                          },
                          "decision_reason_label": {
                            "type": "string",
                            "nullable": true,
                            "description": "تسمية سهلة القراءة لـ `decision_reason_code`."
                          },
                          "assigned_to_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "اسم العرض لمراجِع Console المعيّن لهذه المعاملة."
                          },
                          "travel_rule_status": {
                            "type": "string",
                            "nullable": true,
                            "description": "حالة تحويل Travel Rule الخاص بالمعاملة (على سبيل المثال `COMPLETED`)، أو `null` إذا لم يكن هناك أي تحويل."
                          },
                          "travel_rule": {
                            "nullable": true,
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/TransactionTravelRule"
                              }
                            ],
                            "description": "تحويل Travel Rule الخاص بالمعاملة، وهو الكتلة نفسها مثل `travel_rule` في `GET /v3/transactions/{transaction_id}/`، أو `null` عندما لا تحتوي المعاملة على أي تحويل."
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Single transaction": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "total_transactions": 1,
                      "results": [
                        {
                          "uuid": "abcdef12-3456-4890-abcd-ef1234567890",
                          "transaction_number": 4123,
                          "txn_id": "your-txn-2026-05-17-001",
                          "transaction_type": "finance",
                          "action_type": "withdrawal",
                          "status": "IN_REVIEW",
                          "direction": "OUTBOUND",
                          "amount": "1500",
                          "currency": "EUR",
                          "preferred_currency_amount": "1620.45",
                          "preferred_currency_code": "USD",
                          "payment_details": "Withdrawal to crypto wallet",
                          "txn_date": "2026-05-17T08:42:00Z",
                          "created_at": "2026-05-17T08:42:11Z",
                          "score": 78,
                          "severity": "HIGH",
                          "decision_reason_code": "WALLET_HIGH_RISK",
                          "decision_reason_label": "Destination wallet flagged as high risk",
                          "tags": [
                            {
                              "uuid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                              "name": "Manual review",
                              "color": "#F59E0B",
                              "description": null,
                              "source": "custom"
                            }
                          ],
                          "subject_name": "Maria Garcia",
                          "subject_vendor_data": "user-12345",
                          "counterparty_name": null,
                          "counterparty_vendor_data": null,
                          "counterparty_country": null,
                          "subject_country": null,
                          "assigned_to_name": "Alex Reviewer",
                          "travel_rule_status": null,
                          "travel_rule": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح سرد المعاملات لهذا التطبيق. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء معاملة",
        "description": "إرسال معاملة للمراقبة المتزامنة لـ AML/المخاطر. يتم إنشاء المعاملة بالحالة `APPROVED`، ثم تُشغَّل قواعدك (وفحص العملات المشفرة، عند انطباقه) بشكل متزامن وقد تغيّر قيمة `status` المُعادة إلى `IN_REVIEW` أو `DECLINED`. **يُعد `transaction_id` هو مفتاح idempotency الخاص بك** (بحد أقصى 128 حرفاً، وفريد لكل تطبيق)؛ وتؤدي إعادة استخدامه إلى إرجاع 400. يتم إرسال webhook من نوع `transaction.created` عند النجاح لتطبيقات بيئة الإنتاج. لا تتم فوترة تطبيقات البيئة التجريبية ولا تُرسل أحداث webhook من نوع `transaction.created` أو `transaction.status.updated`. بينما تُرسل عمليات تبادل Travel Rule في البيئة التجريبية أحداث webhook من نوع `travel_rule.status.updated` مع `environment: sandbox`. يتم تخزين تحويل Travel Rule وإرجاعه قبل الاتصال بأي طرف مقابل: وتعود قيمة `travel_rule.status` كـ `AWAITING_COUNTERPARTY` (أو `NOT_APPLICABLE` دون الحد الخاص بك، أو `UNCONFIRMED_OWNERSHIP` لمحفظة ذاتية الاستضافة مُعلنة، أو `COMPLETED` عندما تكون المحفظة الأخرى هي محفظتك الخاصة التي تم التحقق منها) وتكون قيمة `travel_rule.protocol` هي null. بعد ذلك تختار Didit المسار وتُرسل التبادل، ويصل أي تغيير لاحق في حالة التحويل، بما في ذلك `COUNTERPARTY_VASP_NOT_FOUND` عندما يتعذر على أي مسار الوصول إلى الطرف المقابل، كحدث webhook من نوع `travel_rule.status.updated`. يتم تشغيل قواعدك مرة أخرى عندما يتغير المسار أو الحالة.",
        "operationId": "createTransaction",
        "tags": [
          "Transactions"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/transactions/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"transaction_id\": \"your-txn-2026-05-17-001\",\n    \"transaction_category\": \"finance\",\n    \"transaction_details\": {\n      \"direction\": \"outbound\",\n      \"amount\": 1500,\n      \"currency\": \"EUR\",\n      \"action_type\": \"withdrawal\"\n    },\n    \"subject\": {\n      \"entity_type\": \"individual\",\n      \"vendor_data\": \"user-12345\",\n      \"full_name\": \"Maria Garcia\"\n    }\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.create(\n    transaction_id=\"your-txn-2026-05-17-001\",\n    transaction_category=\"finance\",\n    transaction_details={\n        \"direction\": \"outbound\",\n        \"amount\": 1500.0,\n        \"currency\": \"EUR\",\n        \"action_type\": \"withdrawal\",\n    },\n    subject={\n        \"entity_type\": \"individual\",\n        \"vendor_data\": \"user-12345\",\n        \"full_name\": \"Maria Garcia\",\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.create({\n  transaction_id: \"your-txn-2026-05-17-001\",\n  transaction_category: \"finance\",\n  transaction_details: {\n    direction: \"outbound\",\n    amount: 1500.0,\n    currency: \"EUR\",\n    action_type: \"withdrawal\",\n  },\n  subject: {\n    entity_type: \"individual\",\n    vendor_data: \"user-12345\",\n    full_name: \"Maria Garcia\",\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Create(ctx, didit.TransactionsCreateParams{\n\tTransactionID:       \"your-txn-2026-05-17-001\",\n\tTransactionCategory: \"finance\",\n\tTransactionDetails: didit.TransactionsCreateParamsTransactionDetails{\n\t\tDirection:  \"outbound\",\n\t\tAmount:     1500.0,\n\t\tCurrency:   \"EUR\",\n\t\tActionType: didit.String(\"withdrawal\"),\n\t},\n\tSubject: didit.TransactionsCreateParamsSubject{\n\t\tEntityType: didit.String(\"individual\"),\n\t\tVendorData: \"user-12345\",\n\t\tFullName:   \"Maria Garcia\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TransactionsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().create(TransactionsCreateParams.builder()\n        .transactionId(\"your-txn-2026-05-17-001\")\n        .transactionCategory(TransactionsCreateParams.TransactionCategory.of(\"finance\"))\n        .transactionDetails(TransactionsCreateParams.TransactionDetails.builder()\n                .direction(TransactionsCreateParams.TransactionDetails.Direction.of(\"outbound\"))\n                .amount(1500.0)\n                .currency(\"EUR\")\n                .actionType(\"withdrawal\")\n                .build())\n        .subject(TransactionsCreateParams.Subject.builder()\n                .entityType(\"individual\")\n                .vendorData(\"user-12345\")\n                .fullName(\"Maria Garcia\")\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->create([\n    'transaction_id' => 'your-txn-2026-05-17-001',\n    'transaction_category' => 'finance',\n    'transaction_details' => [\n        'direction' => 'outbound',\n        'amount' => 1500.0,\n        'currency' => 'EUR',\n        'action_type' => 'withdrawal',\n    ],\n    'subject' => [\n        'entity_type' => 'individual',\n        'vendor_data' => 'user-12345',\n        'full_name' => 'Maria Garcia',\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.create(\n  transaction_id: \"your-txn-2026-05-17-001\",\n  transaction_category: \"finance\",\n  transaction_details: {\n    direction: \"outbound\",\n    amount: 1500.0,\n    currency: \"EUR\",\n    action_type: \"withdrawal\",\n  },\n  subject: {\n    entity_type: \"individual\",\n    vendor_data: \"user-12345\",\n    full_name: \"Maria Garcia\",\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.CreateAsync(new TransactionsCreateParams\n{\n    TransactionId = \"your-txn-2026-05-17-001\",\n    TransactionCategory = \"finance\",\n    TransactionDetails = new()\n    {\n        Direction = \"outbound\",\n        Amount = 1500.0,\n        Currency = \"EUR\",\n        ActionType = \"withdrawal\",\n    },\n    Subject = new()\n    {\n        EntityType = \"individual\",\n        VendorData = \"user-12345\",\n        FullName = \"Maria Garcia\",\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transaction_id": {
                    "type": "string",
                    "description": "معرّفك الفريد لهذه المعاملة (بحد أقصى 128 حرفاً).",
                    "example": "your-txn-2026-05-17-001"
                  },
                  "transaction_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "وقت حدوث المعاملة. القيمة الافتراضية هي الوقت الحالي إذا تم حذفه."
                  },
                  "time_zone": {
                    "type": "string",
                    "description": "معرّف المنطقة الزمنية لـ IANA، مثل `Europe/Madrid`."
                  },
                  "transaction_category": {
                    "type": "string",
                    "description": "فئة المعاملة. تُقبل أيضاً الأسماء المستعارة بصيغة CamelCase (`travelRule`، `userPlatformEvent`، `gamblingBet`، ...)؛ وتكون القيمة المخزنة/المعادة بصيغة camelCase للفئات المكونة من كلمات متعددة.",
                    "example": "finance",
                    "enum": [
                      "finance",
                      "kyc",
                      "travel_rule",
                      "user_event",
                      "audit_trail_event",
                      "gambling_bet",
                      "gambling_limit_change",
                      "gambling_bonus_change",
                      "travelRule"
                    ]
                  },
                  "transaction_details": {
                    "type": "object",
                    "description": "التفاصيل المالية الأساسية للمعاملة.",
                    "required": [
                      "direction",
                      "amount",
                      "currency"
                    ],
                    "properties": {
                      "direction": {
                        "type": "string",
                        "description": "اتجاه المعاملة بالنسبة إلى الشخص المعني. غير حساس لحالة الأحرف؛ يُقبل `in`/`out` كأسماء بديلة. يُعاد بأحرف كبيرة (`INBOUND`/`OUTBOUND`).",
                        "example": "outbound",
                        "enum": [
                          "inbound",
                          "outbound",
                          "in",
                          "out"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "description": "مبلغ المعاملة (حتى 18 منزلة عشرية). أرسله كسلسلة عشرية (على سبيل المثال `\"0.123456789012345678\"`) عندما تكون الدقة المضبوطة مهمة: يتم تحليل رقم JSON كعدد عائم ثنائي أولاً، لذا يتم تقريب الأرقام التي تتجاوز حوالي 15 رقماً معنوياً قبل تخزين المبلغ. يجب أن يكون صفراً أو أكبر: يحمل الاتجاه الإشارة، ويعيد المبلغ السالب `400`.",
                        "example": 1500
                      },
                      "currency": {
                        "type": "string",
                        "description": "رمز العملة. يُقبل أي رمز أبجدي وفق معيار ISO 4217 (مثل `EUR`، و`USD`، و`NGN`)، وكذلك يُقبل رمز أصل مشفر (مثل `BTC`). يُفضل استخدام رمز متداول حالياً. ليس لكل رمز مقبول سعر صرف: عندما لا يتوفر سعر صرف للرمز (على سبيل المثال وحدة المحاسبة `XSU` وفق ISO، أو رمز عملة مشفرة لا تحدد Didit سعراً له)، يفشل التحويل التلقائي ويتم إرجاع `preferred_currency_amount` بقيمة فارغة (null) ما لم يقدّم الطلب قيمة محولة مسبقاً في `amount_in_default_currency`.",
                        "example": "EUR"
                      },
                      "currency_kind": {
                        "type": "string",
                        "description": "ما إذا كانت العملة `fiat` أو `crypto`."
                      },
                      "amount_in_default_currency": {
                        "type": "number",
                        "nullable": true,
                        "description": "مبلغ محوّل مسبقاً بالعملة الافتراضية. إذا لم يُذكر، ستتم محاولة تحويل العملات الأجنبية (FX) تلقائياً. يجب أن يكون صفراً أو أكبر."
                      },
                      "default_currency": {
                        "type": "string",
                        "description": "رمز العملة الافتراضي للمبلغ المحول. أي رمز ISO 4217 متداول حاليًا."
                      },
                      "payment_details": {
                        "type": "string",
                        "nullable": true,
                        "description": "مرجع الدفع أو الملاحظة بنص حر."
                      },
                      "payment_reference_id": {
                        "type": "string",
                        "nullable": true,
                        "description": "مرجع نظام الدفع الخارجي. بالنسبة لفحص تجزئة معاملات العملات المشفرة لـ AML، أرسل تجزئة معاملة البلوكتشين، وأدرِج أيضاً `subject.payment_method.account_id` مع العنوان المرتبط."
                      },
                      "action_type": {
                        "type": "string",
                        "nullable": true,
                        "description": "النوع الفرعي للمعاملة، مثل `deposit`، `withdrawal`، `transfer`."
                      },
                      "crypto_params": {
                        "type": "object",
                        "description": "تحديد شبكة العملات المشفرة، بشكل منفصل عن العملة (رمز الأصل). تسجيل رمز token مخصص لا يضمن تغطية تجزئة المعاملة لعقدها.",
                        "properties": {
                          "crypto_chain": {
                            "type": "string",
                            "description": "الشبكة الفعلية المستخدمة للفحص. يدعم الفحص المدار كلاً من BTC وETH وLTC وXRP وBCH وDOGE وTRX وSOL وMATIC وBNB وBASE (Base) وOP (Optimism) وARB (Arbitrum One) وAVAX (Avalanche C-Chain) وADA (Cardano) وXLM (Stellar) وHBAR (Hedera). تُقبل أيضاً أسماء الشبكات الشائعة، على سبيل المثال POLYGON أو POL لـ MATIC، وBSC لـ BNB، وTRON لـ TRX. حدد هذا دائماً للرموز المميزة متعددة الشبكات. عندما يكون مفقوداً لـ USDT أو USDC أو ETH المُرسلة مع تجزئة معاملة تبدأ بـ 0x، تبحث Didit عن التجزئة في Ethereum وBNB Chain وPolygon وBase وArbitrum وOptimism وتفحصها على الشبكة التي عُثر عليها فيها؛ وإذا لم تكن موجودة على أي شبكة، فلن تُفحص المعاملة وتكون قيمة custom_values.aml_screening_status هي FAILED مع ذكر السبب في custom_values.aml_screening_error. عندما يكون مفقوداً لـ USDT أو USDC المفحوصين بواسطة المحفظة (بدون تجزئة معاملة)، يُفحص عنوان Tron على Tron، وعنوان Solana على Solana، وعنوان 0x على أول شبكة من تلك الشبكات الست التي أرسل عليها معاملة أو يحتفظ فيها بالرمز المميز، أو على Ethereum عندما لا يكون نشطاً على أي منها. تختلف تغطية المزود المتصل؛ وتتطلب LIGHTNING مزوداً متصلاً مدعوماً.",
                            "example": "BASE"
                          }
                        }
                      }
                    }
                  },
                  "subject": {
                    "type": "object",
                    "description": "موضوع المعاملة (مقدم الطلب).",
                    "required": [
                      "vendor_data",
                      "full_name"
                    ],
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "description": "نوع الكيان: `individual` أو `company`."
                      },
                      "vendor_data": {
                        "type": "string",
                        "description": "معرّفك الداخلي للمستخدم/الشركة.",
                        "example": "user-12345"
                      },
                      "full_name": {
                        "type": "string",
                        "description": "الاسم الكامل للشخص محل الفحص.",
                        "example": "Maria Garcia"
                      },
                      "first_name": {
                        "type": "string",
                        "description": "الاسم الأول للشخص المعني."
                      },
                      "last_name": {
                        "type": "string",
                        "description": "اسم العائلة للشخص المعني."
                      },
                      "date_of_birth": {
                        "type": "string",
                        "format": "date",
                        "description": "تاريخ الميلاد (YYYY-MM-DD)."
                      },
                      "address": {
                        "type": "object",
                        "description": "كائن العنوان.",
                        "properties": {
                          "country": {
                            "type": "string",
                            "description": "رمز الدولة (يُوصى بـ ISO 3166-1 alpha-3). يُنسخ إلى `country_code` الخاص بالطرف."
                          },
                          "town": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "street": {
                            "type": "string"
                          },
                          "post_code": {
                            "type": "string"
                          }
                        }
                      },
                      "institution_details": {
                        "type": "object",
                        "description": "تفاصيل المؤسسة (للكيانات المؤسسية).",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "address": {
                            "type": "object"
                          }
                        }
                      },
                      "device_context": {
                        "type": "object",
                        "description": "سياق الجهاز الذي تم التقاطه في وقت المعاملة. يجب إرسال browser_family وplatform كمفاتيح صريحة من المستوى الأعلى — ولا يتم اشتقاقهما من user_agent. الاسم البديل بصيغة camelCase وهو device مقبول أيضاً في الطلب.",
                        "properties": {
                          "fingerprint": {
                            "type": "string",
                            "description": "بصمة جهاز فريدة."
                          },
                          "persistent_device_id": {
                            "type": "string",
                            "description": "معرّف جهاز ثابت عبر الجلسات (مخطط البصمة v2)."
                          },
                          "user_agent": {
                            "type": "string",
                            "description": "سلسلة وكيل المستخدم (user agent) للمتصفح أو التطبيق. الاسم البديل بصيغة CamelCase هو: userAgent."
                          },
                          "browser_family": {
                            "type": "string",
                            "description": "عائلة المتصفح (مثل Chrome، وFirefox، وSafari). يجب إرسالها بشكل صريح — لا يتم استخلاصها من user_agent. الاسم البديل بصيغة CamelCase هو: browserFamily."
                          },
                          "browser_version": {
                            "type": "string",
                            "description": "سلسلة إصدار المتصفح. يجب إرسالها بشكل صريح. الاسم البديل بصيغة CamelCase هو: browserVersion."
                          },
                          "platform": {
                            "type": "string",
                            "description": "معرّف المنصة (web، ios، android، macos، windows، linux). يجب إرساله صراحةً — لا يُشتق من user_agent."
                          },
                          "os_family": {
                            "type": "string",
                            "description": "عائلة نظام التشغيل (مثل iOS وAndroid وWindows). الاسم البديل بنمط CamelCase: osFamily."
                          },
                          "os_version": {
                            "type": "string",
                            "description": "سلسلة إصدار نظام التشغيل. الاسم البديل بنمط CamelCase: osVersion."
                          },
                          "accept_language": {
                            "type": "string",
                            "description": "قيمة ترويسة Accept-Language. الاسم البديل بنمط سنام الجمل (CamelCase): acceptLang."
                          },
                          "session_id": {
                            "type": "string",
                            "description": "معرّف الجلسة لجلسة المستخدم الحالية. يُخزَّن في البيانات الوصفية. الاسم البديل بصيغة CamelCase هو sessionId."
                          },
                          "session_age_ms": {
                            "type": "number",
                            "description": "عمر جلسة المستخدم بالمللي ثانية في وقت المعاملة. الاسم البديل بنمط CamelCase: sessionAgeMs."
                          },
                          "network_context": {
                            "type": "object",
                            "description": "سياق الشبكة متضمناً عنوان IP والموقع الجغرافي. تم أيضاً دمج كتلة ipInfo ذات المستوى الأعلى في هذا الكائن.",
                            "properties": {
                              "ip_address": {
                                "type": "string",
                                "description": "عنوان IP الخاص بالعميل. الاسم البديل بنمط CamelCase هو: ip."
                              },
                              "ip_country_code": {
                                "type": "string",
                                "description": "دولة عنوان IP المحددة جغرافياً (ISO 3166-1 alpha-3). الاسم البديل بأسلوب CamelCase: countryCode3."
                              },
                              "latitude": {
                                "type": "number",
                                "description": "خط العرض الجغرافي لعنوان IP. الاسم البديل بنمط CamelCase هو: lat."
                              },
                              "longitude": {
                                "type": "number",
                                "description": "خط الطول الجغرافي لعنوان IP. الاسم البديل بنمط CamelCase هو: lon."
                              }
                            }
                          }
                        }
                      },
                      "payment_method": {
                        "type": "object",
                        "description": "طريقة الدفع التي استخدمها الشخص المعني.",
                        "properties": {
                          "method_type": {
                            "type": "string",
                            "description": "نوع طريقة الدفع: `bank_card`، `bank_account`، `crypto_wallet`، `ewallet`، `unhosted_wallet`، `other`."
                          },
                          "account_id": {
                            "type": "string",
                            "description": "معرّف الحساب (مثل IBAN، عنوان المحفظة). لفحص العملات المشفرة، يجب أن يحتوي هذا على عنوان المحفظة لهذا المشارك. يتطلب فحص تجزئة المعاملة الواردة عنوان إيداع الخدمة/العميل للطرف المعني. يستخدم الفحص الصادر المحفظة الوجهة لدى الطرف المقابل. في التحويلات المشفرة عبر bitcoin أو Lightning، قد يكون طلب دفع Lightning (فاتورة BOLT11 أو عرض BOLT12 أو LNURL) أو Lightning Address: تخزن Didit المستفيد الذي تحدده كحساب (\"\" عندما لا تحدد أحداً) وما ينص عليه الطلب في `chain_details.lightning` الخاص بتحويل Travel Rule. بحد أقصى 255 حرفاً بمجرد تخزينه. في التحويلات المشفرة عبر bitcoin أو Lightning، قد يكون طلب دفع Lightning (فاتورة BOLT11 أو عرض BOLT12 أو LNURL) أو Lightning Address: تخزن Didit المستفيد الذي تحدده كحساب (\"\" عندما لا تحدد أحداً) وما ينص عليه الطلب في `chain_details.lightning` الخاص بتحويل Travel Rule. بحد أقصى 255 حرفاً بمجرد تخزينه."
                          },
                          "memo": {
                            "type": "string",
                            "maxLength": 256,
                            "description": "علامة الوجهة (destination tag) أو المذكرة (memo) التي تشكل جزءًا من المحفظة على شبكة تستخدم المذكرات (XRP وXLM وEOS وATOM وHBAR). في عنوان منصة التداول المشترك الواحد، تكون كل مذكرة طريقة دفع مستقلة بذاتها. XRP: علامة وجهة، وهي عدد صحيح من 0 إلى 4294967295 (يُقبل رقم JSON). XLM: مذكرة نصية يصل حجمها إلى 28 بايت، أو معرّف 64-بت أو تجزئة 32-بايت بالنظام الست عشري (hex). EOS: ما يصل إلى 256 بايت. ATOM: ما يصل إلى 256 حرفًا. HBAR: ما يصل إلى 100 بايت. لا تقبل محافظ Bitcoin وEVM وSolana وTron وLitecoin وBitcoin Cash وDogecoin وLightning أي مذكرات: ووجود واحدة ينتج عنه `400`. الاسم البديل: `destinationTag` أو `destination_tag`."
                          },
                          "issuing_country": {
                            "type": "string",
                            "description": "رمز دولة جهة الإصدار وفق المعيار ISO 3166-1 alpha-3."
                          }
                        }
                      }
                    }
                  },
                  "counterparty": {
                    "type": "object",
                    "description": "الطرف المقابل للمعاملة (اختياري).",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "description": "نوع الكيان: `individual` أو `company`."
                      },
                      "vendor_data": {
                        "type": "string",
                        "description": "معرّفك الداخلي للطرف المقابل."
                      },
                      "full_name": {
                        "type": "string",
                        "description": "الاسم الكامل للطرف المقابل."
                      },
                      "first_name": {
                        "type": "string"
                      },
                      "last_name": {
                        "type": "string"
                      },
                      "date_of_birth": {
                        "type": "string",
                        "format": "date"
                      },
                      "address": {
                        "type": "object",
                        "description": "كائن العنوان مع `country` (وفق معيار ISO 3166-1 alpha-3)."
                      },
                      "institution_details": {
                        "type": "object"
                      },
                      "device_context": {
                        "type": "object",
                        "description": "سياق الجهاز للطرف المقابل. يجب إرسال browser_family وplatform كمفاتيح صريحة في المستوى الأعلى — فهما لا يُستخرجان من user_agent.",
                        "properties": {
                          "fingerprint": {
                            "type": "string",
                            "description": "بصمة جهاز فريدة."
                          },
                          "persistent_device_id": {
                            "type": "string",
                            "description": "معرّف جهاز ثابت عبر الجلسات (مخطط البصمة v2)."
                          },
                          "user_agent": {
                            "type": "string",
                            "description": "سلسلة وكيل المستخدم (user agent) للمتصفح أو التطبيق. الاسم البديل بصيغة CamelCase هو: userAgent."
                          },
                          "browser_family": {
                            "type": "string",
                            "description": "عائلة المتصفح (مثل Chrome، وFirefox، وSafari). يجب إرسالها بشكل صريح — لا يتم استخلاصها من user_agent. الاسم البديل بصيغة CamelCase هو: browserFamily."
                          },
                          "browser_version": {
                            "type": "string",
                            "description": "سلسلة إصدار المتصفح. يجب إرسالها بشكل صريح. الاسم البديل بصيغة CamelCase هو: browserVersion."
                          },
                          "platform": {
                            "type": "string",
                            "description": "معرّف المنصة (web، ios، android، macos، windows، linux). يجب إرساله صراحةً — لا يُشتق من user_agent."
                          },
                          "os_family": {
                            "type": "string",
                            "description": "عائلة نظام التشغيل (مثل iOS وAndroid وWindows). الاسم البديل بنمط CamelCase: osFamily."
                          },
                          "os_version": {
                            "type": "string",
                            "description": "سلسلة إصدار نظام التشغيل. الاسم البديل بنمط CamelCase: osVersion."
                          },
                          "accept_language": {
                            "type": "string",
                            "description": "قيمة ترويسة Accept-Language. الاسم البديل بنمط سنام الجمل (CamelCase): acceptLang."
                          },
                          "session_id": {
                            "type": "string",
                            "description": "معرّف الجلسة لجلسة الطرف المقابل. يُخزَّن في البيانات الوصفية. الاسم البديل بصيغة CamelCase هو sessionId."
                          },
                          "session_age_ms": {
                            "type": "number",
                            "description": "عمر جلسة المستخدم بالمللي ثانية في وقت المعاملة. الاسم البديل بنمط CamelCase: sessionAgeMs."
                          },
                          "network_context": {
                            "type": "object",
                            "description": "سياق الشبكة متضمناً عنوان IP والموقع الجغرافي. تم أيضاً دمج كتلة ipInfo ذات المستوى الأعلى في هذا الكائن.",
                            "properties": {
                              "ip_address": {
                                "type": "string",
                                "description": "عنوان IP الخاص بالعميل. الاسم البديل بنمط CamelCase هو: ip."
                              },
                              "ip_country_code": {
                                "type": "string",
                                "description": "دولة عنوان IP المحددة جغرافياً (ISO 3166-1 alpha-3). الاسم البديل بأسلوب CamelCase: countryCode3."
                              },
                              "latitude": {
                                "type": "number",
                                "description": "خط العرض الجغرافي لعنوان IP. الاسم البديل بنمط CamelCase هو: lat."
                              },
                              "longitude": {
                                "type": "number",
                                "description": "خط الطول الجغرافي لعنوان IP. الاسم البديل بنمط CamelCase هو: lon."
                              }
                            }
                          }
                        }
                      },
                      "payment_method": {
                        "type": "object",
                        "description": "طريقة الدفع المستخدمة من قبل الطرف المقابل. في معاملات travelRule، يُصرّح `method_type: \"unhosted_wallet\"` بأن محفظة الطرف المقابل ذاتية الاستضافة: يتخطى التحويل توجيه VASP للطرف المقابل، ويتم إنشاؤه مباشرة في `UNCONFIRMED_OWNERSHIP`، و(عند تمكين `auto_wallet_verification`) يتم إنشاء جلسة أداة ملكية المحفظة تلقائياً وإرجاعها في كتلة `action_required` الخاصة بالمعاملة.",
                        "properties": {
                          "method_type": {
                            "type": "string",
                            "description": "نوع طريقة الدفع: `bank_card`، `bank_account`، `crypto_wallet`، `ewallet`، `unhosted_wallet`، `other`. استخدم `unhosted_wallet` للإقرار بمحفظة ذاتية الاستضافة وفقاً لـ Travel Rule."
                          },
                          "account_id": {
                            "type": "string",
                            "description": "معرّف الحساب (مثل IBAN أو عنوان). في التحويلات المشفرة عبر bitcoin أو Lightning، قد يكون طلب دفع Lightning (فاتورة BOLT11 أو عرض BOLT12 أو LNURL) أو Lightning Address: تخزن Didit المستفيد الذي تحدده كحساب (\"\" عندما لا تحدد أحداً) وما ينص عليه الطلب في `chain_details.lightning` الخاص بتحويل Travel Rule. بحد أقصى 255 حرفاً بمجرد تخزينه. في التحويلات المشفرة عبر bitcoin أو Lightning، قد يكون طلب دفع Lightning (فاتورة BOLT11 أو عرض BOLT12 أو LNURL) أو Lightning Address: تخزن Didit المستفيد الذي تحدده كحساب (\"\" عندما لا تحدد أحداً) وما ينص عليه الطلب في `chain_details.lightning` الخاص بتحويل Travel Rule. بحد أقصى 255 حرفاً بمجرد تخزينه."
                          },
                          "memo": {
                            "type": "string",
                            "maxLength": 256,
                            "description": "علامة الوجهة (destination tag) أو المذكرة (memo) التي تشكل جزءًا من المحفظة على شبكة تستخدم المذكرات (XRP وXLM وEOS وATOM وHBAR). في عنوان منصة التداول المشترك الواحد، تكون كل مذكرة طريقة دفع مستقلة بذاتها. XRP: علامة وجهة، وهي عدد صحيح من 0 إلى 4294967295 (يُقبل رقم JSON). XLM: مذكرة نصية يصل حجمها إلى 28 بايت، أو معرّف 64-بت أو تجزئة 32-بايت بالنظام الست عشري (hex). EOS: ما يصل إلى 256 بايت. ATOM: ما يصل إلى 256 حرفًا. HBAR: ما يصل إلى 100 بايت. لا تقبل محافظ Bitcoin وEVM وSolana وTron وLitecoin وBitcoin Cash وDogecoin وLightning أي مذكرات: ووجود واحدة ينتج عنه `400`. الاسم البديل: `destinationTag` أو `destination_tag`."
                          },
                          "issuing_country": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "custom_properties": {
                    "type": "object",
                    "description": "أزواج مفتاح-قيمة عشوائية مرفقة بالمعاملة. يمكن الإشارة إلى كل مفتاح في شروط القواعد باستخدام مسار الحقل `custom_values.<key>`.",
                    "additionalProperties": true,
                    "example": {
                      "merchant_id": "test",
                      "bank_name": "test_2"
                    }
                  },
                  "travel_rule_details": {
                    "type": "object",
                    "description": "بيانات Travel Rule. عند تفعيل Travel Rule وتعيين transaction_category إلى travel_rule، تدير Didit عملية التبادل بنفسها: فهي تتجاهل status وprotocol وrequired وobligations_count، وتستخدم originator_data وbeneficiary_data وmetadata. بخلاف ذلك، تخزن Didit هذه القيم كسجل سلبي لـ Travel Rule. أثناء تفعيل Travel Rule، يجب أن يحمل التحويل الصادر الذي يصل إلى الحد الخاص بك أو يتجاوزه ما يتطلبه نظامه (EU TFR أو توصية FATF رقم 16)، مع التحقق من الأطراف التي ترسلها: يؤدي وجود حقل مفقود إلى استجابة 400 ضمن `travel_rule_details.originator_data` أو `travel_rule_details.beneficiary_data`، على سبيل المثال \"تتطلب EU TFR اسم المُرسِل.\"",
                    "required": [
                      "status"
                    ],
                    "properties": {
                      "status": {
                        "type": "string",
                        "description": "مطلوب عندما ترسل travel_rule_details. إحدى حالات تحويل Travel Rule (على سبيل المثال AWAITING_COUNTERPARTY أو COMPLETED أو NOT_APPLICABLE)؛ وتُقبل أيضاً وتُربط التهجئات بالأحرف الصغيرة وبصيغة camelCase والقيم القديمة UNKNOWN وCOMPLIANT وPENDING_ACTION وPENDING_COUNTERPARTY وFAILED وEXEMPT. أي قيمة أخرى ترجع 400."
                      },
                      "protocol": {
                        "type": "string"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "obligations_count": {
                        "type": "integer"
                      },
                      "originator_data": {
                        "type": "object",
                        "description": "جهة المُرسِل، كحقول مسطحة أو شخص واحد وفق معيار IVMS 101. بالنسبة للمستخدم الخاص بك الذي لديه عملية تحقق KYC مقبولة، يستبدل Didit الحقول التي تحتويها عملية التحقق بالقيم التي تم التحقق منها (راجع `metadata.originator_provenance`). يجب أن يكون كائناً: أي شيء آخر يؤدي إلى خطأ `400`. في شبكة تعتمد على المذكرات، يحدد مفتاح `memo` مذكرة أو وسم محفظة المُرسِل."
                      },
                      "beneficiary_data": {
                        "type": "object",
                        "description": "طرف المستفيد، إما كحقول مسطحة أو كشخص واحد وفق معيار IVMS 101. يجب أن يكون كائناً: وأي شيء غير ذلك يُرجع `400`. لتوجيه التحويل، تقرأ Didit كلاً من `wallet_address` (يتم ملء القيمة الفارغة من `counterparty.payment_method.account_id`)، و`chain` (يتم ملؤها من `transaction_details.crypto_params.crypto_chain` أو `currency` إذا كانت تحدد شبكة مدعومة)، و`name` (مع الرجوع إلى `counterparty.full_name`)، و`travel_address`، و`counterparty_vasp_name`، و`counterparty_vasp_lei`، و`counterparty_vasp_email`. في الشبكات التي تستخدم memo، يحدد `memo` المذكرة أو الوسم الخاص بمحفظة المستفيد؛ ويكون لـ `wallet_address` و`memo` الأولوية على طريقة دفع الطرف المقابل."
                      },
                      "metadata": {
                        "type": "object"
                      },
                      "utxo": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/TravelRuleUtxo"
                          }
                        ],
                        "description": "اختياري، لسلاسل UTXO فقط (BTC و LTC و BCH و DOGE). مدخلات المعاملة ومخرجاتها، والتي تستنتج منها Didit محفظة المُرسِل ومخرج المستفيد عندما لا تحددهما."
                      },
                      "originator": {
                        "type": "object",
                        "description": "كتلة المُرسِل وفق IVMS 101: `originatorPersons` (شخص واحد إما `naturalPerson` أو `legalPerson`؛ والشخص الاعتباري يجعل الطرف شركة) و `accountNumber` (عناوين المحافظ). يُستخدم لـ `originator_data` عندما يكون هذا الكائن فارغاً. تُرجع الكتلة المشوهة استجابة 400 محددة بمسارها، على سبيل المثال `originator.originatorPersons`."
                      },
                      "beneficiary": {
                        "type": "object",
                        "description": "كتلة المستفيد وفق IVMS 101: `beneficiaryPersons` (شخص واحد إما `naturalPerson` أو `legalPerson`؛ والشخص الاعتباري يجعل الطرف شركة) و `accountNumber` (عناوين المحافظ). يُستخدم لـ `beneficiary_data` عندما يكون هذا الكائن فارغاً. تُرجع الكتلة المشوهة استجابة 400 محددة بمسارها، على سبيل المثال `beneficiary.beneficiaryPersons`."
                      },
                      "ivms101": {
                        "type": "object",
                        "description": "كتلتا `originator` و`beneficiary` مغلفتان في كائن IVMS 101 واحد (يُقبل `IVMS101` أيضاً). تكون الأولوية للكتل ذات المستوى الأعلى على كتل الغلاف."
                      }
                    }
                  },
                  "network_snapshot": {
                    "type": "object",
                    "description": "لقطة مخطط شبكة محسوبة مسبقاً.",
                    "properties": {
                      "nodes": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      },
                      "edges": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      },
                      "metrics": {
                        "type": "object"
                      }
                    }
                  },
                  "include_crypto_screening": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "تجاوز لكل معاملة لفحص تحليلات البلوكتشين للعملات المشفرة. عندما تكون القيمة `true`، يتم إجراء فحص العملات المشفرة بصرف النظر عن الإعداد الافتراضي للتطبيق. وعندما تكون `false`، يتم تخطي فحص العملات المشفرة حتى لو كان مفعلاً في إعدادات التطبيق. وعند إغفاله أو تعيينه كـ `null`، يتم استخدام الإعداد الافتراضي على مستوى التطبيق والمُهيأ في لوحة التحكم Console. يتطلب فحص العملات المشفرة `transaction_details.direction`، و`currency_kind: \"crypto\"`، وسلسلة/عملة، وعنوان المحفظة المحدد بواسطة الاتجاه: يستخدم الفحص السابق للتحويل الوارد `counterparty.payment_method.account_id`، ويستخدم فحص تجزئة المعاملة الواردة `subject.payment_method.account_id`، بينما يستخدم الفحص الصادر `counterparty.payment_method.account_id`. عندما يحتوي `transaction_details.payment_reference_id` على تجزئة معاملة على البلوكتشين، تُجري Didit فحص المعاملة وتُرجع إثراء ملخص المعاملة عند توفره."
                  }
                },
                "required": [
                  "transaction_id",
                  "transaction_category",
                  "transaction_details",
                  "subject"
                ]
              },
              "examples": {
                "Minimal fiat withdrawal": {
                  "summary": "أصغر payload مقبول لتحويل عملة ورقية (fiat) صادر",
                  "value": {
                    "transaction_id": "your-txn-2026-05-17-001",
                    "transaction_category": "finance",
                    "transaction_details": {
                      "direction": "outbound",
                      "amount": 1500,
                      "currency": "EUR",
                      "action_type": "withdrawal"
                    },
                    "subject": {
                      "entity_type": "individual",
                      "vendor_data": "user-12345",
                      "full_name": "Maria Garcia"
                    }
                  }
                },
                "Crypto outbound with screening": {
                  "summary": "سحب عملات مشفرة صادر إلى محفظة ذاتية الاستضافة، مع فحص اختياري",
                  "value": {
                    "transaction_id": "your-txn-2026-05-17-002",
                    "transaction_category": "finance",
                    "include_crypto_screening": true,
                    "transaction_details": {
                      "direction": "outbound",
                      "amount": 0.5,
                      "currency": "BTC",
                      "currency_kind": "crypto",
                      "amount_in_default_currency": 32500,
                      "default_currency": "USD",
                      "action_type": "withdrawal"
                    },
                    "subject": {
                      "entity_type": "individual",
                      "vendor_data": "user-12345",
                      "full_name": "Maria Garcia",
                      "payment_method": {
                        "method_type": "crypto_wallet",
                        "account_id": "bc1qexampleexchangewalletaddressxyz",
                        "issuing_country": "ESP"
                      }
                    },
                    "counterparty": {
                      "entity_type": "individual",
                      "payment_method": {
                        "method_type": "unhosted_wallet",
                        "account_id": "bc1qexampleexternalwalletaddressabc"
                      }
                    }
                  }
                },
                "Travel Rule transfer": {
                  "summary": "تحويل عملات مشفرة صادر مع بيانات المُرسِل/المستفيد وفقاً لـ Travel Rule",
                  "value": {
                    "transaction_id": "your-txn-2026-05-17-003",
                    "transaction_category": "travel_rule",
                    "transaction_details": {
                      "direction": "outbound",
                      "amount": 25000,
                      "currency": "USDT",
                      "currency_kind": "crypto",
                      "action_type": "transfer"
                    },
                    "subject": {
                      "entity_type": "individual",
                      "vendor_data": "user-12345",
                      "full_name": "Maria Garcia",
                      "date_of_birth": "1992-03-14",
                      "address": {
                        "country": "ESP",
                        "town": "Madrid",
                        "street": "Calle Mayor 1",
                        "post_code": "28013"
                      }
                    },
                    "counterparty": {
                      "entity_type": "individual",
                      "full_name": "John Beneficiary",
                      "institution_details": {
                        "name": "Beneficiary VASP, Inc.",
                        "code": "BVASP-US"
                      }
                    },
                    "travel_rule_details": {
                      "status": "AWAITING_COUNTERPARTY",
                      "protocol": "IVMS101",
                      "required": true,
                      "originator_data": {
                        "name": "Maria Garcia"
                      },
                      "beneficiary_data": {
                        "name": "John Beneficiary"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "تم إرسال المعاملة وتتم مراقبتها. يحتوي نص الاستجابة على تفاصيل المعاملة الكاملة (بنفس شكل `GET /v3/transactions/{transaction_id}/`)، بما يعكس أي نتائج قواعد تم تطبيقها بالفعل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetail"
                },
                "examples": {
                  "Approved with no rule hits": {
                    "value": {
                      "uuid": "abcdef12-3456-4890-abcd-ef1234567890",
                      "environment": "live",
                      "transaction_number": 4123,
                      "txn_id": "your-txn-2026-05-17-001",
                      "txn_date": "2026-05-17T08:42:00Z",
                      "zone_id": "Europe/Madrid",
                      "transaction_type": "finance",
                      "action_type": "withdrawal",
                      "direction": "OUTBOUND",
                      "status": "APPROVED",
                      "source": "LIVE",
                      "amount": "1500",
                      "currency": "EUR",
                      "currency_type": "fiat",
                      "amount_in_default_currency": "1620.45",
                      "default_currency_code": "USD",
                      "preferred_currency_amount": "1620.45",
                      "preferred_currency_code": "USD",
                      "payment_details": "Withdrawal to crypto wallet",
                      "payment_txn_id": null,
                      "score": 0,
                      "severity": null,
                      "decision_reason_code": null,
                      "decision_reason_label": null,
                      "vendor_data": "user-12345",
                      "metadata": {
                        "subject": {
                          "entity_type": "individual",
                          "vendor_data": "user-12345",
                          "full_name": "Maria Garcia",
                          "address": {},
                          "institution_details": {},
                          "device_context": {}
                        },
                        "counterparty": {}
                      },
                      "props": {},
                      "tags": [],
                      "parties": [
                        {
                          "uuid": "b1111111-2222-4333-8444-555555555555",
                          "role": "APPLICANT",
                          "entity_type": "individual",
                          "kind": "USER",
                          "vendor_data": "user-12345",
                          "full_name": "Maria Garcia",
                          "first_name": null,
                          "last_name": null,
                          "country_code": null,
                          "dob": null,
                          "address": {},
                          "institution_info": {},
                          "device": {},
                          "external_party_snapshot": null
                        }
                      ],
                      "payment_methods": [],
                      "documents": [],
                      "activities": [
                        {
                          "uuid": "d4e5f6a7-8901-4bcd-9ef0-123456789abc",
                          "activity_type": "TRANSACTION_CREATED",
                          "source": "TRANSACTION",
                          "status": "APPROVED",
                          "title": "withdrawal",
                          "description": "Transaction recorded.",
                          "metadata": {},
                          "occurred_at": "2026-05-17T08:42:11Z"
                        }
                      ],
                      "alerts": [],
                      "rule_runs": [],
                      "provider_results": [],
                      "travel_rule": null,
                      "network_snapshot": null,
                      "remediation": null,
                      "action_required": null,
                      "cost_breakdown": null
                    }
                  },
                  "Flagged for review": {
                    "value": {
                      "uuid": "abcdef12-3456-4890-abcd-ef1234567891",
                      "environment": "live",
                      "transaction_number": 4124,
                      "txn_id": "your-txn-2026-05-17-002",
                      "txn_date": "2026-05-17T08:42:00Z",
                      "zone_id": "Europe/Madrid",
                      "transaction_type": "finance",
                      "action_type": "withdrawal",
                      "direction": "OUTBOUND",
                      "status": "IN_REVIEW",
                      "source": "LIVE",
                      "amount": "0.5",
                      "currency": "BTC",
                      "currency_type": "crypto",
                      "amount_in_default_currency": "32500",
                      "default_currency_code": "USD",
                      "preferred_currency_amount": "32500",
                      "preferred_currency_code": "USD",
                      "payment_details": "Withdrawal to crypto wallet",
                      "payment_txn_id": null,
                      "score": 78,
                      "severity": "HIGH",
                      "decision_reason_code": "WALLET_HIGH_RISK",
                      "decision_reason_label": "Destination wallet flagged as high risk",
                      "vendor_data": "user-12345",
                      "metadata": {
                        "subject": {
                          "entity_type": "individual",
                          "vendor_data": "user-12345",
                          "full_name": "Maria Garcia",
                          "address": {},
                          "institution_details": {},
                          "device_context": {}
                        },
                        "counterparty": {}
                      },
                      "props": {
                        "order_id": "ord-9988"
                      },
                      "tags": [],
                      "parties": [
                        {
                          "uuid": "b1111111-2222-4333-8444-555555555555",
                          "role": "APPLICANT",
                          "entity_type": "individual",
                          "kind": "USER",
                          "vendor_data": "user-12345",
                          "full_name": "Maria Garcia",
                          "first_name": null,
                          "last_name": null,
                          "country_code": null,
                          "dob": null,
                          "address": {},
                          "institution_info": {},
                          "device": {},
                          "external_party_snapshot": null
                        }
                      ],
                      "payment_methods": [],
                      "documents": [],
                      "activities": [],
                      "alerts": [
                        {
                          "uuid": "a7b8c9d0-1234-4abc-9def-567890abcdef",
                          "title": "Destination wallet flagged as high risk",
                          "description": "Provider risk score exceeded the configured threshold.",
                          "severity": "HIGH",
                          "status": "OPEN",
                          "source": "RULE",
                          "metadata": {},
                          "created_at": "2026-05-17T08:42:12Z",
                          "due_at": null
                        }
                      ],
                      "rule_runs": [
                        {
                          "uuid": "e5f6a7b8-9012-4cde-af01-23456789abcd",
                          "rule": "f6a7b8c9-0123-4def-b012-3456789abcde",
                          "rule_title": "High-risk wallet screening",
                          "rule_description": null,
                          "rule_category": "crypto",
                          "matched": true,
                          "is_test": false,
                          "mode": "ACTIVE",
                          "severity": "HIGH",
                          "score_delta": 78,
                          "status_target": "IN_REVIEW",
                          "action_summary": "score +78; change_status:IN_REVIEW",
                          "metadata": {},
                          "created_at": "2026-05-17T08:42:12Z"
                        }
                      ],
                      "provider_results": [],
                      "travel_rule": null,
                      "network_snapshot": null,
                      "remediation": null,
                      "action_required": null,
                      "cost_breakdown": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق (حقول مطلوبة مفقودة، أو تكرار لـ `transaction_id`، أو قيمة enum غير معروفة، أو عملة غير صالحة، وما إلى ذلك).",
            "content": {
              "application/json": {
                "examples": {
                  "Missing required field": {
                    "value": {
                      "transaction_details": {
                        "amount": [
                          "This field is required."
                        ]
                      }
                    }
                  },
                  "Duplicate transaction_id": {
                    "value": {
                      "transaction_id": [
                        "A transaction with this transaction_id already exists."
                      ]
                    }
                  },
                  "Invalid category": {
                    "value": {
                      "non_field_errors": [
                        "Unsupported transaction category."
                      ]
                    }
                  },
                  "Missing subject identity": {
                    "value": {
                      "subject": [
                        "subject.vendor_data and subject.full_name are required."
                      ]
                    }
                  },
                  "Blocklisted participant": {
                    "value": {
                      "vendor_data": [
                        "The individual 'user-12345' is in the blocklist and cannot participate in transactions."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح إرسال معاملات لهذا التطبيق. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "أنشأ طلب آخر يحمل نفس `transaction_id` المعاملة أثناء معالجة هذا الطلب، لذا ينجح إرسال واحد فقط من عمليتي إرسال متزامنتين. اقرأ المعاملة الحالية بدلاً من إعادة الإرسال.",
            "content": {
              "application/json": {
                "examples": {
                  "Concurrent duplicate": {
                    "value": {
                      "detail": "A transaction with this transaction_id already exists."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك عمليات إنشاء المعاملات واستيعاب الأحداث (`POST /v3/transactions/`، `POST /v3/events/`، `POST /v3/events/batch/`) رصيداً قدره 600 طلب في الدقيقة لكل مفتاح API، وهو منفصل عن رصيد الـ 300 المشترك بين سائر طلبات الكتابة الأخرى. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني التي يجب انتظارها قبل إعادة المحاولة، مقربة للأعلى لتقع إعادة المحاولة في النافذة التالية.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Ingestion rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "create",
          "auth": "api_key",
          "server": true
        }
      }
    },
    "/v3/transactions/{transaction_id}/": {
      "get": {
        "summary": "الحصول على المعاملة",
        "description": "استرجع سجل المراقبة الكامل لمعاملة واحدة: الأطراف، والدرجة/مستوى الخطورة، وتشغيلات القواعد، والتنبيهات، ونتيجة Travel Rule، وجلسة المعالجة.",
        "operationId": "getTransaction",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID الثابت للمعاملة من Didit (وهو `uuid` المُعاد من الإنشاء / القائمة، **وليس** `txn_id` الخاص بك).",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "abcdef12-3456-7890-abcd-ef1234567890"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/transactions/abcdef12-3456-7890-abcd-ef1234567890/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.retrieve(\n    \"abcdef12-3456-7890-abcd-ef1234567890\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.retrieve(\"abcdef12-3456-7890-abcd-ef1234567890\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Retrieve(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().retrieve(\"abcdef12-3456-7890-abcd-ef1234567890\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->retrieve('abcdef12-3456-7890-abcd-ef1234567890');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.retrieve(\"abcdef12-3456-7890-abcd-ef1234567890\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.RetrieveAsync(\"abcdef12-3456-7890-abcd-ef1234567890\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل المعاملة الكاملة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetail"
                },
                "examples": {
                  "In review with an alert": {
                    "value": {
                      "uuid": "abcdef12-3456-4890-abcd-ef1234567890",
                      "environment": "live",
                      "transaction_number": 4123,
                      "txn_id": "your-txn-2026-05-17-001",
                      "txn_date": "2026-05-17T08:42:00Z",
                      "zone_id": "Europe/Madrid",
                      "transaction_type": "finance",
                      "action_type": "withdrawal",
                      "direction": "OUTBOUND",
                      "status": "IN_REVIEW",
                      "source": "LIVE",
                      "amount": "1500",
                      "currency": "EUR",
                      "currency_type": "fiat",
                      "amount_in_default_currency": "1620.45",
                      "default_currency_code": "USD",
                      "preferred_currency_amount": "1620.45",
                      "preferred_currency_code": "USD",
                      "payment_details": "Withdrawal to crypto wallet",
                      "payment_txn_id": null,
                      "score": 78,
                      "severity": "HIGH",
                      "decision_reason_code": "WALLET_HIGH_RISK",
                      "decision_reason_label": "Destination wallet flagged as high risk",
                      "vendor_data": "user-12345",
                      "metadata": {
                        "subject": {
                          "entity_type": "individual",
                          "vendor_data": "user-12345",
                          "full_name": "Maria Garcia",
                          "address": {},
                          "institution_details": {},
                          "device_context": {}
                        },
                        "counterparty": {}
                      },
                      "props": {
                        "order_id": "ord-9988"
                      },
                      "tags": [],
                      "parties": [
                        {
                          "uuid": "b1111111-2222-4333-8444-555555555555",
                          "role": "APPLICANT",
                          "entity_type": "individual",
                          "kind": "USER",
                          "vendor_data": "user-12345",
                          "full_name": "Maria Garcia",
                          "first_name": null,
                          "last_name": null,
                          "country_code": null,
                          "dob": null,
                          "address": {},
                          "institution_info": {},
                          "device": {},
                          "external_party_snapshot": null
                        }
                      ],
                      "payment_methods": [],
                      "documents": [],
                      "activities": [],
                      "alerts": [
                        {
                          "uuid": "a7b8c9d0-1234-4abc-9def-567890abcdef",
                          "title": "Destination wallet flagged as high risk",
                          "description": "Provider risk score exceeded the configured threshold.",
                          "severity": "HIGH",
                          "status": "OPEN",
                          "source": "RULE",
                          "metadata": {},
                          "created_at": "2026-05-17T08:42:12Z",
                          "due_at": null
                        }
                      ],
                      "rule_runs": [],
                      "provider_results": [],
                      "travel_rule": null,
                      "network_snapshot": null,
                      "remediation": null,
                      "action_required": null,
                      "cost_breakdown": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح قراءة معاملات هذا التطبيق. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد معاملة بمعرّف UUID هذا للتطبيق (محذوفة، أو لم يتم إنشاؤها مطلقاً، أو تتبع تطبيقاً آخر، أو أن مقطع المسار ليس معرّف UUID صالحاً).",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/transactions/sdk-token/": {
      "post": {
        "summary": "إصدار token لمعاملات SDK",
        "description": "إصدار token محدد النطاق وقصير الأجل يُمرره تطبيقك إلى حزم SDK الخاصة بـ Didit حتى تتمكن من إرسال المعاملات مباشرة من جهاز المستخدم النهائي عبر `POST /v1/transactions/`. يكون الـ token مرتبطًا بـ `vendor_data` واحد (معرّف المستخدم لديك): يتم فرض هوية موضوع كل معاملة تُرسل باستخدامه من جانب الخادم بناءً على هذا الارتباط، حتى لا يتمكن أي عميل متلاعب به من الإرسال نيابة عن مستخدم آخر. أصدر الـ tokens من واجهتك الخلفية - لا تقم أبدًا بتضمين مفتاح API نفسه داخل التطبيق. تُقبل أيضًا الأسماء البديلة بصيغة camelCase (`vendorData`، و`ttlSeconds`، و`maxUses`).",
        "operationId": "createTransactionSdkToken",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "create_sdk_token",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vendor_data": {
                    "type": "string",
                    "description": "معرّفك الداخلي للمستخدم النهائي الذي يقتصر عليه هذا الـ token. يُفرَض كهوية الموضوع لكل معاملة تُقدَّم باستخدام الـ token.",
                    "example": "user-042"
                  },
                  "ttl_seconds": {
                    "type": "integer",
                    "default": 900,
                    "maximum": 86400,
                    "description": "عمر token بالثواني. القيمة الافتراضية هي 900 (15 دقيقة)؛ والحد الأقصى 86400 (24 ساعة)."
                  },
                  "max_uses": {
                    "type": "integer",
                    "nullable": true,
                    "description": "الحد الأقصى لعدد عمليات الإرسال الناجحة المسموح بها باستخدام token هذا. احذفه أو استخدم null للاستخدام غير المحدود خلال فترة الصلاحية (TTL)."
                  }
                },
                "required": [
                  "vendor_data"
                ]
              },
              "example": {
                "vendor_data": "user-042",
                "ttl_seconds": 900,
                "max_uses": 3
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/transactions/sdk-token/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"vendor_data\": \"user-042\", \"ttl_seconds\": 900, \"max_uses\": 3}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.create_sdk_token(\n    vendor_data=\"user-042\",\n    ttl_seconds=900,\n    max_uses=3,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.createSdkToken({\n  vendor_data: \"user-042\",\n  ttl_seconds: 900,\n  max_uses: 3,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.CreateSDKToken(ctx, didit.TransactionsCreateSDKTokenParams{\n\tVendorData: \"user-042\",\n\tTTLSeconds: didit.Int(900),\n\tMaxUses:    didit.Int(3),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TransactionsCreateSdkTokenParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().createSdkToken(TransactionsCreateSdkTokenParams.builder()\n        .vendorData(\"user-042\")\n        .ttlSeconds(900L)\n        .maxUses(3L)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->createSdkToken([\n    'vendor_data' => 'user-042',\n    'ttl_seconds' => 900,\n    'max_uses' => 3,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.create_sdk_token(\n  vendor_data: \"user-042\",\n  ttl_seconds: 900,\n  max_uses: 3\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.CreateSdkTokenAsync(new TransactionsCreateSdkTokenParams\n{\n    VendorData = \"user-042\",\n    TtlSeconds = 900,\n    MaxUses = 3,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "الـ token الذي تم إنشاؤه. مرّر `sdk_token` إلى تطبيقك؛ فهو يُجري المصادقة لـ endpoint الخاصة بـ `/v1/transactions/` المواجهة للجهاز عبر رأس `X-Transaction-Token` حتى `expires_at`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sdk_token": {
                      "type": "string",
                      "description": "token المعاملة محدد النطاق لتمريره إلى SDK."
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "وقت توقف قبول token."
                    }
                  }
                },
                "example": {
                  "sdk_token": "q7Zt...urlsafe",
                  "expires_at": "2026-07-07T12:15:00Z"
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق: حقل `vendor_data` مفقود، أو `ttl_seconds` خارج النطاق المسموح به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing vendor_data": {
                    "value": {
                      "vendor_data": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid API Key": {
                    "value": {
                      "detail": "Invalid API Key."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/transactions/": {
      "post": {
        "summary": "إرسال معاملة من SDK",
        "description": "endpoint مخصص للأجهزة تستدعيه SDKs الخاصة بـ Didit لإرسال معاملة مباشرة من جهاز المستخدم النهائي. المصادقة عبارة عن token بنطاق محدد من `POST /v3/transactions/sdk-token/` يُرسل في رأس `X-Transaction-Token` بدلاً من مفتاح API، والـ endpoint يدعم CORS بحيث يمكن للمتصفحات استدعاؤه عبر مصادر مختلفة (cross-origin). تستخدم الـ payload أسماء wire البديلة بتنسيق camelCase الموضحة أدناه (تقوم دوال `submitTransaction` في SDK ببنائها نيابةً عنك). هناك ثلاثة ضمانات من جانب الخادم: يتم استخلاص التطبيق دائماً من الـ token؛ ويتم فرض هوية الموضوع (`externalUserId`) دائماً من `vendor_data` الخاص بالـ token، لذا يتم تجاهل قيم الـ payload المنتحلة؛ كما يتم إرفاق معلومات الجهاز الاستخباراتية (بصمة الجهاز من SDK بالإضافة إلى عنوان IP وuser agent المستخرجين من الخادم) بالموضوع تلقائياً.",
        "operationId": "submitTransactionFromSdk",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "submit_from_device",
          "auth": "device_token",
          "server": false
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "TransactionTokenAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "txnId": {
                    "type": "string",
                    "description": "معرّفك الفريد لهذه المعاملة (يطابق `transaction_id`، بحد أقصى 128 حرفاً).",
                    "example": "wd-2026-07-07-0042"
                  },
                  "txnDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "وقت حدوث المعاملة (يطابق `transaction_at`). القيمة الافتراضية هي الوقت الحالي إذا تم حذفه."
                  },
                  "zoneId": {
                    "type": "string",
                    "description": "معرّف المنطقة الزمنية لـ IANA (يطابق `time_zone`)، مثل `Europe/Madrid`."
                  },
                  "type": {
                    "type": "string",
                    "description": "فئة المعاملة (يتم تعيينها إلى `transaction_category`)، على سبيل المثال `finance`، `kyc`، `travelRule`، `userPlatformEvent`، `gamblingBet`.",
                    "example": "travelRule"
                  },
                  "info": {
                    "type": "object",
                    "description": "التفاصيل المالية الأساسية للمعاملة (تقابل `transaction_details`).",
                    "required": [
                      "direction",
                      "amount",
                      "currency"
                    ],
                    "properties": {
                      "direction": {
                        "type": "string",
                        "description": "اتجاه المعاملة بالنسبة إلى الشخص المعني. غير حساس لحالة الأحرف؛ يُقبل `in`/`out` كأسماء بديلة. يُعاد بأحرف كبيرة (`INBOUND`/`OUTBOUND`).",
                        "example": "out"
                      },
                      "amount": {
                        "type": "number",
                        "description": "مبلغ المعاملة (حتى 18 منزلة عشرية). يتم أيضاً قبول سلسلة عشرية وهي الطريقة الوحيدة للحفاظ على أكثر من حوالي 15 رقماً معنوياً: يتم تحليل رقم JSON كعدد عائم ثنائي أولاً، وبالتالي يتم تخزين `0.123456789012345678` كـ `0.12345678901234568`.",
                        "example": 0.25
                      },
                      "currency": {
                        "type": "string",
                        "description": "رمز العملة. يُقبل أي رمز أبجدي وفق معيار ISO 4217 (مثل `EUR`، و`USD`، و`NGN`)، وكذلك يُقبل رمز أصل مشفر (مثل `BTC`). يُفضل استخدام رمز متداول حالياً. ليس لكل رمز مقبول سعر صرف: عندما لا يتوفر سعر صرف للرمز (على سبيل المثال وحدة المحاسبة `XSU` وفق ISO، أو رمز عملة مشفرة لا تحدد Didit سعراً له)، يفشل التحويل التلقائي ويتم إرجاع `preferred_currency_amount` بقيمة فارغة (null) ما لم يقدّم الطلب قيمة محولة مسبقاً في `amountInDefaultCurrency`.",
                        "example": "ETH"
                      },
                      "currencyType": {
                        "type": "string",
                        "description": "ما إذا كانت العملة `fiat` أو `crypto` (تُطابق `currency_kind`)."
                      },
                      "amountInDefaultCurrency": {
                        "type": "number",
                        "nullable": true,
                        "description": "مبلغ محوّل مسبقاً بالعملة الافتراضية (يُربط بالحقل `amount_in_default_currency`). إذا لم يُذكر، ستتم محاولة تحويل العملات الأجنبية (FX) تلقائياً."
                      },
                      "defaultCurrencyCode": {
                        "type": "string",
                        "description": "رمز العملة الافتراضي للمبلغ المحول (يطابق `default_currency`). أي رمز ISO 4217 متداول حاليًا."
                      },
                      "paymentDetails": {
                        "type": "string",
                        "nullable": true,
                        "description": "مرجع الدفع أو الملاحظة بنص حر (يرتبط بـ `payment_details`)."
                      },
                      "paymentTxnId": {
                        "type": "string",
                        "nullable": true,
                        "description": "مرجع الدفع الخارجي (يقابل `payment_reference_id`)؛ وهو تجزئة المعاملة على السلسلة لمعاملات العملات الرقمية المشفرة."
                      },
                      "type": {
                        "type": "string",
                        "nullable": true,
                        "description": "النوع الفرعي للمعاملة (يطابق `action_type`)، مثل `deposit`، `withdrawal`، `transfer`."
                      },
                      "cryptoParams": {
                        "type": "object",
                        "description": "معاملات خاصة بالعملات المشفرة، مثل `{\"crypto_chain\": \"ETH\"}`."
                      }
                    }
                  },
                  "subject": {
                    "type": "object",
                    "description": "موضوع المعاملة (مقدم الطلب). يتم تجاهل `externalUserId` هنا: إذ يتم فرض هوية الموضوع دائماً من `vendor_data` الخاصة بالرمز token.",
                    "required": [
                      "fullName"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "نوع الكيان (يرتبط بـ `entity_type`): `individual` (افتراضي) أو `company`."
                      },
                      "externalUserId": {
                        "type": "string",
                        "description": "يتم تجاهله في الموضوع - ويُفرَض من جانب الخادم عبر `vendor_data` الخاصة بالـ token."
                      },
                      "fullName": {
                        "type": "string",
                        "example": "Jane Doe"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "dob": {
                        "type": "string",
                        "format": "date",
                        "description": "تاريخ الميلاد (YYYY-MM-DD؛ يقابل `date_of_birth`)."
                      },
                      "address": {
                        "type": "object",
                        "description": "كائن العنوان مع `country` (وفق معيار ISO 3166-1 alpha-3) و`town` و`state` و`street` و`post_code`."
                      },
                      "institutionInfo": {
                        "type": "object",
                        "description": "تفاصيل المؤسسة للمشاركين المؤسسيين (تطابق `institution_details`)."
                      },
                      "device": {
                        "type": "object",
                        "description": "سياق اختياري صريح للجهاز. يتم دمجه مع معلومات الجهاز الملتقطة تلقائياً؛ وتكون الأولوية للحقول المستمدة من الخادم في حال وجود تعارض."
                      },
                      "paymentMethod": {
                        "type": "object",
                        "description": "طريقة الدفع المستخدمة من قبل الشخص المعني (تطابق `payment_method`).",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "نوع طريقة الدفع (يطابق `method_type`)، مثل `bank_card`، `bank_account`، `crypto_wallet`، `ewallet`، `unhosted_wallet`، `other`."
                          },
                          "accountId": {
                            "type": "string",
                            "description": "معرّف الحساب (يرتبط بـ `account_id`): IBAN، أو بصمة البطاقة، أو عنوان."
                          },
                          "issuingCountry": {
                            "type": "string",
                            "description": "رمز دولة جهة الإصدار وفق المعيار ISO 3166-1 alpha-3 (يطابق `issuing_country`)."
                          }
                        }
                      }
                    }
                  },
                  "counterparty": {
                    "type": "object",
                    "description": "الطرف المقابل للمعاملة (اختياري). بنفس بنية `subject`؛ يكون `externalUserId` ذا دلالة هنا.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "نوع الكيان (يرتبط بـ `entity_type`): `individual` أو `company`."
                      },
                      "externalUserId": {
                        "type": "string",
                        "description": "معرّفك الداخلي للطرف المقابل (يُعيَّن إلى `vendor_data`)."
                      },
                      "fullName": {
                        "type": "string"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "dob": {
                        "type": "string",
                        "format": "date"
                      },
                      "address": {
                        "type": "object"
                      },
                      "institutionInfo": {
                        "type": "object"
                      },
                      "device": {
                        "type": "object"
                      },
                      "paymentMethod": {
                        "type": "object",
                        "description": "طريقة الدفع المستخدمة من قبل الطرف المقابل (تطابق `payment_method`). في معاملات travelRule، يُصرّح `type: \"unhosted_wallet\"` بأن محفظة الطرف المقابل ذاتية الاستضافة: يتخطى التحويل توجيه VASP للطرف المقابل، ويتم إنشاؤه مباشرة في `UNCONFIRMED_OWNERSHIP`، و(عند تمكين `auto_wallet_verification`) يتم إنشاء جلسة أداة ملكية المحفظة تلقائياً وإرجاعها في `action_required` حتى يتمكن SDK من تشغيلها.",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "نوع طريقة الدفع (يطابق `method_type`)، مثل `bank_card`، `bank_account`، `crypto_wallet`، `ewallet`، `unhosted_wallet`، `other`. استخدم `unhosted_wallet` للتصريح عن محفظة ذاتية الاستضافة لـ Travel Rule."
                          },
                          "accountId": {
                            "type": "string",
                            "description": "معرّف الحساب (يرتبط بـ `account_id`): IBAN، أو بصمة البطاقة، أو عنوان."
                          },
                          "issuingCountry": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "props": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "أزواج مفتاح-قيمة مخصصة (تُعيّن إلى `custom_properties`). يمكن الإشارة إلى كل مفتاح في شروط القواعد كـ `custom_values.<key>`."
                  },
                  "travelRule": {
                    "type": "object",
                    "description": "تفاصيل Travel Rule (تطابق `travel_rule_details`). عند تفعيل Travel Rule للتطبيق، تتجاهل Didit أي `status` ترسله وتقوم بإدارة التبادل بنفسها.",
                    "required": [
                      "status"
                    ],
                    "properties": {
                      "status": {
                        "type": "string"
                      },
                      "protocol": {
                        "type": "string"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "obligationsCount": {
                        "type": "integer"
                      },
                      "originatorData": {
                        "type": "object"
                      },
                      "beneficiaryData": {
                        "type": "object"
                      },
                      "metadata": {
                        "type": "object"
                      }
                    }
                  },
                  "includeCryptoScreening": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "تجاوز لكل معاملة لفحص تحليلات البلوكتشين للعملات المشفرة (يقابل `include_crypto_screening`)."
                  },
                  "fingerprint_v2": {
                    "type": "object",
                    "description": "حزمة payload الخاصة ببصمة الجهاز `didit-fp-v2`. يتم إدراجها تلقائياً بواسطة حزم SDK؛ وتكون ذات صلة فقط عند استدعاء wire API مباشرة."
                  }
                },
                "required": [
                  "txnId",
                  "type",
                  "info",
                  "subject"
                ]
              },
              "example": {
                "txnId": "wd-2026-07-07-0042",
                "type": "travelRule",
                "info": {
                  "direction": "out",
                  "amount": "0.25",
                  "currency": "ETH",
                  "currencyType": "crypto",
                  "cryptoParams": {
                    "crypto_chain": "ETH"
                  }
                },
                "subject": {
                  "fullName": "Jane Doe"
                },
                "counterparty": {
                  "fullName": "Ana Diaz",
                  "paymentMethod": {
                    "type": "unhosted_wallet",
                    "accountId": "0xBeneficiaryWallet01"
                  }
                },
                "travelRule": {
                  "status": "AWAITING_COUNTERPARTY",
                  "beneficiaryData": {
                    "wallet_address": "0xBeneficiaryWallet01",
                    "name": "Ana Diaz"
                  }
                },
                "includeCryptoScreening": true
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v1/transactions/ \\\n  -H 'X-Transaction-Token: SDK_TOKEN' -H 'Content-Type: application/json' \\\n  -d '{\"txnId\": \"wd-2026-07-07-0042\", \"type\": \"travelRule\", \"info\": {\"direction\": \"out\", \"amount\": \"0.25\", \"currency\": \"ETH\", \"currencyType\": \"crypto\"}, \"subject\": {\"fullName\": \"Jane Doe\"}, \"counterparty\": {\"fullName\": \"Ana Diaz\", \"paymentMethod\": {\"type\": \"unhosted_wallet\", \"accountId\": \"0xBeneficiaryWallet01\"}}, \"travelRule\": {\"status\": \"AWAITING_COUNTERPARTY\", \"beneficiaryData\": {\"wallet_address\": \"0xBeneficiaryWallet01\", \"name\": \"Ana Diaz\"}}, \"includeCryptoScreening\": true}'"
          },
          {
            "lang": "javascript",
            "label": "Web SDK",
            "source": "import { DiditSdk } from '@didit-protocol/sdk-web';\n\nconst result = await DiditSdk.shared.submitTransaction({\n  transactionToken: sdkToken,\n  transaction: {\n    txnId: 'wd-2026-07-07-0042',\n    category: 'travelRule',\n    details: { direction: 'out', amount: '0.25', currency: 'ETH', currencyType: 'crypto' },\n    subject: { fullName: 'Jane Doe' },\n    counterparty: { fullName: 'Ana Diaz', paymentMethod: { type: 'unhosted_wallet', accountId: '0xBeneficiaryWallet01' } },\n    travelRule: { status: 'AWAITING_COUNTERPARTY', beneficiaryData: { wallet_address: '0xBeneficiaryWallet01', name: 'Ana Diaz' } },\n    includeCryptoScreening: true\n  },\n  onActionCompleted: (refreshed) => console.log(refreshed.status)\n});"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إرسال المعاملة وتتم مراقبتها. نفس شكل تفاصيل `GET /v3/transactions/{transaction_id}/`، بما في ذلك كتلة `action_required` عندما يتعين على المستخدم النهائي إكمال إجراء للمتابعة (تقوم حزم SDK بتشغيله تلقائياً بشكل افتراضي).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetail"
                },
                "examples": {
                  "Wallet ownership required": {
                    "value": {
                      "uuid": "22222222-3333-4444-5555-666666666666",
                      "txn_id": "wd-2026-07-07-0042",
                      "transaction_type": "travelRule",
                      "direction": "OUTBOUND",
                      "status": "APPROVED",
                      "amount": "0.25",
                      "currency": "ETH",
                      "travel_rule": {
                        "uuid": "33333333-4444-5555-6666-777777777777",
                        "status": "UNCONFIRMED_OWNERSHIP",
                        "required": true
                      },
                      "action_required": {
                        "type": "wallet_ownership",
                        "url": "https://verify.didit.me/wallet-ownership/3s9x...urlsafe",
                        "widget_session_id": "77777777-8888-9999-aaaa-bbbbbbbbbbbb",
                        "expires_at": "2026-07-07T13:00:00Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق (حقول مطلوبة مفقودة، أو تكرار لـ `txnId`، أو فئة غير معروفة).",
            "content": {
              "application/json": {
                "examples": {
                  "Missing fields": {
                    "value": {
                      "transaction_details": {
                        "currency": [
                          "This field is required."
                        ]
                      }
                    }
                  },
                  "Duplicate txnId": {
                    "value": {
                      "transaction_id": [
                        "A transaction with this transaction_id already exists."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "تم رفض token المعاملة: مفقود أو غير معروف أو ملغى أو تجاوز `max_uses` أو منتهي الصلاحية. تحتوي استجابات token المنتهي الصلاحية دائماً على الكلمة `expired` في التفاصيل، وهي الطريقة التي تميز بها حزم SDK بين أخطاء `expired_token` و`invalid_token`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "Invalid transaction token."
                    }
                  },
                  "Expired token": {
                    "value": {
                      "detail": "Transaction token expired."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "أنشأ طلب آخر يحمل نفس `txnId` المعاملة أثناء معالجة هذا الطلب، لذا ينجح إرسال واحد فقط من عمليتي إرسال متزامنتين. اقرأ المعاملة الحالية بدلاً من إعادة الإرسال.",
            "content": {
              "application/json": {
                "examples": {
                  "Concurrent duplicate": {
                    "value": {
                      "detail": "A transaction with this transaction_id already exists."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/transactions/{transaction_id}/": {
      "get": {
        "summary": "الحصول على معاملة من SDK",
        "description": "endpoint قراءة مخصص للأجهزة، تتم المصادقة عليه باستخدام نفس الـ `X-Transaction-Token` المستخدم للإرسال. تقوم الـ SDKs باستطلاعه بعد اكتمال سير عمل الإجراء الذي تم تشغيله تلقائياً أو بعد إغلاق نافذته، بحيث لا تعتمد الحالة النهائية أبداً على إشعار واحد. يُرجع نفس تفاصيل المعاملة الموجودة في استجابة الإرسال، بما في ذلك كتلة `action_required` الحالية (`null` بمجرد حل الإجراء).",
        "operationId": "getTransactionFromSdk",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "retrieve_from_device",
          "auth": "device_token",
          "server": false
        },
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID الثابت للمعاملة من Didit (وهو `uuid` من استجابة الإرسال، **وليس** `txnId` الخاص بك).",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "22222222-3333-4444-5555-666666666666"
          }
        ],
        "security": [
          {
            "TransactionTokenAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v1/transactions/22222222-3333-4444-5555-666666666666/' \\\n  -H 'X-Transaction-Token: SDK_TOKEN'"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل المعاملة الكاملة، بما في ذلك `action_required` (`null` بمجرد حل الإجراء المعلق).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetail"
                }
              }
            }
          },
          "401": {
            "description": "تم رفض token المعاملة: مفقود أو غير معروف أو ملغى أو تجاوز `max_uses` أو منتهي الصلاحية.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired token": {
                    "value": {
                      "detail": "Transaction token expired."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد معاملة بمعرّف UUID هذا لتطبيق الـ token، أو أن مقطع المسار ليس معرّف UUID صالحاً.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/businesses/": {
      "get": {
        "summary": "سرد الشركات",
        "description": "سرد [الشركات](/entities/businesses) التي يجمعها Didit من جلسات KYB التي تشترك في نفس `vendor_data` (سلسلة نصية حرة، وليست معرّف UUID)، بالإضافة إلى الشركات التي تم إنشاؤها عبر API. القائمة مقسمة لصفحات، ومرتبة حسب `last_session_at` تنازلياً. لا يدعم هذا الـ endpoint معاملات التصفية أو البحث — يمكنك جلب الصفحات وإجراء التصفية من جانب العميل.",
        "operationId": "list_businesses",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "description": "حجم الصفحة. القيمة الافتراضية 50 عند إغفاله. لا يوجد حد أقصى مفروض، ولكن حافظ على صغر حجم الصفحات لتقليل زمن الاستجابة."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "description": "إزاحة تستند إلى الصفر للسجل الأول المراد إرجاعه. يُفضل اتباع رابط `next` من الصفحة السابقة بدلاً من حساب ذلك يدوياً."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/businesses/?limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.businesses.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.businesses.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Businesses.ListAutoPaging(ctx, didit.BusinessesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.businesses().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->businesses->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.businesses.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Businesses.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "قائمة مقسمة إلى صفحات بالشركات مع الحالة وعدد الجلسات وتفصيل الميزات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد الصفوف المتطابقة — دقيق حتى 100، ويقتصر على 100 كحد أقصى بعد ذلك لتحسين الأداء. لا تستخدمه لاكتشاف الصفحة الأخيرة؛ اعتمد بدلاً من ذلك على كون `next` بقيمة `null`."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BusinessListItem"
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "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": "ACTIVE",
                          "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"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح سرد الشركات لهذا التطبيق. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/customization/": {
      "get": {
        "summary": "الحصول على تخصيص العلامة التجارية",
        "description": "يعرض هوية العلامة البيضاء الخاصة بالتطبيق والمحددة بناءً على مفتاح API: الألوان، والخطوط، ونصف قطر الحواف (border radii)، وعناوين URL للشعار، وخيارات UI/UX. تُدار إعدادات النطاق المخصص والبريد الإلكتروني للعلامة البيضاء حصرياً في Business Console وليست جزءاً من هذه الاستجابة.",
        "operationId": "get_customization",
        "x-didit-sdk": {
          "resource": "customization",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Customization"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/customization/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.customization.retrieve()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.customization.retrieve();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Customization.Retrieve(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.customization().retrieve();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->customization->retrieve();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.customization.retrieve\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Customization.RetrieveAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تخصيص الهوية البصرية الحالي للتطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandingCustomization"
                },
                "examples": {
                  "Default branding": {
                    "value": {
                      "color_primary": "#000000",
                      "color_secondary": "#9DA1A1",
                      "color_background": "#FFFFFF",
                      "color_panel": "#2567FF",
                      "color_panel_10": "#1A1A1A",
                      "color_on_panel_1": "#9DA1A1",
                      "color_on_panel_2": "#F4F4F6",
                      "color_on_background": "#000000",
                      "color_button_1": "#2567FF",
                      "color_button_2": "#F8F8F8",
                      "color_button_text_1": "#FFFFFF",
                      "color_button_text_2": "#000000",
                      "color_pill_text": "#111827",
                      "border_radius_panel": 10,
                      "border_radius_buttons": 12,
                      "font_family": "Inter",
                      "font_weight": "regular",
                      "font_url": "https://fonts.googleapis.com/css2?family=Inter",
                      "logo_square": null,
                      "logo_rectangular": null,
                      "logo_rectangular_dark": null,
                      "favicon": null,
                      "app_public_name": "Acme Verify",
                      "privacy_policy_url": "https://acme.com/privacy",
                      "skip_welcome_screen": false,
                      "disable_login_with_didit": false,
                      "hide_progress_bar": false,
                      "callback_seconds": 3
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف. يُرجع المفتاح المفقود رمز الحالة `403`؛ بينما يُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية رمز الحالة `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث تخصيص العلامة التجارية",
        "description": "تحديث جزئي للعلامة التجارية الخاصة بالعلامة البيضاء للتطبيق. أرسل `application/json` لتغيير الألوان والخطوط ونصف القطر وخيارات واجهة المستخدم، أو `multipart/form-data` لتحميل صور الشعار. يتم تغيير الحقول التي تدرجها فقط. لا يمكن تعيين النطاق المخصص والبريد الإلكتروني بالعلامة البيضاء عبر هذا الـ endpoint — استخدم Business Console لذلك.",
        "operationId": "update_customization",
        "x-didit-sdk": {
          "resource": "customization",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Customization"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandingCustomizationUpdate"
              },
              "examples": {
                "Update colors and font": {
                  "summary": "تغيير ألوان وخط العلامة التجارية",
                  "value": {
                    "color_primary": "#123456",
                    "color_button_1": "#2567FF",
                    "font_family": "AR One Sans",
                    "border_radius_buttons": 16
                  }
                },
                "Update UI options": {
                  "summary": "تغيير الاسم العام وخيارات التدفق",
                  "value": {
                    "app_public_name": "Acme Verify",
                    "privacy_policy_url": "https://acme.com/privacy",
                    "skip_welcome_screen": true,
                    "hide_progress_bar": true,
                    "callback_seconds": 5
                  }
                },
                "Remove a logo": {
                  "summary": "حذف الشعار المستطيل الحالي",
                  "value": {
                    "delete_logo_rectangular": true
                  }
                },
                "Remove the dark-mode logo": {
                  "summary": "حذف الشعار الحالي للوضع الداكن",
                  "value": {
                    "delete_logo_rectangular_dark": true
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "description": "استخدم multipart/form-data فقط لتحميل صور الشعار. يمكن أيضاً إرسال حقول العلامة التجارية المذكورة أعلاه كحقول نموذج في الطلب نفسه.",
                "properties": {
                  "image_square": {
                    "type": "string",
                    "format": "binary",
                    "description": "شعار مربع (نسبة العرض إلى الارتفاع 1:1). بتنسيق PNG أو JPG أو WebP، بحجم 512 بكسل على الأقل على الجانب الطويل، وبحد أقصى **1 MB**."
                  },
                  "image_rectangular": {
                    "type": "string",
                    "format": "binary",
                    "description": "شعار مستطيل (نسبة العرض إلى الارتفاع 2:1). بتنسيق PNG أو JPG أو WebP، وبحجم 512 بكسل على الأقل في الجانب الطويل، وبحد أقصى **1 MB**."
                  },
                  "image_rectangular_dark": {
                    "type": "string",
                    "format": "binary",
                    "description": "شعار مستطيل للوضع الداكن (نسبة العرض إلى الارتفاع 2:1)، يظهر على خلفية داكنة. بتنسيق PNG أو JPG أو WebP، وبحجم 512 بكسل على الأقل في الجانب الطويل، وبحد أقصى **1 MB**. يُعاد كـ `logo_rectangular_dark`."
                  },
                  "image_favicon": {
                    "type": "string",
                    "format": "binary",
                    "description": "صورة الأيقونة المفضلة (Favicon). الحد الأقصى **500 KB**."
                  }
                }
              },
              "example": {
                "image_rectangular": "(binary PNG logo, 2:1)",
                "image_rectangular_dark": "(binary PNG logo for dark mode, 2:1)",
                "image_favicon": "(binary favicon)"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/customization/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"color_primary\": \"#123456\", \"font_family\": \"AR One Sans\"}'"
          },
          {
            "lang": "curl",
            "label": "curl (logo upload)",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/customization/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'image_rectangular=@logo.png' \\\n  -F 'image_rectangular_dark=@logo-dark.png' \\\n  -F 'image_favicon=@favicon.ico'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.customization.update(\n    image_rectangular=open(\"image_rectangular.jpg\", \"rb\"),\n    image_rectangular_dark=open(\"image_rectangular_dark.jpg\", \"rb\"),\n    image_favicon=open(\"image_favicon.jpg\", \"rb\"),\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.customization.update({\n  image_rectangular: await fileFromPath(\"image_rectangular.jpg\"),\n  image_rectangular_dark: await fileFromPath(\"image_rectangular_dark.jpg\"),\n  image_favicon: await fileFromPath(\"image_favicon.jpg\"),\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Customization.Update(ctx, didit.CustomizationUpdateParams{\n\tImageRectangular:     didit.Some(didit.FileFromPath(\"image_rectangular.jpg\")),\n\tImageRectangularDark: didit.Some(didit.FileFromPath(\"image_rectangular_dark.jpg\")),\n\tImageFavicon:         didit.Some(didit.FileFromPath(\"image_favicon.jpg\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.CustomizationUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.customization().update(CustomizationUpdateParams.builder()\n        .imageRectangular(Path.of(\"image_rectangular.jpg\"))\n        .imageRectangularDark(Path.of(\"image_rectangular_dark.jpg\"))\n        .imageFavicon(Path.of(\"image_favicon.jpg\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->customization->update([\n    'image_rectangular' => File::fromPath('image_rectangular.jpg'),\n    'image_rectangular_dark' => File::fromPath('image_rectangular_dark.jpg'),\n    'image_favicon' => File::fromPath('image_favicon.jpg'),\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.customization.update(\n  image_rectangular: Pathname(\"image_rectangular.jpg\"),\n  image_rectangular_dark: Pathname(\"image_rectangular_dark.jpg\"),\n  image_favicon: Pathname(\"image_favicon.jpg\")\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Customization.UpdateAsync(new CustomizationUpdateParams\n{\n    ImageRectangular = FileUpload.FromPath(\"image_rectangular.jpg\"),\n    ImageRectangularDark = FileUpload.FromPath(\"image_rectangular_dark.jpg\"),\n    ImageFavicon = FileUpload.FromPath(\"image_favicon.jpg\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تحديث الهوية البصرية. يتم إرجاع كائن الهوية البصرية كاملاً (جميع الحقول، وليس فقط الحقول التي قمت بتغييرها).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandingCustomization"
                },
                "examples": {
                  "Updated": {
                    "value": {
                      "color_primary": "#123456",
                      "color_secondary": "#9DA1A1",
                      "color_background": "#FFFFFF",
                      "color_panel": "#2567FF",
                      "color_panel_10": "#1A1A1A",
                      "color_on_panel_1": "#9DA1A1",
                      "color_on_panel_2": "#F4F4F6",
                      "color_on_background": "#000000",
                      "color_button_1": "#2567FF",
                      "color_button_2": "#F8F8F8",
                      "color_button_text_1": "#FFFFFF",
                      "color_button_text_2": "#000000",
                      "color_pill_text": "#111827",
                      "border_radius_panel": 10,
                      "border_radius_buttons": 16,
                      "font_family": "AR One Sans",
                      "font_weight": "400",
                      "font_url": "https://fonts.googleapis.com/css2?family=AR+One+Sans",
                      "logo_square": null,
                      "logo_rectangular": "https://cdn.didit.me/white_label/logo_rectangular/...",
                      "logo_rectangular_dark": null,
                      "favicon": null,
                      "app_public_name": "Acme Verify",
                      "privacy_policy_url": "https://acme.com/privacy",
                      "skip_welcome_screen": true,
                      "disable_login_with_didit": false,
                      "hide_progress_bar": false,
                      "callback_seconds": 3
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح. على سبيل المثال: لون سداسي عشري بتنسيق غير صحيح، أو عائلة خط أو وزن خط غير معروفين، أو حقل خاص بـ Business Console فقط (`domain` و `from_email` و `verify_domain` و `force_remove_domain` و `verify_email_domain` و `force_remove_email_domain` ونظائرها للقراءة فقط)، أو تحميل شعار ليس بصيغة PNG أو JPG أو WebP، أو يقل طول جانبه الأطول عن 512 بكسل، أو يتجاوز 1 ميجابايت، أو ذو نسبة عرض إلى ارتفاع غير صحيحة. يُرجع أيضاً عند تعيين `disable_login_with_didit` إلى `false` مع وجود نطاق مخصص مُهيأ.",
            "content": {
              "application/json": {
                "examples": {
                  "Bad color": {
                    "value": {
                      "color_primary": [
                        "Invalid color format. Use '#RRGGBB' or '#RRGGBBAA' format."
                      ]
                    }
                  },
                  "Bad logo": {
                    "value": {
                      "image_rectangular": [
                        "Image aspect ratio must be 2:1. Got 1024x1024 image dimensions"
                      ]
                    }
                  },
                  "Unsupported logo format": {
                    "summary": "ليست صورة بتنسيق PNG أو JPG أو WebP (مثل SVG)",
                    "value": {
                      "image_rectangular_dark": [
                        "Upload a PNG, JPG or WebP image."
                      ]
                    }
                  },
                  "Logo too small": {
                    "summary": "أقل من 512 px على الجانب الطويل",
                    "value": {
                      "image_rectangular": [
                        "Image must be at least 512 px on its long side. Got 400x200 image dimensions"
                      ]
                    }
                  },
                  "Logo too large": {
                    "summary": "أكثر من 1 MB",
                    "value": {
                      "image_square": [
                        "File size should not exceed 1 MB"
                      ]
                    }
                  },
                  "Console-only field": {
                    "value": {
                      "domain": [
                        "Manage this field in the Business Console."
                      ]
                    }
                  },
                  "Bad font weight": {
                    "value": {
                      "font_weight": [
                        "Font weight 950 is not available for Inter. Available weights are: 100, 200, 300, 400, 500, 600, 700, 800, 900"
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف. يُرجع المفتاح المفقود رمز الحالة `403`؛ بينما يُرجع المفتاح الخاطئ أو الملغى أو منتهي الصلاحية رمز الحالة `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid token": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/businesses/{vendor_data}/": {
      "get": {
        "summary": "الحصول على الشركة",
        "description": "جلب [شركة](/entities/businesses) واحدة عبر `vendor_data` (تطابق تام). يضيف `metadata` و`updated_at` إلى عرض القائمة. الشركات المحذوفة تُرجع 404.",
        "operationId": "get_business",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "vendor_data",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "معرّفك الفريد للشركة — سلسلة نصية حرة (وليس UUID)، وتتم مطابقته تماماً كما أُرسل.",
            "example": "company-123"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/businesses/company-123/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.retrieve(\n    \"company-123\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.retrieve(\"company-123\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.Retrieve(ctx, \"company-123\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().retrieve(\"company-123\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->businesses->retrieve('company-123');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.retrieve(\"company-123\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.RetrieveAsync(\"company-123\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل الشركة الكاملة بما في ذلك البيانات الوصفية وبيانات الجلسة المجمعة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessDetailItem"
                },
                "examples": {
                  "Active business": {
                    "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": "ACTIVE",
                      "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"
                    }
                  }
                }
              }
            }
          },
          "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": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث الشركة",
        "description": "تحديث جزئي لشركة: `display_name`، `legal_name`، `registration_number`، `country_code`، `status`، `metadata`. يتم استبدال `metadata` بالكامل. يؤدي ضبط `status` على `BLOCKED` إلى إضافة `vendor_data` إلى قائمة الحظر الخاصة بالنظام؛ وتؤدي إزالته من حالة `BLOCKED` إلى إزالة ذلك الإدخال. يتم تسجيل كل تعديل في سجل نشاط الشركة: تغيير الحالة مع `reason` الاختياري، وتغيير `display_name` أو `legal_name` أو `registration_number` أو `country_code` أو `metadata` كتحديث للملف التعريفي.",
        "operationId": "update_business",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "vendor_data",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "معرّفك الفريد للشركة (سلسلة نصية حرة، وليس UUID).",
            "example": "company-123"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "نص التحديث الجزئي. قدّم فقط الحقول التي تريد تغييرها.",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "nullable": true,
                    "description": "اسم العرض المألوف الظاهر في لوحة التحكم (له الأولوية على `legal_name` للعرض في واجهة المستخدم)."
                  },
                  "legal_name": {
                    "type": "string",
                    "nullable": true,
                    "description": "الاسم القانوني الرسمي من السجل أو الإدخال اليدوي."
                  },
                  "registration_number": {
                    "type": "string",
                    "nullable": true,
                    "description": "رقم تسجيل أو تأسيس الشركة."
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "description": "دولة التأسيس (ISO 3166-1 alpha-2، مثل `GB` أو `US`)."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "FLAGGED",
                      "BLOCKED"
                    ],
                    "description": "حالة دورة حياة الشركة. يؤدي التعيين إلى `BLOCKED` تلقائياً إلى إضافة `vendor_data` إلى قائمة الحظر الخاصة بالنظام؛ بينما يؤدي التغيير من `BLOCKED` إلى إزالة هذا الإدخال من قائمة الحظر."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON عشوائي ترفقه بالشركة. **يستبدل بالكامل** البيانات الوصفية الحالية عند التحديث — قم بالدمج من جانب العميل إذا كنت تريد إضافة مفاتيح فقط."
                  },
                  "reason": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000,
                    "description": "سبب تغيير الحالة. يُسجّل في قيد تغيير الحالة ضمن **Activity** الخاصة بالشركة في Business Console، فقط عندما تتغير الحالة فعلياً. لا تتضمنه أحداث webhook."
                  }
                }
              },
              "examples": {
                "Update name": {
                  "summary": "تحديث الاسم المعروض",
                  "value": {
                    "display_name": "Acme Corp"
                  }
                },
                "Flag for review": {
                  "summary": "تبديل الحالة",
                  "value": {
                    "status": "FLAGGED"
                  }
                },
                "Add metadata": {
                  "summary": "استبدال كائن JSON للبيانات الوصفية",
                  "value": {
                    "metadata": {
                      "industry": "fintech",
                      "risk_level": "low"
                    }
                  }
                },
                "Fix registry data": {
                  "summary": "الحقول المستخرجة الصحيحة",
                  "value": {
                    "legal_name": "Acme Trading International Ltd",
                    "registration_number": "12345678",
                    "country_code": "GB"
                  }
                },
                "Flag with reason": {
                  "summary": "وضع علامة على الشركة وتسجيل السبب",
                  "value": {
                    "status": "FLAGGED",
                    "reason": "Ownership structure under review"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/businesses/company-123/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"display_name\": \"Acme Corp\", \"status\": \"FLAGGED\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.update(\n    \"company-123\",\n    display_name=\"Acme Corp\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.update(\"company-123\", {\n  display_name: \"Acme Corp\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.Update(ctx, \"company-123\", didit.BusinessesUpdateParams{\n\tDisplayName: didit.String(\"Acme Corp\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.BusinessesUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().update(\"company-123\", BusinessesUpdateParams.builder()\n        .displayName(\"Acme Corp\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->businesses->update('company-123', [\n    'display_name' => 'Acme Corp',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.update(\n  \"company-123\",\n  display_name: \"Acme Corp\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.UpdateAsync(\"company-123\", new BusinessesUpdateParams\n{\n    DisplayName = \"Acme Corp\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تحديث الشركة. يتم إرجاع سجل الشركة المحدث بالكامل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessDetailItem"
                },
                "examples": {
                  "Updated": {
                    "value": {
                      "didit_internal_id": "a1b2c3d4-e5f6-4890-abcd-ef1234567890",
                      "vendor_data": "company-123",
                      "display_name": "Acme Corp",
                      "legal_name": "Acme Trading Ltd",
                      "registration_number": "12345678",
                      "country_code": "GB",
                      "effective_name": "Acme Corp",
                      "status": "FLAGGED",
                      "session_count": 2,
                      "approved_count": 1,
                      "declined_count": 0,
                      "in_review_count": 1,
                      "features": {
                        "KYB": "Approved"
                      },
                      "features_list": [
                        {
                          "feature": "KYB",
                          "status": "Approved"
                        }
                      ],
                      "last_session_at": "2026-03-15T10:30:00Z",
                      "last_activity_at": "2026-03-15T10:30:00Z",
                      "first_session_at": "2026-01-10T08:00:00Z",
                      "tags": [
                        {
                          "uuid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                          "name": "VIP",
                          "color": "#2567FF"
                        }
                      ],
                      "created_at": "2026-01-10T08:00:00Z",
                      "metadata": {
                        "industry": "fintech",
                        "risk_level": "low"
                      },
                      "updated_at": "2026-03-15T10:30:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح: عادةً ما يكون `status` غير معروفة، أو `metadata` بتنسيق غير صحيح، أو `reason` يتجاوز 1000 حرف.",
            "content": {
              "application/json": {
                "examples": {
                  "Bad status": {
                    "value": {
                      "status": [
                        "Invalid status. Valid options are: ACTIVE, FLAGGED, BLOCKED"
                      ]
                    }
                  },
                  "Bad metadata": {
                    "value": {
                      "metadata": [
                        "Metadata must be a JSON object."
                      ]
                    }
                  },
                  "Reason too long": {
                    "value": {
                      "reason": [
                        "Ensure this field has no more than 1000 characters."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح تحديث الشركات لهذا التطبيق. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد شركة (غير محذوفة) ببيانات `vendor_data` المقدمة لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/businesses/{vendor_data}/update-status/": {
      "patch": {
        "summary": "تحديث حالة الشركة",
        "description": "تبديل `status` دورة الحياة فقط للشركة: `ACTIVE` أو `FLAGGED` أو `BLOCKED` (وليس حالات الجلسة). يضيف `BLOCKED` قيمة `vendor_data` إلى قائمة الحظر في النظام؛ ويؤدي التغيير من `BLOCKED` إلى إزالة هذا الإدخال. يتم تسجيل كل تغيير في نشاط الشركة، مع `reason` الاختياري. لا يؤدي إرسال الحالة الحالية إلى تغيير أي شيء ولا يسجل أي `reason`. لا يحمل webhook الخاص بـ `business.status.updated` الحقل `reason`.",
        "operationId": "update_business_status",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "update_status",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Businesses"
        ],
        "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": "سبب تغيير الحالة. يُسجّل في قيد تغيير الحالة ضمن **Activity** الخاصة بالشركة في Business Console، فقط عندما تتغير الحالة فعلياً. لا تتضمنه أحداث 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"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/businesses/company-123/update-status/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\": \"BLOCKED\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.update_status(\n    \"company-123\",\n    status=\"FLAGGED\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.updateStatus(\"company-123\", {\n  status: \"FLAGGED\",\n});\nconsole.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;\nimport me.didit.types.BusinessesUpdateStatusParams;\nimport me.didit.types.EntityStatusUpdateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().updateStatus(\"company-123\", BusinessesUpdateStatusParams.builder()\n        .status(EntityStatusUpdateRequest.Status.of(\"FLAGGED\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->businesses->updateStatus('company-123', [\n    'status' => 'FLAGGED',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.update_status(\n  \"company-123\",\n  status: \"FLAGGED\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.UpdateStatusAsync(\"company-123\", new BusinessesUpdateStatusParams\n{\n    Status = \"FLAGGED\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "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": []
          }
        ]
      }
    },
    "/v3/businesses/delete/": {
      "post": {
        "summary": "حذف الشركات دفعة واحدة",
        "description": "**حذف الشركات نهائياً** — لا يمكن التراجع عن هذا الإجراء. للحظر، يُفضّل استخدام [تحديث حالة الشركة](#patch-/v3/businesses/-vendor_data-/update-status/) مع `BLOCKED`.\n\n**التقارير التنظيمية المُقدَّمة:** إذا كانت البيانات المحددة واردة في تقرير تنظيمي نهائي، فسيتم رفض الطلب بأكمله مع رمز الحالة `409` ولن يُحذف أي شيء. يستخدم نص الاستجابة `code: in_filed_report` ويحدد كل تقرير باستخدام `uuid` و`report_number` و`report_type` و`case_uuid`. احذف التقارير، ثم أعد إرسال الطلب.",
        "operationId": "batch_delete_businesses",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "batch_delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Businesses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "قدّم `vendor_data_list`، أو `didit_internal_id_list`، أو `delete_all: true`. الأسبقية عند إرسال عدة عناصر: `delete_all` > `vendor_data_list` > `didit_internal_id_list` (يُستخدم المحدد ذو الأسبقية الأعلى فقط).",
                "properties": {
                  "vendor_data_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "المعرّفات الخاصة بك المراد حذفها، وتتم مطابقتها تماماً كما أُرسلت."
                  },
                  "didit_internal_id_list": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "معرّفات UUID الداخلية لـ Didit (`didit_internal_id`) المطلوب حذفها."
                  },
                  "delete_all": {
                    "type": "boolean",
                    "default": false,
                    "description": "إذا كانت القيمة `true`، فسيتم حذف كل شركة في التطبيق. لا يمكن دمجها مع محددات القائمة."
                  }
                }
              },
              "examples": {
                "Specific businesses": {
                  "summary": "الحذف بواسطة vendor_data",
                  "value": {
                    "vendor_data_list": [
                      "company-123",
                      "company-456"
                    ]
                  }
                },
                "Specific internal IDs": {
                  "summary": "الحذف بواسطة didit_internal_id",
                  "value": {
                    "didit_internal_id_list": [
                      "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "b2c3d4e5-f6a7-8901-bcde-f12345678901"
                    ]
                  }
                },
                "All businesses": {
                  "summary": "مسح كل الشركات في هذا التطبيق",
                  "value": {
                    "delete_all": true
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/businesses/delete/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendor_data_list\": [\"company-123\", \"company-456\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.batch_delete(\n    vendor_data_list=[\"company-123\", \"company-456\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.batchDelete({\n  vendor_data_list: [\"company-123\", \"company-456\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.BatchDelete(ctx, didit.BusinessesBatchDeleteParams{\n\tVendorDataList: didit.Some([]string{\"company-123\", \"company-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.BusinessesBatchDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().batchDelete(BusinessesBatchDeleteParams.builder()\n        .vendorDataList(List.of(\"company-123\", \"company-456\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->businesses->batchDelete([\n    'vendor_data_list' => ['company-123', 'company-456'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.batch_delete(vendor_data_list: [\"company-123\", \"company-456\"])\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.BatchDeleteAsync(new BusinessesBatchDeleteParams\n{\n    VendorDataList = new string[] { \"company-123\", \"company-456\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم حذف الشركات. يعيد عدد الصفوف التي تمت إزالتها فعلياً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "integer",
                      "description": "عدد الشركات المحذوفة (يستثني قيم vendor_data التي لم تطابق أي شيء)."
                    }
                  }
                },
                "examples": {
                  "Deleted some": {
                    "value": {
                      "deleted": 2
                    }
                  },
                  "Nothing matched": {
                    "value": {
                      "deleted": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "لم يتم تقديم أي محدد (جميع الحقول `vendor_data_list` و`didit_internal_id_list` و`delete_all` مفقودة أو فارغة). نص الخطأ عبارة عن مصفوفة JSON.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing selector": {
                    "value": [
                      "Provide vendor_data_list, didit_internal_id_list, or set delete_all=true."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح حذف الشركات لهذا التطبيق. يعيد المفتاح المفقود `403`؛ بينما يعيد المفتاح الخاطئ أو الملغى أو منتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "لم يتم حذف أي شيء. يوضح `code` السبب: `in_filed_report` عندما يتضمن التحديد شركة في تقرير تنظيمي نهائي، و`subject_deletion_in_progress` عندما يكون هناك طلب آخر لا يزال يحذف إحدى الشركات المحددة. أعد المحاولة بعد انتهاء عملية الحذف تلك.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InFiledReportError"
                    },
                    {
                      "$ref": "#/components/schemas/SubjectDeletionInProgressError"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/users/aml-monitoring/": {
      "post": {
        "summary": "تمكين مراقبة AML المستمرة أو تعطيلها للمستخدمين",
        "description": "تقوم بتشغيل مراقبة AML المستمرة أو إيقافها للمستخدمين المحددين، بالدلالات نفسها المتبعة في Business Console. يتم الاحتفاظ بفحص AML مراقب واحد بالضبط لكل مستخدم، وبالتالي فإن الملف التعريفي الذي تم التحقق منه عدة مرات تجري مراقبته وتتم فوترته مرة واحدة فقط؛ يؤدي التعطيل إلى إيقاف المراقبة عبر جميع فحوصات الملف التعريفي. أما المستخدمون الذين ليس لديهم أي فحص AML فيتم فحصهم أولاً (وتتم الفوترة كفحص AML عادي) متى توفر لديهم الاسم الكامل وتاريخ الميلاد والدولة المطلوبة؛ وإلا فسيتم الإبلاغ عنهم على أنهم `skipped_no_identity_data`.\n\nاضبط `estimate_only: true` لمعاينة الأعداد والتكاليف دون كتابة أي شيء. تكتمل عمليات التحديد لـ 20 ملفاً تعريفياً أو أقل مباشرة وتعيد الرمز `200` مع المهمة المكتملة؛ بينما تعيد التحديدات الأكبر الرمز `202` وتعمل في الخلفية - استعلم دورياً عبر [Get AML monitoring job](#get-/v3/aml-monitoring/jobs/-job_id-/) باستخدام `job_id` المُعاد. يُرفض التفعيل بالرمز `403` عندما لا يغطي رصيد المؤسسة التكلفة التقديرية. تُدرج المعرّفات التي لا تطابق أي شيء في `unmatched` ولا تتسبب أبداً في فشل الطلب: يكتمل التحديد الذي لا يطابق أي شيء كمهمة فارغة (`total` 0)، وهي نفس القاعدة المعمول بها في endpoints الخاصة بالحذف الجماعي.",
        "operationId": "toggle_users_aml_monitoring",
        "x-didit-sdk": {
          "resource": "users",
          "method": "set_aml_monitoring",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "AML Ongoing Monitoring"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "is_enabled"
                ],
                "description": "حدد المستخدمين باستخدام `vendor_data_list` أو `didit_internal_id_list` أو كليهما (يتم الجمع بين القائمتين باستخدام المعامل OR). بحد أقصى 1000 معرّف لكل طلب عبر كلتا القائمتين.",
                "properties": {
                  "is_enabled": {
                    "type": "boolean",
                    "description": "true لتفعيل المراقبة، وfalse لتعطيلها."
                  },
                  "estimate_only": {
                    "type": "boolean",
                    "default": false,
                    "description": "عند التعيين على true، يُرجع تقدير التكلفة ولا ينفذ أي عمليات كتابة - لا فحص، ولا فوترة، ولا مهمة."
                  },
                  "vendor_data_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "المعرّفات الخاصة بك للمستخدمين المراد تبديل حالتهم، وتتم مطابقتها تماماً كما أُرسلت."
                  },
                  "didit_internal_id_list": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "المعرّفات الداخلية لـ Didit للمستخدمين المراد تبديل حالتهم - أي `didit_internal_id` الذي تُرجعه endpoints الخاصة بالإنشاء والجلب والإدراج."
                  }
                }
              },
              "examples": {
                "Estimate first": {
                  "summary": "معاينة التكلفة دون إجراء عمليات كتابة",
                  "value": {
                    "is_enabled": true,
                    "estimate_only": true,
                    "vendor_data_list": [
                      "user-123",
                      "user-456"
                    ]
                  }
                },
                "Enable": {
                  "summary": "تمكين المراقبة لمستخدمين اثنين",
                  "value": {
                    "is_enabled": true,
                    "vendor_data_list": [
                      "user-123",
                      "user-456"
                    ]
                  }
                },
                "Disable": {
                  "summary": "تعطيل المراقبة باستخدام معرّف Didit الداخلي",
                  "value": {
                    "is_enabled": false,
                    "didit_internal_id_list": [
                      "3f1c0d3e-8f0a-4c2e-9a3d-9b1f5f4a2c11"
                    ]
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/users/aml-monitoring/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"is_enabled\": true, \"vendor_data_list\": [\"user-123\", \"user-456\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.set_aml_monitoring(\n    is_enabled=True,\n    estimate_only=True,\n    vendor_data_list=[\"user-123\", \"user-456\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.setAmlMonitoring({\n  is_enabled: true,\n  estimate_only: true,\n  vendor_data_list: [\"user-123\", \"user-456\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.SetAMLMonitoring(ctx, didit.UsersSetAMLMonitoringParams{\n\tIsEnabled:      true,\n\tEstimateOnly:   didit.Bool(true),\n\tVendorDataList: didit.Some([]string{\"user-123\", \"user-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.UsersSetAmlMonitoringParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().setAmlMonitoring(UsersSetAmlMonitoringParams.builder()\n        .isEnabled(true)\n        .estimateOnly(true)\n        .vendorDataList(List.of(\"user-123\", \"user-456\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->users->setAmlMonitoring([\n    'is_enabled' => true,\n    'estimate_only' => true,\n    'vendor_data_list' => ['user-123', 'user-456'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.set_aml_monitoring(\n  is_enabled: true,\n  estimate_only: true,\n  vendor_data_list: [\"user-123\", \"user-456\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.SetAmlMonitoringAsync(new UsersSetAmlMonitoringParams\n{\n    IsEnabled = true,\n    EstimateOnly = true,\n    VendorDataList = new string[] { \"user-123\", \"user-456\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التقدير (عندما يكون `estimate_only` صحيحاً) أو المهمة المكتملة لاختيار تمت معالجته بشكل مضمّن.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AMLMonitoringToggleResult"
                }
              }
            }
          },
          "202": {
            "description": "يتم تشغيل التحديدات الأكبر في الخلفية. استعلم دورياً من endpoint الخاصة بالمهمة باستخدام `job_id`؛ يتم ملء `results` مع معالجة الملفات التعريفية.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AMLMonitoringJob"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق: `is_enabled` مفقود، أو لا يوجد محدد، أو يوجد أكثر من 1000 معرّف عبر كلتا القائمتين."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "الرصيد غير كافٍ لتمكين المراقبة لهذا التحديد. تتضمن الاستجابة `estimate` حتى تتمكن من شحن الرصيد بالمبلغ المناسب.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "estimate": {
                      "type": "object",
                      "description": "معاينة التكلفة. يتم إرجاعها مباشرة عندما يكون estimate_only صحيحاً (لا يتم كتابة أي شيء).",
                      "properties": {
                        "users_total": {
                          "type": "integer",
                          "description": "الملفات الشخصية المطابقة للتحديد."
                        },
                        "already_enabled": {
                          "type": "integer",
                          "description": "الملفات الشخصية الخاضعة للمراقبة بالفعل (لا يلزم اتخاذ أي إجراء عند التفعيل؛ هذه هي الملفات التي يتم إيقافها عند التعطيل)."
                        },
                        "with_existing_aml": {
                          "type": "integer",
                          "description": "الملفات الشخصية التي سيتم تحويل فحص AML الحالي الخاص بها إلى قيد المراقبة (دون إجراء فحص جديد)."
                        },
                        "needing_screening": {
                          "type": "integer",
                          "description": "الملفات الشخصية التي لا تخضع لأي فحص AML وسيُجرى فحصها أولاً (تتم فوترتها كفحص AML عادي)."
                        },
                        "skipped_no_identity_data": {
                          "type": "integer",
                          "description": "الملفات الشخصية التي لا يمكن فحصها بسبب نقص بيانات الهوية."
                        },
                        "skipped_blocked": {
                          "type": "integer",
                          "description": "المستخدمون المحظورون الذين سيتم تخطيهم (تكون دائماً 0 للشركات)."
                        },
                        "estimated_screening_cost_usd": {
                          "type": "number",
                          "example": 0.2,
                          "description": "التكلفة لمرة واحدة لعمليات الفحص الجديدة."
                        },
                        "estimated_annual_monitoring_cost_usd": {
                          "type": "number",
                          "example": 0.07,
                          "description": "تكلفة المراقبة السنوية للملفات الشخصية التي ستصبح خاضعة للمراقبة."
                        },
                        "balance_sufficient": {
                          "type": "boolean",
                          "description": "ما إذا كان رصيد المؤسسة يغطي الفحص بالإضافة إلى السنة الأولى من المراقبة."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/businesses/aml-monitoring/": {
      "post": {
        "summary": "تمكين مراقبة AML المستمرة أو تعطيلها للشركات",
        "description": "تقوم بتشغيل مراقبة AML المستمرة أو إيقافها للشركات المحددة، بالدلالات نفسها المتبعة في Business Console. يتم الاحتفاظ بفحص AML مراقب واحد بالضبط لكل شركة، وبالتالي فإن الملف التعريفي الذي تم التحقق منه عدة مرات تجري مراقبته وتتم فوترته مرة واحدة فقط؛ يؤدي التعطيل إلى إيقاف المراقبة عبر جميع فحوصات الملف التعريفي. أما الشركات التي ليس لديها أي فحص AML فيتم فحصها أولاً (وتتم الفوترة كفحص AML عادي) متى توفر لديها الاسم القانوني أو الاسم المعروض المطلوب؛ وإلا فسيتم الإبلاغ عنها على أنها `skipped_no_identity_data`.\n\nاضبط `estimate_only: true` لمعاينة الأعداد والتكاليف دون كتابة أي شيء. تكتمل عمليات التحديد لـ 20 ملفاً تعريفياً أو أقل مباشرة وتعيد الرمز `200` مع المهمة المكتملة؛ بينما تعيد التحديدات الأكبر الرمز `202` وتعمل في الخلفية - استعلم دورياً عبر [Get AML monitoring job](#get-/v3/aml-monitoring/jobs/-job_id-/) باستخدام `job_id` المُعاد. يُرفض التفعيل بالرمز `403` عندما لا يغطي رصيد المؤسسة التكلفة التقديرية. تُدرج المعرّفات التي لا تطابق أي شيء في `unmatched` ولا تتسبب أبداً في فشل الطلب: يكتمل التحديد الذي لا يطابق أي شيء كمهمة فارغة (`total` بقيمة 0)، وهي نفس القاعدة المعمول بها في endpoints الخاصة بالحذف الجماعي.",
        "operationId": "toggle_businesses_aml_monitoring",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "set_aml_monitoring",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "AML Ongoing Monitoring"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "is_enabled"
                ],
                "description": "حدد الشركات باستخدام `vendor_data_list` أو `didit_internal_id_list` أو كليهما (يتم الجمع بين القائمتين باستخدام المعامل OR). بحد أقصى 1000 معرّف لكل طلب عبر كلتا القائمتين.",
                "properties": {
                  "is_enabled": {
                    "type": "boolean",
                    "description": "true لتفعيل المراقبة، وfalse لتعطيلها."
                  },
                  "estimate_only": {
                    "type": "boolean",
                    "default": false,
                    "description": "عند التعيين على true، يُرجع تقدير التكلفة ولا ينفذ أي عمليات كتابة - لا فحص، ولا فوترة، ولا مهمة."
                  },
                  "vendor_data_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "المعرّفات الخاصة بك للشركات المراد تبديل حالتها، وتتم مطابقتها تماماً كما أُرسلت."
                  },
                  "didit_internal_id_list": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "المعرّفات الداخلية لـ Didit للشركات المراد تبديل حالتها - وهي معرّفات `didit_internal_id` التي تُرجعها endpoints الخاصة بالإنشاء والجلب والقائمة."
                  }
                }
              },
              "examples": {
                "Estimate first": {
                  "summary": "معاينة التكلفة دون إجراء عمليات كتابة",
                  "value": {
                    "is_enabled": true,
                    "estimate_only": true,
                    "vendor_data_list": [
                      "company-123",
                      "company-456"
                    ]
                  }
                },
                "Enable": {
                  "summary": "تمكين المراقبة لشركتين",
                  "value": {
                    "is_enabled": true,
                    "vendor_data_list": [
                      "company-123",
                      "company-456"
                    ]
                  }
                },
                "Disable": {
                  "summary": "تعطيل المراقبة باستخدام معرّف Didit الداخلي",
                  "value": {
                    "is_enabled": false,
                    "didit_internal_id_list": [
                      "3f1c0d3e-8f0a-4c2e-9a3d-9b1f5f4a2c11"
                    ]
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/businesses/aml-monitoring/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"is_enabled\": true, \"vendor_data_list\": [\"company-123\", \"company-456\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.set_aml_monitoring(\n    is_enabled=True,\n    estimate_only=True,\n    vendor_data_list=[\"company-123\", \"company-456\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.setAmlMonitoring({\n  is_enabled: true,\n  estimate_only: true,\n  vendor_data_list: [\"company-123\", \"company-456\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.SetAMLMonitoring(ctx, didit.BusinessesSetAMLMonitoringParams{\n\tIsEnabled:      true,\n\tEstimateOnly:   didit.Bool(true),\n\tVendorDataList: didit.Some([]string{\"company-123\", \"company-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.BusinessesSetAmlMonitoringParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().setAmlMonitoring(BusinessesSetAmlMonitoringParams.builder()\n        .isEnabled(true)\n        .estimateOnly(true)\n        .vendorDataList(List.of(\"company-123\", \"company-456\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->businesses->setAmlMonitoring([\n    'is_enabled' => true,\n    'estimate_only' => true,\n    'vendor_data_list' => ['company-123', 'company-456'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.set_aml_monitoring(\n  is_enabled: true,\n  estimate_only: true,\n  vendor_data_list: [\"company-123\", \"company-456\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.SetAmlMonitoringAsync(new BusinessesSetAmlMonitoringParams\n{\n    IsEnabled = true,\n    EstimateOnly = true,\n    VendorDataList = new string[] { \"company-123\", \"company-456\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التقدير (عندما يكون `estimate_only` صحيحاً) أو المهمة المكتملة لاختيار تمت معالجته بشكل مضمّن.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AMLMonitoringToggleResult"
                }
              }
            }
          },
          "202": {
            "description": "يتم تشغيل التحديدات الأكبر في الخلفية. استعلم دورياً من endpoint الخاصة بالمهمة باستخدام `job_id`؛ يتم ملء `results` مع معالجة الملفات التعريفية.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AMLMonitoringJob"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق: `is_enabled` مفقود، أو لا يوجد محدد، أو يوجد أكثر من 1000 معرّف عبر كلتا القائمتين."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "الرصيد غير كافٍ لتمكين المراقبة لهذا التحديد. تتضمن الاستجابة `estimate` حتى تتمكن من شحن الرصيد بالمبلغ المناسب.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "estimate": {
                      "type": "object",
                      "description": "معاينة التكلفة. يتم إرجاعها مباشرة عندما يكون estimate_only صحيحاً (لا يتم كتابة أي شيء).",
                      "properties": {
                        "users_total": {
                          "type": "integer",
                          "description": "الملفات الشخصية المطابقة للتحديد."
                        },
                        "already_enabled": {
                          "type": "integer",
                          "description": "الملفات الشخصية الخاضعة للمراقبة بالفعل (لا يلزم اتخاذ أي إجراء عند التفعيل؛ هذه هي الملفات التي يتم إيقافها عند التعطيل)."
                        },
                        "with_existing_aml": {
                          "type": "integer",
                          "description": "الملفات الشخصية التي سيتم تحويل فحص AML الحالي الخاص بها إلى قيد المراقبة (دون إجراء فحص جديد)."
                        },
                        "needing_screening": {
                          "type": "integer",
                          "description": "الملفات الشخصية التي لا تخضع لأي فحص AML وسيُجرى فحصها أولاً (تتم فوترتها كفحص AML عادي)."
                        },
                        "skipped_no_identity_data": {
                          "type": "integer",
                          "description": "الملفات الشخصية التي لا يمكن فحصها بسبب نقص بيانات الهوية."
                        },
                        "skipped_blocked": {
                          "type": "integer",
                          "description": "المستخدمون المحظورون الذين سيتم تخطيهم (تكون دائماً 0 للشركات)."
                        },
                        "estimated_screening_cost_usd": {
                          "type": "number",
                          "example": 0.2,
                          "description": "التكلفة لمرة واحدة لعمليات الفحص الجديدة."
                        },
                        "estimated_annual_monitoring_cost_usd": {
                          "type": "number",
                          "example": 0.07,
                          "description": "تكلفة المراقبة السنوية للملفات الشخصية التي ستصبح خاضعة للمراقبة."
                        },
                        "balance_sufficient": {
                          "type": "boolean",
                          "description": "ما إذا كان رصيد المؤسسة يغطي الفحص بالإضافة إلى السنة الأولى من المراقبة."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/aml-monitoring/jobs/{job_id}/": {
      "get": {
        "summary": "الحصول على مهمة مراقبة AML المستمرة",
        "description": "الحالة وعدادات النتائج والنتائج لكل سجل لمهمة تبديل المراقبة التي بدأت من `POST /v3/users/aml-monitoring/` أو `POST /v3/businesses/aml-monitoring/`. قم بالاستعلام الدوري كل ثانيتين أثناء كون `status` هي `PENDING` أو `PROCESSING`؛ وتكتمل `results` بمجرد أن تصبح `COMPLETED`.",
        "operationId": "get_aml_monitoring_job",
        "x-didit-sdk": {
          "resource": "aml_monitoring",
          "method": "retrieve_job",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "AML Ongoing Monitoring"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف `job_id` الذي يرجعه endpoint التبديل."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl 'https://verification.didit.me/v3/aml-monitoring/jobs/JOB_ID/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.aml_monitoring.retrieve_job(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.amlMonitoring.retrieveJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AMLMonitoring.RetrieveJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.amlMonitoring().retrieveJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->amlMonitoring->retrieveJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.aml_monitoring.retrieve_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.AmlMonitoring.RetrieveJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "المهمة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "PENDING",
                        "PROCESSING",
                        "COMPLETED",
                        "FAILED"
                      ]
                    },
                    "is_enabled": {
                      "type": "boolean",
                      "description": "true عندما تفعّل المهمة المراقبة، وfalse عندما تعطلها."
                    },
                    "target_type": {
                      "type": "string",
                      "enum": [
                        "user",
                        "business"
                      ],
                      "description": "أي عائلة ملفات تعريف تبدّلها المهمة."
                    },
                    "total": {
                      "type": "integer",
                      "description": "الملفات الشخصية التي تعالجها المهمة."
                    },
                    "processed": {
                      "type": "integer",
                      "description": "الملفات الشخصية التي تمت معالجتها حتى الآن."
                    },
                    "outcomes": {
                      "type": "object",
                      "description": "عدادات النتائج لكل سجل. يُحل كل ملف تعريفي محدد إلى عداد واحد بالضبط؛ لا يتم تخطي أي شيء بصمت.",
                      "properties": {
                        "enabled": {
                          "type": "integer",
                          "description": "تم تمكين المراقبة على فحص AML حالي."
                        },
                        "screened_and_enabled": {
                          "type": "integer",
                          "description": "تم إنشاء فحص AML جديد (تمت فوترته) وتم تفعيل المراقبة عليه."
                        },
                        "already_enabled": {
                          "type": "integer",
                          "description": "كانت المراقبة نشطة بالفعل؛ لم يتغير شيء ولم تتم فوترة أي شيء."
                        },
                        "disabled": {
                          "type": "integer",
                          "description": "تم إيقاف تشغيل المراقبة في جميع فحوصات AML للملف التعريفي."
                        },
                        "skipped_no_identity_data": {
                          "type": "integer",
                          "description": "تم التخطي: يفتقر الملف التعريفي إلى الاسم الكامل وتاريخ الميلاد والدولة (للمستخدمين) أو الاسم (للشركات) المطلوبة لإجراء الفحص."
                        },
                        "skipped_blocked": {
                          "type": "integer",
                          "description": "تم التخطي: تم حظر المستخدم."
                        },
                        "skipped_sandbox": {
                          "type": "integer",
                          "description": "تم التخطي: تطبيق في البيئة التجريبية، لم يتم إنشاء أي فحص."
                        },
                        "failed_provider": {
                          "type": "integer",
                          "description": "تعذر إكمال الفحص؛ أعد المحاولة لاحقاً."
                        },
                        "failed_insufficient_balance": {
                          "type": "integer",
                          "description": "نفد الرصيد أثناء تشغيل المهمة."
                        }
                      }
                    },
                    "results": {
                      "type": "array",
                      "description": "إدخال واحد لكل ملف شخصي تمت معالجته، وفق ترتيب المعالجة. تتزايد الإدخالات أثناء تشغيل المهمة؛ وتكتمل بمجرد أن تصبح الحالة COMPLETED. يُسجَّل للمهام التي بدأت عبر API؛ أما المهمة التي تبدأ من Business Console فتبلغ عن العدادات فقط.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "didit_internal_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "المعرّف الداخلي لـ Didit للملف التعريفي."
                          },
                          "vendor_data": {
                            "type": "string",
                            "nullable": true,
                            "description": "المعرّف الخاص بك للملف الشخصي."
                          },
                          "outcome": {
                            "type": "string",
                            "enum": [
                              "enabled",
                              "screened_and_enabled",
                              "already_enabled",
                              "disabled",
                              "skipped_no_identity_data",
                              "skipped_blocked",
                              "skipped_sandbox",
                              "failed_provider",
                              "failed_insufficient_balance"
                            ]
                          }
                        }
                      }
                    },
                    "error": {
                      "type": "string",
                      "nullable": true,
                      "description": "رسالة فشل عامة عندما تكون الحالة FAILED؛ يتم الاحتفاظ بالسبب التفصيلي من جهة المنصة."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "completed_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "404": {
            "description": "لا توجد مهمة كهذه لهذا التطبيق."
          }
        }
      }
    },
    "/v3/users/{vendor_data}/update-status/": {
      "patch": {
        "summary": "تحديث حالة المستخدم",
        "description": "تبديل `status` دورة الحياة فقط للمستخدم: `ACTIVE` أو `FLAGGED` أو `BLOCKED` (وليس حالات الجلسة). يضيف `BLOCKED` قيمة `vendor_data` إلى قائمة الحظر في النظام؛ ويؤدي التغيير من `BLOCKED` إلى إزالة هذا الإدخال. يتم تسجيل كل تغيير كنشاط `STATUS_CHANGED` على المستخدم، مع `reason` الاختياري كـ `comment` له. لا يؤدي إرسال الحالة الحالية إلى تغيير أي شيء ولا يسجل أي `reason`. لا يحمل webhook الخاص بـ `user.status.updated` الحقل `reason`.",
        "operationId": "update_user_status",
        "x-didit-sdk": {
          "resource": "users",
          "method": "update_status",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "vendor_data",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "معرّفك الفريد للمستخدم."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EntityStatusUpdateRequest"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 1000,
                        "description": "سبب تغيير الحالة. يُسجّل في قيد تغيير الحالة ضمن سجل نشاط المستخدم (`comments[].comment`، و**Activity** في Business Console)، فقط عندما تتغير الحالة فعلياً. لا تتضمنه أحداث webhook."
                      }
                    }
                  }
                ]
              },
              "examples": {
                "Activate": {
                  "summary": "إعادة تفعيل المستخدم",
                  "value": {
                    "status": "ACTIVE"
                  }
                },
                "Flag": {
                  "summary": "وضع علامة على المستخدم للمراجعة",
                  "value": {
                    "status": "FLAGGED"
                  }
                },
                "Block": {
                  "summary": "حظر المستخدم (إضافته إلى قائمة الحظر الخاصة بالنظام)",
                  "value": {
                    "status": "BLOCKED"
                  }
                },
                "Block with reason": {
                  "summary": "حظر المستخدم وتسجيل السبب",
                  "value": {
                    "status": "BLOCKED",
                    "reason": "Chargeback fraud pattern confirmed"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/users/user-abc-123/update-status/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\": \"BLOCKED\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.update_status(\n    \"user-123\",\n    status=\"ACTIVE\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.updateStatus(\"user-123\", {\n  status: \"ACTIVE\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.UpdateStatus(ctx, \"user-123\", didit.UsersUpdateStatusParams{\n\tStatus: \"ACTIVE\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.EntityStatusUpdateRequest;\nimport me.didit.types.UsersUpdateStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().updateStatus(\"user-123\", UsersUpdateStatusParams.builder()\n        .status(EntityStatusUpdateRequest.Status.of(\"ACTIVE\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->users->updateStatus('user-123', [\n    'status' => 'ACTIVE',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.update_status(\n  \"user-123\",\n  status: \"ACTIVE\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.UpdateStatusAsync(\"user-123\", new UsersUpdateStatusParams\n{\n    Status = \"ACTIVE\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تحديث حالة المستخدم. تم إرجاع سجل المستخدم الكامل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDetailItem"
                },
                "examples": {
                  "Blocked": {
                    "value": {
                      "didit_internal_id": "f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418",
                      "vendor_data": "user-abc-123",
                      "display_name": null,
                      "full_name": "John Michael Doe",
                      "date_of_birth": "1990-05-15",
                      "effective_name": "John Michael Doe",
                      "status": "BLOCKED",
                      "metadata": {
                        "tier": "premium",
                        "source": "website"
                      },
                      "portrait_image_url": "https://<media-host>/...",
                      "session_count": 3,
                      "approved_count": 2,
                      "declined_count": 0,
                      "in_review_count": 1,
                      "issuing_states": [
                        "USA"
                      ],
                      "approved_emails": [
                        "john@example.com"
                      ],
                      "approved_phones": [
                        "+14155551234"
                      ],
                      "features": {
                        "ID_VERIFICATION": "Approved",
                        "LIVENESS": "Approved",
                        "FACE_MATCH": "Approved",
                        "AML": "Approved"
                      },
                      "features_list": [
                        {
                          "feature": "ID_VERIFICATION",
                          "status": "Approved"
                        },
                        {
                          "feature": "LIVENESS",
                          "status": "Approved"
                        },
                        {
                          "feature": "FACE_MATCH",
                          "status": "Approved"
                        },
                        {
                          "feature": "AML",
                          "status": "Approved"
                        }
                      ],
                      "last_session_at": "2025-06-15T10:30:00Z",
                      "last_activity_at": "2025-06-15T10:30:00Z",
                      "first_session_at": "2025-06-01T08:00:00Z",
                      "tags": [
                        {
                          "uuid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                          "tag": {
                            "uuid": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
                            "name": "VIP",
                            "color": "#2567FF",
                            "description": null,
                            "source": "custom",
                            "created_at": "2025-05-01T09:00:00Z",
                            "updated_at": "2025-05-01T09:00:00Z"
                          },
                          "added_by_email": "analyst@acme.com",
                          "added_by_name": "Jane Analyst",
                          "created_at": "2025-06-02T11:00:00Z"
                        }
                      ],
                      "comments": [
                        {
                          "uuid": "c1111111-2222-4333-8444-555555555555",
                          "comment_type": "STATUS_CHANGED",
                          "comment": "Chargeback fraud pattern confirmed",
                          "actor_email": null,
                          "actor_name": null,
                          "previous_status": "ACTIVE",
                          "new_status": "BLOCKED",
                          "previous_value": null,
                          "new_value": null,
                          "changed_fields": [],
                          "metadata": null,
                          "mentioned_emails": [],
                          "created_at": "2025-06-15T10:30:00Z"
                        }
                      ],
                      "created_at": "2025-06-01T08:00:00Z",
                      "updated_at": "2025-06-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."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "لم يتم توفير بيانات اعتماد. الطلبات المرسلة إلى مسارات `/v3/users/*` بدون رأس `x-api-key` (أو رمز `Authorization: Bearer`) يتم رفضها بواسطة برمجية المصادقة الوسيطة قبل وصولها إلى الـ API.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing credentials": {
                    "value": {
                      "detail": "You must be authenticated with a valid access token to access this endpoint."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "لا يمكن للمفتاح تحديث المستخدمين لهذا التطبيق. يؤدي غياب المفتاح إلى إرجاع `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": []
          }
        ]
      }
    },
    "/v3/businesses/create/": {
      "post": {
        "summary": "إنشاء شركة",
        "description": "إنشاء [شركة](/entities/businesses) مسبقاً *بدون* جلسة KYB. جميع الحقول اختيارية، ولكن يجب عليك دائماً إرسال `vendor_data` — بدونه لا يمكن ربط السجل بالجلسات أو المعاملات. عند تقديمه، يجب أن يكون `vendor_data` فريداً بين الشركات غير المحذوفة (تطابق تام؛ النزاعات تُرجع 400). لا تتسم بخاصية idempotency.",
        "operationId": "create_business",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Businesses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vendor_data": {
                    "type": "string",
                    "nullable": true,
                    "description": "معرّفك الفريد لهذه الشركة (سلسلة نصية حرة، وليس UUID). اختياري ولكنه موصى به بشدة. عند تقديمه، يجب أن يكون فريداً بين الشركات غير المحذوفة للتطبيق؛ وتتم مطابقته تماماً كما أُرسل."
                  },
                  "display_name": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255,
                    "description": "اسم العرض المألوف الظاهر في لوحة التحكم (له الأولوية على `legal_name` للعرض في واجهة المستخدم)."
                  },
                  "legal_name": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255,
                    "description": "الاسم القانوني الرسمي للشركة."
                  },
                  "registration_number": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 100,
                    "description": "رقم تسجيل أو تأسيس الشركة."
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 10,
                    "description": "دولة التأسيس (ISO 3166-1 alpha-2، مثل `GB` أو `US`)."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "FLAGGED",
                      "BLOCKED"
                    ],
                    "default": "ACTIVE",
                    "description": "حالة دورة الحياة الأولية. القيمة الافتراضية هي `ACTIVE`."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON عشوائي ترفقه بالشركة. القيمة الافتراضية هي `{}`."
                  }
                }
              },
              "examples": {
                "Basic": {
                  "summary": "الحد الأدنى الموصى به",
                  "value": {
                    "vendor_data": "company-456",
                    "legal_name": "New Corp Ltd",
                    "country_code": "US"
                  }
                },
                "Full": {
                  "summary": "جميع الحقول",
                  "value": {
                    "vendor_data": "company-789",
                    "display_name": "New Corp",
                    "legal_name": "New Corp International Ltd",
                    "registration_number": "98765432",
                    "country_code": "DE",
                    "status": "ACTIVE",
                    "metadata": {
                      "industry": "fintech",
                      "tier": "enterprise"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/businesses/create/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendor_data\": \"company-456\", \"legal_name\": \"New Corp Ltd\", \"country_code\": \"US\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.create(\n    vendor_data=\"company-456\",\n    legal_name=\"New Corp Ltd\",\n    country_code=\"US\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.create({\n  vendor_data: \"company-456\",\n  legal_name: \"New Corp Ltd\",\n  country_code: \"US\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.Create(ctx, didit.BusinessesCreateParams{\n\tVendorData:  didit.String(\"company-456\"),\n\tLegalName:   didit.String(\"New Corp Ltd\"),\n\tCountryCode: didit.String(\"US\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.BusinessesCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().create(BusinessesCreateParams.builder()\n        .vendorData(\"company-456\")\n        .legalName(\"New Corp Ltd\")\n        .countryCode(\"US\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->businesses->create([\n    'vendor_data' => 'company-456',\n    'legal_name' => 'New Corp Ltd',\n    'country_code' => 'US',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.create(\n  vendor_data: \"company-456\",\n  legal_name: \"New Corp Ltd\",\n  country_code: \"US\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.CreateAsync(new BusinessesCreateParams\n{\n    VendorData = \"company-456\",\n    LegalName = \"New Corp Ltd\",\n    CountryCode = \"US\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء الشركة. يتم إرجاع سجل الشركة بالكامل (نفس بنية الحصول على الشركة).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessDetailItem"
                },
                "examples": {
                  "Created": {
                    "value": {
                      "didit_internal_id": "a1b2c3d4-e5f6-4890-abcd-ef1234567890",
                      "vendor_data": "company-456",
                      "display_name": null,
                      "legal_name": "New Corp Ltd",
                      "registration_number": null,
                      "country_code": "US",
                      "effective_name": "New Corp Ltd",
                      "status": "ACTIVE",
                      "session_count": 0,
                      "approved_count": 0,
                      "declined_count": 0,
                      "in_review_count": 0,
                      "features": {},
                      "features_list": [],
                      "last_session_at": null,
                      "last_activity_at": "2026-03-15T10:30:00Z",
                      "first_session_at": null,
                      "tags": [],
                      "created_at": "2026-03-15T10:30:00Z",
                      "metadata": {},
                      "updated_at": "2026-03-15T10:30:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح — عادةً ما يكون `vendor_data` مكرراً، أو `status` غير معروفة، أو `metadata` بتنسيق غير صحيح.",
            "content": {
              "application/json": {
                "examples": {
                  "Duplicate": {
                    "value": {
                      "vendor_data": [
                        "A business with this vendor_data already exists."
                      ]
                    }
                  },
                  "Bad status": {
                    "value": {
                      "status": [
                        "Invalid status. Valid options are: ACTIVE, FLAGGED, BLOCKED"
                      ]
                    }
                  },
                  "Bad metadata": {
                    "value": {
                      "metadata": [
                        "Metadata must be a JSON object."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للمفتاح إنشاء شركات لهذا التطبيق. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/users/create/": {
      "post": {
        "summary": "إنشاء مستخدم",
        "description": "أنشئ [مستخدماً](/entities/users) بواسطة `vendor_data`، قبل جلسة التحقق أو بدونها. يجب أن يكون `vendor_data` فريداً بين مستخدمي التطبيق (تكرار القيمة يُرجع `400`). لا تتمتع العملية بخاصية idempotency.\n\n**بيانات الاتصال:** يتم تخزين `email` و`phone_number` في `metadata.contact`، و`country` في `metadata.address`. عندما ترسل `first_name` أو `last_name` دون `full_name`، يدمجهما Didit في `full_name`.\n\n**رابط التحقق:** مع `send_verification_link: true`، يُنشئ Didit أيضاً جلسة تحقق للشخص وفق `workflow_id` ويرسل إليه الرابط عبر البريد الإلكتروني إلى `email`. تُجري الجلسة الفحوصات نفسها المتبعة في [إنشاء جلسة](/ar/sessions-api/create-session)، مثل قائمة الحظر ورصيدك. يتم إنشاء الشخص والجلسة معاً أو لا يتم إنشاء أي منهما على الإطلاق: إذا فشل أي فحص، فلن تتم كتابة أي شيء ولن يُرسل أي بريد إلكتروني. يصف `verification_link` في الاستجابة الجلسة، وتكون قيمته `null` عند عدم طلب رابط.\n\n**الوصول عبر مفتاح API:** يحتاج مفتاح API ذو النطاق المحدد إلى إذن كتابة `users`. ومع `send_verification_link: true`، يحتاج أيضاً إلى إذن كتابة `sessions`، وإلا فسيُرجع الاستدعاء الرمز `403` قبل كتابة أي شيء. لا تتأثر المفاتيح ذات الوصول الكامل. راجع [مفاتيح API](/ar/console/api-keys).",
        "operationId": "create_user",
        "x-didit-sdk": {
          "resource": "users",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "vendor_data"
                ],
                "properties": {
                  "vendor_data": {
                    "type": "string",
                    "description": "معرّفك الفريد لهذا المستخدم (سلسلة نصية حرة، وليس UUID). يجب أن يكون فريداً بين مستخدمي التطبيق؛ وتتم مطابقته تماماً كما أُرسل."
                  },
                  "full_name": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 512,
                    "description": "الاسم القانوني الكامل للمستخدم."
                  },
                  "display_name": {
                    "type": "string",
                    "nullable": true,
                    "description": "اسم العرض المألوف الظاهر في لوحة التحكم (له الأولوية على `full_name` للعرض في واجهة المستخدم).",
                    "maxLength": 255
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date",
                    "nullable": true,
                    "description": "تاريخ الميلاد بصيغة `YYYY-MM-DD`."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "FLAGGED",
                      "BLOCKED"
                    ],
                    "default": "ACTIVE",
                    "description": "حالة دورة الحياة الأولية. القيمة الافتراضية هي `ACTIVE`."
                  },
                  "metadata": {
                    "type": "object",
                    "nullable": true,
                    "description": "كائن JSON عشوائي ترفقه بالمستخدم. القيمة الافتراضية هي `{}`."
                  },
                  "approved_emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "عناوين البريد الإلكتروني الموثوقة مسبقاً لهذا المستخدم، على سبيل المثال `[\"john@example.com\"]`."
                  },
                  "approved_phones": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "أرقام الهواتف الموثوقة مسبقاً لهذا المستخدم، على سبيل المثال `[\"+14155551234\"]`."
                  },
                  "issuing_states": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "دول الإصدار المسجلة مسبقاً (ISO 3166-1 alpha-3)، على سبيل المثال `[\"USA\"]`."
                  },
                  "first_name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "الاسم الشخصي. عند عدم إرسال `full_name`، تجمع Didit بين `first_name` و`last_name` بمسافة في `full_name`. لا يُعاد كحقل منفصل."
                  },
                  "last_name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "اسم العائلة. يُدمج مع `first_name` لتكوين `full_name` عند عدم إرسال `full_name`. لا يتم إرجاعه كحقل منفصل."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "البريد الإلكتروني لجهة الاتصال، مخزن في `metadata.contact.email` (يستبدل `email` ترسله داخل `metadata.contact`). مطلوب عندما تكون قيمة `send_verification_link` هي `true`: يتم إرسال الرابط إلى هذا العنوان. إذا لم يكن `metadata.contact` كائن JSON، فإن الاستدعاء يُرجع `400` على هذا الحقل."
                  },
                  "phone_number": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "رقم هاتف التواصل، المخزن في `metadata.contact.phone_number`. إذا لم يكن `metadata.contact` كائن JSON، فسيُرجع الاستدعاء `400` لهذا الحقل."
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 3,
                    "description": "الدولة كرمز ISO 3166، بصيغة alpha-2 أو alpha-3 (`ES` أو `ESP`). تُخزن بأحرف كبيرة في `metadata.address.country`. إذا لم يكن `metadata.address` كائن JSON، تستجيب العملية بـ `400` لهذا الحقل."
                  },
                  "send_verification_link": {
                    "type": "boolean",
                    "default": false,
                    "description": "عندما تكون `true`، تُنشئ Didit جلسة تحقق للشخص وفقاً لـ `workflow_id` وترسل له الرابط عبر البريد الإلكتروني إلى `email`. يتطلب `email` و`workflow_id`. يتطلب مفتاح API محدد النطاق أيضاً إذن كتابة لـ `sessions`."
                  },
                  "workflow_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "سير عمل جلسة التحقق. مطلوب عندما تكون قيمة `send_verification_link` هي `true`. يجب أن يتحقق من شخص: يتم رفض سير عمل التحقق من الشركات (KYB). يتم تجاهله في غير ذلك."
                  },
                  "language": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "لغة البريد الإلكتروني للتحقق، كرمز [لغة مدعومة](/ar/integration/supported-languages). الإنجليزية عند حذفه. يتم تجاهله إذا لم تكن قيمة `send_verification_link` هي `true`."
                  }
                }
              },
              "examples": {
                "Basic": {
                  "summary": "إنشاء بالمعلومات الأساسية",
                  "value": {
                    "vendor_data": "user-abc-123",
                    "full_name": "John Doe"
                  }
                },
                "Full": {
                  "summary": "جميع الحقول",
                  "value": {
                    "vendor_data": "user-abc-456",
                    "full_name": "Jane Smith",
                    "display_name": "Jane S.",
                    "date_of_birth": "1990-05-15",
                    "status": "ACTIVE",
                    "metadata": {
                      "tier": "premium",
                      "source": "api"
                    },
                    "approved_emails": [
                      "jane@example.com"
                    ]
                  }
                },
                "Contact details": {
                  "summary": "الاسم والبريد الإلكتروني ورقم الهاتف والدولة",
                  "value": {
                    "vendor_data": "user-abc-789",
                    "first_name": "Julia",
                    "last_name": "Martin",
                    "email": "julia.martin@example.com",
                    "phone_number": "+34600000000",
                    "country": "ES"
                  }
                },
                "With verification link": {
                  "summary": "إنشاء الشخص وإرسال رابط التحقق إليه عبر البريد الإلكتروني",
                  "value": {
                    "vendor_data": "user-abc-789",
                    "first_name": "Julia",
                    "last_name": "Martin",
                    "email": "julia.martin@example.com",
                    "send_verification_link": true,
                    "workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                    "language": "es"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/users/create/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendor_data\": \"user-abc-123\", \"full_name\": \"John Doe\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.create(\n    vendor_data=\"user-abc-123\",\n    full_name=\"John Doe\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.create({\n  vendor_data: \"user-abc-123\",\n  full_name: \"John Doe\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.Create(ctx, didit.UsersCreateParams{\n\tVendorData: \"user-abc-123\",\n\tFullName:   didit.String(\"John Doe\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.UsersCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().create(UsersCreateParams.builder()\n        .vendorData(\"user-abc-123\")\n        .fullName(\"John Doe\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->users->create([\n    'vendor_data' => 'user-abc-123',\n    'full_name' => 'John Doe',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.create(\n  vendor_data: \"user-abc-123\",\n  full_name: \"John Doe\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.CreateAsync(new UsersCreateParams\n{\n    VendorData = \"user-abc-123\",\n    FullName = \"John Doe\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء المستخدم. سجل المستخدم الكامل (بنفس شكل Get User)، بالإضافة إلى `verification_link`: جلسة التحقق التي أرسلها Didit بالبريد الإلكتروني عندما كان `send_verification_link` بقيمة `true`، وإلا فإنه يكون `null`.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/UserDetailItem"
                    },
                    {
                      "type": "object",
                      "required": [
                        "verification_link"
                      ],
                      "properties": {
                        "verification_link": {
                          "type": "object",
                          "nullable": true,
                          "description": "جلسة التحقق التي أنشأتها Didit وأرسلتها عبر البريد الإلكتروني إلى الشخص. تظهر دائماً: تكون `null` عندما لا تكون قيمة `send_verification_link` هي `true`.",
                          "required": [
                            "session_id",
                            "session_number",
                            "status",
                            "url",
                            "workflow_id",
                            "email"
                          ],
                          "properties": {
                            "session_id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "معرّف جلسة التحقق."
                            },
                            "session_number": {
                              "type": "integer",
                              "description": "الرقم التسلسلي للجلسة داخل تطبيقك."
                            },
                            "status": {
                              "type": "string",
                              "description": "حالة الجلسة، وتكون `Not Started` للجلسة التي تم إنشاؤها للتو."
                            },
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "description": "رابط التحقق الذي أرسلته Didit عبر البريد الإلكتروني إلى الشخص."
                            },
                            "workflow_id": {
                              "type": "string",
                              "format": "uuid",
                              "nullable": true,
                              "description": "سير العمل الذي تُشغّله الجلسة."
                            },
                            "email": {
                              "type": "string",
                              "format": "email",
                              "description": "العنوان الذي أُرسل الرابط إليه."
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Created": {
                    "value": {
                      "didit_internal_id": "f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418",
                      "vendor_data": "user-abc-123",
                      "display_name": null,
                      "full_name": "John Doe",
                      "date_of_birth": null,
                      "effective_name": "John Doe",
                      "status": "ACTIVE",
                      "metadata": {},
                      "portrait_image_url": null,
                      "session_count": 0,
                      "approved_count": 0,
                      "declined_count": 0,
                      "in_review_count": 0,
                      "issuing_states": [],
                      "approved_emails": [],
                      "approved_phones": [],
                      "features": {},
                      "features_list": [],
                      "last_session_at": null,
                      "last_activity_at": "2025-06-15T10:30:00Z",
                      "first_session_at": null,
                      "tags": [],
                      "comments": [],
                      "created_at": "2025-06-15T10:30:00Z",
                      "updated_at": "2025-06-15T10:30:00Z",
                      "verification_link": null
                    }
                  },
                  "Created with verification link": {
                    "value": {
                      "didit_internal_id": "9b2f6c1e-3d4a-4e5f-8a7b-1c2d3e4f5a6b",
                      "vendor_data": "user-abc-789",
                      "display_name": null,
                      "full_name": "Julia Martin",
                      "date_of_birth": null,
                      "effective_name": "Julia Martin",
                      "status": "ACTIVE",
                      "metadata": {
                        "contact": {
                          "email": "julia.martin@example.com"
                        }
                      },
                      "portrait_image_url": null,
                      "session_count": 1,
                      "approved_count": 0,
                      "declined_count": 0,
                      "in_review_count": 0,
                      "issuing_states": [],
                      "approved_emails": [],
                      "approved_phones": [],
                      "features": {},
                      "features_list": [],
                      "last_session_at": "2025-06-15T10:30:00Z",
                      "last_activity_at": "2025-06-15T10:30:00Z",
                      "first_session_at": "2025-06-15T10:30:00Z",
                      "tags": [],
                      "comments": [],
                      "created_at": "2025-06-15T10:30:00Z",
                      "updated_at": "2025-06-15T10:30:00Z",
                      "verification_link": {
                        "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa7",
                        "session_number": 43762,
                        "status": "Not Started",
                        "url": "https://verify.didit.me/en/session/3FaJ9wLqX2Mz",
                        "workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                        "email": "julia.martin@example.com"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح، مفهرساً حسب الحقل: عادةً ما يكون `vendor_data` مكرراً، أو حقلاً مطلوباً مفقوداً، أو قيمة بتنسيق غير صحيح. مع `send_verification_link: true`، قد يكون أيضاً بسبب فقدان `email` أو `workflow_id`، أو سير عمل غير معروف أو تابع للتحقق من الشركات (KYB)، أو `language` غير مدعومة (مفهرسة باسم `contact_details.email_lang`)، أو `vendor_data` مدرج في قائمة الحظر، أو عدم كفاية الرصيد لبدء الجلسة. لم يتم كتابة أي شيء.",
            "content": {
              "application/json": {
                "examples": {
                  "Duplicate": {
                    "value": {
                      "vendor_data": [
                        "A user with this vendor_data already exists."
                      ]
                    }
                  },
                  "Missing vendor_data": {
                    "value": {
                      "vendor_data": [
                        "This field is required."
                      ]
                    }
                  },
                  "Bad metadata": {
                    "value": {
                      "metadata": [
                        "Metadata must be a JSON object."
                      ]
                    }
                  },
                  "Bad status": {
                    "value": {
                      "status": [
                        "Invalid status. Valid options are: ACTIVE, FLAGGED, BLOCKED"
                      ]
                    }
                  },
                  "Bad country": {
                    "value": {
                      "country": [
                        "Use an ISO 3166 country code, like ES or ESP."
                      ]
                    }
                  },
                  "Contact not an object": {
                    "value": {
                      "email": [
                        "metadata.contact must be a JSON object to store this value."
                      ]
                    }
                  },
                  "Address not an object": {
                    "value": {
                      "country": [
                        "metadata.address must be a JSON object to store this value."
                      ]
                    }
                  },
                  "Link without email or workflow": {
                    "value": {
                      "email": [
                        "An email address is required to send a verification link."
                      ],
                      "workflow_id": [
                        "Pick the workflow to send a verification link for."
                      ]
                    }
                  },
                  "Unknown workflow": {
                    "value": {
                      "workflow_id": [
                        "Invalid workflow_id."
                      ]
                    }
                  },
                  "Business workflow": {
                    "value": {
                      "workflow_id": [
                        "This workflow verifies a business. Pick a workflow that verifies a person to send them a verification link."
                      ]
                    }
                  },
                  "Blocklisted vendor_data": {
                    "value": {
                      "vendor_data": "This user or business has been blocked and cannot create new verification sessions."
                    }
                  },
                  "Insufficient credits": {
                    "value": {
                      "detail": "You don't have enough credits to perform this request. Please top up at https://business.didit.me"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "لم يتم توفير بيانات اعتماد. الطلبات المرسلة إلى مسارات `/v3/users/*` بدون رأس `x-api-key` (أو رمز `Authorization: Bearer`) يتم رفضها بواسطة برمجية المصادقة الوسيطة قبل وصولها إلى الـ API.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing credentials": {
                    "value": {
                      "detail": "You must be authenticated with a valid access token to access this endpoint."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API غير صالح أو تم إلغاؤه، أو أن المفتاح لا يملك صلاحية إنشاء مستخدمين لهذا التطبيق. يحتاج مفتاح API مقيّد النطاق إلى صلاحية كتابة `users`، وكذلك صلاحية كتابة `sessions` عندما يكون `send_verification_link` بقيمة `true`؛ لم يُكتب أي شيء. يُرجع المفتاح المفقود `403`؛ بينما يُرجع المفتاح غير الصحيح أو المُلغى أو المنتهي الصلاحية `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "No sessions write": {
                    "summary": "مفتاح محدد النطاق يطلب رابط التحقق بدون إذن كتابة للجلسات",
                    "value": {
                      "detail": "This API key has no write access to sessions."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة بعد الفاصل الزمني الموضح في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/vendor-users/by-id/{didit_internal_id}/faces/upload/": {
      "post": {
        "summary": "رفع وجه المستخدم",
        "description": "إرفاق صورة وجه موثوقة ومستوردة بملف تعريف مستخدم حالي. استخدم هذا الإجراء بعد إنشاء مستخدم أو جلبه بواسطة `vendor_data` وقراءة `didit_internal_id` الخاص به. يتم تخزين الوجه المرفوع في ملف تعريف المستخدم وفهرسته لاكتشاف التكرار والبحث بالوجه. لا تتم إضافته إلى قائمة حظر الوجوه.",
        "operationId": "upload_user_face",
        "x-didit-sdk": {
          "resource": "users",
          "method": "upload_face",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة التي تملك التطبيق."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق الذي يمتلك ملف تعريف المستخدم."
          },
          {
            "name": "didit_internal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID الداخلي للمستخدم في Didit، والذي يُرجع كـ `didit_internal_id` بواسطة `GET /v3/users/{vendor_data}/` و`POST /v3/users/create/`."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "image"
                ],
                "properties": {
                  "image": {
                    "type": "string",
                    "format": "byte",
                    "description": "صورة وجه خام بصيغة JPG أو PNG بترميز base64. لا تُضمِّن البادئة `data:image/...;base64,`. الحد الأقصى للحجم بعد فك الترميز: 2 MB."
                  },
                  "comment": {
                    "type": "string",
                    "description": "ملاحظة اختيارية مرئية للمشغّل للوجه الذي تم رفعه.",
                    "default": ""
                  }
                }
              },
              "examples": {
                "Imported face": {
                  "summary": "إرفاق وجه تم استيراده من مزود سابق",
                  "value": {
                    "image": "/9j/4AAQSkZJRgABAQEA...",
                    "comment": "Imported from previous KYC provider"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/vendor-users/by-id/f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418/faces/upload/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"image\": \"/9j/4AAQSkZJRgABAQEA...\", \"comment\": \"Imported from previous KYC provider\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.users.upload_face(\n    \"11111111-2222-3333-4444-555555555555\",\n    image=\"/9j/4AAQSkZJRgABAQEA...\",\n    comment=\"Imported from previous KYC provider\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.users.uploadFace(\"11111111-2222-3333-4444-555555555555\", {\n  image: \"/9j/4AAQSkZJRgABAQEA...\",\n  comment: \"Imported from previous KYC provider\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Users.UploadFace(ctx, \"11111111-2222-3333-4444-555555555555\", didit.UsersUploadFaceParams{\n\tImage:   \"/9j/4AAQSkZJRgABAQEA...\",\n\tComment: didit.String(\"Imported from previous KYC provider\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.UsersUploadFaceParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.users().uploadFace(\"11111111-2222-3333-4444-555555555555\", UsersUploadFaceParams.builder()\n        .image(\"/9j/4AAQSkZJRgABAQEA...\")\n        .comment(\"Imported from previous KYC provider\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->users->uploadFace('11111111-2222-3333-4444-555555555555', [\n    'image' => '/9j/4AAQSkZJRgABAQEA...',\n    'comment' => 'Imported from previous KYC provider',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.users.upload_face(\n  \"11111111-2222-3333-4444-555555555555\",\n  image: \"/9j/4AAQSkZJRgABAQEA...\",\n  comment: \"Imported from previous KYC provider\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Users.UploadFaceAsync(\"11111111-2222-3333-4444-555555555555\", new UsersUploadFaceParams\n{\n    Image = \"/9j/4AAQSkZJRgABAQEA...\",\n    Comment = \"Imported from previous KYC provider\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم رفع الوجه وإرفاقه بملف تعريف المستخدم.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "uuid",
                    "image_url",
                    "comment",
                    "uploaded_by",
                    "created_at"
                  ],
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف UUID لسجل وجه المستخدم المرفوع."
                    },
                    "image_url": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL موقّع لصورة الوجه المرفوعة."
                    },
                    "comment": {
                      "type": "string",
                      "nullable": true,
                      "description": "التعليق المقدَّم عند تحميل الوجه."
                    },
                    "uploaded_by": {
                      "type": "string",
                      "nullable": true,
                      "description": "البريد الإلكتروني أو معرّف الجهة الفاعلة للقائم بالرفع عند توفره."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "الطابع الزمني للرفع."
                    }
                  }
                },
                "examples": {
                  "Uploaded": {
                    "value": {
                      "uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                      "image_url": "https://signed-url.example/face.jpg",
                      "comment": "Imported from previous KYC provider",
                      "uploaded_by": "api",
                      "created_at": "2026-05-18T12:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب أو الصورة غير صالحة. الأسباب الشائعة: base64 غير صالح، صورة غير صالحة، تعذر كشف الوجه، حجم الصورة يتجاوز 2 ميجابايت، تضمين مفقود، أو أن المستخدم يمتلك بالفعل 5 وجوه تم تحميلها.",
            "content": {
              "application/json": {
                "examples": {
                  "No face": {
                    "value": {
                      "image": "No face detected in the image. Please upload a clear photo with a visible face."
                    }
                  },
                  "Too many faces": {
                    "value": {
                      "detail": "Maximum of 5 faces per user reached."
                    }
                  },
                  "Too large": {
                    "value": {
                      "image": "Image exceeds maximum size of 2 MB."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing key": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات الاعتماد صالحة ولكن لا يمكنها كتابة الملفات الشخصية للمستخدمين لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد مستخدم بمعرّف `didit_internal_id` هذا في التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل؛ تراجع مؤقتاً وأعد المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 30 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/update-data/": {
      "patch": {
        "summary": "تحديث بيانات KYC المستخرجة من مستند الهوية في جلسة تحقق",
        "description": "تصحيح حقول الهوية التي تم استخراجها (عبر OCR / NFC) من مستند هوية المستخدم — مثل الأسماء أو التواريخ أو أرقام المستندات المقروءة بشكل خاطئ، وما إلى ذلك — بعد اكتمال التحقق. عادةً ما يتم الاستدعاء من قِبل محلل امتثال يعمل من مكتبك الخلفي، أو من خلال مهمة تسوية آلية. كل حقل في نص الطلب اختياري: تتم كتابة المفاتيح التي ترسلها فقط، ويُترك كل شيء آخر دون تغيير (دلالات `PATCH`).\n\nيجب أن تنتمي الجلسة إلى تطبيقك وتكون بحالة `Approved` أو `Declined` أو `In Review` أو `Kyc Expired`. الجلسات في أي حالة أخرى (على سبيل المثال، لا تزال `In Progress`) تُرجع `404` مع `\"No Session matches the given query.\"` — وهي تختلف عن `\"Not found.\"` التي تُرجع لـ `sessionId` غير معروف أو محذوف. يجب أن تحتوي الجلسة أيضاً على سجل التحقق من الهوية (KYC): الجلسات التي لم يُشغّل سير العمل الخاص بها خطوة التحقق من الهوية تُرجع `404` (`\"The session does not have a KYC.\"`). بالنسبة لمخططات سير العمل التي تتضمن خطوات متعددة للتحقق من الهوية، حدد خطوة معينة باستخدام `node_id` (كمعامل استعلام أو حقل في نص الطلب)؛ وعند عدم تحديده، يتم تعديل أحدث سجل KYC.\n\nيُعاد حساب حقلين مشتقين عند كل استدعاء: `full_name` (من `first_name` + `last_name`) و `issuing_state_name` (من `issuing_state`). إذا تغير النص الحر في `address`، فقد يقوم الخادم أيضاً بإعادة تحديد موقعه الجغرافي وتحديث `parsed_address` (يتم تخطي ذلك لجلسات البيئة التجريبية). يتم دمج `extra_fields` و `parsed_address` مفتاحاً بمفتاح بدلاً من استبدالهما بالكامل — راجع الأوصاف الخاصة بكل حقل للاطلاع على دلالات استخدام `null` للحذف.\n\nإرسال حقل صالح واحد على الأقل يؤدي إلى تشغيل [webhook](/ar/integration/webhooks) للحدث `data.updated` (المُشغِّل `manual_review`) — حتى عندما تكون القيم المرسلة مطابقة للقيم المخزنة. عندما تتغير القيم بالفعل، يُضاف إدخال نشاط `KYC_DATA_UPDATED` يسجل الحقول التي تم تغييرها مع القيم السابقة والجديدة إلى `reviews` الخاصة بالجلسة، ويكون مرئياً في [Get Decision](#get-/v3/session/-sessionId-/decision/) والجدول الزمني للنشاط في لوحة التحكم. **لا** يُعاد تقييم حالة الجلسة وقرارها — استخدم [Update Status](#patch-/v3/session/-sessionId-/update-status/) لتغيير النتيجة. يُقبل نص JSON فارغ (`{}`) ويقوم ببساطة بإرجاع بيانات KYC الحالية دون تشغيل webhook.\n\nيقبل مفتاح API أو token مستخدم لوحة التحكم؛ وفي كلتا الحالتين تحتاج بيانات الاعتماد إلى الإذن `write:sessions`. يُرجع كل من فشل المصادقة وفشل الأذونات الرمز `403` — لا تستجيب واجهة API هذه بالرمز `401` مطلقاً. لاحظ أن البحث عن الجلسة يتم قبل التحقق من بيانات الاعتماد، لذا فإن معرف `sessionId` غير المعروف يُرجع `404` حتى في حال عدم وجود بيانات الاعتماد. يحتوي هذا endpoint على حد معدل مخصص يبلغ 10 طلبات في الدقيقة لكل مفتاح API (تُحتسب الطلبات غير الصالحة أيضاً)؛ كما تنطبق أيضاً الميزانية المشتركة لعمليات الكتابة البالغة 300 طلب في الدقيقة.",
        "operationId": "patch_v3_session_update_data",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_data",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من المستخدمين (KYC) التي تقوم بتصحيح بيانات المستند المستخرجة لها. معرّفات جلسات الشركات (KYB) غير صالحة هنا — لبيانات الشركات استخدم [Update KYB Company Data](#patch-/v3/session/-sessionId-/kyb/-companyUuid-/update-data/).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة مخطط سير العمل المراد تعديل سجل KYC الخاص بها، لمهام سير العمل ذات المخطط التي تتضمن خطوات متعددة للتحقق من الهوية (يُقبل أيضاً كحقل `node_id` في جسم الطلب). عند إغفاله، يتم تعديل أحدث سجل KYC في الجلسة. إذا لم يكن هناك KYC للعقدة المحددة، يُرجع الاستدعاء `404` (`\"The session does not have a KYC for node '<node_id>'.\"`).",
            "schema": {
              "type": "string",
              "example": "feature_ocr"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "جميع الحقول اختيارية — أرسل فقط ما ترغب في تغييره.",
                "properties": {
                  "document_type": {
                    "type": "string",
                    "description": "رمز نوع المستند. يقبل الرموز القصيرة المدرجة في التعداد (enum)، بالإضافة إلى ستة أسماء مستعارة بالصيغة الطويلة تتم تسويتها على جانب الخادم قبل التحقق: `Passport` → `P`، و`Identity Card` → `ID`، و`Driver's License` → `DL`، و`Residence Permit` → `RP`، و`Health Insurance Card` → `HIC`، و`Tax Card` → `TC`. أي قيمة أخرى (بما في ذلك `PASSPORT` بأحرف كبيرة) تُرجع `400`.",
                    "enum": [
                      "P",
                      "DL",
                      "ID",
                      "RP",
                      "SSC",
                      "HIC",
                      "WP",
                      "TC",
                      "VISA",
                      "PSC",
                      "BC",
                      "OTHER"
                    ],
                    "nullable": true,
                    "example": "P"
                  },
                  "document_subtype": {
                    "type": "string",
                    "maxLength": 128,
                    "nullable": true,
                    "description": "النوع الفرعي للمستند من سجل المستندات، بما في ذلك بادئة المنطقة عندما يميّز السجل المتغيرات الإقليمية."
                  },
                  "document_number": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "رقم المستند كما هو مطبوع على الهوية.",
                    "example": "PAB123456"
                  },
                  "personal_number": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "رقم الهوية الشخصية / الوطنية عندما يحمله المستند (مثل DNI الإسباني على جواز السفر).",
                    "example": "99999999R"
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date",
                    "nullable": true,
                    "description": "تاريخ الميلاد بصيغة `YYYY-MM-DD`. أي صيغة أخرى تُرجع `400`.",
                    "example": "1980-01-01"
                  },
                  "date_of_issue": {
                    "type": "string",
                    "format": "date",
                    "nullable": true,
                    "description": "تاريخ إصدار المستند بالصيغة `YYYY-MM-DD`."
                  },
                  "expiration_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true,
                    "description": "تاريخ انتهاء المستند بصيغة `YYYY-MM-DD`."
                  },
                  "issuing_state": {
                    "type": "string",
                    "nullable": true,
                    "description": "دولة الإصدار كرمز ISO 3166-1 alpha-3. غير حساس لحالة الأحرف (يتم تخزين `esp` كـ `ESP`)؛ يُعاد احتساب `issuing_state_name` المقروء بشرياً والمعروض في [الحصول على القرار](#get-/v3/session/-sessionId-/decision/) من هذه القيمة. الرموز غير الصالحة تُرجع `400`.",
                    "example": "ESP"
                  },
                  "first_name": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "الاسم أو الأسماء الشخصية. يُعاد احتساب `full_name` المخزن كـ `first_name + ' ' + last_name` عند كل استدعاء لهذا الـ endpoint.",
                    "example": "Carmen"
                  },
                  "last_name": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "اسم (أو أسماء) العائلة. يُستخدم أيضاً في إعادة احتساب `full_name`.",
                    "example": "Espanola Espanola"
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "M",
                      "F",
                      "U"
                    ],
                    "nullable": true,
                    "description": "الجنس كما هو مطبوع على المستند: `M` (ذكر)، أو `F` (أنثى)، أو `U` (غير معروف). أي قيمة أخرى — بما في ذلك `X` — تُرجع `400`."
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "العنوان كنص حر كما هو مطبوع على المستند. عندما تتغير هذه القيمة (للجلسات خارج البيئة التجريبية فقط) ويكون العنوان المنظم لا يزال مفقوداً أو غير مكتمل، يقوم الخادم بإعادة ترميزه جغرافياً بشكل متزامن قبل الاستجابة، إذ يعكس نص استجابة 200 بالفعل قيمة `parsed_address` المحدّثة. تتطلب إعادة الترميز الجغرافي أيضاً وجود `issuing_state` في سجل KYC."
                  },
                  "place_of_birth": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "مكان الميلاد كما هو مطبوع على المستند."
                  },
                  "nationality": {
                    "type": "string",
                    "maxLength": 32,
                    "nullable": true,
                    "description": "الجنسية كما هي مطبوعة على المستند. نص حر حتى 32 حرفًا — عادةً رمز ISO 3166-1 alpha-3 (مثل `ESP`)، ولكنه لا يخضع للتحقق كرمز معتمد."
                  },
                  "marital_status": {
                    "type": "string",
                    "enum": [
                      "SINGLE",
                      "MARRIED",
                      "DIVORCED",
                      "WIDOWED",
                      "UNKNOWN"
                    ],
                    "description": "الحالة الاجتماعية متى كانت مدرجة في المستند. تُرجع أي قيمة أخرى `400`."
                  },
                  "extra_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "nullable": true,
                    "description": "تجاوزات لكل مفتاح للحقول الإضافية الخاصة بالمستند (مثل `blood_group`، `dl_categories`، `mrz_string`). يتم دمج المفاتيح في خريطة التجاوزات الحالية: أرسل مفتاحاً مع قيمة لتعيينه، أو مع `null` / `\"\"` لإزالة هذا المفتاح من العرض المدمج. أرسل الحقل كاملاً كـ `null` لمسح جميع التجاوزات المطبقة سابقاً. يجب أن يكون كائن JSON، وإلا فسيتم إرجاع `400`. ترجع الاستجابة دائماً العرض المدمج (القيم المستخرجة عبر OCR مع تطبيق التجاوزات الخاصة بك)."
                  },
                  "parsed_address": {
                    "type": "object",
                    "nullable": true,
                    "description": "عنوان مهيكل. يتم قبول هذه المفاتيح المتداخلة فقط: `address_type`، `city`، `region`، `street_1`، `street_2`، `postal_code`، `country` — أي مفتاح آخر يؤدي إلى إرجاع `400`. دلالات كل مفتاح: القيمة تحدد المفتاح، وتؤدي القيمة `null` إلى إزالته. يُعاد حساب `formatted_address` على جانب الخادم عن طريق دمج `street_1`، و`street_2`، و`city`، و`region`، و`postal_code`، و`country` ويتم إرجاعه في الاستجابة — لا يمكنك تعيينه مباشرة.",
                    "properties": {
                      "address_type": {
                        "type": "string",
                        "nullable": true,
                        "description": "تصنيف العنوان بصيغة حرة (مثل `home`)."
                      },
                      "city": {
                        "type": "string",
                        "nullable": true,
                        "example": "Madrid"
                      },
                      "region": {
                        "type": "string",
                        "nullable": true,
                        "description": "الولاية / المقاطعة / المنطقة ذات الحكم الذاتي."
                      },
                      "street_1": {
                        "type": "string",
                        "nullable": true,
                        "example": "Avda de Madrid 34"
                      },
                      "street_2": {
                        "type": "string",
                        "nullable": true
                      },
                      "postal_code": {
                        "type": "string",
                        "nullable": true,
                        "example": "28013"
                      },
                      "country": {
                        "type": "string",
                        "nullable": true,
                        "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2. يتم توحيد الإدخال بالأحرف الصغيرة إلى أحرف كبيرة؛ وتُرفض رموز alpha-3 مع الرمز `400`.",
                        "example": "ES"
                      }
                    }
                  }
                }
              },
              "examples": {
                "Correct name and DOB": {
                  "summary": "تصحيح الاسم وتاريخ الميلاد والعنوان المهيكل التي قرأها OCR بشكل خاطئ",
                  "value": {
                    "first_name": "Carmen",
                    "last_name": "Espanola Espanola",
                    "date_of_birth": "1980-01-01",
                    "issuing_state": "ESP",
                    "marital_status": "MARRIED",
                    "extra_fields": {
                      "blood_group": "O+"
                    },
                    "parsed_address": {
                      "street_1": "Avda de Madrid 34",
                      "city": "Madrid",
                      "postal_code": "28013",
                      "country": "ES"
                    }
                  }
                },
                "Remove an extra field": {
                  "summary": "حذف مفتاح حقل إضافي واحد مع الاحتفاظ بالباقي",
                  "value": {
                    "extra_fields": {
                      "blood_group": null
                    }
                  }
                },
                "Long-form document type": {
                  "summary": "يُطبَّع الاسم المستعار الطويل إلى الرمز القصير (هنا P)",
                  "value": {
                    "document_type": "Passport"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث بيانات KYC. يُرجع **سجل KYC الحالي الكامل** (كل حقل قابل للتحديث مع قيمته المخزنة، بالإضافة إلى `extra_fields` المدمجة و`parsed_address` الحالي) — وليس الحقول التي أرسلتها فقط. يتم تشغيل webhook الخاص بـ `data.updated` عندما يحتوي الـ payload على حقل صالح واحد على الأقل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "document_type": {
                      "type": "string",
                      "description": "رمز نوع المستند. يقبل الرموز القصيرة المدرجة في التعداد (enum)، بالإضافة إلى ستة أسماء مستعارة بالصيغة الطويلة تتم تسويتها على جانب الخادم قبل التحقق: `Passport` → `P`، و`Identity Card` → `ID`، و`Driver's License` → `DL`، و`Residence Permit` → `RP`، و`Health Insurance Card` → `HIC`، و`Tax Card` → `TC`. أي قيمة أخرى (بما في ذلك `PASSPORT` بأحرف كبيرة) تُرجع `400`.",
                      "enum": [
                        "P",
                        "DL",
                        "ID",
                        "RP",
                        "SSC",
                        "HIC",
                        "WP",
                        "TC",
                        "VISA",
                        "PSC",
                        "BC",
                        "OTHER"
                      ],
                      "nullable": true,
                      "example": "P"
                    },
                    "document_subtype": {
                      "type": "string",
                      "maxLength": 128,
                      "nullable": true,
                      "description": "النوع الفرعي للمستند من سجل المستندات، بما في ذلك بادئة المنطقة عندما يميّز السجل المتغيرات الإقليمية."
                    },
                    "document_number": {
                      "type": "string",
                      "maxLength": 255,
                      "nullable": true,
                      "description": "رقم المستند كما هو مطبوع على الهوية.",
                      "example": "PAB123456"
                    },
                    "personal_number": {
                      "type": "string",
                      "maxLength": 255,
                      "nullable": true,
                      "description": "رقم الهوية الشخصية / الوطنية عندما يحمله المستند (مثل DNI الإسباني على جواز السفر).",
                      "example": "99999999R"
                    },
                    "date_of_birth": {
                      "type": "string",
                      "format": "date",
                      "nullable": true,
                      "description": "تاريخ الميلاد بصيغة `YYYY-MM-DD`. أي صيغة أخرى تُرجع `400`.",
                      "example": "1980-01-01"
                    },
                    "date_of_issue": {
                      "type": "string",
                      "format": "date",
                      "nullable": true,
                      "description": "تاريخ إصدار المستند بالصيغة `YYYY-MM-DD`."
                    },
                    "expiration_date": {
                      "type": "string",
                      "format": "date",
                      "nullable": true,
                      "description": "تاريخ انتهاء المستند بصيغة `YYYY-MM-DD`."
                    },
                    "issuing_state": {
                      "type": "string",
                      "nullable": true,
                      "description": "دولة الإصدار كرمز ISO 3166-1 alpha-3. غير حساس لحالة الأحرف (يتم تخزين `esp` كـ `ESP`)؛ يُعاد احتساب `issuing_state_name` المقروء بشرياً والمعروض في [الحصول على القرار](#get-/v3/session/-sessionId-/decision/) من هذه القيمة. الرموز غير الصالحة تُرجع `400`.",
                      "example": "ESP"
                    },
                    "first_name": {
                      "type": "string",
                      "maxLength": 255,
                      "nullable": true,
                      "description": "الاسم أو الأسماء الشخصية. يُعاد احتساب `full_name` المخزن كـ `first_name + ' ' + last_name` عند كل استدعاء لهذا الـ endpoint.",
                      "example": "Carmen"
                    },
                    "last_name": {
                      "type": "string",
                      "maxLength": 255,
                      "nullable": true,
                      "description": "اسم (أو أسماء) العائلة. يُستخدم أيضاً في إعادة احتساب `full_name`.",
                      "example": "Espanola Espanola"
                    },
                    "gender": {
                      "type": "string",
                      "enum": [
                        "M",
                        "F",
                        "U"
                      ],
                      "nullable": true,
                      "description": "الجنس كما هو مطبوع على المستند: `M` (ذكر)، أو `F` (أنثى)، أو `U` (غير معروف). أي قيمة أخرى — بما في ذلك `X` — تُرجع `400`."
                    },
                    "address": {
                      "type": "string",
                      "maxLength": 255,
                      "nullable": true,
                      "description": "العنوان كنص حر كما هو مطبوع على المستند. عندما تتغير هذه القيمة (للجلسات خارج البيئة التجريبية فقط) ويكون العنوان المنظم لا يزال مفقوداً أو غير مكتمل، يقوم الخادم بإعادة ترميزه جغرافياً في الخلفية ضمن الطلب نفسه وقد يستبدل `parsed_address` بنتيجة أداة الترميز الجغرافي."
                    },
                    "place_of_birth": {
                      "type": "string",
                      "maxLength": 255,
                      "nullable": true,
                      "description": "مكان الميلاد كما هو مطبوع على المستند."
                    },
                    "nationality": {
                      "type": "string",
                      "maxLength": 32,
                      "nullable": true,
                      "description": "الجنسية كما هي مطبوعة على المستند. نص حر حتى 32 حرفًا — عادةً رمز ISO 3166-1 alpha-3 (مثل `ESP`)، ولكنه لا يخضع للتحقق كرمز معتمد."
                    },
                    "marital_status": {
                      "type": "string",
                      "enum": [
                        "SINGLE",
                        "MARRIED",
                        "DIVORCED",
                        "WIDOWED",
                        "UNKNOWN"
                      ],
                      "description": "الحالة الاجتماعية متى كانت مدرجة في المستند. تُرجع أي قيمة أخرى `400`."
                    },
                    "extra_fields": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "عرض مدمج للحقول الإضافية للمستند: القيم المستخرجة عبر OCR مع تطبيق جميع تجاوزات المشغل. المفاتيح التي تمت إزالتها عبر تجاوز `null` تكون غائبة من هذا المخطط."
                    },
                    "parsed_address": {
                      "type": "object",
                      "nullable": true,
                      "description": "العنوان المنظم الحالي (مع إزالة مفاتيح مسك الدفاتر الداخلية)، أو `null` في حال عدم وجود أي عنوان. يتضمن `formatted_address` المعاد حسابه إلى جانب المفاتيح السبعة القابلة للتعديل.",
                      "properties": {
                        "address_type": {
                          "type": "string",
                          "nullable": true,
                          "description": "تصنيف العنوان بصيغة حرة (مثل `home`)."
                        },
                        "city": {
                          "type": "string",
                          "nullable": true,
                          "example": "Madrid"
                        },
                        "region": {
                          "type": "string",
                          "nullable": true,
                          "description": "الولاية / المقاطعة / المنطقة ذات الحكم الذاتي."
                        },
                        "street_1": {
                          "type": "string",
                          "nullable": true,
                          "example": "Avda de Madrid 34"
                        },
                        "street_2": {
                          "type": "string",
                          "nullable": true
                        },
                        "postal_code": {
                          "type": "string",
                          "nullable": true,
                          "example": "28013"
                        },
                        "country": {
                          "type": "string",
                          "nullable": true,
                          "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2. يتم توحيد الإدخال بالأحرف الصغيرة إلى أحرف كبيرة؛ وتُرفض رموز alpha-3 مع الرمز `400`.",
                          "example": "ES"
                        },
                        "formatted_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "صيغة مجمّعة ومقروءة بشرياً للعنوان المنظم. يُعاد احتسابها على جانب الخادم بعد كل تعديل على `parsed_address`.",
                          "example": "Avda de Madrid 34, Madrid, 28013, ES"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Updated KYC": {
                    "summary": "سجل KYC الكامل بعد التصحيح",
                    "value": {
                      "document_type": "P",
                      "document_subtype": null,
                      "document_number": "PAB123456",
                      "personal_number": "99999999R",
                      "date_of_birth": "1980-01-01",
                      "date_of_issue": "2021-02-09",
                      "expiration_date": "2031-02-08",
                      "issuing_state": "ESP",
                      "first_name": "Carmen",
                      "last_name": "Espanola Espanola",
                      "gender": "F",
                      "address": "AVDA DE MADRID 34, MADRID, MADRID 28013",
                      "place_of_birth": "MADRID",
                      "nationality": "ESP",
                      "marital_status": "MARRIED",
                      "extra_fields": {
                        "mrz_string": "P<ESPESPANOLA<<CARMEN<<<<<",
                        "blood_group": "O+"
                      },
                      "parsed_address": {
                        "city": "Madrid",
                        "street_1": "Avda de Madrid 34",
                        "postal_code": "28013",
                        "country": "ES",
                        "formatted_address": "Avda de Madrid 34, Madrid, 28013, ES"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تصل أخطاء الحقول على شكل `{\"<field>\": [\"<message>\"]}`؛ وتستخدم الأخطاء في مفاتيح `parsed_address` / `extra_fields` المتداخلة قيمة كائن: `{\"parsed_address\": {\"<key>\": \"<message>\"}}`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid gender": {
                    "summary": "يجب أن يكون gender إما M أو F أو U",
                    "value": {
                      "gender": [
                        "\"X\" is not a valid choice."
                      ]
                    }
                  },
                  "Invalid document type": {
                    "summary": "ليس رمزاً قصيراً أو اسماً مستعاراً بالصيغة الطويلة",
                    "value": {
                      "document_type": [
                        "\"PASSPORT\" is not a valid choice."
                      ]
                    }
                  },
                  "Invalid issuing state": {
                    "summary": "حقل issuing_state ليس بصيغة ISO 3166-1 alpha-3",
                    "value": {
                      "issuing_state": [
                        "Invalid ISO 3166-1 alpha-3 country code for issuing_state."
                      ]
                    }
                  },
                  "Invalid marital status": {
                    "summary": "حقل marital_status ليس ضمن التعداد (enum)",
                    "value": {
                      "marital_status": [
                        "\"ENGAGED\" is not a valid choice."
                      ]
                    }
                  },
                  "Bad date format": {
                    "summary": "يجب أن تكون التواريخ بالصيغة YYYY-MM-DD",
                    "value": {
                      "date_of_birth": [
                        "Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
                      ]
                    }
                  },
                  "Unsupported parsed_address key": {
                    "summary": "يُسمح بالمفاتيح السبعة الموثقة فقط",
                    "value": {
                      "parsed_address": {
                        "zipcode": "Unsupported key. Allowed keys: address_type, city, region, street_1, street_2, postal_code, country"
                      }
                    }
                  },
                  "Invalid parsed_address country": {
                    "summary": "يجب أن تكون الدولة المتداخلة بصيغة alpha-2، وليست alpha-3",
                    "value": {
                      "parsed_address": {
                        "country": "Invalid ISO 3166-1 alpha-2 country code."
                      }
                    }
                  },
                  "extra_fields not an object": {
                    "summary": "يجب أن يكون extra_fields كائن JSON",
                    "value": {
                      "extra_fields": [
                        "This field must be a JSON object."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة أو أذونات غير كافية. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "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."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "جلسة غير معروفة، أو جلسة في حالة غير قابلة للتعديل، أو لا يوجد سجل KYC لتعديله. لكل حالة رسالة `detail` مميزة (راجع الأمثلة). يتم تشغيل البحث عن الجلسة غير المعروفة قبل فحوصات بيانات الاعتماد.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف في تطبيقك (أو تم حذفها)",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Wrong session state": {
                    "summary": "الجلسة موجودة ولكن حالتها ليست Approved / Declined / In Review / Kyc Expired",
                    "value": {
                      "detail": "No Session matches the given query."
                    }
                  },
                  "No KYC record": {
                    "summary": "لم يُشغّل سير العمل خطوة التحقق من الهوية مطلقاً",
                    "value": {
                      "detail": "The session does not have a KYC."
                    }
                  },
                  "No KYC for node": {
                    "summary": "تم تقديم node_id ولكن لا يوجد KYC مرتبط به",
                    "value": {
                      "detail": "The session does not have a KYC for node 'feature_missing'."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل المخصص — 10 تحديثات لبيانات KYC في الدقيقة لكل مفتاح API (تُحتسب الطلبات المرفوضة ضمن الحصة المخصصة). وقد يؤدي حد الكتابة المشترك البالغ 300/دقيقة أيضاً إلى ظهور رسالة خاصة به. تحقق من `Retry-After` ورؤوس الاستجابة `X-RateLimit-*` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت ميزانية تحديث KYC",
                    "value": {
                      "detail": "Session KYC data update rate limit exceeded. You can make up to 10 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-data/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"first_name\": \"Carmen\",\n    \"last_name\": \"Espanola Espanola\",\n    \"date_of_birth\": \"1980-01-01\",\n    \"issuing_state\": \"ESP\",\n    \"parsed_address\": {\n      \"street_1\": \"Avda de Madrid 34\",\n      \"city\": \"Madrid\",\n      \"postal_code\": \"28013\",\n      \"country\": \"ES\"\n    }\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_data(\n    \"11111111-2222-3333-4444-555555555555\",\n    date_of_birth=\"1980-01-01\",\n    issuing_state=\"ESP\",\n    first_name=\"Carmen\",\n    last_name=\"Espanola Espanola\",\n    marital_status=\"MARRIED\",\n    extra_fields={\"blood_group\": \"O+\"},\n    parsed_address={\n        \"city\": \"Madrid\",\n        \"street_1\": \"Avda de Madrid 34\",\n        \"postal_code\": \"28013\",\n        \"country\": \"ES\",\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateData(\"11111111-2222-3333-4444-555555555555\", {\n  date_of_birth: \"1980-01-01\",\n  issuing_state: \"ESP\",\n  first_name: \"Carmen\",\n  last_name: \"Espanola Espanola\",\n  marital_status: \"MARRIED\",\n  extra_fields: { blood_group: \"O+\" },\n  parsed_address: {\n    city: \"Madrid\",\n    street_1: \"Avda de Madrid 34\",\n    postal_code: \"28013\",\n    country: \"ES\",\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateData(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateDataParams{\n\tDateOfBirth:   didit.String(\"1980-01-01\"),\n\tIssuingState:  didit.String(\"ESP\"),\n\tFirstName:     didit.String(\"Carmen\"),\n\tLastName:      didit.String(\"Espanola Espanola\"),\n\tMaritalStatus: didit.Some(didit.SessionsUpdateDataParamsMaritalStatus(\"MARRIED\")),\n\tExtraFields:   didit.Some(map[string]any{\"blood_group\": \"O+\"}),\n\tParsedAddress: didit.Some(didit.SessionsUpdateDataParamsParsedAddress{\n\t\tCity:       didit.String(\"Madrid\"),\n\t\tStreet1:    didit.String(\"Avda de Madrid 34\"),\n\t\tPostalCode: didit.String(\"28013\"),\n\t\tCountry:    didit.String(\"ES\"),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.LocalDate;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUpdateDataParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateData(\"11111111-2222-3333-4444-555555555555\", SessionsUpdateDataParams.builder()\n        .dateOfBirth(LocalDate.parse(\"1980-01-01\"))\n        .issuingState(\"ESP\")\n        .firstName(\"Carmen\")\n        .lastName(\"Espanola Espanola\")\n        .maritalStatus(SessionsUpdateDataParams.MaritalStatus.of(\"MARRIED\"))\n        .extraFields(Map.of(\"blood_group\", \"O+\"))\n        .parsedAddress(SessionsUpdateDataParams.ParsedAddress.builder()\n                .city(\"Madrid\")\n                .street1(\"Avda de Madrid 34\")\n                .postalCode(\"28013\")\n                .country(\"ES\")\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateData('11111111-2222-3333-4444-555555555555', [\n    'date_of_birth' => '1980-01-01',\n    'issuing_state' => 'ESP',\n    'first_name' => 'Carmen',\n    'last_name' => 'Espanola Espanola',\n    'marital_status' => 'MARRIED',\n    'extra_fields' => ['blood_group' => 'O+'],\n    'parsed_address' => [\n        'city' => 'Madrid',\n        'street_1' => 'Avda de Madrid 34',\n        'postal_code' => '28013',\n        'country' => 'ES',\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_data(\n  \"11111111-2222-3333-4444-555555555555\",\n  date_of_birth: \"1980-01-01\",\n  issuing_state: \"ESP\",\n  first_name: \"Carmen\",\n  last_name: \"Espanola Espanola\",\n  marital_status: \"MARRIED\",\n  extra_fields: { blood_group: \"O+\" },\n  parsed_address: {\n    city: \"Madrid\",\n    street_1: \"Avda de Madrid 34\",\n    postal_code: \"28013\",\n    country: \"ES\",\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateDataAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdateDataParams\n{\n    DateOfBirth = \"1980-01-01\",\n    IssuingState = \"ESP\",\n    FirstName = \"Carmen\",\n    LastName = \"Espanola Espanola\",\n    MaritalStatus = new SessionsUpdateDataParamsMaritalStatus(\"MARRIED\"),\n    ExtraFields = new Dictionary<string, object> { [\"blood_group\"] = \"O+\" },\n    ParsedAddress = new SessionsUpdateDataParamsParsedAddress\n    {\n        City = \"Madrid\",\n        Street1 = \"Avda de Madrid 34\",\n        PostalCode = \"28013\",\n        Country = \"ES\",\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/features/{nodeId}/update-status/": {
      "patch": {
        "summary": "تحديث حالة ميزة فردية (خطوة)",
        "description": "تعيين حالة ميزة تحقق (خطوة) فردية داخل جلسة. استهدف الميزة عبر `nodeId` الخاص بها في مخطط سير العمل. في مسارات سير العمل غير المعتمدة على المخطط، والتي لا تحتوي خطواتها على عقدة، استخدم `default` ومرّر أيضاً `feature_type` لتحديد الخطوة المقصودة.\n\nيعمل مع جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB) على حد سواء ومع كل نوع خطوة: ID/OCR، وكشف الحيوية، ومطابقة الوجه، وNFC، وفحص AML، وإثبات العنوان، ورقم الهاتف، والبريد الإلكتروني، والتحقق من قواعد البيانات، والاستبيانات، وفحوصات سجل KYB / المستندات / الأشخاص الرئيسيين. هذا الـ endpoint **غير** متاح لجلسات API المستقلة (`session_type = API`).\n\nيجب أن تكون `new_status` إحدى القيم `Approved`، أو `Declined`، أو `In Review`، ويجب أن تختلف عن الحالة الحالية للميزة.\n\n**متى يُطبّق التجاوز.** بدون `defer_until_flow_finishes` (أو عند ضبطه على `false`)، يُطبّق التجاوز فوراً كما كان دائماً؛ وعندما يكون الشخص لا يزال في مسار التحقق، يتم تسجيله كـ `forced`. مع `defer_until_flow_finishes: true` بينما لا يزال الشخص في مسار التحقق (تكون الجلسة `Not Started`، أو `In Progress`، أو `Resubmitted` ولم تنتهِ بعد)، يُخزّن التجاوز كـ `pending_until_flow_finishes` ويُطبّق عند انتهاء المسار، بعد أن يصل المسار إلى قراره الخاص. أما في الجلسة التي انتهى مسارها بالفعل، فيُطبّق فوراً في كلتا الحالتين. ويتم إلغاء التجاوز المنتظر بدلاً من ذلك عندما يعيد الشخص تنفيذ خطوته قبل الإنهاء، أو عندما يحل محله تجاوز أحدث لنفس الفحص، أو عندما تغادر الجلسة مسار التحقق دون اكتماله (متروكة، أو منتهية الصلاحية، أو تم اتخاذ قرار في منتصف المسار)، أو عندما تقوم بإلغائه عبر `POST /v3/session/{sessionId}/features/overrides/{overrideId}/cancel/`. يمكنك إدراج تجاوزات الجلسة باستخدام `GET /v3/session/{sessionId}/features/overrides/`.\n\n**التأثير على الجلسة.** الجلسة التي لديها قرار بالفعل تحتفظ به: يتغير الفحص فقط. عندما لا يكون لدى الجلسة قرار بعد ويكون سير العمل الخاص بها في انتظار هذه الخطوة تحديداً، فإن تطبيق التجاوز يكمل الخطوة: ينتقل سير العمل قدماً، وتعمل الخطوات اللاحقة، ويمكن لعقدة الحالة تعيين قرار الجلسة وإطلاق `status.updated`.\n\n**أحداث Webhook والنشاط.** يتم إطلاق webhook للحدث `data.updated` عند تطبيق التجاوز (فوراً، أو عند انتهاء المسار)، ولا يتم إطلاقه أبداً أثناء الانتظار أو عند الإلغاء. يُسجّل كل تجاوز في نشاط الجلسة كـ `FEATURE_OVERRIDE_PENDING`، أو `FEATURE_OVERRIDE_APPLIED`، أو `FEATURE_OVERRIDE_CANCELLED`، مع تحديد من قام به؛ ويتضمن إدخال الطلب التعليق الخاص بك `comment`.\n\nقم بالمصادقة باستخدام مفتاح API الخاص بك (`x-api-key`) أو رأس تفويض مستخدم يحمل الامتياز `write:sessions`؛ يتطلب مفتاح API محدد النطاق صلاحية وصول للكتابة إلى القرارات.",
        "operationId": "patch_v3_session_update_feature_status",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_feature_status",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق. يقبل معرّفات جلسات المستخدمين (KYC) والشركات (KYB) — يطابق الخادم المعرّف عبر كلا نوعي الجلسات.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "in": "path",
            "name": "nodeId",
            "required": true,
            "description": "معرّف عقدة مخطط سير العمل للميزة المراد تحديثها (على سبيل المثال `feature_ocr_1`). استخدم القيمة الحرفية `default` لمهام سير العمل غير المعتمدة على المخطط (ذات الخطوة الواحدة) حيث لا تحتوي الميزة على معرّف عقدة.",
            "schema": {
              "type": "string",
              "example": "feature_ocr_1"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "new_status"
                ],
                "properties": {
                  "new_status": {
                    "type": "string",
                    "description": "الحالة المستهدفة لهذه الميزة. يجب أن تختلف عن القيمة الحالية.",
                    "enum": [
                      "Approved",
                      "Declined",
                      "In Review"
                    ],
                    "example": "Approved"
                  },
                  "comment": {
                    "type": "string",
                    "description": "ملاحظة اختيارية بنص حر تُسجَّل في مسار مراجعة الجلسة لهذا التغيير في الميزة.",
                    "example": "Document manually verified by compliance."
                  },
                  "feature_type": {
                    "type": "string",
                    "enum": [
                      "ID_VERIFICATION",
                      "OCR",
                      "OCR_BACK",
                      "NFC",
                      "LIVENESS",
                      "FACE",
                      "AGE_ESTIMATION",
                      "AGE_VERIFICATION",
                      "FACE_SEARCH",
                      "FACE_MATCH",
                      "IP_ANALYSIS",
                      "AML",
                      "PHONE",
                      "PHONE_VERIFICATION",
                      "EMAIL",
                      "EMAIL_VERIFICATION",
                      "POA",
                      "PROOF_OF_ADDRESS",
                      "DATABASE_VALIDATION",
                      "DATA_VALIDATION",
                      "QUESTIONNAIRE",
                      "DOCUMENT_AI",
                      "KYB_REGISTRY",
                      "KYB_DOCUMENTS",
                      "KYB_KEY_PEOPLE",
                      "BANK_VERIFICATION",
                      "GEOLOCATION"
                    ],
                    "description": "أي نوع من الخطوات سيتم استهدافه. مطلوب في مسارات سير العمل غير القائمة على المخطط (`nodeId` = `default`)، حيث لا تشترك أي خطوة في عقدة؛ واختياري في الحالات الأخرى. تُرجع القيمة غير المعروفة `400`.",
                    "example": "LIVENESS"
                  },
                  "defer_until_flow_finishes": {
                    "type": "boolean",
                    "default": false,
                    "description": "بينما لا يزال الشخص داخل سير العمل، قم بتخزين التجاوز كـ `pending_until_flow_finishes` وتطبيقه عند انتهاء سير العمل، بدلاً من تطبيقه على الفور. إذا أُغفل هذا الحقل أو عُيّن على `false`، فسيتم تطبيق التجاوز على الفور. وفي الجلسة التي انتهى سير عملها بالفعل، يتم تطبيقه على الفور في كلتا الحالتين.",
                    "example": false
                  }
                }
              },
              "examples": {
                "Apply Now": {
                  "summary": "الموافقة على خطوة التحقق من الهوية فوراً",
                  "value": {
                    "new_status": "Approved",
                    "comment": "Document manually verified by compliance."
                  }
                },
                "Wait For The Flow": {
                  "summary": "الموافقة على خطوة كشف الحيوية بمجرد إكمال الشخص لسير العمل",
                  "value": {
                    "new_status": "Approved",
                    "comment": "Liveness retried with a reviewer present.",
                    "defer_until_flow_finishes": true
                  }
                },
                "Non-graph Workflow": {
                  "summary": "استهداف خطوة كشف الحيوية في سير عمل بدون عقد (nodeId = default)",
                  "value": {
                    "new_status": "In Review",
                    "feature_type": "LIVENESS"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تسجيل التجاوز. تشير `new_status` إلى حالة الفحص كما تم تخزينها: الحالة المطلوبة بمجرد تطبيق التجاوز، أو الحالة بدون تغيير أثناء انتظار اكتمال سير العمل. وتوضح `override` أيهما حدث.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "node_id": {
                      "type": "string",
                      "nullable": true,
                      "description": "عقدة سير العمل للخطوة المحدثة، أو `null` لخطوة بدون عقدة (مسار `default` في سير عمل لا يعتمد على المخطط).",
                      "example": "feature_ocr_1"
                    },
                    "feature_type": {
                      "type": "string",
                      "description": "اسم نموذج الميزة المحدّثة (مثل `KYC` و `Face` و `FaceMatch` و `AML` و `POA`).",
                      "example": "KYC"
                    },
                    "new_status": {
                      "type": "string",
                      "description": "حالة الفحص المخزنة: الحالة المطلوبة بمجرد تطبيق التجاوز، أو الحالة غير المعدلة بينما ينتظر التجاوز انتهاء سير العمل.",
                      "example": "Approved"
                    },
                    "override": {
                      "$ref": "#/components/schemas/FeatureStatusOverride"
                    }
                  },
                  "required": [
                    "session_id",
                    "node_id",
                    "feature_type",
                    "new_status",
                    "override"
                  ]
                },
                "examples": {
                  "Applied": {
                    "summary": "تم تطبيق التجاوز على الفور",
                    "value": {
                      "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                      "node_id": "feature_ocr_1",
                      "feature_type": "KYC",
                      "new_status": "Approved",
                      "override": {
                        "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                        "node_id": "feature_ocr_1",
                        "feature_type": "",
                        "feature_model": "KYC",
                        "previous_status": "In Review",
                        "new_status": "Approved",
                        "state": "applied",
                        "forced": false,
                        "reason": "Document manually verified by compliance.",
                        "requested_by": {
                          "email": "reviewer@example.com",
                          "name": "Alex Reviewer",
                          "type": "CONSOLE_USER"
                        },
                        "requested_at": "2026-10-13T09:15:00Z",
                        "applied_at": "2026-10-13T09:15:00Z",
                        "cancelled_at": null,
                        "cancel_reason": null
                      }
                    }
                  },
                  "Waiting For The Flow": {
                    "summary": "defer_until_flow_finishes أثناء وجود الشخص في سير العمل",
                    "value": {
                      "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                      "node_id": "feature_liveness_1",
                      "feature_type": "Face",
                      "new_status": "Declined",
                      "override": {
                        "id": "9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3",
                        "node_id": "feature_liveness_1",
                        "feature_type": "",
                        "feature_model": "Face",
                        "previous_status": "Declined",
                        "new_status": "Approved",
                        "state": "pending_until_flow_finishes",
                        "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": null,
                        "cancel_reason": null
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. يتم إرجاعه عندما تكون `new_status` غير صالحة أو لم تتغير، أو عندما يكون `feature_type` غير معروف، أو عندما تكون الجلسة جلسة API مستقلة.",
            "content": {
              "application/json": {
                "examples": {
                  "Same Status": {
                    "summary": "حقل new_status يطابق الحالة الحالية",
                    "value": {
                      "new_status": [
                        "The new status is the same as the current status."
                      ]
                    }
                  },
                  "API Session": {
                    "summary": "لا يمكن تغيير حالة الميزة في جلسات API المستقلة",
                    "value": [
                      "Cannot change feature status for API sessions."
                    ]
                  },
                  "Unknown feature_type": {
                    "summary": "feature_type ليس نوع خطوة معروفاً",
                    "value": {
                      "feature_type": [
                        "Unknown feature_type 'SELFIE'."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API Key": {
                    "summary": "مفتاح API محدد النطاق تجاوز تاريخ انتهاء صلاحيته",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة أو أذونات غير كافية.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Credentials": {
                    "summary": "x-api-key مفقود أو غير صالح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Missing Privilege": {
                    "summary": "يفتقر مفتاح API إلى 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": "لم يتم العثور على الجلسة، أو ليس لديها ميزة بالمعرّف `nodeId` المحدد.",
            "content": {
              "application/json": {
                "examples": {
                  "Session Not Found": {
                    "summary": "session_id غير معروف",
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "Feature Not Found": {
                    "summary": "لا توجد ميزة لـ node_id هذا",
                    "value": {
                      "detail": "No feature found with node_id 'feature_ocr_1' in this session."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/features/feature_ocr_1/update-status/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"new_status\": \"Approved\",\n    \"comment\": \"Document manually verified by compliance.\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_feature_status(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"feature_ocr_1\",\n    new_status=\"Approved\",\n    comment=\"Document manually verified by compliance.\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateFeatureStatus(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_ocr_1\",\n  {\n    new_status: \"Approved\",\n    comment: \"Document manually verified by compliance.\",\n  },\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateFeatureStatus(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_ocr_1\", didit.SessionsUpdateFeatureStatusParams{\n\tNewStatus: \"Approved\",\n\tComment:   didit.String(\"Document manually verified by compliance.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateFeatureStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateFeatureStatus(\"11111111-2222-3333-4444-555555555555\", \"feature_ocr_1\", SessionsUpdateFeatureStatusParams.builder()\n        .newStatus(SessionsUpdateFeatureStatusParams.NewStatus.of(\"Approved\"))\n        .comment(\"Document manually verified by compliance.\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateFeatureStatus('11111111-2222-3333-4444-555555555555', 'feature_ocr_1', [\n    'new_status' => 'Approved',\n    'comment' => 'Document manually verified by compliance.',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_feature_status(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_ocr_1\",\n  new_status: \"Approved\",\n  comment: \"Document manually verified by compliance.\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateFeatureStatusAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_ocr_1\", new SessionsUpdateFeatureStatusParams\n{\n    NewStatus = \"Approved\",\n    Comment = \"Document manually verified by compliance.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/update-aml-hit-status/": {
      "patch": {
        "summary": "تحديث حالة مراجعة نتيجة مطابقة AML",
        "description": "تعيين حالة مراجعة **نتيجة مطابقة واحدة في AML** (مطابقة محتملة في العقوبات / شخص معرض سياسياً / قائمة المراقبة / الأخبار السلبية) ناتجة عن فحص AML، دون تغيير قرار الجلسة الإجمالي. حدد نتيجة المطابقة بواسطة `hit_id` الخاص بها (معرّف `id` لإدخال في مصفوفة `hits` لفحص AML — راجع قرار الجلسة). يظل معرّف نتيجة المطابقة بصيغته السابقة مقبولاً؛ وتُسمي الاستجابة دائماً نتيجة المطابقة بمعرّفها `id` الحالي.\n\nتكون قيمة `review_status` إحدى القيم التالية: `Unreviewed` أو `Confirmed Match` أو `False Positive` أو `Inconclusive`. يتم الاحتفاظ بقرارات المراجِع عبر تحديثات المراقبة المستمرة، وبالتالي فإن نتيجة المطابقة التي تُحددها كـ `False Positive` تظل كذلك عند إعادة الفحص بواسطة المزود.\n\nيُطلق الاستدعاء الناجح حدث webhook من نوع `data.updated` ويُلحق إدخال نشاط (مع نسبة الإجراء إلى منفذه) بمسار مراجعة الجلسة. بالنسبة لسير العمل القائم على المخطط مع عمليات فحص AML متعددة، مرّر `node_id` لاستهداف فحص محدد.\n\nقم بالمصادقة باستخدام مفتاح API الخاص بك (`x-api-key`) أو رأس تفويض المستخدم — ويجب أن يحمل أي منهما صلاحية `write:sessions`.",
        "operationId": "patch_v3_session_update_aml_hit_status",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_aml_hit_status",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق. يقبل معرّفات جلسات المستخدمين (KYC) والشركات (KYB) — يطابق الخادم المعرّف عبر كلا نوعي الجلسات.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "in": "query",
            "name": "node_id",
            "required": false,
            "description": "معرّف عقدة مخطط سير العمل. مطلوب فقط عندما تحتوي الجلسة على فحوصات AML متعددة (واحد لكل عقدة)؛ احذفه للجلسات ذات فحص AML الفردي.",
            "schema": {
              "type": "string",
              "example": "feature_aml_1"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "hit_id",
                  "review_status"
                ],
                "properties": {
                  "hit_id": {
                    "type": "string",
                    "description": "معرّف `id` الخاص بالمطابقة في مصفوفة `hits` لفحص AML‏ (`hit_...`). لا يزال معرّف المطابقة المُرجع بالصيغة السابقة مقبولاً.",
                    "example": "hit_7c1e9a40b2d35f86e0a4c912"
                  },
                  "review_status": {
                    "type": "string",
                    "description": "حالة المراجعة الجديدة لنتيجة التطابق.",
                    "enum": [
                      "Unreviewed",
                      "Confirmed Match",
                      "False Positive",
                      "Inconclusive"
                    ],
                    "example": "False Positive"
                  },
                  "node_id": {
                    "type": "string",
                    "description": "معرّف اختياري لعقدة المخطط. استخدمه (هنا أو كمعامل استعلام) عندما تتضمن الجلسة عمليات فحص AML متعددة.",
                    "example": "feature_aml_1"
                  }
                }
              },
              "example": {
                "hit_id": "hit_7c1e9a40b2d35f86e0a4c912",
                "review_status": "False Positive"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث حالة مراجعة التطابق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message",
                    "hit_id",
                    "review_status"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "دائماً `Hit status updated successfully`."
                    },
                    "hit_id": {
                      "type": "string",
                      "description": "معرّف `id` الخاص بالمطابقة المحدّثة، كما يرجعه قرار الجلسة، وكذلك عندما يحدد الطلب المطابقة بمعرّف بالصيغة السابقة."
                    },
                    "review_status": {
                      "type": "string",
                      "enum": [
                        "Unreviewed",
                        "Confirmed Match",
                        "False Positive",
                        "Inconclusive"
                      ],
                      "description": "حالة المراجعة المخزنة حالياً في النتيجة المطابقة."
                    }
                  }
                },
                "example": {
                  "message": "Hit status updated successfully",
                  "hit_id": "hit_7c1e9a40b2d35f86e0a4c912",
                  "review_status": "False Positive"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — حقل `hit_id` فارغ أو حقل `review_status` ليس إحدى القيم المسموح بها.",
            "content": {
              "application/json": {
                "example": {
                  "review_status": [
                    "\"Maybe\" is not a valid choice."
                  ]
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة أو أذونات غير كافية. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Credentials": {
                    "summary": "x-api-key مفقود أو غير صالح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Missing Privilege": {
                    "summary": "يفتقر مفتاح API إلى write:sessions",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الجلسة، أو ليس لدى الجلسة فحص AML (اختيارياً لـ `node_id` المحدد)، أو لا توجد نتيجة تطابق `hit_id`.",
            "content": {
              "application/json": {
                "examples": {
                  "No AML Check": {
                    "summary": "لا تحتوي الجلسة على فحص AML",
                    "value": {
                      "detail": "The session does not have an AML check."
                    }
                  },
                  "Hit Not Found": {
                    "summary": "hit_id غير معروف",
                    "value": {
                      "detail": "Hit with ID 'hit_9d2e7f41c0a8b3e65d1f0c47' not found in the AML check."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-aml-hit-status/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"hit_id\": \"abc123\",\n    \"review_status\": \"False Positive\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_aml_hit_status(\n    \"11111111-2222-3333-4444-555555555555\",\n    hit_id=\"hit_7c1e9a40b2d35f86e0a4c912\",\n    review_status=\"False Positive\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateAmlHitStatus(\"11111111-2222-3333-4444-555555555555\", {\n  hit_id: \"hit_7c1e9a40b2d35f86e0a4c912\",\n  review_status: \"False Positive\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateAMLHitStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateAMLHitStatusParams{\n\tHitID:        \"hit_7c1e9a40b2d35f86e0a4c912\",\n\tReviewStatus: \"False Positive\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateAmlHitStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateAmlHitStatus(\"11111111-2222-3333-4444-555555555555\", SessionsUpdateAmlHitStatusParams.builder()\n        .hitId(\"hit_7c1e9a40b2d35f86e0a4c912\")\n        .reviewStatus(SessionsUpdateAmlHitStatusParams.ReviewStatus.of(\"False Positive\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateAmlHitStatus('11111111-2222-3333-4444-555555555555', [\n    'hit_id' => 'hit_7c1e9a40b2d35f86e0a4c912',\n    'review_status' => 'False Positive',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_aml_hit_status(\n  \"11111111-2222-3333-4444-555555555555\",\n  hit_id: \"hit_7c1e9a40b2d35f86e0a4c912\",\n  review_status: \"False Positive\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateAmlHitStatusAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdateAmlHitStatusParams\n{\n    HitId = \"hit_7c1e9a40b2d35f86e0a4c912\",\n    ReviewStatus = \"False Positive\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/bulk-update-aml-hit-status/": {
      "patch": {
        "summary": "تحديث مجمّع لحالات مراجعة نتائج فحص AML",
        "description": "تحديث حالة المراجعة لـ **نتائج فحص AML متعددة** في استدعاء واحد. مرّر `hit_updates`، وهي قائمة من أزواج `{ hit_id, review_status }`. تكون `review_status` إحدى القيم التالية: `Unreviewed`، أو `Confirmed Match`، أو `False Positive`، أو `Inconclusive`.\n\nالتحديث إما أن يُطبّق بالكامل أو لا يُطبّق مطلقاً: إذا تعذر العثور على أي `hit_id` في فحص AML، يُرجع الطلب `404` ولا يتم تغيير أي نتيجة. يُطلق الاستدعاء الناجح حدث webhook وحيداً من نوع `data.updated` ويسجل إدخال نشاط واحداً يغطي جميع التغييرات. بالنسبة لمخططات سير العمل التي تتضمن فحوصات AML متعددة، مرّر `node_id` لاستهداف فحص محدد.\n\nقم بالمصادقة باستخدام مفتاح API الخاص بك (`x-api-key`) أو رأس تفويض المستخدم — ويجب أن يحمل أي منهما صلاحية `write:sessions`.",
        "operationId": "patch_v3_session_bulk_update_aml_hit_status",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "bulk_update_aml_hit_status",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق. يقبل معرّفات جلسات المستخدمين (KYC) والشركات (KYB) — يطابق الخادم المعرّف عبر كلا نوعي الجلسات.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "in": "query",
            "name": "node_id",
            "required": false,
            "description": "معرّف عقدة مخطط سير العمل. مطلوب فقط عندما تحتوي الجلسة على فحوصات AML متعددة (واحد لكل عقدة)؛ احذفه للجلسات ذات فحص AML الفردي.",
            "schema": {
              "type": "string",
              "example": "feature_aml_1"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "hit_updates"
                ],
                "properties": {
                  "hit_updates": {
                    "type": "array",
                    "description": "قائمة غير فارغة لتحديثات التطابقات.",
                    "items": {
                      "type": "object",
                      "required": [
                        "hit_id",
                        "review_status"
                      ],
                      "properties": {
                        "hit_id": {
                          "type": "string",
                          "example": "hit_7c1e9a40b2d35f86e0a4c912",
                          "description": "معرّف `id` الخاص بالمطابقة في مصفوفة `hits` لفحص AML‏ (`hit_...`). لا يزال معرّف المطابقة المُرجع بالصيغة السابقة مقبولاً."
                        },
                        "review_status": {
                          "type": "string",
                          "enum": [
                            "Unreviewed",
                            "Confirmed Match",
                            "False Positive",
                            "Inconclusive"
                          ],
                          "example": "Confirmed Match"
                        }
                      }
                    }
                  },
                  "node_id": {
                    "type": "string",
                    "description": "معرّف اختياري لعقدة المخطط. استخدمه (هنا أو كمعامل استعلام) عندما تتضمن الجلسة عمليات فحص AML متعددة.",
                    "example": "feature_aml_1"
                  }
                }
              },
              "example": {
                "hit_updates": [
                  {
                    "hit_id": "hit_7c1e9a40b2d35f86e0a4c912",
                    "review_status": "Confirmed Match"
                  },
                  {
                    "hit_id": "hit_3b8f20d6a91c4e75f0b2d6a8",
                    "review_status": "False Positive"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث جميع التطابقات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message",
                    "updated_hits"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "`Updated {n} hit(s) successfully`، حيث `n` هو عدد الإدخالات في `hit_updates`."
                    },
                    "updated_hits": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "معرّف `id` الخاص بالمطابقة التي يحددها كل إدخال في `hit_updates`، كما يرجعه قرار الجلسة، بترتيب الطلب، بما في ذلك المطابقات التي لم تتغير حالتها."
                    }
                  }
                },
                "example": {
                  "message": "Updated 2 hit(s) successfully",
                  "updated_hits": [
                    "hit_7c1e9a40b2d35f86e0a4c912",
                    "hit_3b8f20d6a91c4e75f0b2d6a8"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — حقل `hit_updates` فارغ، أو هناك إدخال يفتقد `hit_id` / `review_status` أو يحمل قيمة غير صالحة.",
            "content": {
              "application/json": {
                "example": {
                  "hit_updates": [
                    "hit_updates cannot be empty"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة أو أذونات غير كافية. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Credentials": {
                    "summary": "x-api-key مفقود أو غير صالح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Missing Privilege": {
                    "summary": "يفتقر مفتاح API إلى write:sessions",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الجلسة، أو ليس لدى الجلسة فحص AML، أو أن واحداً أو أكثر من معرّفات `hit_id` غير موجود (لا يتم تغيير أي hit في هذه الحالة).",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Hits not found: hit_9d2e7f41c0a8b3e65d1f0c47"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/bulk-update-aml-hit-status/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"hit_updates\": [\n      { \"hit_id\": \"abc123\", \"review_status\": \"Confirmed Match\" },\n      { \"hit_id\": \"def456\", \"review_status\": \"False Positive\" }\n    ]\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.bulk_update_aml_hit_status(\n    \"11111111-2222-3333-4444-555555555555\",\n    hit_updates=[{\n        \"hit_id\": \"hit_7c1e9a40b2d35f86e0a4c912\",\n        \"review_status\": \"Confirmed Match\",\n    }, {\n        \"hit_id\": \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n        \"review_status\": \"False Positive\",\n    }],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.bulkUpdateAmlHitStatus(\"11111111-2222-3333-4444-555555555555\", {\n  hit_updates: [{\n    hit_id: \"hit_7c1e9a40b2d35f86e0a4c912\",\n    review_status: \"Confirmed Match\",\n  }, {\n    hit_id: \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n    review_status: \"False Positive\",\n  }],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.BulkUpdateAMLHitStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsBulkUpdateAMLHitStatusParams{\n\tHitUpdates: []didit.SessionsBulkUpdateAMLHitStatusParamsHitUpdates{{\n\t\tHitID:        \"hit_7c1e9a40b2d35f86e0a4c912\",\n\t\tReviewStatus: \"Confirmed Match\",\n\t}, {\n\t\tHitID:        \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n\t\tReviewStatus: \"False Positive\",\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsBulkUpdateAmlHitStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().bulkUpdateAmlHitStatus(\"11111111-2222-3333-4444-555555555555\", SessionsBulkUpdateAmlHitStatusParams.builder()\n        .hitUpdates(List.of(\n                SessionsBulkUpdateAmlHitStatusParams.HitUpdates.builder()\n                        .hitId(\"hit_7c1e9a40b2d35f86e0a4c912\")\n                        .reviewStatus(SessionsBulkUpdateAmlHitStatusParams.HitUpdates.ReviewStatus.of(\"Confirmed Match\"))\n                        .build(),\n                SessionsBulkUpdateAmlHitStatusParams.HitUpdates.builder()\n                        .hitId(\"hit_3b8f20d6a91c4e75f0b2d6a8\")\n                        .reviewStatus(SessionsBulkUpdateAmlHitStatusParams.HitUpdates.ReviewStatus.of(\"False Positive\"))\n                        .build()))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->bulkUpdateAmlHitStatus('11111111-2222-3333-4444-555555555555', [\n    'hit_updates' => [[\n        'hit_id' => 'hit_7c1e9a40b2d35f86e0a4c912',\n        'review_status' => 'Confirmed Match',\n    ], [\n        'hit_id' => 'hit_3b8f20d6a91c4e75f0b2d6a8',\n        'review_status' => 'False Positive',\n    ]],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.bulk_update_aml_hit_status(\n  \"11111111-2222-3333-4444-555555555555\",\n  hit_updates: [{\n    hit_id: \"hit_7c1e9a40b2d35f86e0a4c912\",\n    review_status: \"Confirmed Match\",\n  }, {\n    hit_id: \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n    review_status: \"False Positive\",\n  }]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.BulkUpdateAmlHitStatusAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsBulkUpdateAmlHitStatusParams\n{\n    HitUpdates = new SessionsBulkUpdateAmlHitStatusParamsHitUpdates[]\n    {\n        new()\n        {\n            HitId = \"hit_7c1e9a40b2d35f86e0a4c912\",\n            ReviewStatus = \"Confirmed Match\",\n        },\n        new()\n        {\n            HitId = \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n            ReviewStatus = \"False Positive\",\n        },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/update-poa-data/": {
      "patch": {
        "summary": "تحديث بيانات إثبات العنوان المستخرجة من مستند إثبات العنوان (POA) في جلسة تحقق",
        "description": "تصحيح الحقول المستخرجة من مستند إثبات العنوان الخاص بالمستخدم — فاتورة خدمات، أو كشف حساب بنكي، أو أي إثبات عنوان آخر — بعد اكتمال التحقق: الجهة المصدرة، والتواريخ، والاسم المطبوع، والعنوان نفسه، والتفاصيل المصرفية. كل حقل في نص الطلب اختياري: تتم كتابة المفاتيح التي ترسلها فقط، ويُترك كل ما عداها دون تغيير (دلالات `PATCH`).\n\nيجب أن تنتمي الجلسة إلى التطبيق الخاص بك وأن تكون بالحالة `Approved`، أو `Declined`، أو `In Review`، أو `Kyc Expired`. ترجع الجلسات في أي حالة أخرى (على سبيل المثال، لا تزال `In Progress`) الرمز `404` مع `\"No Session matches the given query.\"` — وهو ما يختلف عن `\"Not found.\"` التي يتم إرجاعها لمعرّف `sessionId` غير معروف أو محذوف. يجب أن تحتوي الجلسة أيضاً على سجل إثبات عنوان (POA): ترجع الجلسات التي لم يُشغّل سير العمل الخاص بها خطوة إثبات العنوان أبداً الرمز `404` (`\"The session does not have a POA.\"`). بالنسبة لمخططات سير العمل التي تتضمن خطوات متعددة لإثبات العنوان، حدد خطوة معينة باستخدام `node_id` (معامل استعلام أو حقل في نص الطلب)؛ وعند حذفه، يتم تعديل أحدث سجل إثبات عنوان.\n\nيتم دمج `extra_fields` مفتاحاً بمفتاح: تسعة مفاتيح معروفة (`bank_iban`، و`additional_names`، وما إلى ذلك) تُكتب مباشرة في أعمدة مخصصة لإثبات العنوان، ويتم الاحتفاظ بأي مفتاح آخر كحقل إضافي مخصص، بينما تؤدي القيمة `null` / `\"\"` إلى حذف المفتاح. يقبل `poa_parsed_address` المفاتيح السبعة الموثقة فقط، ويعيد حساب `formatted_address` / `poa_formatted_address` بعد كل تعديل. إذا تغير النص الحر `poa_address`، فقد يقوم الخادم أيضاً بإعادة تحديد موقعه الجغرافي وتحديث العنوان المنظم (يتم تخطي ذلك لجلسات البيئة التجريبية).\n\nعلى عكس نسخة KYC من هذا الـ endpoint، فإن [webhook](/ar/integration/webhooks) للحدث `data.updated` (المُشغِّل `manual_review`) ينطلق فقط عند **تغير فعلي** لقيمة مخزنة واحدة على الأقل — وتعتبر إعادة إرسال قيم متطابقة عملية خاملة دون أي إجراء. عند تغير القيم، تتم إضافة إدخال نشاط `POA_DATA_UPDATED` يسجل الحقول التي تم تغييرها مع القيم السابقة والجديدة إلى `reviews` الخاصة بالجلسة، وتكون مرئية في [Get Decision](#get-/v3/session/-sessionId-/decision/) والجدول الزمني للأنشطة في لوحة التحكم. **لا** تتم إعادة تقييم حالة الجلسة وقرارها — استخدم [Update Status](#patch-/v3/session/-sessionId-/update-status/) لتغيير النتيجة.\n\nيقبل مفتاح API أو token مستخدم لوحة التحكم؛ وفي كلتا الحالتين، تحتاج بيانات الاعتماد إلى الإذن `write:sessions`. يرجع الفشل في المصادقة أو الأذونات الرمز `403` — لا تستجيب هذه الـ API بالرمز `401` أبداً. لاحظ أن عملية البحث عن الجلسة تتم قبل عمليات التحقق من بيانات الاعتماد، وبالتالي فإن معرّف `sessionId` غير المعروف يرجع الرمز `404` حتى مع وجود بيانات اعتماد مفقودة. يمتلك هذا الـ endpoint حد المعدل المخصص البالغ 10 طلبات في الدقيقة لكل مفتاح API (تُحتسب الطلبات غير الصالحة أيضاً)؛ كما ينطبق أيضاً الحد المشترك للكتابة البالغ 300 طلب في الدقيقة.\n\nيُعد نص JSON الفارغ `{}` عملية بلا تأثير: فهو يرجع الرمز `200` مع عرض سجل إثبات العنوان الحالي دون إطلاق الـ webhook (يبقى `has_changes` بقيمة false).",
        "operationId": "patch_v3_session_update_poa_data",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_poa_data",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من المستخدمين (KYC) التي تقوم بتصحيح سجل إثبات العنوان المرفق بها.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة مخطط سير العمل المراد تعديل سجل إثبات العنوان (POA) الخاص بها، لمهام سير العمل ذات المخطط التي تتضمن خطوات متعددة لإثبات العنوان (يُقبل أيضاً كحقل `node_id` في جسم الطلب). عند حذفه، يتم تعديل أحدث سجل إثبات عنوان في الجلسة. إذا لم يكن هناك إثبات عنوان للعقدة المحددة، يُرجع الاستدعاء `404` (`\"The session does not have a POA for node '<node_id>'.\"`).",
            "schema": {
              "type": "string",
              "example": "feature_poa"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "جميع الحقول اختيارية — أرسل فقط ما ترغب في تغييره.",
                "properties": {
                  "issuing_state": {
                    "type": "string",
                    "nullable": true,
                    "description": "الدولة التي أصدرت مستند POA، بصيغة ISO 3166-1 alpha-3. غير حساسة لحالة الأحرف (تُحوَّل إلى أحرف كبيرة)؛ الرموز غير الصالحة تُرجع `400`.",
                    "example": "ESP"
                  },
                  "document_type": {
                    "type": "string",
                    "enum": [
                      "UTILITY_BILL",
                      "BANK_STATEMENT",
                      "GOVERNMENT_ISSUED_DOCUMENT",
                      "OTHER_POA_DOCUMENT",
                      "UNKNOWN"
                    ],
                    "description": "فئة مستند إثبات العنوان (POA). القيم بأحرف كبيرة — المتغيرات بأحرف صغيرة مثل `utility_bill` تُرجع `400`.",
                    "example": "UTILITY_BILL"
                  },
                  "document_language": {
                    "type": "string",
                    "maxLength": 50,
                    "nullable": true,
                    "description": "لغة المستند، وتكون عادةً رمز ISO 639-1 (مثل `es`). نص حر — لا يتم التحقق من صحته كرمز لغة.",
                    "example": "es"
                  },
                  "issuer": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "المؤسسة التي أصدرت المستند (شركة مرافق، بنك، جهة حكومية).",
                    "example": "Energy Provider S.A."
                  },
                  "issue_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true,
                    "description": "تاريخ إصدار مستند إثبات العنوان بتنسيق `YYYY-MM-DD`. أي تنسيق آخر يُرجع `400`.",
                    "example": "2026-04-12"
                  },
                  "poa_address": {
                    "type": "string",
                    "nullable": true,
                    "description": "العنوان كنص حر كما هو مطبوع على المستند. عندما تتغير هذه القيمة (للجلسات خارج البيئة التجريبية فقط) ويكون العنوان المنظم لا يزال مفقوداً أو غير مكتمل، يقوم الخادم بإعادة ترميزه جغرافياً في الخلفية ضمن الطلب نفسه وقد يستبدل `poa_parsed_address` / `poa_formatted_address` بنتيجة أداة الترميز الجغرافي. تتطلب إعادة الترميز الجغرافي أيضاً وجود `issuing_state` في سجل إثبات العنوان (POA).",
                    "example": "Avda de Madrid 34, 28013 Madrid"
                  },
                  "name_on_document": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "اسم المستلم كما هو مطبوع على المستند.",
                    "example": "Carmen Espanola"
                  },
                  "extra_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "nullable": true,
                    "description": "بيانات إضافية خاصة بالمستند، مدمجة مفتاحاً بمفتاح. ترتبط تسعة مفاتيح بأعمدة POA مخصصة: `bank_account_number` و`bank_iban` و`bank_sort_code` و`bank_routing_number` و`bank_swift_bic` و`bank_branch_name` و`bank_branch_address` و`document_phone_number` و`additional_names` (يجب أن تكون قائمة من السلاسل النصية أو `null`، وإلا فسيكون الرد `400`). يُخزَّن أي مفتاح آخر كحقل إضافي مخصص. دلالات كل مفتاح: تُعيّن القيمةُ المفتاحَ؛ وتحذفه القيمة `null` أو `\"\"`. يجب أن يكون كائن JSON، وإلا فسيكون الرد `400`."
                  },
                  "poa_parsed_address": {
                    "type": "object",
                    "nullable": true,
                    "description": "عنوان مهيكل. يتم قبول هذه المفاتيح المتداخلة فقط: `address_type`، `city`، `region`، `street_1`، `street_2`، `postal_code`، `country` — أي مفتاح آخر يؤدي إلى إرجاع `400`. دلالات كل مفتاح: القيمة تحدد المفتاح، وتؤدي القيمة `null` إلى إزالته. يُعاد حساب `formatted_address` (و`poa_formatted_address` على المستوى الأعلى) على جانب الخادم عن طريق دمج `street_1`، و`street_2`، و`city`، و`region`، و`postal_code`، و`country` — لا يمكنك تعيينه مباشرة.",
                    "properties": {
                      "address_type": {
                        "type": "string",
                        "nullable": true,
                        "description": "تصنيف العنوان بصيغة حرة (مثل `home`)."
                      },
                      "city": {
                        "type": "string",
                        "nullable": true,
                        "example": "Madrid"
                      },
                      "region": {
                        "type": "string",
                        "nullable": true,
                        "description": "الولاية / المقاطعة / المنطقة ذات الحكم الذاتي."
                      },
                      "street_1": {
                        "type": "string",
                        "nullable": true,
                        "example": "Avda de Madrid 34"
                      },
                      "street_2": {
                        "type": "string",
                        "nullable": true
                      },
                      "postal_code": {
                        "type": "string",
                        "nullable": true,
                        "example": "28013"
                      },
                      "country": {
                        "type": "string",
                        "nullable": true,
                        "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2. يتم توحيد الإدخال بالأحرف الصغيرة إلى أحرف كبيرة؛ وتُرفض رموز alpha-3 مع الرمز `400`.",
                        "example": "ES"
                      }
                    }
                  }
                }
              },
              "examples": {
                "Correct issuer and address": {
                  "summary": "تصحيح تصنيف المستند وجهة إصداره والعنوان المهيكل",
                  "value": {
                    "issuing_state": "ESP",
                    "document_type": "BANK_STATEMENT",
                    "issuer": "Banco Example S.A.",
                    "issue_date": "2026-05-02",
                    "name_on_document": "Carmen Espanola",
                    "poa_address": "Avda de Madrid 34, 28013 Madrid",
                    "extra_fields": {
                      "bank_iban": "ES9121000418450200051332",
                      "additional_names": [
                        "Carmen E. Espanola"
                      ]
                    },
                    "poa_parsed_address": {
                      "street_1": "Avda de Madrid 34",
                      "city": "Madrid",
                      "postal_code": "28013",
                      "country": "ES"
                    }
                  }
                },
                "Remove a banking detail": {
                  "summary": "حذف مفتاح حقل إضافي واحد مع الاحتفاظ بالباقي",
                  "value": {
                    "extra_fields": {
                      "bank_iban": null
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث بيانات إثبات العنوان (POA). يُرجع **سجل POA الحالي الكامل** (كل حقل قابل للتحديث بقيمته المخزنة، بالإضافة إلى خريطة `extra_fields` الكاملة، و `poa_parsed_address`، و `poa_formatted_address`) — وليس فقط الحقول التي أرسلتها. لا يتم إطلاق webhook الخاص بـ `data.updated` إلا عندما تتغير قيمة واحدة على الأقل بالفعل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "issuing_state": {
                      "type": "string",
                      "nullable": true,
                      "description": "الدولة التي أصدرت مستند POA، بصيغة ISO 3166-1 alpha-3. غير حساسة لحالة الأحرف (تُحوَّل إلى أحرف كبيرة)؛ الرموز غير الصالحة تُرجع `400`.",
                      "example": "ESP"
                    },
                    "document_type": {
                      "type": "string",
                      "enum": [
                        "UTILITY_BILL",
                        "BANK_STATEMENT",
                        "GOVERNMENT_ISSUED_DOCUMENT",
                        "OTHER_POA_DOCUMENT",
                        "UNKNOWN"
                      ],
                      "description": "فئة مستند إثبات العنوان (POA). القيم بأحرف كبيرة — المتغيرات بأحرف صغيرة مثل `utility_bill` تُرجع `400`.",
                      "example": "UTILITY_BILL"
                    },
                    "document_language": {
                      "type": "string",
                      "maxLength": 50,
                      "nullable": true,
                      "description": "لغة المستند، وتكون عادةً رمز ISO 639-1 (مثل `es`). نص حر — لا يتم التحقق من صحته كرمز لغة.",
                      "example": "es"
                    },
                    "issuer": {
                      "type": "string",
                      "maxLength": 255,
                      "nullable": true,
                      "description": "المؤسسة التي أصدرت المستند (شركة مرافق، بنك، جهة حكومية).",
                      "example": "Energy Provider S.A."
                    },
                    "issue_date": {
                      "type": "string",
                      "format": "date",
                      "nullable": true,
                      "description": "تاريخ إصدار مستند إثبات العنوان بتنسيق `YYYY-MM-DD`. أي تنسيق آخر يُرجع `400`.",
                      "example": "2026-04-12"
                    },
                    "poa_address": {
                      "type": "string",
                      "nullable": true,
                      "description": "العنوان كنص حر كما هو مطبوع على المستند. عندما تتغير هذه القيمة (للجلسات خارج البيئة التجريبية فقط) ويكون العنوان المنظم لا يزال مفقوداً أو غير مكتمل، يقوم الخادم بإعادة ترميزه جغرافياً في الخلفية ضمن الطلب نفسه وقد يستبدل `poa_parsed_address` / `poa_formatted_address` بنتيجة أداة الترميز الجغرافي.",
                      "example": "Avda de Madrid 34, 28013 Madrid"
                    },
                    "name_on_document": {
                      "type": "string",
                      "maxLength": 255,
                      "nullable": true,
                      "description": "اسم المستلم كما هو مطبوع على المستند.",
                      "example": "Carmen Espanola"
                    },
                    "extra_fields": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "موجودة دائماً في الاستجابة: المفاتيح التسعة المعروفة (مع `null` للمفاتيح غير المحددة، وتكون القيمة الافتراضية لـ `additional_names` هي `[]`) بالإضافة إلى أي مفاتيح مخصصة تم تخزينها مسبقاً."
                    },
                    "poa_parsed_address": {
                      "type": "object",
                      "nullable": true,
                      "description": "العنوان المنظم الحالي، أو `null` في حال عدم وجود أي عنوان. يتضمن `formatted_address` المعاد حسابه إلى جانب المفاتيح السبعة القابلة للتعديل. يتم إرجاعه كما هو مخزن — بعد الترميز الجغرافي من جانب الخادم، يمكن أن يحتوي على مفاتيح مسك الدفاتر (مثل `raw_results`) إلى جانب المفاتيح القابلة للتعديل.",
                      "properties": {
                        "address_type": {
                          "type": "string",
                          "nullable": true,
                          "description": "تصنيف العنوان بصيغة حرة (مثل `home`)."
                        },
                        "city": {
                          "type": "string",
                          "nullable": true,
                          "example": "Madrid"
                        },
                        "region": {
                          "type": "string",
                          "nullable": true,
                          "description": "الولاية / المقاطعة / المنطقة ذات الحكم الذاتي."
                        },
                        "street_1": {
                          "type": "string",
                          "nullable": true,
                          "example": "Avda de Madrid 34"
                        },
                        "street_2": {
                          "type": "string",
                          "nullable": true
                        },
                        "postal_code": {
                          "type": "string",
                          "nullable": true,
                          "example": "28013"
                        },
                        "country": {
                          "type": "string",
                          "nullable": true,
                          "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2. يتم توحيد الإدخال بالأحرف الصغيرة إلى أحرف كبيرة؛ وتُرفض رموز alpha-3 مع الرمز `400`.",
                          "example": "ES"
                        },
                        "formatted_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "صيغة مجمّعة ومقروءة بشرياً للعنوان المنظم. يُعاد احتسابها على جانب الخادم بعد كل تعديل على `poa_parsed_address`.",
                          "example": "Avda de Madrid 34, Madrid, 28013, ES"
                        }
                      }
                    },
                    "poa_formatted_address": {
                      "type": "string",
                      "nullable": true,
                      "description": "نسخة من المستوى الأعلى من `formatted_address` المعاد حسابه، ويتم الحفاظ على مزامنتها عند تغيير العنوان المنظم.",
                      "example": "Avda de Madrid 34, Madrid, 28013, ES"
                    }
                  }
                },
                "examples": {
                  "Updated POA": {
                    "summary": "سجل POA الكامل بعد التصحيح",
                    "value": {
                      "issuing_state": "ESP",
                      "document_type": "BANK_STATEMENT",
                      "document_language": "es",
                      "issuer": "Banco Example S.A.",
                      "issue_date": "2026-05-02",
                      "poa_address": "Avda de Madrid 34, 28013 Madrid",
                      "name_on_document": "Carmen Espanola",
                      "extra_fields": {
                        "bank_account_number": null,
                        "bank_iban": "ES9121000418450200051332",
                        "bank_sort_code": null,
                        "bank_routing_number": null,
                        "bank_swift_bic": null,
                        "bank_branch_name": null,
                        "bank_branch_address": null,
                        "document_phone_number": null,
                        "additional_names": [
                          "Carmen E. Espanola"
                        ]
                      },
                      "poa_parsed_address": {
                        "city": "Madrid",
                        "street_1": "Avda de Madrid 34",
                        "postal_code": "28013",
                        "country": "ES",
                        "formatted_address": "Avda de Madrid 34, Madrid, 28013, ES"
                      },
                      "poa_formatted_address": "Avda de Madrid 34, Madrid, 28013, ES"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تصل أخطاء الحقول على شكل `{\"<field>\": [\"<message>\"]}`؛ وتستخدم الأخطاء في مفاتيح `poa_parsed_address` / `extra_fields` المتداخلة قيمة كائن: `{\"extra_fields\": {\"<key>\": \"<message>\"}}`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid document type": {
                    "summary": "التعداد بأحرف كبيرة — ويتم رفض الصيغ ذات الأحرف الصغيرة",
                    "value": {
                      "document_type": [
                        "\"utility_bill\" is not a valid choice."
                      ]
                    }
                  },
                  "Invalid issuing state": {
                    "summary": "حقل issuing_state ليس بصيغة ISO 3166-1 alpha-3",
                    "value": {
                      "issuing_state": [
                        "Invalid ISO 3166-1 alpha-3 country code for issuing_state."
                      ]
                    }
                  },
                  "additional_names not a list": {
                    "summary": "يقبل additional_names قائمة من السلاسل النصية أو null",
                    "value": {
                      "extra_fields": {
                        "additional_names": "Must be a list or null."
                      }
                    }
                  },
                  "Unsupported poa_parsed_address key": {
                    "summary": "يُسمح بالمفاتيح السبعة الموثقة فقط",
                    "value": {
                      "poa_parsed_address": {
                        "zipcode": "Unsupported key. Allowed keys: address_type, city, region, street_1, street_2, postal_code, country"
                      }
                    }
                  },
                  "Bad date format": {
                    "summary": "يجب أن تكون التواريخ بالصيغة YYYY-MM-DD",
                    "value": {
                      "issue_date": [
                        "Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة أو أذونات غير كافية. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "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."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "جلسة غير معروفة، أو جلسة في حالة غير قابلة للتعديل، أو لا يوجد سجل إثبات العنوان (POA) لتعديله. لكل حالة رسالة `detail` مميزة (راجع الأمثلة). يتم تشغيل البحث عن الجلسة غير المعروفة قبل فحوصات بيانات الاعتماد.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف في تطبيقك (أو تم حذفها)",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Wrong session state": {
                    "summary": "الجلسة موجودة ولكن حالتها ليست Approved / Declined / In Review / Kyc Expired",
                    "value": {
                      "detail": "No Session matches the given query."
                    }
                  },
                  "No POA record": {
                    "summary": "لم يُشغّل سير العمل خطوة إثبات العنوان مطلقاً",
                    "value": {
                      "detail": "The session does not have a POA."
                    }
                  },
                  "No POA for node": {
                    "summary": "تم تقديم node_id ولكن لا يوجد إثبات العنوان (POA) مرتبط به",
                    "value": {
                      "detail": "The session does not have a POA for node 'feature_missing'."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل المخصص — 10 تحديثات لبيانات إثبات العنوان (POA) في الدقيقة لكل مفتاح API (تُحتسب الطلبات المرفوضة ضمن الحصة). وقد يؤدي حد الكتابة المشترك البالغ 300/دقيقة أيضاً إلى ظهور رسالة خاصة به. تحقق من `Retry-After` ورؤوس الاستجابة `X-RateLimit-*` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "تم استنفاد ميزانية تحديث إثبات العنوان (POA)",
                    "value": {
                      "detail": "Session POA data update rate limit exceeded. You can make up to 10 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH \\\n  https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-poa-data/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"issuing_state\": \"ESP\",\n    \"document_type\": \"BANK_STATEMENT\",\n    \"issuer\": \"Banco Example S.A.\",\n    \"issue_date\": \"2026-05-02\",\n    \"name_on_document\": \"Carmen Espanola\",\n    \"poa_address\": \"Avda de Madrid 34, 28013 Madrid\",\n    \"extra_fields\": {\n      \"bank_iban\": \"ES9121000418450200051332\"\n    },\n    \"poa_parsed_address\": {\n      \"city\": \"Madrid\",\n      \"postal_code\": \"28013\",\n      \"country\": \"ES\"\n    }\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_poa_data(\n    \"11111111-2222-3333-4444-555555555555\",\n    issuing_state=\"ESP\",\n    document_type=\"BANK_STATEMENT\",\n    issuer=\"Banco Example S.A.\",\n    issue_date=\"2026-05-02\",\n    poa_address=\"Avda de Madrid 34, 28013 Madrid\",\n    name_on_document=\"Carmen Espanola\",\n    extra_fields={\"bank_iban\": \"ES9121000418450200051332\", \"additional_names\": [\"Carmen E. Espanola\"]},\n    poa_parsed_address={\n        \"city\": \"Madrid\",\n        \"street_1\": \"Avda de Madrid 34\",\n        \"postal_code\": \"28013\",\n        \"country\": \"ES\",\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updatePoaData(\"11111111-2222-3333-4444-555555555555\", {\n  issuing_state: \"ESP\",\n  document_type: \"BANK_STATEMENT\",\n  issuer: \"Banco Example S.A.\",\n  issue_date: \"2026-05-02\",\n  poa_address: \"Avda de Madrid 34, 28013 Madrid\",\n  name_on_document: \"Carmen Espanola\",\n  extra_fields: { bank_iban: \"ES9121000418450200051332\", additional_names: [\"Carmen E. Espanola\"] },\n  poa_parsed_address: {\n    city: \"Madrid\",\n    street_1: \"Avda de Madrid 34\",\n    postal_code: \"28013\",\n    country: \"ES\",\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdatePOAData(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdatePOADataParams{\n\tIssuingState:   didit.String(\"ESP\"),\n\tDocumentType:   didit.Some(didit.SessionsUpdatePOADataParamsDocumentType(\"BANK_STATEMENT\")),\n\tIssuer:         didit.String(\"Banco Example S.A.\"),\n\tIssueDate:      didit.String(\"2026-05-02\"),\n\tPOAAddress:     didit.String(\"Avda de Madrid 34, 28013 Madrid\"),\n\tNameOnDocument: didit.String(\"Carmen Espanola\"),\n\tExtraFields:    didit.Some(map[string]any{\"bank_iban\": \"ES9121000418450200051332\", \"additional_names\": []any{\"Carmen E. Espanola\"}}),\n\tPOAParsedAddress: didit.Some(didit.SessionsUpdatePOADataParamsPOAParsedAddress{\n\t\tCity:       didit.String(\"Madrid\"),\n\t\tStreet1:    didit.String(\"Avda de Madrid 34\"),\n\t\tPostalCode: didit.String(\"28013\"),\n\t\tCountry:    didit.String(\"ES\"),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.LocalDate;\nimport java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUpdatePoaDataParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updatePoaData(\"11111111-2222-3333-4444-555555555555\", SessionsUpdatePoaDataParams.builder()\n        .issuingState(\"ESP\")\n        .documentType(SessionsUpdatePoaDataParams.DocumentType.of(\"BANK_STATEMENT\"))\n        .issuer(\"Banco Example S.A.\")\n        .issueDate(LocalDate.parse(\"2026-05-02\"))\n        .poaAddress(\"Avda de Madrid 34, 28013 Madrid\")\n        .nameOnDocument(\"Carmen Espanola\")\n        .extraFields(Map.of(\"bank_iban\", \"ES9121000418450200051332\", \"additional_names\", List.of(\"Carmen E. Espanola\")))\n        .poaParsedAddress(SessionsUpdatePoaDataParams.PoaParsedAddress.builder()\n                .city(\"Madrid\")\n                .street1(\"Avda de Madrid 34\")\n                .postalCode(\"28013\")\n                .country(\"ES\")\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updatePoaData('11111111-2222-3333-4444-555555555555', [\n    'issuing_state' => 'ESP',\n    'document_type' => 'BANK_STATEMENT',\n    'issuer' => 'Banco Example S.A.',\n    'issue_date' => '2026-05-02',\n    'poa_address' => 'Avda de Madrid 34, 28013 Madrid',\n    'name_on_document' => 'Carmen Espanola',\n    'extra_fields' => ['bank_iban' => 'ES9121000418450200051332', 'additional_names' => ['Carmen E. Espanola']],\n    'poa_parsed_address' => [\n        'city' => 'Madrid',\n        'street_1' => 'Avda de Madrid 34',\n        'postal_code' => '28013',\n        'country' => 'ES',\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_poa_data(\n  \"11111111-2222-3333-4444-555555555555\",\n  issuing_state: \"ESP\",\n  document_type: \"BANK_STATEMENT\",\n  issuer: \"Banco Example S.A.\",\n  issue_date: \"2026-05-02\",\n  poa_address: \"Avda de Madrid 34, 28013 Madrid\",\n  name_on_document: \"Carmen Espanola\",\n  extra_fields: { bank_iban: \"ES9121000418450200051332\", additional_names: [\"Carmen E. Espanola\"] },\n  poa_parsed_address: {\n    city: \"Madrid\",\n    street_1: \"Avda de Madrid 34\",\n    postal_code: \"28013\",\n    country: \"ES\",\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdatePoaDataAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdatePoaDataParams\n{\n    IssuingState = \"ESP\",\n    DocumentType = new SessionsUpdatePoaDataParamsDocumentType(\"BANK_STATEMENT\"),\n    Issuer = \"Banco Example S.A.\",\n    IssueDate = \"2026-05-02\",\n    PoaAddress = \"Avda de Madrid 34, 28013 Madrid\",\n    NameOnDocument = \"Carmen Espanola\",\n    ExtraFields = new Dictionary<string, object> { [\"bank_iban\"] = \"ES9121000418450200051332\", [\"additional_names\"] = new object[] { \"Carmen E. Espanola\" } },\n    PoaParsedAddress = new SessionsUpdatePoaDataParamsPoaParsedAddress\n    {\n        City = \"Madrid\",\n        Street1 = \"Avda de Madrid 34\",\n        PostalCode = \"28013\",\n        Country = \"ES\",\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/kyb/{companyUuid}/update-data/": {
      "patch": {
        "summary": "تحديث بيانات الشركة المستخرجة من السجل في جلسة التحقق من الشركات (KYB)",
        "description": "تصحيح بيانات الشركة المستخرجة من السجل في جلسة التحقق من الشركات (KYB) — اسم الشركة، رقم التسجيل، العناوين، الحالة، تفاصيل الاتصال — المحددة بواسطة `companyUuid`. المتصلون النمطيون هم محلل امتثال يصحح قراءة خاطئة من السجل، أو مكتبك الخلفي لمزامنة بيانات الشركة المصححة. كل حقل في نص الطلب اختياري (دلالات `PATCH`)؛ نص JSON فارغ (`{}`) هو عملية بلا تأثير تعيد ببساطة سجل الشركة الحالي.\n\nتُكتب التعديلات في مكانين في آنٍ واحد: الحقول التي تحتوي على عمود شركة قياسي (الاسم، رقم التسجيل، الدولة، تاريخ التأسيس، الرقم الضريبي، النوع، الحالات، حقول رأس المال (`registered_capital`، `registered_capital_amount`، `registered_capital_currency`)، الأسماء البديلة، طبيعة العمل، الموقع الإلكتروني، البريد الإلكتروني، الهاتف، LEI، الموقع الجغرافي، و `legal_address` ← `registered_address`) تُحدّث ذلك العمود، ويتم أيضاً دمج **كل** مفتاح مُرسل في لقطة `registry_data` (التواريخ كسلاسل ISO) لكي تعكس طريقة العرض \"المستخرجة من السجل\" التصحيح. الحقول التي ليس لها عمود — `region`، `registration_date`، `dissolution_date`، `control_scheme` — تستقر في `registry_data` فقط. لا يتم المساس بـ `user_provided_data` (ما أكده المستخدم النهائي في المسار المستضاف) على الإطلاق، ويتم تسجيل طابع زمني في `last_console_edit_at` عند كل عملية PATCH غير فارغة.\n\nعلى عكس endpoints الخاصة بتحديث KYC/POA، **لا يوجد شرط لحالة الجلسة**: يمكن تعديل الشركة في أي مرحلة من دورة حياة جلسة الشركة. يجب أن تنتمي الشركة إلى الجلسة المحددة في المسار (وإلا يتم إرجاع `404` مع `\"KYB company does not belong to the given session.\"` ) وإلى تطبيقك. كل عملية PATCH غير فارغة تُطلق [webhook](/ar/integration/webhooks) الحدث `data.updated` في جلسة الشركة (المُشغِّل `console_registry_edit`) — حتى عندما تطابق القيم المُرسلة القيم المخزنة. **لا** تتم إعادة تقييم حالة الجلسة وقرارها، ولا يتم تسجيل أي قيد مراجعة/تدقيق.\n\nيقبل الطلب مفتاح API أو token مستخدم لوحة التحكم؛ وفي الحالتين تتطلب بيانات الاعتماد إذن `write:businesses`. يُرجع كل من فشل المصادقة وفشل الأذونات الرمز `403` — لا تستجيب واجهة برمجة التطبيقات هذه بـ `401` مطلقاً. يُرجى ملاحظة أن البحث عن الجلسة يتم قبل التحقق من بيانات الاعتماد، لذا فإن `sessionId` غير المعروف يُرجع `404` حتى مع وجود بيانات اعتماد مفقودة. تنطبق ميزانية الكتابة المشتركة البالغة 300 طلب في الدقيقة لكل مفتاح API.\n\nبالنسبة لجلسات التحقق من المستخدمين، فإن النظير في KYC هو `PATCH /v3/session/{sessionId}/update-data/`؛ ولتغيير قرار الجلسة نفسه استخدم `PATCH /v3/session/{sessionId}/update-status/`.",
        "operationId": "patch_v3_session_kyb_company_update_data",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_kyb_company_data",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB) الأصلية (الأب).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "companyUuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لسجل الشركة المراد تحديثه (`registry_checks[].company.uuid` في قرار جلسة الشركة). يجب أن ينتمي إلى الجلسة المُشار إليها بواسطة `sessionId`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "88888888-9999-aaaa-bbbb-cccccccccccc"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "جميع الحقول اختيارية — أرسل فقط ما ترغب في تغييره. تُحدّث الحقول المقدمة أعمدة الشركة الأساسية (حيثما وُجدت) وتُدمج في لقطة `registry_data`.",
                "properties": {
                  "company_name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "الاسم القانوني للشركة. يُكتب في العمود الأساسي ولقطة السجل.",
                    "example": "Docs Probe Corp"
                  },
                  "registration_number": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "رقم التسجيل الرسمي لدى سجل الشركات.",
                    "example": "DPC-001"
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 2,
                    "description": "دولة التأسيس، ISO 3166-1 alpha-2. غير حساسة لحالة الأحرف (يتم تخزين `us` كـ `US`). تفشل رموز Alpha-3 في تجاوز حد الحرفين مع إرجاع `400`.",
                    "example": "US"
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 10,
                    "nullable": true,
                    "description": "علامة التقسيم الفرعي / المنطقة حيث يتوفر لدى السجل قسم فرعي (مثل الولاية الأمريكية). يتم تخزينها في اللقطة السريعة للسجل فقط — وليس لها عمود أساسي."
                  },
                  "incorporation_date": {
                    "type": "string",
                    "format": "date",
                    "description": "تاريخ التأسيس بصيغة `YYYY-MM-DD`. اختياري كأي حقل آخر — طلب `PATCH` جزئي. أي تنسيق تاريخ آخر يعيد `400`.",
                    "example": "2015-04-12"
                  },
                  "registration_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true,
                    "description": "تاريخ التسجيل عندما يميّزه السجل عن تاريخ التأسيس. يُخزَّن في لقطة السجل فقط."
                  },
                  "dissolution_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true,
                    "description": "تاريخ الحل للشركات التي لم تعد نشطة. يُخزّن في لقطة السجل فقط."
                  },
                  "tax_number": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "الرقم الضريبي."
                  },
                  "legal_address": {
                    "type": "string",
                    "description": "العنوان القانوني / المسجل. اسم مستعار على جانب الخادم لعمود `registered_address` الأساسي — تُرجعه الاستجابة تحت `registered_address`، بينما تحتفظ لقطة السجل بمفتاح `legal_address` الذي أرسلته.",
                    "example": "1 Example Plaza, Wilmington, DE 19801"
                  },
                  "company_type": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "نوع الكيان القانوني (مثل `Limited Liability Company` أو `PLC` أو `GmbH`).",
                    "example": "Limited Liability Company"
                  },
                  "registry_status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "dissolved",
                      "deregistered",
                      "see full details",
                      "authorised",
                      "appointed representative",
                      "unauthorised",
                      "inactive",
                      "no longer authorised",
                      "closed",
                      "struck off"
                    ],
                    "nullable": true,
                    "description": "حالة الشركة كما وردت في السجل. بأحرف صغيرة، وبعض القيم تحتوي على مسافات (مثل `struck off`، `no longer authorised`). تؤدي أي قيمة أخرى إلى إرجاع `400`.",
                    "example": "active"
                  },
                  "verification_status": {
                    "type": "string",
                    "enum": [
                      "verified",
                      "failed",
                      "unknown"
                    ],
                    "nullable": true,
                    "description": "نتيجة التحقق من السجل. تؤدي أي قيمة أخرى إلى إرجاع `400`.",
                    "example": "verified"
                  },
                  "alternative_names": {
                    "type": "string",
                    "description": "الأسماء التجارية، والأسماء القانونية السابقة، والأسماء التجارية المسجلة (DBA) (نص حر)."
                  },
                  "nature_of_business": {
                    "type": "string",
                    "description": "وصف قصير لنشاط الشركة.",
                    "example": "Software development"
                  },
                  "registered_capital": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "رأس المال المسجل بصيغة مقروءة للبشر (مثل `USD 50000`). استخدم `registered_capital_amount` + `registered_capital_currency` للقيم المنظمة، أو هذا الحقل للنص الحر.",
                    "example": "USD 50000"
                  },
                  "registered_capital_amount": {
                    "type": "number",
                    "format": "double",
                    "nullable": true,
                    "description": "مبلغ رأس المال المسجل كرقم (حتى 20 رقماً، ومنزلتان عشريتان). يحدد عمود `registered_capital_amount` ويتم نسخه في `registry_data` كسلسلة نصية عشرية؛ وتُرجعه الاستجابة كسلسلة نصية عشرية (مثل `\"1500000.50\"`)."
                  },
                  "registered_capital_currency": {
                    "type": "string",
                    "maxLength": 3,
                    "nullable": true,
                    "description": "رمز العملة حسب معيار ISO 4217 لـ `registered_capital_amount`. غير حساس لحالة الأحرف (يتم تخزين `usd` كـ `USD`)؛ تُرجع القيم التي لا تتكون من 3 أحرف بالضبط الرمز `400` مع رسالة ISO 4217. يحدد عمود `registered_capital_currency` الأساسي ويُنسخ أيضًا إلى `registry_data`.",
                    "example": "USD"
                  },
                  "website": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "الموقع الإلكتروني للشركة. تُقبل النطاقات المجردة ويتم ضبطها بإضافة البادئة `https://` (يتم تخزين `docsprobe.example.com` كـ `https://docsprobe.example.com`)؛ والقيم التي تستمر في الفشل في التحقق من صحة عنوان URL تُرجع `400`.",
                    "example": "https://docsprobe.example.com"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "البريد الإلكتروني لجهة الاتصال المسجل في السجل.",
                    "example": "legal@docsprobe.example.com"
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "هاتف التواصل. يجب أن يطابق `+`، أرقاماً، مسافات، شرطات، نقاطاً، أو أقواساً، بإجمالي 7-15 رقماً — وإلا فسيُرجع `400`.",
                    "example": "+1 302 555 0143"
                  },
                  "legal_entity_identifier": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "معرّف الكيان القانوني (LEI)، حيث تمتلك الشركة معرّفاً."
                  },
                  "location_of_registration": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "المدينة / التقسيم الإداري لسجل القيد."
                  },
                  "vat_number": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "رقم ضريبة القيمة المضافة في الاتحاد الأوروبي (EU VAT). يتم دمجه في لقطة `registry_data` فقط — ولا يؤدي تعديله هنا إلى إعادة تشغيل التحقق من صحة ضريبة القيمة المضافة والرقم الضريبي، وبالتالي تظل حقول النتائج `vat_validation_status` وحقول `vat_*` الأخرى دون تغيير."
                  },
                  "control_scheme": {
                    "type": "string",
                    "description": "مخطط الرقابة / الحوكمة عندما يعرضه السجل. يُخزن في لقطة السجل فقط."
                  }
                }
              },
              "examples": {
                "Correct registry data": {
                  "summary": "تصحيح الحقول المستخرجة من سجل الشركات للشركة",
                  "value": {
                    "company_name": "Docs Probe Corp",
                    "registration_number": "DPC-001",
                    "country_code": "US",
                    "incorporation_date": "2015-04-12",
                    "company_type": "Limited Liability Company",
                    "legal_address": "1 Example Plaza, Wilmington, DE 19801",
                    "registry_status": "active",
                    "verification_status": "verified",
                    "website": "docsprobe.example.com",
                    "email": "legal@docsprobe.example.com",
                    "phone": "+1 302 555 0143",
                    "registered_capital": "USD 50000",
                    "nature_of_business": "Software development"
                  }
                },
                "Single field": {
                  "summary": "تتم كتابة المفاتيح التي ترسلها فقط",
                  "value": {
                    "registry_status": "dissolved"
                  }
                },
                "No-op": {
                  "summary": "يعيد نص الطلب الفارغ عرض السجل الحالي دون إطلاق webhook",
                  "value": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "بيانات الشركة المحدّثة (أو تُعاد دون تغيير في حال إرسال جسم طلب فارغ). يُرجع سجل الشركة الكامل في KYB — بنفس هيكل `registry_checks[].company` في قرار جلسة الشركة. لاحظ كيف يُعاد `legal_address` في صورة `registered_address`. يملأ الحقلان `registered_capital_amount`/`registered_capital_currency` أعمدتهما القياسية وينعكسان في `registry_data`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "سجل شركة KYB الكامل — بالهيكل نفسه لكائن `company` داخل `registry_checks[]` في قرار جلسة الشركة.",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف سجل الشركة (معامل المسار `companyUuid`)."
                    },
                    "node_id": {
                      "type": "string",
                      "nullable": true,
                      "description": "عقدة مخطط سير العمل التي ينتمي إليها سجل هذه الشركة، عندما يكون سير العمل قائماً على المخطط."
                    },
                    "status": {
                      "type": "string",
                      "description": "حالة دورة حياة الميزة للتحقق من السجل (مثل `Not Finished`، أو `Approved`، أو `Declined`، أو `In Review`)."
                    },
                    "registry_status": {
                      "type": "string",
                      "nullable": true,
                      "description": "حالة الشركة كما وردت في السجل (مثل `active`، `dissolved`، `struck off`)."
                    },
                    "data_resolved": {
                      "type": "boolean",
                      "description": "تكون `true` عندما تكتمل بيانات الشركة — دائماً `true` للشركات المدخلة يدوياً؛ وللشركات المستوردة من السجلات، تكون `true` بمجرد اكتمال جلب البيانات من السجل."
                    },
                    "company_name": {
                      "type": "string",
                      "nullable": true
                    },
                    "registration_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "country_code": {
                      "type": "string",
                      "nullable": true,
                      "description": "دولة التأسيس وفقاً لـ ISO 3166-1 alpha-2."
                    },
                    "region": {
                      "type": "string",
                      "nullable": true
                    },
                    "company_type": {
                      "type": "string",
                      "nullable": true
                    },
                    "incorporation_date": {
                      "type": "string",
                      "format": "date",
                      "nullable": true
                    },
                    "registered_address": {
                      "type": "string",
                      "nullable": true,
                      "description": "العنوان المسجل المعتمد — يتم تحديثه عند إرسال `legal_address`."
                    },
                    "tax_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "risk_level": {
                      "type": "string",
                      "nullable": true
                    },
                    "verification_status": {
                      "type": "string",
                      "nullable": true,
                      "description": "`verified` أو `failed` أو `unknown`."
                    },
                    "is_from_registry": {
                      "type": "boolean",
                      "description": "تكون `true` عندما يتم ملء بيانات الشركة مسبقاً من البحث في السجل بدلاً من إدخالها يدوياً."
                    },
                    "fetch_status": {
                      "type": "string",
                      "nullable": true,
                      "description": "دورة حياة جلب السجل للشركات المستمدة من السجل (`pending` / `resolved`)؛ وتكون `null` للإدخالات اليدوية."
                    },
                    "alternative_names": {
                      "type": "string",
                      "nullable": true,
                      "description": "أسماء الشركات البديلة، أو التجارية، أو السابقة، أو باللغة الأصلية كنص، عند الإبلاغ عنها."
                    },
                    "nature_of_business": {
                      "type": "string",
                      "nullable": true
                    },
                    "registered_capital": {
                      "type": "string",
                      "nullable": true
                    },
                    "registered_capital_amount": {
                      "type": "string",
                      "nullable": true,
                      "description": "عمود قياسي. يتم إرجاعه كسلسلة عشرية (مثل `\"2750000.00\"`)."
                    },
                    "registered_capital_currency": {
                      "type": "string",
                      "nullable": true,
                      "description": "عمود قياسي. يتم تعيينه بواسطة سير عمل السجل أو عن طريق تعديلات لوحة التحكم/API عبر هذا endpoint."
                    },
                    "website": {
                      "type": "string",
                      "nullable": true
                    },
                    "email": {
                      "type": "string",
                      "nullable": true
                    },
                    "phone": {
                      "type": "string",
                      "nullable": true
                    },
                    "legal_entity_identifier": {
                      "type": "string",
                      "nullable": true
                    },
                    "location_of_registration": {
                      "type": "string",
                      "nullable": true
                    },
                    "vat_number": {
                      "type": "string",
                      "nullable": true,
                      "description": "رقم ضريبة القيمة المضافة في الاتحاد الأوروبي (EU VAT)، عند جمعه أثناء خطوة السجل المستضافة أو تعديله لاحقاً."
                    },
                    "vat_validation_status": {
                      "type": "string",
                      "enum": [
                        "valid",
                        "invalid",
                        "format_valid",
                        "invalid_format",
                        "could_not_validate",
                        "not_applicable"
                      ],
                      "description": "نتيجة التحقق من صحة رقم ضريبة القيمة المضافة أو، عند عدم وجوده، `tax_number`، عند الإرسال إلى السجل. `valid` / `invalid`: يتم تحديدها بواسطة السجل الرسمي للدولة (EU VIES، والنرويج، وسويسرا، والبرازيل، وكولومبيا، وكوستاريكا، والإكوادور، وباراغواي؛ وبولندا أيضاً عبر سجل ضريبة القيمة المضافة المحلي الخاص بها). `format_valid` / `invalid_format`: يتم تحديدها بناءً على قواعد التنسيق وأرقام التحقق الخاصة بالدولة عند تعذر الاستعلام من أي سجل. `could_not_validate`: كان السجل غير متاح. `not_applicable`: لا يوجد رقم، أو دولة بدون سجل أو قواعد، أو جلسة في البيئة التجريبية."
                    },
                    "vat_validated_number": {
                      "type": "string",
                      "nullable": true,
                      "description": "الرقم الذي تم التحقق منه، كما يعرفه المصدر (على سبيل المثال، رقم ضريبة القيمة المضافة المشتق من SIREN الفرنسي أو RSIN الهولندي). يكون `null` عند عدم تشغيل أي فحص."
                    },
                    "vat_validation_source": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "eu_vies",
                        "pl_vat_white_list",
                        "no_brreg",
                        "ch_uid_register",
                        "br_receita_federal",
                        "co_rues",
                        "cr_hacienda",
                        "ec_sri",
                        "py_dnit",
                        "format_rules",
                        null
                      ],
                      "description": "المصدر الذي حدد `vat_validation_status`: إما سجل رسمي، أو `format_rules`. تكون قيمته `null` عند عدم تشغيل أي فحص."
                    },
                    "vat_validated_name": {
                      "type": "string",
                      "nullable": true,
                      "description": "الاسم المسجل لدى المصدر الذي تحقق من صحة الرقم، عند إفصاحه عن اسم. يُعيّن فقط عندما تكون الحالة `valid`."
                    },
                    "vat_validated_address": {
                      "type": "string",
                      "nullable": true,
                      "description": "العنوان المسجل لدى المصدر الذي تحقق من الرقم، عندما يكشف عنه. يتم تعيينه فقط عندما تكون الحالة `valid`."
                    },
                    "vat_checked_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "الطابع الزمني للفحص. يكون `null` في حال عدم تشغيل أي فحص."
                    },
                    "financial_summary": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true
                    },
                    "officers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "المديرون / المسؤولون المرتبطون بالشركة، بما في ذلك تقدم KYC لكل شخص."
                    },
                    "beneficial_owners": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "المستفيدون الحقيقيون المرتبطون بالشركة، بما في ذلك تقدم إجراءات KYC لكل شخص."
                    },
                    "addresses": {
                      "type": "array",
                      "nullable": true,
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "تفاصيل عنوان السجل، عندما يُرجع السجل أي تفاصيل."
                    },
                    "industries": {
                      "type": "array",
                      "nullable": true,
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "التصنيف الصناعي للسجل، عند توفره."
                    },
                    "accounts": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "تواريخ إيداعات السجل، عند توفرها. تستخدم الإقرارات السنوية والاجتماعات العامة last_annual_return_date وlast_agm_date؛ وهي تختلف عن الحسابات المالية."
                    },
                    "registry_data": {
                      "$ref": "#/components/schemas/KYBRegistryData"
                    },
                    "user_provided_data": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "ما كتبه المستخدم النهائي أثناء خطوة تأكيد السجل المستضافة. لا يتم تعديله مطلقاً بواسطة هذا الـ endpoint."
                    },
                    "confirmed_by_user_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "وقت تأكيد المستخدم النهائي لبيانات الشركة في المسار المستضاف."
                    },
                    "last_console_edit_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "يُختم عند كل طلب PATCH ناجح وغير فارغ، حتى تتمكن واجهات المستخدم من إظهار سياق \"تم التعديل بواسطة المشغّل\"."
                    },
                    "is_editable": {
                      "type": "boolean",
                      "description": "تكون `true` طالما لا يزال بإمكان المستخدم النهائي تعديل البيانات المستوردة من السجل في مسار التحقق المستضاف (مستوردة من السجل ولم يتم تأكيدها بعد)."
                    }
                  }
                },
                "examples": {
                  "Updated company": {
                    "summary": "سجل الشركة الكامل بعد التصحيح",
                    "value": {
                      "uuid": "6b9479f5-6769-46c8-baf1-df63bbbc5f8c",
                      "node_id": null,
                      "status": "Not Finished",
                      "registry_status": "active",
                      "data_resolved": true,
                      "company_name": "Docs Probe Corp",
                      "registration_number": "DPC-001",
                      "country_code": "US",
                      "region": null,
                      "company_type": "Limited Liability Company",
                      "incorporation_date": "2015-04-12",
                      "registered_address": "1 Example Plaza, Wilmington, DE 19801",
                      "tax_number": null,
                      "risk_level": null,
                      "verification_status": "verified",
                      "is_from_registry": false,
                      "fetch_status": null,
                      "alternative_names": null,
                      "nature_of_business": "Software development",
                      "registered_capital": "USD 50000",
                      "registered_capital_amount": null,
                      "registered_capital_currency": "USD",
                      "website": "https://docsprobe.example.com",
                      "email": "legal@docsprobe.example.com",
                      "phone": "+1 302 555 0143",
                      "legal_entity_identifier": null,
                      "location_of_registration": null,
                      "financial_summary": null,
                      "officers": [],
                      "beneficial_owners": [],
                      "addresses": null,
                      "industries": null,
                      "accounts": null,
                      "registry_data": {
                        "company_name": "Docs Probe Corp",
                        "registration_number": "DPC-001",
                        "country_code": "US",
                        "incorporation_date": "2015-04-12",
                        "legal_address": "1 Example Plaza, Wilmington, DE 19801",
                        "company_type": "Limited Liability Company",
                        "registry_status": "active",
                        "verification_status": "verified",
                        "nature_of_business": "Software development",
                        "registered_capital": "USD 50000",
                        "registered_capital_currency": "USD",
                        "website": "https://docsprobe.example.com",
                        "email": "legal@docsprobe.example.com",
                        "phone": "+1 302 555 0143"
                      },
                      "user_provided_data": null,
                      "confirmed_by_user_at": null,
                      "last_console_edit_at": "2026-06-12T00:02:34.276061Z",
                      "is_editable": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تصل أخطاء الحقول على شكل `{\"<field>\": [\"<message>\"]}`. يتم إجراء فحوصات الحد الأقصى للطول قبل فحوصات التنسيق، لذا فإن `country_code: \"USA\"` يُبلغ عن حد الحرفين بدلاً من رسالة ISO.",
            "content": {
              "application/json": {
                "examples": {
                  "Alpha-3 country code": {
                    "summary": "يجب أن يكون country_code بصيغة alpha-2 — يتم التحقق من الطول أولاً",
                    "value": {
                      "country_code": [
                        "Ensure this field has no more than 2 characters."
                      ]
                    }
                  },
                  "Non-alphabetic country code": {
                    "summary": "حرفان ولكنهما ليسا حرفين أبجديين",
                    "value": {
                      "country_code": [
                        "country_code must be a 2-letter ISO 3166-1 alpha-2 code."
                      ]
                    }
                  },
                  "Invalid currency": {
                    "summary": "3 أحرف ولكن ليس رمز ISO 4217",
                    "value": {
                      "registered_capital_currency": [
                        "Currency must be a 3-letter ISO 4217 code (e.g. USD, EUR, GBP)."
                      ]
                    }
                  },
                  "Invalid phone": {
                    "summary": "الهاتف لا يجتاز فحص التنسيق / عدد الأرقام",
                    "value": {
                      "phone": [
                        "Invalid phone number format."
                      ]
                    }
                  },
                  "Invalid registry status": {
                    "summary": "حقل registry_status ليس ضمن التعداد (enum)",
                    "value": {
                      "registry_status": [
                        "\"liquidated\" is not a valid choice."
                      ]
                    }
                  },
                  "Invalid email": {
                    "summary": "عنوان بريد إلكتروني غير صالح",
                    "value": {
                      "email": [
                        "Enter a valid email address."
                      ]
                    }
                  },
                  "Invalid website": {
                    "summary": "تفشل القيمة في التحقق من صحة عنوان URL حتى بعد تطبيعها باستخدام https://",
                    "value": {
                      "website": [
                        "Enter a valid URL."
                      ]
                    }
                  },
                  "Bad date format": {
                    "summary": "يجب أن تكون التواريخ بالصيغة YYYY-MM-DD",
                    "value": {
                      "incorporation_date": [
                        "Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة أو أذونات غير كافية. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Credentials": {
                    "summary": "x-api-key مفقود أو غير صالح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Missing Privilege": {
                    "summary": "تفتقر بيانات الاعتماد إلى صلاحية write:businesses",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "جلسة غير معروفة، أو شركة غير معروفة، أو شركة تنتمي إلى جلسة مختلفة. لكل حالة رسالة `detail` مميزة (راجع الأمثلة). يتم تشغيل البحث عن الجلسة غير المعروفة قبل فحوصات بيانات الاعتماد.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف في تطبيقك (أو تم حذفها)",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Unknown company": {
                    "summary": "لا توجد شركة بهذا المعرّف UUID في تطبيقك",
                    "value": {
                      "detail": "No KYBCompany matches the given query."
                    }
                  },
                  "Company / session mismatch": {
                    "summary": "companyUuid موجود لكنه ينتمي إلى جلسة أخرى",
                    "value": {
                      "detail": "KYB company does not belong to the given session."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد معدل الكتابة المشترك (300 طلب POST/PATCH/DELETE في الدقيقة لكل مفتاح API). افحص `Retry-After` ورؤوس الاستجابة `X-RateLimit-*` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "تم استنفاد ميزانية الكتابة",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH \\\n  https://verification.didit.me/v3/session/33333333-4444-5555-6666-777777777777/kyb/88888888-9999-aaaa-bbbb-cccccccccccc/update-data/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"company_name\": \"Docs Probe Corp\",\n    \"registration_number\": \"DPC-001\",\n    \"country_code\": \"US\",\n    \"incorporation_date\": \"2015-04-12\",\n    \"company_type\": \"Limited Liability Company\",\n    \"legal_address\": \"1 Example Plaza, Wilmington, DE 19801\",\n    \"registry_status\": \"active\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_kyb_company_data(\n    \"33333333-4444-5555-6666-777777777777\",\n    \"88888888-9999-aaaa-bbbb-cccccccccccc\",\n    company_name=\"Docs Probe Corp\",\n    registration_number=\"DPC-001\",\n    country_code=\"US\",\n    incorporation_date=\"2015-04-12\",\n    legal_address=\"1 Example Plaza, Wilmington, DE 19801\",\n    company_type=\"Limited Liability Company\",\n    registry_status=\"active\",\n    verification_status=\"verified\",\n    nature_of_business=\"Software development\",\n    registered_capital=\"USD 50000\",\n    website=\"docsprobe.example.com\",\n    email=\"legal@docsprobe.example.com\",\n    phone=\"+1 302 555 0143\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateKybCompanyData(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"88888888-9999-aaaa-bbbb-cccccccccccc\",\n  {\n    company_name: \"Docs Probe Corp\",\n    registration_number: \"DPC-001\",\n    country_code: \"US\",\n    incorporation_date: \"2015-04-12\",\n    legal_address: \"1 Example Plaza, Wilmington, DE 19801\",\n    company_type: \"Limited Liability Company\",\n    registry_status: \"active\",\n    verification_status: \"verified\",\n    nature_of_business: \"Software development\",\n    registered_capital: \"USD 50000\",\n    website: \"docsprobe.example.com\",\n    email: \"legal@docsprobe.example.com\",\n    phone: \"+1 302 555 0143\",\n  },\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateKYBCompanyData(ctx, \"33333333-4444-5555-6666-777777777777\", \"88888888-9999-aaaa-bbbb-cccccccccccc\", didit.SessionsUpdateKYBCompanyDataParams{\n\tCompanyName:        didit.String(\"Docs Probe Corp\"),\n\tRegistrationNumber: didit.String(\"DPC-001\"),\n\tCountryCode:        didit.String(\"US\"),\n\tIncorporationDate:  didit.String(\"2015-04-12\"),\n\tLegalAddress:       didit.String(\"1 Example Plaza, Wilmington, DE 19801\"),\n\tCompanyType:        didit.String(\"Limited Liability Company\"),\n\tRegistryStatus:     didit.Some(didit.SessionsUpdateKYBCompanyDataParamsRegistryStatus(\"active\")),\n\tVerificationStatus: didit.Some(didit.SessionsUpdateKYBCompanyDataParamsVerificationStatus(\"verified\")),\n\tNatureOfBusiness:   didit.String(\"Software development\"),\n\tRegisteredCapital:  didit.String(\"USD 50000\"),\n\tWebsite:            didit.String(\"docsprobe.example.com\"),\n\tEmail:              didit.String(\"legal@docsprobe.example.com\"),\n\tPhone:              didit.String(\"+1 302 555 0143\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.LocalDate;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUpdateKybCompanyDataParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateKybCompanyData(\"33333333-4444-5555-6666-777777777777\", \"88888888-9999-aaaa-bbbb-cccccccccccc\", SessionsUpdateKybCompanyDataParams.builder()\n        .companyName(\"Docs Probe Corp\")\n        .registrationNumber(\"DPC-001\")\n        .countryCode(\"US\")\n        .incorporationDate(LocalDate.parse(\"2015-04-12\"))\n        .legalAddress(\"1 Example Plaza, Wilmington, DE 19801\")\n        .companyType(\"Limited Liability Company\")\n        .registryStatus(SessionsUpdateKybCompanyDataParams.RegistryStatus.of(\"active\"))\n        .verificationStatus(SessionsUpdateKybCompanyDataParams.VerificationStatus.of(\"verified\"))\n        .natureOfBusiness(\"Software development\")\n        .registeredCapital(\"USD 50000\")\n        .website(\"docsprobe.example.com\")\n        .email(\"legal@docsprobe.example.com\")\n        .phone(\"+1 302 555 0143\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateKybCompanyData('33333333-4444-5555-6666-777777777777', '88888888-9999-aaaa-bbbb-cccccccccccc', [\n    'company_name' => 'Docs Probe Corp',\n    'registration_number' => 'DPC-001',\n    'country_code' => 'US',\n    'incorporation_date' => '2015-04-12',\n    'legal_address' => '1 Example Plaza, Wilmington, DE 19801',\n    'company_type' => 'Limited Liability Company',\n    'registry_status' => 'active',\n    'verification_status' => 'verified',\n    'nature_of_business' => 'Software development',\n    'registered_capital' => 'USD 50000',\n    'website' => 'docsprobe.example.com',\n    'email' => 'legal@docsprobe.example.com',\n    'phone' => '+1 302 555 0143',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_kyb_company_data(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"88888888-9999-aaaa-bbbb-cccccccccccc\",\n  company_name: \"Docs Probe Corp\",\n  registration_number: \"DPC-001\",\n  country_code: \"US\",\n  incorporation_date: \"2015-04-12\",\n  legal_address: \"1 Example Plaza, Wilmington, DE 19801\",\n  company_type: \"Limited Liability Company\",\n  registry_status: \"active\",\n  verification_status: \"verified\",\n  nature_of_business: \"Software development\",\n  registered_capital: \"USD 50000\",\n  website: \"docsprobe.example.com\",\n  email: \"legal@docsprobe.example.com\",\n  phone: \"+1 302 555 0143\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateKybCompanyDataAsync(\"33333333-4444-5555-6666-777777777777\", \"88888888-9999-aaaa-bbbb-cccccccccccc\", new SessionsUpdateKybCompanyDataParams\n{\n    CompanyName = \"Docs Probe Corp\",\n    RegistrationNumber = \"DPC-001\",\n    CountryCode = \"US\",\n    IncorporationDate = \"2015-04-12\",\n    LegalAddress = \"1 Example Plaza, Wilmington, DE 19801\",\n    CompanyType = \"Limited Liability Company\",\n    RegistryStatus = new SessionsUpdateKybCompanyDataParamsRegistryStatus(\"active\"),\n    VerificationStatus = new SessionsUpdateKybCompanyDataParamsVerificationStatus(\"verified\"),\n    NatureOfBusiness = \"Software development\",\n    RegisteredCapital = \"USD 50000\",\n    Website = \"docsprobe.example.com\",\n    Email = \"legal@docsprobe.example.com\",\n    Phone = \"+1 302 555 0143\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/kyb/parties/{partyUuid}/": {
      "patch": {
        "summary": "تخطي (أو إعادة طلب) طرف من الأشخاص الرئيسيين في جلسة التحقق من الشركات (KYB)",
        "description": "إعفاء طرف من الأشخاص الرئيسيين من التحقق، أو إعادته إلى النطاق. هذا هو الملاذ البديل للمشغّل لطرف لا يمكنه أبداً إكمال الفحص الخاص به - غالباً لأن جلسة KYC الفردية المسندة إلى UBO أو مدير قد حُذفت، مما يجمّد حالة ذلك الطرف التابع ويترك KYB عالقاً في `Awaiting User` دون أي شيء متبقٍ يمكنه تحريكه.\n\nتعيين `is_skipped: true` يستبعد الطرف من تجميع الأشخاص الرئيسيين ويعيد على الفور احتساب `KYBKeyPeopleCheck` وحالة الجلسة الأصلية، حتى تتمكن جلسة الشركة من الاستقرار ومن ثم تصبح مقبولة أو مرفوضة. إرسال `is_skipped: false` يعيد الطرف إلى النطاق ويعود الفحص إلى انتظاره.\n\nعلى عكس التخطي الموجه لمقدم الطلب في شاشة الأشخاص الرئيسيين المستضافة، فإن هذا endpoint **لا** يخضع لإعداد `allow_skip` الخاص بالدور - إذ يقيد هذا الخيار ما قد يقرره مقدم الطلب، وليس ما يمكن للمحلل تجاوزه. يُترك `requires_verification` دون تعديل عن قصد، بحيث يُقرأ الطرف المتجاوَز على أنه `requires_verification: true` **و** `is_skipped: true` ويستمر السجل في إظهار ما طلبته القواعد.\n\nيجب أن ينتمي الطرف إلى الجلسة المحددة في المسار (وإلا سيتم إرجاع `404` مع `\"Party does not belong to the given session.\"` ) وإلى تطبيقك. يؤدي طلب PATCH الذي يغير الخيار فعلياً إلى تشغيل [webhook](/ar/integration/webhooks) من نوع `data.updated` في جلسة الشركة مع المُشغِّل `console_key_people_skip`؛ أما طلب PATCH الذي يعين الخيار إلى قيمته الحالية فهو عملية غير فعالة تعيد الطرف كما هو.\n\nيقبل مفتاح API أو token مستخدم وحدة التحكم؛ وفي كلتا الحالتين تحتاج بيانات الاعتماد إلى إذن `write:businesses`.",
        "operationId": "patch_v3_session_kyb_party_update",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_kyb_party",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB) الأصلية (الأب).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "partyUuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لطرف الأشخاص الرئيسيين المراد تحديثه (`key_people_checks[].submitted.parties[].uuid` في قرار جلسة الشركة). يجب أن ينتمي إلى الجلسة المُشار إليها بواسطة `sessionId`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "is_skipped"
                ],
                "properties": {
                  "is_skipped": {
                    "type": "boolean",
                    "description": "تُعفي القيمة `true` الطرف من التحقق حتى يمكن حسم فحص الأشخاص الرئيسيين بدونه؛ وتُعيده القيمة `false` إلى نطاق الفحص.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث الطرف (أو تمت إعادته دون تغيير عندما كان المؤشر يحمل هذه القيمة بالفعل). يُرجع الطرف - بنفس بنية مدخل في `key_people_checks[].submitted.parties[]` في قرار جلسة الشركة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "سجل طرف من الأشخاص الرئيسيين - نفس شكل الإدخال لـ `key_people_checks[].submitted.parties[]` في قرار جلسة الشركة.",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الطرف."
                    },
                    "entity_type": {
                      "type": "string",
                      "enum": [
                        "person",
                        "company"
                      ],
                      "description": "ما إذا كان الطرف فرداً أو شركة."
                    },
                    "name": {
                      "type": "string",
                      "description": "اسم العرض للطرف."
                    },
                    "is_skipped": {
                      "type": "boolean",
                      "description": "ما إذا كان الطرف معفياً من التحقق."
                    },
                    "requires_verification": {
                      "type": "boolean",
                      "description": "ما طلبته قواعد الأدوار والحدود. يتركه هذا الـ endpoint دون تعديل."
                    },
                    "kyc_session_status": {
                      "type": "string",
                      "nullable": true,
                      "description": "حالة جلسة KYC الفردية المرتبطة، وتُجمد عند وقت الحذف في حال تم حذف الجلسة."
                    },
                    "kyc_session_url": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط إلى جلسة KYC الفردية المرتبطة. يكون `null` عند عدم وجودها أو عند حذفها."
                    },
                    "kyc_session_deleted": {
                      "type": "boolean",
                      "description": "حُذفت جلسة KYC الفردية المرتبطة، لذا لا يمكن تسويتها أبداً."
                    },
                    "kyb_sub_session_deleted": {
                      "type": "boolean",
                      "description": "النظير الخاص بالطرف الاعتباري لـ `kyc_session_deleted`."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة في نص الطلب. `is_skipped` هو الحقل الوحيد الذي يقرؤه هذا الـ endpoint، وهو مطلوب. تصل أخطاء الحقول بالشكل `{\"<field>\": [\"<message>\"]}`. يتم تشغيل التحقق من صحة نص الطلب *بعد* البحث عن الطرف، لذلك فإن إرسال `is_skipped` غير صحيح التنسيق إلى طرف غير موجود يُرجع `404`، وليس `400`.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing is_skipped": {
                    "summary": "نص الطلب فارغ، أو نص طلب يحذف `is_skipped`",
                    "value": {
                      "is_skipped": [
                        "This field is required."
                      ]
                    }
                  },
                  "Non-boolean is_skipped": {
                    "summary": "القيمة ليست قيمة منطقية (boolean) — مثل `\"maybe\"`، و`2`، و`[]`. القيم المنطقية بالإضافة إلى `\"true\"`/`\"false\"`، و`1`/`0`، و`\"yes\"`/`\"no\"` مقبولة جميعها",
                    "value": {
                      "is_skipped": [
                        "Must be a valid boolean."
                      ]
                    }
                  },
                  "Null is_skipped": {
                    "summary": "`is_skipped` موجود ولكنه `null`",
                    "value": {
                      "is_skipped": [
                        "This field may not be null."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة أو أذونات غير كافية. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Credentials": {
                    "summary": "x-api-key مفقود أو غير صالح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Missing Privilege": {
                    "summary": "تفتقر بيانات الاعتماد إلى صلاحية write:businesses",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "طرف غير معروف، أو طرف ينتمي إلى جلسة مختلفة. لكل حالة رسالة `detail` مميزة (راجع الأمثلة). يتم إجراء فحوصات بيانات الاعتماد والأذونات قبل البحث عن الطرف، لذا فإن الاستدعاء غير المصرح به يُرجع `403` بدلاً من `404`. لا يوجد بحث منفصل عن الجلسة: إذا تم إقران `sessionId` غير معروف بطرف يخصك، فسيتم إرجاع رسالة عدم التطابق.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown party": {
                    "summary": "لا يوجد طرف بهذا المعرّف UUID في تطبيقك",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Party / session mismatch": {
                    "summary": "معرّف partyUuid موجود ولكنه مرتبط بجلسة أخرى",
                    "value": {
                      "detail": "Party does not belong to the given session."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد معدل الكتابة المشترك (300 طلب POST/PATCH/DELETE في الدقيقة لكل مفتاح API). افحص `Retry-After` ورؤوس الاستجابة `X-RateLimit-*` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "تم استنفاد ميزانية الكتابة",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_kyb_party(\n    \"33333333-4444-5555-6666-777777777777\",\n    \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n    is_skipped=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateKybParty(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n  {\n    is_skipped: true,\n  },\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateKYBParty(ctx, \"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\", didit.SessionsUpdateKYBPartyParams{\n\tIsSkipped: true,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateKybPartyParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateKybParty(\"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\", SessionsUpdateKybPartyParams.builder()\n        .isSkipped(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateKybParty('33333333-4444-5555-6666-777777777777', '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41', [\n    'is_skipped' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_kyb_party(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n  is_skipped: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateKybPartyAsync(\"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\", new SessionsUpdateKybPartyParams\n{\n    IsSkipped = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/travel-rule/settings/": {
      "get": {
        "summary": "الحصول على إعدادات Travel Rule",
        "description": "قراءة إعدادات Travel Rule وملف تعريف VASP للتطبيق. يتم تلقائياً إنشاء صف إعدادات افتراضي (معطل) وملف تعريف فارغ عند القراءة الأولى.",
        "operationId": "getTravelRuleSettings",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "retrieve_settings",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/settings/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.retrieve_settings()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.retrieveSettings();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RetrieveSettings(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().retrieveSettings();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->retrieveSettings();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.retrieve_settings\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RetrieveSettingsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "إعدادات Travel Rule وملف تعريف VASP الحاليان.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleSettingsDetail"
                },
                "examples": {
                  "Disabled (default)": {
                    "value": {
                      "is_enabled": false,
                      "jurisdiction": "EU",
                      "name_matching_strictness": "DEFAULT",
                      "confirmation_timeout_hours": 48,
                      "timeout_outcome": "HOLD",
                      "threshold_amount": "0.00",
                      "inbound_auto_accept": true,
                      "allow_self_declaration": true,
                      "allow_screenshot_proof": true,
                      "auto_wallet_verification": true,
                      "vasp_attribution_enabled": true,
                      "legal_name": "",
                      "lei": "",
                      "compliance_email": "",
                      "is_discoverable": true,
                      "counterparty_screening_enabled": false,
                      "sunrise_policy": "",
                      "sunrise_jurisdictions": [
                        "CO",
                        "KH",
                        "VN"
                      ],
                      "non_responsive_policy": "",
                      "travel_address": "",
                      "disabled_networks": [],
                      "networks": {
                        "gtr": {
                          "rail": "GTR",
                          "mode": "unavailable",
                          "state": "didit_onboarding",
                          "reason": "didit_membership_not_live",
                          "platform_available": false,
                          "connected": false,
                          "participant": null,
                          "vasps_reachable": 0,
                          "routed_30d": 0
                        },
                        "trust": {
                          "rail": "TRUST",
                          "mode": "unavailable",
                          "state": "unavailable",
                          "reason": "own_membership_only",
                          "platform_available": false,
                          "connected": false,
                          "participant": null,
                          "vasps_reachable": 0,
                          "routed_30d": 0
                        },
                        "verifyvasp": {
                          "rail": "VERIFYVASP",
                          "mode": "unavailable",
                          "state": "didit_onboarding",
                          "reason": "didit_membership_not_live",
                          "platform_available": false,
                          "connected": false,
                          "participant": null,
                          "vasps_reachable": 0,
                          "routed_30d": 0
                        },
                        "sygna": {
                          "rail": "SYGNA",
                          "mode": "unavailable",
                          "state": "didit_onboarding",
                          "reason": "didit_membership_not_live",
                          "platform_available": false,
                          "connected": false,
                          "participant": null,
                          "vasps_reachable": 0,
                          "routed_30d": 0
                        }
                      },
                      "didit_network": {
                        "listed": false,
                        "missing": [
                          "travel_rule_off",
                          "legal_name_missing",
                          "compliance_email_missing"
                        ],
                        "compliance_email_confirmed": false
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "تحديث إعدادات Travel Rule",
        "description": "تحديث أو إنشاء إعدادات Travel Rule وملف تعريف VASP للتطبيق. تحديث جزئي — أرسل فقط الحقول التي تريد تغييرها. يتطلب تعيين `is_enabled: true` وجود `legal_name` غير فارغ (مخزن مسبقاً أو مُضمّن في الطلب نفسه)، وإلا سيتم إرجاع 400.",
        "operationId": "updateTravelRuleSettings",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "update_settings",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleSettingsUpdate"
              },
              "example": {
                "is_enabled": true,
                "legal_name": "Origin CASP SL",
                "jurisdiction": "EU",
                "name_matching_strictness": "DEFAULT",
                "confirmation_timeout_hours": 48,
                "timeout_outcome": "HOLD",
                "is_discoverable": true
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PUT https://verification.didit.me/v3/travel-rule/settings/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"is_enabled\": true, \"legal_name\": \"Origin CASP SL\", \"jurisdiction\": \"EU\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.update_settings(\n    is_enabled=True,\n    legal_name=\"Origin CASP SL\",\n    jurisdiction=\"EU\",\n    name_matching_strictness=\"DEFAULT\",\n    confirmation_timeout_hours=48,\n    timeout_outcome=\"HOLD\",\n    is_discoverable=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.updateSettings({\n  is_enabled: true,\n  legal_name: \"Origin CASP SL\",\n  jurisdiction: \"EU\",\n  name_matching_strictness: \"DEFAULT\",\n  confirmation_timeout_hours: 48,\n  timeout_outcome: \"HOLD\",\n  is_discoverable: true,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.UpdateSettings(ctx, didit.TravelRuleSettingsUpdate{\n\tIsEnabled:                didit.Bool(true),\n\tLegalName:                didit.String(\"Origin CASP SL\"),\n\tJurisdiction:             didit.String(\"EU\"),\n\tNameMatchingStrictness:   didit.Some(didit.TravelRuleSettingsUpdateNameMatchingStrictness(\"DEFAULT\")),\n\tConfirmationTimeoutHours: didit.Int(48),\n\tTimeoutOutcome:           didit.Some(didit.TravelRuleSettingsUpdateTimeoutOutcome(\"HOLD\")),\n\tIsDiscoverable:           didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleSettingsUpdate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().updateSettings(TravelRuleSettingsUpdate.builder()\n        .isEnabled(true)\n        .legalName(\"Origin CASP SL\")\n        .jurisdiction(\"EU\")\n        .nameMatchingStrictness(TravelRuleSettingsUpdate.NameMatchingStrictness.of(\"DEFAULT\"))\n        .confirmationTimeoutHours(48L)\n        .timeoutOutcome(TravelRuleSettingsUpdate.TimeoutOutcome.of(\"HOLD\"))\n        .isDiscoverable(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->updateSettings([\n    'is_enabled' => true,\n    'legal_name' => 'Origin CASP SL',\n    'jurisdiction' => 'EU',\n    'name_matching_strictness' => 'DEFAULT',\n    'confirmation_timeout_hours' => 48,\n    'timeout_outcome' => 'HOLD',\n    'is_discoverable' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.update_settings(\n  is_enabled: true,\n  legal_name: \"Origin CASP SL\",\n  jurisdiction: \"EU\",\n  name_matching_strictness: \"DEFAULT\",\n  confirmation_timeout_hours: 48,\n  timeout_outcome: \"HOLD\",\n  is_discoverable: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.UpdateSettingsAsync(new TravelRuleSettingsUpdate\n{\n    IsEnabled = true,\n    LegalName = \"Origin CASP SL\",\n    Jurisdiction = \"EU\",\n    NameMatchingStrictness = new TravelRuleSettingsUpdateNameMatchingStrictness(\"DEFAULT\"),\n    ConfirmationTimeoutHours = 48,\n    TimeoutOutcome = new TravelRuleSettingsUpdateTimeoutOutcome(\"HOLD\"),\n    IsDiscoverable = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الإعدادات والملف التعريفي بعد التحديث، بنفس بنية GET.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleSettingsDetail"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق، على سبيل المثال التفعيل بدون legal_name، أو قيمة sunrise_policy أو non_responsive_policy بخلاف HOLD أو REJECT أو PROCEED أو فارغة، أو حقل غير معروف في `matching_rules`، أو اختيار لـ `data_sharing_fields` لا يمكنه تلبية التزامات المُرسِل الخاصة بنظام ولايتك القضائية (تتم فهرسة الأخطاء حسب نوع الكيان تحت `data_sharing_fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "legal_name": [
                    "legal_name is required to enable travel rule."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/settings/compliance-email/confirmation/": {
      "post": {
        "summary": "أرسل تأكيد البريد الإلكتروني للامتثال",
        "description": "يرسل رابط تأكيد لمرة واحدة عبر البريد الإلكتروني إلى compliance_email الخاص بملف VASP التعريفي لديك. يؤدي فتح الرابط والضغط على زر التأكيد فيه إلى تأكيد العنوان، وهو ما تحتاجه شبكة Didit قبل إدراج ملفك التعريفي. يحل أي طلب جديد محل الرابط السابق؛ ويتوقف الرابط عن العمل عند تغيير البريد الإلكتروني للامتثال. رسالة بريد إلكتروني واحدة في الدقيقة لكل عنوان.",
        "operationId": "sendTravelRuleComplianceEmailConfirmation",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "send_compliance_email_confirmation",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/settings/compliance-email/confirmation/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.send_compliance_email_confirmation()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.sendComplianceEmailConfirmation();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.SendComplianceEmailConfirmation(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().sendComplianceEmailConfirmation();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->sendComplianceEmailConfirmation();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.send_compliance_email_confirmation\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.SendComplianceEmailConfirmationAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "202": {
            "description": "تم إرسال رسالة التأكيد الإلكترونية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sent_to": {
                      "type": "string",
                      "format": "email"
                    }
                  }
                },
                "example": {
                  "sent_to": "compliance@your-vasp.example"
                }
              }
            }
          },
          "400": {
            "description": "لم يتم تعيين بريد إلكتروني للامتثال، أو تم تأكيده بالفعل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "No compliance email": {
                    "value": {
                      "compliance_email": [
                        "Set a compliance email before confirming it."
                      ]
                    }
                  },
                  "Already confirmed": {
                    "value": {
                      "compliance_email": [
                        "This compliance email is already confirmed."
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم إرسال تأكيد إلى هذا العنوان منذ أقل من دقيقة."
          },
          "503": {
            "description": "تعذر إرسال البريد الإلكتروني. لم يتغير شيء؛ أعد المحاولة بعد لحظات."
          }
        }
      }
    },
    "/v3/travel-rule/wallet-addresses/": {
      "get": {
        "summary": "عرض قائمة بإدخالات دفتر عناوين المحافظ",
        "description": "قائمة مقسمة إلى صفحات لدفتر عناوين محافظ Travel Rule لتطبيقك، الأحدث أولاً.",
        "operationId": "listTravelRuleWalletAddresses",
        "x-didit-sdk": {
          "resource": "travel_rule.wallet_addresses",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/wallet-addresses/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.wallet_addresses.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.walletAddresses.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.WalletAddresses.ListAutoPaging(ctx, didit.TravelRuleWalletAddressesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().walletAddresses().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->travelRule->walletAddresses->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.wallet_addresses.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.WalletAddresses.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "مدخلات دفتر عناوين المحافظ مقسّمة إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WalletAddressEntry"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "تسجيل عنوان محفظة",
        "description": "أضف إدخالاً إلى دفتر عناوين محافظ Travel Rule الخاص بك حتى يمكن تسوية التحويلات الواردة عبر مسار INTERNAL بناءً عليه.",
        "operationId": "createTravelRuleWalletAddress",
        "x-didit-sdk": {
          "resource": "travel_rule.wallet_addresses",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletAddressEntryCreate"
              },
              "example": {
                "address": "0xBeneficiaryWallet01",
                "chain": "ETH",
                "holder_name": "Ana Diaz",
                "holder_vendor_data": "user-042",
                "self_declared": true
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/wallet-addresses/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"address\": \"0xBeneficiaryWallet01\", \"chain\": \"ETH\", \"holder_name\": \"Ana Diaz\", \"self_declared\": true}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.wallet_addresses.create(\n    address=\"0xBeneficiaryWallet01\",\n    chain=\"ETH\",\n    holder_vendor_data=\"user-042\",\n    holder_name=\"Ana Diaz\",\n    self_declared=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.walletAddresses.create({\n  address: \"0xBeneficiaryWallet01\",\n  chain: \"ETH\",\n  holder_vendor_data: \"user-042\",\n  holder_name: \"Ana Diaz\",\n  self_declared: true,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.WalletAddresses.Create(ctx, didit.WalletAddressEntryCreate{\n\tAddress:          \"0xBeneficiaryWallet01\",\n\tChain:            didit.String(\"ETH\"),\n\tHolderVendorData: didit.String(\"user-042\"),\n\tHolderName:       didit.String(\"Ana Diaz\"),\n\tSelfDeclared:     didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.WalletAddressEntryCreate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().walletAddresses().create(WalletAddressEntryCreate.builder()\n        .address(\"0xBeneficiaryWallet01\")\n        .chain(\"ETH\")\n        .holderVendorData(\"user-042\")\n        .holderName(\"Ana Diaz\")\n        .selfDeclared(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->walletAddresses->create([\n    'address' => '0xBeneficiaryWallet01',\n    'chain' => 'ETH',\n    'holder_vendor_data' => 'user-042',\n    'holder_name' => 'Ana Diaz',\n    'self_declared' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.wallet_addresses.create(\n  address: \"0xBeneficiaryWallet01\",\n  chain: \"ETH\",\n  holder_vendor_data: \"user-042\",\n  holder_name: \"Ana Diaz\",\n  self_declared: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.WalletAddresses.CreateAsync(new WalletAddressEntryCreate\n{\n    Address = \"0xBeneficiaryWallet01\",\n    Chain = \"ETH\",\n    HolderVendorData = \"user-042\",\n    HolderName = \"Ana Diaz\",\n    SelfDeclared = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "الإدخال الذي تم إنشاؤه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletAddressEntry"
                }
              }
            }
          },
          "400": {
            "description": "محفظة مكررة (العنوان، السلسلة، وmemo) لهذا التطبيق، أو memo أو X-address لا يمكن للسلسلة حمله، أو `address` مفقود، أو `travel_address` غير صالح، أو `self_declared: true` بينما `allow_self_declaration` معطل، أو `self_declared: true` بينما `ownership_validation_mode` هو `FULL`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "Duplicate entry": {
                    "value": {
                      "address": [
                        "A wallet address entry with this address and chain already exists."
                      ]
                    }
                  },
                  "Invalid travel address": {
                    "value": {
                      "travel_address": [
                        "Invalid travel address."
                      ]
                    }
                  },
                  "Self-declaration disabled": {
                    "value": {
                      "self_declared": [
                        "Self-declared ownership is disabled for this application."
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/wallet-addresses/{entry_uuid}/": {
      "patch": {
        "summary": "تحديث البيانات الوصفية لحامل عنوان المحفظة",
        "description": "تحديث جزئي لـ holder_name وholder_vendor_data وentity_type وtravel_address. يؤدي ضبط travel_address إلى إرفاق عنوان توجيه TRP بالإدخال؛ يتم رفض القيم غير الصالحة بالرمز 400. تعرض الاستجابة هذه الحقول الأربعة فقط.",
        "operationId": "updateTravelRuleWalletAddress",
        "x-didit-sdk": {
          "resource": "travel_rule.wallet_addresses",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "entry_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletAddressEntryUpdate"
              },
              "example": {
                "holder_name": "Ana Updated",
                "travel_address": "ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH https://verification.didit.me/v3/travel-rule/wallet-addresses/{entry_uuid}/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"holder_name\": \"Ana Updated\", \"travel_address\": \"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.wallet_addresses.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    holder_name=\"Ana Updated\",\n    travel_address=\"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.walletAddresses.update(\"11111111-2222-3333-4444-555555555555\", {\n  holder_name: \"Ana Updated\",\n  travel_address: \"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.WalletAddresses.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WalletAddressEntryUpdateParam{\n\tHolderName:    didit.String(\"Ana Updated\"),\n\tTravelAddress: didit.String(\"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.WalletAddressEntryUpdate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().walletAddresses().update(\"11111111-2222-3333-4444-555555555555\", WalletAddressEntryUpdate.builder()\n        .holderName(\"Ana Updated\")\n        .travelAddress(\"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->walletAddresses->update('11111111-2222-3333-4444-555555555555', [\n    'holder_name' => 'Ana Updated',\n    'travel_address' => 'ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.wallet_addresses.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  holder_name: \"Ana Updated\",\n  travel_address: \"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.WalletAddresses.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new WalletAddressEntryUpdate\n{\n    HolderName = \"Ana Updated\",\n    TravelAddress = \"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الحقول المحدثة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletAddressEntryUpdate"
                }
              }
            }
          },
          "400": {
            "description": "`travel_address` ليس Travel Address صالحاً.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid travel address": {
                    "value": {
                      "travel_address": [
                        "Invalid travel address."
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "مدخل غير معروف أو محذوف."
          }
        }
      },
      "delete": {
        "summary": "حذف عنوان محفظة",
        "description": "يحذف المدخل مع إثباتات ملكيته ولقطات الشاشة المخزنة له. يتوقف عن مطابقة التحويلات الجديدة فوراً ويصبح العنوان متاحاً لإعادة التسجيل. تحتفظ التحويلات التي استخدمت المحفظة بالفعل بسجلها الخاص بها وتُقرأ كما هي. الحذف لا يمكن التراجع عنه.",
        "operationId": "deleteTravelRuleWalletAddress",
        "x-didit-sdk": {
          "resource": "travel_rule.wallet_addresses",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "entry_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE https://verification.didit.me/v3/travel-rule/wallet-addresses/{entry_uuid}/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.travel_rule.wallet_addresses.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.travelRule.walletAddresses.delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.TravelRule.WalletAddresses.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.travelRule().walletAddresses().delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->travelRule->walletAddresses->delete('11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.wallet_addresses.delete(\"11111111-2222-3333-4444-555555555555\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.TravelRule.WalletAddresses.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم الحذف."
          },
          "404": {
            "description": "مدخل غير معروف أو تم حذفه بالفعل."
          },
          "503": {
            "description": "`wallet_address_deletion_incomplete`: تعذر حذف ملف مخزن، لذلك توقفت عملية الحذف قبل اكتمالها. لا يزال مُدخل دفتر العناوين موجوداً؛ أعد محاولة الطلب نفسه لإنهائه.",
            "content": {
              "application/json": {
                "example": {
                  "detail": "A stored file could not be deleted, so the deletion stopped before it finished. Try again.",
                  "code": "wallet_address_deletion_incomplete"
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/vasps/": {
      "get": {
        "summary": "البحث في دليل VASP",
        "description": "بحث مقسّم إلى صفحات ومُرتب حسب الاسم في دليل VASP: مدخلات الدليل المشتركة، التي تنشئها Didit من سجل MiCA المؤقت لـ ESMA، ودليل TRISA العام، وسجل LEI العالمي وتنسيقها الخاص، بالإضافة إلى أعضاء شبكة Didit. يحمل كل صف المسارات المتاحة لتطبيقك للوصول إليه اليوم. لا يُدرج الملف التعريفي لتطبيقك أبداً. تحمل الصفوف أيضاً تقييم العناية الواجبة المشترك وقرار تطبيقك الخاص، وفحص الكيانات والاستبيانات.",
        "operationId": "listTravelRuleVasps",
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "جزء من الاسم أو الاسم المستعار (غير حساس لحالة الأحرف)، أو كود LEI محدد، أو نطاق (example.com أو رابط URL عليه). يتطابق أعضاء شبكة Didit بناءً على اسمهم القانوني أو كود LEI أو نطاق بريد الامتثال الإلكتروني الخاص بهم."
          },
          {
            "name": "network",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "GTR",
                "TRUST",
                "VERIFYVASP",
                "SYGNA",
                "TRISA"
              ]
            },
            "description": "فقط إدخالات الدليل المدرجة حاليًا في دليل أعضاء الشبكة."
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "رمز الدولة بصيغة ISO 3166 alpha-2 أو alpha-3. يُرجع 400 لأي شيء آخر."
          },
          {
            "name": "reachable",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "true: فقط جهات VASP التي يمتلك تطبيقك مساراً متاحاً إليها (بما في ذلك أعضاء شبكة Didit). false: فقط إدخالات الدليل التي لا يمكنه الوصول إليها اليوم."
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "directory",
                "didit"
              ]
            },
            "description": "إدخالات الدليل فقط، أو أعضاء شبكة Didit فقط."
          },
          {
            "name": "risk",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "LOW",
                "MEDIUM",
                "HIGH"
              ]
            },
            "description": "فقط إدخالات الدليل التي يكون risk_level لها ضمن هذا النطاق. لا يتطابق أعضاء شبكة Didit، الذين لم تُحتسب درجاتهم، مطلقًا."
          },
          {
            "name": "responsiveness",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "RESPONSIVE",
                "UNRESPONSIVE",
                "UNKNOWN"
              ]
            },
            "description": "فقط إدخالات الدليل التي تكون قيمة responsiveness.status لها مساوية لهذه القيمة. لا يطابق أعضاء شبكة Didit هذا الشرط مطلقًا."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/travel-rule/vasps/?search=counterparty&reachable=true' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.list_vasps():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.listVasps()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.ListVASPsAutoPaging(ctx, didit.TravelRuleListVASPsParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().listVasps()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->travelRule->listVasps() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.list_vasps.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.ListVaspsAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "نتائج دليل VASP مقسّمة إلى صفحات ومُرتبة حسب الاسم.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VaspDirectoryEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "تصفية غير صالحة: يحدد نص الاستجابة كل حقل، على سبيل المثال شبكة غير معروفة، أو رمز دولة، أو نطاق مخاطر، أو حالة استجابة غير معروفة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "jurisdiction": [
                    "Use an ISO 3166 alpha-2 or alpha-3 country code."
                  ],
                  "network": [
                    "\"SWIFT\" is not a valid choice."
                  ]
                }
              }
            }
          }
        },
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "list_vasps",
          "auth": "api_key",
          "server": true
        }
      }
    },
    "/v3/travel-rule/vasps/{vasp_id}/": {
      "get": {
        "summary": "الحصول على مدخل في دليل VASP",
        "description": "مدخل دليل واحد أو عضو في شبكة Didit بواسطة المعرّف الذي أرجعته عملية البحث، مع نفس الحقول والمسارات المتاحة لتطبيقك للوصول إليه.",
        "operationId": "getTravelRuleVasp",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "retrieve_vasp",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف صف في GET /v3/travel-rule/vasps/."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.retrieve_vasp(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.retrieveVasp(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RetrieveVASP(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().retrieveVasp(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->retrieveVasp('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.retrieve_vasp(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RetrieveVaspAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الإدخال.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaspDirectoryEntry"
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد إدخال أو عضو مدرج في شبكة Didit يملك هذا المعرّف.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No directory entry has this id."
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/vasps/{vasp_id}/decision/": {
      "get": {
        "summary": "الحصول على قرارك بشأن VASP",
        "description": "قرار تطبيقك بشأن الطرف المقابل (إدخال في الدليل أو عضو في شبكة Didit): مقبولة أو مقيدة أو محظورة. الكيان التابع لعلامة تجارية ليس له قرار خاص به يتبع قرار العلامة التجارية، والمذكور في inherited_from. خاص بتطبيقك.",
        "operationId": "getTravelRuleVaspDecision",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "retrieve_vasp_decision",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف صف في GET /v3/travel-rule/vasps/: مدخل في الدليل أو عضو في شبكة Didit."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.retrieve_vasp_decision(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.retrieveVaspDecision(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RetrieveVASPDecision(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().retrieveVaspDecision(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->retrieveVaspDecision('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.retrieve_vasp_decision(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RetrieveVaspDecisionAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "القرار الساري، أو null.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyDecisionResponse"
                },
                "examples": {
                  "Own decision": {
                    "value": {
                      "decision": {
                        "decision": "APPROVED",
                        "reason": "Licensed in DE, questionnaire reviewed",
                        "decided_by": "",
                        "updated_at": "2026-10-14T10:05:00Z",
                        "inherited_from": null
                      }
                    }
                  },
                  "Inherited from the brand": {
                    "value": {
                      "decision": {
                        "decision": "BLOCKED",
                        "reason": "Group refused after review",
                        "decided_by": "",
                        "updated_at": "2026-10-14T10:05:00Z",
                        "inherited_from": {
                          "id": "5e4d3c2b-1a0f-4e9d-8c7b-6a5f4e3d2c1b",
                          "name": "Example Group"
                        }
                      }
                    }
                  },
                  "No decision": {
                    "value": {
                      "decision": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد إدخال في الدليل أو عضو مدرج في شبكة Didit بهذا المعرّف. ملف VASP التعريفي الخاص بك لا يكون أبداً طرفاً مقابلاً لك.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No directory entry or Didit network member has this id."
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "تعيين قرارك بشأن VASP",
        "description": "اتخاذ قرار تطبيقك أو تغييره بشأن طرف مقابل: APPROVED أو RESTRICTED أو BLOCKED، مع سبب اختياري. لا يغير هذا الإدخال المشترك في الدليل أبداً ويعمل فقط من خلال قواعد المعاملات الخاصة بك (counterparty_dd_status). يشمل القرار المتخذ بشأن علامة تجارية أيضاً كل كيان تابع لها ليس له قرار خاص به.",
        "operationId": "updateTravelRuleVaspDecision",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "update_vasp_decision",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف صف في GET /v3/travel-rule/vasps/: مدخل في الدليل أو عضو في شبكة Didit."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleCounterpartyDecisionRequest"
              },
              "example": {
                "decision": "BLOCKED",
                "reason": "Unlicensed in its home jurisdiction"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PUT https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"decision\": \"BLOCKED\", \"reason\": \"Unlicensed in its home jurisdiction\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.update_vasp_decision(\n    \"11111111-2222-3333-4444-555555555555\",\n    decision=\"BLOCKED\",\n    reason=\"Unlicensed in its home jurisdiction\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.updateVaspDecision(\"11111111-2222-3333-4444-555555555555\", {\n  decision: \"BLOCKED\",\n  reason: \"Unlicensed in its home jurisdiction\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.UpdateVASPDecision(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleCounterpartyDecisionRequest{\n\tDecision: \"BLOCKED\",\n\tReason:   didit.String(\"Unlicensed in its home jurisdiction\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleCounterpartyDecisionRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().updateVaspDecision(\"11111111-2222-3333-4444-555555555555\", TravelRuleCounterpartyDecisionRequest.builder()\n        .decision(TravelRuleCounterpartyDecisionRequest.Decision.of(\"BLOCKED\"))\n        .reason(\"Unlicensed in its home jurisdiction\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->updateVaspDecision('11111111-2222-3333-4444-555555555555', [\n    'decision' => 'BLOCKED',\n    'reason' => 'Unlicensed in its home jurisdiction',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.update_vasp_decision(\n  \"11111111-2222-3333-4444-555555555555\",\n  decision: \"BLOCKED\",\n  reason: \"Unlicensed in its home jurisdiction\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.UpdateVaspDecisionAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleCounterpartyDecisionRequest\n{\n    Decision = \"BLOCKED\",\n    Reason = \"Unlicensed in its home jurisdiction\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "القرار الساري حاليًا.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyDecisionResponse"
                },
                "example": {
                  "decision": {
                    "decision": "BLOCKED",
                    "reason": "Unlicensed in its home jurisdiction",
                    "decided_by": "",
                    "updated_at": "2026-10-14T10:05:00Z",
                    "inherited_from": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "القرار مفقود أو ليس واحدًا من APPROVED أو RESTRICTED أو BLOCKED، أو أن السبب يتجاوز 255 حرفًا.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "decision": [
                    "\"MAYBE\" is not a valid choice."
                  ]
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد إدخال في الدليل أو عضو مدرج في شبكة Didit بهذا المعرّف. ملف VASP التعريفي الخاص بك لا يكون أبداً طرفاً مقابلاً لك.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No directory entry or Didit network member has this id."
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "مسح قرارك بشأن VASP",
        "description": "مسح القرار الخاص بتطبيقك بشأن الطرف المقابل. تُظهر الاستجابة القرار الذي يسري بعد ذلك: null، أو بالنسبة لكيان تابع لعلامة تجارية، قرار العلامة التجارية الذي يتبعه الكيان مجدداً.",
        "operationId": "clearTravelRuleVaspDecision",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "clear_vasp_decision",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف صف في GET /v3/travel-rule/vasps/: مدخل في الدليل أو عضو في شبكة Didit."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.clear_vasp_decision(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.clearVaspDecision(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.ClearVASPDecision(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().clearVaspDecision(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->clearVaspDecision('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.clear_vasp_decision(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.ClearVaspDecisionAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم اعتماد القرار؛ يعرض نص الاستجابة القرار الساري حاليًا.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyDecisionResponse"
                },
                "example": {
                  "decision": null
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد طرف مقابل بهذا المعرّف، أو أن تطبيقك ليس لديه قرار خاص به بشأنه (القرار الذي يرثه التطبيق فقط من علامته التجارية لا يمكن مسحه هنا: امسح قرار العلامة التجارية).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Unknown id": {
                    "value": {
                      "detail": "No directory entry or Didit network member has this id."
                    }
                  },
                  "No decision of its own": {
                    "value": {
                      "detail": "This application has no decision of its own on this counterparty."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/vasps/{vasp_id}/screening/": {
      "get": {
        "summary": "الحصول على فحص كيان VASP",
        "description": "ما إذا كان فحص الطرف المقابل مفعّلاً لتطبيقك، وتكلفة الفحص الواحد على مؤسستك، والمدة التي تظل فيها النتيجة حديثة، وآخر فحص للعقوبات والأخبار السلبية أجريته للطرف المقابل. القراءة مجانية.",
        "operationId": "getTravelRuleVaspScreening",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "retrieve_vasp_screening",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف صف في GET /v3/travel-rule/vasps/: مدخل في الدليل أو عضو في شبكة Didit."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/screening/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.retrieve_vasp_screening(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.retrieveVaspScreening(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RetrieveVASPScreening(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().retrieveVaspScreening(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->retrieveVaspScreening('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.retrieve_vasp_screening(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RetrieveVaspScreeningAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "إعداد الفحص الخاص بك، وسعره، وأحدث فحص أجريته.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyScreeningStatus"
                },
                "example": {
                  "enabled": true,
                  "price": "0.20",
                  "fresh_days": 30,
                  "screening": {
                    "id": "7a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "status": "Approved",
                    "total_hits": 0,
                    "score": null,
                    "screened_at": "2026-10-14T09:58:00Z",
                    "fresh": true,
                    "flagged": false
                  }
                }
              }
            }
          },
          "403": {
            "description": "عقد مؤسستك ليس لديه سعر مهيأ لفحص الطرف المقابل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No contract rate is configured for this usage type."
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد إدخال في الدليل أو عضو مدرج في شبكة Didit بهذا المعرّف. ملف VASP التعريفي الخاص بك لا يكون أبداً طرفاً مقابلاً لك.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No directory entry or Didit network member has this id."
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "فحص VASP",
        "description": "فحص كيان الطرف المقابل مقابل العقوبات والأخبار السلبية لتطبيقك. ميزة اختيارية: يجب تفعيل counterparty_screening_enabled في إعدادات Travel Rule الخاصة بك. يتم فوترة كل فحص جديد بسعر فحص AML للشركات الخاص بمؤسستك؛ ويتم إرجاع فحص يقل عمره عن 30 يوماً بدلاً من ذلك (200، بدون فوترة) ما لم ترسل refresh: true. يتم تشغيل عملية فحص واحدة لطرف مقابل في كل مرة لكل تطبيق. تكون النتيجة خاصة بتطبيقك. لا يتم فحص تطبيقات البيئة التجريبية إطلاقاً.",
        "operationId": "screenTravelRuleVasp",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "screen_vasp",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف صف في GET /v3/travel-rule/vasps/: مدخل في الدليل أو عضو في شبكة Didit."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleCounterpartyScreeningRequest"
              },
              "example": {
                "refresh": false
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/screening/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"refresh\": false}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.screen_vasp(\n    \"11111111-2222-3333-4444-555555555555\",\n    refresh=False,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.screenVasp(\"11111111-2222-3333-4444-555555555555\", {\n  refresh: false,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.ScreenVASP(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleCounterpartyScreeningRequest{\n\tRefresh: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleCounterpartyScreeningRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().screenVasp(\"11111111-2222-3333-4444-555555555555\", TravelRuleCounterpartyScreeningRequest.builder()\n        .refresh(false)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->screenVasp('11111111-2222-3333-4444-555555555555', [\n    'refresh' => false,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.screen_vasp(\n  \"11111111-2222-3333-4444-555555555555\",\n  refresh: false\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.ScreenVaspAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleCounterpartyScreeningRequest\n{\n    Refresh = false,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "يوجد فحص حديث بالفعل وتم إرجاعه. لم تتم فوترة أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyScreeningResult"
                },
                "example": {
                  "outcome": "reused",
                  "screening": {
                    "id": "7a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "status": "Approved",
                    "total_hits": 0,
                    "score": null,
                    "screened_at": "2026-10-14T09:58:00Z",
                    "fresh": true,
                    "flagged": false
                  }
                }
              }
            }
          },
          "201": {
            "description": "تم إجراء فحص جديد وتمت فوترته.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyScreeningResult"
                },
                "example": {
                  "outcome": "screened",
                  "screening": {
                    "id": "7a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "status": "In Review",
                    "total_hits": 2,
                    "score": 85.0,
                    "screened_at": "2026-10-14T09:58:00Z",
                    "fresh": true,
                    "flagged": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "نص الطلب غير صالح، أو ليس لدى الطرف المقابل اسم لفحصه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": [
                    "This counterparty has no name to screen."
                  ]
                }
              }
            }
          },
          "403": {
            "description": "رصيد مؤسستك لا يغطي الفحص (الرمز insufficient_credits؛ لم يتم تشغيل أي شيء ولم تتم فوترة أي شيء)، أو أن عقدك ليس لديه سعر مهيأ له.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "You don't have enough credits to perform this request. Please top up at https://business.didit.me",
                  "code": "insufficient_credits"
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد إدخال في الدليل أو عضو مدرج في شبكة Didit بهذا المعرّف. ملف VASP التعريفي الخاص بك لا يكون أبداً طرفاً مقابلاً لك.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No directory entry or Didit network member has this id."
                }
              }
            }
          },
          "409": {
            "description": "لم يتم تشغيل أي شيء ولم تتم فوترة أي شيء: فحص الطرف المقابل معطّل لتطبيقك، أو التطبيق في البيئة التجريبية، أو أن فحص هذا الطرف المقابل قيد التشغيل بالفعل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Screening off": {
                    "value": {
                      "detail": "Counterparty screening is turned off. Enable it in the Travel Rule settings first."
                    }
                  },
                  "Sandbox application": {
                    "value": {
                      "detail": "Counterparty screening does not run for sandbox applications."
                    }
                  },
                  "Already running": {
                    "value": {
                      "detail": "A screening of this counterparty is already running. Try again in a moment."
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "تعذر إكمال الفحص. لم تتم فوترة أي شيء؛ أعد المحاولة بعد لحظات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "The screening provider did not answer. Try again in a moment."
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/vasps/{vasp_id}/questionnaires/": {
      "get": {
        "summary": "سرد استبيانات العناية الواجبة مع VASP",
        "description": "كل استبيان عناية واجبة أرسله تطبيقك إلى الطرف المقابل، الأحدث أولاً، مع حالته وإجاباته بمجرد الرد عليه. خاص بتطبيقك.",
        "operationId": "listTravelRuleVaspQuestionnaires",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "list_vasp_questionnaires",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف صف في GET /v3/travel-rule/vasps/: مدخل في الدليل أو عضو في شبكة Didit."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/questionnaires/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.list_vasp_questionnaires(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.listVaspQuestionnaires(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.ListVASPQuestionnaires(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().listVaspQuestionnaires(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->listVaspQuestionnaires('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.list_vasp_questionnaires(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.ListVaspQuestionnairesAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "استبياناتك مع هذا الطرف المقابل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyQuestionnaireList"
                },
                "example": {
                  "questionnaires": [
                    {
                      "id": "3f9e8d7c-6b5a-4c3d-9e2f-1a0b9c8d7e6f",
                      "status": "SENT",
                      "form_version": "1",
                      "sent_to": "travelrule@counterparty.example",
                      "sent_at": "2026-10-14T10:00:00Z",
                      "expires_at": "2026-11-13T10:00:00Z",
                      "answered_at": null,
                      "valid_until": null,
                      "current": false,
                      "answers": {}
                    },
                    {
                      "id": "8b7a6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
                      "status": "ANSWERED",
                      "form_version": "1",
                      "sent_to": "travelrule@counterparty.example",
                      "sent_at": "2026-09-02T08:00:00Z",
                      "expires_at": "2026-10-02T08:00:00Z",
                      "answered_at": "2026-09-04T15:20:00Z",
                      "valid_until": "2027-09-04T15:20:00Z",
                      "current": true,
                      "answers": {
                        "legal_name": "Example Counterparty VASP, incorporated in the example jurisdiction.",
                        "licensing": "Crypto-asset service provider authorised under MiCA by its national regulator, licence active.",
                        "jurisdictions": "EU and EEA. We do not serve the United States.",
                        "aml_program": "Written AML/CFT policy, annual independent review, last completed in March 2026.",
                        "compliance_officer": "Head of Compliance, reachable at compliance@counterparty.example.",
                        "sanctions_screening": "Customers at onboarding and daily; counterparties on every transfer.",
                        "transaction_monitoring": "Rule-based monitoring with analyst review; suspicious activity reports filed with the FIU.",
                        "travel_rule": "TRP and email; we answer requests within one business day.",
                        "custody": "Segregated customer wallets held with a qualified custodian, insured.",
                        "ownership": "No shareholder holds 25 percent or more; parent company Example Holding Group.",
                        "record_keeping": "Five-year record-keeping for Travel Rule and transaction data, as our regulator requires.",
                        "data_protection": "Encrypted at rest and in transit, stored in the EU."
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد إدخال في الدليل أو عضو مدرج في شبكة Didit بهذا المعرّف. ملف VASP التعريفي الخاص بك لا يكون أبداً طرفاً مقابلاً لك.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No directory entry or Didit network member has this id."
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "إرسال استبيان العناية الواجبة إلى VASP",
        "description": "إرسال استبيان العناية الواجبة القياسي من Didit عبر البريد الإلكتروني إلى عنوان الامتثال المسجل للطرف المقابل، مع رابط إجابة للاستخدام مرة واحدة. لدى الطرف المقابل 30 يوماً للإجابة على كل سؤال؛ وتبقى الإجابات سارية لمدة 365 يوماً. يؤدي الإرسال الجديد إلى استبدال الاستبيان السابق غير المُجاب عنه والمُرسل إلى الطرف المقابل نفسه، ويتوقف رابطه عن العمل. بريد إلكتروني واحد في الدقيقة لكل عنوان.",
        "operationId": "sendTravelRuleVaspQuestionnaire",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "send_vasp_questionnaire",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف صف في GET /v3/travel-rule/vasps/: مدخل في الدليل أو عضو في شبكة Didit."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleCounterpartyQuestionnaireRequest"
              },
              "example": {
                "sent_to": "travelrule@counterparty.example"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/questionnaires/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"sent_to\": \"travelrule@counterparty.example\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.send_vasp_questionnaire(\n    \"11111111-2222-3333-4444-555555555555\",\n    sent_to=\"travelrule@counterparty.example\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.sendVaspQuestionnaire(\"11111111-2222-3333-4444-555555555555\", {\n  sent_to: \"travelrule@counterparty.example\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.SendVASPQuestionnaire(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleCounterpartyQuestionnaireRequest{\n\tSentTo: didit.String(\"travelrule@counterparty.example\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleCounterpartyQuestionnaireRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().sendVaspQuestionnaire(\"11111111-2222-3333-4444-555555555555\", TravelRuleCounterpartyQuestionnaireRequest.builder()\n        .sentTo(\"travelrule@counterparty.example\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->sendVaspQuestionnaire('11111111-2222-3333-4444-555555555555', [\n    'sent_to' => 'travelrule@counterparty.example',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.send_vasp_questionnaire(\n  \"11111111-2222-3333-4444-555555555555\",\n  sent_to: \"travelrule@counterparty.example\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.SendVaspQuestionnaireAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleCounterpartyQuestionnaireRequest\n{\n    SentTo = \"travelrule@counterparty.example\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "202": {
            "description": "تم إرسال الاستبيان عبر البريد الإلكتروني.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyQuestionnaire"
                },
                "example": {
                  "id": "3f9e8d7c-6b5a-4c3d-9e2f-1a0b9c8d7e6f",
                  "status": "SENT",
                  "form_version": "1",
                  "sent_to": "travelrule@counterparty.example",
                  "sent_at": "2026-10-14T10:00:00Z",
                  "expires_at": "2026-11-13T10:00:00Z",
                  "answered_at": null,
                  "valid_until": null,
                  "current": false,
                  "answers": {}
                }
              }
            }
          },
          "400": {
            "description": "sent_to ليس عنوان بريد إلكتروني صالحاً أو ليس عنوان امتثال مسجلاً للطرف المقابل، أو لا يوجد عنوان امتثال مسجل للطرف المقابل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not on record": {
                    "value": {
                      "sent_to": [
                        "Send the questionnaire to a compliance address on record for this counterparty."
                      ]
                    }
                  },
                  "No address": {
                    "value": {
                      "sent_to": [
                        "No compliance address is on record for this counterparty. Add a contact for it first."
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد إدخال في الدليل أو عضو مدرج في شبكة Didit بهذا المعرّف. ملف VASP التعريفي الخاص بك لا يكون أبداً طرفاً مقابلاً لك.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No directory entry or Didit network member has this id."
                }
              }
            }
          },
          "429": {
            "description": "تم إرسال استبيان إلى هذا العنوان منذ أقل من دقيقة."
          },
          "503": {
            "description": "تعذر إرسال البريد الإلكتروني ولم يتم إنشاء أي استبيان. أعد المحاولة بعد لحظات."
          }
        }
      }
    },
    "/v3/transactions/{transaction_id}/travel-rule/": {
      "patch": {
        "summary": "إنهاء أو إلغاء أو إعادة إرسال أو تحديث محفظة المُرسِل لتحويل Travel Rule",
        "description": "قدّم `payment_txn_id` للإبلاغ عن الهاش على السلسلة ونقل تحويل صادر بحالة COMPLETED إلى FINISHED (ينتقل نظيره عبر مسار INTERNAL أيضاً إلى FINISHED)، أو `{\"action\": \"cancel\"}` لإلغاء تحويل غير نهائي، أو `{\"action\": \"resend\"}` لإعادة توجيه تحويل صادر عالق في COUNTERPARTY_VASP_NOT_FOUND أو COUNTERPARTY_VASP_NOT_REACHABLE أو NOT_ENOUGH_COUNTERPARTY_DATA مجدداً (قم بتحسين بيانات الطرف المقابل أولاً، مثل إضافة travel_address إلى إدخال محفظة الوجهة). ينطبق resend على التحويلات الصادرة فقط. يستبدل `{\"action\": \"update_compliance_email\", \"compliance_email\": \"desk@example.com\"}` بريد الامتثال الإلكتروني لتحويل صادر في إحدى تلك الحالات الثلاث، وهو الحل لـ `reason: email_undeliverable`: لا تتغير الحالة، وترسل عملية `resend` التالية الطلب إلى ذلك العنوان. تتم إضافة إعادة الإرسال إلى قائمة الانتظار، ولا يتم تشغيلها داخل الطلب: تُظهر الاستجابة عودة التحويل إلى AWAITING_COUNTERPARTY مع إدخال `resend queued` في المخطط الزمني وعملية `delivery` في قائمة الانتظار، وتصل الوجهة التي أُرسل إليها في حدث webhook من نوع `travel_rule.status.updated`. عندما يتم التحويل عبر GTR أو VerifyVASP أو Sygna Bridge، تتعرف الشبكة على الهاش على السلسلة أو الإلغاء بعد الاستجابة، مع عمليات إعادة المحاولة؛ وتوضح `delivery` حالة تلك الرسالة. يسجل `{\"action\": \"update_originator_wallet\", \"wallet_address\": \"...\"}` المحفظة التي خرجت منها الأموال بالفعل في تحويل صادر، على سبيل المثال العنوان الذي تم بث سحب UTXO منه بدلاً من المحفظة الرئيسية التي صرحت بها. يغير هذا السجل فقط: لا يتم إرسال أي شيء إلى الطرف المقابل مجدداً وتبقى الحالة كما هي. يصبح المُرسِل `chain_details.originator` مع `source: updated`، ويُضاف التغيير إلى `timeline` مع المحفظة السابقة والجديدة، ويتم تحديث نظير التحويل عبر مسار INTERNAL بالطريقة نفسها. يحدد `{\"action\": \"beneficiary_vasp\", \"beneficiary_vasp\": \"<directory VASP id>\"}` الطرف المقابل بنفسك عندما يتعذر الاكتشاف، وذلك لتحويل صادر في COUNTERPARTY_VASP_NOT_FOUND أو COUNTERPARTY_VASP_NOT_REACHABLE أو NOT_ENOUGH_COUNTERPARTY_DATA: يتم توجيه التحويل إلى VASP هذا وإرساله مجدداً.",
        "operationId": "patchTravelRuleTransfer",
        "x-didit-sdk": {
          "resource": "transactions.travel_rule",
          "method": "update_transfer",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID الثابت للمعاملة من Didit التي تملك التحويل.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleTransferPatchRequest"
              },
              "examples": {
                "Finish": {
                  "value": {
                    "payment_txn_id": "0xchainhash"
                  }
                },
                "Cancel": {
                  "value": {
                    "action": "cancel"
                  }
                },
                "Resend": {
                  "value": {
                    "action": "resend"
                  }
                },
                "Update compliance email": {
                  "value": {
                    "action": "update_compliance_email",
                    "compliance_email": "desk@example.com"
                  }
                },
                "Update originator wallet": {
                  "value": {
                    "action": "update_originator_wallet",
                    "wallet_address": "bc1qOriginatorInputAddress01"
                  }
                },
                "Name the counterparty": {
                  "value": {
                    "action": "beneficiary_vasp",
                    "beneficiary_vasp": "9f1c2b34-5d6e-4f70-8a91-b2c3d4e5f607"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"payment_txn_id\": \"0xchainhash\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.update_transfer(\n    \"11111111-2222-3333-4444-555555555555\",\n    payment_txn_id=\"0xchainhash\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.updateTransfer(\"11111111-2222-3333-4444-555555555555\", {\n  payment_txn_id: \"0xchainhash\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.UpdateTransfer(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleTransferPatchRequest{\n\tPaymentTxnID: didit.String(\"0xchainhash\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleTransferPatchRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().updateTransfer(\"11111111-2222-3333-4444-555555555555\", TravelRuleTransferPatchRequest.builder()\n        .paymentTxnId(\"0xchainhash\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->travelRule->updateTransfer('11111111-2222-3333-4444-555555555555', [\n    'payment_txn_id' => '0xchainhash',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.travel_rule.update_transfer(\n  \"11111111-2222-3333-4444-555555555555\",\n  payment_txn_id: \"0xchainhash\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.UpdateTransferAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleTransferPatchRequest\n{\n    PaymentTxnId = \"0xchainhash\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التحويل المحدث. بعد `update_compliance_email` تبقى حالته دون تغيير ويحتفظ بـ `reason: email_undeliverable` حتى عملية `resend` التالية.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleTransferDetail"
                }
              }
            }
          },
          "400": {
            "description": "لم يتم تقديم payment_txn_id ولا إجراء مدعوم، أو أن `compliance_email` مفقود أو ليس عنوان بريد إلكتروني صالحاً في `update_compliance_email`، أو بالنسبة لـ `update_originator_wallet`، لا يوجد wallet_address، أو توجد محفظة أو مذكرة لا يمكن لسلسلة التحويل حملها، أو محفظة ليست ضمن مدخلات UTXO الخاصة بالتحويل، أو أن `beneficiary_vasp` مفقود أو ليس معرّف VASP صالحاً في الدليل.",
            "content": {
              "application/json": {
                "examples": {
                  "No action": {
                    "value": {
                      "detail": [
                        "Provide payment_txn_id, action=cancel, action=resend, action=beneficiary_vasp, action=update_originator_wallet or action=update_compliance_email."
                      ]
                    }
                  },
                  "Invalid compliance email": {
                    "value": {
                      "compliance_email": [
                        "Enter a valid email address."
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "معاملة غير معروفة، أو لا تحتوي المعاملة على تحويل Travel Rule، أو (الإجراء `beneficiary_vasp`) لا يوجد إدخال في الدليل يحمل هذا المعرّف."
          },
          "409": {
            "description": "التحويل ليس في حالة تسمح بهذه العملية (مثل ألا يكون COMPLETED/صادراً للإنهاء، أو نهائياً بالفعل للإلغاء، أو ليس تحويلاً صادراً في حالة قابلة لإعادة الإرسال من أجل إعادة الإرسال). يُجيب `update_compliance_email` بـ `409` للتحويل الوارد، وللتحويل الصادر خارج حالات COUNTERPARTY_VASP_NOT_FOUND وCOUNTERPARTY_VASP_NOT_REACHABLE وNOT_ENOUGH_COUNTERPARTY_DATA. يُجيب `update_originator_wallet` بـ `409` للتحويل الوارد أو الملغى أو منتهي الصلاحية. يُجيب `beneficiary_vasp` بـ `409` ما لم يكن التحويل صادراً وفي إحدى الحالات COUNTERPARTY_VASP_NOT_FOUND أو COUNTERPARTY_VASP_NOT_REACHABLE أو NOT_ENOUGH_COUNTERPARTY_DATA.",
            "content": {
              "application/json": {
                "examples": {
                  "Cancel from a terminal status": {
                    "value": {
                      "detail": "Transfer is already in a terminal state."
                    }
                  },
                  "Resend not allowed": {
                    "value": {
                      "detail": "Transfer cannot be resent from its current state."
                    }
                  },
                  "Finish not allowed": {
                    "value": {
                      "detail": "Transfer must be an outbound transfer in COMPLETED status to finish."
                    }
                  },
                  "Compliance email cannot change": {
                    "value": {
                      "detail": "The compliance email of this transfer cannot change from its current state."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/transactions/{transaction_id}/travel-rule/ownership/": {
      "post": {
        "summary": "تأكيد أو نفي ملكية المحفظة",
        "description": "حل تحويل معلق بانتظار ملكية المحفظة: استدعه من جانبك في التحويل عندما تكون حالته UNCONFIRMED_OWNERSHIP، أو عندما يكون تحويلاً وارداً في حالة ON_HOLD. يؤدي التأكيد إلى تمييز إدخال دفتر عناوين المحافظ المطابق كجهة تم التحقق من ملكيتها (بالنسبة لتحويل وارد في حالة ON_HOLD لا يحتوي على أي إدخال، يُنشئ Didit إدخالاً من beneficiary_data.wallet_address) ويُشغّل مطابقة اسم المستفيد على كلا جانبي التحويل؛ بينما يؤدي الرفض إلى رفض كلا الجانبين. ينتقل التحويل الوارد الذي تمت تسوية إيداعه بالفعل إلى FINISHED عند نجاح المطابقة. وعندما يُعلن أن محفظة الطرف المقابل ذاتية الاستضافة (counterparty.payment_method.method_type: unhosted_wallet)، يُسجل التأكيد أن العميل تحقق من هوية المتحكم في تلك المحفظة ويُكمل التحويل (COMPLETED) في كلا الاتجاهين، أو FINISHED لإيداع وارد تكون التجزئة على السلسلة الخاصة به معروفة بالفعل. المحفظة التي تم التحقق منها هي محفظة الطرف المقابل: وجهة السحب الصادر، أو مصدر الإيداع الوارد (محفظة المُرسِل). إذا لم تكن موجودة في دفتر عناوين المحافظ لديك بعد، يُضيفها Didit كجهة تم التحقق من ملكيتها تحت اسم الطرف المقابل؛ وإذا كان الدفتر يحتوي عليها بالفعل تحت اسم حامل مختلف، ينتقل التحويل إلى COUNTERPARTY_MISMATCHED_DATA. بالنسبة لتحويل TRP وارد في حالة UNCONFIRMED_OWNERSHIP أو ON_HOLD أو COUNTERPARTY_MISMATCHED_DATA، يُرسل Didit قرارك إلى VASP المُرسِل بدلاً من ذلك: الموافقة تُعيد عنوان الدفع (wallet_address، أو عنوان الإدخال المطابق) وتنقل التحويل إلى COMPLETED، والرفض يؤدي إلى رفضه. يفصل الاستدعاء نفسه أيضاً في تحويل وارد أرسله طرف مقابل من GTR أو Sygna Bridge وينتظر مراجعتك (`UNCONFIRMED_OWNERSHIP` أو `ON_HOLD` أو `COUNTERPARTY_MISMATCHED_DATA`): حيث تقبله القيمة `confirmed: true` (مرّر `wallet_address` عندما لا يذكر التحويل أي عنوان) وترفضه القيمة `confirmed: false`، ويتم الرد على الشبكة بعد الاستجابة، مع محاولات إعادة. يتلقى VerifyVASP إجابته عند طلبها، لذا فإن أي تحويل من VerifyVASP يتطلب مراجعتك يُرفض على الفور ولا يمكن الفصل فيه لاحقاً.",
        "operationId": "confirmTravelRuleOwnership",
        "x-didit-sdk": {
          "resource": "transactions.travel_rule",
          "method": "confirm_ownership",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID الثابت من Didit للمعاملة التي يحتفظ بها تطبيقك لهذا التحويل: معاملة جانب المستفيد في تحويل عبر مسار INTERNAL، أو المعاملة التي أنشأتها (صادرة أو واردة) عندما تم التصريح بأن محفظة الطرف المقابل ذاتية الاستضافة.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleOwnershipConfirmRequest"
              },
              "example": {
                "confirmed": true
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/ownership/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"confirmed\": true}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.confirm_ownership(\n    \"11111111-2222-3333-4444-555555555555\",\n    confirmed=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.confirmOwnership(\"11111111-2222-3333-4444-555555555555\", {\n  confirmed: true,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.ConfirmOwnership(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleOwnershipConfirmRequest{\n\tConfirmed: true,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleOwnershipConfirmRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().confirmOwnership(\"11111111-2222-3333-4444-555555555555\", TravelRuleOwnershipConfirmRequest.builder()\n        .confirmed(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->travelRule->confirmOwnership('11111111-2222-3333-4444-555555555555', [\n    'confirmed' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.travel_rule.confirm_ownership(\n  \"11111111-2222-3333-4444-555555555555\",\n  confirmed: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.ConfirmOwnershipAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleOwnershipConfirmRequest\n{\n    Confirmed = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التحويل المحدث. بالنسبة للتحويل الوارد، تظل originator_data/beneficiary_data الخاصة بالطرف المقابل محجوبة (`data_masked: true`) حتى يتم تأكيد الملكية، ثم تسجل `data_unmasked` متى ولماذا وبواسطة من تم كشفها.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleTransferDetail"
                }
              }
            }
          },
          "409": {
            "description": "التحويل لا ينتظر تأكيد الملكية، أو لا يوجد مُدخل في دفتر عناوين المحافظ يطابق محفظة الطرف المقابل، أو يتطلب تحويل INTERNAL من عميل Didit آخر إثبات تحكم (رسالة موقعة أو إيداع تجريبي) قبل تأكيده، أو تمت الإجابة بالفعل على تحويل شبكة عبر شبكته (تحويل VerifyVASP، أو تحويل GTR أو Sygna Bridge قررت فيه أنت أو Didit بالفعل).",
            "content": {
              "application/json": {
                "examples": {
                  "Not awaiting confirmation": {
                    "value": {
                      "detail": "Transfer is not awaiting ownership confirmation."
                    }
                  },
                  "No matching address book entry": {
                    "value": {
                      "detail": "wallet address entry no longer available"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق: confirmed مفقود، أو أن موافقة TRP الواردة لا تحتوي على wallet_address ولا يوجد عنوان بديل للاعتماد عليه، أو `confirmed: true` في تحويل مُعلن إلى محفظة ذاتية الاستضافة لا يحدد محفظة الطرف المقابل ولم يتم إرسال أي `wallet_address`.",
            "content": {
              "application/json": {
                "examples": {
                  "No payment address": {
                    "value": {
                      "wallet_address": [
                        "wallet_address is required to approve."
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "معاملة غير معروفة، أو لا تحتوي المعاملة على تحويل Travel Rule."
          },
          "502": {
            "description": "لتحويلات TRP الواردة فقط: لم تتمكن Didit من تسليم قرارك إلى VASP المُرسِل، لذلك لا تتغير حالة التحويل.",
            "content": {
              "application/json": {
                "examples": {
                  "Callback not delivered": {
                    "value": {
                      "detail": "Counterparty inquiry-resolution callback could not be delivered."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/transactions/{transaction_id}/travel-rule/messages/": {
      "get": {
        "summary": "سرد رسائل Travel Rule",
        "description": "الرسائل وطلبات المستندات المتبادلة مع VASP الطرف المقابل بخصوص هذه المعاملة.",
        "operationId": "listTravelRuleMessages",
        "x-didit-sdk": {
          "resource": "transactions.travel_rule",
          "method": "list_messages",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID الثابت للمعاملة من Didit التي تملك التحويل.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.list_messages(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.listMessages(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.ListMessages(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().listMessages(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->travelRule->listMessages('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.travel_rule.list_messages(\"11111111-2222-3333-4444-555555555555\").each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.ListMessagesAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الرسائل، الأقدم أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TravelRuleMessage"
                  }
                }
              }
            }
          },
          "404": {
            "description": "معاملة أو token غير معروف، أو لا يوجد تحويل Travel Rule في المعاملة."
          }
        }
      },
      "post": {
        "summary": "إرسال رسالة Travel Rule أو طلب مستند",
        "description": "يرسل رسالة أو طلب مستند إلى VASP الطرف المقابل. يعمل مع التحويلات INTERNAL (يراها عميل Didit الآخر على جانبه من الثنائي) وتحويلات EMAIL (يتم إرسال بريد إلكتروني إلى الطرف المقابل ويجيب في بوابة الاستلام). لا يحمل أي تحويل عبر TRP أو GTR أو TRUST أو VerifyVASP أو Sygna أي رسائل، لأن هذه البروتوكولات لا تدعمها. الحدود: 100 رسالة لكل تحويل، و5000 حرف لكل نص، و10 مستندات مطلوبة، و5 ملفات بحجم 10 ميجابايت لكل منها.",
        "operationId": "createTravelRuleMessage",
        "x-didit-sdk": {
          "resource": "transactions.travel_rule",
          "method": "create_message",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID الثابت للمعاملة من Didit التي تملك التحويل.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleMessageCreateRequest"
              },
              "example": {
                "kind": "DOCUMENT_REQUEST",
                "body": "Please confirm the date of birth of the beneficiary.",
                "requested_documents": [
                  "Proof of address"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleMessageCreateRequest"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"kind\": \"DOCUMENT_REQUEST\", \"body\": \"Please confirm the date of birth of the beneficiary.\", \"requested_documents\": [\"Proof of address\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.create_message(\n    \"11111111-2222-3333-4444-555555555555\",\n    kind=\"DOCUMENT_REQUEST\",\n    body=\"Please confirm the date of birth of the beneficiary.\",\n    requested_documents=[\"Proof of address\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.createMessage(\"11111111-2222-3333-4444-555555555555\", {\n  kind: \"DOCUMENT_REQUEST\",\n  body: \"Please confirm the date of birth of the beneficiary.\",\n  requested_documents: [\"Proof of address\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.CreateMessage(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleMessageCreateRequest{\n\tKind:               didit.Some(didit.TravelRuleMessageCreateRequestKind(\"DOCUMENT_REQUEST\")),\n\tBody:               didit.String(\"Please confirm the date of birth of the beneficiary.\"),\n\tRequestedDocuments: didit.Some([]string{\"Proof of address\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.TravelRuleMessageCreateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().createMessage(\"11111111-2222-3333-4444-555555555555\", TravelRuleMessageCreateRequest.builder()\n        .kind(TravelRuleMessageCreateRequest.Kind.of(\"DOCUMENT_REQUEST\"))\n        .body(\"Please confirm the date of birth of the beneficiary.\")\n        .requestedDocuments(List.of(\"Proof of address\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->travelRule->createMessage('11111111-2222-3333-4444-555555555555', [\n    'kind' => 'DOCUMENT_REQUEST',\n    'body' => 'Please confirm the date of birth of the beneficiary.',\n    'requested_documents' => ['Proof of address'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.travel_rule.create_message(\n  \"11111111-2222-3333-4444-555555555555\",\n  kind: \"DOCUMENT_REQUEST\",\n  body: \"Please confirm the date of birth of the beneficiary.\",\n  requested_documents: [\"Proof of address\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.CreateMessageAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleMessageCreateRequest\n{\n    Kind = new TravelRuleMessageCreateRequestKind(\"DOCUMENT_REQUEST\"),\n    Body = \"Please confirm the date of birth of the beneficiary.\",\n    RequestedDocuments = new string[] { \"Proof of address\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "الرسالة المخزنة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleMessage"
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح، أو نوع الملف أو حجمه غير مقبول، أو وجود أكثر من 100 رسالة في التحويل، أو `reply_to` لا يمثل رسالة تابعة لهذا التحويل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "requested_documents": [
                    "Name at least one document the counterparty should send."
                  ]
                }
              }
            }
          },
          "404": {
            "description": "معاملة أو token غير معروف، أو لا يوجد تحويل Travel Rule في المعاملة."
          },
          "409": {
            "description": "لا يمكن لأي رسالة الوصول إلى الطرف المقابل. يوضح حقل `detail` السبب: إما أن التحويل يتم عبر شبكة مسار (TRP أو GTR أو TRUST أو VerifyVASP أو Sygna)، أو ليس لديه طرف مقابل بعد، أو أن بيانات تحويل INTERNAL لم تتطابق مع حامل المحفظة فلم يصل أي شيء إلى المستلم، أو أن رابط الاستلام الخاص بتحويل EMAIL قد انتهت صلاحيته أو تم إغلاق التحويل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/pickup/{token}/": {
      "get": {
        "summary": "الحصول على معلومات استلام email-rail",
        "description": "عام وغير مصادق عليه. يتيح لـ VASP الطرف المقابل غير التابع لـ Didit معاينة عملية التبادل المعلقة من رابط الاستلام المُرسل عبر البريد الإلكتروني. يُعد الـ token نفسه هو وسيلة المصادقة.",
        "operationId": "getTravelRulePickup",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "retrieve_pickup",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "قيمة `?contact=` الخاصة بالرابط، وهي جهة الاتصال التي أُرسل إليها الرابط. يتم إرجاعها كقيمة `contact` دون تغيير؛ ولا يتم التحقق من صحتها."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://verification.didit.me/v3/travel-rule/pickup/{token}/"
          }
        ],
        "responses": {
          "200": {
            "description": "معاينة الاستلام.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRulePickupInfo"
                },
                "example": {
                  "reference": "33333333-4444-5555-6666-777777777777",
                  "requested_at": "2026-07-05T10:00:00Z",
                  "originator_vasp_name": "Origin CASP SL",
                  "originator_vasp_lei": "529900EXAMPLEORIG001",
                  "recipient_vasp_name": "Example Counterparty VASP",
                  "language": "es",
                  "amount": "0.250000000000000000",
                  "currency": "ETH",
                  "fiat_amount": "",
                  "fiat_currency": "",
                  "chain": "ETH",
                  "beneficiary_wallet": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb",
                  "status": "AWAITING_COUNTERPARTY",
                  "ivms_version": "ivms101.2023",
                  "deadline_at": "2026-07-07T10:00:00Z",
                  "reminders_sent": 0,
                  "contact": "",
                  "decline_reasons": [
                    "data_mismatch",
                    "not_our_customer",
                    "wallet_not_hosted",
                    "sanctions",
                    "risk_appetite",
                    "jurisdiction",
                    "insufficient_data",
                    "other"
                  ],
                  "join_invitation": {
                    "eligible": false,
                    "url": ""
                  },
                  "originator_data": {
                    "name": "Jane Doe",
                    "wallet_address": "0x77ccff0cc624a53cd8b8d8703ced826710211ec7"
                  },
                  "beneficiary_data": {
                    "name": "Ana Diaz",
                    "wallet_address": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb"
                  },
                  "ivms_request": {
                    "originator": {
                      "originatorPersons": [
                        {
                          "naturalPerson": {
                            "name": {
                              "nameIdentifier": [
                                {
                                  "primaryIdentifier": "Doe",
                                  "secondaryIdentifier": "Jane",
                                  "nameIdentifierType": "LEGL"
                                }
                              ]
                            }
                          }
                        }
                      ],
                      "accountNumber": [
                        "0x77ccff0cc624a53cd8b8d8703ced826710211ec7"
                      ]
                    },
                    "beneficiary": {
                      "beneficiaryPersons": [
                        {
                          "naturalPerson": {
                            "name": {
                              "nameIdentifier": [
                                {
                                  "primaryIdentifier": "Diaz",
                                  "secondaryIdentifier": "Ana",
                                  "nameIdentifierType": "LEGL"
                                }
                              ]
                            }
                          }
                        }
                      ],
                      "accountNumber": [
                        "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb"
                      ]
                    }
                  },
                  "data_masked": false
                }
              }
            }
          },
          "404": {
            "description": "token غير معروف."
          },
          "410": {
            "description": "أُغلقت النافذة: استجاب الطرف المقابل بالفعل، أو غادر التحويل حالة AWAITING_COUNTERPARTY، أو انقضى الموعد النهائي."
          }
        }
      }
    },
    "/v3/travel-rule/pickup/{token}/respond/": {
      "post": {
        "summary": "الرد على عملية استلام عبر مسار البريد الإلكتروني",
        "description": "عام وغير مصادق عليه. يقبل التبادل أو يرفضه من رابط الاستلام المرسل عبر البريد الإلكتروني. عند القبول، يتم فحص beneficiary_name مقابل سياسة name_matching_strictness الخاصة بالمُرسِل.",
        "operationId": "respondTravelRulePickup",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "respond_pickup",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "قيمة `?contact=` الخاصة بالرابط. تُستخدم عندما لا يرسل نص الطلب أي `contact`."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRulePickupRespondRequest"
              },
              "example": {
                "decision": "accept",
                "beneficiary_name": "Carlos Ruiz"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/pickup/{token}/respond/ \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\": \"accept\", \"beneficiary_name\": \"Carlos Ruiz\"}'"
          }
        ],
        "responses": {
          "200": {
            "description": "حالة التبادل الناتجة: COMPLETED أو COUNTERPARTY_MISMATCHED_DATA بعد القبول، أو COUNTERPARTY_VASP_GENERAL_DECLINE بعد الرفض، والتي تعكس أيضاً `decline_reason`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "decline_reason": {
                      "type": "string",
                      "description": "موجود بعد الرفض."
                    }
                  }
                },
                "examples": {
                  "accepted": {
                    "value": {
                      "status": "COMPLETED"
                    }
                  },
                  "declined": {
                    "value": {
                      "status": "COUNTERPARTY_VASP_GENERAL_DECLINE",
                      "decline_reason": "not_our_customer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "حقل غير صالح: على سبيل المثال، `decision` مفقود أو لا يحمل القيمة `accept` أو `decline`، أو `decline_detail` مفقود في حالة الرفض مع `decline_reason: other`، أو `ivms_response` ليس كائن IVMS 101 أو أطول من 16384 حرفاً، أو `contact` في نص الطلب ليس بصيغة UUID (`{\"contact\": [\"Must be a valid UUID.\"]}`).",
            "content": {
              "application/json": {
                "example": {
                  "decline_detail": [
                    "Say what the reason is when you choose another reason."
                  ]
                }
              }
            }
          },
          "404": {
            "description": "token غير معروف."
          },
          "410": {
            "description": "أُغلقت النافذة: استجاب الطرف المقابل بالفعل، أو غادر التحويل حالة AWAITING_COUNTERPARTY، أو انقضى الموعد النهائي."
          }
        }
      }
    },
    "/v3/travel-rule/pickup/{token}/messages/": {
      "get": {
        "summary": "عرض رسائل الاستلام",
        "description": "عام وغير مصادق عليه. رسائل تحويل عبر مسار EMAIL كما يقرؤها الـ VASP الطرف المقابل: ما أرسله العميل يكون `INBOUND` وموقّعاً باسم VASP العميل. يُعد الـ token هو وسيلة المصادقة.",
        "operationId": "listTravelRulePickupMessages",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "list_pickup_messages",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://verification.didit.me/v3/travel-rule/pickup/{token}/messages/"
          }
        ],
        "responses": {
          "200": {
            "description": "الرسائل، الأقدم أولاً، من جانب الطرف المقابل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TravelRuleMessage"
                  }
                }
              }
            }
          },
          "404": {
            "description": "token غير معروف."
          },
          "410": {
            "description": "انتهت صلاحية رابط الاستلام أو تم إغلاق التحويل."
          }
        }
      },
      "post": {
        "summary": "الرد في بوابة الاستلام",
        "description": "عام وغير مصادق عليه. يرد VASP الطرف المقابل على تحويل عبر مسار EMAIL. نفس محتوى رسائل المعاملة؛ يجب أن تكون المرفقات بتنسيق PDF أو PNG أو JPEG أو WebP. يُعد الـ token وسيلة المصادقة.",
        "operationId": "createTravelRulePickupMessage",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "create_pickup_message",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleMessageCreateRequest"
              },
              "example": {
                "kind": "MESSAGE",
                "body": "Attached is the proof of address of the wallet holder."
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleMessageCreateRequest"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/pickup/{token}/messages/ \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\": \"MESSAGE\", \"body\": \"Attached is the proof of address of the wallet holder.\"}'"
          }
        ],
        "responses": {
          "201": {
            "description": "الرسالة المخزنة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleMessage"
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح، أو نوع الملف أو حجمه غير مقبول، أو وجود أكثر من 100 رسالة في التحويل، أو `reply_to` لا يمثل رسالة تابعة لهذا التحويل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "requested_documents": [
                    "Name at least one document the counterparty should send."
                  ]
                }
              }
            }
          },
          "404": {
            "description": "token غير معروف."
          },
          "410": {
            "description": "انتهت صلاحية رابط الاستلام أو تم إغلاق التحويل."
          }
        }
      }
    },
    "/v3/travel-rule/inbound/": {
      "post": {
        "summary": "تسجيل تحويل وارد بعد الإيداع (sunrise)",
        "description": "تسجيل بيانات Travel Rule لإيداع تشفير تمت تسويته بالفعل على السلسلة قبل حدوث أي تبادل. ينشئ معاملة travelRule واردة (أو يعيد استخدام إيداع لم تتم المطالبة به) ويطابق التحويل مع دفتر عناوين محفظتك. بالنسبة لمعاملة تم إنشاؤها حديثاً، ترسل Didit إشعار webhook بحدث transaction.created أولاً وتتبعه إشعارات travel_rule.status.updated.",
        "operationId": "registerTravelRuleInbound",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "register_inbound",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleInboundRequest"
              },
              "example": {
                "chain": "ETH",
                "txid": "0xdeposit-hash",
                "wallet_address": "0xYourDepositWallet",
                "amount": "500.00",
                "currency": "USDC",
                "originator_data": {
                  "name": "Origin CASP SL"
                },
                "beneficiary_data": {
                  "name": "Ana Diaz"
                },
                "originating_vasp": {
                  "name": "Origin CASP SL",
                  "lei": "",
                  "travel_address": "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/inbound/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"chain\":\"ETH\",\"txid\":\"0xdeposit-hash\",\"wallet_address\":\"0xYourDepositWallet\",\"amount\":\"500.00\",\"currency\":\"USDC\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.register_inbound(\n    chain=\"ETH\",\n    txid=\"0xdeposit-hash\",\n    wallet_address=\"0xYourDepositWallet\",\n    amount=\"500.00\",\n    currency=\"USDC\",\n    originator_data={\"name\": \"Origin CASP SL\"},\n    beneficiary_data={\"name\": \"Ana Diaz\"},\n    originating_vasp={\n        \"name\": \"Origin CASP SL\",\n        \"lei\": \"\",\n        \"travel_address\": \"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\",\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.registerInbound({\n  chain: \"ETH\",\n  txid: \"0xdeposit-hash\",\n  wallet_address: \"0xYourDepositWallet\",\n  amount: \"500.00\",\n  currency: \"USDC\",\n  originator_data: { name: \"Origin CASP SL\" },\n  beneficiary_data: { name: \"Ana Diaz\" },\n  originating_vasp: {\n    name: \"Origin CASP SL\",\n    lei: \"\",\n    travel_address: \"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\",\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RegisterInbound(ctx, didit.TravelRuleInboundRequest{\n\tChain:           \"ETH\",\n\tTxid:            \"0xdeposit-hash\",\n\tWalletAddress:   \"0xYourDepositWallet\",\n\tAmount:          \"500.00\",\n\tCurrency:        \"USDC\",\n\tOriginatorData:  didit.Some(map[string]any{\"name\": \"Origin CASP SL\"}),\n\tBeneficiaryData: didit.Some(map[string]any{\"name\": \"Ana Diaz\"}),\n\tOriginatingVASP: didit.Some(didit.TravelRuleInboundRequestOriginatingVASP{\n\t\tName:          didit.String(\"Origin CASP SL\"),\n\t\tLei:           didit.String(\"\"),\n\t\tTravelAddress: didit.String(\"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\"),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.TravelRuleInboundRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().registerInbound(TravelRuleInboundRequest.builder()\n        .chain(\"ETH\")\n        .txid(\"0xdeposit-hash\")\n        .walletAddress(\"0xYourDepositWallet\")\n        .amount(\"500.00\")\n        .currency(\"USDC\")\n        .originatorData(Map.of(\"name\", \"Origin CASP SL\"))\n        .beneficiaryData(Map.of(\"name\", \"Ana Diaz\"))\n        .originatingVasp(TravelRuleInboundRequest.OriginatingVasp.builder()\n                .name(\"Origin CASP SL\")\n                .lei(\"\")\n                .travelAddress(\"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\")\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->registerInbound([\n    'chain' => 'ETH',\n    'txid' => '0xdeposit-hash',\n    'wallet_address' => '0xYourDepositWallet',\n    'amount' => '500.00',\n    'currency' => 'USDC',\n    'originator_data' => ['name' => 'Origin CASP SL'],\n    'beneficiary_data' => ['name' => 'Ana Diaz'],\n    'originating_vasp' => [\n        'name' => 'Origin CASP SL',\n        'lei' => '',\n        'travel_address' => 'ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC',\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.register_inbound(\n  chain: \"ETH\",\n  txid: \"0xdeposit-hash\",\n  wallet_address: \"0xYourDepositWallet\",\n  amount: \"500.00\",\n  currency: \"USDC\",\n  originator_data: { name: \"Origin CASP SL\" },\n  beneficiary_data: { name: \"Ana Diaz\" },\n  originating_vasp: {\n    name: \"Origin CASP SL\",\n    lei: \"\",\n    travel_address: \"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\",\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RegisterInboundAsync(new TravelRuleInboundRequest\n{\n    Chain = \"ETH\",\n    Txid = \"0xdeposit-hash\",\n    WalletAddress = \"0xYourDepositWallet\",\n    Amount = \"500.00\",\n    Currency = \"USDC\",\n    OriginatorData = new Dictionary<string, object> { [\"name\"] = \"Origin CASP SL\" },\n    BeneficiaryData = new Dictionary<string, object> { [\"name\"] = \"Ana Diaz\" },\n    OriginatingVasp = new TravelRuleInboundRequestOriginatingVasp\n    {\n        Name = \"Origin CASP SL\",\n        Lei = \"\",\n        TravelAddress = \"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\",\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تسجيل تحويل مسبقاً لـ txid و wallet_address هذين؛ يتم إرجاع التحويل الحالي دون تغيير (created بقيمة false).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleInboundResponse"
                }
              }
            }
          },
          "201": {
            "description": "تم تسجيل تحويل Travel Rule جديد، لمعاملة واردة جديدة أو لإيداع حالي لم تتم المطالبة به (قيمة created هي true).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleInboundResponse"
                }
              }
            }
          },
          "400": {
            "description": "حقل مطلوب (`chain`، `txid`، `wallet_address`، `amount`، `currency`) مفقود، أو `originating_vasp.lei` ليس LEI صالحاً، أو `originating_vasp.travel_address` ليس Travel Address صالحاً، أو مذكرة (memo) أو X-address أو `utxo` لا يمكن للشبكة حمله، أو `originator_data` / `beneficiary_data` ليس كائناً.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing field": {
                    "value": {
                      "txid": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid LEI": {
                    "value": {
                      "originating_vasp": {
                        "lei": [
                          "Invalid LEI: expected 20 alphanumeric characters (ISO 17442)."
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/test-vasp/inbound/": {
      "post": {
        "summary": "بدء تحويل وارد من VASP الاختباري من Didit (البيئة التجريبية)",
        "description": "لتطبيقات البيئة التجريبية فقط. يرسل Didit Test VASP إلى تطبيقك تحويلاً وارداً لـ Travel Rule، حتى تتمكن من تجربة جانب الاستلام في التبادل من البداية إلى النهاية قبل الانتقال إلى بيئة الإنتاج. يتم تسجيل التحويل واتخاذ القرار بشأنه بنفس المنطق الذي يُطبقه تحويل وارد حقيقي من شبكة ما على دفتر عناوين محفظتك، لذا تعمل كل من صندوق الوارد والقرار وتدفق ملكية المحفظة تماماً كما تفعل في بيئة الإنتاج. لا يخرج أي شيء من Didit. يتلقى التطبيق المباشر 400. أرسل القيمة نفسها لـ `reference` مرة أخرى للحصول على التحويل الذي سجله الاستدعاء الأول بدلاً من إنشاء تحويل ثانٍ.",
        "operationId": "triggerTravelRuleTestVaspInbound",
        "x-didit-sdk": {
          "resource": "transactions.travel_rule",
          "method": "trigger_test_vasp_inbound",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleTestVaspInboundRequest"
              },
              "example": {
                "beneficiary_wallet_address": "0xYourSandboxWallet",
                "scenario": "accept",
                "amount": "1",
                "reference": "demo-001"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/test-vasp/inbound/ \\\n  -H 'x-api-key: YOUR_SANDBOX_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"beneficiary_wallet_address\":\"0xYourSandboxWallet\",\"scenario\":\"accept\",\"reference\":\"demo-001\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.trigger_test_vasp_inbound(\n    beneficiary_wallet_address=\"0xYourSandboxWallet\",\n    scenario=\"accept\",\n    amount=\"1\",\n    reference=\"demo-001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.triggerTestVaspInbound({\n  beneficiary_wallet_address: \"0xYourSandboxWallet\",\n  scenario: \"accept\",\n  amount: \"1\",\n  reference: \"demo-001\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.TriggerTestVASPInbound(ctx, didit.TravelRuleTestVASPInboundRequest{\n\tBeneficiaryWalletAddress: \"0xYourSandboxWallet\",\n\tScenario:                 didit.Some(didit.TravelRuleTestVASPInboundRequestScenario(\"accept\")),\n\tAmount:                   didit.String(\"1\"),\n\tReference:                didit.String(\"demo-001\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleTestVaspInboundRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().triggerTestVaspInbound(TravelRuleTestVaspInboundRequest.builder()\n        .beneficiaryWalletAddress(\"0xYourSandboxWallet\")\n        .scenario(TravelRuleTestVaspInboundRequest.Scenario.of(\"accept\"))\n        .amount(\"1\")\n        .reference(\"demo-001\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->travelRule->triggerTestVaspInbound([\n    'beneficiary_wallet_address' => '0xYourSandboxWallet',\n    'scenario' => 'accept',\n    'amount' => '1',\n    'reference' => 'demo-001',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.travel_rule.trigger_test_vasp_inbound(\n  beneficiary_wallet_address: \"0xYourSandboxWallet\",\n  scenario: \"accept\",\n  amount: \"1\",\n  reference: \"demo-001\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.TriggerTestVaspInboundAsync(new TravelRuleTestVaspInboundRequest\n{\n    BeneficiaryWalletAddress = \"0xYourSandboxWallet\",\n    Scenario = new TravelRuleTestVaspInboundRequestScenario(\"accept\"),\n    Amount = \"1\",\n    Reference = \"demo-001\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم تسجيل التحويل الوارد واتخاذ القرار بشأنه. يؤدي التكرار باستخدام نفس `reference` إلى إرجاع نفس النص الأساسي.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleTestVaspInboundResponse"
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح، أو `scenario` غير معروف أو غير مدعوم، أو أن التطبيق هو تطبيق إنتاج مباشر.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "تعذر تسجيل التحويل، على سبيل المثال لعدم تفعيل Travel Rule للتطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/widget-session/": {
      "post": {
        "summary": "إصدار جلسة أداة ملكية المحفظة",
        "description": "إنشاء رابط/token لأداة إثبات ملكية المحفظة المستضافة. وجّه العميل إلى الرابط المُرجع لإثبات التحكم في المحفظة (توقيع الرسالة، أو اختبار ساتوشي، أو لقطة شاشة، أو إقرار ذاتي). الأداة مخصصة للويب فقط في هذا الإصدار - افتح الرابط في متصفح النظام أو علامة تبويب مخصصة، ولا تفتحه أبدًا داخل عرض ويب لحزمة SDK للهاتف المحمول.",
        "operationId": "createTravelRuleWidgetSession",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "create_widget_session",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleWidgetSessionCreate"
              },
              "example": {
                "wallet_address": "0xd3b62acb76fb27a7f8961ec40fa11746b113aca9",
                "chain": "ETH",
                "holder_name": "Jane Doe",
                "vendor_data": "user-042",
                "transaction_id": "99999999-aaaa-bbbb-cccc-dddddddddddd",
                "expires_in_minutes": 60
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/widget-session/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"wallet_address\":\"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\"chain\":\"ETH\",\"holder_name\":\"Jane Doe\",\"transaction_id\":\"99999999-aaaa-bbbb-cccc-dddddddddddd\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.create_widget_session(\n    wallet_address=\"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\n    chain=\"ETH\",\n    holder_name=\"Jane Doe\",\n    vendor_data=\"user-042\",\n    transaction_id=\"99999999-aaaa-bbbb-cccc-dddddddddddd\",\n    expires_in_minutes=60,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.createWidgetSession({\n  wallet_address: \"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\n  chain: \"ETH\",\n  holder_name: \"Jane Doe\",\n  vendor_data: \"user-042\",\n  transaction_id: \"99999999-aaaa-bbbb-cccc-dddddddddddd\",\n  expires_in_minutes: 60,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.CreateWidgetSession(ctx, didit.TravelRuleWidgetSessionCreate{\n\tWalletAddress:    didit.String(\"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\"),\n\tChain:            didit.String(\"ETH\"),\n\tHolderName:       didit.String(\"Jane Doe\"),\n\tVendorData:       didit.String(\"user-042\"),\n\tTransactionID:    didit.String(\"99999999-aaaa-bbbb-cccc-dddddddddddd\"),\n\tExpiresInMinutes: didit.Int(60),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWidgetSessionCreate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().createWidgetSession(TravelRuleWidgetSessionCreate.builder()\n        .walletAddress(\"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\")\n        .chain(\"ETH\")\n        .holderName(\"Jane Doe\")\n        .vendorData(\"user-042\")\n        .transactionId(\"99999999-aaaa-bbbb-cccc-dddddddddddd\")\n        .expiresInMinutes(60L)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->createWidgetSession([\n    'wallet_address' => '0xd3b62acb76fb27a7f8961ec40fa11746b113aca9',\n    'chain' => 'ETH',\n    'holder_name' => 'Jane Doe',\n    'vendor_data' => 'user-042',\n    'transaction_id' => '99999999-aaaa-bbbb-cccc-dddddddddddd',\n    'expires_in_minutes' => 60,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.create_widget_session(\n  wallet_address: \"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\n  chain: \"ETH\",\n  holder_name: \"Jane Doe\",\n  vendor_data: \"user-042\",\n  transaction_id: \"99999999-aaaa-bbbb-cccc-dddddddddddd\",\n  expires_in_minutes: 60\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.CreateWidgetSessionAsync(new TravelRuleWidgetSessionCreate\n{\n    WalletAddress = \"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\n    Chain = \"ETH\",\n    HolderName = \"Jane Doe\",\n    VendorData = \"user-042\",\n    TransactionId = \"99999999-aaaa-bbbb-cccc-dddddddddddd\",\n    ExpiresInMinutes = 60,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "جلسة الأداة التي تم إنشاؤها حديثاً.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح: `callback_url` ليس رابط http(s) مطلقاً، أو `expires_in_minutes` يقع خارج النطاق من 5 إلى 10080، أو `transaction_id` ليس UUID، أو أحد الحقول يتجاوز حده الأقصى.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid callback_url": {
                    "value": {
                      "callback_url": [
                        "callback_url must be an absolute http(s) URL."
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`transaction_id` لا يشير إلى تحويل Travel Rule في هذا التطبيق."
          }
        }
      }
    },
    "/v3/travel-rule/widget/{token}/": {
      "get": {
        "summary": "الحصول على سياق أداة إثبات ملكية المحفظة",
        "description": "endpoint قراءة عام مفتاحه هو token جلسة عنصر واجهة المستخدم - ولا يتطلب أي مفتاح API. يُرجع سياق عنصر واجهة المستخدم بالإضافة إلى حالة كل إثبات، حتى تتمكن من استطلاعه دورياً لاكتشاف الاكتمال؛ وتصبح قيمة completed_at غير مساوية لـ null بمجرد التحقق من الإثبات. يمكن أن يظل إثبات SATOSHI_TEST في الحالة PENDING بينما تظهر عملية الإيداع الخاصة به على السلسلة ولكنها غير مؤكدة بعد - حيث تعيد مهمة في الخلفية التحقق منه تلقائياً وتكمله بمجرد تأكيد الإيداع، لذا لا يلزم اتخاذ أي إجراء من جانب العميل أثناء الانتظار. يحمل كل إثبات الحقول التي تتطلبها طريقته: deposit_address وexpected_amount وقيمة expires_at الخاصة به لـ SATOSHI_TEST؛ وchallenge لـ MESSAGE_SIGNING. يُفضل استخدام webhook لـ travel_rule.status.updated بدلاً من الاستطلاع الدوري عندما تكون الجلسة مرتبطة بتحويل.",
        "operationId": "getTravelRuleWidgetContext",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "retrieve_widget_context",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "token جلسة مبهم يُعاد عند إنشاء جلسة الأداة.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://verification.didit.me/v3/travel-rule/widget/{token}/"
          }
        ],
        "responses": {
          "200": {
            "description": "سياق الأداة وحالات الإثبات.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetContext"
                }
              }
            }
          },
          "404": {
            "description": "token غير معروف."
          },
          "410": {
            "description": "انتهت صلاحية الجلسة دون اكتمالها."
          }
        }
      }
    },
    "/v3/travel-rule/widget/{token}/vasps/": {
      "get": {
        "summary": "البحث عن جهات VASP من أداة المحفظة",
        "description": "endpoint قراءة عام مفتاحه هو token جلسة عنصر واجهة المستخدم، ولا يتطلب أي مفتاح API: أداة اختيار VASP لعنصر واجهة المستخدم الخاص بالمستخدم النهائي. تتضمن البحث وعوامل التصفية نفسها الخاصة بـ GET /v3/travel-rule/vasps/ لتطبيق عنصر واجهة المستخدم، وتجيب فقط عن هوية كل VASP وما إذا كان يمكن الوصول إليه.",
        "operationId": "listTravelRuleWidgetVasps",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "list_widget_vasps",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "token جلسة مبهم يُعاد عند إنشاء جلسة الأداة.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "جزء من الاسم أو الاسم المستعار (غير حساس لحالة الأحرف)، أو كود LEI محدد، أو نطاق (example.com أو رابط URL عليه). يتطابق أعضاء شبكة Didit بناءً على اسمهم القانوني أو كود LEI أو نطاق بريد الامتثال الإلكتروني الخاص بهم."
          },
          {
            "name": "network",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "GTR",
                "TRUST",
                "VERIFYVASP",
                "SYGNA",
                "TRISA"
              ]
            },
            "description": "فقط إدخالات الدليل المدرجة حاليًا في دليل أعضاء الشبكة."
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "رمز الدولة بصيغة ISO 3166 alpha-2 أو alpha-3. يُرجع 400 لأي شيء آخر."
          },
          {
            "name": "reachable",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "true: فقط جهات VASP التي يمتلك تطبيقك مساراً متاحاً إليها (بما في ذلك أعضاء شبكة Didit). false: فقط إدخالات الدليل التي لا يمكنه الوصول إليها اليوم."
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "directory",
                "didit"
              ]
            },
            "description": "إدخالات الدليل فقط، أو أعضاء شبكة Didit فقط."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl 'https://verification.didit.me/v3/travel-rule/widget/{token}/vasps/?search=counterparty'"
          }
        ],
        "responses": {
          "200": {
            "description": "نتائج مقسّمة إلى صفحات ومفرزة حسب الاسم.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VaspDirectoryWidgetEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "تصفية غير صالحة: يحدد نص الطلب كل حقل، على سبيل المثال شبكة غير معروفة أو رمز دولة غير معروف.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "jurisdiction": [
                    "Use an ISO 3166 alpha-2 or alpha-3 country code."
                  ],
                  "network": [
                    "\"SWIFT\" is not a valid choice."
                  ]
                }
              }
            }
          },
          "404": {
            "description": "token غير معروف."
          },
          "410": {
            "description": "انتهت صلاحية الجلسة."
          }
        }
      },
      "post": {
        "summary": "اختر VASP الطرف المقابل في عنصر واجهة المحفظة",
        "description": "endpoint كتابة عام مفتاحه هو token جلسة عنصر واجهة المستخدم، ولا يتطلب أي مفتاح API: اختار المستخدم النهائي جهة VASP المقصودة التي تعذر على الاكتشاف التلقائي تحديدها. لا يقبله إلا التحويل الصادر بالحالة COUNTERPARTY_VASP_NOT_FOUND أو COUNTERPARTY_VASP_NOT_REACHABLE أو NOT_ENOUGH_COUNTERPARTY_DATA. يتم توجيه التحويل إلى VASP هذا وإرساله مجدداً؛ ولا يتجاوز الاكتشاف التلقائي هذا الاختيار أبداً.",
        "operationId": "selectTravelRuleWidgetVasp",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "select_widget_vasp",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "token جلسة مبهم يُعاد عند إنشاء جلسة الأداة.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "vasp"
                ],
                "properties": {
                  "vasp": {
                    "type": "string",
                    "format": "uuid",
                    "description": "معرّف `id` الخاص بـ VASP من `GET /v3/travel-rule/widget/{token}/vasps/`."
                  }
                }
              },
              "example": {
                "vasp": "9f1c2b34-5d6e-4f70-8a91-b2c3d4e5f607"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/widget/{token}/vasps/ \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vasp\": \"9f1c2b34-5d6e-4f70-8a91-b2c3d4e5f607\"}'"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تسجيل الاختيار وتجري إعادة إرسال التحويل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "transfer_status": {
                      "type": "string",
                      "description": "حالة التحويل بعد الاختيار."
                    },
                    "counterparty_vasp": {
                      "type": "string",
                      "description": "اسم VASP الذي اختاره المستخدم النهائي."
                    }
                  }
                },
                "example": {
                  "detail": "Counterparty VASP selected; the transfer is being resent.",
                  "transfer_status": "AWAITING_COUNTERPARTY",
                  "counterparty_vasp": "Northwind Exchange"
                }
              }
            }
          },
          "400": {
            "description": "`vasp` مفقود، أو لا يوجد إدخال نشط في الدليل يحمل هذا المعرّف.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "vasp": [
                    "No directory entry has this id."
                  ]
                }
              }
            }
          },
          "404": {
            "description": "token غير معروف."
          },
          "409": {
            "description": "جلسة الأداة غير مرتبطة بتحويل Travel Rule، أو أن التحويل ليس تحويلاً صادراً في حالة تقبل طرفاً مقابلاً."
          },
          "410": {
            "description": "انتهت صلاحية الجلسة."
          }
        }
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/vendor-users/toggle-ongoing-monitoring/": {
      "patch": {
        "summary": "تبديل حالة مراقبة AML المستمرة للمستخدمين",
        "description": "يُمكّن مراقبة AML المستمرة أو يُعطّلها على مستوى المستخدم. يتم الاحتفاظ بفحص AML مُراقب واحد بالضبط لكل مستخدم؛ أما المستخدمون الذين ليس لديهم أي فحص AML (مثل المستخدمين المستوردين) فيتم إنشاء فحص لهم وإجراؤه أولاً، وتتم فوترته كفحص AML عادي. عيّن estimate_only لمعاينة الأعداد والتكاليف دون كتابة البيانات. تُعالج الدفعات المكوّنة من 20 عنصراً أو أقل مباشرةً ضمن الاستجابة (200, COMPLETED)؛ بينما تُرجع الدفعات الأكبر 202 وتعمل بشكل غير متزامن.",
        "operationId": "toggle_vendor_users_ongoing_monitoring",
        "x-didit-sdk": {
          "resource": "users",
          "method": "set_ongoing_monitoring",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OngoingMonitoringToggleRequest"
              },
              "example": {
                "is_enabled": true,
                "didit_internal_id_list": [
                  "5b9a0000-0000-4000-8000-00000000f00d"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "التقدير (عند تعيين estimate_only) أو المهمة المكتملة للدفعات الصغيرة التي تمت معالجتها مباشرةً.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringToggleResult"
                }
              }
            }
          },
          "202": {
            "description": "تتم معالجة الدفعات الأكبر بشكل غير متزامن؛ استعلم دورياً من endpoint الخاصة بالمهمة باستخدام job_id المُرجع.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringJob"
                }
              }
            }
          },
          "403": {
            "description": "امتياز write:sessions مفقود، أو الرصيد غير كافٍ للتفعيل (يتم تضمين التقدير في نص الخطأ)."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.users.set_ongoing_monitoring(\n    is_enabled=True,\n    didit_internal_id_list=[\"5b9a0000-0000-4000-8000-00000000f00d\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.users.setOngoingMonitoring({\n  is_enabled: true,\n  didit_internal_id_list: [\"5b9a0000-0000-4000-8000-00000000f00d\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Users.SetOngoingMonitoring(ctx, didit.OngoingMonitoringToggleRequest{\n\tIsEnabled:           true,\n\tDiditInternalIDList: didit.Some([]string{\"5b9a0000-0000-4000-8000-00000000f00d\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.OngoingMonitoringToggleRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.users().setOngoingMonitoring(OngoingMonitoringToggleRequest.builder()\n        .isEnabled(true)\n        .diditInternalIdList(List.of(\"5b9a0000-0000-4000-8000-00000000f00d\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->users->setOngoingMonitoring([\n    'is_enabled' => true,\n    'didit_internal_id_list' => ['5b9a0000-0000-4000-8000-00000000f00d'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.users.set_ongoing_monitoring(\n  is_enabled: true,\n  didit_internal_id_list: [\"5b9a0000-0000-4000-8000-00000000f00d\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Users.SetOngoingMonitoringAsync(new OngoingMonitoringToggleRequest\n{\n    IsEnabled = true,\n    DiditInternalIdList = new string[] { \"5b9a0000-0000-4000-8000-00000000f00d\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/vendor-users/toggle-ongoing-monitoring/{job_id}/": {
      "get": {
        "summary": "الحصول على مهمة مراقبة AML المستمرة",
        "description": "التقدم وعدادات كل نتيجة لمهمة تبديل حالة المراقبة. قم بالاستقصاء كل ثانيتين تقريباً طالما أن الحالة هي PENDING أو PROCESSING.",
        "operationId": "get_vendor_users_ongoing_monitoring_job",
        "x-didit-sdk": {
          "resource": "users",
          "method": "retrieve_ongoing_monitoring_job",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID لمهمة المراقبة الذي يعيده endpoint التبديل."
          }
        ],
        "responses": {
          "200": {
            "description": "المهمة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringJob"
                }
              }
            }
          },
          "404": {
            "description": "مهمة غير معروفة لهذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.users.retrieve_ongoing_monitoring_job(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.users.retrieveOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Users.RetrieveOngoingMonitoringJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.users().retrieveOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->users->retrieveOngoingMonitoringJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.users.retrieve_ongoing_monitoring_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Users.RetrieveOngoingMonitoringJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/vendor-businesses/toggle-ongoing-monitoring/": {
      "patch": {
        "summary": "تبديل حالة مراقبة AML المستمرة للشركات",
        "description": "المعادل على مستوى الشركة لتبديل المستخدم: فحص AML مراقَب واحد لكل شركة، مع فحص الشركات التي تفتقر إلى أي فحص AML أولاً (كيان الشركة). نفس شروط estimate_only والمسار السريع المضمن وعقد المهمة غير المتزامنة.",
        "operationId": "toggle_vendor_businesses_ongoing_monitoring",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "set_ongoing_monitoring",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OngoingMonitoringToggleRequest"
              },
              "example": {
                "is_enabled": true,
                "didit_internal_id_list": [
                  "b0000000-0000-4000-8000-0000000000b1"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "التقدير (عند تعيين estimate_only) أو المهمة المكتملة للدفعات الصغيرة التي تمت معالجتها مباشرةً.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringToggleResult"
                }
              }
            }
          },
          "202": {
            "description": "تتم معالجة الدفعات الأكبر بشكل غير متزامن؛ استعلم دورياً من endpoint الخاصة بالمهمة باستخدام job_id المُرجع.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringJob"
                }
              }
            }
          },
          "403": {
            "description": "امتياز write:sessions مفقود، أو الرصيد غير كافٍ للتفعيل (يتم تضمين التقدير في نص الخطأ)."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.set_ongoing_monitoring(\n    is_enabled=True,\n    didit_internal_id_list=[\"b0000000-0000-4000-8000-0000000000b1\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.setOngoingMonitoring({\n  is_enabled: true,\n  didit_internal_id_list: [\"b0000000-0000-4000-8000-0000000000b1\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.SetOngoingMonitoring(ctx, didit.OngoingMonitoringToggleRequest{\n\tIsEnabled:           true,\n\tDiditInternalIDList: didit.Some([]string{\"b0000000-0000-4000-8000-0000000000b1\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.OngoingMonitoringToggleRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().setOngoingMonitoring(OngoingMonitoringToggleRequest.builder()\n        .isEnabled(true)\n        .diditInternalIdList(List.of(\"b0000000-0000-4000-8000-0000000000b1\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->businesses->setOngoingMonitoring([\n    'is_enabled' => true,\n    'didit_internal_id_list' => ['b0000000-0000-4000-8000-0000000000b1'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.set_ongoing_monitoring(\n  is_enabled: true,\n  didit_internal_id_list: [\"b0000000-0000-4000-8000-0000000000b1\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.SetOngoingMonitoringAsync(new OngoingMonitoringToggleRequest\n{\n    IsEnabled = true,\n    DiditInternalIdList = new string[] { \"b0000000-0000-4000-8000-0000000000b1\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/vendor-businesses/toggle-ongoing-monitoring/{job_id}/": {
      "get": {
        "summary": "الحصول على مهمة مراقبة AML المستمرة",
        "description": "التقدم وعدادات كل نتيجة لمهمة تبديل حالة المراقبة. قم بالاستقصاء كل ثانيتين تقريباً طالما أن الحالة هي PENDING أو PROCESSING.",
        "operationId": "get_vendor_businesses_ongoing_monitoring_job",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "retrieve_ongoing_monitoring_job",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID لمهمة المراقبة الذي يعيده endpoint التبديل."
          }
        ],
        "responses": {
          "200": {
            "description": "المهمة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringJob"
                }
              }
            }
          },
          "404": {
            "description": "مهمة غير معروفة لهذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.retrieve_ongoing_monitoring_job(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.retrieveOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.RetrieveOngoingMonitoringJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().retrieveOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->businesses->retrieveOngoingMonitoringJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.retrieve_ongoing_monitoring_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.RetrieveOngoingMonitoringJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/businesses/toggle-ongoing-monitoring/": {
      "patch": {
        "summary": "تبديل حالة مراقبة AML المستمرة لجلسات الشركات",
        "description": "مفتاح تبديل على مستوى الجلسة لعمليات تحقق KYB، موجه برقم الجلسة. الجلسات التي ليس لها فحص AML يتم إنشاء فحص لها وإرفاقه بالجلسة نفسها. له نفس estimate_only والمسار السريع المضمن وعقد المهمة غير المتزامنة الخاص بنقاط endpoint على مستوى المستخدم. يحل محل السلوك المتزامن القديم الذي كان يتخطى الجلسات التي ليس لها فحص AML.",
        "operationId": "toggle_business_sessions_ongoing_monitoring",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "set_session_ongoing_monitoring",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "is_enabled"
                ],
                "properties": {
                  "is_enabled": {
                    "type": "boolean",
                    "description": "true لتفعيل المراقبة، وfalse لتعطيلها."
                  },
                  "estimate_only": {
                    "type": "boolean",
                    "default": false,
                    "description": "عند التعيين على true، يُرجع تقدير التكلفة ولا ينفذ أي عمليات كتابة."
                  },
                  "update_all": {
                    "type": "boolean",
                    "default": false,
                    "description": "التطبيق على كل كيان في التطبيق (ضمن نطاق معاملات filter_* عند وجودها)."
                  },
                  "filter_search": {
                    "type": "string"
                  },
                  "filter_status": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "filter_country": {
                    "type": "string"
                  },
                  "filter_date_from": {
                    "type": "string",
                    "format": "date"
                  },
                  "filter_date_to": {
                    "type": "string",
                    "format": "date"
                  },
                  "session_numbers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "أرقام جلسات الشركات للتبديل. مطلوب ما لم تكن update_all (أو الاسم المستعار القديم toggle_all) تساوي true."
                  },
                  "toggle_all": {
                    "type": "boolean",
                    "default": false,
                    "description": "اسم بديل قديم لـ update_all."
                  },
                  "filter_workflow_id": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "is_enabled": true,
                "session_numbers": [
                  "1001",
                  "1002"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "التقدير (عند تعيين estimate_only) أو المهمة المكتملة للدفعات الصغيرة التي تمت معالجتها مباشرةً.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringToggleResult"
                }
              }
            }
          },
          "202": {
            "description": "تتم معالجة الدفعات الأكبر بشكل غير متزامن؛ استعلم دورياً من endpoint الخاصة بالمهمة باستخدام job_id المُرجع.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringJob"
                }
              }
            }
          },
          "403": {
            "description": "امتياز write:sessions مفقود، أو الرصيد غير كافٍ للتفعيل (يتم تضمين التقدير في نص الخطأ)."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.set_session_ongoing_monitoring(\n    is_enabled=True,\n    session_numbers=[\"1001\", \"1002\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.setSessionOngoingMonitoring({\n  is_enabled: true,\n  session_numbers: [\"1001\", \"1002\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.SetSessionOngoingMonitoring(ctx, didit.BusinessesSetSessionOngoingMonitoringParams{\n\tIsEnabled:      true,\n\tSessionNumbers: didit.Some([]string{\"1001\", \"1002\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.BusinessesSetSessionOngoingMonitoringParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().setSessionOngoingMonitoring(BusinessesSetSessionOngoingMonitoringParams.builder()\n        .isEnabled(true)\n        .sessionNumbers(List.of(\"1001\", \"1002\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->businesses->setSessionOngoingMonitoring([\n    'is_enabled' => true,\n    'session_numbers' => ['1001', '1002'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.set_session_ongoing_monitoring(\n  is_enabled: true,\n  session_numbers: [\"1001\", \"1002\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.SetSessionOngoingMonitoringAsync(new BusinessesSetSessionOngoingMonitoringParams\n{\n    IsEnabled = true,\n    SessionNumbers = new string[] { \"1001\", \"1002\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/businesses/toggle-ongoing-monitoring/{job_id}/": {
      "get": {
        "summary": "الحصول على مهمة مراقبة AML المستمرة",
        "description": "التقدم وعدادات كل نتيجة لمهمة تبديل حالة المراقبة. قم بالاستقصاء كل ثانيتين تقريباً طالما أن الحالة هي PENDING أو PROCESSING.",
        "operationId": "get_business_sessions_ongoing_monitoring_job",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "retrieve_session_ongoing_monitoring_job",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID لمهمة المراقبة الذي يعيده endpoint التبديل."
          }
        ],
        "responses": {
          "200": {
            "description": "المهمة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingMonitoringJob"
                }
              }
            }
          },
          "404": {
            "description": "مهمة غير معروفة لهذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.retrieve_session_ongoing_monitoring_job(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.retrieveSessionOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.RetrieveSessionOngoingMonitoringJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().retrieveSessionOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->businesses->retrieveSessionOngoingMonitoringJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.retrieve_session_ongoing_monitoring_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.RetrieveSessionOngoingMonitoringJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/": {
      "get": {
        "summary": "سرد الحالات",
        "description": "سرد الحالات الخاصة بالتطبيق، الأحدث أولاً. يدعم التصفية والبحث والفرز؛ راجع معاملات الاستعلام. مقسم لصفحات باستخدام `limit`/`offset`.",
        "operationId": "list_cases",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            },
            "description": "حجم الصفحة. القيمة الافتراضية 50."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            },
            "description": "إزاحة تستند إلى الصفر للسجل الأول."
          },
          {
            "name": "status__in",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "الحالات المفصولة بفواصل لتضمينها، مثل OPEN,AWAITING_USER."
          },
          {
            "name": "priority",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "الأولويات المفصولة بفواصل لتضمينها."
          },
          {
            "name": "source__in",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "المصادر المفصولة بفواصل لتضمينها."
          },
          {
            "name": "blueprint",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "التصفية للحالات ضمن هذا المخطط."
          },
          {
            "name": "assigned_to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "التصفية للحالات المعيّنة لهذا المستخدم."
          },
          {
            "name": "unassigned",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "true للحالات غير المعينة، وfalse للحالات المعينة."
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "التصفية للحالات التي تحمل هذا الوسم تحديداً."
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "يطابق title، أو case_number، أو tag، أو اسم الموضوع/UUID/المعرّف الخارجي، أو UUID للجلسة المرتبطة، أو UUID للمعاملة المرتبطة."
          },
          {
            "name": "date_from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "الحد الأدنى لتاريخ الإنشاء (شامل)."
          },
          {
            "name": "date_to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "الحد الأقصى لتاريخ الإنشاء (شامل)."
          },
          {
            "name": "due_before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "الحد الأقصى لـ due_at."
          },
          {
            "name": "overdue",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "true لإرجاع الحالات المفتوحة/في انتظار المستخدم والمتأخرة فقط."
          },
          {
            "name": "ordering",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "-created_at",
                "due_at",
                "-due_at"
              ],
              "default": "-created_at"
            },
            "description": "ترتيب الفرز. يفرز due_at القيم الفارغة في النهاية."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/?status__in=OPEN,AWAITING_USER&ordering=-due_at' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.ListAutoPaging(ctx, didit.CasesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "قائمة الحالات مقسمة إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد الصفوف المطابقة. دقيق حتى 100، ويقتصر على 100 كحد أقصى بعد ذلك لأسباب تتعلق بالأداء. اعتمد على كون `next` بقيمة null لتحديد الصفحة الأخيرة."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو null."
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو null."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CaseListItem"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء حالة",
        "description": "أنشئ حالة مرتبطة بموضوع واحد بالضبط (مستخدم أو شركة)، إما مباشرة أو عن طريق استخلاص الموضوع من رابط جلسة/معاملة مرفق. يكون المصدر دائماً `MANUAL` للحالات المُنشأة عبر API.",
        "operationId": "create_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "blueprint": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "معرّف CaseBlueprint UUID. اتركه فارغاً لعدم استخدام أي مخطط."
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "LOW",
                      "MEDIUM",
                      "HIGH"
                    ],
                    "default": "MEDIUM"
                  },
                  "due_at": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "subject": {
                    "type": "object",
                    "description": "مطلوب ما لم يتم توفير links؛ الموضوع الوحيد للحالة.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "user",
                          "business"
                        ]
                      },
                      "uuid": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  },
                  "links": {
                    "type": "array",
                    "description": "الجلسات/جلسات الشركات/المعاملات المطلوب إرفاقها عند الإنشاء، مثل [{\"entity_type\": \"transaction\", \"entity_uuid\": \"...\"}]. عند إغفال الموضوع (subject)، يُشتق الموضوع من مالك الرابط الأول.",
                    "items": {
                      "type": "object"
                    }
                  },
                  "assigned_to": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "معرّف UUID للمستخدم للتعيين الفوري."
                  },
                  "review_duplicates": {
                    "type": "boolean",
                    "default": false,
                    "description": "إعادة التحقق من التحقيقات الحالية قبل إنشاء الحالة. عند تعيينه على true، يتطلب الخاضع للتحقق الذي لديه حالات سابقة قيمة غير فارغة لـ separate_incident_reason. تُفعّل لوحة التحكم هذه الحماية دائماً. يؤدي حذفه إلى الاحتفاظ بسلوك API الحالي."
                  },
                  "separate_incident_reason": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "source_context": {
                    "$ref": "#/components/schemas/CaseDuplicateCaseFraudSourceContextRequest"
                  }
                }
              },
              "example": {
                "title": "Manual - Jane Doe",
                "blueprint": "b1de0000-0000-4000-8000-000000000002",
                "priority": "HIGH",
                "subject": {
                  "type": "user",
                  "uuid": "5b9a0000-0000-4000-8000-00000000f00d"
                },
                "tags": [
                  "review"
                ]
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\": \"Manual - Jane Doe\", \"blueprint\": \"b1de0000-0000-4000-8000-000000000002\", \"priority\": \"HIGH\", \"subject\": {\"type\": \"user\", \"uuid\": \"5b9a0000-0000-4000-8000-00000000f00d\"}, \"tags\": [\"review\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.create(\n    title=\"Manual - Jane Doe\",\n    blueprint=\"b1de0000-0000-4000-8000-000000000002\",\n    priority=\"HIGH\",\n    tags=[\"review\"],\n    subject={\n        \"type\": \"user\",\n        \"uuid\": \"5b9a0000-0000-4000-8000-00000000f00d\",\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.create({\n  title: \"Manual - Jane Doe\",\n  blueprint: \"b1de0000-0000-4000-8000-000000000002\",\n  priority: \"HIGH\",\n  tags: [\"review\"],\n  subject: {\n    type: \"user\",\n    uuid: \"5b9a0000-0000-4000-8000-00000000f00d\",\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Create(ctx, didit.CasesCreateParams{\n\tTitle:     \"Manual - Jane Doe\",\n\tBlueprint: didit.String(\"b1de0000-0000-4000-8000-000000000002\"),\n\tPriority:  didit.Some(didit.CasesCreateParamsPriority(\"HIGH\")),\n\tTags:      didit.Some([]string{\"review\"}),\n\tSubject: didit.Some(didit.CasesCreateParamsSubject{\n\t\tType: didit.Some(didit.CasesCreateParamsSubjectType(\"user\")),\n\t\tUUID: didit.String(\"5b9a0000-0000-4000-8000-00000000f00d\"),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CasesCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().create(CasesCreateParams.builder()\n        .title(\"Manual - Jane Doe\")\n        .blueprint(\"b1de0000-0000-4000-8000-000000000002\")\n        .priority(CasesCreateParams.Priority.of(\"HIGH\"))\n        .tags(List.of(\"review\"))\n        .subject(CasesCreateParams.Subject.builder()\n                .type(CasesCreateParams.Subject.Type.of(\"user\"))\n                .uuid(\"5b9a0000-0000-4000-8000-00000000f00d\")\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->create([\n    'title' => 'Manual - Jane Doe',\n    'blueprint' => 'b1de0000-0000-4000-8000-000000000002',\n    'priority' => 'HIGH',\n    'tags' => ['review'],\n    'subject' => [\n        'type' => 'user',\n        'uuid' => '5b9a0000-0000-4000-8000-00000000f00d',\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.create(\n  title: \"Manual - Jane Doe\",\n  blueprint: \"b1de0000-0000-4000-8000-000000000002\",\n  priority: \"HIGH\",\n  tags: [\"review\"],\n  subject: {\n    type: \"user\",\n    uuid: \"5b9a0000-0000-4000-8000-00000000f00d\",\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.CreateAsync(new CasesCreateParams\n{\n    Title = \"Manual - Jane Doe\",\n    Blueprint = \"b1de0000-0000-4000-8000-000000000002\",\n    Priority = new CasesCreateParamsPriority(\"HIGH\"),\n    Tags = new string[] { \"review\" },\n    Subject = new CasesCreateParamsSubject\n    {\n        Type = new CasesCreateParamsSubjectType(\"user\"),\n        Uuid = \"5b9a0000-0000-4000-8000-00000000f00d\",\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          },
          "400": {
            "description": "لم يتم تقديم subject ولا links، أو تعذر العثور على الموضوع/المخطط/الشخص المعيّن.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "تم تفعيل مراجعة التكرار وعُثر على حالة موجودة بدون سبب لحادث منفصل. لم يتم إنشاء أي حالة."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/": {
      "get": {
        "summary": "الحصول على الحالة",
        "description": "استرجاع حالة مع موضوعها، ومخططها، وملاحظاتها، وأحداثها، وروابطها، وقائمة التحقق الخاصة بها.",
        "operationId": "get_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "retrieve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.retrieve(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.retrieve(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Retrieve(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().retrieve(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->retrieve('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.retrieve(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RetrieveAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          },
          "404": {
            "description": "الحالة (أو المورد المتداخل) غير موجودة في هذا التطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث الحالة",
        "description": "تحديث عنوان الحالة، أو أولويتها، أو تاريخ استحقاقها، أو وسومها، أو فريق المراجعة المالك لها. أرسل الحقول التي ترغب في تغييرها فقط؛ الحقول التي تحذفها تحتفظ بقيمتها السابقة. يستبدل `tags` قائمة الوسوم بأكملها. يأخذ `team` معرف uuid لفريق مراجعة نشط في هذا التطبيق (يمكنك سردها عبر `GET .../cases/teams/`)، أو null لإلغاء تعيين الفريق. يتطلب مفتاح API كامل الصلاحيات، أو `write:cases` لعضو في لوحة التحكم: المفتاح ذو الوصول المقيد يتلقى خطأ 403. يسجل أحداث PRIORITY_CHANGED و DUE_DATE_CHANGED و TAG_ADDED و TAG_REMOVED و TEAM_CHANGED حسب الاقتضاء؛ بينما يُحفظ تغيير العنوان دون تسجيل حدث في المخطط الزمني. يعيد الحالة المحدّثة.",
        "operationId": "update_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "update",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "عنوان الحالة الجديد."
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "LOW",
                      "MEDIUM",
                      "HIGH"
                    ]
                  },
                  "due_at": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "description": "الموعد النهائي الجديد. أرسل null لمسحه."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "قائمة الوسوم الكاملة. تحل محل الوسوم الحالية."
                  },
                  "team": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "معرّف UUID لفريق المراجعة المالك للحالة. يجب أن يكون فريقًا نشطًا في هذا التطبيق. أرسل null لإلغاء تعيين الفريق."
                  }
                }
              },
              "examples": {
                "Change priority and deadline": {
                  "value": {
                    "priority": "HIGH",
                    "due_at": "2026-11-01T00:00:00Z"
                  }
                },
                "Move the case to a team": {
                  "value": {
                    "team": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  }
                },
                "Clear the team": {
                  "value": {
                    "team": null
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"priority\": \"HIGH\", \"due_at\": \"2026-08-01T00:00:00Z\"}'"
          },
          {
            "lang": "curl",
            "label": "curl (change team)",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"team\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.update(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    priority=\"HIGH\",\n    due_at=\"2026-11-01T00:00:00Z\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.update(\"c1a5e000-0000-4000-8000-000000000001\", {\n  priority: \"HIGH\",\n  due_at: \"2026-11-01T00:00:00Z\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Update(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesUpdateParams{\n\tPriority: didit.Some(didit.CasesUpdateParamsPriority(\"HIGH\")),\n\tDueAt:    didit.Time(time.Date(2026, 11, 1, 0, 0, 0, 0, time.UTC)),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.OffsetDateTime;\nimport me.didit.Didit;\nimport me.didit.types.CasesUpdateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().update(\"c1a5e000-0000-4000-8000-000000000001\", CasesUpdateParams.builder()\n        .priority(CasesUpdateParams.Priority.of(\"HIGH\"))\n        .dueAt(OffsetDateTime.parse(\"2026-11-01T00:00:00Z\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->update('c1a5e000-0000-4000-8000-000000000001', [\n    'priority' => 'HIGH',\n    'due_at' => '2026-11-01T00:00:00Z',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.update(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  priority: \"HIGH\",\n  due_at: \"2026-11-01T00:00:00Z\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.UpdateAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesUpdateParams\n{\n    Priority = new CasesUpdateParamsPriority(\"HIGH\"),\n    DueAt = DateTimeOffset.Parse(\"2026-11-01T00:00:00Z\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الحالة المحدّثة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق من صحة حقل. تكون مفاتيح نص الطلب هي أسماء الحقول. يُرفض `team` عندما لا يكون فريق مراجعة نشطاً لهذا التطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Team not active in this application": {
                    "value": {
                      "team": [
                        "Choose an active team of this application."
                      ]
                    }
                  },
                  "Invalid priority": {
                    "value": {
                      "priority": [
                        "\"URGENT\" is not a valid choice."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "ينتمي مفتاح API إلى تطبيق آخر، أو أنه مفتاح ذو وصول مقيد: تتطلب endpoint الخاصة بالحالات مفتاحاً كامل الوصول. يتطلب token عضو لوحة التحكم إذن `write:cases`.",
            "content": {
              "application/json": {
                "examples": {
                  "Restricted API Key": {
                    "summary": "مفتاح API مع وصول مقيد",
                    "value": {
                      "detail": "This API key has no access to this endpoint."
                    }
                  },
                  "Missing Privilege": {
                    "summary": "عضو في Console بدون صلاحية write:cases، أو مفتاح لتطبيق آخر",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الحالة غير موجودة في هذا التطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No Case matches the given query."
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "summary": "حذف الحالة",
        "description": "حذف حالة نهائيًا. تُحذف تقاريرها التنظيمية المسودة معها. لا تُحذف عمليات التحقق والأشخاص والشركات والمعاملات المرتبطة. لا يوجد endpoint لاستعادة المحذوفات.\n\nإذا كانت الحالة تحتوي على تقرير تنظيمي مكتمل، يُرفض الطلب بالكامل برمز `409` ولا يُحذف أي شيء. يستخدم نص الاستجابة `code: in_filed_report` ويسمي كل تقرير باستخدام `uuid` و`report_number` و`report_type` و`case_uuid`. احذف التقارير، ثم كرر الطلب.",
        "operationId": "delete_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "delete",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.delete(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.delete(\"c1a5e000-0000-4000-8000-000000000001\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Delete(ctx, \"c1a5e000-0000-4000-8000-000000000001\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().delete(\"c1a5e000-0000-4000-8000-000000000001\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->cases->delete('c1a5e000-0000-4000-8000-000000000001');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.delete(\"c1a5e000-0000-4000-8000-000000000001\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.DeleteAsync(\"c1a5e000-0000-4000-8000-000000000001\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف الحالة."
          },
          "403": {
            "description": "لا يمكن للمفتاح حذف الحالات. يتطلب ذلك مفتاحاً بصلاحية وصول كاملة مع `write:cases`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الحالة غير موجودة في هذا التطبيق أو تم حذفها بالفعل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "تحتوي الحالة على تقرير تنظيمي نهائي. لم يتم حذف أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InFiledReportError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/assign/": {
      "post": {
        "summary": "تعيين الحالة أو إلغاء تعيينها",
        "description": "تعيين الحالة لمستخدم، أو إلغاء تعيينها عن طريق إرسال assignee_user_id: null. ينشئ assignee_email/assignee_name تلقائياً صفاً في جدول User عندما لا يكون المعيّن له موجوداً بعد.",
        "operationId": "assign_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "assign",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "assignee_user_id"
                ],
                "properties": {
                  "assignee_user_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "القيمة null لإلغاء التعيين."
                  },
                  "assignee_email": {
                    "type": "string",
                    "format": "email",
                    "nullable": true
                  },
                  "assignee_name": {
                    "type": "string",
                    "nullable": true
                  }
                }
              },
              "example": {
                "assignee_user_id": "9a000000-0000-4000-8000-0000000000aa"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/assign/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"assignee_user_id\": \"9a000000-0000-4000-8000-0000000000aa\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.assign(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    assignee_user_id=\"9a000000-0000-4000-8000-0000000000aa\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.assign(\"c1a5e000-0000-4000-8000-000000000001\", {\n  assignee_user_id: \"9a000000-0000-4000-8000-0000000000aa\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Assign(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesAssignParams{\n\tAssigneeUserID: didit.String(\"9a000000-0000-4000-8000-0000000000aa\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesAssignParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().assign(\"c1a5e000-0000-4000-8000-000000000001\", CasesAssignParams.builder()\n        .assigneeUserId(\"9a000000-0000-4000-8000-0000000000aa\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->assign('c1a5e000-0000-4000-8000-000000000001', [\n    'assignee_user_id' => '9a000000-0000-4000-8000-0000000000aa',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.assign(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  assignee_user_id: \"9a000000-0000-4000-8000-0000000000aa\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.AssignAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesAssignParams\n{\n    AssigneeUserId = \"9a000000-0000-4000-8000-0000000000aa\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تعيين/إلغاء تعيين الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/resolve/": {
      "post": {
        "summary": "حل الحالة",
        "description": "حل الحالة بإحدى النتائج الخمس: FALSE_POSITIVE (لم تُرصد أي مشكلة)، أو VALID_THREAT (تم تأكيد وجود مشكلة)، أو INCONCLUSIVE، أو REQUIREMENTS_NOT_MET، أو REQUIREMENTS_SATISFIED. يتم الحظر برمز 400 إذا كانت قائمة التحقق الخاصة بالمخطط غير اختيارية ولا تزال بعض العناصر غير مكتملة، أو إذا كان المخطط يتطلب ملاحظة حل ولم يتم تقديم أي ملاحظة. عندما يحتوي المخطط الخاص بالحالة على خطوة فاحص التحقق المزدوج (four_eyes_checker_blueprint)، يتم تجهيز القرار مرحلياً (case.pending_resolution) وتنتقل الحالة إلى مخطط الفاحص بدلاً من حلها فوراً؛ ويجب على مسؤول مختلف استدعاء approve أو reject-approval. أرسل قرار التحقق المزدوج بصفتك عضواً في لوحة التحكم: فالقرار الذي يرسله مفتاح API ليس له مُنشئ مسجل، لذا تُرجع approve وreject-approval الرمز 403 لكل مُستدعٍ. في مخطط التحقق المزدوج، يمكنك تحديد العضو الذي يجب أن يوافق باستخدام `checker`: وعندئذٍ يمكن لهذا العضو فقط الموافقة على القرار أو رفضه، ويُحدد `checker` في الاستجابة اسمه. بدون `checker`، ينتظر القرار في قائمة انتظار مخطط الفاحص. يؤدي إرسال `checker` لمخطط بدون خطوة فاحص إلى إرجاع 400.",
        "operationId": "resolve_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "resolve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "resolution"
                ],
                "properties": {
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "FALSE_POSITIVE",
                      "VALID_THREAT",
                      "INCONCLUSIVE",
                      "REQUIREMENTS_NOT_MET",
                      "REQUIREMENTS_SATISFIED"
                    ]
                  },
                  "note": {
                    "type": "string",
                    "nullable": true,
                    "description": "مطلوب عندما يحدد المخطط require_resolution_note."
                  },
                  "checker": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "لمخططات المراجعة الثنائية فقط. معرّف uuid للمستخدم العضو الذي يجب أن يوافق على هذا الحل (المعرّف نفسه لـ `assigned_to.uuid` في الحالة، أو `members[].user_id` في فريق المراجعة). يجب أن يمتلك العضو حق الوصول إلى الحالات في هذا التطبيق ولا يمكن أن يكون المسؤول الذي يقدم الحل. احذفه أو أرسل null لترك الحل لقائمة انتظار المدقق."
                  }
                }
              },
              "examples": {
                "Resolve": {
                  "value": {
                    "resolution": "FALSE_POSITIVE",
                    "note": "Confirmed legitimate activity after reviewing documents."
                  }
                },
                "Four-eyes blueprint with a named checker": {
                  "value": {
                    "resolution": "VALID_THREAT",
                    "note": "Document tampering confirmed.",
                    "checker": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/resolve/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"resolution\": \"FALSE_POSITIVE\", \"note\": \"Confirmed legitimate activity after reviewing documents.\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.resolve(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    resolution=\"FALSE_POSITIVE\",\n    note=\"Confirmed legitimate activity after reviewing documents.\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.resolve(\"c1a5e000-0000-4000-8000-000000000001\", {\n  resolution: \"FALSE_POSITIVE\",\n  note: \"Confirmed legitimate activity after reviewing documents.\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Resolve(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesResolveParams{\n\tResolution: \"FALSE_POSITIVE\",\n\tNote:       didit.String(\"Confirmed legitimate activity after reviewing documents.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesResolveParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().resolve(\"c1a5e000-0000-4000-8000-000000000001\", CasesResolveParams.builder()\n        .resolution(CasesResolveParams.Resolution.of(\"FALSE_POSITIVE\"))\n        .note(\"Confirmed legitimate activity after reviewing documents.\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->resolve('c1a5e000-0000-4000-8000-000000000001', [\n    'resolution' => 'FALSE_POSITIVE',\n    'note' => 'Confirmed legitimate activity after reviewing documents.',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.resolve(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  resolution: \"FALSE_POSITIVE\",\n  note: \"Confirmed legitimate activity after reviewing documents.\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ResolveAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesResolveParams\n{\n    Resolution = \"FALSE_POSITIVE\",\n    Note = \"Confirmed legitimate activity after reviewing documents.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "محلولة، أو مُجهزة لموافقة التحقق المزدوج.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          },
          "400": {
            "description": "تم رفض الحل. تظهر الأخطاء غير المتعلقة بالحقول كقائمة من النصوص: قائمة مرجعية غير مكتملة، أو ملاحظة مطلوبة مفقودة، أو `checker` تعذر التحقق منه أو ليس مراجعاً نشطاً لديه حق الوصول إلى الحالات في هذا التطبيق. تظهر أخطاء `checker` مفهرسة بالحقل: العضو المحدد هو المسؤول الذي يقدم الحل، أو أن مخطط الحالة لا يحتوي على خطوة مدقق.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Incomplete checklist": {
                    "value": [
                      "Case has incomplete checklist items: Verify source of funds"
                    ]
                  },
                  "Resolution note required": {
                    "value": [
                      "A resolution note is required to resolve this case."
                    ]
                  },
                  "Reviewer access could not be verified": {
                    "value": [
                      "Reviewer access could not be verified. Try again."
                    ]
                  },
                  "Checker is not an active reviewer": {
                    "value": [
                      "Choose an active reviewer with case access to this application."
                    ]
                  },
                  "Checker is the submitting officer": {
                    "value": {
                      "checker": [
                        "The officer who submitted the resolution cannot be its checker."
                      ]
                    }
                  },
                  "Policy has no checker step": {
                    "value": {
                      "checker": [
                        "This review policy has no checker step, so the case resolves directly."
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/reopen/": {
      "post": {
        "summary": "إعادة فتح الحالة",
        "description": "إعادة الحالة التي في انتظار المستخدم أو المحسومة إلى حالة مفتوحة، مع مسح resolution وresolution_notes وresolved_at وresolved_by_email.",
        "operationId": "reopen_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "reopen",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/reopen/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.reopen(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.reopen(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Reopen(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().reopen(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->reopen('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.reopen(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ReopenAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "إعادة فتح الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/request-info/": {
      "post": {
        "summary": "طلب معلومات (في انتظار المستخدم)",
        "description": "نقل حالة مفتوحة إلى awaiting_user أثناء جمع مزيد من المعلومات من المستخدم الذي تم التحقق منه. يفشل برمز 400 إذا كان هناك قرار معلق حالياً للحصول على موافقة من شخصين.",
        "operationId": "request_case_info",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "request_info",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/request-info/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.request_info(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requestInfo(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RequestInfo(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requestInfo(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->requestInfo('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.request_info(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RequestInfoAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "طلب معلومات (في انتظار المستخدم).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/escalate/": {
      "post": {
        "summary": "تصعيد الحالة",
        "description": "نقل الحالة إلى escalation_blueprint المكوّن في المخطط الخاص بها. يتطلب أن يكون escalation_enabled مفعلاً في المخطط الحالي وتعيين escalation_blueprint، وإلا فسيتم إرجاع 400.",
        "operationId": "escalate_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "escalate",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/escalate/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.escalate(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.escalate(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Escalate(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().escalate(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->escalate('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.escalate(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.EscalateAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تصعيد الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/transfer/": {
      "post": {
        "summary": "حالة التحويل",
        "description": "نقل الحالة إلى مخطط نشط ومختلف لنفس التطبيق. يتطلب أن يكون transfer_enabled مفعلاً في المخطط الحالي، وإلا فسيتم إرجاع 400.",
        "operationId": "transfer_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "transfer",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target_blueprint"
                ],
                "properties": {
                  "target_blueprint": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "example": {
                "target_blueprint": "b1de0000-0000-4000-8000-000000000002"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/transfer/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"target_blueprint\": \"b1de0000-0000-4000-8000-000000000002\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.transfer(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    target_blueprint=\"b1de0000-0000-4000-8000-000000000002\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.transfer(\"c1a5e000-0000-4000-8000-000000000001\", {\n  target_blueprint: \"b1de0000-0000-4000-8000-000000000002\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Transfer(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesTransferParams{\n\tTargetBlueprint: \"b1de0000-0000-4000-8000-000000000002\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesTransferParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().transfer(\"c1a5e000-0000-4000-8000-000000000001\", CasesTransferParams.builder()\n        .targetBlueprint(\"b1de0000-0000-4000-8000-000000000002\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->transfer('c1a5e000-0000-4000-8000-000000000001', [\n    'target_blueprint' => 'b1de0000-0000-4000-8000-000000000002',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.transfer(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  target_blueprint: \"b1de0000-0000-4000-8000-000000000002\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.TransferAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesTransferParams\n{\n    TargetBlueprint = \"b1de0000-0000-4000-8000-000000000002\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم نقل الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/approve/": {
      "post": {
        "summary": "الموافقة على الحل المرحلي (مبدأ الأعين الأربع)",
        "description": "تطبيق تسوية تم تجهيزها بواسطة resolve وفق مخطط الرقابة الثنائية. يجب أن يكون المستدعي مسؤولاً مختلفاً عن المسؤول الذي أرسلها، وإلا فسيتم إرجاع 403. عندما تحدد التسوية مراجعاً (`checker` الخاص بالحالة)، يمكن لهذا العضو فقط الموافقة عليها: ويتلقى أي مستدعٍ آخر، بما في ذلك مفتاح API، الخطأ 403.",
        "operationId": "approve_case_resolution",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "approve_resolution",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/approve/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.approve_resolution(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.approveResolution(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ApproveResolution(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().approveResolution(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->approveResolution('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.approve_resolution(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ApproveResolutionAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تطبيق الحل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          },
          "409": {
            "description": "الحالة ليس بها حل معلق بانتظار الموافقة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "لا يمكن للجهة المستدعية اعتماد هذا القرار: إما لأنها هي من قدمته، أو أن الحالة ليس لها مُنشئ مُسجل، أو أن القرار يحدد مُراجعاً مختلفاً. يتلقى مفتاح API دائماً رمز 403 هذا عند تحديد مُراجع.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Caller submitted the resolution": {
                    "value": {
                      "detail": "The officer who submitted the resolution cannot approve it."
                    }
                  },
                  "No recorded maker": {
                    "value": {
                      "detail": "Case has no recorded maker for this pending resolution; approve is not permitted."
                    }
                  },
                  "Caller is not the named checker": {
                    "value": {
                      "detail": "Only the named checker can approve this resolution."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/reject-approval/": {
      "post": {
        "summary": "رفض الحل المرحلي (مبدأ العيون الأربع)",
        "description": "رفض الحل المرحلي المقدَّم عبر resolve وإعادة الحالة إلى مخطط المنشئ الخاص بها. يجب أن يكون المستدعي مسؤولاً مختلفاً عن المسؤول الذي أرسله، وإلا فسيتم إرجاع 403. عندما يسمي الحل مدققاً (`checker` الخاص بالحالة)، فإن هذا العضو فقط هو من يمكنه رفضه: أي مستدعٍ آخر، بما في ذلك مفتاح API، يتلقى 403.",
        "operationId": "reject_case_resolution",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "reject_resolution",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notes": {
                    "type": "string",
                    "nullable": true
                  }
                }
              },
              "example": {
                "notes": "Needs a clearer rationale before this can be approved."
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/reject-approval/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"notes\": \"Needs a clearer rationale before this can be approved.\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.reject_resolution(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    notes=\"Needs a clearer rationale before this can be approved.\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.rejectResolution(\"c1a5e000-0000-4000-8000-000000000001\", {\n  notes: \"Needs a clearer rationale before this can be approved.\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RejectResolution(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesRejectResolutionParams{\n\tNotes: didit.String(\"Needs a clearer rationale before this can be approved.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesRejectResolutionParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().rejectResolution(\"c1a5e000-0000-4000-8000-000000000001\", CasesRejectResolutionParams.builder()\n        .notes(\"Needs a clearer rationale before this can be approved.\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->rejectResolution('c1a5e000-0000-4000-8000-000000000001', [\n    'notes' => 'Needs a clearer rationale before this can be approved.',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.reject_resolution(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  notes: \"Needs a clearer rationale before this can be approved.\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RejectResolutionAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesRejectResolutionParams\n{\n    Notes = \"Needs a clearer rationale before this can be approved.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم رفض الحل، وأُعيدت الحالة إلى مخطط المنشئ.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDetail"
                }
              }
            }
          },
          "409": {
            "description": "الحالة ليس بها حل معلق بانتظار الموافقة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "لا يمكن للجهة المستدعية رفض هذا القرار: إما لأنها هي من قدمته، أو أن الحالة ليس لها مُنشئ مُسجل، أو أن القرار يحدد مُراجعاً مختلفاً. يتلقى مفتاح API دائماً رمز 403 هذا عند تحديد مُراجع.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Caller submitted the resolution": {
                    "value": {
                      "detail": "The officer who submitted the resolution cannot reject it."
                    }
                  },
                  "No recorded maker": {
                    "value": {
                      "detail": "Case has no recorded maker for this pending resolution; reject is not permitted."
                    }
                  },
                  "Caller is not the named checker": {
                    "value": {
                      "detail": "Only the named checker can reject this resolution."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/entity-actions/": {
      "post": {
        "operationId": "apply_case_entity_action",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "apply_entity_action",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CaseActionCaseEntityActionRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseActionCaseEntityActionRequest"
              },
              "example": {
                "client_reference": "e1a00000-0000-4000-8000-000000000001",
                "action": "add_tags",
                "tags": [
                  "source-of-funds-reviewed"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CaseActionCaseEntityActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseActionCaseEntityActionResult"
                }
              }
            },
            "description": ""
          },
          "409": {
            "description": "المرجع ينتمي إلى payload إجراء مختلف."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "تطبيق إجراء صريح واحد على موضوع الحالة. قدّم client_reference فريداً للحصول على إيصال بالإجراء ولجعل عمليات إعادة المحاولة ذات idempotency. إعادة استخدام ذلك المرجع مع payload مختلف ترجع 409. عند وجود مرجع، افحص receipt.status حتى لو كانت حالة HTTP هي 200: تعني FAILED أنه لم يتم تطبيق أي إجراء. تكرار طلب فاشل لا ينفذه مرة أخرى ما لم تكن قيمة retry هي true. عدم إرسال client_reference يحافظ على الاستجابة القديمة.",
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.apply_entity_action(\n    \"11111111-2222-3333-4444-555555555555\",\n    client_reference=\"e1a00000-0000-4000-8000-000000000001\",\n    action=\"add_tags\",\n    tags=[\"source-of-funds-reviewed\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.applyEntityAction(\"11111111-2222-3333-4444-555555555555\", {\n  client_reference: \"e1a00000-0000-4000-8000-000000000001\",\n  action: \"add_tags\",\n  tags: [\"source-of-funds-reviewed\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ApplyEntityAction(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseActionCaseEntityActionRequest{\n\tClientReference: didit.String(\"e1a00000-0000-4000-8000-000000000001\"),\n\tAction:          didit.CaseActionActionEnum(\"add_tags\"),\n\tTags:            didit.Some([]string{\"source-of-funds-reviewed\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CaseActionActionEnum;\nimport me.didit.types.CaseActionCaseEntityActionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().applyEntityAction(\"11111111-2222-3333-4444-555555555555\", CaseActionCaseEntityActionRequest.builder()\n        .clientReference(\"e1a00000-0000-4000-8000-000000000001\")\n        .action(CaseActionActionEnum.of(\"add_tags\"))\n        .tags(List.of(\"source-of-funds-reviewed\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->applyEntityAction('11111111-2222-3333-4444-555555555555', [\n    'client_reference' => 'e1a00000-0000-4000-8000-000000000001',\n    'action' => 'add_tags',\n    'tags' => ['source-of-funds-reviewed'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.apply_entity_action(\n  \"11111111-2222-3333-4444-555555555555\",\n  client_reference: \"e1a00000-0000-4000-8000-000000000001\",\n  action: \"add_tags\",\n  tags: [\"source-of-funds-reviewed\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ApplyEntityActionAsync(\"11111111-2222-3333-4444-555555555555\", new CaseActionCaseEntityActionRequest\n{\n    ClientReference = \"e1a00000-0000-4000-8000-000000000001\",\n    Action = \"add_tags\",\n    Tags = new string[] { \"source-of-funds-reviewed\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/print/": {
      "get": {
        "summary": "طباعة الحالة (PDF)",
        "description": "عرض الحالة بالكامل (الملخص، الموضوع، حالة قائمة التحقق، الملاحظات، الجلسات/المعاملات المرفقة، الأحداث، قائمة تقارير FIU) كملف PDF وإرجاع رابط تنزيل مُوقَّع مسبقاً.",
        "operationId": "print_case",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "print",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/print/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.print(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.print(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Print(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().print(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->print('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.print(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.PrintAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "رابط PDF موقع مسبقاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/": {
      "get": {
        "operationId": "list_case_notes",
        "x-didit-sdk": {
          "resource": "cases.notes",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "أي حقل يُستخدم عند ترتيب النتائج.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "عدد النتائج المراد إرجاعها لكل صفحة.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "الفهرس الأولي الذي يبدأ منه إرجاع النتائج.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseCollaborationPaginatedCaseNoteList"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          },
          "404": {
            "description": "الحالة أو الملاحظة غير متاحة لجهة الاتصال هذه."
          }
        },
        "tags": [
          "Case Management"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.notes.list(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.notes.list(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Notes.ListAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesNotesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().notes().list(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->notes->list('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.notes.list(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Notes.ListAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "operationId": "create_case_note",
        "x-didit-sdk": {
          "resource": "cases.notes",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CaseCollaborationCaseNoteCreateRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseCollaborationCaseNoteCreateRequest"
              },
              "example": {
                "comment": "Proof of address matches the ID document."
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CaseCollaborationCaseNoteCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseCollaborationCaseNote"
                }
              }
            },
            "description": ""
          },
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseCollaborationCaseNote"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          },
          "404": {
            "description": "الحالة أو الملاحظة غير متاحة لجهة الاتصال هذه."
          },
          "409": {
            "description": "تم استخدام مرجع العميل هذا بالفعل لملاحظة أخرى أو لملاحظة تم حذفها."
          }
        },
        "tags": [
          "Case Management"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "إضافة ملاحظة على مستوى الحالة. تجعل القيمة الاختيارية client_reference إعادة المحاولة غير المتغيرة تُعيد الملاحظة نفسها دون تكرار النشاط أو الإشعارات. يجب أن يحدد reply_to ملاحظة نشطة في هذه الحالة. تتضمن الاستجابة مقتطفاً محدوداً من الملاحظة الأصلية دون نسخ ذلك المقتطف إلى الرد المحفوظ.",
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.notes.create(\n    \"11111111-2222-3333-4444-555555555555\",\n    comment=\"Proof of address matches the ID document.\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.notes.create(\"11111111-2222-3333-4444-555555555555\", {\n  comment: \"Proof of address matches the ID document.\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseCollaborationCaseNoteCreateRequest{\n\tComment: \"Proof of address matches the ID document.\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CaseCollaborationCaseNoteCreateRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().notes().create(\"11111111-2222-3333-4444-555555555555\", CaseCollaborationCaseNoteCreateRequest.builder()\n        .comment(\"Proof of address matches the ID document.\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->notes->create('11111111-2222-3333-4444-555555555555', [\n    'comment' => 'Proof of address matches the ID document.',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.notes.create(\n  \"11111111-2222-3333-4444-555555555555\",\n  comment: \"Proof of address matches the ID document.\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Notes.CreateAsync(\"11111111-2222-3333-4444-555555555555\", new CaseCollaborationCaseNoteCreateRequest\n{\n    Comment = \"Proof of address matches the ID document.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/{note_uuid}/": {
      "patch": {
        "operationId": "root_partial_update",
        "x-didit-sdk": {
          "resource": "cases.notes",
          "method": "update",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "note_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CaseCollaborationPatchedCaseNoteUpdateRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseCollaborationPatchedCaseNoteUpdateRequest"
              },
              "example": {
                "is_pinned": true
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CaseCollaborationPatchedCaseNoteUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseCollaborationCaseNote"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          },
          "404": {
            "description": "الحالة أو الملاحظة غير متاحة لجهة الاتصال هذه."
          }
        },
        "tags": [
          "Case Management"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "تثبيت ملاحظة حالية أو إلغاء تثبيتها. تظهر الملاحظات المثبتة أولاً. يتم تسجيل تغييرات التثبيت في نشاط الحالة ولا تُغيّر الأدلة أو قرارات المصدر.",
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.notes.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"11111111-2222-3333-4444-555555555555\",\n    is_pinned=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.notes.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n  {\n    is_pinned: true,\n  },\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.Update(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", didit.CaseCollaborationPatchedCaseNoteUpdateRequest{\n\tIsPinned: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CaseCollaborationPatchedCaseNoteUpdateRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().notes().update(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", CaseCollaborationPatchedCaseNoteUpdateRequest.builder()\n        .isPinned(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->notes->update('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555', [\n    'is_pinned' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.notes.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n  is_pinned: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Notes.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", new CaseCollaborationPatchedCaseNoteUpdateRequest\n{\n    IsPinned = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "operationId": "delete_case_note",
        "x-didit-sdk": {
          "resource": "cases.notes",
          "method": "delete",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "note_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "تُحذف الملاحظة نهائياً. تظل الردود موجودة بدون مقتطف الملاحظة الأصلية المحذوفة. تُحذف المرفقات ما لم تكن هناك ملاحظة أخرى لا تزال تستخدمها."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          },
          "404": {
            "description": "الحالة أو الملاحظة غير متاحة لجهة الاتصال هذه."
          }
        },
        "tags": [
          "Case Management"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.notes.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.notes.delete(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Notes.Delete(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().notes().delete(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->cases->notes->delete('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.notes.delete(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\"\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.Notes.DeleteAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/presign/": {
      "post": {
        "summary": "رفع مرفق الملاحظة",
        "description": "رفع ملف (JPEG أو PNG أو WebP أو PDF أو نص عادي أو CSV؛ بحد أقصى 5 ميجابايت) لإرفاقه بملاحظة. يعيد s3_key لتمريره في مصفوفة attachments الخاصة بالملاحظة.",
        "operationId": "upload_case_note_attachment",
        "x-didit-sdk": {
          "resource": "cases.notes",
          "method": "create_attachment_upload",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/notes/presign/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'file=@evidence.pdf'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.notes.create_attachment_upload(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    file=open(\"document.pdf\", \"rb\"),\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.notes.createAttachmentUpload(\"c1a5e000-0000-4000-8000-000000000001\", {\n  file: await fileFromPath(\"document.pdf\"),\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.CreateAttachmentUpload(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesNotesCreateAttachmentUploadParams{\n\tFile: didit.FileFromPath(\"document.pdf\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.CasesNotesCreateAttachmentUploadParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().notes().createAttachmentUpload(\"c1a5e000-0000-4000-8000-000000000001\", CasesNotesCreateAttachmentUploadParams.builder()\n        .file(Path.of(\"document.pdf\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->notes->createAttachmentUpload('c1a5e000-0000-4000-8000-000000000001', [\n    'file' => File::fromPath('document.pdf'),\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.notes.create_attachment_upload(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  file: Pathname(\"document.pdf\")\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Notes.CreateAttachmentUploadAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesNotesCreateAttachmentUploadParams\n{\n    File = FileUpload.FromPath(\"document.pdf\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم رفع الملف.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "s3_key": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "file_size": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "لا يوجد ملف، أو نوع المحتوى غير مدعوم، أو أن حجم الملف يتجاوز 5 ميغابايت.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "get": {
        "summary": "الحصول على رابط مرفق الملاحظة",
        "description": "إنشاء رابط تنزيل مسبق التوقيع وجديد لمرفق مخزن بالفعل في إحدى ملاحظات الحالة.",
        "operationId": "get_case_note_attachment_url",
        "x-didit-sdk": {
          "resource": "cases.notes",
          "method": "retrieve_attachment_url",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          },
          {
            "name": "s3_key",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "قيمة s3_key للمرفق، كما تم إرجاعها بواسطة الرفع أو إدراجها في الملاحظة.",
            "required": true
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/notes/presign/?s3_key=case-notes/c1a5e000-0000-4000-8000-000000000001/evidence.pdf' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.notes.retrieve_attachment_url(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    s3_key=\"your-s3-key\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.notes.retrieveAttachmentUrl(\"c1a5e000-0000-4000-8000-000000000001\", {\n  s3_key: \"your-s3-key\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.RetrieveAttachmentURL(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesNotesRetrieveAttachmentURLParams{\n\tS3Key: \"your-s3-key\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesNotesRetrieveAttachmentUrlParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().notes().retrieveAttachmentUrl(\"c1a5e000-0000-4000-8000-000000000001\", CasesNotesRetrieveAttachmentUrlParams.builder()\n        .s3Key(\"your-s3-key\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->notes->retrieveAttachmentUrl('c1a5e000-0000-4000-8000-000000000001', [\n    's3_key' => 'your-s3-key',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.notes.retrieve_attachment_url(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  s3_key: \"your-s3-key\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Notes.RetrieveAttachmentUrlAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesNotesRetrieveAttachmentUrlParams\n{\n    S3Key = \"your-s3-key\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "رابط موقع مسبقاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "s3_key": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "filename": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "حقل s3_key مفقود أو لا ينتمي إلى هذه الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/": {
      "get": {
        "summary": "سرد روابط الحالة",
        "description": "عرض الجلسات، وجلسات الشركات، والمعاملات المرتبطة بالحالة.",
        "operationId": "list_case_links",
        "x-didit-sdk": {
          "resource": "cases.links",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/links/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.links.list(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.links.list(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Links.List(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().links().list(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->links->list('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.links.list(\"c1a5e000-0000-4000-8000-000000000001\").each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Links.ListAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "روابط الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CaseLink"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إضافة رابط الحالة",
        "description": "إرفاق جلسة، أو جلسة شركة، أو معاملة بالحالة. يتم رفض الطلب برمز 400 إذا كان الكيان ينتمي إلى طرف مختلف عن الحالة.",
        "operationId": "create_case_link",
        "x-didit-sdk": {
          "resource": "cases.links",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entity_type",
                  "entity_uuid"
                ],
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "session",
                      "business_session",
                      "transaction"
                    ]
                  },
                  "entity_uuid": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "example": {
                "entity_type": "transaction",
                "entity_uuid": "77000000-0000-4000-8000-000000000077"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/links/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entity_type\": \"transaction\", \"entity_uuid\": \"77000000-0000-4000-8000-000000000077\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.links.create(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    entity_type=\"transaction\",\n    entity_uuid=\"77000000-0000-4000-8000-000000000077\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.links.create(\"c1a5e000-0000-4000-8000-000000000001\", {\n  entity_type: \"transaction\",\n  entity_uuid: \"77000000-0000-4000-8000-000000000077\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Links.Create(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesLinksCreateParams{\n\tEntityType: \"transaction\",\n\tEntityUUID: \"77000000-0000-4000-8000-000000000077\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesLinksCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().links().create(\"c1a5e000-0000-4000-8000-000000000001\", CasesLinksCreateParams.builder()\n        .entityType(CasesLinksCreateParams.EntityType.of(\"transaction\"))\n        .entityUuid(\"77000000-0000-4000-8000-000000000077\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->links->create('c1a5e000-0000-4000-8000-000000000001', [\n    'entity_type' => 'transaction',\n    'entity_uuid' => '77000000-0000-4000-8000-000000000077',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.links.create(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  entity_type: \"transaction\",\n  entity_uuid: \"77000000-0000-4000-8000-000000000077\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Links.CreateAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesLinksCreateParams\n{\n    EntityType = \"transaction\",\n    EntityUuid = \"77000000-0000-4000-8000-000000000077\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء الرابط.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseLink"
                }
              }
            }
          },
          "400": {
            "description": "ينتمي الكيان إلى ملف تعريف مختلف عن الشخص المعني بالحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/{link_uuid}/": {
      "delete": {
        "summary": "إزالة رابط الحالة",
        "description": "فصل جلسة أو جلسة شركة أو معاملة مرتبطة عن الحالة.",
        "operationId": "delete_case_link",
        "x-didit-sdk": {
          "resource": "cases.links",
          "method": "delete",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          },
          {
            "name": "link_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11000000-0000-4000-8000-000000000004"
            },
            "description": "معرّف UUID للرابط."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/links/11000000-0000-4000-8000-000000000004/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.links.delete(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    \"11000000-0000-4000-8000-000000000004\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.links.delete(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  \"11000000-0000-4000-8000-000000000004\",\n);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Links.Delete(ctx, \"c1a5e000-0000-4000-8000-000000000001\", \"11000000-0000-4000-8000-000000000004\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().links().delete(\"c1a5e000-0000-4000-8000-000000000001\", \"11000000-0000-4000-8000-000000000004\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->cases->links->delete('c1a5e000-0000-4000-8000-000000000001', '11000000-0000-4000-8000-000000000004');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.links.delete(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  \"11000000-0000-4000-8000-000000000004\"\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.Links.DeleteAsync(\"c1a5e000-0000-4000-8000-000000000001\", \"11000000-0000-4000-8000-000000000004\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تمت إزالة الرابط."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/events/": {
      "get": {
        "summary": "سرد أحداث الحالة",
        "description": "التسلسل الزمني لسجل التدقيق للحالة للقراءة فقط (الإنشاء، تغييرات الحالة، التعيين، الحل، التصعيد، عمليات النقل، تغييرات الوسم/الأولوية/تاريخ الاستحقاق، إجراءات الكيان، والمزيد).",
        "operationId": "list_case_events",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "list_events",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            },
            "description": "حجم الصفحة."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            },
            "description": "إزاحة تستند إلى الصفر."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/events/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.list_events(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.listEvents(\"c1a5e000-0000-4000-8000-000000000001\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.ListEventsAutoPaging(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesListEventsParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().listEvents(\"c1a5e000-0000-4000-8000-000000000001\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->listEvents('c1a5e000-0000-4000-8000-000000000001') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.list_events(\"c1a5e000-0000-4000-8000-000000000001\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.ListEventsAsync(\"c1a5e000-0000-4000-8000-000000000001\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "أحداث مقسمة إلى صفحات، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد الصفوف المطابقة. دقيق حتى 100، ويقتصر على 100 كحد أقصى بعد ذلك لأسباب تتعلق بالأداء. اعتمد على كون `next` بقيمة null لتحديد الصفحة الأخيرة."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو null."
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو null."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CaseEvent"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/checklist/": {
      "get": {
        "summary": "سرد قائمة التحقق الخاصة بالحالة",
        "description": "عرض عناصر قائمة التحقق الخاصة بالحالة، المنسوخة من content_config.checklist.items في المخطط عند الإنشاء، مرتبة.",
        "operationId": "list_case_checklist",
        "x-didit-sdk": {
          "resource": "cases.checklist",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/checklist/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.checklist.list(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.checklist.list(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Checklist.List(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().checklist().list(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->checklist->list('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.checklist.list(\"c1a5e000-0000-4000-8000-000000000001\").each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Checklist.ListAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "عناصر قائمة التحقق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CaseChecklistItem"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/checklist/{item_uuid}/": {
      "patch": {
        "summary": "تبديل حالة عنصر قائمة التحقق",
        "description": "تحديد عنصر في قائمة التدقيق كمكتمل أو غير مكتمل. يُحظر اتخاذ القرار طالما أن أي عنصر غير مكتمل، ما لم يحدد المخطط أن قائمة التدقيق اختيارية.",
        "operationId": "toggle_case_checklist_item",
        "x-didit-sdk": {
          "resource": "cases.checklist",
          "method": "toggle_item",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          },
          {
            "name": "item_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c4ec0000-0000-4000-8000-000000000005"
            },
            "description": "معرّف UUID لعنصر قائمة التحقق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "is_completed"
                ],
                "properties": {
                  "is_completed": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "is_completed": true
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/checklist/c4ec0000-0000-4000-8000-000000000005/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"is_completed\": true}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.checklist.toggle_item(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    \"c4ec0000-0000-4000-8000-000000000005\",\n    is_completed=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.checklist.toggleItem(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  \"c4ec0000-0000-4000-8000-000000000005\",\n  {\n    is_completed: true,\n  },\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Checklist.ToggleItem(ctx, \"c1a5e000-0000-4000-8000-000000000001\", \"c4ec0000-0000-4000-8000-000000000005\", didit.CasesChecklistToggleItemParams{\n\tIsCompleted: true,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesChecklistToggleItemParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().checklist().toggleItem(\"c1a5e000-0000-4000-8000-000000000001\", \"c4ec0000-0000-4000-8000-000000000005\", CasesChecklistToggleItemParams.builder()\n        .isCompleted(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->checklist->toggleItem('c1a5e000-0000-4000-8000-000000000001', 'c4ec0000-0000-4000-8000-000000000005', [\n    'is_completed' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.checklist.toggle_item(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  \"c4ec0000-0000-4000-8000-000000000005\",\n  is_completed: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Checklist.ToggleItemAsync(\"c1a5e000-0000-4000-8000-000000000001\", \"c4ec0000-0000-4000-8000-000000000005\", new CasesChecklistToggleItemParams\n{\n    IsCompleted = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "عنصر قائمة التحقق المحدّث.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseChecklistItem"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/aml/": {
      "get": {
        "summary": "سرد تطابقات AML للحالة",
        "description": "سرد مطابقات فحص AML لموضوع الحالة. تأتي بنفس بنية المطابقات التي يعيدها POST /v3/aml/.",
        "operationId": "list_case_aml_hits",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "list_aml_hits",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/aml/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.list_aml_hits(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.listAmlHits(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ListAMLHits(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().listAmlHits(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->listAmlHits('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.list_aml_hits(\"c1a5e000-0000-4000-8000-000000000001\").each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ListAmlHitsAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تطابقات فحص AML.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AMLScreening"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/statistics/": {
      "get": {
        "summary": "تحليلات الحالة",
        "description": "تحليلات الحالات المجمعة للنطاق الزمني (الافتراضي هو آخر 30 يوماً؛ بحد أقصى 731 يوماً). تستخدم المخططات البيانية والجداول والإجماليات وأحداث التعيين وعدد عناصر قائمة الانتظار الحالية نفس عوامل التصفية المخصصة للتطبيق. تستخدم عوامل التصفية قيم الحالة الحالية. تسري التواريخ على كل حدث مقياس، لذا تظل الحالات الأقدم التي تم تعيينها أو حلها خلال تلك الفترة مشمولة. عمق قائمة الانتظار مستقل عن النطاق الزمني. تُرجع عوامل التصفية غير الصالحة رمز 400؛ كما يُرجع المخطط التفصيلي أو المكلَّف غير المعروف نتيجة فارغة.",
        "operationId": "get_case_analytics",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "retrieve_statistics",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "date_from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "بداية النطاق (شاملة). القيمة الافتراضية هي منذ 30 يوماً."
          },
          {
            "name": "date_to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "نهاية النطاق (شاملة). القيمة الافتراضية هي اليوم."
          },
          {
            "name": "blueprint",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "التصفية حسب UUID للمخطط الحالي."
          },
          {
            "name": "assigned_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "التصفية حسب UUID للمستخدم المراجِع المعيّن حالياً."
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "LOW",
                "MEDIUM",
                "HIGH"
              ]
            },
            "description": "التصفية حسب أولوية الحالة الحالية."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MANUAL",
                "AML_SCREENING",
                "TRANSACTION_RULE",
                "WORKFLOW_BUILDER"
              ]
            },
            "description": "التصفية حسب مصدر إنشاء الحالة."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "OPEN",
                "AWAITING_USER",
                "RESOLVED"
              ]
            },
            "description": "التصفية حسب حالة الحالة الراهنة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/statistics/?date_from=2026-06-01&date_to=2026-06-30' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.retrieve_statistics()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.retrieveStatistics();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RetrieveStatistics(ctx, didit.CasesRetrieveStatisticsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().retrieveStatistics();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->retrieveStatistics();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.retrieve_statistics\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RetrieveStatisticsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "payload التحليلات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "created": {
                            "type": "integer"
                          },
                          "reviewed": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "tables": {
                      "type": "object",
                      "properties": {
                        "officer": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "قيمة البُعد: البريد الإلكتروني للمسؤول، أو \"blueprint_name:uuid\"، أو المصدر، أو الحالة. وتكون \"unassigned\"/\"none\" للأبعاد المفقودة."
                              },
                              "created": {
                                "type": "integer"
                              },
                              "assigned": {
                                "type": "integer"
                              },
                              "resolved": {
                                "type": "integer"
                              },
                              "threat_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "false_positive_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "unresolved": {
                                "type": "integer"
                              },
                              "reassignment_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "escalation_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_assign_hours": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_resolve_hours": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_handling_hours": {
                                "type": "number",
                                "format": "float"
                              }
                            }
                          }
                        },
                        "blueprint": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "قيمة البُعد: البريد الإلكتروني للمسؤول، أو \"blueprint_name:uuid\"، أو المصدر، أو الحالة. وتكون \"unassigned\"/\"none\" للأبعاد المفقودة."
                              },
                              "created": {
                                "type": "integer"
                              },
                              "assigned": {
                                "type": "integer"
                              },
                              "resolved": {
                                "type": "integer"
                              },
                              "threat_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "false_positive_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "unresolved": {
                                "type": "integer"
                              },
                              "reassignment_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "escalation_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_assign_hours": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_resolve_hours": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_handling_hours": {
                                "type": "number",
                                "format": "float"
                              }
                            }
                          }
                        },
                        "source": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "قيمة البُعد: البريد الإلكتروني للمسؤول، أو \"blueprint_name:uuid\"، أو المصدر، أو الحالة. وتكون \"unassigned\"/\"none\" للأبعاد المفقودة."
                              },
                              "created": {
                                "type": "integer"
                              },
                              "assigned": {
                                "type": "integer"
                              },
                              "resolved": {
                                "type": "integer"
                              },
                              "threat_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "false_positive_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "unresolved": {
                                "type": "integer"
                              },
                              "reassignment_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "escalation_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_assign_hours": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_resolve_hours": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_handling_hours": {
                                "type": "number",
                                "format": "float"
                              }
                            }
                          }
                        },
                        "status": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "قيمة البُعد: البريد الإلكتروني للمسؤول، أو \"blueprint_name:uuid\"، أو المصدر، أو الحالة. وتكون \"unassigned\"/\"none\" للأبعاد المفقودة."
                              },
                              "created": {
                                "type": "integer"
                              },
                              "assigned": {
                                "type": "integer"
                              },
                              "resolved": {
                                "type": "integer"
                              },
                              "threat_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "false_positive_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "unresolved": {
                                "type": "integer"
                              },
                              "reassignment_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "escalation_rate": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_assign_hours": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_resolve_hours": {
                                "type": "number",
                                "format": "float"
                              },
                              "avg_handling_hours": {
                                "type": "number",
                                "format": "float"
                              }
                            }
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "created": {
                          "type": "integer"
                        },
                        "assigned": {
                          "type": "integer"
                        },
                        "resolved": {
                          "type": "integer"
                        },
                        "threat_rate": {
                          "type": "number",
                          "format": "float"
                        },
                        "false_positive_rate": {
                          "type": "number",
                          "format": "float"
                        },
                        "unresolved": {
                          "type": "integer"
                        },
                        "reassignment_rate": {
                          "type": "number",
                          "format": "float"
                        },
                        "escalation_rate": {
                          "type": "number",
                          "format": "float"
                        },
                        "avg_assign_hours": {
                          "type": "number",
                          "format": "float"
                        },
                        "avg_resolve_hours": {
                          "type": "number",
                          "format": "float"
                        },
                        "avg_handling_hours": {
                          "type": "number",
                          "format": "float"
                        }
                      }
                    },
                    "queue": {
                      "type": "object",
                      "description": "لقطة مباشرة، غير مقيّدة بالنطاق الزمني.",
                      "properties": {
                        "open": {
                          "type": "integer"
                        },
                        "overdue": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/bulk/status/": {
      "post": {
        "summary": "تحديث مجمّع لحالة الحالة",
        "description": "تطبيق نفس انتقال الحالة على عدة حالات في استدعاء واحد: يقوم OPEN بإعادة الفتح، ويطلب AWAITING_USER معلومات، ويحل RESOLVED الحالة (الحل مطلوب). يتم تقييم كل حالة بشكل مستقل؛ ويتم الإبلاغ عن إخفاقات بوابات التحقق (قائمة تحقق غير مكتملة، ملاحظة مطلوبة مفقودة) لكل حالة دون إيقاف الدفعة.",
        "operationId": "bulk_update_case_status",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "bulk_update_status",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "case_uuids",
                  "status"
                ],
                "properties": {
                  "case_uuids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "OPEN",
                      "AWAITING_USER",
                      "RESOLVED"
                    ]
                  },
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "FALSE_POSITIVE",
                      "VALID_THREAT",
                      "INCONCLUSIVE",
                      "REQUIREMENTS_NOT_MET",
                      "REQUIREMENTS_SATISFIED"
                    ],
                    "description": "مطلوب عندما تكون الحالة RESOLVED."
                  },
                  "note": {
                    "type": "string",
                    "nullable": true
                  }
                }
              },
              "example": {
                "case_uuids": [
                  "c1a5e000-0000-4000-8000-000000000001"
                ],
                "status": "RESOLVED",
                "resolution": "FALSE_POSITIVE"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/bulk/status/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"case_uuids\": [\"c1a5e000-0000-4000-8000-000000000001\"], \"status\": \"RESOLVED\", \"resolution\": \"FALSE_POSITIVE\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.bulk_update_status(\n    case_uuids=[\"c1a5e000-0000-4000-8000-000000000001\"],\n    status=\"RESOLVED\",\n    resolution=\"FALSE_POSITIVE\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.bulkUpdateStatus({\n  case_uuids: [\"c1a5e000-0000-4000-8000-000000000001\"],\n  status: \"RESOLVED\",\n  resolution: \"FALSE_POSITIVE\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.BulkUpdateStatus(ctx, didit.CasesBulkUpdateStatusParams{\n\tCaseUUIDs:  []string{\"c1a5e000-0000-4000-8000-000000000001\"},\n\tStatus:     \"RESOLVED\",\n\tResolution: didit.Some(didit.CasesBulkUpdateStatusParamsResolution(\"FALSE_POSITIVE\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CasesBulkUpdateStatusParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().bulkUpdateStatus(CasesBulkUpdateStatusParams.builder()\n        .caseUuids(List.of(\"c1a5e000-0000-4000-8000-000000000001\"))\n        .status(CasesBulkUpdateStatusParams.Status.of(\"RESOLVED\"))\n        .resolution(CasesBulkUpdateStatusParams.Resolution.of(\"FALSE_POSITIVE\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->bulkUpdateStatus([\n    'case_uuids' => ['c1a5e000-0000-4000-8000-000000000001'],\n    'status' => 'RESOLVED',\n    'resolution' => 'FALSE_POSITIVE',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.bulk_update_status(\n  case_uuids: [\"c1a5e000-0000-4000-8000-000000000001\"],\n  status: \"RESOLVED\",\n  resolution: \"FALSE_POSITIVE\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.BulkUpdateStatusAsync(new CasesBulkUpdateStatusParams\n{\n    CaseUuids = new string[] { \"c1a5e000-0000-4000-8000-000000000001\" },\n    Status = \"RESOLVED\",\n    Resolution = new CasesBulkUpdateStatusParamsResolution(\"FALSE_POSITIVE\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "النتائج لكل حالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseBulkUpdateResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/bulk/assign/": {
      "post": {
        "summary": "تعيين الحالات بشكل جماعي",
        "description": "تعيين (أو إلغاء تعيين، باستخدام assignee_user_id: null) عدة حالات في وقت واحد. يجب أن تشترك جميع الحالات في نفس المخطط الأولي؛ ويتم الإبلاغ عن عدم التطابق لكل حالة دون إيقاف الدفعة.",
        "operationId": "bulk_assign_cases",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "bulk_assign",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "case_uuids",
                  "assignee_user_id"
                ],
                "properties": {
                  "case_uuids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1
                  },
                  "assignee_user_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "assignee_email": {
                    "type": "string",
                    "format": "email",
                    "nullable": true
                  },
                  "assignee_name": {
                    "type": "string",
                    "nullable": true
                  }
                }
              },
              "example": {
                "case_uuids": [
                  "c1a5e000-0000-4000-8000-000000000001"
                ],
                "assignee_user_id": "9a000000-0000-4000-8000-0000000000aa"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/bulk/assign/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"case_uuids\": [\"c1a5e000-0000-4000-8000-000000000001\"], \"assignee_user_id\": \"9a000000-0000-4000-8000-0000000000aa\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.bulk_assign(\n    case_uuids=[\"c1a5e000-0000-4000-8000-000000000001\"],\n    assignee_user_id=\"9a000000-0000-4000-8000-0000000000aa\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.bulkAssign({\n  case_uuids: [\"c1a5e000-0000-4000-8000-000000000001\"],\n  assignee_user_id: \"9a000000-0000-4000-8000-0000000000aa\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.BulkAssign(ctx, didit.CasesBulkAssignParams{\n\tCaseUUIDs:      []string{\"c1a5e000-0000-4000-8000-000000000001\"},\n\tAssigneeUserID: didit.String(\"9a000000-0000-4000-8000-0000000000aa\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CasesBulkAssignParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().bulkAssign(CasesBulkAssignParams.builder()\n        .caseUuids(List.of(\"c1a5e000-0000-4000-8000-000000000001\"))\n        .assigneeUserId(\"9a000000-0000-4000-8000-0000000000aa\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->bulkAssign([\n    'case_uuids' => ['c1a5e000-0000-4000-8000-000000000001'],\n    'assignee_user_id' => '9a000000-0000-4000-8000-0000000000aa',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.bulk_assign(\n  case_uuids: [\"c1a5e000-0000-4000-8000-000000000001\"],\n  assignee_user_id: \"9a000000-0000-4000-8000-0000000000aa\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.BulkAssignAsync(new CasesBulkAssignParams\n{\n    CaseUuids = new string[] { \"c1a5e000-0000-4000-8000-000000000001\" },\n    AssigneeUserId = \"9a000000-0000-4000-8000-0000000000aa\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "النتائج لكل حالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseBulkUpdateResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/": {
      "get": {
        "summary": "سرد مخططات العمل",
        "description": "سرد مخططات عمل الحالات للتطبيق.",
        "operationId": "list_case_blueprints",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Blueprints"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            },
            "description": "حجم الصفحة."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            },
            "description": "إزاحة تستند إلى الصفر."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.blueprints.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.blueprints.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Blueprints.ListAutoPaging(ctx, didit.CasesBlueprintsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().blueprints().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->blueprints->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.blueprints.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Blueprints.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "قائمة المخططات مقسمة إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد الصفوف المتطابقة، بحد أقصى 100 لتحسين الأداء."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CaseBlueprintListItem"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء مخطط",
        "description": "أنشئ مخططاً لحالة: الإعدادات العامة (التعيين، التصعيد، النقل، المراجعة بأربعة أعين) بالإضافة إلى content_config، وهي الأقسام الستة التي تدير صفحة الحالة. عيّن publish=false لإنشاء مسودة غير منشورة؛ ويؤدي النشر إلى إنشاء أول إصدار فعّال لها. يؤدي تجاهل مسودة لم تُنشر مطلقاً إلى حذفها.",
        "operationId": "create_case_blueprint",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Blueprints"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "assignee_pool"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 24,
                    "description": "بحد أقصى 24 حرفاً، على سبيل المثال \"تحقيق AML\"."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true
                  },
                  "assignee_pool": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "description": "قائمة بمعرّفات UUID للمستخدمين. يتم رفض المصفوفات الفارغة بالرسالة \"Pick at least one assignee\"."
                  },
                  "assignment_method": {
                    "type": "string",
                    "enum": [
                      "MANUAL",
                      "AUTOMATIC"
                    ],
                    "default": "MANUAL"
                  },
                  "max_active_cases": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 1,
                    "description": "حد الوضع التلقائي: \"أقل من N من الحالات المسندة لهذا المخطط\"."
                  },
                  "escalation_enabled": {
                    "type": "boolean",
                    "default": false
                  },
                  "escalation_blueprint": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "معرّف UUID للمخطط المستهدف. لا يُفرض ذلك عند الحفظ، ولكن إجراء التصعيد سيفشل بالرمز 400 حتى يتم تعيين كل من escalation_enabled وescalation_blueprint."
                  },
                  "transfer_enabled": {
                    "type": "boolean",
                    "default": false
                  },
                  "four_eyes_checker_blueprint": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "يؤدي ضبط هذا الخيار إلى تمكين مراجعة بأربعة أعين: تُوضَع القرارات الخاصة بهذا المخطط في قائمة انتظار مخطط المدقِّق."
                  },
                  "require_resolution_note": {
                    "type": "boolean",
                    "default": false
                  },
                  "content_config": {
                    "$ref": "#/components/schemas/CaseContentConfig"
                  },
                  "is_active": {
                    "type": "boolean",
                    "default": true
                  },
                  "default_deadline_hours": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 1,
                    "maximum": 8760,
                    "description": "الموعد النهائي الافتراضي للحالات المفتوحة حديثاً. المواعيد النهائية للحالات الحالية تظل دون تغيير."
                  },
                  "publish": {
                    "type": "boolean",
                    "writeOnly": true,
                    "default": true,
                    "description": "عَيِّن القيمة إلى false لحفظ مسودة لم تُنشر من قبل. يظل السجل غير نشط في الإصدار 0 حتى يتم نشر المسودة صراحةً. يؤدي إغفال هذا الحقل إلى الحفاظ على الإنشاء الفوري لعمليات التكامل الحالية."
                  }
                }
              },
              "example": {
                "name": "AML investigation",
                "assignee_pool": [
                  "9a000000-0000-4000-8000-0000000000aa"
                ],
                "assignment_method": "AUTOMATIC",
                "max_active_cases": 15,
                "require_resolution_note": true,
                "content_config": {
                  "aml_control": {
                    "enabled": true,
                    "financial": true,
                    "identity": false
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\": \"AML investigation\", \"assignee_pool\": [\"9a000000-0000-4000-8000-0000000000aa\"], \"assignment_method\": \"AUTOMATIC\", \"max_active_cases\": 15, \"require_resolution_note\": true, \"content_config\": {\"aml_control\": {\"enabled\": true, \"financial\": true, \"identity\": false}}}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.create(\n    name=\"AML investigation\",\n    assignee_pool=[\"9a000000-0000-4000-8000-0000000000aa\"],\n    assignment_method=\"AUTOMATIC\",\n    max_active_cases=15,\n    require_resolution_note=True,\n    content_config={\n        \"aml_control\": {\n            \"enabled\": True,\n            \"financial\": True,\n            \"identity\": False,\n        },\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.create({\n  name: \"AML investigation\",\n  assignee_pool: [\"9a000000-0000-4000-8000-0000000000aa\"],\n  assignment_method: \"AUTOMATIC\",\n  max_active_cases: 15,\n  require_resolution_note: true,\n  content_config: {\n    aml_control: {\n      enabled: true,\n      financial: true,\n      identity: false,\n    },\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Create(ctx, didit.CasesBlueprintsCreateParams{\n\tName:                  \"AML investigation\",\n\tAssigneePool:          []string{\"9a000000-0000-4000-8000-0000000000aa\"},\n\tAssignmentMethod:      didit.Some(didit.CasesBlueprintsCreateParamsAssignmentMethod(\"AUTOMATIC\")),\n\tMaxActiveCases:        didit.Int(15),\n\tRequireResolutionNote: didit.Bool(true),\n\tContentConfig: didit.Some(didit.CaseContentConfigParam{\n\t\tAMLControl: didit.Some(didit.CaseContentConfigParamAMLControl{\n\t\t\tEnabled:   didit.Bool(true),\n\t\t\tFinancial: didit.Bool(true),\n\t\t\tIdentity:  didit.Bool(false),\n\t\t}),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CaseContentConfig;\nimport me.didit.types.CasesBlueprintsCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().create(CasesBlueprintsCreateParams.builder()\n        .name(\"AML investigation\")\n        .assigneePool(List.of(\"9a000000-0000-4000-8000-0000000000aa\"))\n        .assignmentMethod(CasesBlueprintsCreateParams.AssignmentMethod.of(\"AUTOMATIC\"))\n        .maxActiveCases(15L)\n        .requireResolutionNote(true)\n        .contentConfig(CaseContentConfig.builder()\n                .amlControl(CaseContentConfig.AmlControl.builder()\n                        .enabled(true)\n                        .financial(true)\n                        .identity(false)\n                        .build())\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->blueprints->create([\n    'name' => 'AML investigation',\n    'assignee_pool' => ['9a000000-0000-4000-8000-0000000000aa'],\n    'assignment_method' => 'AUTOMATIC',\n    'max_active_cases' => 15,\n    'require_resolution_note' => true,\n    'content_config' => [\n        'aml_control' => [\n            'enabled' => true,\n            'financial' => true,\n            'identity' => false,\n        ],\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.create(\n  name: \"AML investigation\",\n  assignee_pool: [\"9a000000-0000-4000-8000-0000000000aa\"],\n  assignment_method: \"AUTOMATIC\",\n  max_active_cases: 15,\n  require_resolution_note: true,\n  content_config: {\n    aml_control: {\n      enabled: true,\n      financial: true,\n      identity: false,\n    },\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.CreateAsync(new CasesBlueprintsCreateParams\n{\n    Name = \"AML investigation\",\n    AssigneePool = new string[] { \"9a000000-0000-4000-8000-0000000000aa\" },\n    AssignmentMethod = new CasesBlueprintsCreateParamsAssignmentMethod(\"AUTOMATIC\"),\n    MaxActiveCases = 15,\n    RequireResolutionNote = true,\n    ContentConfig = new CaseContentConfig\n    {\n        AmlControl = new CaseContentConfigAmlControl\n        {\n            Enabled = true,\n            Financial = true,\n            Identity = false,\n        },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء المخطط الأولي (Blueprint).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseBlueprintDetail"
                }
              }
            }
          },
          "400": {
            "description": "الاسم يتجاوز 24 حرفاً، أو assignee_pool فارغ، أو لم يتم العثور على مخطط مرجعي متداخل (التصعيد/الفاحص).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/": {
      "get": {
        "summary": "الحصول على المخطط",
        "description": "استرجاع المخطط، بما في ذلك مصادر الإنشاء المرتبطة به (تكوين AML، وقواعد المعاملات، وعُقد سير العمل) والمخططات التي تُصعّد إليه.",
        "operationId": "get_case_blueprint",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "retrieve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Blueprints"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "blueprint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "b1de0000-0000-4000-8000-000000000002"
            },
            "description": "معرّف UUID للمخطط الأولي (Blueprint)."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/b1de0000-0000-4000-8000-000000000002/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.retrieve(\n    \"b1de0000-0000-4000-8000-000000000002\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.retrieve(\"b1de0000-0000-4000-8000-000000000002\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Retrieve(ctx, \"b1de0000-0000-4000-8000-000000000002\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().retrieve(\"b1de0000-0000-4000-8000-000000000002\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->blueprints->retrieve('b1de0000-0000-4000-8000-000000000002');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.retrieve(\"b1de0000-0000-4000-8000-000000000002\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.RetrieveAsync(\"b1de0000-0000-4000-8000-000000000002\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل المخطط الأولي (Blueprint).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseBlueprintDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث المخطط الأولي",
        "description": "تحديث جزئي للإعدادات العامة أو content_config لمخطط العمل.",
        "operationId": "update_case_blueprint",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "update",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Blueprints"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "blueprint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "b1de0000-0000-4000-8000-000000000002"
            },
            "description": "معرّف UUID للمخطط الأولي (Blueprint)."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 24,
                    "description": "بحد أقصى 24 حرفاً، على سبيل المثال \"تحقيق AML\"."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true
                  },
                  "assignee_pool": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "description": "قائمة بمعرّفات UUID للمستخدمين. يتم رفض المصفوفات الفارغة بالرسالة \"Pick at least one assignee\"."
                  },
                  "assignment_method": {
                    "type": "string",
                    "enum": [
                      "MANUAL",
                      "AUTOMATIC"
                    ]
                  },
                  "max_active_cases": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 1,
                    "description": "حد الوضع التلقائي: \"أقل من N من الحالات المسندة لهذا المخطط\"."
                  },
                  "escalation_enabled": {
                    "type": "boolean"
                  },
                  "escalation_blueprint": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "معرّف UUID للمخطط المستهدف. لا يُفرض ذلك عند الحفظ، ولكن إجراء التصعيد سيفشل بالرمز 400 حتى يتم تعيين كل من escalation_enabled وescalation_blueprint."
                  },
                  "transfer_enabled": {
                    "type": "boolean"
                  },
                  "four_eyes_checker_blueprint": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "يؤدي ضبط هذا الخيار إلى تمكين مراجعة بأربعة أعين: تُوضَع القرارات الخاصة بهذا المخطط في قائمة انتظار مخطط المدقِّق."
                  },
                  "require_resolution_note": {
                    "type": "boolean"
                  },
                  "content_config": {
                    "$ref": "#/components/schemas/CaseContentConfig"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "default_deadline_hours": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 1,
                    "maximum": 8760,
                    "description": "الموعد النهائي الافتراضي للحالات المفتوحة حديثاً. المواعيد النهائية للحالات الحالية تظل دون تغيير."
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "النسخة المفتوحة بواسطة المحرر. ترجع النسخة القديمة 409 دون تغيير سياسة المراجعة."
                  }
                }
              },
              "example": {
                "transfer_enabled": true
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/b1de0000-0000-4000-8000-000000000002/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"transfer_enabled\": true}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.update(\n    \"b1de0000-0000-4000-8000-000000000002\",\n    transfer_enabled=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.update(\"b1de0000-0000-4000-8000-000000000002\", {\n  transfer_enabled: true,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Update(ctx, \"b1de0000-0000-4000-8000-000000000002\", didit.CasesBlueprintsUpdateParams{\n\tTransferEnabled: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesBlueprintsUpdateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().update(\"b1de0000-0000-4000-8000-000000000002\", CasesBlueprintsUpdateParams.builder()\n        .transferEnabled(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->blueprints->update('b1de0000-0000-4000-8000-000000000002', [\n    'transfer_enabled' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.update(\n  \"b1de0000-0000-4000-8000-000000000002\",\n  transfer_enabled: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.UpdateAsync(\"b1de0000-0000-4000-8000-000000000002\", new CasesBlueprintsUpdateParams\n{\n    TransferEnabled = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "المخطط المحدّث.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseBlueprintDetail"
                }
              }
            }
          },
          "409": {
            "description": "تغيرت سياسة المراجعة منذ expected_version. راجع أحدث إصدار قبل إعادة المحاولة."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "summary": "حذف المخطط",
        "description": "حذف مخطط. ينجح الحذف دائمًا ولا يمس حالات المخطط: تحتفظ الحالات الحالية بمرجع المخطط الخاص بها وتظل إعداداته مُطبَّقة عليها. لا يظهر المخطط المحذوف بعد ذلك في قوائم المخططات ولا يمكن اختياره كوجهة نقل؛ وإذا حُذف مخطط المُنشئ أثناء تعليق قرار بانتظار موافقة أربعة أعين، فإن القرار المرفوض يترك الحالة في مخطط المراجِع.",
        "operationId": "delete_case_blueprint",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "delete",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Blueprints"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "blueprint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "b1de0000-0000-4000-8000-000000000002"
            },
            "description": "معرّف UUID للمخطط الأولي (Blueprint)."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/b1de0000-0000-4000-8000-000000000002/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.blueprints.delete(\n    \"b1de0000-0000-4000-8000-000000000002\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.blueprints.delete(\"b1de0000-0000-4000-8000-000000000002\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Blueprints.Delete(ctx, \"b1de0000-0000-4000-8000-000000000002\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().blueprints().delete(\"b1de0000-0000-4000-8000-000000000002\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->cases->blueprints->delete('b1de0000-0000-4000-8000-000000000002');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.blueprints.delete(\"b1de0000-0000-4000-8000-000000000002\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.Blueprints.DeleteAsync(\"b1de0000-0000-4000-8000-000000000002\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف المخطط الأولي (Blueprint)."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/presets/": {
      "get": {
        "summary": "سرد الإعدادات المسبقة لمخططات العمل",
        "description": "عرض الإعدادات المسبقة المضمنة الأربعة (Screening hit، وAML investigation، وSuspicious activity، وKYC review) مع content_config الخاص بها وما إذا كان كل منها مثبتًا بالفعل في هذا التطبيق.",
        "operationId": "list_case_blueprint_presets",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "list_presets",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Blueprints"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/presets/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.list_presets()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.listPresets();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.ListPresets(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().listPresets();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->blueprints->listPresets();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.list_presets\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.ListPresetsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "كتالوج الإعدادات المسبقة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "preset_key": {
                            "type": "string",
                            "enum": [
                              "screening_hit",
                              "aml_investigation",
                              "suspicious_activity",
                              "kyc"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "content_config": {
                            "$ref": "#/components/schemas/CaseContentConfig"
                          },
                          "installed": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/presets/install/": {
      "post": {
        "summary": "تثبيت الإعدادات المسبقة للمخطط",
        "description": "انسخ إعداداً مسبقاً واحداً أو أكثر إلى التطبيق كمخططات قابلة للتعديل. تتسم العملية بخاصية idempotency لكل preset_key؛ أغفل preset_keys لتثبيت كل إعداد مسبق لم يتم تثبيته بعد.",
        "operationId": "install_case_blueprint_presets",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "install_presets",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Blueprints"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "preset_keys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "nullable": true,
                    "description": "مجموعة فرعية من screening_hit، وaml_investigation، وsuspicious_activity، وkyc. احذفه لتثبيت الكل."
                  }
                }
              },
              "example": {
                "preset_keys": [
                  "aml_investigation",
                  "kyc"
                ]
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/presets/install/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"preset_keys\": [\"aml_investigation\", \"kyc\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.install_presets(\n    preset_keys=[\"aml_investigation\", \"kyc\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.installPresets({\n  preset_keys: [\"aml_investigation\", \"kyc\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.InstallPresets(ctx, didit.CasesBlueprintsInstallPresetsParams{\n\tPresetKeys: didit.Some([]string{\"aml_investigation\", \"kyc\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CasesBlueprintsInstallPresetsParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().installPresets(CasesBlueprintsInstallPresetsParams.builder()\n        .presetKeys(List.of(\"aml_investigation\", \"kyc\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->blueprints->installPresets([\n    'preset_keys' => ['aml_investigation', 'kyc'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.install_presets(preset_keys: [\"aml_investigation\", \"kyc\"])\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.InstallPresetsAsync(new CasesBlueprintsInstallPresetsParams\n{\n    PresetKeys = new string[] { \"aml_investigation\", \"kyc\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "إعداد مسبق واحد أو أكثر تم تثبيته.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseBlueprintPresetInstallResult"
                }
              }
            }
          },
          "200": {
            "description": "لا توجد إعدادات مسبقة جديدة لتثبيتها (جميع الإعدادات المسبقة المطلوبة موجودة بالفعل).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseBlueprintPresetInstallResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/report-templates/": {
      "get": {
        "summary": "عرض قوالب التقارير",
        "description": "سرد قوالب تقارير وحدة المعلومات المالية (FIU) للتطبيق.",
        "operationId": "list_report_templates",
        "x-didit-sdk": {
          "resource": "report_templates",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Report Templates"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            },
            "description": "حجم الصفحة."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            },
            "description": "إزاحة تستند إلى الصفر."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.report_templates.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.reportTemplates.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.ReportTemplates.ListAutoPaging(ctx, didit.ReportTemplatesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.reportTemplates().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->reportTemplates->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.report_templates.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.ReportTemplates.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "قوالب مقسمة إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد الصفوف المتطابقة، بحد أقصى 100 لتحسين الأداء."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReportTemplateDetail"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء قالب تقرير",
        "description": "أنشئ قالب ترويسة goAML قابلاً لإعادة الاستخدام لكل اختصاص قضائي ولكل نوع تقرير. يتم الرفض برمز 400 إذا كان أي من الحقول الإلزامية على مستوى القالب (rentity_id وsubmission_code وcurrency_code_local) مفقوداً من field_config؛ ولا يمكن حفظ قالب غير صالح أو استخدامه لإنشاء تقرير. أما حقول الترويسة الخاصة بكل إيداع (action وsubmission_date وtransactions) فيتم فرضها عند التحقق من صحة التقرير أو اعتماده نهائياً بدلاً من ذلك.",
        "operationId": "create_report_template",
        "x-didit-sdk": {
          "resource": "report_templates",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Report Templates"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "jurisdiction",
                  "report_type"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "jurisdiction": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2، يتم تحويله إلى أحرف كبيرة عند الحفظ."
                  },
                  "report_type": {
                    "type": "string",
                    "enum": [
                      "SAR",
                      "STR",
                      "CTR",
                      "TTR",
                      "UTR",
                      "IFT",
                      "CBR",
                      "TFR"
                    ]
                  },
                  "field_config": {
                    "type": "object",
                    "description": "القيم الافتراضية القابلة لإعادة الاستخدام لرأس goAML. الحقول الإلزامية على مستوى القالب: rentity_id، وsubmission_code، وcurrency_code_local (من 3 أحرف). الحقول الاختيارية: enabled_fields (أقسام التقرير الاختيارية المطلوب تضمينها) بالإضافة إلى القيم الافتراضية لكل من reporting_person، وlocation، وreason، وaction. يتم فرض حقول الرأس الخاصة بكل ملف تقديم (action، وsubmission_date، وtransactions، وjurisdiction) عند التحقق من صحة التقرير أو إتمامه نهائياً، وليس على مستوى القالب."
                  }
                }
              },
              "example": {
                "name": "US SAR default",
                "jurisdiction": "US",
                "report_type": "SAR",
                "field_config": {
                  "rentity_id": "FIU-US-00123",
                  "submission_code": "E",
                  "currency_code_local": "USD"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\": \"US SAR default\", \"jurisdiction\": \"US\", \"report_type\": \"SAR\", \"field_config\": {\"rentity_id\": \"FIU-US-00123\", \"submission_code\": \"E\", \"currency_code_local\": \"USD\"}}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.report_templates.create(\n    name=\"US SAR default\",\n    jurisdiction=\"US\",\n    report_type=\"SAR\",\n    field_config={\"rentity_id\": \"FIU-US-00123\", \"submission_code\": \"E\", \"currency_code_local\": \"USD\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.reportTemplates.create({\n  name: \"US SAR default\",\n  jurisdiction: \"US\",\n  report_type: \"SAR\",\n  field_config: { rentity_id: \"FIU-US-00123\", submission_code: \"E\", currency_code_local: \"USD\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.ReportTemplates.Create(ctx, didit.ReportTemplatesCreateParams{\n\tName:         \"US SAR default\",\n\tJurisdiction: \"US\",\n\tReportType:   \"SAR\",\n\tFieldConfig:  didit.Some(map[string]any{\"rentity_id\": \"FIU-US-00123\", \"submission_code\": \"E\", \"currency_code_local\": \"USD\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.ReportTemplatesCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.reportTemplates().create(ReportTemplatesCreateParams.builder()\n        .name(\"US SAR default\")\n        .jurisdiction(\"US\")\n        .reportType(ReportTemplatesCreateParams.ReportType.of(\"SAR\"))\n        .fieldConfig(Map.of(\"rentity_id\", \"FIU-US-00123\", \"submission_code\", \"E\", \"currency_code_local\", \"USD\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->reportTemplates->create([\n    'name' => 'US SAR default',\n    'jurisdiction' => 'US',\n    'report_type' => 'SAR',\n    'field_config' => ['rentity_id' => 'FIU-US-00123', 'submission_code' => 'E', 'currency_code_local' => 'USD'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.report_templates.create(\n  name: \"US SAR default\",\n  jurisdiction: \"US\",\n  report_type: \"SAR\",\n  field_config: { rentity_id: \"FIU-US-00123\", submission_code: \"E\", currency_code_local: \"USD\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.ReportTemplates.CreateAsync(new ReportTemplatesCreateParams\n{\n    Name = \"US SAR default\",\n    Jurisdiction = \"US\",\n    ReportType = \"SAR\",\n    FieldConfig = new Dictionary<string, object> { [\"rentity_id\"] = \"FIU-US-00123\", [\"submission_code\"] = \"E\", [\"currency_code_local\"] = \"USD\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء القالب.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportTemplateDetail"
                }
              }
            }
          },
          "400": {
            "description": "اختصاص قضائي غير معروف، أو فشل field_config في التحقق من الحقول الإلزامية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/report-templates/{template_uuid}/": {
      "get": {
        "summary": "الحصول على قالب التقرير",
        "description": "استرجاع قالب تقرير.",
        "operationId": "get_report_template",
        "x-didit-sdk": {
          "resource": "report_templates",
          "method": "retrieve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Report Templates"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "template_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "7ec00000-0000-4000-8000-000000000006"
            },
            "description": "معرّف UUID لقالب التقرير."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/7ec00000-0000-4000-8000-000000000006/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.report_templates.retrieve(\n    \"7ec00000-0000-4000-8000-000000000006\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.reportTemplates.retrieve(\"7ec00000-0000-4000-8000-000000000006\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.ReportTemplates.Retrieve(ctx, \"7ec00000-0000-4000-8000-000000000006\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.reportTemplates().retrieve(\"7ec00000-0000-4000-8000-000000000006\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->reportTemplates->retrieve('7ec00000-0000-4000-8000-000000000006');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.report_templates.retrieve(\"7ec00000-0000-4000-8000-000000000006\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.ReportTemplates.RetrieveAsync(\"7ec00000-0000-4000-8000-000000000006\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل القالب.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportTemplateDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث قالب التقرير",
        "description": "تحديث جزئي لقالب تقرير. يعيد التحقق من صحة حقول goAML الإلزامية عند الحفظ.",
        "operationId": "update_report_template",
        "x-didit-sdk": {
          "resource": "report_templates",
          "method": "update",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Report Templates"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "template_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "7ec00000-0000-4000-8000-000000000006"
            },
            "description": "معرّف UUID لقالب التقرير."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "jurisdiction": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2، يتم تحويله إلى أحرف كبيرة عند الحفظ."
                  },
                  "report_type": {
                    "type": "string",
                    "enum": [
                      "SAR",
                      "STR",
                      "CTR",
                      "TTR",
                      "UTR",
                      "IFT",
                      "CBR",
                      "TFR"
                    ]
                  },
                  "field_config": {
                    "type": "object",
                    "description": "القيم الافتراضية القابلة لإعادة الاستخدام لرأس goAML. الحقول الإلزامية على مستوى القالب: rentity_id، وsubmission_code، وcurrency_code_local (من 3 أحرف). الحقول الاختيارية: enabled_fields (أقسام التقرير الاختيارية المطلوب تضمينها) بالإضافة إلى القيم الافتراضية لكل من reporting_person، وlocation، وreason، وaction. يتم فرض حقول الرأس الخاصة بكل ملف تقديم (action، وsubmission_date، وtransactions، وjurisdiction) عند التحقق من صحة التقرير أو إتمامه نهائياً، وليس على مستوى القالب."
                  }
                }
              },
              "example": {
                "field_config": {
                  "rentity_id": "FIU-US-00124"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/7ec00000-0000-4000-8000-000000000006/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"field_config\": {\"rentity_id\": \"FIU-US-00124\"}}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.report_templates.update(\n    \"7ec00000-0000-4000-8000-000000000006\",\n    field_config={\"rentity_id\": \"FIU-US-00124\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.reportTemplates.update(\"7ec00000-0000-4000-8000-000000000006\", {\n  field_config: { rentity_id: \"FIU-US-00124\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.ReportTemplates.Update(ctx, \"7ec00000-0000-4000-8000-000000000006\", didit.ReportTemplatesUpdateParams{\n\tFieldConfig: didit.Some(map[string]any{\"rentity_id\": \"FIU-US-00124\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.ReportTemplatesUpdateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.reportTemplates().update(\"7ec00000-0000-4000-8000-000000000006\", ReportTemplatesUpdateParams.builder()\n        .fieldConfig(Map.of(\"rentity_id\", \"FIU-US-00124\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->reportTemplates->update('7ec00000-0000-4000-8000-000000000006', [\n    'field_config' => ['rentity_id' => 'FIU-US-00124'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.report_templates.update(\n  \"7ec00000-0000-4000-8000-000000000006\",\n  field_config: { rentity_id: \"FIU-US-00124\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.ReportTemplates.UpdateAsync(\"7ec00000-0000-4000-8000-000000000006\", new ReportTemplatesUpdateParams\n{\n    FieldConfig = new Dictionary<string, object> { [\"rentity_id\"] = \"FIU-US-00124\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "القالب المحدّث.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportTemplateDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "summary": "حذف قالب التقرير",
        "description": "حذف قالب تقرير. لا تتأثر التقارير التي تم إنشاؤها منه بالفعل.",
        "operationId": "delete_report_template",
        "x-didit-sdk": {
          "resource": "report_templates",
          "method": "delete",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Report Templates"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "template_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "7ec00000-0000-4000-8000-000000000006"
            },
            "description": "معرّف UUID لقالب التقرير."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/7ec00000-0000-4000-8000-000000000006/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.report_templates.delete(\n    \"7ec00000-0000-4000-8000-000000000006\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.reportTemplates.delete(\"7ec00000-0000-4000-8000-000000000006\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.ReportTemplates.Delete(ctx, \"7ec00000-0000-4000-8000-000000000006\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.reportTemplates().delete(\"7ec00000-0000-4000-8000-000000000006\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->reportTemplates->delete('7ec00000-0000-4000-8000-000000000006');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.report_templates.delete(\"7ec00000-0000-4000-8000-000000000006\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.ReportTemplates.DeleteAsync(\"7ec00000-0000-4000-8000-000000000006\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف القالب."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/": {
      "get": {
        "summary": "عرض التقارير للحالة",
        "description": "سرد تقارير وحدة المعلومات المالية (FIU) التي تم إنشاؤها للحالة.",
        "operationId": "list_case_regulatory_reports",
        "x-didit-sdk": {
          "resource": "cases.regulatory_reports",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            },
            "description": "حجم الصفحة."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            },
            "description": "إزاحة تستند إلى الصفر."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/regulatory-reports/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.regulatory_reports.list(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.regulatoryReports.list(\"c1a5e000-0000-4000-8000-000000000001\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.RegulatoryReports.ListAutoPaging(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesRegulatoryReportsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().regulatoryReports().list(\"c1a5e000-0000-4000-8000-000000000001\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->regulatoryReports->list('c1a5e000-0000-4000-8000-000000000001') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.regulatory_reports.list(\"c1a5e000-0000-4000-8000-000000000001\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.RegulatoryReports.ListAsync(\"c1a5e000-0000-4000-8000-000000000001\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "تقارير مقسّمة إلى صفحات للحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulatoryReportList"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء تقرير من حالة",
        "description": "أنشئ مسودة تقرير وحدة الاستخبارات المالية (FIU) للحالة: بحالة DRAFT، ومملوءة تلقائياً من القالب الاختياري بالإضافة إلى موضوع الحالة والمعاملات المرتبطة والسرد. تحقق من صحة التقرير ثم أنهِ التقرير لإنشاء ملفي goAML XML وPDF.",
        "operationId": "create_case_regulatory_report",
        "x-didit-sdk": {
          "resource": "cases.regulatory_reports",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "case_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "c1a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف الحالة UUID."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_type": {
                    "type": "string",
                    "enum": [
                      "SAR",
                      "STR",
                      "CTR",
                      "TTR",
                      "UTR",
                      "IFT",
                      "CBR",
                      "TFR"
                    ],
                    "description": "مطلوب ما لم يتم تحديد قالب؛ يُستخدم report_type الخاص بالقالب في حال عدم تحديده."
                  },
                  "jurisdiction": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "مطلوب ما لم يتم تحديد قالب."
                  },
                  "template": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "معرّف UUID لقالب التقرير؛ يقوم field_config الخاص به بتهيئة المسودة قبل دمج البيانات المستمدة من الحالة."
                  },
                  "transactions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "nullable": true,
                    "description": "المعاملات المراد إرفاقها؛ القيمة الافتراضية هي المعاملات المرتبطة بالحالة."
                  },
                  "rentity_id": {
                    "type": "string",
                    "nullable": true
                  },
                  "rentity_branch": {
                    "type": "string",
                    "nullable": true
                  },
                  "submission_code": {
                    "type": "string",
                    "enum": [
                      "E",
                      "M"
                    ],
                    "default": "E"
                  },
                  "entity_reference": {
                    "type": "string",
                    "nullable": true
                  },
                  "fiu_ref_number": {
                    "type": "string",
                    "nullable": true
                  },
                  "currency_code_local": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "nullable": true
                  },
                  "submission_date": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "reporting_person": {
                    "type": "object"
                  },
                  "location": {
                    "type": "object"
                  },
                  "reason": {
                    "type": "string",
                    "nullable": true
                  },
                  "action": {
                    "type": "string",
                    "nullable": true
                  },
                  "activity": {
                    "type": "string",
                    "nullable": true
                  },
                  "narrative": {
                    "type": "object",
                    "properties": {
                      "who": {
                        "type": "string"
                      },
                      "what": {
                        "type": "string"
                      },
                      "when": {
                        "type": "string"
                      },
                      "where": {
                        "type": "string"
                      },
                      "why": {
                        "type": "string"
                      },
                      "how": {
                        "type": "string"
                      }
                    }
                  },
                  "report_indicators": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "included_fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "template": "7ec00000-0000-4000-8000-000000000006"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/regulatory-reports/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"template\": \"7ec00000-0000-4000-8000-000000000006\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.regulatory_reports.create(\n    \"c1a5e000-0000-4000-8000-000000000001\",\n    template=\"7ec00000-0000-4000-8000-000000000006\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.regulatoryReports.create(\"c1a5e000-0000-4000-8000-000000000001\", {\n  template: \"7ec00000-0000-4000-8000-000000000006\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RegulatoryReports.Create(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesRegulatoryReportsCreateParams{\n\tTemplate: didit.String(\"7ec00000-0000-4000-8000-000000000006\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasesRegulatoryReportsCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().regulatoryReports().create(\"c1a5e000-0000-4000-8000-000000000001\", CasesRegulatoryReportsCreateParams.builder()\n        .template(\"7ec00000-0000-4000-8000-000000000006\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->regulatoryReports->create('c1a5e000-0000-4000-8000-000000000001', [\n    'template' => '7ec00000-0000-4000-8000-000000000006',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.regulatory_reports.create(\n  \"c1a5e000-0000-4000-8000-000000000001\",\n  template: \"7ec00000-0000-4000-8000-000000000006\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RegulatoryReports.CreateAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesRegulatoryReportsCreateParams\n{\n    Template = \"7ec00000-0000-4000-8000-000000000006\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء مسودة التقرير.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulatoryReportDetail"
                }
              }
            }
          },
          "400": {
            "description": "لم يتم العثور على القالب المشار إليه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/": {
      "get": {
        "summary": "عرض التقارير",
        "description": "قائمة تقارير وحدة المعلومات المالية (FIU) على مستوى التطبيق، وتتم تصفيتها اختيارياً حسب الحالة، أو نوع التقرير، أو الحالة المحددة.",
        "operationId": "list_regulatory_reports",
        "x-didit-sdk": {
          "resource": "regulatory_reports",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            },
            "description": "حجم الصفحة."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            },
            "description": "إزاحة تستند إلى الصفر."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "VALIDATED",
                "FINALIZED"
              ]
            },
            "description": "التصفية حسب الحالة."
          },
          {
            "name": "report_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "SAR",
                "STR",
                "CTR",
                "TTR",
                "UTR",
                "IFT",
                "CBR",
                "TFR"
              ]
            },
            "description": "التصفية حسب نوع التقرير."
          },
          {
            "name": "case",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "التصفية للتقارير المتعلقة بهذه الحالة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.regulatory_reports.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.regulatoryReports.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.RegulatoryReports.ListAutoPaging(ctx, didit.RegulatoryReportsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.regulatoryReports().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->regulatoryReports->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.regulatory_reports.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.RegulatoryReports.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "تقارير مقسمة إلى صفحات على مستوى التطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulatoryReportList"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء تقرير مستقل",
        "description": "أنشئ مسودة تقرير وحدة الاستخبارات المالية (FIU) من صفحة التقارير المستقلة: يلزم توفير كل من الحالة والقالب (على عكس الإنشاء المحدد بنطاق الحالة، والذي يمكن فيه حذف القالب).",
        "operationId": "create_standalone_regulatory_report",
        "x-didit-sdk": {
          "resource": "regulatory_reports",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "case",
                  "template"
                ],
                "properties": {
                  "case": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "template": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "report_type": {
                    "type": "string",
                    "enum": [
                      "SAR",
                      "STR",
                      "CTR",
                      "TTR",
                      "UTR",
                      "IFT",
                      "CBR",
                      "TFR"
                    ],
                    "description": "مطلوب ما لم يتم تحديد قالب؛ يُستخدم report_type الخاص بالقالب في حال عدم تحديده."
                  },
                  "jurisdiction": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "مطلوب ما لم يتم تحديد قالب."
                  },
                  "transactions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "nullable": true,
                    "description": "المعاملات المراد إرفاقها؛ القيمة الافتراضية هي المعاملات المرتبطة بالحالة."
                  },
                  "rentity_id": {
                    "type": "string",
                    "nullable": true
                  },
                  "rentity_branch": {
                    "type": "string",
                    "nullable": true
                  },
                  "submission_code": {
                    "type": "string",
                    "enum": [
                      "E",
                      "M"
                    ],
                    "default": "E"
                  },
                  "entity_reference": {
                    "type": "string",
                    "nullable": true
                  },
                  "fiu_ref_number": {
                    "type": "string",
                    "nullable": true
                  },
                  "currency_code_local": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "nullable": true
                  },
                  "submission_date": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "reporting_person": {
                    "type": "object"
                  },
                  "location": {
                    "type": "object"
                  },
                  "reason": {
                    "type": "string",
                    "nullable": true
                  },
                  "action": {
                    "type": "string",
                    "nullable": true
                  },
                  "activity": {
                    "type": "string",
                    "nullable": true
                  },
                  "narrative": {
                    "type": "object",
                    "properties": {
                      "who": {
                        "type": "string"
                      },
                      "what": {
                        "type": "string"
                      },
                      "when": {
                        "type": "string"
                      },
                      "where": {
                        "type": "string"
                      },
                      "why": {
                        "type": "string"
                      },
                      "how": {
                        "type": "string"
                      }
                    }
                  },
                  "report_indicators": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "included_fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "case": "c1a5e000-0000-4000-8000-000000000001",
                "template": "7ec00000-0000-4000-8000-000000000006"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"case\": \"c1a5e000-0000-4000-8000-000000000001\", \"template\": \"7ec00000-0000-4000-8000-000000000006\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.create(\n    case=\"c1a5e000-0000-4000-8000-000000000001\",\n    template=\"7ec00000-0000-4000-8000-000000000006\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.create({\n  case: \"c1a5e000-0000-4000-8000-000000000001\",\n  template: \"7ec00000-0000-4000-8000-000000000006\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Create(ctx, didit.RegulatoryReportsCreateParams{\n\tCase:     \"c1a5e000-0000-4000-8000-000000000001\",\n\tTemplate: \"7ec00000-0000-4000-8000-000000000006\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.RegulatoryReportsCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().create(RegulatoryReportsCreateParams.builder()\n        .case_(\"c1a5e000-0000-4000-8000-000000000001\")\n        .template(\"7ec00000-0000-4000-8000-000000000006\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->regulatoryReports->create([\n    'case' => 'c1a5e000-0000-4000-8000-000000000001',\n    'template' => '7ec00000-0000-4000-8000-000000000006',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.create(\n  case: \"c1a5e000-0000-4000-8000-000000000001\",\n  template: \"7ec00000-0000-4000-8000-000000000006\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.CreateAsync(new RegulatoryReportsCreateParams\n{\n    Case = \"c1a5e000-0000-4000-8000-000000000001\",\n    Template = \"7ec00000-0000-4000-8000-000000000006\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء مسودة التقرير.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulatoryReportDetail"
                }
              }
            }
          },
          "400": {
            "description": "لم يتم العثور على القالب المشار إليه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/": {
      "get": {
        "summary": "الحصول على التقرير",
        "description": "استرجاع تقرير تنظيمي.",
        "operationId": "get_regulatory_report",
        "x-didit-sdk": {
          "resource": "regulatory_reports",
          "method": "retrieve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "report_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5ec00000-0000-4000-8000-000000000007"
            },
            "description": "معرّف UUID للتقرير."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.retrieve(\n    \"5ec00000-0000-4000-8000-000000000007\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.retrieve(\"5ec00000-0000-4000-8000-000000000007\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Retrieve(ctx, \"5ec00000-0000-4000-8000-000000000007\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().retrieve(\"5ec00000-0000-4000-8000-000000000007\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->regulatoryReports->retrieve('5ec00000-0000-4000-8000-000000000007');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.retrieve(\"5ec00000-0000-4000-8000-000000000007\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.RetrieveAsync(\"5ec00000-0000-4000-8000-000000000007\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل التقرير.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulatoryReportDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث التقرير",
        "description": "تعديل حقول تقرير مسودة أو تقرير تم التحقق منه. لا يمكن تعديل التقارير النهائية (409).",
        "operationId": "update_regulatory_report",
        "x-didit-sdk": {
          "resource": "regulatory_reports",
          "method": "update",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "report_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5ec00000-0000-4000-8000-000000000007"
            },
            "description": "معرّف UUID للتقرير."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jurisdiction": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "rentity_id": {
                    "type": "string",
                    "nullable": true
                  },
                  "rentity_branch": {
                    "type": "string",
                    "nullable": true
                  },
                  "submission_code": {
                    "type": "string",
                    "enum": [
                      "E",
                      "M"
                    ],
                    "default": "E"
                  },
                  "entity_reference": {
                    "type": "string",
                    "nullable": true
                  },
                  "fiu_ref_number": {
                    "type": "string",
                    "nullable": true
                  },
                  "currency_code_local": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "nullable": true
                  },
                  "submission_date": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "reporting_person": {
                    "type": "object"
                  },
                  "location": {
                    "type": "object"
                  },
                  "reason": {
                    "type": "string",
                    "nullable": true
                  },
                  "action": {
                    "type": "string",
                    "nullable": true
                  },
                  "activity": {
                    "type": "string",
                    "nullable": true
                  },
                  "narrative": {
                    "type": "object",
                    "properties": {
                      "who": {
                        "type": "string"
                      },
                      "what": {
                        "type": "string"
                      },
                      "when": {
                        "type": "string"
                      },
                      "where": {
                        "type": "string"
                      },
                      "why": {
                        "type": "string"
                      },
                      "how": {
                        "type": "string"
                      }
                    }
                  },
                  "report_indicators": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "included_fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "rentity_id": "FIU-US-00123",
                "currency_code_local": "USD"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"rentity_id\": \"FIU-US-00123\", \"currency_code_local\": \"USD\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.update(\n    \"5ec00000-0000-4000-8000-000000000007\",\n    rentity_id=\"FIU-US-00123\",\n    currency_code_local=\"USD\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.update(\"5ec00000-0000-4000-8000-000000000007\", {\n  rentity_id: \"FIU-US-00123\",\n  currency_code_local: \"USD\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Update(ctx, \"5ec00000-0000-4000-8000-000000000007\", didit.RegulatoryReportsUpdateParams{\n\tRentityID:         didit.String(\"FIU-US-00123\"),\n\tCurrencyCodeLocal: didit.String(\"USD\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.RegulatoryReportsUpdateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().update(\"5ec00000-0000-4000-8000-000000000007\", RegulatoryReportsUpdateParams.builder()\n        .rentityId(\"FIU-US-00123\")\n        .currencyCodeLocal(\"USD\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->regulatoryReports->update('5ec00000-0000-4000-8000-000000000007', [\n    'rentity_id' => 'FIU-US-00123',\n    'currency_code_local' => 'USD',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.update(\n  \"5ec00000-0000-4000-8000-000000000007\",\n  rentity_id: \"FIU-US-00123\",\n  currency_code_local: \"USD\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.UpdateAsync(\"5ec00000-0000-4000-8000-000000000007\", new RegulatoryReportsUpdateParams\n{\n    RentityId = \"FIU-US-00123\",\n    CurrencyCodeLocal = \"USD\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التقرير المحدّث.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulatoryReportDetail"
                }
              }
            }
          },
          "409": {
            "description": "تم إنهاء التقرير بالفعل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "summary": "حذف التقرير",
        "description": "حذف تقرير تنظيمي نهائيًا. يُمحى التقرير وسرده وأسبابه المنسوخة وروابط معاملاته وملفات goAML XML وPDF المنشأة الخاصة به، بما في ذلك كل نسخة مخزنة من تلك الملفات. يختفي التقرير من القوائم وتتوقف روابط التنزيل عن العمل. لا تُحذف السجلات الأخرى، بما في ذلك الحالة والمعاملات والأشخاص والشركات. لا يمكن التراجع عن هذا الإجراء.\n\nيمكن حذف تقرير مسودة أو مُتحقَّق منه دون جسم الطلب. يتطلب حذف تقرير مكتمل إرسال `confirm_delete: true` في جسم الطلب. إذا كان التقرير غير موجود، يُرجع الطلب `404`؛ وإذا أُرسل تقرير مكتمل دون تأكيد، يُرجع `400` ولا يُحذف أي شيء.",
        "operationId": "delete_regulatory_report",
        "x-didit-sdk": {
          "resource": "regulatory_reports",
          "method": "delete",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "report_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5ec00000-0000-4000-8000-000000000007"
            },
            "description": "معرّف UUID للتقرير."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl (draft report)",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "curl",
            "label": "curl (finalized report)",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"confirm_delete\": true}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.regulatory_reports.delete(\n    \"5ec00000-0000-4000-8000-000000000007\",\n    confirm_delete=True,\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.regulatoryReports.delete(\"5ec00000-0000-4000-8000-000000000007\", {\n  confirm_delete: true,\n});"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.RegulatoryReportsDeleteParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.regulatoryReports().delete(\"5ec00000-0000-4000-8000-000000000007\", RegulatoryReportsDeleteParams.builder()\n        .confirmDelete(true)\n        .build());"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->regulatoryReports->delete('5ec00000-0000-4000-8000-000000000007', [\n    'confirm_delete' => true,\n]);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.regulatory_reports.delete(\n  \"5ec00000-0000-4000-8000-000000000007\",\n  confirm_delete: true\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.RegulatoryReports.DeleteAsync(\"5ec00000-0000-4000-8000-000000000007\", new RegulatoryReportsDeleteParams\n{\n    ConfirmDelete = true,\n});"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف التقرير، بما في ذلك ملفاته المُنشأة."
          },
          "400": {
            "description": "تم إرسال تقرير مكتمل بدون `confirm_delete: true`. لم يُحذف أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "confirm_delete": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "confirm_delete": [
                    "This field is required to delete a finalized report."
                  ]
                }
              }
            }
          },
          "403": {
            "description": "لا يمكن لمفتاح API حذف التقارير. يتطلب endpoint إذن `write:cases`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على التقرير في هذا التطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "يجري حذف التقرير بالفعل. كرر الطلب لإكمال مسح ملفاته.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "This report is being deleted. Retry deleting it to finish erasing its files.",
                  "code": "report_deletion_pending"
                }
              }
            }
          },
          "503": {
            "description": "تعذر مسح ملفات التقرير في الوقت الحالي. لا يزال التقرير موجوداً. كرر الطلب.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "The report files could not be erased. Please retry deleting the report.",
                  "code": "report_storage_unavailable"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "description": "مطلوب فقط للتقرير النهائي.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm_delete": {
                    "type": "boolean",
                    "description": "يُضبط على true لتأكيد حذف التقرير النهائي وملفاته المنشأة نهائياً."
                  }
                },
                "example": {
                  "confirm_delete": true
                }
              },
              "example": {
                "confirm_delete": true
              }
            }
          }
        }
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/validate/": {
      "post": {
        "summary": "التحقق من صحة التقرير",
        "description": "التحقق من التقرير مقابل حقول رأس goAML الإلزامية (معرّف الجهة المُبلِغة، ورمز التقديم، والعملة المحلية، والإجراء المتخذ، وتاريخ التقديم)، بالإضافة إلى معاملة مرفقة واحدة على الأقل واختصاص قضائي مكوّن من حرفين، دون إنشاء أي ملفات. كما يخزن النتيجة في التقرير: حيث يتم تحديث validation_errors وvalidated_at، وتنتقل حالة التقرير غير النهائي إلى VALIDATED (في حال عدم وجود أخطاء) أو تعود إلى DRAFT (في حال وجود أخطاء).",
        "operationId": "validate_regulatory_report",
        "x-didit-sdk": {
          "resource": "regulatory_reports",
          "method": "validate",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "report_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5ec00000-0000-4000-8000-000000000007"
            },
            "description": "معرّف UUID للتقرير."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/validate/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.validate(\n    \"5ec00000-0000-4000-8000-000000000007\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.validate(\"5ec00000-0000-4000-8000-000000000007\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Validate(ctx, \"5ec00000-0000-4000-8000-000000000007\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().validate(\"5ec00000-0000-4000-8000-000000000007\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->regulatoryReports->validate('5ec00000-0000-4000-8000-000000000007');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.validate(\"5ec00000-0000-4000-8000-000000000007\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.ValidateAsync(\"5ec00000-0000-4000-8000-000000000007\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "نتيجة التحقق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "DRAFT",
                        "VALIDATED",
                        "FINALIZED"
                      ]
                    },
                    "is_valid": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "description": "فارغ عندما يكون صالحاً.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/finalize/": {
      "post": {
        "summary": "إنهاء التقرير",
        "description": "إعادة التحقق، ثم إنشاء ملفي goAML بصيغة XML وPDF ورفعهما إلى S3. في تقارير SAR/STR/TFR، يؤدي هذا أيضاً إلى نقل تنبيهات معاملات الحالة من Pending SAR إلى SAR filed.",
        "operationId": "finalize_regulatory_report",
        "x-didit-sdk": {
          "resource": "regulatory_reports",
          "method": "finalize",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "report_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5ec00000-0000-4000-8000-000000000007"
            },
            "description": "معرّف UUID للتقرير."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/finalize/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.finalize(\n    \"5ec00000-0000-4000-8000-000000000007\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.finalize(\"5ec00000-0000-4000-8000-000000000007\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Finalize(ctx, \"5ec00000-0000-4000-8000-000000000007\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().finalize_(\"5ec00000-0000-4000-8000-000000000007\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->regulatoryReports->finalize('5ec00000-0000-4000-8000-000000000007');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.finalize(\"5ec00000-0000-4000-8000-000000000007\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.FinalizeAsync(\"5ec00000-0000-4000-8000-000000000007\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم إنهاء التقرير؛ تم تعيين xml_s3_key وpdf_s3_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulatoryReportDetail"
                }
              }
            }
          },
          "400": {
            "description": "فشل التقرير في التحقق من الصحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "التقرير ليس في حالة قابلة للإنهاء.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/download-url/": {
      "get": {
        "summary": "الحصول على رابط تنزيل التقرير",
        "description": "إنشاء رابط مسبق التوقيع لملف goAML بتنسيق XML أو PDF لتقرير تم الانتهاء منه.",
        "operationId": "get_regulatory_report_download_url",
        "x-didit-sdk": {
          "resource": "regulatory_reports",
          "method": "retrieve_download_url",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Regulatory Reports"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "report_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5ec00000-0000-4000-8000-000000000007"
            },
            "description": "معرّف UUID للتقرير."
          },
          {
            "name": "file",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pdf",
                "xml"
              ],
              "default": "pdf"
            },
            "description": "أي ملف سيتم تنزيله."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/download-url/?file=xml' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.retrieve_download_url(\n    \"5ec00000-0000-4000-8000-000000000007\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.retrieveDownloadUrl(\"5ec00000-0000-4000-8000-000000000007\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.RetrieveDownloadURL(ctx, \"5ec00000-0000-4000-8000-000000000007\", didit.RegulatoryReportsRetrieveDownloadURLParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().retrieveDownloadUrl(\"5ec00000-0000-4000-8000-000000000007\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->regulatoryReports->retrieveDownloadUrl('5ec00000-0000-4000-8000-000000000007');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.retrieve_download_url(\"5ec00000-0000-4000-8000-000000000007\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.RetrieveDownloadUrlAsync(\"5ec00000-0000-4000-8000-000000000007\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "رابط تنزيل موقع مسبقاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "download_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "file": {
                      "type": "string",
                      "enum": [
                        "pdf",
                        "xml"
                      ]
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "لم يتم إنهاء التقرير بعد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/transactions/rules/": {
      "get": {
        "summary": "عرض القواعد",
        "description": "عرض قواعد مراقبة المعاملات الخاصة بالتطبيق: قواعدك المخصصة بالإضافة إلى أي إعدادات مسبقة مثبتة من المكتبة. التصفية حسب المصدر، أو الفئة، أو الوضع، أو الحزمة، أو البحث بنص حر؛ والترتيب باستخدام `ordering` (run_count، أو approved_pct، أو reviewed_pct، أو declined_pct، أو latest_triggered_at، أو title، أو created_at، أو source، مع بادئة `-` اختيارية لكل منها).",
        "operationId": "listTransactionRules",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PRESET",
                "CUSTOM"
              ]
            },
            "description": "PRESET أو CUSTOM"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "التصفية حسب فئة القاعدة"
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "DISABLED",
                "TEST"
              ]
            },
            "description": "ACTIVE أو DISABLED أو TEST"
          },
          {
            "name": "bundle",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "تصفية الإعدادات المسبقة حسب الحزمة"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "تطابق غير حساس لحالة الأحرف مع العنوان والوصف"
          },
          {
            "name": "ordering",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "حقول الترتيب مفصولة بفواصل، القيمة الافتراضية source,-run_count"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "حجم الصفحة"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "إزاحة الصفحة"
          }
        ],
        "responses": {
          "200": {
            "description": "قواعد مقسّمة إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TransactionRuleDetail"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/transactions/rules/?source=CUSTOM&ordering=-run_count' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.rules.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.rules.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.Rules.ListAutoPaging(ctx, didit.TransactionsRulesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().rules().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->transactions->rules->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.rules.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.Rules.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "summary": "إنشاء قاعدة",
        "description": "إنشاء قاعدة CUSTOM لمراقبة المعاملات. العناوين فريدة لكل تطبيق (التكرار -> 400). يجب أن يحمل أي إجراء `change_status` يستهدف `AWAITING_USER` المعامل `workflow_id`. تنطبق القواعد التي تم إنشاؤها في وضع ACTIVE على المعاملات الجديدة على الفور - سير العمل الموصى به هو الإنشاء في وضع TEST، وإجراء اختبار رجعي، ثم تبديل الوضع إلى ACTIVE. لتعديل قاعدة من المكتبة، أنشئها كنسخة: أرسل تعريف قاعدة المكتبة مع `metadata.based_on` (مفتاح المكتبة الخاص بها) و`metadata.based_on_rule_uuid`.",
        "operationId": "createTransactionRule",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRuleCreateRequest"
              },
              "example": {
                "title": "Structuring - inbound (custom)",
                "description": "20+ inbound EUR transfers, all under 10,000 EUR, 30 days",
                "category": "finance",
                "mode": "TEST",
                "evaluation_mode": "ALL",
                "scope": {
                  "transaction_types": [
                    "finance"
                  ],
                  "directions": [
                    "INBOUND"
                  ]
                },
                "conditions": [
                  {
                    "field": "currency",
                    "operator": "eq",
                    "value": "EUR"
                  },
                  {
                    "field": "amount",
                    "operator": "lt",
                    "value": 10000
                  }
                ],
                "aggregation": [
                  {
                    "metric": "count",
                    "operator": "gte",
                    "value": 20,
                    "window": "30d",
                    "filters": {
                      "direction": "INBOUND",
                      "transaction_type": "finance",
                      "subject_vendor_data": "__current__",
                      "currency": "EUR"
                    }
                  },
                  {
                    "metric": "max",
                    "field": "amount",
                    "operator": "lt",
                    "value": 10000,
                    "window": "30d",
                    "filters": {
                      "direction": "INBOUND",
                      "transaction_type": "finance",
                      "subject_vendor_data": "__current__",
                      "currency": "EUR"
                    }
                  }
                ],
                "actions": [
                  {
                    "type": "add_score",
                    "value": 35
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "القاعدة التي تم إنشاؤها.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionRuleDetail"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة - عنوان مكرر، أو عامل تشغيل/مقياس غير معروف، أو نافذة زمنية غير صحيحة التنسيق، أو اتجاه نطاق غير صالح، أو AWAITING_USER بدون workflow_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "title": [
                    "A rule with this name already exists."
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/transactions/rules/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\": \"Structuring - inbound (custom)\", \"description\": \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\", \"category\": \"finance\", \"mode\": \"TEST\", \"evaluation_mode\": \"ALL\", \"scope\": {\"transaction_types\": [\"finance\"], \"directions\": [\"INBOUND\"]}, \"conditions\": [{\"field\": \"currency\", \"operator\": \"eq\", \"value\": \"EUR\"}, {\"field\": \"amount\", \"operator\": \"lt\", \"value\": 10000}], \"aggregation\": [{\"metric\": \"count\", \"operator\": \"gte\", \"value\": 20, \"window\": \"30d\", \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}}, {\"metric\": \"max\", \"field\": \"amount\", \"operator\": \"lt\", \"value\": 10000, \"window\": \"30d\", \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}}], \"actions\": [{\"type\": \"add_score\", \"value\": 35}]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.create(\n    title=\"Structuring - inbound (custom)\",\n    description=\"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n    category=\"finance\",\n    mode=\"TEST\",\n    evaluation_mode=\"ALL\",\n    scope={\n        \"transaction_types\": [\"finance\"],\n        \"directions\": [\"INBOUND\"],\n    },\n    conditions=[{\n        \"field\": \"currency\",\n        \"operator\": \"eq\",\n        \"value\": \"EUR\",\n    }, {\n        \"field\": \"amount\",\n        \"operator\": \"lt\",\n        \"value\": 10000,\n    }],\n    aggregation=[{\n        \"metric\": \"count\",\n        \"operator\": \"gte\",\n        \"value\": 20.0,\n        \"window\": \"30d\",\n        \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"},\n    }, {\n        \"metric\": \"max\",\n        \"field\": \"amount\",\n        \"operator\": \"lt\",\n        \"value\": 10000.0,\n        \"window\": \"30d\",\n        \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"},\n    }],\n    actions=[{\n        \"type\": \"add_score\",\n        \"value\": 35,\n    }],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.create({\n  title: \"Structuring - inbound (custom)\",\n  description: \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n  category: \"finance\",\n  mode: \"TEST\",\n  evaluation_mode: \"ALL\",\n  scope: {\n    transaction_types: [\"finance\"],\n    directions: [\"INBOUND\"],\n  },\n  conditions: [{\n    field: \"currency\",\n    operator: \"eq\",\n    value: \"EUR\",\n  }, {\n    field: \"amount\",\n    operator: \"lt\",\n    value: 10000,\n  }],\n  aggregation: [{\n    metric: \"count\",\n    operator: \"gte\",\n    value: 20.0,\n    window: \"30d\",\n    filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n  }, {\n    metric: \"max\",\n    field: \"amount\",\n    operator: \"lt\",\n    value: 10000.0,\n    window: \"30d\",\n    filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n  }],\n  actions: [{\n    type: \"add_score\",\n    value: 35,\n  }],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Create(ctx, didit.TransactionRuleCreateRequest{\n\tTitle:          \"Structuring - inbound (custom)\",\n\tDescription:    didit.String(\"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\"),\n\tCategory:       \"finance\",\n\tMode:           \"TEST\",\n\tEvaluationMode: didit.Some(didit.TransactionRuleCreateRequestEvaluationMode(\"ALL\")),\n\tScope: didit.Some(didit.TransactionRuleScopeParam{\n\t\tTransactionTypes: didit.Some([]string{\"finance\"}),\n\t\tDirections:       didit.Some([]didit.TransactionRuleScopeDirections{\"INBOUND\"}),\n\t}),\n\tConditions: didit.Some([]didit.TransactionRuleConditionParam{{\n\t\tField:    \"currency\",\n\t\tOperator: \"eq\",\n\t\tValue:    didit.Some[any](\"EUR\"),\n\t}, {\n\t\tField:    \"amount\",\n\t\tOperator: \"lt\",\n\t\tValue:    didit.Some[any](10000),\n\t}}),\n\tAggregation: didit.Some([]didit.TransactionRuleAggregationParam{{\n\t\tMetric:   didit.Some(didit.TransactionRuleAggregationMetric(\"count\")),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"gte\")),\n\t\tValue:    20.0,\n\t\tWindow:   didit.String(\"30d\"),\n\t\tFilters:  didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}, {\n\t\tMetric:   didit.Some(didit.TransactionRuleAggregationMetric(\"max\")),\n\t\tField:    didit.String(\"amount\"),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"lt\")),\n\t\tValue:    10000.0,\n\t\tWindow:   didit.String(\"30d\"),\n\t\tFilters:  didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}}),\n\tActions: didit.Some([]didit.TransactionRuleActionParam{{\n\t\tType:  \"add_score\",\n\t\tValue: didit.Some[any](35),\n\t}}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.TransactionRuleAction;\nimport me.didit.types.TransactionRuleActionAddScore;\nimport me.didit.types.TransactionRuleAggregation;\nimport me.didit.types.TransactionRuleCondition;\nimport me.didit.types.TransactionRuleCreateRequest;\nimport me.didit.types.TransactionRuleScope;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().create(TransactionRuleCreateRequest.builder()\n        .title(\"Structuring - inbound (custom)\")\n        .description(\"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\")\n        .category(\"finance\")\n        .mode(TransactionRuleCreateRequest.Mode.of(\"TEST\"))\n        .evaluationMode(TransactionRuleCreateRequest.EvaluationMode.of(\"ALL\"))\n        .scope(TransactionRuleScope.builder()\n                .transactionTypes(List.of(\"finance\"))\n                .directions(List.of(TransactionRuleScope.Directions.of(\"INBOUND\")))\n                .build())\n        .conditions(List.of(\n                TransactionRuleCondition.builder()\n                        .field(\"currency\")\n                        .operator(TransactionRuleCondition.Operator.of(\"eq\"))\n                        .value(\"EUR\")\n                        .build(),\n                TransactionRuleCondition.builder()\n                        .field(\"amount\")\n                        .operator(TransactionRuleCondition.Operator.of(\"lt\"))\n                        .value(10000)\n                        .build()))\n        .aggregation(List.of(\n                TransactionRuleAggregation.builder()\n                        .metric(TransactionRuleAggregation.Metric.of(\"count\"))\n                        .operator(TransactionRuleAggregation.Operator.of(\"gte\"))\n                        .value(20.0)\n                        .window(\"30d\")\n                        .filters(Map.of(\"direction\", \"INBOUND\", \"transaction_type\", \"finance\", \"subject_vendor_data\", \"__current__\", \"currency\", \"EUR\"))\n                        .build(),\n                TransactionRuleAggregation.builder()\n                        .metric(TransactionRuleAggregation.Metric.of(\"max\"))\n                        .field(\"amount\")\n                        .operator(TransactionRuleAggregation.Operator.of(\"lt\"))\n                        .value(10000.0)\n                        .window(\"30d\")\n                        .filters(Map.of(\"direction\", \"INBOUND\", \"transaction_type\", \"finance\", \"subject_vendor_data\", \"__current__\", \"currency\", \"EUR\"))\n                        .build()))\n        .actions(List.of(TransactionRuleAction.ofAddScore(TransactionRuleActionAddScore.builder()\n                .type(TransactionRuleActionAddScore.Type.of(\"add_score\"))\n                .value(35L)\n                .build())))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->rules->create([\n    'title' => 'Structuring - inbound (custom)',\n    'description' => '20+ inbound EUR transfers, all under 10,000 EUR, 30 days',\n    'category' => 'finance',\n    'mode' => 'TEST',\n    'evaluation_mode' => 'ALL',\n    'scope' => [\n        'transaction_types' => ['finance'],\n        'directions' => ['INBOUND'],\n    ],\n    'conditions' => [[\n        'field' => 'currency',\n        'operator' => 'eq',\n        'value' => 'EUR',\n    ], [\n        'field' => 'amount',\n        'operator' => 'lt',\n        'value' => 10000,\n    ]],\n    'aggregation' => [[\n        'metric' => 'count',\n        'operator' => 'gte',\n        'value' => 20.0,\n        'window' => '30d',\n        'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],\n    ], [\n        'metric' => 'max',\n        'field' => 'amount',\n        'operator' => 'lt',\n        'value' => 10000.0,\n        'window' => '30d',\n        'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],\n    ]],\n    'actions' => [[\n        'type' => 'add_score',\n        'value' => 35,\n    ]],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.create(\n  title: \"Structuring - inbound (custom)\",\n  description: \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n  category: \"finance\",\n  mode: \"TEST\",\n  evaluation_mode: \"ALL\",\n  scope: {\n    transaction_types: [\"finance\"],\n    directions: [\"INBOUND\"],\n  },\n  conditions: [{\n    field: \"currency\",\n    operator: \"eq\",\n    value: \"EUR\",\n  }, {\n    field: \"amount\",\n    operator: \"lt\",\n    value: 10000,\n  }],\n  aggregation: [{\n    metric: \"count\",\n    operator: \"gte\",\n    value: 20.0,\n    window: \"30d\",\n    filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n  }, {\n    metric: \"max\",\n    field: \"amount\",\n    operator: \"lt\",\n    value: 10000.0,\n    window: \"30d\",\n    filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n  }],\n  actions: [{\n    type: \"add_score\",\n    value: 35,\n  }]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.CreateAsync(new TransactionRuleCreateRequest\n{\n    Title = \"Structuring - inbound (custom)\",\n    Description = \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n    Category = \"finance\",\n    Mode = \"TEST\",\n    EvaluationMode = new TransactionRuleCreateRequestEvaluationMode(\"ALL\"),\n    Scope = new TransactionRuleScope\n    {\n        TransactionTypes = new string[] { \"finance\" },\n        Directions = new TransactionRuleScopeDirections[] { \"INBOUND\" },\n    },\n    Conditions = new TransactionRuleCondition[]\n    {\n        new()\n        {\n            Field = \"currency\",\n            Operator = \"eq\",\n            Value = \"EUR\",\n        },\n        new()\n        {\n            Field = \"amount\",\n            Operator = \"lt\",\n            Value = 10000,\n        },\n    },\n    Aggregation = new TransactionRuleAggregation[]\n    {\n        new()\n        {\n            Metric = new TransactionRuleAggregationMetric(\"count\"),\n            Operator = new TransactionRuleAggregationOperator(\"gte\"),\n            Value = 20.0,\n            Window = \"30d\",\n            Filters = new Dictionary<string, object> { [\"direction\"] = \"INBOUND\", [\"transaction_type\"] = \"finance\", [\"subject_vendor_data\"] = \"__current__\", [\"currency\"] = \"EUR\" },\n        },\n        new()\n        {\n            Metric = new TransactionRuleAggregationMetric(\"max\"),\n            Field = \"amount\",\n            Operator = new TransactionRuleAggregationOperator(\"lt\"),\n            Value = 10000.0,\n            Window = \"30d\",\n            Filters = new Dictionary<string, object> { [\"direction\"] = \"INBOUND\", [\"transaction_type\"] = \"finance\", [\"subject_vendor_data\"] = \"__current__\", [\"currency\"] = \"EUR\" },\n        },\n    },\n    Actions = new TransactionRuleAction[]\n    {\n        new()\n        {\n            Type = new TransactionRuleActionType(\"add_score\"),\n            Value = 35,\n        },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/transactions/rules/{rule_uuid}/": {
      "parameters": [
        {
          "name": "rule_uuid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "المعرّف الفريد العالمي (uuid) للقاعدة من القائمة أو الإنشاء."
        }
      ],
      "get": {
        "summary": "الحصول على القاعدة",
        "description": "استرداد قاعدة واحدة مع تكوينها الكامل وعدّادات التنفيذ الخاصة بها.",
        "operationId": "getTransactionRule",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "القاعدة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionRuleDetail"
                }
              }
            }
          },
          "404": {
            "description": "لا توجد قاعدة كهذه في هذا التطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/transactions/rules/RULE_UUID/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->rules->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "patch": {
        "summary": "تحديث القاعدة",
        "description": "تحديث جزئي لقاعدة. تقبل القواعد المخصصة كل حقول التكوين. تقبل قواعد المكتبة (PRESET) حقل `mode` فقط - استخدمه لتفعيل قاعدة محددة مسبقاً، أو تعطيلها، أو تحويلها إلى وضع TEST؛ وإرسال أي حقل آخر يُرجع 400، لأن Didit تتولى صيانة قواعد المكتبة وتطبيق تحديثاتها تلقائياً. لتغيير شروط قاعدة من المكتبة، أنشئ نسخة مخصصة باستخدام `POST /v3/transactions/rules/` بالاعتماد على تعريف قاعدة المكتبة و`metadata.based_on` (مفتاح المكتبة) و`metadata.based_on_rule_uuid`، ثم عطل قاعدة المكتبة باستخدام `mode: DISABLED` حتى لا تُصدر المعاملة تنبيهاً مرتين. تكون النسخة المثبتة من قاعدة مكتبة محجوبة معطلة: يؤدي تعيين `mode` الخاص بها إلى أي قيمة بخلاف `DISABLED` إلى الاستجابة بالرمز 400 (\"This library rule cannot run yet: its conditions read data the rules engine cannot evaluate.\").",
        "operationId": "updateTransactionRule",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRuleUpdateRequest"
              },
              "example": {
                "mode": "ACTIVE"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "القاعدة المحدثة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionRuleDetail"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق، أو حقل بخلاف الوضع في قاعدة مكتبة، أو وضع بخلاف DISABLED في قاعدة مكتبة محجوبة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/transactions/rules/RULE_UUID/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"mode\": \"ACTIVE\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    mode=\"ACTIVE\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.update(\"11111111-2222-3333-4444-555555555555\", {\n  mode: \"ACTIVE\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TransactionRuleUpdateRequest{\n\tMode: didit.Some(didit.TransactionRuleUpdateRequestMode(\"ACTIVE\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TransactionRuleUpdateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().update(\"11111111-2222-3333-4444-555555555555\", TransactionRuleUpdateRequest.builder()\n        .mode(TransactionRuleUpdateRequest.Mode.of(\"ACTIVE\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->rules->update('11111111-2222-3333-4444-555555555555', [\n    'mode' => 'ACTIVE',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  mode: \"ACTIVE\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new TransactionRuleUpdateRequest\n{\n    Mode = new TransactionRuleUpdateRequestMode(\"ACTIVE\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "summary": "حذف القاعدة",
        "description": "حذف قاعدة CUSTOM. الحذف فوري ونهائي: يتوقف تقييم القاعدة للمعاملات الجديدة وتختفي من القوائم، بينما تحتفظ عمليات تشغيل القواعد السابقة على المعاملات التي تم تقييمها بالفعل بنتائجها المسجلة. لا يمكن حذف قواعد المكتبة - قم بإلغاء تثبيتها عبر endpoint التثبيت بدلاً من ذلك (يمكن دائمًا إعادة تثبيتها من المكتبة).",
        "operationId": "deleteTransactionRule",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "تم الحذف."
          },
          "400": {
            "description": "القاعدة هي إعداد مسبق من المكتبة - قم بإلغاء التثبيت بدلاً من ذلك.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "detail": "Library rules cannot be deleted. Uninstall them via the rules install endpoint instead."
                }
              }
            }
          },
          "404": {
            "description": "لا توجد قاعدة كهذه في هذا التطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/transactions/rules/RULE_UUID/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.transactions.rules.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.transactions.rules.delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Transactions.Rules.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.transactions().rules().delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->transactions->rules->delete('11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.rules.delete(\"11111111-2222-3333-4444-555555555555\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Transactions.Rules.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");"
          }
        ]
      }
    },
    "/v3/transactions/rules/backtest/": {
      "post": {
        "summary": "تكوين قاعدة الاختبار الرجعي",
        "description": "تقييم إعداد قاعدة افتراضية مقابل معاملاتك الحديثة (الأحدث أولاً، حتى الحد الأقصى للاختبار الرجعي) دون إنشاء قاعدة أو تعديل أي معاملة. استخدمه قبل تفعيل قاعدة لمعرفة عدد المرات التي كانت ستنطبق فيها وعدد الأطراف المعنية التي كانت ستتأثر بها.",
        "operationId": "backtestTransactionRules",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "backtest",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRuleBacktestRequest"
              },
              "example": {
                "conditions": [
                  {
                    "field": "currency",
                    "operator": "eq",
                    "value": "EUR"
                  },
                  {
                    "field": "amount",
                    "operator": "lt",
                    "value": 10000
                  }
                ],
                "aggregation": [
                  {
                    "metric": "count",
                    "operator": "gte",
                    "value": 20,
                    "window": "30d",
                    "filters": {
                      "direction": "INBOUND",
                      "transaction_type": "finance",
                      "subject_vendor_data": "__current__",
                      "currency": "EUR"
                    }
                  },
                  {
                    "metric": "max",
                    "field": "amount",
                    "operator": "lt",
                    "value": 10000,
                    "window": "30d",
                    "filters": {
                      "direction": "INBOUND",
                      "transaction_type": "finance",
                      "subject_vendor_data": "__current__",
                      "currency": "EUR"
                    }
                  }
                ],
                "evaluation_mode": "ALL",
                "scope": {
                  "transaction_types": [
                    "finance"
                  ],
                  "directions": [
                    "INBOUND"
                  ]
                },
                "period_days": 90
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "إحصائيات الاختبار الرجعي.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionRuleBacktestResult"
                },
                "example": {
                  "evaluated": 4820,
                  "matched": 12,
                  "affected_entities": 4,
                  "period_days": 90
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/transactions/rules/backtest/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"conditions\": [{\"field\": \"currency\", \"operator\": \"eq\", \"value\": \"EUR\"}, {\"field\": \"amount\", \"operator\": \"lt\", \"value\": 10000}], \"aggregation\": [{\"metric\": \"count\", \"operator\": \"gte\", \"value\": 20, \"window\": \"30d\", \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}}, {\"metric\": \"max\", \"field\": \"amount\", \"operator\": \"lt\", \"value\": 10000, \"window\": \"30d\", \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}}], \"evaluation_mode\": \"ALL\", \"scope\": {\"transaction_types\": [\"finance\"], \"directions\": [\"INBOUND\"]}, \"period_days\": 90}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.backtest(\n    conditions=[{\n        \"field\": \"currency\",\n        \"operator\": \"eq\",\n        \"value\": \"EUR\",\n    }, {\n        \"field\": \"amount\",\n        \"operator\": \"lt\",\n        \"value\": 10000,\n    }],\n    aggregation=[{\n        \"metric\": \"count\",\n        \"operator\": \"gte\",\n        \"value\": 20.0,\n        \"window\": \"30d\",\n        \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"},\n    }, {\n        \"metric\": \"max\",\n        \"field\": \"amount\",\n        \"operator\": \"lt\",\n        \"value\": 10000.0,\n        \"window\": \"30d\",\n        \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"},\n    }],\n    evaluation_mode=\"ALL\",\n    scope={\n        \"transaction_types\": [\"finance\"],\n        \"directions\": [\"INBOUND\"],\n    },\n    period_days=90,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.backtest({\n  conditions: [{\n    field: \"currency\",\n    operator: \"eq\",\n    value: \"EUR\",\n  }, {\n    field: \"amount\",\n    operator: \"lt\",\n    value: 10000,\n  }],\n  aggregation: [{\n    metric: \"count\",\n    operator: \"gte\",\n    value: 20.0,\n    window: \"30d\",\n    filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n  }, {\n    metric: \"max\",\n    field: \"amount\",\n    operator: \"lt\",\n    value: 10000.0,\n    window: \"30d\",\n    filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n  }],\n  evaluation_mode: \"ALL\",\n  scope: {\n    transaction_types: [\"finance\"],\n    directions: [\"INBOUND\"],\n  },\n  period_days: 90,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Backtest(ctx, didit.TransactionRuleBacktestRequest{\n\tConditions: didit.Some([]didit.TransactionRuleConditionParam{{\n\t\tField:    \"currency\",\n\t\tOperator: \"eq\",\n\t\tValue:    didit.Some[any](\"EUR\"),\n\t}, {\n\t\tField:    \"amount\",\n\t\tOperator: \"lt\",\n\t\tValue:    didit.Some[any](10000),\n\t}}),\n\tAggregation: didit.Some([]didit.TransactionRuleAggregationParam{{\n\t\tMetric:   didit.Some(didit.TransactionRuleAggregationMetric(\"count\")),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"gte\")),\n\t\tValue:    20.0,\n\t\tWindow:   didit.String(\"30d\"),\n\t\tFilters:  didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}, {\n\t\tMetric:   didit.Some(didit.TransactionRuleAggregationMetric(\"max\")),\n\t\tField:    didit.String(\"amount\"),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"lt\")),\n\t\tValue:    10000.0,\n\t\tWindow:   didit.String(\"30d\"),\n\t\tFilters:  didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}}),\n\tEvaluationMode: didit.Some(didit.TransactionRuleBacktestRequestEvaluationMode(\"ALL\")),\n\tScope: didit.Some(didit.TransactionRuleScopeParam{\n\t\tTransactionTypes: didit.Some([]string{\"finance\"}),\n\t\tDirections:       didit.Some([]didit.TransactionRuleScopeDirections{\"INBOUND\"}),\n\t}),\n\tPeriodDays: didit.Int(90),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.TransactionRuleAggregation;\nimport me.didit.types.TransactionRuleBacktestRequest;\nimport me.didit.types.TransactionRuleCondition;\nimport me.didit.types.TransactionRuleScope;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().backtest(TransactionRuleBacktestRequest.builder()\n        .conditions(List.of(\n                TransactionRuleCondition.builder()\n                        .field(\"currency\")\n                        .operator(TransactionRuleCondition.Operator.of(\"eq\"))\n                        .value(\"EUR\")\n                        .build(),\n                TransactionRuleCondition.builder()\n                        .field(\"amount\")\n                        .operator(TransactionRuleCondition.Operator.of(\"lt\"))\n                        .value(10000)\n                        .build()))\n        .aggregation(List.of(\n                TransactionRuleAggregation.builder()\n                        .metric(TransactionRuleAggregation.Metric.of(\"count\"))\n                        .operator(TransactionRuleAggregation.Operator.of(\"gte\"))\n                        .value(20.0)\n                        .window(\"30d\")\n                        .filters(Map.of(\"direction\", \"INBOUND\", \"transaction_type\", \"finance\", \"subject_vendor_data\", \"__current__\", \"currency\", \"EUR\"))\n                        .build(),\n                TransactionRuleAggregation.builder()\n                        .metric(TransactionRuleAggregation.Metric.of(\"max\"))\n                        .field(\"amount\")\n                        .operator(TransactionRuleAggregation.Operator.of(\"lt\"))\n                        .value(10000.0)\n                        .window(\"30d\")\n                        .filters(Map.of(\"direction\", \"INBOUND\", \"transaction_type\", \"finance\", \"subject_vendor_data\", \"__current__\", \"currency\", \"EUR\"))\n                        .build()))\n        .evaluationMode(TransactionRuleBacktestRequest.EvaluationMode.of(\"ALL\"))\n        .scope(TransactionRuleScope.builder()\n                .transactionTypes(List.of(\"finance\"))\n                .directions(List.of(TransactionRuleScope.Directions.of(\"INBOUND\")))\n                .build())\n        .periodDays(90L)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->rules->backtest([\n    'conditions' => [[\n        'field' => 'currency',\n        'operator' => 'eq',\n        'value' => 'EUR',\n    ], [\n        'field' => 'amount',\n        'operator' => 'lt',\n        'value' => 10000,\n    ]],\n    'aggregation' => [[\n        'metric' => 'count',\n        'operator' => 'gte',\n        'value' => 20.0,\n        'window' => '30d',\n        'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],\n    ], [\n        'metric' => 'max',\n        'field' => 'amount',\n        'operator' => 'lt',\n        'value' => 10000.0,\n        'window' => '30d',\n        'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],\n    ]],\n    'evaluation_mode' => 'ALL',\n    'scope' => [\n        'transaction_types' => ['finance'],\n        'directions' => ['INBOUND'],\n    ],\n    'period_days' => 90,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.backtest(\n  conditions: [{\n    field: \"currency\",\n    operator: \"eq\",\n    value: \"EUR\",\n  }, {\n    field: \"amount\",\n    operator: \"lt\",\n    value: 10000,\n  }],\n  aggregation: [{\n    metric: \"count\",\n    operator: \"gte\",\n    value: 20.0,\n    window: \"30d\",\n    filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n  }, {\n    metric: \"max\",\n    field: \"amount\",\n    operator: \"lt\",\n    value: 10000.0,\n    window: \"30d\",\n    filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n  }],\n  evaluation_mode: \"ALL\",\n  scope: {\n    transaction_types: [\"finance\"],\n    directions: [\"INBOUND\"],\n  },\n  period_days: 90\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.BacktestAsync(new TransactionRuleBacktestRequest\n{\n    Conditions = new TransactionRuleCondition[]\n    {\n        new()\n        {\n            Field = \"currency\",\n            Operator = \"eq\",\n            Value = \"EUR\",\n        },\n        new()\n        {\n            Field = \"amount\",\n            Operator = \"lt\",\n            Value = 10000,\n        },\n    },\n    Aggregation = new TransactionRuleAggregation[]\n    {\n        new()\n        {\n            Metric = new TransactionRuleAggregationMetric(\"count\"),\n            Operator = new TransactionRuleAggregationOperator(\"gte\"),\n            Value = 20.0,\n            Window = \"30d\",\n            Filters = new Dictionary<string, object> { [\"direction\"] = \"INBOUND\", [\"transaction_type\"] = \"finance\", [\"subject_vendor_data\"] = \"__current__\", [\"currency\"] = \"EUR\" },\n        },\n        new()\n        {\n            Metric = new TransactionRuleAggregationMetric(\"max\"),\n            Field = \"amount\",\n            Operator = new TransactionRuleAggregationOperator(\"lt\"),\n            Value = 10000.0,\n            Window = \"30d\",\n            Filters = new Dictionary<string, object> { [\"direction\"] = \"INBOUND\", [\"transaction_type\"] = \"finance\", [\"subject_vendor_data\"] = \"__current__\", [\"currency\"] = \"EUR\" },\n        },\n    },\n    EvaluationMode = new TransactionRuleBacktestRequestEvaluationMode(\"ALL\"),\n    Scope = new TransactionRuleScope\n    {\n        TransactionTypes = new string[] { \"finance\" },\n        Directions = new TransactionRuleScopeDirections[] { \"INBOUND\" },\n    },\n    PeriodDays = 90,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/transactions/rules/library/": {
      "get": {
        "summary": "عرض مكتبة القواعد",
        "description": "تصفح مكتبة القواعد المحددة مسبقاً الكاملة (150+ قاعدة) مع التكوين الكامل لكل إدخال وعلامة `is_installed` لهذا التطبيق. قم بالتصفية حسب الحزمة، أو الفئة، أو البحث بنص حر. يتم حجب أي قاعدة في المكتبة تقرأ شروطها بيانات لا يستطيع محرك القواعد تقييمها بعد حتى تصبح قابلة للتشغيل. لا يتم إدراج القواعد المحجوبة.",
        "operationId": "listTransactionRuleLibrary",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "list_library",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "bundle",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "التصفية حسب الحزمة، مثل finance، aml_ctf، crypto_monitoring، travel_rule"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "التصفية حسب الفئة"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "تطابق غير حساس لحالة الأحرف مع العنوان والوصف"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "حجم الصفحة"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "إزاحة الصفحة"
          }
        ],
        "responses": {
          "200": {
            "description": "مدخلات المكتبة مقسمة إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TransactionRuleLibraryEntry"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/transactions/rules/library/?bundle=finance' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.rules.list_library():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.rules.listLibrary()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.Rules.ListLibraryAutoPaging(ctx, didit.TransactionsRulesListLibraryParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().rules().listLibrary()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->transactions->rules->listLibrary() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.rules.list_library.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.Rules.ListLibraryAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/transactions/rules/install/": {
      "post": {
        "summary": "تثبيت قواعد المكتبة",
        "description": "تثبيت إعداد مسبق واحد أو أكثر على التطبيق، عبر `library_keys` أو `bundle` كاملة. يكون الإعداد المسبق المثبَّت نشطاً على الفور طالما أن مراقبة المعاملات مفعّلة، ومُعطلاً في حال خلاف ذلك؛ ويتم تخطي المفاتيح المثبَّتة بالفعل. يتم حجب قاعدة المكتبة التي تقرأ شروطها بيانات لا يستطيع محرك القواعد تقييمها بعد، وذلك حتى تتمكن من العمل. الطلب الذي يحدد إحداها في `library_keys` يستجيب برمز 400 ولا يثبّت أي شيء (\"These library rules cannot run yet: their conditions read data the rules engine cannot evaluate.\" متبوعة بالمفاتيح)، بينما يتخطاها التثبيت عبر `bundle`. تعود القاعدة المحجوبة تلقائياً بمجرد إمكانية تقييم شروطها. يتم تخطي أي مدخل في `library_keys` غير موجود في المكتبة، ولا يتم رفضه.",
        "operationId": "installTransactionRuleLibrary",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "install_library",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRuleInstallRequest"
              },
              "example": {
                "library_keys": [
                  "structuring-inbound",
                  "structuring-outbound"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ما تم تثبيته.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionRuleInstallResult"
                },
                "example": {
                  "installed_library_keys": [
                    "structuring-inbound",
                    "structuring-outbound"
                  ],
                  "installed_count": 2
                }
              }
            }
          },
          "400": {
            "description": "لم يتم تقديم library_keys ولا bundle، أو أن `library_keys` ليست قائمة، أو أن أحد مدخلات `library_keys` محجوب. يتم تخطي أي إدخال غير معروف والرد بالرمز 200 بدونه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/transactions/rules/install/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"library_keys\": [\"structuring-inbound\", \"structuring-outbound\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.install_library(\n    library_keys=[\"structuring-inbound\", \"structuring-outbound\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.installLibrary({\n  library_keys: [\"structuring-inbound\", \"structuring-outbound\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.InstallLibrary(ctx, didit.TransactionRuleInstallRequest{\n\tLibraryKeys: didit.Some([]string{\"structuring-inbound\", \"structuring-outbound\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.TransactionRuleInstallRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().installLibrary(TransactionRuleInstallRequest.builder()\n        .libraryKeys(List.of(\"structuring-inbound\", \"structuring-outbound\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->rules->installLibrary([\n    'library_keys' => ['structuring-inbound', 'structuring-outbound'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.install_library(library_keys: [\"structuring-inbound\", \"structuring-outbound\"])\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.InstallLibraryAsync(new TransactionRuleInstallRequest\n{\n    LibraryKeys = new string[] { \"structuring-inbound\", \"structuring-outbound\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "summary": "إلغاء تثبيت قواعد المكتبة",
        "description": "إزالة الإعدادات المسبقة المثبتة من التطبيق، بواسطة `library_keys` أو `bundle` كاملة. تتوقف الإعدادات المسبقة التي أُزيل تثبيتها عن التقييم فوراً ويمكن إعادة تثبيتها من المكتبة في أي وقت.",
        "operationId": "uninstallTransactionRuleLibrary",
        "x-didit-sdk": {
          "resource": "transactions.rules",
          "method": "uninstall_library",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRuleInstallRequest"
              },
              "example": {
                "bundle": "responsible_gaming"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "عدد الإعدادات المسبقة التي تمت إزالتها.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionRuleInstallResult"
                },
                "example": {
                  "uninstalled_count": 5
                }
              }
            }
          },
          "400": {
            "description": "لم يتم تقديم library_keys ولا bundle.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/transactions/rules/install/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"bundle\": \"responsible_gaming\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.uninstall_library(\n    bundle=\"responsible_gaming\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.uninstallLibrary({\n  bundle: \"responsible_gaming\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.UninstallLibrary(ctx, didit.TransactionRuleInstallRequest{\n\tBundle: didit.String(\"responsible_gaming\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TransactionRuleInstallRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().uninstallLibrary(TransactionRuleInstallRequest.builder()\n        .bundle(\"responsible_gaming\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->rules->uninstallLibrary([\n    'bundle' => 'responsible_gaming',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.uninstall_library(bundle: \"responsible_gaming\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.UninstallLibraryAsync(new TransactionRuleInstallRequest\n{\n    Bundle = \"responsible_gaming\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/": {
      "get": {
        "summary": "عرض الشبكات",
        "description": "عرض شبكات الاحتيال المكتشفة داخل مؤسسة هذا التطبيق، مرتبة حسب أعلى درجات المخاطر أولاً بشكل افتراضي. يتم استبعاد الشبكات المتجاهلة افتراضياً؛ مرّر الحالة لتضمينها. لا تحتوي تطبيقات البيئة التجريبية على شبكات أبداً: فالتجميع العنقودي يستبعد بيانات البيئة التجريبية بالكامل. تحمل كل استجابة `sharing_mode` الخاص بالمؤسسة وما إذا كانت الإشارات المشتركة بين المؤسسات تنطبق عليها (`cross_org_available` و `cross_org_unavailable_reason`). تقوم `kpis` بتجميع الشبكات المطابقة لعوامل التصفية لديك وتقوم `counts` بتجميع كل شبكة يمكن للتطبيق رؤيتها؛ مرّر `summary=false` لتخطي كليهما عندما تحتاج إلى الصفحة فقط. يتطلب مفتاح API ذا وصول كامل، أو الإذن `list:networks` لعضو لوحة التحكم.",
        "operationId": "list_networks",
        "x-didit-sdk": {
          "resource": "networks",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "الحالات مفصولة بفواصل لتضمينها: active,in_review,resolved,dismissed. احذف المعامل لاستبعاد الحالات ذات الحالة dismissed."
          },
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "identity",
                "transactions"
              ]
            },
            "description": "يحتفظ `transactions` بالشبكات التي يكون جميع أعضائها أطرافاً في المعاملة؛ ويحتفظ `identity` بجميع الشبكات الأخرى. لا ترسله لعرض كليهما. كما أنه يضيّق نطاق `counts.views` و`counts.facets`. أي قيمة أخرى تُرجع 400."
          },
          {
            "name": "signal_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "أنواع الإشارات مفصولة بفواصل: ip_address,device,face,document_number,phone,email,address."
          },
          {
            "name": "pattern_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "أنواع الأنماط مفصولة بفواصل، مثل exact_same_device,same_email."
          },
          {
            "name": "risk_band",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "نطاقات مفصولة بفواصل: low,medium,high."
          },
          {
            "name": "min_size",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "الحد الأدنى لعدد الأعضاء."
          },
          {
            "name": "max_size",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "الحد الأقصى لعدد الأعضاء."
          },
          {
            "name": "assignee",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "المعيّنون مفصولون بفواصل: `unassigned`، أو عناوين البريد الإلكتروني للأعضاء (المطابقة غير حساسة لحالة الأحرف)، أو `me` لعضو لوحة التحكم الذي يجري الاستدعاء. تطابق الشبكة أي قيمة. تتطلب `me` token لعضو لوحة التحكم: يحصل مفتاح API على 400 `{\"assignee\": [\"\\\"me\\\" needs a user token; an API key has no assignee identity.\"]}`."
          },
          {
            "name": "priority",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "الأولويات مفصولة بفواصل: `low`، أو `medium`، أو `high`، أو `none` للشبكات التي ليس لها أولوية. ترجع أي قيمة أخرى الخطأ 400 `{\"priority\": \"Unknown priority: <values>.\"}`."
          },
          {
            "name": "risk_min",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            },
            "description": "الحد الأدنى لدرجة المخاطر، عدد صحيح من 0 إلى 100. أي قيمة ليست عددًا صحيحًا تُرجع الرمز 400 `{\"risk_min\": \"Use a whole number from 0 to 100.\"}`."
          },
          {
            "name": "has_case",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "تُبقي القيمة `true` على الشبكات التي فتح تطبيقك حالة لها، بينما تُبقي القيمة `false` على الشبكات الأخرى. وتُتجاهل أي قيمة أخرى."
          },
          {
            "name": "date_from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "الحد الأدنى لـ last_activity_at (تاريخ أو تاريخ ووقت وفقاً لمعيار ISO 8601)."
          },
          {
            "name": "date_to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "الحد الأعلى لـ first_activity_at (تاريخ أو تاريخ ووقت بتنسيق ISO 8601)."
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "بحث بنص حر عبر اسم الشبكة وأسماء الأعضاء وnetwork_id (N-0001) ورموز pattern_type الدقيقة."
          },
          {
            "name": "ordering",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "واحد من risk_score، -risk_score، last_activity_at، -last_activity_at، first_activity_at، -first_activity_at، network_number، -network_number. القيمة الافتراضية هي -risk_score,-last_activity_at."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            },
            "description": "حجم الصفحة، 1-500. القيمة الافتراضية هي 100."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            },
            "description": "إزاحة تستند إلى الصفر للسجل الأول."
          },
          {
            "name": "summary",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "تُرجع القيمة `false` الصفحة وقيمة `count` الخاصة بها فقط، دون `kpis` و`counts`. القيمة الافتراضية هي `true`. يؤدي إرسال أي قيمة بخلاف `true` أو `false` إلى إرجاع الرمز 400."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/?status=active,in_review&ordering=-risk_score' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.networks.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.networks.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Networks.ListAutoPaging(ctx, didit.NetworksListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.networks().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->networks->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.networks.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Networks.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "قائمة الشبكات مقسمة إلى صفحات، مع وضع المشاركة الخاص بالمؤسسة والتوافر عبر المؤسسات، بالإضافة إلى `kpis` و `counts` ما لم يكن `summary=false`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "integer",
                      "nullable": true,
                      "description": "إزاحة الصفحة التالية، أو null في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "integer",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NetworkListItem"
                      }
                    },
                    "kpis": {
                      "type": "object",
                      "description": "كل مفتاح هو {value, delta} على النتائج المطابقة للتصفيات الحالية. يُحذف عندما يكون `summary=false`.",
                      "properties": {
                        "active": {
                          "type": "object"
                        },
                        "in_review": {
                          "type": "object"
                        },
                        "applicants_involved": {
                          "type": "object"
                        },
                        "detected_this_period": {
                          "type": "object"
                        },
                        "false_positive_rate": {
                          "type": "object"
                        }
                      }
                    },
                    "counts": {
                      "$ref": "#/components/schemas/NetworkListCounts"
                    },
                    "sharing_mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "private",
                        "global"
                      ],
                      "description": "وضع المشاركة بين المؤسسات الخاص بالمؤسسة. تقارن القيمة `global` فقط الشبكات عبر المؤسسات؛ بينما تقصر القيمتان `private` و`off` المقارنة على سجل المؤسسة الخاص فقط.",
                      "example": "global"
                    },
                    "cross_org_available": {
                      "type": "boolean",
                      "description": "ما إذا كانت الإشارات المشتركة بين المؤسسات تسري على هذه المؤسسة. تتطلب كلاً من خطة Enterprise ووضع المشاركة `global`.",
                      "example": true
                    },
                    "cross_org_unavailable_reason": {
                      "type": "string",
                      "enum": [
                        "plan",
                        "sharing_mode"
                      ],
                      "nullable": true,
                      "description": "سبب عدم تطبيق الإشارات المشتركة بين المؤسسات، ويتم التحقق منها بهذا الترتيب. `plan`: خطة المؤسسة لا تتضمن شبكة مكافحة الاحتيال المشتركة بين المؤسسات (تتطلب خطة Enterprise)، أياً كان وضع المشاركة. `sharing_mode`: تتضمن الخطة الميزة، لكن وضع المشاركة هو `private` أو `off`. تكون Null عندما تكون قيمة `cross_org_available` هي `true`.",
                      "example": null
                    }
                  },
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results",
                    "sharing_mode",
                    "cross_org_available",
                    "cross_org_unavailable_reason"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "قيمة غير صالحة للتصفية أو الترتيب أو تقسيم الصفحات أو `summary`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid summary": {
                    "summary": "ملخص غير صالح",
                    "value": {
                      "summary": [
                        "Must be \"true\" or \"false\"."
                      ]
                    }
                  },
                  "Invalid scope": {
                    "summary": "نطاق غير صالح",
                    "value": {
                      "scope": [
                        "Use identity or transactions."
                      ]
                    }
                  },
                  "Unsupported ordering": {
                    "summary": "ترتيب غير مدعوم",
                    "value": [
                      "Unsupported ordering."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "بيانات اعتماد مفقودة أو غير صالحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "بيانات اعتماد مفقودة أو غير صالحة",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "ينتمي مفتاح API إلى تطبيق آخر، أو أنه مفتاح ذو وصول مقيد: تتطلب endpoint الخاصة بـ Networks مفتاحاً كامل الوصول. يتطلب token عضو لوحة التحكم إذن `list:networks`. يتم إرجاعه أيضاً مع `code: networks_not_entitled` عندما لا تكون Networks مفعّلة للمؤسسة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Networks not enabled": {
                    "summary": "الشبكات غير مفعّلة",
                    "value": {
                      "detail": "Networks is disabled for this organization. Contact Didit support if you believe this is an error.",
                      "code": "networks_not_entitled"
                    }
                  },
                  "Restricted API key": {
                    "summary": "مفتاح API مقيد",
                    "value": {
                      "detail": "This API key has no access to this endpoint."
                    }
                  },
                  "No permission": {
                    "summary": "لا يوجد إذن",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/": {
      "get": {
        "summary": "الحصول على الشبكة",
        "description": "استرداد التفاصيل الكاملة لشبكة واحدة: الإحصاءات وعلامات الاحتيال وإشارات المخاطر، بالإضافة إلى `sharing_mode` الخاص بالمؤسسة والتوفر عبر المؤسسات، و`tags` الخاصة بتطبيقك على الشبكة، و`outcomes` للأعضاء ودرجات الأنماط (`patterns`). يتطلب مفتاح API ذا وصول كامل، أو إذن `read:networks` لعضو في لوحة التحكم.",
        "operationId": "get_network",
        "x-didit-sdk": {
          "resource": "networks",
          "method": "retrieve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "n3a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف UUID للشبكة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.retrieve(\n    \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.retrieve(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.Retrieve(ctx, \"n3a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().retrieve(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->networks->retrieve('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.retrieve(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RetrieveAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تفاصيل الشبكة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkDetailResponse"
                },
                "example": {
                  "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "network_id": "N-0042",
                  "name": null,
                  "status": "in_review",
                  "risk": {
                    "score": 82,
                    "band": "high",
                    "bar": 0.82
                  },
                  "pattern_types": [
                    "exact_same_device",
                    "same_email"
                  ],
                  "signal_types": [
                    "device",
                    "email"
                  ],
                  "member_counts": {
                    "total": 3,
                    "users": 3,
                    "businesses": 0,
                    "transaction_parties": 0
                  },
                  "member_status": {
                    "approved": 1,
                    "declined": 1,
                    "in_review": 0,
                    "not_completed": 1
                  },
                  "signal_coverage": {
                    "device": {
                      "signals": 1,
                      "subjects": 3,
                      "coverage": 1.0
                    },
                    "email": {
                      "signals": 1,
                      "subjects": 2,
                      "coverage": 0.6667
                    }
                  },
                  "first_activity_at": "2026-10-01T09:12:44Z",
                  "last_activity_at": "2026-10-12T16:03:10Z",
                  "stats": {
                    "members": {
                      "total": 3,
                      "users": 3,
                      "businesses": 0,
                      "transaction_parties": 0
                    },
                    "member_status": {
                      "approved": 1,
                      "declined": 1,
                      "in_review": 0,
                      "not_completed": 1
                    },
                    "signals": {
                      "total": 2,
                      "by_type": {
                        "device": {
                          "signals": 1,
                          "subjects": 3,
                          "coverage": 1.0
                        },
                        "email": {
                          "signals": 1,
                          "subjects": 2,
                          "coverage": 0.6667
                        }
                      }
                    }
                  },
                  "fraud_tags": [],
                  "risk_signals": {
                    "residential_proxy_reuse": {
                      "detected": false,
                      "signal_count": 0,
                      "max_subject_count": 0
                    },
                    "email_intelligence": {
                      "enriched_signal_count": 1,
                      "high_risk_count": 0,
                      "social_profile_count": 0
                    },
                    "phone_intelligence": {
                      "enriched_signal_count": 0,
                      "high_risk_count": 0
                    }
                  },
                  "reviewed_at": "2026-10-12T16:30:00Z",
                  "reviewed_by": "reviewer@example.com",
                  "review_reason": "Shared device across three new accounts.",
                  "notes_count": 0,
                  "sharing_mode": "global",
                  "cross_org_available": true,
                  "cross_org_unavailable_reason": null,
                  "tags": [
                    {
                      "uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                      "name": "SUSPICIOUS",
                      "color": "#6366F1",
                      "source": "custom",
                      "added_by": null,
                      "added_at": "2026-10-13T08:15:00Z"
                    }
                  ],
                  "outcomes": {
                    "approved": 1,
                    "declined": 1,
                    "in_review": 0,
                    "total": 3
                  },
                  "patterns": [
                    {
                      "type": "background",
                      "score": 0.8125,
                      "members": 3,
                      "reason": null,
                      "computed_at": "2026-10-13T08:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الشبكة (أو أنها غير مرئية لهذا التطبيق).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "بيانات اعتماد مفقودة أو غير صالحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "بيانات اعتماد مفقودة أو غير صالحة",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "ينتمي مفتاح API إلى تطبيق آخر، أو أنه مفتاح ذو وصول مقيد: تتطلب endpoint الخاصة بـ Networks مفتاحاً كامل الوصول. يتطلب token عضو لوحة التحكم إذن `read:networks`. يتم إرجاعه أيضاً مع `code: networks_not_entitled` عندما لا تكون Networks مفعّلة للمؤسسة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Networks not enabled": {
                    "summary": "الشبكات غير مفعّلة",
                    "value": {
                      "detail": "Networks is disabled for this organization. Contact Didit support if you believe this is an error.",
                      "code": "networks_not_entitled"
                    }
                  },
                  "Restricted API key": {
                    "summary": "مفتاح API مقيد",
                    "value": {
                      "detail": "This API key has no access to this endpoint."
                    }
                  },
                  "No permission": {
                    "summary": "لا يوجد إذن",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/graph/": {
      "get": {
        "summary": "الحصول على مخطط الشبكة",
        "description": "استرجع الشبكة كمخطط لعقد الأطراف المعنية (مستخدمو المورد، وشركات المورد، وأطراف المعاملة) وعقد الإشارات (قيم الجهاز/عنوان IP/الوجه/المستند/الهاتف/البريد الإلكتروني/العنوان المشتركة التي تربط بينها)، مع حواف تمثل العضويات.",
        "operationId": "get_network_graph",
        "x-didit-sdk": {
          "resource": "networks",
          "method": "retrieve_graph",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "n3a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف UUID للشبكة."
          },
          {
            "name": "depth",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "all"
              ]
            },
            "description": "القفزات المراد تضمينها من الكيان محل التركيز. القيمة الافتراضية هي الكل (غير محدود)."
          },
          {
            "name": "focus_kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "vendor_user",
                "vendor_business",
                "transaction_party"
              ]
            },
            "description": "نوع الموضوع لتركيز المخطط عليه. يجب تقديمه مع focus_id؛ ويتم تعيينه افتراضياً إلى عضو عشوائي عندما يكون العمق محدوداً ولا يتم تقديم أي منهما."
          },
          {
            "name": "focus_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للموضوع لتركيز المخطط عليه."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/graph/?depth=2' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.retrieve_graph(\n    \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.retrieveGraph(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RetrieveGraph(ctx, \"n3a5e000-0000-4000-8000-000000000001\", didit.NetworksRetrieveGraphParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().retrieveGraph(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->networks->retrieveGraph('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.retrieve_graph(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RetrieveGraphAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "مخطط الشبكة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkGraph"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الشبكة (أو أنها غير مرئية لهذا التطبيق).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/members/": {
      "get": {
        "summary": "عرض أعضاء الشبكة",
        "description": "عرض قائمة بالكيانات (مستخدمو المورّدين، أو شركات المورّدين، أو أطراف المعاملات) التي تنتمي إلى هذه الشبكة.",
        "operationId": "list_network_members",
        "x-didit-sdk": {
          "resource": "networks",
          "method": "list_members",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "n3a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف UUID للشبكة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/members/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.list_members(\n    \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.listMembers(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.ListMembers(ctx, \"n3a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().listMembers(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->networks->listMembers('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.list_members(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.ListMembersAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "أعضاء الشبكة. بدون تقسيم إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NetworkMember"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الشبكة (أو أنها غير مرئية لهذا التطبيق).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/signals/": {
      "get": {
        "summary": "عرض إشارات الشبكة",
        "description": "عرض قائمة بالإشارات (قيم الجهاز المشترك، أو عنوان IP، أو الوجه، أو رقم المستند، أو الهاتف، أو البريد الإلكتروني، أو العنوان) التي تربط بين أعضاء هذه الشبكة.",
        "operationId": "list_network_signals",
        "x-didit-sdk": {
          "resource": "networks",
          "method": "list_signals",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "n3a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف UUID للشبكة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/signals/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.list_signals(\n    \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.listSignals(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.ListSignals(ctx, \"n3a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().listSignals(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->networks->listSignals('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.list_signals(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.ListSignalsAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "إشارات الشبكة. بدون تقسيم إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NetworkSignal"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الشبكة (أو أنها غير مرئية لهذا التطبيق).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/timeline/": {
      "get": {
        "summary": "الحصول على المخطط الزمني للشبكة",
        "description": "بدون `contract`: أحداث الشبكة الخاصة (الاكتشاف، وأحدث ملاحظة لكل إشارة ومراجعتها)، من الأقدم إلى الأحدث وغير مقسمة إلى صفحات. يتم تجاهل `limit` و`cursor` و`event_type`. مع `contract=2`: المخطط الزمني المُنَمَّط، من الأحدث إلى الأقدم ومقسم إلى صفحات عبر cursor. يضيف ما قامت به حسابات الأعضاء (محاولات التحقق، والمعاملات، وتسجيلات الدخول التي ترسلها عبر API الأحداث والقواعد المباشرة التي تنطبق عليها) والحالات المفتوحة للشبكة. تُعاد أحداث `note_added` لأعضاء لوحة التحكم فقط، ولا تُعاد أبداً لمفتاح API. يتطلب مفتاح API بصلاحية وصول كاملة، أو `read:networks` لعضو لوحة التحكم.",
        "operationId": "get_network_timeline",
        "x-didit-sdk": {
          "resource": "networks",
          "method": "retrieve_timeline",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "n3a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف UUID للشبكة."
          },
          {
            "name": "contract",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "2"
              ]
            },
            "description": "`2` تُرجع الجدول الزمني المُنَمَّط. احذفها للحصول على الجدول الزمني الافتراضي. أي قيمة أخرى تُرجع 400."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "description": "المخطط الزمني المحدد النوع فقط. الأحداث لكل صفحة، من 1 إلى 500. القيمة الافتراضية هي 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "المخطط الزمني المحدد النوع فقط. مؤشر `next_cursor` للصفحة السابقة. يُعيد المؤشر غير الصالح أو الفارغ الرمز 400."
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "maxItems": 20,
              "items": {
                "type": "string",
                "enum": [
                  "network_detected",
                  "signal_observed",
                  "network_active",
                  "network_in_review",
                  "network_resolved",
                  "network_dismissed",
                  "verification_attempt",
                  "transaction",
                  "login",
                  "rule_hit",
                  "case_linked",
                  "note_added"
                ]
              }
            },
            "description": "المخطط الزمني المقيّد بنوع فقط. أنواع الأحداث التي سيتم الاحتفاظ بها، مكررة أو مفصولة بفواصل، بحد أقصى 20 قيمة. الإعداد الافتراضي هو جميع الأنواع."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/timeline/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "curl",
            "label": "curl (typed timeline)",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/3fa85f64-5717-4562-b3fc-2c963f66afa6/timeline/?contract=2&limit=50&event_type=verification_attempt,login' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.retrieve_timeline(\n    \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.retrieveTimeline(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RetrieveTimeline(ctx, \"n3a5e000-0000-4000-8000-000000000001\", didit.NetworksRetrieveTimelineParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().retrieveTimeline(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->networks->retrieveTimeline('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.retrieve_timeline(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RetrieveTimelineAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "بدون `contract`: يتم إرجاع `{results}`، الأقدم أولاً، بدون تقسيم إلى صفحات. مع `contract=2`: يتم إرجاع `{results, next_cursor}`، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/NetworkTimeline"
                    },
                    {
                      "$ref": "#/components/schemas/NetworkTimelinePage"
                    }
                  ]
                },
                "examples": {
                  "Default timeline": {
                    "summary": "بدون contract",
                    "value": {
                      "results": [
                        {
                          "event_type": "network_detected",
                          "occurred_at": "2026-10-01T09:12:44Z",
                          "label": "Network detected",
                          "metadata": {
                            "network_id": "N-0042"
                          }
                        },
                        {
                          "event_type": "signal_observed",
                          "occurred_at": "2026-10-12T16:03:10Z",
                          "label": "device observed",
                          "metadata": {
                            "signal_type": "device",
                            "subject_count": 3,
                            "is_hub": false
                          }
                        },
                        {
                          "event_type": "network_in_review",
                          "occurred_at": "2026-10-12T16:30:00Z",
                          "label": "Network in_review",
                          "metadata": {
                            "reason": "Shared device across three new accounts."
                          }
                        }
                      ]
                    }
                  },
                  "Typed timeline": {
                    "summary": "مع contract=2",
                    "value": {
                      "results": [
                        {
                          "id": "monitoring_event:9b2f1c3e-4d5a-4b6c-8d7e-0f1a2b3c4d5e",
                          "event_type": "login",
                          "occurred_at": "2026-10-12T18:41:02Z",
                          "ingested_at": "2026-10-12T18:41:03Z",
                          "label": "Login",
                          "metadata": {},
                          "account": {
                            "node_id": "vendor_user:5f6e7d8c-9b0a-4c1d-8e2f-3a4b5c6d7e8f",
                            "node_type": "account",
                            "uuid": "5f6e7d8c-9b0a-4c1d-8e2f-3a4b5c6d7e8f",
                            "vendor_data": "user-1042",
                            "display_name": "Alex Example",
                            "ownership": "owned",
                            "route": {
                              "kind": "user",
                              "id": "5f6e7d8c-9b0a-4c1d-8e2f-3a4b5c6d7e8f",
                              "application_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
                            }
                          },
                          "source_ref": {
                            "kind": "monitoring_event",
                            "id": "9b2f1c3e-4d5a-4b6c-8d7e-0f1a2b3c4d5e",
                            "ownership": "owned"
                          },
                          "verification_attempt": null,
                          "transaction": null,
                          "login": {
                            "action": "auth.login",
                            "succeeded": true,
                            "status": "APPROVED",
                            "ip": {
                              "address": "203.0.113.24",
                              "country_code": "ES",
                              "city": "Madrid",
                              "connection_type": null,
                              "is_vpn_or_tor": false,
                              "is_data_center": false
                            },
                            "device": {
                              "fingerprint": "fp_0a1b2c3d",
                              "label": "Chrome · Android"
                            },
                            "is_first_login": false,
                            "is_new_device": true
                          },
                          "rule_hit": null,
                          "case_linked": null,
                          "note_added": null
                        },
                        {
                          "id": "session:1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
                          "event_type": "verification_attempt",
                          "occurred_at": "2026-10-12T16:03:10Z",
                          "ingested_at": "2026-10-12T16:03:10Z",
                          "label": "Verification attempt 2 of 2",
                          "metadata": {},
                          "account": {
                            "node_id": "vendor_user:5f6e7d8c-9b0a-4c1d-8e2f-3a4b5c6d7e8f",
                            "node_type": "account",
                            "uuid": "5f6e7d8c-9b0a-4c1d-8e2f-3a4b5c6d7e8f",
                            "vendor_data": "user-1042",
                            "display_name": "Alex Example",
                            "ownership": "owned",
                            "route": {
                              "kind": "user",
                              "id": "5f6e7d8c-9b0a-4c1d-8e2f-3a4b5c6d7e8f",
                              "application_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
                            }
                          },
                          "source_ref": {
                            "kind": "session",
                            "id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
                            "ownership": "owned",
                            "route": {
                              "kind": "session",
                              "id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
                              "application_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
                            }
                          },
                          "verification_attempt": {
                            "session_id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
                            "session_number": 1287,
                            "attempt": 2,
                            "attempt_count": 2,
                            "status": "Approved",
                            "status_changed_at": "2026-10-12T16:05:41Z",
                            "decline_reasons": []
                          },
                          "transaction": null,
                          "login": null,
                          "rule_hit": null,
                          "case_linked": null,
                          "note_added": null
                        },
                        {
                          "id": "signal_observed:8d7c6b5a-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
                          "event_type": "signal_observed",
                          "occurred_at": "2026-10-12T16:03:10Z",
                          "ingested_at": "2026-10-01T09:12:44Z",
                          "label": "device observed",
                          "metadata": {
                            "signal_type": "device",
                            "subject_count": 3,
                            "is_hub": false
                          },
                          "account": null,
                          "source_ref": null,
                          "verification_attempt": null,
                          "transaction": null,
                          "login": null,
                          "rule_hit": null,
                          "case_linked": null,
                          "note_added": null
                        }
                      ],
                      "next_cursor": "eyJ0IjoiMjAyNi0xMC0xMlQxNjowMzoxMCswMDowMCIsImMiOiIyMDI2LTEwLTAxVDA5OjEyOjQ0KzAwOjAwIiwiciI6MSwidSI6IjhkN2M2YjVhLTRlM2YtNGEyYi05YzFkLTBlOWY4YTdiNmM1ZCJ9"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "عند وجود `contract`: قيمة غير صالحة لأي من `contract` أو `limit` أو `cursor` أو `event_type`.",
            "content": {
              "application/json": {
                "examples": {
                  "Unsupported contract": {
                    "summary": "عقد غير مدعوم",
                    "value": {
                      "contract": [
                        "\"3\" is not a valid choice."
                      ]
                    }
                  },
                  "Invalid cursor": {
                    "summary": "مؤشر غير صالح",
                    "value": {
                      "cursor": [
                        "This cursor is not valid. Reload the feed."
                      ]
                    }
                  },
                  "Limit too large": {
                    "summary": "الحد كبير جداً",
                    "value": {
                      "limit": [
                        "Ensure this value is less than or equal to 500."
                      ]
                    }
                  },
                  "Unknown event type": {
                    "summary": "نوع حدث غير معروف",
                    "value": {
                      "event_type": {
                        "0": [
                          "\"logout\" is not a valid choice."
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "بيانات اعتماد مفقودة أو غير صالحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "بيانات اعتماد مفقودة أو غير صالحة",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "ينتمي مفتاح API إلى تطبيق آخر، أو أنه مفتاح ذو وصول مقيد: تتطلب endpoint الخاصة بـ Networks مفتاحاً كامل الوصول. يتطلب token عضو لوحة التحكم إذن `read:networks`. يتم إرجاعه أيضاً مع `code: networks_not_entitled` عندما لا تكون Networks مفعّلة للمؤسسة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Networks not enabled": {
                    "summary": "الشبكات غير مفعّلة",
                    "value": {
                      "detail": "Networks is disabled for this organization. Contact Didit support if you believe this is an error.",
                      "code": "networks_not_entitled"
                    }
                  },
                  "Restricted API key": {
                    "summary": "مفتاح API مقيد",
                    "value": {
                      "detail": "This API key has no access to this endpoint."
                    }
                  },
                  "No permission": {
                    "summary": "لا يوجد إذن",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الشبكة (أو أنها غير مرئية لهذا التطبيق).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/map/": {
      "get": {
        "summary": "الحصول على خريطة الشبكة",
        "description": "النقاط الجغرافية التي تلتقي فيها عناوين/مواقع أعضاء هذه الشبكة، والمستمدة من الجلسات، وجلسات الشركات، والمعاملات الداعمة لعضوياتها.",
        "operationId": "get_network_map",
        "x-didit-sdk": {
          "resource": "networks",
          "method": "retrieve_map",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "n3a5e000-0000-4000-8000-000000000001"
            },
            "description": "معرّف UUID للشبكة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/map/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.retrieve_map(\n    \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.retrieveMap(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RetrieveMap(ctx, \"n3a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().retrieveMap(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->networks->retrieveMap('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.retrieve_map(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RetrieveMapAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "خريطة الشبكة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkMap"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الشبكة (أو أنها غير مرئية لهذا التطبيق).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/sessions/{session_id}/networks/": {
      "get": {
        "summary": "عرض الشبكات لجلسة",
        "description": "عرض الشبكات التي ينتمي إليها مستخدم المزود الخاص بالجلسة. يتم تحديدها عبر المستخدم المرتبط بـ vendor_data الخاص بالجلسة.",
        "operationId": "list_session_network_memberships",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "list_networks",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للجلسة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/sessions/aaaaaaaa-0000-4000-8000-000000000001/networks/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.sessions.list_networks(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.sessions.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.sessions().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->sessions->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.sessions.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الشبكات التي ينتمي إليها هذا الكيان. بدون تقسيم إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNetworkMembershipList"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الكيان في هذا التطبيق، أو ليس لديه موضوع مرتبط للبحث عنه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/business-sessions/{business_session_id}/networks/": {
      "get": {
        "summary": "عرض الشبكات لجلسة شركة",
        "description": "عرض الشبكات التي تنتمي إليها شركة المزود الخاصة بجلسة الشركة.",
        "operationId": "list_business_session_network_memberships",
        "x-didit-sdk": {
          "resource": "business_sessions",
          "method": "list_networks",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "business_session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID لجلسة الشركة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/business-sessions/aaaaaaaa-0000-4000-8000-000000000002/networks/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.business_sessions.list_networks(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businessSessions.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.BusinessSessions.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businessSessions().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->businessSessions->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.business_sessions.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.BusinessSessions.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الشبكات التي ينتمي إليها هذا الكيان. بدون تقسيم إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNetworkMembershipList"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الكيان في هذا التطبيق، أو ليس لديه موضوع مرتبط للبحث عنه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/users/{vendor_user_uuid}/networks/": {
      "get": {
        "summary": "عرض الشبكات لمستخدم",
        "description": "عرض الشبكات التي ينتمي إليها مستخدم المزود.",
        "operationId": "list_user_network_memberships",
        "x-didit-sdk": {
          "resource": "users",
          "method": "list_networks",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "vendor_user_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID لمستخدم المزود (vendor)."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/users/aaaaaaaa-0000-4000-8000-000000000003/networks/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.users.list_networks(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.users.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Users.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.users().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->users->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.users.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Users.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الشبكات التي ينتمي إليها هذا الكيان. بدون تقسيم إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNetworkMembershipList"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الكيان في هذا التطبيق، أو ليس لديه موضوع مرتبط للبحث عنه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/businesses/{vendor_business_uuid}/networks/": {
      "get": {
        "summary": "عرض الشبكات لشركة",
        "description": "عرض الشبكات التي تنتمي إليها شركة المزود.",
        "operationId": "list_business_network_memberships",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "list_networks",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "vendor_business_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID لشركة المزود (vendor)."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/businesses/aaaaaaaa-0000-4000-8000-000000000004/networks/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.list_networks(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->businesses->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الشبكات التي ينتمي إليها هذا الكيان. بدون تقسيم إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNetworkMembershipList"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الكيان في هذا التطبيق، أو ليس لديه موضوع مرتبط للبحث عنه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/networks/": {
      "get": {
        "summary": "عرض الشبكات لمعاملة",
        "description": "عرض الشبكات التي تنتمي إليها الجهة الخاضعة لـ KYC/KYB الداعمة للمعاملة (يتم تحديدها عبر جلسة المعاملة أو جلسة الشركة).",
        "operationId": "list_transaction_network_memberships",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "list_networks",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "transaction_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمعاملة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/transactions/aaaaaaaa-0000-4000-8000-000000000005/networks/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.transactions.list_networks(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.transactions.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.transactions().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->transactions->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.transactions.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الشبكات التي ينتمي إليها هذا الكيان. بدون تقسيم إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNetworkMembershipList"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الكيان في هذا التطبيق، أو ليس لديه موضوع مرتبط للبحث عنه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/parties/{transaction_party_uuid}/networks/": {
      "get": {
        "summary": "عرض الشبكات لطرف معاملة",
        "description": "عرض الشبكات التي ينتمي إليها أحد أطراف المعاملة (المُرسِل، أو المستفيد، أو الطرف المقابل)، ويتم تحديدها عبر الطرف نفسه بدلاً من جلسة المعاملة الداعمة.",
        "operationId": "list_transaction_party_network_memberships",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "list_party_networks",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "transaction_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمعاملة."
          },
          {
            "name": "transaction_party_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بطرف المعاملة."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/transactions/aaaaaaaa-0000-4000-8000-000000000005/parties/bbbbbbbb-0000-4000-8000-000000000006/networks/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.transactions.list_party_networks(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.transactions.listPartyNetworks(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.ListPartyNetworks(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.transactions().listPartyNetworks(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->transactions->listPartyNetworks('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.transactions.list_party_networks(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.ListPartyNetworksAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الشبكات التي ينتمي إليها هذا الكيان. بدون تقسيم إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNetworkMembershipList"
                }
              }
            }
          },
          "404": {
            "description": "لم يتم العثور على الكيان في هذا التطبيق، أو ليس لديه موضوع مرتبط للبحث عنه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/biometric-templates/": {
      "get": {
        "summary": "عرض القوالب البيومترية المحتفظ بها",
        "description": "يحتفظ التطبيق المشترك بقالب بيومتري واحد للوجه مُدار بشكل منفصل وخالٍ من الصور ومرتبط بالمستخدم عند حذف الجلسة (راجع `DELETE /v3/session/{sessionId}/delete/`). تُعد القوالب بيانات بيومترية ذات `expires_at` محدد؛ ولا تحتوي مطلقاً على صور أو بيانات جلسة أو حقول هوية، وتُحذف نهائياً عند حذف المستخدم أو محو البيانات للخصوصية أو انتهاء الصلاحية أو الحذف النهائي الصريح. تقبل هذه الـ endpoints مفاتيح API للتطبيق (`x-api-key`) فقط؛ ويتم رفض رموز مستخدمي Business Console بالرمز `403`.\n\nيُرجع قائمة مقسمة إلى صفحات بالقوالب التي يحتفظ بها التطبيق حالياً. لا يتم إدراج القوالب المحذوفة نهائياً.",
        "operationId": "list_biometric_templates",
        "x-didit-sdk": {
          "resource": "biometric_templates",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Biometric Templates"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vendor_data",
            "required": false,
            "description": "تطابق لسلسلة فرعية غير حساس لحالة الأحرف في `vendor_data` الحالي للمستخدم المالك.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vendor_user_uuid",
            "required": false,
            "description": "تطابق تام في المستخدم المالك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "description": "حالة دورة الحياة. لا يتم إدراج القوالب التي تم حذفها نهائياً.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "expired",
                "held_out_of_use",
                "purge_pending",
                "purge_failed"
              ]
            }
          },
          {
            "in": "query",
            "name": "source_type",
            "required": false,
            "description": "كيفية إنشاء القالب.",
            "schema": {
              "type": "string",
              "enum": [
                "session_delete",
                "automatic_retention",
                "backfill"
              ]
            }
          },
          {
            "in": "query",
            "name": "retained_from",
            "required": false,
            "description": "القوالب التي تم الاحتفاظ بها في هذا الوقت أو بعده.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "retained_to",
            "required": false,
            "description": "القوالب التي تم الاحتفاظ بها في هذا الوقت أو قبله. يجب ألا يسبق `retained_from` (`400`).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "description": "ترتيب الفرز.",
            "schema": {
              "type": "string",
              "enum": [
                "retained_at",
                "-retained_at",
                "expires_at",
                "-expires_at"
              ],
              "default": "-retained_at"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "حجم الصفحة.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "description": "إزاحة التقسيم إلى صفحات.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "قوالب مقسمة إلى صفحات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "format": "uuid",
                            "description": "معرّف القالب. تم إنشاؤه عشوائياً؛ ولا يتم اشتقاقه من الجلسة المحذوفة أو وجهها."
                          },
                          "vendor_user_uuid": {
                            "type": "string",
                            "format": "uuid",
                            "description": "المستخدم المالك."
                          },
                          "vendor_data": {
                            "type": "string",
                            "nullable": true,
                            "description": "بيانات `vendor_data` الحالية للمستخدم، والتي يتم تحديدها عند قراءة القالب (لا يتم نسخها أبداً)."
                          },
                          "source_type": {
                            "type": "string",
                            "enum": [
                              "session_delete",
                              "automatic_retention",
                              "backfill"
                            ],
                            "description": "كيفية إنشاء القالب: حذف جلسة (عبر API أو Console)، أو نافذة الاحتفاظ بالبيانات التلقائية للتطبيق، أو عملية تعبئة سابقة أجرتها Didit بتوجيه منك."
                          },
                          "provenance_reference": {
                            "type": "string",
                            "format": "uuid",
                            "description": "مرجع مبهم يربط القالب بسجل التدقيق الخاص به. ليس معرّف الجلسة المحذوفة ولا يمكن تحويله إليها."
                          },
                          "retention_policy": {
                            "type": "string",
                            "enum": [
                              "delete_with_session",
                              "retain_until_user_deleted"
                            ],
                            "description": "سياسة التطبيق في وقت الاحتفاظ."
                          },
                          "retention_override": {
                            "type": "boolean",
                            "nullable": true,
                            "description": "قيمة `retain_face_embeddings` المرسلة عند الحذف، أو `null` عند تطبيق السياسة."
                          },
                          "retained_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "expires_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "متى تنتهي صلاحية القالب ويتم مسحه تلقائياً. يتم تعيينها دائماً."
                          },
                          "retained_by": {
                            "type": "string",
                            "nullable": true,
                            "description": "الجهة الرئيسية التي أصدرت التعليمات: معرّف التطبيق لمفاتيح API، أو معرّف عضو Console لإجراءات Console، أو معرّف `service:` للاحتفاظ التلقائي. لا يكون عنوان بريد إلكتروني أبداً."
                          },
                          "retained_by_type": {
                            "type": "string",
                            "enum": [
                              "API_KEY",
                              "CONSOLE_USER",
                              "SYSTEM"
                            ]
                          },
                          "instruction_class": {
                            "type": "string",
                            "enum": [
                              "operational_session_delete",
                              "privacy_erasure"
                            ]
                          },
                          "instruction_source": {
                            "type": "string",
                            "enum": [
                              "api",
                              "console",
                              "automatic_retention",
                              "backfill",
                              "privacy_erasure",
                              "explicit_template_purge",
                              "vendor_user_delete",
                              "expiry",
                              "reconciliation",
                              "migration",
                              "system"
                            ]
                          },
                          "instruction_id": {
                            "type": "string",
                            "description": "معرّف `instruction_id` المرسل عند الحذف، أو معرّف تم إنشاؤه بواسطة Didit."
                          },
                          "held_out_of_use": {
                            "type": "boolean",
                            "description": "تكون القيمة `true` فقط أثناء سريان حجز قانوني. ويُستبعد القالب المحجوز من كافة عمليات المطابقة."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "active",
                              "expired",
                              "held_out_of_use",
                              "purge_pending",
                              "purge_failed",
                              "purged"
                            ],
                            "description": "فقط القوالب ذات الحالة `active` التي ليست معلقة، ولم تتجاوز `expires_at`، ولا يزال المستخدم الخاص بها موجودًا، تشارك في المطابقة."
                          },
                          "purged_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "One active template": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
                          "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f",
                          "vendor_data": "user-42",
                          "source_type": "session_delete",
                          "provenance_reference": "6b1e8d2f-4a3c-4f9e-8c7d-1a2b3c4d5e6f",
                          "retention_policy": "retain_until_user_deleted",
                          "retention_override": null,
                          "retained_at": "2026-08-28T10:15:42.318402Z",
                          "expires_at": "2027-08-28T10:15:42.318402Z",
                          "retained_by": "3c9e2b1f-7d4a-4e8b-9c1d-5f6a7b8c9d0e",
                          "retained_by_type": "API_KEY",
                          "instruction_class": "operational_session_delete",
                          "instruction_source": "api",
                          "instruction_id": "post-approval-cleanup-2026-08",
                          "held_out_of_use": false,
                          "status": "active",
                          "purged_at": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "قيمة تصفية غير صالحة، أو `retained_to` يسبق `retained_from`. أخطاء التحقق من الصحة مفهرسة حسب الحقل.",
            "content": {
              "application/json": {
                "examples": {
                  "Bad range": {
                    "value": {
                      "retained_to": [
                        "Must be on or after retained_from."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "token مستخدم Console، أو مفتاح API غير مسموح به. تقبل هذه endpoints مفاتيح API الخاصة بالتطبيق فقط.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/biometric-templates/?vendor_data=user-42&status=active' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.biometric_templates.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.biometricTemplates.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.BiometricTemplates.ListAutoPaging(ctx, didit.BiometricTemplatesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.biometricTemplates().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->biometricTemplates->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.biometric_templates.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.BiometricTemplates.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/biometric-templates/count/": {
      "get": {
        "summary": "عدد القوالب البيومترية المحتفظ بها",
        "description": "يحتفظ التطبيق المشترك بقالب بيومتري واحد للوجه مُدار بشكل منفصل وخالٍ من الصور ومرتبط بالمستخدم عند حذف الجلسة (راجع `DELETE /v3/session/{sessionId}/delete/`). تُعد القوالب بيانات بيومترية ذات `expires_at` محدد؛ ولا تحتوي مطلقاً على صور أو بيانات جلسة أو حقول هوية، وتُحذف نهائياً عند حذف المستخدم أو محو البيانات للخصوصية أو انتهاء الصلاحية أو الحذف النهائي الصريح. تقبل هذه الـ endpoints مفاتيح API للتطبيق (`x-api-key`) فقط؛ ويتم رفض رموز مستخدمي Business Console بالرمز `403`.\n\nيُرجع عدد القوالب المطابقة لنفس عوامل التصفية المستخدمة في endpoint القائمة. استخدمه للتحقق مما سيشمله الحذف النهائي المجمّع والمصفى باستخدام `delete_all: true`.",
        "operationId": "count_biometric_templates",
        "x-didit-sdk": {
          "resource": "biometric_templates",
          "method": "count",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Biometric Templates"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vendor_data",
            "required": false,
            "description": "تطابق لسلسلة فرعية غير حساس لحالة الأحرف في `vendor_data` الحالي للمستخدم المالك.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vendor_user_uuid",
            "required": false,
            "description": "تطابق تام في المستخدم المالك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "description": "حالة دورة الحياة. لا يتم إدراج القوالب التي تم حذفها نهائياً.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "expired",
                "held_out_of_use",
                "purge_pending",
                "purge_failed"
              ]
            }
          },
          {
            "in": "query",
            "name": "source_type",
            "required": false,
            "description": "كيفية إنشاء القالب.",
            "schema": {
              "type": "string",
              "enum": [
                "session_delete",
                "automatic_retention",
                "backfill"
              ]
            }
          },
          {
            "in": "query",
            "name": "retained_from",
            "required": false,
            "description": "القوالب التي تم الاحتفاظ بها في هذا الوقت أو بعده.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "retained_to",
            "required": false,
            "description": "القوالب التي تم الاحتفاظ بها في هذا الوقت أو قبله. يجب ألا يسبق `retained_from` (`400`).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "العدد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "examples": {
                  "Count": {
                    "value": {
                      "count": 128
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "قيمة تصفية غير صالحة، أو `retained_to` يسبق `retained_from`. أخطاء التحقق من الصحة مفهرسة حسب الحقل.",
            "content": {
              "application/json": {
                "examples": {
                  "Bad range": {
                    "value": {
                      "retained_to": [
                        "Must be on or after retained_from."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "token مستخدم Console، أو مفتاح API غير مسموح به. تقبل هذه endpoints مفاتيح API الخاصة بالتطبيق فقط.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/biometric-templates/count/?status=active' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.biometric_templates.count()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.biometricTemplates.count();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.Count(ctx, didit.BiometricTemplatesCountParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.biometricTemplates().count();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->biometricTemplates->count();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.biometric_templates.count\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.BiometricTemplates.CountAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/biometric-templates/{template_uuid}/": {
      "get": {
        "summary": "الحصول على القالب البيومتري المحفوظ",
        "description": "يحتفظ التطبيق المشترك بقالب بيومتري واحد للوجه مُدار بشكل منفصل وخالٍ من الصور ومرتبط بالمستخدم عند حذف الجلسة (راجع `DELETE /v3/session/{sessionId}/delete/`). تُعد القوالب بيانات بيومترية ذات `expires_at` محدد؛ ولا تحتوي مطلقاً على صور أو بيانات جلسة أو حقول هوية، وتُحذف نهائياً عند حذف المستخدم أو محو البيانات للخصوصية أو انتهاء الصلاحية أو الحذف النهائي الصريح. تقبل هذه الـ endpoints مفاتيح API للتطبيق (`x-api-key`) فقط؛ ويتم رفض رموز مستخدمي Business Console بالرمز `403`.\n\nيُرجع قالباً واحداً. لا تتضمن الاستجابة مطلقاً صورة أو متجهاً أو معرّف الجلسة المحذوفة أو بيانات الهوية.",
        "operationId": "get_biometric_template",
        "x-didit-sdk": {
          "resource": "biometric_templates",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Biometric Templates"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "template_uuid",
            "required": true,
            "description": "معرّف القالب، كما يتم إرجاعه في `biometric_template_uuid` بواسطة endpoints حذف الجلسة، أو `biometric_template_id` عند وجود نتيجة مطابقة في البحث بالوجه، أو endpoint القائمة.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "القالب.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف القالب. تم إنشاؤه عشوائياً؛ ولا يتم اشتقاقه من الجلسة المحذوفة أو وجهها."
                    },
                    "vendor_user_uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "المستخدم المالك."
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "بيانات `vendor_data` الحالية للمستخدم، والتي يتم تحديدها عند قراءة القالب (لا يتم نسخها أبداً)."
                    },
                    "source_type": {
                      "type": "string",
                      "enum": [
                        "session_delete",
                        "automatic_retention",
                        "backfill"
                      ],
                      "description": "كيفية إنشاء القالب: حذف جلسة (عبر API أو Console)، أو نافذة الاحتفاظ بالبيانات التلقائية للتطبيق، أو عملية تعبئة سابقة أجرتها Didit بتوجيه منك."
                    },
                    "provenance_reference": {
                      "type": "string",
                      "format": "uuid",
                      "description": "مرجع مبهم يربط القالب بسجل التدقيق الخاص به. ليس معرّف الجلسة المحذوفة ولا يمكن تحويله إليها."
                    },
                    "retention_policy": {
                      "type": "string",
                      "enum": [
                        "delete_with_session",
                        "retain_until_user_deleted"
                      ],
                      "description": "سياسة التطبيق في وقت الاحتفاظ."
                    },
                    "retention_override": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "قيمة `retain_face_embeddings` المرسلة عند الحذف، أو `null` عند تطبيق السياسة."
                    },
                    "retained_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "متى تنتهي صلاحية القالب ويتم مسحه تلقائياً. يتم تعيينها دائماً."
                    },
                    "retained_by": {
                      "type": "string",
                      "nullable": true,
                      "description": "الجهة الرئيسية التي أصدرت التعليمات: معرّف التطبيق لمفاتيح API، أو معرّف عضو Console لإجراءات Console، أو معرّف `service:` للاحتفاظ التلقائي. لا يكون عنوان بريد إلكتروني أبداً."
                    },
                    "retained_by_type": {
                      "type": "string",
                      "enum": [
                        "API_KEY",
                        "CONSOLE_USER",
                        "SYSTEM"
                      ]
                    },
                    "instruction_class": {
                      "type": "string",
                      "enum": [
                        "operational_session_delete",
                        "privacy_erasure"
                      ]
                    },
                    "instruction_source": {
                      "type": "string",
                      "enum": [
                        "api",
                        "console",
                        "automatic_retention",
                        "backfill",
                        "privacy_erasure",
                        "explicit_template_purge",
                        "vendor_user_delete",
                        "expiry",
                        "reconciliation",
                        "migration",
                        "system"
                      ]
                    },
                    "instruction_id": {
                      "type": "string",
                      "description": "معرّف `instruction_id` المرسل عند الحذف، أو معرّف تم إنشاؤه بواسطة Didit."
                    },
                    "held_out_of_use": {
                      "type": "boolean",
                      "description": "تكون القيمة `true` فقط أثناء سريان حجز قانوني. ويُستبعد القالب المحجوز من كافة عمليات المطابقة."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "active",
                        "expired",
                        "held_out_of_use",
                        "purge_pending",
                        "purge_failed",
                        "purged"
                      ],
                      "description": "فقط القوالب ذات الحالة `active` التي ليست معلقة، ولم تتجاوز `expires_at`، ولا يزال المستخدم الخاص بها موجودًا، تشارك في المطابقة."
                    },
                    "purged_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    }
                  }
                },
                "examples": {
                  "Active template": {
                    "value": {
                      "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
                      "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f",
                      "vendor_data": "user-42",
                      "source_type": "session_delete",
                      "provenance_reference": "6b1e8d2f-4a3c-4f9e-8c7d-1a2b3c4d5e6f",
                      "retention_policy": "retain_until_user_deleted",
                      "retention_override": null,
                      "retained_at": "2026-08-28T10:15:42.318402Z",
                      "expires_at": "2027-08-28T10:15:42.318402Z",
                      "retained_by": "3c9e2b1f-7d4a-4e8b-9c1d-5f6a7b8c9d0e",
                      "retained_by_type": "API_KEY",
                      "instruction_class": "operational_session_delete",
                      "instruction_source": "api",
                      "instruction_id": "post-approval-cleanup-2026-08",
                      "held_out_of_use": false,
                      "status": "active",
                      "purged_at": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "token مستخدم Console، أو مفتاح API غير مسموح به. تقبل هذه endpoints مفاتيح API الخاصة بالتطبيق فقط.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "قالب غير معروف، أو قالب لتطبيق آخر، أو (في طلبات `GET`) قالب تم حذفه نهائيًا.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Biometric template not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.biometric_templates.retrieve(\n    \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.biometricTemplates.retrieve(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.Retrieve(ctx, \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.biometricTemplates().retrieve(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->biometricTemplates->retrieve('9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.biometric_templates.retrieve(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.BiometricTemplates.RetrieveAsync(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "summary": "تطهير القالب البيومتري المحتفظ به",
        "description": "يحتفظ التطبيق المشترك بقالب بيومتري واحد للوجه مُدار بشكل منفصل وخالٍ من الصور ومرتبط بالمستخدم عند حذف الجلسة (راجع `DELETE /v3/session/{sessionId}/delete/`). تُعد القوالب بيانات بيومترية ذات `expires_at` محدد؛ ولا تحتوي مطلقاً على صور أو بيانات جلسة أو حقول هوية، وتُحذف نهائياً عند حذف المستخدم أو محو البيانات للخصوصية أو انتهاء الصلاحية أو الحذف النهائي الصريح. تقبل هذه الـ endpoints مفاتيح API للتطبيق (`x-api-key`) فقط؛ ويتم رفض رموز مستخدمي Business Console بالرمز `403`.\n\nيحذف قالباً واحداً نهائياً: تتم إزالته من جميع أنواع المطابقة ويتم حذف القالب المخزن. إجراء غير قابل للرجوع ويتم تسجيله في سجل التدقيق مع الجهة الفاعلة.\n\n**دلالات إعادة المحاولة:** تحذف Didit القالب المخزن أولاً وفقط بعد ذلك تضع علامة على القالب بأنه تم حذفه نهائياً. إذا كان مخزن البيانات البيومترية غير متاح، يُرجع الاستدعاء `503`، وينتقل القالب إلى `status: purge_failed` ويكون مستبعداً بالفعل من المطابقة؛ كرر نفس الاستدعاء للإنهاء. تؤدي إعادة محاولة حذف نهائي لقالب تم حذفه نهائياً بالفعل إلى إرجاع `already_purged`.\n\nتُحذف القوالب نهائياً أيضاً بواسطة `POST /v3/users/delete/` للمستخدم المالك، وعبر أي حذف لجلسات ذلك المستخدم باستخدام `deletion_instruction: privacy_erasure`، وتلقائياً عند `expires_at`.",
        "operationId": "purge_biometric_template",
        "x-didit-sdk": {
          "resource": "biometric_templates",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Biometric Templates"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "template_uuid",
            "required": true,
            "description": "معرّف القالب، كما يتم إرجاعه في `biometric_template_uuid` بواسطة endpoints حذف الجلسة، أو `biometric_template_id` عند وجود نتيجة مطابقة في البحث بالوجه، أو endpoint القائمة.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "نتيجة التطهير.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "purged",
                        "already_purged"
                      ]
                    }
                  }
                },
                "examples": {
                  "Purged": {
                    "value": {
                      "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
                      "outcome": "purged"
                    }
                  },
                  "Already purged": {
                    "value": {
                      "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
                      "outcome": "already_purged"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "token مستخدم Console، أو مفتاح API غير مسموح به. تقبل هذه endpoints مفاتيح API الخاصة بالتطبيق فقط.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "قالب غير معروف، أو قالب لتطبيق آخر، أو (في طلبات `GET`) قالب تم حذفه نهائيًا.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Biometric template not found."
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "كان مخزن البيانات البيومترية غير متاح أثناء الاحتفاظ بالقالب البيومتري أو مسحه. لم يُحذف أي شيء؛ كرر نفس الطلب. عمليات إعادة المحاولة تمتاز بخاصية idempotency وتلتقي عند قالب واحد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Retryable": {
                    "value": {
                      "detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.biometric_templates.delete(\n    \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.biometricTemplates.delete(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.Delete(ctx, \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.biometricTemplates().delete(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->biometricTemplates->delete('9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.biometric_templates.delete(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.BiometricTemplates.DeleteAsync(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/biometric-templates/delete/": {
      "post": {
        "summary": "تطهير مجمّع للقوالب البيومترية المحفوظة",
        "description": "يحتفظ التطبيق المشترك بقالب بيومتري واحد للوجه يُدار بشكل منفصل وخالٍ من الصور مرتبطاً بالمستخدم عند حذف الجلسة (راجع `DELETE /v3/session/{sessionId}/delete/`). القوالب هي بيانات بيومترية ذات `expires_at` محدود؛ ولا تحتوي أبداً على صور أو بيانات جلسة أو حقول هوية، ويتم حذفها نهائياً عند حذف المستخدم أو محو بيانات الخصوصية أو انتهاء الصلاحية أو الحذف النهائي الصريح. تقبل هذه الـ endpoints مفاتيح API الخاصة بالتطبيق (`x-api-key`) فقط؛ ويتم رفض رموز مستخدمي Business Console بـ `403`.\n\nيقوم بحذف العديد من القوالب نهائياً في استدعاء واحد، إما عبر قائمة id صريحة أو باستخدام `delete_all: true` مع تقييدها اختياريًا بنفس عوامل التصفية الخاصة بـ endpoint القائمة. يتم حذف القوالب نهائياً واحداً تلو الآخر ويُبلغ كل ناتج عن `purged` أو `already_purged`. إذا كان مخزن البيانات البيومترية غير متاح، يُرجع الاستدعاء `503` عند أول قالب يفشل: تظل القوالب التي تم حذفها نهائياً في وقت سابق من الطلب محذوفة، وينتقل القالب الفاشل إلى `purge_failed` (المستبعد بالفعل من المطابقة)، وتؤدي إعادة تكرار الطلب إلى إنهاء المهمة.\n\n**يؤدي `delete_all: true` بدون عوامل تصفية إلى حذف كل قالب بيومتري في التطبيق نهائياً ولا يمكن التراجع عن ذلك.** قم بتشغيل endpoint العدّ بنفس عوامل التصفية أولاً.",
        "operationId": "bulk_purge_biometric_templates",
        "x-didit-sdk": {
          "resource": "biometric_templates",
          "method": "batch_delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Biometric Templates"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template_uuids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "description": "القوالب المراد حذفها نهائيًا. مطلوب ما لم تكن قيمة `delete_all` هي `true`. يتم الإبلاغ عن المعرّفات التي حُذفت نهائيًا بالفعل كـ `already_purged`."
                  },
                  "delete_all": {
                    "type": "boolean",
                    "default": false,
                    "description": "عندما تكون `true`، يتم مسح كل قالب يطابق عوامل التصفية أدناه (جميع قوالب التطبيق في حال عدم تحديد أي عامل تصفية). يتم تجاهل `template_uuids`. لا يمكن التراجع عن هذا الإجراء."
                  },
                  "vendor_data": {
                    "type": "string",
                    "description": "فقط مع `delete_all`: مطابقة لسلسلة نصية فرعية غير حساسة لحالة الأحرف في `vendor_data` للمستخدم المالك."
                  },
                  "vendor_user_uuid": {
                    "type": "string",
                    "format": "uuid",
                    "description": "فقط مع `delete_all`: مطابقة تامة للمستخدم المالك."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "active",
                      "expired",
                      "held_out_of_use",
                      "purge_pending",
                      "purge_failed"
                    ],
                    "description": "فقط مع `delete_all`."
                  },
                  "source_type": {
                    "type": "string",
                    "enum": [
                      "session_delete",
                      "automatic_retention",
                      "backfill"
                    ],
                    "description": "فقط مع `delete_all`."
                  },
                  "retained_from": {
                    "type": "string",
                    "format": "date-time",
                    "description": "فقط مع `delete_all`."
                  },
                  "retained_to": {
                    "type": "string",
                    "format": "date-time",
                    "description": "فقط مع `delete_all`. يجب ألا يكون أقدم من `retained_from`."
                  }
                }
              },
              "examples": {
                "By id": {
                  "value": {
                    "template_uuids": [
                      "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
                      "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
                    ]
                  }
                },
                "Every template of one User": {
                  "value": {
                    "delete_all": true,
                    "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f"
                  }
                },
                "Every template in the application": {
                  "value": {
                    "delete_all": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "نتائج التطهير لكل قالب.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "outcome": {
                            "type": "string",
                            "enum": [
                              "purged",
                              "already_purged"
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Mixed": {
                    "value": {
                      "results": [
                        {
                          "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
                          "outcome": "purged"
                        },
                        {
                          "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                          "outcome": "already_purged"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق من الصحة — لم يتم مسح أي شيء.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing selector": {
                    "value": {
                      "template_uuids": [
                        "This field is required unless delete_all is true."
                      ]
                    }
                  },
                  "Bad range": {
                    "value": {
                      "retained_to": [
                        "Must be on or after retained_from."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "token مستخدم Console، أو مفتاح API غير مسموح به. تقبل هذه endpoints مفاتيح API الخاصة بالتطبيق فقط.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "كان مخزن البيانات البيومترية غير متاح أثناء الاحتفاظ بالقالب البيومتري أو مسحه. لم يُحذف أي شيء؛ كرر نفس الطلب. عمليات إعادة المحاولة تمتاز بخاصية idempotency وتلتقي عند قالب واحد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Retryable": {
                    "value": {
                      "detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"delete_all\": true, \"vendor_user_uuid\": \"2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.biometric_templates.batch_delete(\n    template_uuids=[\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.biometricTemplates.batchDelete({\n  template_uuids: [\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.BatchDelete(ctx, didit.BiometricTemplatesBatchDeleteParams{\n\tTemplateUUIDs: didit.Some([]string{\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.BiometricTemplatesBatchDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.biometricTemplates().batchDelete(BiometricTemplatesBatchDeleteParams.builder()\n        .templateUuids(List.of(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->biometricTemplates->batchDelete([\n    'template_uuids' => ['9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b', '1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.biometric_templates.batch_delete(template_uuids: [\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"])\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.BiometricTemplates.BatchDeleteAsync(new BiometricTemplatesBatchDeleteParams\n{\n    TemplateUuids = new string[] { \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/kyb/shareholders/": {
      "post": {
        "summary": "شركة في سجل KYB مع المساهمين (مستقل)",
        "operationId": "post_v3_kyb_shareholders",
        "x-didit-sdk": {
          "resource": "kyb",
          "method": "list_shareholders",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [],
        "description": "استرجع ملف Lite **بالإضافة إلى المساهمين المباشرين** (الأشخاص الطبيعيين والكيانات الاعتبارية، مع نطاقات الملكية الخاصة بهم) لمرشح واحد تم إرجاعه بواسطة `POST /v3/kyb/search/`.\n\n**الاقتران بالبحث.** مرر `kyb_response_id` الخاص بالمرشح تماماً كما تم إرجاعه من خلال بحث في التطبيق نفسه. ابحث في المستوى الذي تنوي شراءه (`tier` في `POST /v3/kyb/search/`)، لأن البحث يعمل على سلسلة السجلات التي تخدم ذلك المستوى، ولا يُعد بحث Lite الفارغ دليلاً على أن السجل لا يتضمن الشركة. عندما تكون بيانات الملكية الخاصة بالدولة موجودة في سجل آخر، تقوم Didit بالعثور على الشركة مجدداً هناك باستخدام رقم التسجيل، دون أي تكلفة إضافية.\n\n**الفوترة.** تتم الفوترة وفقاً لسعر المساهمين (Shareholders) الخاص بالدولة - راجع [أسعار سجل KYB](/ar/getting-started/kyb-registry-pricing). عندما لا يحتفظ السجل بأي سجل مساهمين للشركة (أو لا توفر الدولة أي بيانات ملكية على الإطلاق)، يتم تسليم ملف Lite وتتم فوترته بدلاً من ذلك: اقرأ `registry_tier_delivered` و`registry_ownership_status`. يتم التحقق من الرصيد مقابل سعر المساهمين قبل أي استدعاء للسجل (`403` عند عدم كفايته).\n\n**التوفر.** الإصدار v3 فقط. ينشئ كل استدعاء جلسة شركة (معرّفها هو `request_id`).\n\n**التقارير المعلقة.** عندما يكون التقرير قيد الإعداد، أو لم يتم استرداد قسم الملكية من السجل بعد، يُرجع endpoint الرمز 202 Accepted، وkyb_registry.fetch_status=pending، وkyb_registry.registry_ownership_status=pending، وregistry_tier_delivered=null. احتفظ بـ request_id واسترجع GET /v3/session/{request_id}/decision/ حتى يتم حل registry_checks[0].company.fetch_status. تُكمل Didit التقرير تلقائياً وتخصم رسوم المستوى المسلَّم بمجرد أن يصبح جاهزاً. لا تُكرر عملية الشراء أثناء تعليقها؛ فكل طلب POST جديد ينشئ طلباً منفصلاً.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KYBRegistryCandidateRequest"
              },
              "example": {
                "kyb_response_id": "69aeeb95febb0f1704042259",
                "vendor_data": "company-1234"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/kyb/shareholders/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"kyb_response_id\": \"69aeeb95febb0f1704042259\",\n    \"vendor_data\": \"company-1234\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.kyb.list_shareholders(\n    kyb_response_id=\"69aeeb95febb0f1704042259\",\n    vendor_data=\"company-1234\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.kyb.listShareholders({\n  kyb_response_id: \"69aeeb95febb0f1704042259\",\n  vendor_data: \"company-1234\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.KYB.ListShareholders(ctx, didit.KYBRegistryCandidateRequest{\n\tKYBResponseID: \"69aeeb95febb0f1704042259\",\n\tVendorData:    didit.String(\"company-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.KYBRegistryCandidateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.kyb().listShareholders(KYBRegistryCandidateRequest.builder()\n        .kybResponseId(\"69aeeb95febb0f1704042259\")\n        .vendorData(\"company-1234\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->kyb->listShareholders([\n    'kyb_response_id' => '69aeeb95febb0f1704042259',\n    'vendor_data' => 'company-1234',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.kyb.list_shareholders(\n  kyb_response_id: \"69aeeb95febb0f1704042259\",\n  vendor_data: \"company-1234\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Kyb.ListShareholdersAsync(new KYBRegistryCandidateRequest\n{\n    KybResponseId = \"69aeeb95febb0f1704042259\",\n    VendorData = \"company-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تقرير الشركة المُعاد وتتم فوترته وفقاً للمستوى المُسلَّم. تقارير الملكية التي لا تزال قيد الإعداد قد تُرجع الرمز 202؛ احتفظ بـ request_id لاسترداد قرارها المحفوظ.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف جلسة الشركة التي تم إنشاؤها لعملية الاسترداد هذه. يستمر السجل المخزن (المرئي في لوحة التحكم) في التحديث إذا تمكّن السجل من حلّ البيانات بعد إرسال الاستجابة."
                    },
                    "registry_tier_requested": {
                      "type": "string",
                      "enum": [
                        "basic",
                        "shareholders",
                        "ubo"
                      ],
                      "description": "المستوى الذي يبيعه هذا الـ endpoint: `basic` (Lite) للاختيار، `shareholders`، `ubo`."
                    },
                    "registry_tier_delivered": {
                      "type": "string",
                      "enum": [
                        "basic",
                        "shareholders",
                        "ubo",
                        null
                      ],
                      "description": "المستوى الذي تم تسليمه وفوترته فعلياً. يكون أقل من المطلوب عندما لا تحتوي سجلات الدولة على بيانات ملكية، أو عندما لا يحتوي السجل على أي سجل ملكية لهذه الشركة.",
                      "nullable": true
                    },
                    "kyb_registry": {
                      "type": "object",
                      "description": "الملف التعريفي الكامل للشركة في السجل.",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "format": "uuid",
                          "description": "معرّف Didit لسجل هذه الشركة."
                        },
                        "node_id": {
                          "type": "string",
                          "example": "feature_kyb_registry"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "Not Finished",
                            "Approved",
                            "Declined",
                            "In Review"
                          ],
                          "description": "تقييم Didit لفحص السجل (على سبيل المثال `In Review` عندما لا تكون الشركة نشطة في السجل أو يتعذر استخلاص بيانات الملكية)."
                        },
                        "registry_status": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "active",
                            "dissolved",
                            "deregistered",
                            "see full details",
                            "authorised",
                            "appointed representative",
                            "unauthorised",
                            "inactive",
                            "no longer authorised",
                            "closed",
                            "struck off",
                            null
                          ],
                          "description": "حالة الشركة المعيارية كما أبلغ عنها السجل."
                        },
                        "data_resolved": {
                          "type": "boolean",
                          "description": "تكون القيمة `true` بمجرد أن يُرجع السجل الملف التعريفي الكامل. وتكون `false` عندما يظل السجل قيد المعالجة بعد الاستقصاء — ويكتمل السجل المخزن تلقائياً بمجرد انتهاء السجل من المعالجة."
                        },
                        "company_name": {
                          "type": "string",
                          "example": "Tesco PLC"
                        },
                        "registration_number": {
                          "type": "string",
                          "nullable": true,
                          "example": "00445790"
                        },
                        "country_code": {
                          "type": "string",
                          "description": "ISO 3166-1 alpha-2.",
                          "example": "GB"
                        },
                        "region": {
                          "type": "string",
                          "nullable": true,
                          "description": "رمز التقسيم الفرعي عندما يكون السجل إقليمياً (مثل `CA` لـ `US-CA`)؛ ويكون فارغاً خلاف ذلك."
                        },
                        "company_type": {
                          "type": "string",
                          "nullable": true,
                          "example": "Public Limited Company"
                        },
                        "incorporation_date": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "example": "1947-11-27"
                        },
                        "registered_address": {
                          "type": "string",
                          "nullable": true,
                          "example": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA"
                        },
                        "tax_number": {
                          "type": "string",
                          "nullable": true,
                          "example": "GB412 8925 93"
                        },
                        "risk_level": {
                          "type": "string",
                          "nullable": true,
                          "description": "مستوى المخاطر كما ورد في السجل، عند توفره."
                        },
                        "verification_status": {
                          "type": "string",
                          "enum": [
                            "verified",
                            "failed",
                            "unknown"
                          ],
                          "nullable": true,
                          "description": "حالة التحقق عبر الولايات القضائية: `verified` عندما تُثبت حالة السجل الوضع القانوني القائم للشركة (`active`)، و`failed` عندما تفيد بأن الشركة لم تعد قائمة (على سبيل المثال `dissolved`)، وتكون `unknown` في الحالات الأخرى. وتكون القيمة `null` للشركة التي لم تأتِ من سجل وطالما أن التحديد لا يزال `pending`."
                        },
                        "is_from_registry": {
                          "type": "boolean",
                          "description": "دائماً `true` لهذا الـ endpoint — تم استرداد الملف التعريفي من سجل رسمي."
                        },
                        "fetch_status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "resolved"
                          ],
                          "description": "دورة حياة جلب السجل. تُطابقها `data_resolved`."
                        },
                        "alternative_names": {
                          "type": "string",
                          "nullable": true,
                          "description": "أسماء الشركات البديلة، أو التجارية، أو السابقة، أو باللغة الأصلية كنص، عند الإبلاغ عنها."
                        },
                        "nature_of_business": {
                          "type": "string",
                          "nullable": true,
                          "description": "وصف النشاط أو رمز التصنيف، عند الإبلاغ عنه."
                        },
                        "registered_capital": {
                          "type": "string",
                          "nullable": true
                        },
                        "registered_capital_amount": {
                          "type": "string",
                          "nullable": true,
                          "description": "المبلغ العشري كسلسلة نصية، عند الإبلاغ عنه."
                        },
                        "registered_capital_currency": {
                          "type": "string",
                          "nullable": true,
                          "description": "رمز ISO 4217، عند الإبلاغ عنه."
                        },
                        "website": {
                          "type": "string",
                          "nullable": true,
                          "example": "https://www.tesco.com/"
                        },
                        "email": {
                          "type": "string",
                          "nullable": true,
                          "example": "customer.service@tesco.co.uk"
                        },
                        "phone": {
                          "type": "string",
                          "nullable": true,
                          "example": "03301231688"
                        },
                        "legal_entity_identifier": {
                          "type": "string",
                          "nullable": true,
                          "description": "معرّف الكيان القانوني (LEI)، عند الإبلاغ عنه."
                        },
                        "location_of_registration": {
                          "type": "string",
                          "nullable": true,
                          "description": "السجل/الاختصاص القضائي المسجلة به الشركة، عند توفره."
                        },
                        "vat_number": {
                          "type": "string",
                          "nullable": true,
                          "description": "رقم ضريبة القيمة المضافة في الاتحاد الأوروبي (EU VAT)، عند جمعه أثناء خطوة السجل المستضاف أو تعديله لاحقاً. في وقت التحديد، لا يكون هذا الحقل معيناً في العادة — إذ يتم التحقق من صحة ضريبة القيمة المضافة والرقم الضريبي عندما يرسل المستخدم النهائي خطوة السجل في المسار المستضاف."
                        },
                        "vat_validation_status": {
                          "type": "string",
                          "enum": [
                            "valid",
                            "invalid",
                            "format_valid",
                            "invalid_format",
                            "could_not_validate",
                            "not_applicable"
                          ],
                          "description": "نتيجة التحقق من صحة رقم ضريبة القيمة المضافة أو، عند عدم وجوده، `tax_number`، عند الإرسال إلى السجل. `valid` / `invalid`: يتم تحديدها بواسطة السجل الرسمي للدولة (EU VIES، والنرويج، وسويسرا، والبرازيل، وكولومبيا، وكوستاريكا، والإكوادور، وباراغواي؛ وبولندا أيضاً عبر سجل ضريبة القيمة المضافة المحلي الخاص بها). `format_valid` / `invalid_format`: يتم تحديدها بناءً على قواعد التنسيق وأرقام التحقق الخاصة بالدولة عند تعذر الاستعلام من أي سجل. `could_not_validate`: كان السجل غير متاح. `not_applicable`: لا يوجد رقم، أو دولة بدون سجل أو قواعد، أو جلسة في البيئة التجريبية."
                        },
                        "vat_validated_number": {
                          "type": "string",
                          "nullable": true,
                          "description": "الرقم الذي تم التحقق منه، كما يعرفه المصدر (على سبيل المثال، رقم ضريبة القيمة المضافة المشتق من SIREN الفرنسي أو RSIN الهولندي). يكون `null` عند عدم تشغيل أي فحص."
                        },
                        "vat_validation_source": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "eu_vies",
                            "pl_vat_white_list",
                            "no_brreg",
                            "ch_uid_register",
                            "br_receita_federal",
                            "co_rues",
                            "cr_hacienda",
                            "ec_sri",
                            "py_dnit",
                            "format_rules",
                            null
                          ],
                          "description": "المصدر الذي حدد `vat_validation_status`: إما سجل رسمي، أو `format_rules`. تكون قيمته `null` عند عدم تشغيل أي فحص."
                        },
                        "vat_validated_name": {
                          "type": "string",
                          "nullable": true,
                          "description": "الاسم المسجل لدى المصدر الذي تحقق من صحة الرقم، عند إفصاحه عن اسم. يُعيّن فقط عندما تكون الحالة `valid`."
                        },
                        "vat_validated_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "العنوان المسجل لدى المصدر الذي تحقق من الرقم، عندما يكشف عنه. يتم تعيينه فقط عندما تكون الحالة `valid`."
                        },
                        "vat_checked_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "الطابع الزمني للفحص. يكون `null` في حال عدم تشغيل أي فحص."
                        },
                        "financial_summary": {
                          "type": "object",
                          "nullable": true,
                          "description": "تفاصيل الأسهم/رأس المال كما وردت في السجل (العملة، إجمالي الأسهم، فئات الأسهم)، عند توفرها."
                        },
                        "officers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string",
                                "example": "MELISSA BETHELL"
                              },
                              "designation": {
                                "type": "string",
                                "nullable": true,
                                "description": "التسمية الخام من السجل (مثل `Director`، `Secretary`)."
                              },
                              "role": {
                                "type": "string",
                                "description": "الدور المعياري المشتق من التسمية. مجموعة قيم النموذج الكاملة المكوّنة من 17 قيمة؛ وعادة ما يُصدِر تحليل السجل في هذا الـ endpoint القيم director أو non_executive_director أو secretary أو chairman أو company_officer.",
                                "enum": [
                                  "director",
                                  "non_executive_director",
                                  "secretary",
                                  "chairman",
                                  "ubo",
                                  "shareholder",
                                  "representative",
                                  "founder",
                                  "legal_advisor",
                                  "authorized_signatory",
                                  "trustee",
                                  "beneficiary",
                                  "company_officer",
                                  "settlor",
                                  "protector",
                                  "investor",
                                  "other"
                                ]
                              },
                              "nationality": {
                                "type": "string",
                                "nullable": true
                              },
                              "is_active": {
                                "type": "boolean",
                                "description": "`false` عندما يحدد السجل أن التعيين قد انتهى بالاستقالة."
                              },
                              "kyc_status": {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  "Approved",
                                  "Declined",
                                  "Pending",
                                  null
                                ],
                                "description": "حالة جلسة KYC المرتبطة، في حال تم بدء جلسة لهذا المسؤول. تكون `null` بخلاف ذلك."
                              },
                              "kyc_session_url": {
                                "type": "string",
                                "nullable": true,
                                "description": "رابط التحقق لجلسة KYC المرتبطة، في حال وجودها."
                              },
                              "first_name": {
                                "type": "string",
                                "nullable": true,
                                "description": "الاسم الشخصي عندما يذكره سجل الشركات صراحةً؛ لا يُستنتج من الاسم الكامل."
                              },
                              "last_name": {
                                "type": "string",
                                "nullable": true,
                                "description": "اسم العائلة عندما يُبلّغ عنه السجل صراحةً."
                              },
                              "address": {
                                "type": "string",
                                "nullable": true,
                                "description": "عنوان المسؤول الوارد من السجل."
                              },
                              "appointment_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ تعيين المسؤول.",
                                "format": "date"
                              },
                              "termination_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ انتهاء التعيين، عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "date_of_birth": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ الميلاد الكامل المبلغ عنه في السجل. يكون فارغاً (Null) عندما تكون سنة أو شهر الميلاد فقط معروفان.",
                                "format": "date"
                              },
                              "date_of_birth_year": {
                                "type": "integer",
                                "nullable": true,
                                "minimum": 1,
                                "maximum": 9999,
                                "description": "سنة الميلاد كما وردت في السجل، بما في ذلك الحالات التي لا يتوفر فيها التاريخ بالكامل."
                              },
                              "date_of_birth_month": {
                                "type": "integer",
                                "nullable": true,
                                "minimum": 1,
                                "maximum": 12,
                                "description": "شهر الميلاد كما ورد في السجل. يكون Null عندما تكون السنة فقط هي المعروفة."
                              }
                            }
                          },
                          "description": "المديرون وأمناء السر والمسؤولون الآخرون المستخرجون من السجل."
                        },
                        "beneficial_owners": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "first_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "last_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "entity_type": {
                                "type": "string",
                                "enum": [
                                  "person",
                                  "company"
                                ],
                                "description": "ما إذا كان المالك شخصاً طبيعياً أو كياناً اعتبارياً."
                              },
                              "roles": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "الأدوار المعيارية (مثل `ubo` و`shareholder`)."
                              },
                              "ownership_min_shares": {
                                "type": "string",
                                "nullable": true,
                                "description": "الحد الأدنى لنطاق الملكية المبلغ عنه بواسطة السجل (مثل `25%`)."
                              },
                              "ownership_max_shares": {
                                "type": "string",
                                "nullable": true,
                                "description": "الحد الأعلى لنطاق الملكية الذي يبلّغ عنه السجل."
                              },
                              "is_active": {
                                "type": "boolean"
                              },
                              "kyc_status": {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  "Approved",
                                  "Declined",
                                  "Pending",
                                  null
                                ]
                              },
                              "kyc_session_url": {
                                "type": "string",
                                "nullable": true
                              },
                              "effective_ownership_percent": {
                                "type": "number",
                                "nullable": true,
                                "description": "نسبة الملكية المحللة (الحد الأقصى، مع الرجوع إلى الحد الأدنى)."
                              },
                              "company_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "registration_number": {
                                "type": "string",
                                "nullable": true
                              },
                              "country_of_birth": {
                                "type": "string",
                                "nullable": true
                              },
                              "email": {
                                "type": "string",
                                "nullable": true
                              },
                              "nationality": {
                                "type": "string",
                                "nullable": true
                              },
                              "designation": {
                                "type": "string",
                                "nullable": true
                              },
                              "voting_min_shares": {
                                "type": "string",
                                "nullable": true
                              },
                              "voting_max_shares": {
                                "type": "string",
                                "nullable": true
                              },
                              "date_of_birth": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ الميلاد الكامل عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "appointment_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ التعيين عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "shareholding": {
                                "$ref": "#/components/schemas/KYBRegistryShareholding"
                              }
                            }
                          },
                          "description": "المستفيدون الحقيقيون / الأشخاص ذوو السيطرة الفعلية المستخرجون من سجل الشركات. يمكن أن يكون فارغاً إذا كان السجل لا يكشف عن بيانات الملكية."
                        },
                        "addresses": {
                          "type": "array",
                          "nullable": true,
                          "description": "كل عنوان ينص عليه السجل، بصيغة معيارية واحدة. يكون Null عندما لا ينص على أي عنوان.",
                          "items": {
                            "$ref": "#/components/schemas/KYBRegistryAddress"
                          }
                        },
                        "industries": {
                          "type": "array",
                          "nullable": true,
                          "description": "الأنشطة التي يصنف السجل الشركة تحتها، بصيغة قياسية موحدة. تكون null عند عدم ذكر أي نشاط.",
                          "items": {
                            "$ref": "#/components/schemas/KYBRegistryIndustry"
                          }
                        },
                        "accounts": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": true,
                          "description": "تواريخ إيداعات السجل، عند توفرها. تستخدم الإقرارات السنوية والاجتماعات العامة last_annual_return_date وlast_agm_date؛ وهي تختلف عن الحسابات المالية."
                        },
                        "registry_data": {
                          "$ref": "#/components/schemas/KYBRegistryData"
                        },
                        "user_provided_data": {
                          "type": "object",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint (يُستخدم بواسطة مسار KYB المستضاف عندما يقوم المستخدمون النهائيون بتعديل بيانات السجل)."
                        },
                        "confirmed_by_user_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint."
                        },
                        "last_console_edit_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "يتم تعيينه عندما يقوم مراجِع في لوحة التحكم بتعديل السجل لاحقاً."
                        },
                        "is_editable": {
                          "type": "boolean",
                          "description": "ما إذا كان لا يزال من الممكن تعديل البيانات المستمدة من السجل في المسار المستضاف/لوحة التحكم."
                        },
                        "registry_tier_delivered": {
                          "type": "string",
                          "enum": [
                            "basic",
                            "shareholders",
                            "ubo",
                            null
                          ],
                          "description": "مطابق لحقل `registry_tier_delivered` في المستوى الأعلى.",
                          "nullable": true
                        },
                        "registry_ownership_status": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "not_requested",
                            "delivered",
                            "not_held",
                            "unavailable",
                            "pending",
                            null
                          ],
                          "description": "`delivered` عند استرداد بيانات الملكية، و`not_held` عندما يستجيب سجل الملكية ولا يدرج هذه الشركة (راجع `registry_data.ownership_error`)، و`unavailable` عند طلب مستوى ملكية ولكن لم يتوفر لدى السجل أي بيانات لهذه الشركة أو تعذر الاستعلام منه (راجع `registry_data.ownership_error`)، و`pending` عندما لا يكون قسم الملكية قد استُرد من السجل بعد ولا تزال Didit تستكمله، و`not_requested` في المستوى Lite."
                        },
                        "ownership": {
                          "$ref": "#/components/schemas/KYBRegistryOwnership"
                        },
                        "registry_tier": {
                          "type": "string",
                          "nullable": true,
                          "description": "مستوى سجل الشركات الذي طلبه سير العمل: `basic`، أو `shareholders`، أو `ubo`. موجود أيضاً في `ownership.tier_requested`."
                        },
                        "registry_monitoring": {
                          "type": "object",
                          "nullable": true,
                          "description": "أحدث مراقبة لسجل الشركات للشركة، أو `null` في حال عدم وجود أي منها.",
                          "properties": {
                            "uuid": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "status": {
                              "type": "string"
                            },
                            "unavailable_reason": {
                              "type": "string",
                              "nullable": true
                            },
                            "enrolled_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "cancelled_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "last_bill_date": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "next_bill_date": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "last_event_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "events_count": {
                              "type": "integer"
                            },
                            "watched_fields": {
                              "description": "حقول الشركة التي تراقبها أداة المراقبة."
                            }
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "تكرار لقيمة `vendor_data` التي أرسلتها."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "description": "نسخة مطابقة من `metadata` التي أرسلتها."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "examples": {
                  "Resolved company": {
                    "summary": "الملف التعريفي الكامل من السجل (تم اختصار قائمة المسؤولين للإيجاز)",
                    "value": {
                      "request_id": "9d4f2c7a-1b3e-4a5c-8d6f-0e9a8b7c6d5e",
                      "kyb_registry": {
                        "uuid": "f1e2d3c4-b5a6-4789-9c0d-1e2f3a4b5c6d",
                        "node_id": "feature_kyb_registry",
                        "status": "In Review",
                        "registry_status": "active",
                        "data_resolved": true,
                        "company_name": "Tesco PLC",
                        "registration_number": "00445790",
                        "country_code": "GB",
                        "region": "",
                        "company_type": "Public Limited Company",
                        "incorporation_date": "1947-11-27",
                        "registered_address": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA",
                        "tax_number": "GB412 8925 93",
                        "risk_level": "low risk",
                        "verification_status": "verified",
                        "is_from_registry": true,
                        "fetch_status": "resolved",
                        "alternative_names": "TESCO STORES (HOLDINGS) PUBLIC LIMITED COMPANY",
                        "nature_of_business": null,
                        "registered_capital": null,
                        "registered_capital_amount": null,
                        "registered_capital_currency": null,
                        "website": "https://www.tesco.com/",
                        "email": "customer.service@tesco.co.uk",
                        "phone": "03301231688",
                        "legal_entity_identifier": null,
                        "location_of_registration": null,
                        "financial_summary": {
                          "currency": "Pound (£)",
                          "total_number_of_shares": "8174378721",
                          "meta_detail": {
                            "Class_Of_Share": "Ordinary"
                          }
                        },
                        "officers": [
                          {
                            "uuid": "a1b2c3d4-e5f6-4789-9a0b-1c2d3e4f5a6b",
                            "name": "CHRISTOPHER JON TAYLOR",
                            "designation": "Secretary",
                            "role": "secretary",
                            "nationality": null,
                            "is_active": true,
                            "kyc_status": null,
                            "kyc_session_url": null
                          },
                          {
                            "uuid": "b2c3d4e5-f6a7-4890-8b1c-2d3e4f5a6b7c",
                            "name": "MELISSA BETHELL",
                            "designation": "Director",
                            "role": "director",
                            "nationality": "British",
                            "is_active": true,
                            "kyc_status": null,
                            "kyc_session_url": null
                          }
                        ],
                        "beneficial_owners": [],
                        "addresses": [
                          {
                            "address": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA",
                            "type": "legal_entity_registry_address",
                            "description": "registered office address"
                          }
                        ],
                        "industries": null,
                        "accounts": {
                          "last_account": "26 February 2025",
                          "next_account": "26 February 2026",
                          "due_by_date": "26 August 2026"
                        },
                        "registry_data": {},
                        "user_provided_data": null,
                        "confirmed_by_user_at": null,
                        "last_console_edit_at": null,
                        "is_editable": true
                      },
                      "vendor_data": "company-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:45:00.000000+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تستخدم المشكلات على مستوى الحقول غلاف DRF القياسي.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing kyb_response_id": {
                    "summary": "`kyb_response_id` مطلوب",
                    "value": {
                      "kyb_response_id": [
                        "This field is required."
                      ]
                    }
                  },
                  "save_api_request=false rejected": {
                    "summary": "يتم الاحتفاظ بالتحديدات دائماً",
                    "value": {
                      "save_api_request": [
                        "KYB registry select must be saved so billing and retrieval can be tracked."
                      ]
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "تم قبول التقرير ولا يزال قيد المعالجة. عندما يكون التقرير قيد الإعداد، يُرجع endpoint الرمز 202 Accepted وkyb_registry.fetch_status=pending وregistry_tier_delivered=null. احتفظ بـ request_id واستعلم عبر GET /v3/session/{request_id}/decision/ حتى يتم حل registry_checks[0].company.fetch_status. تُكمل Didit التقرير تلقائياً وتخصم تكلفة المستوى المُسلَّم بمجرد أن يصبح جاهزاً. لا تُكرر عملية الشراء أثناء كونه معلقاً؛ فكل طلب POST جديد ينشئ طلباً منفصلاً.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1v3~1kyb~1shareholders~1/post/responses/200/content/application~1json/schema"
                },
                "examples": {
                  "Pending (registry still resolving)": {
                    "summary": "تقرير الملكية لا يزال قيد المعالجة؛ استرجع القرار المحفوظ",
                    "value": {
                      "request_id": "9d4f2c7a-1b3e-4a5c-8d6f-0e9a8b7c6d5e",
                      "kyb_registry": {
                        "uuid": "7c0a4f7e-2b1d-4f6a-9c3e-8d5b2a1f0e9d",
                        "node_id": "feature_kyb_registry",
                        "status": "Not Finished",
                        "registry_status": null,
                        "data_resolved": false,
                        "company_name": "Example Holdings Limited",
                        "registration_number": "12345678",
                        "country_code": "HK",
                        "region": null,
                        "company_type": null,
                        "incorporation_date": null,
                        "registered_address": null,
                        "tax_number": null,
                        "risk_level": null,
                        "verification_status": null,
                        "is_from_registry": true,
                        "fetch_status": "pending",
                        "alternative_names": null,
                        "nature_of_business": null,
                        "registered_capital": null,
                        "registered_capital_amount": null,
                        "registered_capital_currency": null,
                        "website": null,
                        "email": null,
                        "phone": null,
                        "legal_entity_identifier": null,
                        "location_of_registration": null,
                        "financial_summary": {},
                        "officers": [],
                        "beneficial_owners": [],
                        "addresses": null,
                        "industries": null,
                        "accounts": null,
                        "registry_data": {},
                        "user_provided_data": null,
                        "confirmed_by_user_at": null,
                        "last_console_edit_at": null,
                        "is_editable": true,
                        "registry_tier_delivered": null,
                        "registry_ownership_status": "pending"
                      },
                      "vendor_data": "company-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:45:00.000000+00:00",
                      "registry_tier_delivered": null,
                      "registry_tier_requested": "shareholders"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/kyb/ubo/": {
      "post": {
        "summary": "شركة في سجل KYB مع المستفيدين الحقيقيين النهائيين (مستقل)",
        "operationId": "post_v3_kyb_ubo",
        "x-didit-sdk": {
          "resource": "kyb",
          "method": "list_ubos",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [],
        "description": "استرجع ملف Lite والمساهمين المباشرين **والمستفيدين الحقيقيين النهائيين** الذين تم تحديدهم عبر سلسلة الملكية (يحمل `registry_data.ubo_resolution` سلسلة الشركات الأم) لمرشح واحد تم إرجاعه بواسطة `POST /v3/kyb/search/`.\n\n**الاقتران بالبحث.** مرر `kyb_response_id` الخاص بالمرشح تماماً كما تم إرجاعه من خلال بحث في التطبيق نفسه. ابحث في المستوى الذي تنوي شراؤه (`tier` في `POST /v3/kyb/search/`)، لأن البحث يعمل على سلسلة السجلات التي تخدم ذلك المستوى، ولا يُعد بحث Lite الفارغ دليلاً على أن السجل لا يتضمن الشركة. عندما تكون بيانات الملكية الخاصة بالدولة موجودة في سجل آخر، تقوم Didit بالعثور على الشركة مجدداً هناك باستخدام رقم التسجيل، دون أي تكلفة إضافية.\n\n**الفوترة.** تتم الفوترة وفقاً لسعر UBO الخاص بالدولة - راجع [أسعار سجل KYB](/ar/getting-started/kyb-registry-pricing). المستوى المسلَّم هو أعلى مستوى يمكن للدولة والسجل تقديمه: Shareholders عندما لا يحدد التقرير الناتج أي شخص طبيعي كمستفيد حقيقي، وLite عندما لا يكون هناك أي سجل ملكية على الإطلاق؛ يحدد `registry_tier_delivered` ما تمت فوترته. يتم التحقق من الرصيد مقابل سعر UBO قبل أي استدعاء للسجل (`403` عند عدم كفايته).\n\n**التوفر.** الإصدار v3 فقط. ينشئ كل استدعاء جلسة شركة (معرّفها هو `request_id`).\n\n**التقارير المعلقة.** عندما يكون التقرير قيد الإعداد، أو لم يتم استرداد قسم الملكية من السجل بعد، يُرجع endpoint الرمز 202 Accepted، مع kyb_registry.fetch_status=pending وkyb_registry.registry_ownership_status=pending وregistry_tier_delivered=null. احتفظ بـ request_id واسترجع GET /v3/session/{request_id}/decision/ حتى يتم حل registry_checks[0].company.fetch_status. تُكمل Didit التقرير تلقائياً وتخصم رسوم المستوى المسلَّم بمجرد أن يصبح جاهزاً. لا تُكرر عملية الشراء أثناء تعليقها؛ فكل طلب POST جديد ينشئ طلباً منفصلاً.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KYBRegistryCandidateRequest"
              },
              "example": {
                "kyb_response_id": "69aeeb95febb0f1704042259",
                "vendor_data": "company-1234"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/kyb/ubo/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"kyb_response_id\": \"69aeeb95febb0f1704042259\",\n    \"vendor_data\": \"company-1234\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.kyb.list_ubos(\n    kyb_response_id=\"69aeeb95febb0f1704042259\",\n    vendor_data=\"company-1234\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.kyb.listUbos({\n  kyb_response_id: \"69aeeb95febb0f1704042259\",\n  vendor_data: \"company-1234\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.KYB.ListUBOs(ctx, didit.KYBRegistryCandidateRequest{\n\tKYBResponseID: \"69aeeb95febb0f1704042259\",\n\tVendorData:    didit.String(\"company-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.KYBRegistryCandidateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.kyb().listUbos(KYBRegistryCandidateRequest.builder()\n        .kybResponseId(\"69aeeb95febb0f1704042259\")\n        .vendorData(\"company-1234\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->kyb->listUbos([\n    'kyb_response_id' => '69aeeb95febb0f1704042259',\n    'vendor_data' => 'company-1234',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.kyb.list_ubos(\n  kyb_response_id: \"69aeeb95febb0f1704042259\",\n  vendor_data: \"company-1234\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Kyb.ListUbosAsync(new KYBRegistryCandidateRequest\n{\n    KybResponseId = \"69aeeb95febb0f1704042259\",\n    VendorData = \"company-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تقرير الشركة المُعاد وتتم فوترته وفقاً للمستوى المُسلَّم. تقارير الملكية التي لا تزال قيد الإعداد قد تُرجع الرمز 202؛ احتفظ بـ request_id لاسترداد قرارها المحفوظ.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف جلسة الشركة التي تم إنشاؤها لعملية الاسترداد هذه. يستمر السجل المخزن (المرئي في لوحة التحكم) في التحديث إذا تمكّن السجل من حلّ البيانات بعد إرسال الاستجابة."
                    },
                    "registry_tier_requested": {
                      "type": "string",
                      "enum": [
                        "basic",
                        "shareholders",
                        "ubo"
                      ],
                      "description": "المستوى الذي يبيعه هذا الـ endpoint: `basic` (Lite) للاختيار، `shareholders`، `ubo`."
                    },
                    "registry_tier_delivered": {
                      "type": "string",
                      "enum": [
                        "basic",
                        "shareholders",
                        "ubo",
                        null
                      ],
                      "description": "المستوى الذي تم تسليمه وفوترته فعلياً. يكون أقل من المطلوب عندما لا تحتوي سجلات الدولة على بيانات ملكية، أو عندما لا يحتوي السجل على سجل ملكية لهذه الشركة، أو عندما لا يحدد التقرير المُحلَّل لطلب `ubo` أي شخص طبيعي كمستفيد حقيقي.",
                      "nullable": true
                    },
                    "kyb_registry": {
                      "type": "object",
                      "description": "الملف التعريفي الكامل للشركة في السجل.",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "format": "uuid",
                          "description": "معرّف Didit لسجل هذه الشركة."
                        },
                        "node_id": {
                          "type": "string",
                          "example": "feature_kyb_registry"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "Not Finished",
                            "Approved",
                            "Declined",
                            "In Review"
                          ],
                          "description": "تقييم Didit لفحص السجل (على سبيل المثال `In Review` عندما لا تكون الشركة نشطة في السجل أو يتعذر استخلاص بيانات الملكية)."
                        },
                        "registry_status": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "active",
                            "dissolved",
                            "deregistered",
                            "see full details",
                            "authorised",
                            "appointed representative",
                            "unauthorised",
                            "inactive",
                            "no longer authorised",
                            "closed",
                            "struck off",
                            null
                          ],
                          "description": "حالة الشركة المعيارية كما أبلغ عنها السجل."
                        },
                        "data_resolved": {
                          "type": "boolean",
                          "description": "تكون القيمة `true` بمجرد أن يُرجع السجل الملف التعريفي الكامل. وتكون `false` عندما يظل السجل قيد المعالجة بعد الاستقصاء — ويكتمل السجل المخزن تلقائياً بمجرد انتهاء السجل من المعالجة."
                        },
                        "company_name": {
                          "type": "string",
                          "example": "Tesco PLC"
                        },
                        "registration_number": {
                          "type": "string",
                          "nullable": true,
                          "example": "00445790"
                        },
                        "country_code": {
                          "type": "string",
                          "description": "ISO 3166-1 alpha-2.",
                          "example": "GB"
                        },
                        "region": {
                          "type": "string",
                          "nullable": true,
                          "description": "رمز التقسيم الفرعي عندما يكون السجل إقليمياً (مثل `CA` لـ `US-CA`)؛ ويكون فارغاً خلاف ذلك."
                        },
                        "company_type": {
                          "type": "string",
                          "nullable": true,
                          "example": "Public Limited Company"
                        },
                        "incorporation_date": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "example": "1947-11-27"
                        },
                        "registered_address": {
                          "type": "string",
                          "nullable": true,
                          "example": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA"
                        },
                        "tax_number": {
                          "type": "string",
                          "nullable": true,
                          "example": "GB412 8925 93"
                        },
                        "risk_level": {
                          "type": "string",
                          "nullable": true,
                          "description": "مستوى المخاطر كما ورد في السجل، عند توفره."
                        },
                        "verification_status": {
                          "type": "string",
                          "enum": [
                            "verified",
                            "failed",
                            "unknown"
                          ],
                          "nullable": true,
                          "description": "حالة التحقق عبر الولايات القضائية: `verified` عندما تُثبت حالة السجل الوضع القانوني القائم للشركة (`active`)، و`failed` عندما تفيد بأن الشركة لم تعد قائمة (على سبيل المثال `dissolved`)، وتكون `unknown` في الحالات الأخرى. وتكون القيمة `null` للشركة التي لم تأتِ من سجل وطالما أن التحديد لا يزال `pending`."
                        },
                        "is_from_registry": {
                          "type": "boolean",
                          "description": "دائماً `true` لهذا الـ endpoint — تم استرداد الملف التعريفي من سجل رسمي."
                        },
                        "fetch_status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "resolved"
                          ],
                          "description": "دورة حياة جلب السجل. تُطابقها `data_resolved`."
                        },
                        "alternative_names": {
                          "type": "string",
                          "nullable": true,
                          "description": "أسماء الشركات البديلة، أو التجارية، أو السابقة، أو باللغة الأصلية كنص، عند الإبلاغ عنها."
                        },
                        "nature_of_business": {
                          "type": "string",
                          "nullable": true,
                          "description": "وصف النشاط أو رمز التصنيف، عند الإبلاغ عنه."
                        },
                        "registered_capital": {
                          "type": "string",
                          "nullable": true
                        },
                        "registered_capital_amount": {
                          "type": "string",
                          "nullable": true,
                          "description": "المبلغ العشري كسلسلة نصية، عند الإبلاغ عنه."
                        },
                        "registered_capital_currency": {
                          "type": "string",
                          "nullable": true,
                          "description": "رمز ISO 4217، عند الإبلاغ عنه."
                        },
                        "website": {
                          "type": "string",
                          "nullable": true,
                          "example": "https://www.tesco.com/"
                        },
                        "email": {
                          "type": "string",
                          "nullable": true,
                          "example": "customer.service@tesco.co.uk"
                        },
                        "phone": {
                          "type": "string",
                          "nullable": true,
                          "example": "03301231688"
                        },
                        "legal_entity_identifier": {
                          "type": "string",
                          "nullable": true,
                          "description": "معرّف الكيان القانوني (LEI)، عند الإبلاغ عنه."
                        },
                        "location_of_registration": {
                          "type": "string",
                          "nullable": true,
                          "description": "السجل/الاختصاص القضائي المسجلة به الشركة، عند توفره."
                        },
                        "vat_number": {
                          "type": "string",
                          "nullable": true,
                          "description": "رقم ضريبة القيمة المضافة في الاتحاد الأوروبي (EU VAT)، عند جمعه أثناء خطوة السجل المستضاف أو تعديله لاحقاً. في وقت التحديد، لا يكون هذا الحقل معيناً في العادة — إذ يتم التحقق من صحة ضريبة القيمة المضافة والرقم الضريبي عندما يرسل المستخدم النهائي خطوة السجل في المسار المستضاف."
                        },
                        "vat_validation_status": {
                          "type": "string",
                          "enum": [
                            "valid",
                            "invalid",
                            "format_valid",
                            "invalid_format",
                            "could_not_validate",
                            "not_applicable"
                          ],
                          "description": "نتيجة التحقق من صحة رقم ضريبة القيمة المضافة أو، عند عدم وجوده، `tax_number`، عند الإرسال إلى السجل. `valid` / `invalid`: يتم تحديدها بواسطة السجل الرسمي للدولة (EU VIES، والنرويج، وسويسرا، والبرازيل، وكولومبيا، وكوستاريكا، والإكوادور، وباراغواي؛ وبولندا أيضاً عبر سجل ضريبة القيمة المضافة المحلي الخاص بها). `format_valid` / `invalid_format`: يتم تحديدها بناءً على قواعد التنسيق وأرقام التحقق الخاصة بالدولة عند تعذر الاستعلام من أي سجل. `could_not_validate`: كان السجل غير متاح. `not_applicable`: لا يوجد رقم، أو دولة بدون سجل أو قواعد، أو جلسة في البيئة التجريبية."
                        },
                        "vat_validated_number": {
                          "type": "string",
                          "nullable": true,
                          "description": "الرقم الذي تم التحقق منه، كما يعرفه المصدر (على سبيل المثال، رقم ضريبة القيمة المضافة المشتق من SIREN الفرنسي أو RSIN الهولندي). يكون `null` عند عدم تشغيل أي فحص."
                        },
                        "vat_validation_source": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "eu_vies",
                            "pl_vat_white_list",
                            "no_brreg",
                            "ch_uid_register",
                            "br_receita_federal",
                            "co_rues",
                            "cr_hacienda",
                            "ec_sri",
                            "py_dnit",
                            "format_rules",
                            null
                          ],
                          "description": "المصدر الذي حدد `vat_validation_status`: إما سجل رسمي، أو `format_rules`. تكون قيمته `null` عند عدم تشغيل أي فحص."
                        },
                        "vat_validated_name": {
                          "type": "string",
                          "nullable": true,
                          "description": "الاسم المسجل لدى المصدر الذي تحقق من صحة الرقم، عند إفصاحه عن اسم. يُعيّن فقط عندما تكون الحالة `valid`."
                        },
                        "vat_validated_address": {
                          "type": "string",
                          "nullable": true,
                          "description": "العنوان المسجل لدى المصدر الذي تحقق من الرقم، عندما يكشف عنه. يتم تعيينه فقط عندما تكون الحالة `valid`."
                        },
                        "vat_checked_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "الطابع الزمني للفحص. يكون `null` في حال عدم تشغيل أي فحص."
                        },
                        "financial_summary": {
                          "type": "object",
                          "nullable": true,
                          "description": "تفاصيل الأسهم/رأس المال كما وردت في السجل (العملة، إجمالي الأسهم، فئات الأسهم)، عند توفرها."
                        },
                        "officers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string",
                                "example": "MELISSA BETHELL"
                              },
                              "designation": {
                                "type": "string",
                                "nullable": true,
                                "description": "التسمية الخام من السجل (مثل `Director`، `Secretary`)."
                              },
                              "role": {
                                "type": "string",
                                "description": "الدور المعياري المشتق من التسمية. مجموعة قيم النموذج الكاملة المكوّنة من 17 قيمة؛ وعادة ما يُصدِر تحليل السجل في هذا الـ endpoint القيم director أو non_executive_director أو secretary أو chairman أو company_officer.",
                                "enum": [
                                  "director",
                                  "non_executive_director",
                                  "secretary",
                                  "chairman",
                                  "ubo",
                                  "shareholder",
                                  "representative",
                                  "founder",
                                  "legal_advisor",
                                  "authorized_signatory",
                                  "trustee",
                                  "beneficiary",
                                  "company_officer",
                                  "settlor",
                                  "protector",
                                  "investor",
                                  "other"
                                ]
                              },
                              "nationality": {
                                "type": "string",
                                "nullable": true
                              },
                              "is_active": {
                                "type": "boolean",
                                "description": "`false` عندما يحدد السجل أن التعيين قد انتهى بالاستقالة."
                              },
                              "kyc_status": {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  "Approved",
                                  "Declined",
                                  "Pending",
                                  null
                                ],
                                "description": "حالة جلسة KYC المرتبطة، في حال تم بدء جلسة لهذا المسؤول. تكون `null` بخلاف ذلك."
                              },
                              "kyc_session_url": {
                                "type": "string",
                                "nullable": true,
                                "description": "رابط التحقق لجلسة KYC المرتبطة، في حال وجودها."
                              },
                              "first_name": {
                                "type": "string",
                                "nullable": true,
                                "description": "الاسم الشخصي عندما يذكره سجل الشركات صراحةً؛ لا يُستنتج من الاسم الكامل."
                              },
                              "last_name": {
                                "type": "string",
                                "nullable": true,
                                "description": "اسم العائلة عندما يُبلّغ عنه السجل صراحةً."
                              },
                              "address": {
                                "type": "string",
                                "nullable": true,
                                "description": "عنوان المسؤول الوارد من السجل."
                              },
                              "appointment_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ تعيين المسؤول.",
                                "format": "date"
                              },
                              "termination_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ انتهاء التعيين، عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "date_of_birth": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ الميلاد الكامل المبلغ عنه في السجل. يكون فارغاً (Null) عندما تكون سنة أو شهر الميلاد فقط معروفان.",
                                "format": "date"
                              },
                              "date_of_birth_year": {
                                "type": "integer",
                                "nullable": true,
                                "minimum": 1,
                                "maximum": 9999,
                                "description": "سنة الميلاد كما وردت في السجل، بما في ذلك الحالات التي لا يتوفر فيها التاريخ بالكامل."
                              },
                              "date_of_birth_month": {
                                "type": "integer",
                                "nullable": true,
                                "minimum": 1,
                                "maximum": 12,
                                "description": "شهر الميلاد كما ورد في السجل. يكون Null عندما تكون السنة فقط هي المعروفة."
                              }
                            }
                          },
                          "description": "المديرون وأمناء السر والمسؤولون الآخرون المستخرجون من السجل."
                        },
                        "beneficial_owners": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "first_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "last_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "entity_type": {
                                "type": "string",
                                "enum": [
                                  "person",
                                  "company"
                                ],
                                "description": "ما إذا كان المالك شخصاً طبيعياً أو كياناً اعتبارياً."
                              },
                              "roles": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "الأدوار المعيارية (مثل `ubo` و`shareholder`)."
                              },
                              "ownership_min_shares": {
                                "type": "string",
                                "nullable": true,
                                "description": "الحد الأدنى لنطاق الملكية المبلغ عنه بواسطة السجل (مثل `25%`)."
                              },
                              "ownership_max_shares": {
                                "type": "string",
                                "nullable": true,
                                "description": "الحد الأعلى لنطاق الملكية الذي يبلّغ عنه السجل."
                              },
                              "is_active": {
                                "type": "boolean"
                              },
                              "kyc_status": {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  "Approved",
                                  "Declined",
                                  "Pending",
                                  null
                                ]
                              },
                              "kyc_session_url": {
                                "type": "string",
                                "nullable": true
                              },
                              "effective_ownership_percent": {
                                "type": "number",
                                "nullable": true,
                                "description": "نسبة الملكية المحللة (الحد الأقصى، مع الرجوع إلى الحد الأدنى)."
                              },
                              "company_name": {
                                "type": "string",
                                "nullable": true
                              },
                              "registration_number": {
                                "type": "string",
                                "nullable": true
                              },
                              "country_of_birth": {
                                "type": "string",
                                "nullable": true
                              },
                              "email": {
                                "type": "string",
                                "nullable": true
                              },
                              "nationality": {
                                "type": "string",
                                "nullable": true
                              },
                              "designation": {
                                "type": "string",
                                "nullable": true
                              },
                              "voting_min_shares": {
                                "type": "string",
                                "nullable": true
                              },
                              "voting_max_shares": {
                                "type": "string",
                                "nullable": true
                              },
                              "date_of_birth": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ الميلاد الكامل عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "appointment_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "تاريخ التعيين عند الإبلاغ عنه.",
                                "format": "date"
                              },
                              "shareholding": {
                                "$ref": "#/components/schemas/KYBRegistryShareholding"
                              }
                            }
                          },
                          "description": "المستفيدون الحقيقيون / الأشخاص ذوو السيطرة الفعلية المستخرجون من سجل الشركات. يمكن أن يكون فارغاً إذا كان السجل لا يكشف عن بيانات الملكية."
                        },
                        "addresses": {
                          "type": "array",
                          "nullable": true,
                          "description": "كل عنوان ينص عليه السجل، بصيغة معيارية واحدة. يكون Null عندما لا ينص على أي عنوان.",
                          "items": {
                            "$ref": "#/components/schemas/KYBRegistryAddress"
                          }
                        },
                        "industries": {
                          "type": "array",
                          "nullable": true,
                          "description": "الأنشطة التي يصنف السجل الشركة تحتها، بصيغة قياسية موحدة. تكون null عند عدم ذكر أي نشاط.",
                          "items": {
                            "$ref": "#/components/schemas/KYBRegistryIndustry"
                          }
                        },
                        "accounts": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": true,
                          "description": "تواريخ إيداعات السجل، عند توفرها. تستخدم الإقرارات السنوية والاجتماعات العامة last_annual_return_date وlast_agm_date؛ وهي تختلف عن الحسابات المالية."
                        },
                        "registry_data": {
                          "$ref": "#/components/schemas/KYBRegistryData"
                        },
                        "user_provided_data": {
                          "type": "object",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint (يُستخدم بواسطة مسار KYB المستضاف عندما يقوم المستخدمون النهائيون بتعديل بيانات السجل)."
                        },
                        "confirmed_by_user_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "دائماً `null` في هذا الـ endpoint."
                        },
                        "last_console_edit_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "يتم تعيينه عندما يقوم مراجِع في لوحة التحكم بتعديل السجل لاحقاً."
                        },
                        "is_editable": {
                          "type": "boolean",
                          "description": "ما إذا كان لا يزال من الممكن تعديل البيانات المستمدة من السجل في المسار المستضاف/لوحة التحكم."
                        },
                        "registry_tier_delivered": {
                          "type": "string",
                          "enum": [
                            "basic",
                            "shareholders",
                            "ubo",
                            null
                          ],
                          "description": "مطابق لحقل `registry_tier_delivered` في المستوى الأعلى.",
                          "nullable": true
                        },
                        "registry_ownership_status": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "not_requested",
                            "delivered",
                            "not_held",
                            "unavailable",
                            "pending",
                            null
                          ],
                          "description": "`delivered` عند استرداد بيانات الملكية، و`not_held` عندما يستجيب سجل الملكية ولا يدرج هذه الشركة (راجع `registry_data.ownership_error`)، و`unavailable` عند طلب مستوى ملكية ولكن لم يتوفر لدى السجل أي بيانات لهذه الشركة أو تعذر الاستعلام منه (راجع `registry_data.ownership_error`)، و`pending` عندما لا يكون قسم الملكية قد استُرد من السجل بعد ولا تزال Didit تستكمله، و`not_requested` في المستوى Lite."
                        },
                        "ownership": {
                          "$ref": "#/components/schemas/KYBRegistryOwnership"
                        },
                        "registry_tier": {
                          "type": "string",
                          "nullable": true,
                          "description": "مستوى سجل الشركات الذي طلبه سير العمل: `basic`، أو `shareholders`، أو `ubo`. موجود أيضاً في `ownership.tier_requested`."
                        },
                        "registry_monitoring": {
                          "type": "object",
                          "nullable": true,
                          "description": "أحدث مراقبة لسجل الشركات للشركة، أو `null` في حال عدم وجود أي منها.",
                          "properties": {
                            "uuid": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "status": {
                              "type": "string"
                            },
                            "unavailable_reason": {
                              "type": "string",
                              "nullable": true
                            },
                            "enrolled_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "cancelled_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "last_bill_date": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "next_bill_date": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "last_event_at": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "events_count": {
                              "type": "integer"
                            },
                            "watched_fields": {
                              "description": "حقول الشركة التي تراقبها أداة المراقبة."
                            }
                          }
                        }
                      }
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "تكرار لقيمة `vendor_data` التي أرسلتها."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "description": "نسخة مطابقة من `metadata` التي أرسلتها."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "examples": {
                  "Resolved company": {
                    "summary": "الملف التعريفي الكامل من السجل (تم اختصار قائمة المسؤولين للإيجاز)",
                    "value": {
                      "request_id": "9d4f2c7a-1b3e-4a5c-8d6f-0e9a8b7c6d5e",
                      "kyb_registry": {
                        "uuid": "f1e2d3c4-b5a6-4789-9c0d-1e2f3a4b5c6d",
                        "node_id": "feature_kyb_registry",
                        "status": "In Review",
                        "registry_status": "active",
                        "data_resolved": true,
                        "company_name": "Tesco PLC",
                        "registration_number": "00445790",
                        "country_code": "GB",
                        "region": "",
                        "company_type": "Public Limited Company",
                        "incorporation_date": "1947-11-27",
                        "registered_address": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA",
                        "tax_number": "GB412 8925 93",
                        "risk_level": "low risk",
                        "verification_status": "verified",
                        "is_from_registry": true,
                        "fetch_status": "resolved",
                        "alternative_names": "TESCO STORES (HOLDINGS) PUBLIC LIMITED COMPANY",
                        "nature_of_business": null,
                        "registered_capital": null,
                        "registered_capital_amount": null,
                        "registered_capital_currency": null,
                        "website": "https://www.tesco.com/",
                        "email": "customer.service@tesco.co.uk",
                        "phone": "03301231688",
                        "legal_entity_identifier": null,
                        "location_of_registration": null,
                        "financial_summary": {
                          "currency": "Pound (£)",
                          "total_number_of_shares": "8174378721",
                          "meta_detail": {
                            "Class_Of_Share": "Ordinary"
                          }
                        },
                        "officers": [
                          {
                            "uuid": "a1b2c3d4-e5f6-4789-9a0b-1c2d3e4f5a6b",
                            "name": "CHRISTOPHER JON TAYLOR",
                            "designation": "Secretary",
                            "role": "secretary",
                            "nationality": null,
                            "is_active": true,
                            "kyc_status": null,
                            "kyc_session_url": null
                          },
                          {
                            "uuid": "b2c3d4e5-f6a7-4890-8b1c-2d3e4f5a6b7c",
                            "name": "MELISSA BETHELL",
                            "designation": "Director",
                            "role": "director",
                            "nationality": "British",
                            "is_active": true,
                            "kyc_status": null,
                            "kyc_session_url": null
                          }
                        ],
                        "beneficial_owners": [],
                        "addresses": [
                          {
                            "address": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, United Kingdom, AL7 1GA",
                            "type": "legal_entity_registry_address",
                            "description": "registered office address"
                          }
                        ],
                        "industries": null,
                        "accounts": {
                          "last_account": "26 February 2025",
                          "next_account": "26 February 2026",
                          "due_by_date": "26 August 2026"
                        },
                        "registry_data": {
                          "ubo_resolution": {
                            "parent_chain": [],
                            "subsidiaries": [],
                            "unresolved": []
                          }
                        },
                        "user_provided_data": null,
                        "confirmed_by_user_at": null,
                        "last_console_edit_at": null,
                        "is_editable": true
                      },
                      "vendor_data": "company-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:45:00.000000+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تستخدم المشكلات على مستوى الحقول غلاف DRF القياسي.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing kyb_response_id": {
                    "summary": "`kyb_response_id` مطلوب",
                    "value": {
                      "kyb_response_id": [
                        "This field is required."
                      ]
                    }
                  },
                  "save_api_request=false rejected": {
                    "summary": "يتم الاحتفاظ بالتحديدات دائماً",
                    "value": {
                      "save_api_request": [
                        "KYB registry select must be saved so billing and retrieval can be tracked."
                      ]
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "تم قبول التقرير ولا يزال قيد المعالجة. عندما يكون التقرير قيد الإعداد، يُرجع endpoint الرمز 202 Accepted وkyb_registry.fetch_status=pending وregistry_tier_delivered=null. احتفظ بـ request_id واستعلم عبر GET /v3/session/{request_id}/decision/ حتى يتم حل registry_checks[0].company.fetch_status. تُكمل Didit التقرير تلقائياً وتخصم تكلفة المستوى المُسلَّم بمجرد أن يصبح جاهزاً. لا تُكرر عملية الشراء أثناء كونه معلقاً؛ فكل طلب POST جديد ينشئ طلباً منفصلاً.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1v3~1kyb~1ubo~1/post/responses/200/content/application~1json/schema"
                },
                "examples": {
                  "Pending (registry still resolving)": {
                    "summary": "تقرير الملكية لا يزال قيد المعالجة؛ استرجع القرار المحفوظ",
                    "value": {
                      "request_id": "9d4f2c7a-1b3e-4a5c-8d6f-0e9a8b7c6d5e",
                      "kyb_registry": {
                        "uuid": "7c0a4f7e-2b1d-4f6a-9c3e-8d5b2a1f0e9d",
                        "node_id": "feature_kyb_registry",
                        "status": "Not Finished",
                        "registry_status": null,
                        "data_resolved": false,
                        "company_name": "Example Holdings Limited",
                        "registration_number": "12345678",
                        "country_code": "HK",
                        "region": null,
                        "company_type": null,
                        "incorporation_date": null,
                        "registered_address": null,
                        "tax_number": null,
                        "risk_level": null,
                        "verification_status": null,
                        "is_from_registry": true,
                        "fetch_status": "pending",
                        "alternative_names": null,
                        "nature_of_business": null,
                        "registered_capital": null,
                        "registered_capital_amount": null,
                        "registered_capital_currency": null,
                        "website": null,
                        "email": null,
                        "phone": null,
                        "legal_entity_identifier": null,
                        "location_of_registration": null,
                        "financial_summary": {},
                        "officers": [],
                        "beneficial_owners": [],
                        "addresses": null,
                        "industries": null,
                        "accounts": null,
                        "registry_data": {},
                        "user_provided_data": null,
                        "confirmed_by_user_at": null,
                        "last_console_edit_at": null,
                        "is_editable": true,
                        "registry_tier_delivered": null,
                        "registry_ownership_status": "pending"
                      },
                      "vendor_data": "company-1234",
                      "metadata": null,
                      "created_at": "2026-06-11T10:45:00.000000+00:00",
                      "registry_tier_delivered": null,
                      "registry_tier_requested": "ubo"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/id-verification/wallets/": {
      "get": {
        "operationId": "list_wallets",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "description": "كل محفظة Digital ID مع endpoint البدء الخاص بها والدول والحقول المطلوبة وما إذا كان بإمكان هذا التطبيق بدؤها في هذه البيئة الآن. كونها مدرجة لا يعني أنها قيد التشغيل.",
        "summary": "عرض محافظ الهوية الرقمية",
        "tags": [
          "Digital ID wallets"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletCatalogResponse"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة (x-api-key أو Authorization: Bearer)."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://verification.didit.me/v3/id-verification/wallets/ \\\n  --header 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.list()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.list();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.List(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().list();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->list();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.list\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.ListAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/id-verification/wallets/verifications/{request_id}/": {
      "get": {
        "operationId": "get_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "retrieve_verification",
          "auth": "api_key",
          "server": true
        },
        "description": "حالة ونتيجة التحقق من المحفظة: الهوية الموحدة والسمات الخاصة بالمحفظة بمجرد التحقق منها، ورمز الخطأ بمجرد الرفض، والإجراء التالي طالما كانت معلقة. تكون نتيجة التحقق الذي تجاوز expires_at هي timeout.",
        "summary": "الحصول على التحقق من المحفظة",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "قيمة request_id التي أرجعها الـ endpoint للبدء.",
            "required": true
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "ftn",
                      "name": "Finnish Trust Network",
                      "issuing_authority": "Finnish banks and mobile operators (FTN)"
                    },
                    "country": "FIN",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة (x-api-key أو Authorization: Bearer)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ not_found: لا توجد عملية تحقق من المحفظة لهذا التطبيق تتضمن request_id هذا."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/ \\\n  --header 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.retrieve_verification(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.retrieveVerification(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.RetrieveVerification(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().retrieveVerification(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->retrieveVerification('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.retrieve_verification(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.RetrieveVerificationAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/id-verification/wallets/verifications/{request_id}/poll/": {
      "post": {
        "operationId": "poll_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "poll_verification",
          "auth": "api_key",
          "server": true
        },
        "description": "Smart-ID وMobile-ID: اسأل المزود عما إذا كان المستخدم قد أكّد، أو رفض، أو ترك المطالبة تنتهي صلاحيتها، وتحقق من الهوية الموقّعة عند تأكيده. تكتمل محافظ إعادة التوجيه عبر متصفح المستخدم، لذا يقتصر هذا الإجراء بالنسبة لها على قراءة نتيجة التحقق. يُرجع التحقق بحالته بعد ذلك.",
        "summary": "الاستعلام الدوري عن التحقق من المحفظة",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "قيمة request_id التي أرجعها الـ endpoint للبدء.",
            "required": true
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "smart_id",
                      "name": "Smart-ID",
                      "issuing_authority": "SK ID Solutions"
                    },
                    "country": "EST",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "in_app",
                    "simulated": true,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "confirm_in_app",
                      "verification_code": "1234",
                      "poll_interval_seconds": 2
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة (x-api-key أو Authorization: Bearer)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ not_found: لا توجد عملية تحقق من المحفظة لهذا التطبيق تتضمن request_id هذا."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/poll/ \\\n  --header 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.poll_verification(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.pollVerification(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.PollVerification(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().pollVerification(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->pollVerification('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.poll_verification(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.PollVerificationAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/id-verification/wallets/verifications/{request_id}/cancel/": {
      "post": {
        "operationId": "cancel_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "cancel_verification",
          "auth": "api_key",
          "server": true
        },
        "description": "سحب عملية تحقق معلقة: يتم رفضها بوصفها ملغاة ولا تتم فوترتها أبداً. يتم إرجاع العملية التي تم البت فيها دون تغيير. في Smart-ID وMobile-ID: الإلغاء الذي يصل أثناء فحص الاستقصاء لتسجيل الدخول ينتظر بضع ثوانٍ لذلك الاستقصاء، ثم يرفضها، أو يعيدها محققة إذا كان المستخدم قد أكد بالفعل. لا يمكن إلغاء عملية تحقق يقوم المستخدم بإكمالها حالياً (409 verification_in_progress مع Retry-After): أعد المحاولة بعد ذلك العدد من الثواني لقراءة نتيجتها.",
        "summary": "إلغاء التحقق من المحفظة",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "قيمة request_id التي أرجعها الـ endpoint للبدء.",
            "required": true
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "ftn",
                      "name": "Finnish Trust Network",
                      "issuing_authority": "Finnish banks and mobile operators (FTN)"
                    },
                    "country": "FIN",
                    "status": "Declined",
                    "outcome": "cancelled",
                    "error": "cancelled_by_customer",
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": null,
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة (x-api-key أو Authorization: Bearer)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ not_found: لا توجد عملية تحقق من المحفظة لهذا التطبيق تتضمن request_id هذا."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ verification_in_progress: يكمل المستخدم تسجيل الدخول هذا الآن. يوضح رأس Retry-After موعد إعادة المحاولة؛ وتُرجع إعادة المحاولة عملية التحقق التي صدر بشأنها القرار."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/cancel/ \\\n  --header 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.cancel_verification(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.cancelVerification(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.CancelVerification(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().cancelVerification(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->cancelVerification('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.cancel_verification(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.CancelVerificationAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/id-verification/wallets/mitid/": {
      "post": {
        "operationId": "start_mitid_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_mitid",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر MitID (وكالة الحكومة الرقمية الدنماركية؛ DNK) بدون أي سير عمل. تتم الفوترة مرة واحدة فقط، عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إلحاق request_id و result. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى التطبيقات في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة أبداً.",
        "summary": "بدء التحقق عبر MitID",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMitidWalletVerificationStartRequest"
              },
              "example": {
                "country": "DNK",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMitidWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMitidWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "mitid",
                      "name": "MitID",
                      "issuing_authority": "Danish Agency for Digital Government"
                    },
                    "country": "DNK",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/mitid/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"DNK\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_mitid(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"DNK\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startMitid({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"DNK\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartMitid(ctx, didit.IDWalletsStartMitidParams{\n\tBody: didit.DigitalIDWalletAPIMitidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIMitidWalletVerificationStartCountryEnum(\"DNK\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiMitidWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiMitidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startMitid(DigitalIdWalletApiMitidWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiMitidWalletVerificationStartCountryEnum.of(\"DNK\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startMitid([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'DNK',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_mitid(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"DNK\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartMitidAsync(new DigitalIdWalletApiMitidWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiMitidWalletVerificationStartCountryEnum(\"DNK\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "mitid"
      }
    },
    "/v3/id-verification/wallets/bankid-se/": {
      "post": {
        "operationId": "start_bankid_se_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_bankid_se",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر BankID (SWE) (Finansiell ID-Teknik / اتحاد مصرفي؛ SWE) بدون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تحمل الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL أبداً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بالمزود أبداً.",
        "summary": "بدء التحقق عبر BankID (SWE)",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidSeWalletVerificationStartRequest"
              },
              "example": {
                "country": "SWE",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidSeWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidSeWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "bankid_se",
                      "name": "BankID",
                      "issuing_authority": "Finansiell ID-Teknik / bank consortium"
                    },
                    "country": "SWE",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/bankid-se/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"SWE\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_bankid_se(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"SWE\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startBankidSe({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"SWE\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartBankidSe(ctx, didit.IDWalletsStartBankidSeParams{\n\tBody: didit.DigitalIDWalletAPIBankidSeWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountryEe9enum(\"SWE\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiBankidSeWalletVerificationStartRequest;\nimport me.didit.types.DigitalIdWalletApiCountryEe9Enum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startBankidSe(DigitalIdWalletApiBankidSeWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountryEe9Enum.of(\"SWE\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startBankidSe([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'SWE',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_bankid_se(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"SWE\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartBankidSeAsync(new DigitalIdWalletApiBankidSeWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountryEe9Enum(\"SWE\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "bankid_se"
      }
    },
    "/v3/id-verification/wallets/bankid-no/": {
      "post": {
        "operationId": "start_bankid_no_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_bankid_no",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر BankID (NOR) (BankID BankAxept AS؛ NOR) بدون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تحمل الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL أبداً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بالمزود أبداً.",
        "summary": "بدء التحقق عبر BankID (NOR)",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidNoWalletVerificationStartRequest"
              },
              "example": {
                "country": "NOR",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidNoWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidNoWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "bankid_no",
                      "name": "BankID",
                      "issuing_authority": "BankID BankAxept AS"
                    },
                    "country": "NOR",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/bankid-no/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"NOR\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_bankid_no(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"NOR\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startBankidNo({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"NOR\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartBankidNo(ctx, didit.IDWalletsStartBankidNoParams{\n\tBody: didit.DigitalIDWalletAPIBankidNoWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountryAfcEnum(\"NOR\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiBankidNoWalletVerificationStartRequest;\nimport me.didit.types.DigitalIdWalletApiCountryAfcEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startBankidNo(DigitalIdWalletApiBankidNoWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountryAfcEnum.of(\"NOR\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startBankidNo([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'NOR',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_bankid_no(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"NOR\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartBankidNoAsync(new DigitalIdWalletApiBankidNoWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountryAfcEnum(\"NOR\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "bankid_no"
      }
    },
    "/v3/id-verification/wallets/vipps/": {
      "post": {
        "operationId": "start_vipps_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_vipps",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Vipps (Vipps MobilePay / BankID NO؛ NOR) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة مطلقاً.",
        "summary": "بدء التحقق عبر Vipps",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiVippsWalletVerificationStartRequest"
              },
              "example": {
                "country": "NOR",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiVippsWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiVippsWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "vipps",
                      "name": "Vipps",
                      "issuing_authority": "Vipps MobilePay / BankID NO"
                    },
                    "country": "NOR",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/vipps/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"NOR\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_vipps(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"NOR\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startVipps({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"NOR\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartVipps(ctx, didit.IDWalletsStartVippsParams{\n\tBody: didit.DigitalIDWalletAPIVippsWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountryAfcEnum(\"NOR\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountryAfcEnum;\nimport me.didit.types.DigitalIdWalletApiVippsWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startVipps(DigitalIdWalletApiVippsWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountryAfcEnum.of(\"NOR\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startVipps([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'NOR',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_vipps(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"NOR\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartVippsAsync(new DigitalIdWalletApiVippsWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountryAfcEnum(\"NOR\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "vipps"
      }
    },
    "/v3/id-verification/wallets/buypass/": {
      "post": {
        "operationId": "start_buypass_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_buypass",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Buypass ID (Buypass AS؛ NOR) بدون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تحمل الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL أبداً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بالمزود أبداً.",
        "summary": "بدء التحقق عبر Buypass ID",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBuypassWalletVerificationStartRequest"
              },
              "example": {
                "country": "NOR",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBuypassWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBuypassWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "buypass",
                      "name": "Buypass ID",
                      "issuing_authority": "Buypass AS"
                    },
                    "country": "NOR",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/buypass/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"NOR\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_buypass(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"NOR\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startBuypass({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"NOR\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartBuypass(ctx, didit.IDWalletsStartBuypassParams{\n\tBody: didit.DigitalIDWalletAPIBuypassWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountryAfcEnum(\"NOR\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiBuypassWalletVerificationStartRequest;\nimport me.didit.types.DigitalIdWalletApiCountryAfcEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startBuypass(DigitalIdWalletApiBuypassWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountryAfcEnum.of(\"NOR\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startBuypass([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'NOR',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_buypass(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"NOR\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartBuypassAsync(new DigitalIdWalletApiBuypassWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountryAfcEnum(\"NOR\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "buypass"
      }
    },
    "/v3/id-verification/wallets/itsme/": {
      "post": {
        "operationId": "start_itsme_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_itsme",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر itsme (معرّف الهاتف المحمول البلجيكي؛ بلجيكا، لوكسمبورغ، هولندا) دون أي سير عمل. تتم الفوترة مرة واحدة فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ يعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL مطلقاً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة على الإطلاق.",
        "summary": "بدء التحقق عبر itsme",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiItsmeWalletVerificationStartRequest"
              },
              "example": {
                "country": "BEL",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiItsmeWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiItsmeWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "itsme",
                      "name": "itsme",
                      "issuing_authority": "Belgian Mobile ID"
                    },
                    "country": "BEL",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/itsme/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"BEL\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_itsme(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"BEL\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startItsme({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"BEL\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartItsme(ctx, didit.IDWalletsStartItsmeParams{\n\tBody: didit.DigitalIDWalletAPIItsmeWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.DigitalIDWalletAPIItsmeWalletVerificationStartCountryEnum(\"BEL\"),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiItsmeWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiItsmeWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startItsme(DigitalIdWalletApiItsmeWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiItsmeWalletVerificationStartCountryEnum.of(\"BEL\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startItsme([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'BEL',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_itsme(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"BEL\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartItsmeAsync(new DigitalIdWalletApiItsmeWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = \"BEL\",\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "itsme"
      }
    },
    "/v3/id-verification/wallets/idin/": {
      "post": {
        "operationId": "start_idin_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_idin",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر iDIN (البنوك الهولندية (Currence iDIN)؛ هولندا) دون أي سير عمل. تتم الفوترة مرة واحدة فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ يعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL مطلقاً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة على الإطلاق.",
        "summary": "بدء التحقق عبر iDIN",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiIdinWalletVerificationStartRequest"
              },
              "example": {
                "country": "NLD",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiIdinWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiIdinWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "idin",
                      "name": "iDIN",
                      "issuing_authority": "Dutch banks (Currence iDIN)"
                    },
                    "country": "NLD",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/idin/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"NLD\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_idin(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"NLD\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startIdin({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"NLD\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartIdin(ctx, didit.IDWalletsStartIdinParams{\n\tBody: didit.DigitalIDWalletAPIIdinWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIIdinWalletVerificationStartCountryEnum(\"NLD\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiIdinWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiIdinWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startIdin(DigitalIdWalletApiIdinWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiIdinWalletVerificationStartCountryEnum.of(\"NLD\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startIdin([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'NLD',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_idin(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"NLD\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartIdinAsync(new DigitalIdWalletApiIdinWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiIdinWalletVerificationStartCountryEnum(\"NLD\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "idin"
      }
    },
    "/v3/id-verification/wallets/ftn/": {
      "post": {
        "operationId": "start_ftn_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_ftn",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Finnish Trust Network (البنوك ومشغلو شبكات الهاتف المحمول في فنلندا (FTN)؛ FIN) بدون أي سير عمل. تتم الفوترة مرة واحدة فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إلحاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى التطبيقات في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة أبداً.",
        "summary": "بدء التحقق عبر Finnish Trust Network",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFtnWalletVerificationStartRequest"
              },
              "example": {
                "country": "FIN",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFtnWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFtnWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "ftn",
                      "name": "Finnish Trust Network",
                      "issuing_authority": "Finnish banks and mobile operators (FTN)"
                    },
                    "country": "FIN",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/ftn/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"FIN\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_ftn(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"FIN\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startFtn({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"FIN\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartFtn(ctx, didit.IDWalletsStartFtnParams{\n\tBody: didit.DigitalIDWalletAPIFtnWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIFtnWalletVerificationStartCountryEnum(\"FIN\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiFtnWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiFtnWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startFtn(DigitalIdWalletApiFtnWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiFtnWalletVerificationStartCountryEnum.of(\"FIN\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startFtn([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'FIN',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_ftn(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"FIN\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartFtnAsync(new DigitalIdWalletApiFtnWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiFtnWalletVerificationStartCountryEnum(\"FIN\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "ftn"
      }
    },
    "/v3/id-verification/wallets/personalausweis/": {
      "post": {
        "operationId": "start_personalausweis_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_personalausweis",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Personalausweis (Bundesministerium des Innern (eID)؛ DEU) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة مطلقاً.",
        "summary": "بدء التحقق عبر Personalausweis",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest"
              },
              "example": {
                "country": "DEU",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "personalausweis",
                      "name": "Personalausweis",
                      "issuing_authority": "Bundesministerium des Innern (eID)"
                    },
                    "country": "DEU",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/personalausweis/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"DEU\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_personalausweis(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"DEU\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startPersonalausweis({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"DEU\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartPersonalausweis(ctx, didit.IDWalletsStartPersonalausweisParams{\n\tBody: didit.DigitalIDWalletAPIPersonalausweisWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIPersonalausweisWalletVerificationStartCountryEnum(\"DEU\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiPersonalausweisWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startPersonalausweis(DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiPersonalausweisWalletVerificationStartCountryEnum.of(\"DEU\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startPersonalausweis([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'DEU',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_personalausweis(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"DEU\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartPersonalausweisAsync(new DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiPersonalausweisWalletVerificationStartCountryEnum(\"DEU\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "personalausweis"
      }
    },
    "/v3/id-verification/wallets/frejaid/": {
      "post": {
        "operationId": "start_frejaid_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_frejaid",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Freja eID (Freja eID Group؛ SWE) بدون أي سير عمل. تتم الفوترة مرة واحدة فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إلحاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة أبداً.",
        "summary": "بدء التحقق عبر Freja eID",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFrejaidWalletVerificationStartRequest"
              },
              "example": {
                "country": "SWE",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFrejaidWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFrejaidWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "frejaid",
                      "name": "Freja eID",
                      "issuing_authority": "Freja eID Group"
                    },
                    "country": "SWE",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/frejaid/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"SWE\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_frejaid(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"SWE\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startFrejaid({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"SWE\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartFrejaid(ctx, didit.IDWalletsStartFrejaidParams{\n\tBody: didit.DigitalIDWalletAPIFrejaidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountryEe9enum(\"SWE\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountryEe9Enum;\nimport me.didit.types.DigitalIdWalletApiFrejaidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startFrejaid(DigitalIdWalletApiFrejaidWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountryEe9Enum.of(\"SWE\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startFrejaid([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'SWE',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_frejaid(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"SWE\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartFrejaidAsync(new DigitalIdWalletApiFrejaidWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountryEe9Enum(\"SWE\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "frejaid"
      }
    },
    "/v3/id-verification/wallets/uae-pass/": {
      "post": {
        "operationId": "start_uae_pass_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_uae_pass",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر UAE PASS (UAE Digital Government Authority؛ ARE) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة مطلقاً.",
        "summary": "بدء التحقق عبر UAE PASS",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiUaePassWalletVerificationStartRequest"
              },
              "example": {
                "country": "ARE",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiUaePassWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiUaePassWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "uae_pass",
                      "name": "UAE PASS",
                      "issuing_authority": "UAE Digital Government Authority"
                    },
                    "country": "ARE",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/uae-pass/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"ARE\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_uae_pass(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"ARE\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startUaePass({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"ARE\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartUaePass(ctx, didit.IDWalletsStartUaePassParams{\n\tBody: didit.DigitalIDWalletAPIUaePassWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIUaePassWalletVerificationStartCountryEnum(\"ARE\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiUaePassWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startUaePass(DigitalIdWalletApiUaePassWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum.of(\"ARE\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startUaePass([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'ARE',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_uae_pass(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"ARE\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartUaePassAsync(new DigitalIdWalletApiUaePassWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum(\"ARE\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "uae_pass"
      }
    },
    "/v3/id-verification/wallets/govbr/": {
      "post": {
        "operationId": "start_govbr_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_govbr",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر gov.br (Governo Federal do Brasil؛ BRA) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة مطلقاً.",
        "summary": "بدء التحقق عبر gov.br",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGovbrWalletVerificationStartRequest"
              },
              "example": {
                "country": "BRA",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGovbrWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGovbrWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "govbr",
                      "name": "gov.br",
                      "issuing_authority": "Governo Federal do Brasil"
                    },
                    "country": "BRA",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/govbr/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"BRA\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_govbr(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"BRA\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startGovbr({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"BRA\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartGovbr(ctx, didit.IDWalletsStartGovbrParams{\n\tBody: didit.DigitalIDWalletAPIGovbrWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIGovbrWalletVerificationStartCountryEnum(\"BRA\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiGovbrWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startGovbr(DigitalIdWalletApiGovbrWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum.of(\"BRA\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startGovbr([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'BRA',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_govbr(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"BRA\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartGovbrAsync(new DigitalIdWalletApiGovbrWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum(\"BRA\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "govbr"
      }
    },
    "/v3/id-verification/wallets/oneid/": {
      "post": {
        "operationId": "start_oneid_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_oneid",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر OneID (OneID (هوية معتمدة من بنك في المملكة المتحدة)؛ GBR) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة مطلقاً.",
        "summary": "بدء التحقق عبر OneID",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiOneidWalletVerificationStartRequest"
              },
              "example": {
                "country": "GBR",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiOneidWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiOneidWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "oneid",
                      "name": "OneID",
                      "issuing_authority": "OneID (UK bank-verified identity)"
                    },
                    "country": "GBR",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/oneid/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"GBR\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_oneid(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"GBR\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startOneid({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"GBR\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartOneid(ctx, didit.IDWalletsStartOneidParams{\n\tBody: didit.DigitalIDWalletAPIOneidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountry520enum(\"GBR\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountry520Enum;\nimport me.didit.types.DigitalIdWalletApiOneidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startOneid(DigitalIdWalletApiOneidWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountry520Enum.of(\"GBR\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startOneid([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'GBR',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_oneid(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"GBR\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartOneidAsync(new DigitalIdWalletApiOneidWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountry520Enum(\"GBR\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "oneid"
      }
    },
    "/v3/id-verification/wallets/govuk-wallet/": {
      "post": {
        "operationId": "start_govuk_wallet_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_govuk_wallet",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر GOV.UK Wallet (UK Government Digital Service؛ GBR) بدون أي سير عمل. تتم الفوترة مرة واحدة فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إلحاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى التطبيقات في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة أبداً.",
        "summary": "بدء التحقق عبر GOV.UK Wallet",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGovukWalletWalletVerificationStartRequest"
              },
              "example": {
                "country": "GBR",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGovukWalletWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGovukWalletWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "govuk_wallet",
                      "name": "GOV.UK Wallet",
                      "issuing_authority": "UK Government Digital Service"
                    },
                    "country": "GBR",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/govuk-wallet/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"GBR\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_govuk_wallet(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"GBR\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startGovukWallet({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"GBR\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartGovukWallet(ctx, didit.IDWalletsStartGovukWalletParams{\n\tBody: didit.DigitalIDWalletAPIGovukWalletWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountry520enum(\"GBR\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountry520Enum;\nimport me.didit.types.DigitalIdWalletApiGovukWalletWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startGovukWallet(DigitalIdWalletApiGovukWalletWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountry520Enum.of(\"GBR\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startGovukWallet([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'GBR',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_govuk_wallet(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"GBR\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartGovukWalletAsync(new DigitalIdWalletApiGovukWalletWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountry520Enum(\"GBR\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "govuk_wallet"
      }
    },
    "/v3/id-verification/wallets/smart-id/": {
      "post": {
        "operationId": "start_smart_id_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_smart_id",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Smart-ID (SK ID Solutions؛ EST، LVA، LTU، BEL) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=confirm_in_app مع رمز المقارنة لعرضه على المستخدم؛ ويؤكده المستخدم ثم يدخل رمز PIN الخاص به في التطبيق (لا تجمع رمز PIN مطلقاً). يمكنك إجراء استطلاع عبر POST /v3/id-verification/wallets/verifications/{request_id}/poll/ كل poll_interval_seconds، أو الاعتماد على webhook: تجري Didit استطلاعاً في الخلفية أيضاً. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة مطلقاً.",
        "summary": "بدء التحقق عبر Smart-ID",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiSmartIdWalletVerificationStartRequest"
              },
              "example": {
                "country": "EST",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "personal_code": "00000000000"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiSmartIdWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiSmartIdWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "smart_id",
                      "name": "Smart-ID",
                      "issuing_authority": "SK ID Solutions"
                    },
                    "country": "EST",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "in_app",
                    "simulated": true,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "confirm_in_app",
                      "verification_code": "1234",
                      "poll_interval_seconds": 2
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/smart-id/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"EST\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"personal_code\": \"00000000000\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_smart_id(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"EST\",\n    personal_code=\"00000000000\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startSmartId({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"EST\",\n  personal_code: \"00000000000\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartSmartID(ctx, didit.IDWalletsStartSmartIDParams{\n\tBody: didit.DigitalIDWalletAPISmartIDWalletVerificationStartRequest{\n\t\tVendorData:   didit.String(\"your-customer-reference\"),\n\t\tMetadata:     didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:      didit.DigitalIDWalletAPISmartIDWalletVerificationStartCountryEnum(\"EST\"),\n\t\tPersonalCode: \"00000000000\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiSmartIdWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiSmartIdWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startSmartId(DigitalIdWalletApiSmartIdWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiSmartIdWalletVerificationStartCountryEnum.of(\"EST\"))\n        .personalCode(\"00000000000\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startSmartId([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'EST',\n    'personal_code' => '00000000000',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_smart_id(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"EST\",\n  personal_code: \"00000000000\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartSmartIdAsync(new DigitalIdWalletApiSmartIdWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = \"EST\",\n    PersonalCode = \"00000000000\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "smart_id"
      }
    },
    "/v3/id-verification/wallets/mobile-id/": {
      "post": {
        "operationId": "start_mobile_id_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_mobile_id",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Mobile-ID (SK ID Solutions بالتعاون مع مشغلي شبكات الهاتف المحمول الوطنيين؛ EST، LTU) بدون أي سير عمل. تتم الفوترة مرة واحدة فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=confirm_in_app مع رمز المطابقة لعرضه للمستخدم؛ يؤكد المستخدم الرمز ويُدخل رقم PIN الخاص به في التطبيق (لا تجمع رقم PIN أبداً). أرسل طلبات استطلاع إلى POST /v3/id-verification/wallets/verifications/{request_id}/poll/ كل poll_interval_seconds، أو اعتمد على webhook: حيث تقوم Didit بالاستطلاع في الخلفية أيضاً. تتلقى التطبيقات في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة أبداً.",
        "summary": "بدء التحقق عبر Mobile-ID",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMobileIdWalletVerificationStartRequest"
              },
              "example": {
                "country": "EST",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "personal_code": "00000000000",
                "phone_number": "+37200000000"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMobileIdWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMobileIdWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "mobile_id",
                      "name": "Mobile-ID",
                      "issuing_authority": "SK ID Solutions with the national mobile operators"
                    },
                    "country": "EST",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "in_app",
                    "simulated": true,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "confirm_in_app",
                      "verification_code": "1234",
                      "poll_interval_seconds": 2
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/mobile-id/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"EST\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"personal_code\": \"00000000000\",\n  \"phone_number\": \"+37200000000\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_mobile_id(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"EST\",\n    personal_code=\"00000000000\",\n    phone_number=\"+37200000000\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startMobileId({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"EST\",\n  personal_code: \"00000000000\",\n  phone_number: \"+37200000000\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartMobileID(ctx, didit.IDWalletsStartMobileIDParams{\n\tBody: didit.DigitalIDWalletAPIMobileIDWalletVerificationStartRequest{\n\t\tVendorData:   didit.String(\"your-customer-reference\"),\n\t\tMetadata:     didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:      didit.DigitalIDWalletAPIMobileIDWalletVerificationStartCountryEnum(\"EST\"),\n\t\tPersonalCode: \"00000000000\",\n\t\tPhoneNumber:  \"+37200000000\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiMobileIdWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiMobileIdWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startMobileId(DigitalIdWalletApiMobileIdWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiMobileIdWalletVerificationStartCountryEnum.of(\"EST\"))\n        .personalCode(\"00000000000\")\n        .phoneNumber(\"+37200000000\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startMobileId([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'EST',\n    'personal_code' => '00000000000',\n    'phone_number' => '+37200000000',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_mobile_id(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"EST\",\n  personal_code: \"00000000000\",\n  phone_number: \"+37200000000\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartMobileIdAsync(new DigitalIdWalletApiMobileIdWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = \"EST\",\n    PersonalCode = \"00000000000\",\n    PhoneNumber = \"+37200000000\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "mobile_id"
      }
    },
    "/v3/id-verification/wallets/idcard-ee/": {
      "post": {
        "operationId": "start_idcard_ee_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_idcard_ee",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Estonian ID-card (Police and Border Guard Board (Estonia)؛ EST) بدون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تحمل الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL أبداً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بالمزود أبداً.",
        "summary": "بدء التحقق عبر Estonian ID-card",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiIdcardEeWalletVerificationStartRequest"
              },
              "example": {
                "country": "EST",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiIdcardEeWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiIdcardEeWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "idcard_ee",
                      "name": "Estonian ID-card",
                      "issuing_authority": "Police and Border Guard Board (Estonia)"
                    },
                    "country": "EST",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/idcard-ee/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"EST\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_idcard_ee(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"EST\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startIdcardEe({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"EST\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartIdcardEe(ctx, didit.IDWalletsStartIdcardEeParams{\n\tBody: didit.DigitalIDWalletAPIIdcardEeWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIIdcardEeWalletVerificationStartCountryEnum(\"EST\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiIdcardEeWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiIdcardEeWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startIdcardEe(DigitalIdWalletApiIdcardEeWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiIdcardEeWalletVerificationStartCountryEnum.of(\"EST\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startIdcardEe([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'EST',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_idcard_ee(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"EST\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartIdcardEeAsync(new DigitalIdWalletApiIdcardEeWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiIdcardEeWalletVerificationStartCountryEnum(\"EST\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "idcard_ee"
      }
    },
    "/v3/id-verification/wallets/eparaksts-mobile/": {
      "post": {
        "operationId": "start_eparaksts_mobile_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_eparaksts_mobile",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر eParaksts mobile (LVRTC (Latvian State Radio and Television Centre)؛ LVA) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة مطلقاً.",
        "summary": "بدء التحقق عبر الهاتف المحمول بواسطة eParaksts",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest"
              },
              "example": {
                "country": "LVA",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "eparaksts_mobile",
                      "name": "eParaksts mobile",
                      "issuing_authority": "LVRTC (Latvian State Radio and Television Centre)"
                    },
                    "country": "LVA",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/eparaksts-mobile/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"LVA\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_eparaksts_mobile(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"LVA\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startEparakstsMobile({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"LVA\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartEparakstsMobile(ctx, didit.IDWalletsStartEparakstsMobileParams{\n\tBody: didit.DigitalIDWalletAPIEparakstsMobileWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIEparakstsMobileWalletVerificationStartCountryEnum(\"LVA\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiEparakstsMobileWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startEparakstsMobile(DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiEparakstsMobileWalletVerificationStartCountryEnum.of(\"LVA\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startEparakstsMobile([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'LVA',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_eparaksts_mobile(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"LVA\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartEparakstsMobileAsync(new DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiEparakstsMobileWalletVerificationStartCountryEnum(\"LVA\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "eparaksts_mobile"
      }
    },
    "/v3/id-verification/wallets/bankid-cz/": {
      "post": {
        "operationId": "start_bankid_cz_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_bankid_cz",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Bank iD (Bankovní identita, a.s.؛ CZE) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إلحاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها أبداً من عنوان URL. تتلقى التطبيقات في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة إطلاقاً.",
        "summary": "بدء التحقق عبر Bank iD",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidCzWalletVerificationStartRequest"
              },
              "example": {
                "country": "CZE",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidCzWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiBankidCzWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "bankid_cz",
                      "name": "Bank iD",
                      "issuing_authority": "Bankovní identita, a.s."
                    },
                    "country": "CZE",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/bankid-cz/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"CZE\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_bankid_cz(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"CZE\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startBankidCz({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"CZE\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartBankidCz(ctx, didit.IDWalletsStartBankidCzParams{\n\tBody: didit.DigitalIDWalletAPIBankidCzWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountryE2dEnum(\"CZE\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiBankidCzWalletVerificationStartRequest;\nimport me.didit.types.DigitalIdWalletApiCountryE2dEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startBankidCz(DigitalIdWalletApiBankidCzWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountryE2dEnum.of(\"CZE\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startBankidCz([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'CZE',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_bankid_cz(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"CZE\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartBankidCzAsync(new DigitalIdWalletApiBankidCzWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountryE2dEnum(\"CZE\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "bankid_cz"
      }
    },
    "/v3/id-verification/wallets/mojeid/": {
      "post": {
        "operationId": "start_mojeid_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_mojeid",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر MojeID (CZ.NIC؛ CZE) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى تطبيقات البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة مطلقاً.",
        "summary": "بدء التحقق عبر MojeID",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMojeidWalletVerificationStartRequest"
              },
              "example": {
                "country": "CZE",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMojeidWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiMojeidWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "mojeid",
                      "name": "MojeID",
                      "issuing_authority": "CZ.NIC"
                    },
                    "country": "CZE",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/mojeid/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"CZE\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_mojeid(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"CZE\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startMojeid({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"CZE\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartMojeid(ctx, didit.IDWalletsStartMojeidParams{\n\tBody: didit.DigitalIDWalletAPIMojeidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPICountryE2dEnum(\"CZE\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountryE2dEnum;\nimport me.didit.types.DigitalIdWalletApiMojeidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startMojeid(DigitalIdWalletApiMojeidWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiCountryE2dEnum.of(\"CZE\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startMojeid([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'CZE',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_mojeid(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"CZE\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartMojeidAsync(new DigitalIdWalletApiMojeidWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiCountryE2dEnum(\"CZE\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "mojeid"
      }
    },
    "/v3/id-verification/wallets/diia/": {
      "post": {
        "operationId": "start_diia_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_diia",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Diia (Ministry of Digital Transformation of Ukraine؛ UKR) بدون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تحمل الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL أبداً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بالمزود أبداً.",
        "summary": "بدء التحقق عبر Diia",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiDiiaWalletVerificationStartRequest"
              },
              "example": {
                "country": "UKR",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiDiiaWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiDiiaWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "diia",
                      "name": "Diia",
                      "issuing_authority": "Ministry of Digital Transformation of Ukraine"
                    },
                    "country": "UKR",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/diia/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"UKR\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_diia(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"UKR\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startDiia({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"UKR\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartDiia(ctx, didit.IDWalletsStartDiiaParams{\n\tBody: didit.DigitalIDWalletAPIDiiaWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIDiiaWalletVerificationStartCountryEnum(\"UKR\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiDiiaWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiDiiaWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startDiia(DigitalIdWalletApiDiiaWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiDiiaWalletVerificationStartCountryEnum.of(\"UKR\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startDiia([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'UKR',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_diia(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"UKR\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartDiiaAsync(new DigitalIdWalletApiDiiaWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiDiiaWalletVerificationStartCountryEnum(\"UKR\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "diia"
      }
    },
    "/v3/id-verification/wallets/franceconnect/": {
      "post": {
        "operationId": "start_franceconnect_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_franceconnect",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر FranceConnect (DINUM (الدولة الفرنسية)؛ FRA) بدون أي سير عمل. تتم الفوترة مرة واحدة فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إلحاق request_id و result. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها مطلقاً من عنوان URL. تتلقى التطبيقات في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة أبداً.",
        "summary": "بدء التحقق عبر FranceConnect",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFranceconnectWalletVerificationStartRequest"
              },
              "example": {
                "country": "FRA",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFranceconnectWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiFranceconnectWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "franceconnect",
                      "name": "FranceConnect",
                      "issuing_authority": "DINUM (French state)"
                    },
                    "country": "FRA",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/franceconnect/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"FRA\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_franceconnect(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"FRA\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startFranceconnect({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"FRA\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartFranceconnect(ctx, didit.IDWalletsStartFranceconnectParams{\n\tBody: didit.DigitalIDWalletAPIFranceconnectWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIFranceconnectWalletVerificationStartCountryEnum(\"FRA\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiFranceconnectWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiFranceconnectWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startFranceconnect(DigitalIdWalletApiFranceconnectWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiFranceconnectWalletVerificationStartCountryEnum.of(\"FRA\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startFranceconnect([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'FRA',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_franceconnect(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"FRA\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartFranceconnectAsync(new DigitalIdWalletApiFranceconnectWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiFranceconnectWalletVerificationStartCountryEnum(\"FRA\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "franceconnect"
      }
    },
    "/v3/id-verification/wallets/audkenni/": {
      "post": {
        "operationId": "start_audkenni_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_audkenni",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Auðkenni (Auðkenni (الهوية الإلكترونية الآيسلندية)؛ ISL) دون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إلحاق request_id وresult. يمكنك قراءة النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، ولا تقرأها أبداً من عنوان URL. تتلقى التطبيقات في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة إطلاقاً.",
        "summary": "بدء التحقق عبر Auðkenni",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiAudkenniWalletVerificationStartRequest"
              },
              "example": {
                "country": "ISL",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiAudkenniWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiAudkenniWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "audkenni",
                      "name": "Auðkenni",
                      "issuing_authority": "Auðkenni (Icelandic electronic ID)"
                    },
                    "country": "ISL",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/audkenni/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"ISL\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_audkenni(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"ISL\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startAudkenni({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"ISL\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartAudkenni(ctx, didit.IDWalletsStartAudkenniParams{\n\tBody: didit.DigitalIDWalletAPIAudkenniWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIAudkenniWalletVerificationStartCountryEnum(\"ISL\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiAudkenniWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiAudkenniWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startAudkenni(DigitalIdWalletApiAudkenniWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiAudkenniWalletVerificationStartCountryEnum.of(\"ISL\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startAudkenni([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'ISL',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_audkenni(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"ISL\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartAudkenniAsync(new DigitalIdWalletApiAudkenniWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiAudkenniWalletVerificationStartCountryEnum(\"ISL\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "audkenni"
      }
    },
    "/v3/id-verification/wallets/connectid/": {
      "post": {
        "operationId": "start_connectid_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_connectid",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر ConnectID (Australian Payments Plus؛ AUS) بدون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تحمل الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL أبداً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بالمزود أبداً.",
        "summary": "بدء التحقق عبر ConnectID",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiConnectidWalletVerificationStartRequest"
              },
              "example": {
                "country": "AUS",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiConnectidWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiConnectidWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "connectid",
                      "name": "ConnectID",
                      "issuing_authority": "Australian Payments Plus"
                    },
                    "country": "AUS",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/connectid/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"AUS\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_connectid(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"AUS\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startConnectid({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"AUS\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartConnectid(ctx, didit.IDWalletsStartConnectidParams{\n\tBody: didit.DigitalIDWalletAPIConnectidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.Some(didit.DigitalIDWalletAPIConnectidWalletVerificationStartCountryEnum(\"AUS\")),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiConnectidWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiConnectidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startConnectid(DigitalIdWalletApiConnectidWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiConnectidWalletVerificationStartCountryEnum.of(\"AUS\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startConnectid([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'AUS',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_connectid(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"AUS\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartConnectidAsync(new DigitalIdWalletApiConnectidWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = new DigitalIdWalletApiConnectidWalletVerificationStartCountryEnum(\"AUS\"),\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "connectid"
      }
    },
    "/v3/id-verification/wallets/eudi/": {
      "post": {
        "operationId": "start_eudi_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_eudi",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر EUDI Wallet (الدولة العضو الخاصة بالمستخدم؛ تختلف جهة الإصدار بحسب الدولة؛ AUT, BEL, BGR, HRV, CYP, CZE, DNK, EST, FIN, FRA, DEU, GRC, HUN, IRL, ITA, LVA, LTU, LUX, MLT, NLD, POL, PRT, ROU, SVK, SVN, ESP, SWE, ISL, LIE, NOR) بدون أي سير عمل. تتم الفوترة مرة واحدة، فقط عند التحقق من الهوية. تحمل الاستجابة next_action.type=redirect مع عنوان URL لتوجيه متصفح المستخدم إليه؛ ويعود المستخدم إلى return_url مع إرفاق request_id وresult. اقرأ النتيجة عبر GET /v3/id-verification/wallets/verifications/{request_id}/ أو من webhook، وليس من عنوان URL أبداً. تحصل تطبيقات البيئة التجريبية على محاكاة حتمية (simulated: true) لا تتصل بالمزود أبداً.",
        "summary": "بدء التحقق عبر EUDI Wallet",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiEudiWalletVerificationStartRequest"
              },
              "example": {
                "country": "AUT",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "return_url": "https://app.example.com/identity/complete"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiEudiWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiEudiWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "eudi",
                      "name": "EUDI Wallet",
                      "issuing_authority": "The user's own member state; the issuer differs per country"
                    },
                    "country": "AUT",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "redirect",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "redirect",
                      "url": "https://wallet.example.com/authorize"
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/eudi/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"AUT\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"return_url\": \"https://app.example.com/identity/complete\"\n}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_eudi(\n    vendor_data=\"your-customer-reference\",\n    metadata={\"reference\": \"example\"},\n    country=\"AUT\",\n    return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startEudi({\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"AUT\",\n  return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartEudi(ctx, didit.IDWalletsStartEudiParams{\n\tBody: didit.DigitalIDWalletAPIEudiWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata:   didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry:    didit.DigitalIDWalletAPIEudiWalletVerificationStartCountryEnum(\"AUT\"),\n\t\tReturnURL:  \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiEudiWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiEudiWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startEudi(DigitalIdWalletApiEudiWalletVerificationStartRequest.builder()\n        .vendorData(\"your-customer-reference\")\n        .metadata(Map.of(\"reference\", \"example\"))\n        .country(DigitalIdWalletApiEudiWalletVerificationStartCountryEnum.of(\"AUT\"))\n        .returnUrl(\"https://app.example.com/identity/complete\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->idWallets->startEudi([\n    'vendor_data' => 'your-customer-reference',\n    'metadata' => ['reference' => 'example'],\n    'country' => 'AUT',\n    'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_eudi(\n  vendor_data: \"your-customer-reference\",\n  metadata: { reference: \"example\" },\n  country: \"AUT\",\n  return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartEudiAsync(new DigitalIdWalletApiEudiWalletVerificationStartRequest\n{\n    VendorData = \"your-customer-reference\",\n    Metadata = new Dictionary<string, object> { [\"reference\"] = \"example\" },\n    Country = \"AUT\",\n    ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-wallet-id": "eudi"
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/teams/": {
      "get": {
        "summary": "عرض فرق المراجعة",
        "description": "يتطلب `list:cases` للتطبيق المطلوب.",
        "operationId": "list_case_teams",
        "x-didit-sdk": {
          "resource": "cases.teams",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CaseReviewTeam"
                      }
                    },
                    "count": {
                      "type": "integer",
                      "description": "عدد التطابقات، بحد أقصى 100. اتبع next للمتابعة بعد الحد الأقصى."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.teams.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.teams.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Teams.ListAutoPaging(ctx, didit.CasesTeamsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().teams().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->teams->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.teams.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Teams.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "summary": "إنشاء فريق مراجعة",
        "description": "يتطلب `write:cases` للتطبيق المطلوب.",
        "operationId": "create_case_teams",
        "x-didit-sdk": {
          "resource": "cases.teams",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "responses": {
          "201": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseReviewTeam"
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseReviewTeamCreate"
              },
              "example": {
                "name": "AML analysts",
                "members": [
                  {
                    "user_id": "9a000000-0000-4000-8000-0000000000aa",
                    "capacity": 10
                  }
                ]
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.teams.create(\n    name=\"AML analysts\",\n    members=[{\n        \"user_id\": \"9a000000-0000-4000-8000-0000000000aa\",\n        \"capacity\": 10,\n    }],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.teams.create({\n  name: \"AML analysts\",\n  members: [{\n    user_id: \"9a000000-0000-4000-8000-0000000000aa\",\n    capacity: 10,\n  }],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Teams.Create(ctx, didit.CaseReviewTeamCreate{\n\tName: \"AML analysts\",\n\tMembers: []didit.CaseReviewTeamMemberParam{{\n\t\tUserID:   \"9a000000-0000-4000-8000-0000000000aa\",\n\t\tCapacity: didit.Int(10),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CaseReviewTeamCreate;\nimport me.didit.types.CaseReviewTeamMember;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().teams().create(CaseReviewTeamCreate.builder()\n        .name(\"AML analysts\")\n        .members(List.of(CaseReviewTeamMember.builder()\n                .userId(\"9a000000-0000-4000-8000-0000000000aa\")\n                .capacity(10L)\n                .build()))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->teams->create([\n    'name' => 'AML analysts',\n    'members' => [[\n        'user_id' => '9a000000-0000-4000-8000-0000000000aa',\n        'capacity' => 10,\n    ]],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.teams.create(\n  name: \"AML analysts\",\n  members: [{\n    user_id: \"9a000000-0000-4000-8000-0000000000aa\",\n    capacity: 10,\n  }]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Teams.CreateAsync(new CaseReviewTeamCreate\n{\n    Name = \"AML analysts\",\n    Members = new CaseReviewTeamMember[]\n    {\n        new()\n        {\n            UserId = \"9a000000-0000-4000-8000-0000000000aa\",\n            Capacity = 10,\n        },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/fraud/checks/{check_id}/": {
      "get": {
        "operationId": "root_retrieve",
        "x-didit-sdk": {
          "resource": "fraud_checks",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "description": "جلب فحص تم إنشاؤه مسبقًا عبر `check_id` الخاص به.",
        "summary": "استرجاع فحص احتيال",
        "parameters": [
          {
            "in": "path",
            "name": "check_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudCheckResponse"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudClientCredentialsErrorMessage"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudClientCredentialsForbiddenErrorMessage"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "Fraud Check"
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.fraud_checks.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.fraudChecks.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FraudChecks.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.fraudChecks().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->fraudChecks->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.fraud_checks.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FraudChecks.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/": {
      "get": {
        "operationId": "organization_application_cases_requests_list",
        "x-didit-sdk": {
          "resource": "cases.requests",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "أي حقل يُستخدم عند ترتيب النتائج.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "عدد النتائج المراد إرجاعها لكل صفحة.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "الفهرس الأولي الذي يبدأ منه إرجاع النتائج.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMessagingPaginatedCaseRequestList"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.requests.list(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.requests.list(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Requests.ListAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesRequestsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().requests().list(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->requests->list('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.requests.list(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Requests.ListAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "operationId": "organization_application_cases_requests_create",
        "x-didit-sdk": {
          "resource": "cases.requests",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMessagingCaseRequestConfirmRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMessagingCaseRequestConfirmRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMessagingCaseRequestConfirmRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          },
          "400": {
            "description": "مدخلات غير صالحة، أو غرض غير مدعوم، أو جهة اتصال موثقة غير متاحة، أو استجابة غير قابلة للتعديل موجودة بالفعل."
          },
          "409": {
            "description": "تغيرت المعاينة أو انتهت صلاحيتها. قم بالمعاينة مجدداً قبل التأكيد."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMessagingCaseRequest"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "تأكيد المعاينة الموقعة بدقة في غضون 15 دقيقة. لا يُقبل سوى القوالب الثابتة وجهة اتصال تم التحقق منها عبر OTP تخص صاحب الحالة. يجعل معرّف الطلب عمليات إعادة المحاولة ذات idempotency. تتم جدولة التسليم في قائمة الانتظار؛ وتُعد SENT وSIMULATED وUNKNOWN نتائج مميزة. يؤدي الطلب القابل للتنفيذ إلى تعيين الحالة إلى Awaiting user. يترك تحديث المراجعة حالتها دون تغيير.",
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.create(\n    \"11111111-2222-3333-4444-555555555555\",\n    contact_id=\"11111111-2222-3333-4444-555555555555\",\n    purpose=\"identity_document\",\n    request_id=\"11111111-2222-3333-4444-555555555555\",\n    expires_at=\"2026-01-15T10:00:00Z\",\n    preview_token=\"your-preview-token\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.create(\"11111111-2222-3333-4444-555555555555\", {\n  contact_id: \"11111111-2222-3333-4444-555555555555\",\n  purpose: \"identity_document\",\n  request_id: \"11111111-2222-3333-4444-555555555555\",\n  expires_at: \"2026-01-15T10:00:00Z\",\n  preview_token: \"your-preview-token\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CustomerMessagingCaseRequestConfirmRequest{\n\tContactID:    \"11111111-2222-3333-4444-555555555555\",\n\tPurpose:      didit.CustomerMessagingPurposeEnum(\"identity_document\"),\n\tRequestID:    \"11111111-2222-3333-4444-555555555555\",\n\tExpiresAt:    time.Date(2026, 1, 15, 10, 0, 0, 0, time.UTC),\n\tPreviewToken: \"your-preview-token\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.OffsetDateTime;\nimport me.didit.Didit;\nimport me.didit.types.CustomerMessagingCaseRequestConfirmRequest;\nimport me.didit.types.CustomerMessagingPurposeEnum;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().create(\"11111111-2222-3333-4444-555555555555\", CustomerMessagingCaseRequestConfirmRequest.builder()\n        .contactId(\"11111111-2222-3333-4444-555555555555\")\n        .purpose(CustomerMessagingPurposeEnum.of(\"identity_document\"))\n        .requestId(\"11111111-2222-3333-4444-555555555555\")\n        .expiresAt(OffsetDateTime.parse(\"2026-01-15T10:00:00Z\"))\n        .previewToken(\"your-preview-token\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->requests->create('11111111-2222-3333-4444-555555555555', [\n    'contact_id' => '11111111-2222-3333-4444-555555555555',\n    'purpose' => 'identity_document',\n    'request_id' => '11111111-2222-3333-4444-555555555555',\n    'expires_at' => '2026-01-15T10:00:00Z',\n    'preview_token' => 'your-preview-token',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.create(\n  \"11111111-2222-3333-4444-555555555555\",\n  contact_id: \"11111111-2222-3333-4444-555555555555\",\n  purpose: \"identity_document\",\n  request_id: \"11111111-2222-3333-4444-555555555555\",\n  expires_at: \"2026-01-15T10:00:00Z\",\n  preview_token: \"your-preview-token\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.CreateAsync(\"11111111-2222-3333-4444-555555555555\", new CustomerMessagingCaseRequestConfirmRequest\n{\n    ContactId = \"11111111-2222-3333-4444-555555555555\",\n    Purpose = \"identity_document\",\n    RequestId = \"11111111-2222-3333-4444-555555555555\",\n    ExpiresAt = DateTimeOffset.Parse(\"2026-01-15T10:00:00Z\"),\n    PreviewToken = \"your-preview-token\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/fraud/checks/": {
      "post": {
        "operationId": "create_fraud_check",
        "x-didit-sdk": {
          "resource": "fraud_checks",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "description": "إرسال معرّف أو أكثر محدد النوع وتلقي تطبيع البيانات، وإثراء حديث، وتحقق رسمي موثوق حيثما تكون الدولة ونوع المعرّف مشمولين، وأبعاد مخاطر مستقلة وتوصية في استجابة واحدة.\n\nتدعم هذه الملفات التعريفية عمليات التحقق من المعرّفات. يتطلب ربط الهوية المستند إلى صورة سيلفي (`biometric_identity`) إصدار الملف التعريفي `2026-09-14.2` ورقم CPF برازيلي؛ ويتم تشغيله فقط بموافقة المستخدم وعندما تكون مؤسستك مخولة بذلك. تُبلغ الإصدارات السابقة عنه كـ `not_available_in_profile_version`. يتم الإبلاغ عن الوحدات التي لا يمكن تشغيلها كـ skipped (تم تخطيها) مع سبب حتمي؛ ولا يتم أبداً الإبلاغ عن مصدر تعذر عليه الرد كعدم تطابق في الهوية.",
        "summary": "إجراء فحص احتيال",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/FraudCheckRequestRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudCheckRequestRequest"
              },
              "example": {
                "client_reference": "review-attempt-001",
                "subject": {
                  "identifiers": [
                    {
                      "type": "email",
                      "value": "applicant@example.com"
                    }
                  ],
                  "attributes": {
                    "first_name": "Alex",
                    "last_name": "Example"
                  }
                },
                "checks": {
                  "include": [
                    "networks_same_org",
                    "networks_cross_org",
                    "email_risk"
                  ]
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/FraudCheckRequestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudCheckResponse"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudClientCredentialsErrorMessage"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudClientCredentialsForbiddenErrorMessage"
                }
              }
            },
            "description": ""
          },
          "409": {
            "description": "تعارض، يُرجع دون احتساب رسوم: تم استخدام `client_reference` بالفعل مع نص طلب مختلف؛ أو أن هناك فحصاً يحمل نفس `client_reference` لا يزال قيد التشغيل (أعد المحاولة بعد ثوانٍ محددة في `Retry-After` باستخدام نفس المرجع)؛ أو تم حذف عملية التحقق التي يسجل فيها هذا الفحص قبل اكتماله.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "different_body": {
                    "summary": "تمت إعادة استخدام المرجع مع نص طلب مختلف",
                    "value": {
                      "error": "client_reference has already been used with a different request body."
                    }
                  },
                  "still_running": {
                    "summary": "عملية فحص بهذا المرجع لا تزال قيد التشغيل",
                    "value": {
                      "error": "A check with this client_reference is already running. Retry with the same reference later."
                    }
                  },
                  "verification_deleted": {
                    "summary": "تم حذف عملية التحقق قبل اكتمال الفحص",
                    "value": {
                      "error": "This verification was deleted before the check completed."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني التي يجب انتظارها قبل إعادة المحاولة، ويتم إرسالها عندما يكون فحص يحمل نفس `client_reference` لا يزال قيد التشغيل.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "Fraud Check"
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.fraud_checks.create(\n    client_reference=\"review-attempt-001\",\n    subject={\n        \"identifiers\": [{\n            \"type\": \"email\",\n            \"value\": \"applicant@example.com\",\n        }],\n        \"attributes\": {\n            \"first_name\": \"Alex\",\n            \"last_name\": \"Example\",\n        },\n    },\n    checks={\n        \"include\": [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.fraudChecks.create({\n  client_reference: \"review-attempt-001\",\n  subject: {\n    identifiers: [{\n      type: \"email\",\n      value: \"applicant@example.com\",\n    }],\n    attributes: {\n      first_name: \"Alex\",\n      last_name: \"Example\",\n    },\n  },\n  checks: {\n    include: [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FraudChecks.Create(ctx, didit.FraudCheckRequestRequest{\n\tClientReference: didit.String(\"review-attempt-001\"),\n\tSubject: didit.FraudCheckSubjectRequest{\n\t\tIdentifiers: []didit.FraudCheckIdentifierRequest{{\n\t\t\tType:  didit.FraudTypeEnum(\"email\"),\n\t\t\tValue: \"applicant@example.com\",\n\t\t}},\n\t\tAttributes: didit.Some(didit.FraudCheckAttributesRequest{\n\t\t\tFirstName: didit.String(\"Alex\"),\n\t\t\tLastName:  didit.String(\"Example\"),\n\t\t}),\n\t},\n\tChecks: didit.Some(didit.FraudCheckModuleSelectionRequest{\n\t\tInclude: didit.Some([]didit.FraudExcludeEnum{didit.FraudExcludeEnum(\"networks_same_org\"), didit.FraudExcludeEnum(\"networks_cross_org\"), didit.FraudExcludeEnum(\"email_risk\")}),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.FraudCheckAttributesRequest;\nimport me.didit.types.FraudCheckIdentifierRequest;\nimport me.didit.types.FraudCheckModuleSelectionRequest;\nimport me.didit.types.FraudCheckRequestRequest;\nimport me.didit.types.FraudCheckSubjectRequest;\nimport me.didit.types.FraudExcludeEnum;\nimport me.didit.types.FraudTypeEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.fraudChecks().create(FraudCheckRequestRequest.builder()\n        .clientReference(\"review-attempt-001\")\n        .subject(FraudCheckSubjectRequest.builder()\n                .identifiers(List.of(FraudCheckIdentifierRequest.builder()\n                        .type(FraudTypeEnum.of(\"email\"))\n                        .value(\"applicant@example.com\")\n                        .build()))\n                .attributes(FraudCheckAttributesRequest.builder()\n                        .firstName(\"Alex\")\n                        .lastName(\"Example\")\n                        .build())\n                .build())\n        .checks(FraudCheckModuleSelectionRequest.builder()\n                .include(List.of(FraudExcludeEnum.of(\"networks_same_org\"), FraudExcludeEnum.of(\"networks_cross_org\"), FraudExcludeEnum.of(\"email_risk\")))\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->fraudChecks->create([\n    'client_reference' => 'review-attempt-001',\n    'subject' => [\n        'identifiers' => [[\n            'type' => 'email',\n            'value' => 'applicant@example.com',\n        ]],\n        'attributes' => [\n            'first_name' => 'Alex',\n            'last_name' => 'Example',\n        ],\n    ],\n    'checks' => [\n        'include' => ['networks_same_org', 'networks_cross_org', 'email_risk'],\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.fraud_checks.create(\n  client_reference: \"review-attempt-001\",\n  subject: {\n    identifiers: [{\n      type: \"email\",\n      value: \"applicant@example.com\",\n    }],\n    attributes: {\n      first_name: \"Alex\",\n      last_name: \"Example\",\n    },\n  },\n  checks: {\n    include: [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FraudChecks.CreateAsync(new FraudCheckRequestRequest\n{\n    ClientReference = \"review-attempt-001\",\n    Subject = new()\n    {\n        Identifiers = new FraudCheckIdentifierRequest[]\n        {\n            new()\n            {\n                Type = \"email\",\n                Value = \"applicant@example.com\",\n            },\n        },\n        Attributes = new FraudCheckAttributesRequest\n        {\n            FirstName = \"Alex\",\n            LastName = \"Example\",\n        },\n    },\n    Checks = new FraudCheckModuleSelectionRequest\n    {\n        Include = new FraudExcludeEnum[] { \"networks_same_org\", \"networks_cross_org\", \"email_risk\" },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/cancel/": {
      "post": {
        "operationId": "organization_application_cases_requests_cancel_create",
        "x-didit-sdk": {
          "resource": "cases.requests",
          "method": "cancel",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "request_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMessagingCaseRequest"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          },
          "400": {
            "description": "مدخلات غير صالحة، أو غرض غير مدعوم، أو جهة اتصال موثقة غير متاحة، أو استجابة غير قابلة للتعديل موجودة بالفعل."
          },
          "409": {
            "description": "تغيرت المعاينة أو انتهت صلاحيتها. قم بالمعاينة مجدداً قبل التأكيد."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.cancel(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.cancel(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.Cancel(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().cancel(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->requests->cancel('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.cancel(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.CancelAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/options/": {
      "get": {
        "operationId": "organization_application_cases_requests_options_retrieve",
        "x-didit-sdk": {
          "resource": "cases.requests",
          "method": "retrieve_options",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMessagingCaseRequestOptions"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.retrieve_options(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.retrieveOptions(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.RetrieveOptions(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().retrieveOptions(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->requests->retrieveOptions('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.retrieve_options(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.RetrieveOptionsAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/attachment/": {
      "get": {
        "operationId": "organization_application_cases_requests_attachment_retrieve",
        "x-didit-sdk": {
          "resource": "cases.requests",
          "method": "retrieve_attachment",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "request_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\ncontent = client.cases.requests.retrieve_attachment(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.png\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst content = await didit.cases.requests.retrieveAttachment(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n);\nawait writeFile(\"download.png\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresp, err := client.Cases.Requests.RetrieveAttachment(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.png\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().requests().retrieveAttachment(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\n        .writeTo(Path.of(\"download.png\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$content = $didit->cases->requests->retrieveAttachment('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.png');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ncontent = didit.cases.requests.retrieve_attachment(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\"\n)\nFile.binwrite(\"download.png\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar content = await client.Cases.Requests.RetrieveAttachmentAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.png\");"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/history/": {
      "get": {
        "operationId": "list_case_routing_rule_history",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "list_history",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "record_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "أي حقل يُستخدم عند ترتيب النتائج.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "عدد النتائج المراد إرجاعها لكل صفحة.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "الفهرس الأولي الذي يبدأ منه إرجاع النتائج.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Case Assignment"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingPublicationPaginatedPolicyRevisionList"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "يلزم توفر إذن الوصول إلى الحالة."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.routing_rules.list_history(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.routingRules.listHistory(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.RoutingRules.ListHistoryAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesRoutingRulesListHistoryParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().routingRules().listHistory(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->routingRules->listHistory('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.routing_rules.list_history(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.RoutingRules.ListHistoryAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/resubmission-preview/": {
      "post": {
        "summary": "معاينة بريد إلكتروني لإعادة الإرسال",
        "description": "توليد معاينة للبريد الإلكتروني الذي سيرافق إعادة تقديم KYC أو KYB دون تغيير الجلسة، أو إعادة تعيين الفحوصات، أو تمديد تاريخ انتهائها، أو تشغيل الفحوصات، أو إرسال البريد. يتطلب صلاحية `write:sessions` (يحتاج مفتاح API المحدود الصلاحيات إلى إذن كتابة للقرارات) وجلسة بحالة `Approved` أو `Declined` أو `In Review` أو `Kyc Expired` أو `Abandoned`. يتحقق الخادم من خطوات سير العمل المحددة ويقوم بتوليد قالبه المترجم الثابت مع المرسل الموثّق والعلامة التجارية للعلامة البيضاء المنطبقتين. لا يمكن للطلب تعيين موضوع، أو نص رسالة، أو رابط إجراء.\n\nالحقل `email_address` اختياري. في حال عدم تقديمه، يُرسل البريد الإلكتروني إلى العنوان الخاص بالشخص: العنوان الذي تم التحقق منه في خطوة التحقق من البريد الإلكتروني ضمن سير العمل، أو العنوان المقدم في `contact_details` عند إنشاء الجلسة. العنوان الذي تمرره تكون له الأولوية (`recipient_source: request`). عندما لا يكون هناك عنوان معروف ولا تقوم بتمرير أي عنوان، تكون قيمتا `recipient` و `preview_token` سلسلتين فارغتين ولا يمكن إرسال أي بريد إلكتروني.\n\nتتضمن الاستجابة المستلم ومصدره، والمرسل، والموضوع، وHTML، واللغة، والخطوات التي تم حلها، وما إذا كان التأكيد سيؤدي إلى إرسال البريد الإلكتروني (`will_be_sent`، و `not_sent_reason`)، و `preview_token` موقّعاً. تكون قيمة `requires_user_action` هي `false` عندما تعمل كل خطوة محددة دون تدخل الشخص: حيث تنتهي إعادة التقديم حينها تلقائياً ولا يتم إرسال أي بريد إلكتروني (`not_sent_reason: no_user_action`).\n\nلا تحجز هذه المعاينة حالة الجلسة ولا تأذن بالتسليم. بعد مراجعتها، قم باستدعاء [Update Session Status](/ar/sessions-api/update-status) مع تعيين `new_status: Resubmitted`، والقيم نفسها لكل من `nodes_to_resubmit` و `email_language` التي تمت معاينتها، و `send_email: true`، وتعيين `email_address` إلى قيمة `recipient`، و `email_preview_token` إلى قيمة `preview_token`. تنتهي صلاحية الإيصال بعد 15 دقيقة. عند تقديم إيصال، تُرجع المدخلات المتغيرة أو محتوى الرسالة أو المرسل أو حالة الجلسة الرمز `409` قبل أي تعديل أو إرسال. يجوز للتكاملات الحالية حذف الإيصال. أعد توليد المعاينة بعد حدوث أي تعارض. تعامل مع الاستجابة على أنها محتوى تحقق حساس؛ تستخدم الاستجابات رأس `Cache-Control: no-store`. قم بعرض HTML في إطار معزول، ولا تعرضه مطلقاً مباشرةً في DOM الخاص بتطبيقك.",
        "operationId": "post_v3_session_resubmission_preview",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "preview_resubmission",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق المطلوب تحديثها. يقبل معرّفات جلسات المستخدمين (KYC) والشركات (KYB) — يطابق الخادم المعرّف عبر كلا نوعي الجلسات.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nodes_to_resubmit": {
                    "type": "array",
                    "description": "خطوات للمعاينة، باستخدام نفس التحقق والاختيار وترتيب سير العمل مثل إعادة الإرسال. يمكن تخطيها للتحديد التلقائي للمحاولات المسجلة التي تحتاج إلى إعادة إرسال.",
                    "items": {
                      "type": "object",
                      "required": [
                        "node_id",
                        "feature"
                      ],
                      "properties": {
                        "node_id": {
                          "type": "string",
                          "description": "معرّف العقدة كما يظهر في تعريف سير عمل الجلسة (على سبيل المثال `feature_ocr`، `feature_liveness`).",
                          "example": "feature_ocr"
                        },
                        "feature": {
                          "type": "string",
                          "description": "نوع الميزة للعقدة. يتم توحيد الأسماء المستعارة `ID_VERIFICATION` و`POA` و`PHONE` و`EMAIL` من جانب الخادم إلى `OCR` و`PROOF_OF_ADDRESS` و`PHONE_VERIFICATION` و`EMAIL_VERIFICATION`. تجتاز `KYB_REGISTRY` و`KYB_KEY_PEOPLE` و`KYB` التحقق من صحة المخطط ولكن يتم رفضها دائمًا مع قاعدة العمل `400` الموضحة في الأمثلة.",
                          "enum": [
                            "OCR",
                            "OCR_BACK",
                            "NFC",
                            "AML",
                            "FACE",
                            "LIVENESS",
                            "FACE_MATCH",
                            "IP_ANALYSIS",
                            "AGE_ESTIMATION",
                            "PROOF_OF_ADDRESS",
                            "PHONE_VERIFICATION",
                            "EMAIL_VERIFICATION",
                            "FACE_SEARCH",
                            "DATABASE_VALIDATION",
                            "QUESTIONNAIRE",
                            "DOCUMENT_AI",
                            "KYB_DOCUMENTS",
                            "ID_VERIFICATION",
                            "POA",
                            "PHONE",
                            "EMAIL",
                            "KYB_REGISTRY",
                            "KYB_KEY_PEOPLE",
                            "KYB",
                            "GEOLOCATION"
                          ],
                          "example": "OCR"
                        }
                      }
                    }
                  },
                  "email_address": {
                    "type": "string",
                    "format": "email",
                    "description": "اختياري. إرسال البريد الإلكتروني إلى هذا العنوان بدلاً من العنوان الخاص بالشخص. بدونه، يكون المستلم هو العنوان الذي تحقق منه الشخص في سير العمل، وإلا فالعنوان المقدم في `contact_details`. لا يتم إرسال أي بريد إلكتروني بواسطة هذا الاستدعاء.",
                    "example": "user@example.com"
                  },
                  "email_language": {
                    "type": "string",
                    "description": "لغة البريد الإلكتروني للإشعار. يقبل أي سلسلة نصية على مستوى المخطط؛ تعود الرموز غير المدعومة تلقائياً وبصمت إلى اللغة الإنجليزية (`en`).",
                    "default": "en",
                    "example": "en"
                  }
                }
              },
              "examples": {
                "Person's Own Address": {
                  "summary": "معاينة إعادة إرسال إثبات العنوان لعنوان الشخص نفسه",
                  "value": {
                    "nodes_to_resubmit": [
                      {
                        "node_id": "feature_poa_1",
                        "feature": "POA"
                      }
                    ],
                    "email_language": "en"
                  }
                },
                "Named Recipient": {
                  "summary": "معاينة البريد الإلكتروني لعنوان تحدده",
                  "value": {
                    "nodes_to_resubmit": [
                      {
                        "node_id": "feature_ocr",
                        "feature": "OCR"
                      }
                    ],
                    "email_address": "person@example.com",
                    "email_language": "en"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "معاينة فقط. تظل الجلسة دون تغيير ولا يتم إرسال أي بريد إلكتروني.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "recipient",
                    "recipient_source",
                    "sender",
                    "sender_name",
                    "sender_email",
                    "sender_kind",
                    "subject",
                    "html",
                    "text",
                    "language",
                    "will_be_sent",
                    "not_sent_reason",
                    "preview_token",
                    "nodes_to_resubmit",
                    "requires_user_action"
                  ],
                  "properties": {
                    "recipient": {
                      "type": "string",
                      "description": "العنوان الذي يُرسل إليه البريد الإلكتروني. سلسلة فارغة عند عدم معرفة أي عنوان للشخص: وعندئذٍ لا يمكن إرسال بريد إلكتروني ويكون `preview_token` فارغاً أيضاً. مرّره كـ `email_address` عند التأكيد.",
                      "example": "person@example.com"
                    },
                    "recipient_source": {
                      "type": "string",
                      "enum": [
                        "email_verification",
                        "contact_details",
                        "request",
                        ""
                      ],
                      "description": "مصدر `recipient`. القيمة `request`: هو `email_address` الذي مرّرته. القيمة `email_verification`: العنوان الذي تحقق منه الشخص في خطوة التحقق من البريد الإلكتروني في سير العمل. القيمة `contact_details`: العنوان المقدَّم في `contact_details` عند إنشاء الجلسة. سلسلة نصية فارغة في حال عدم وجود عنوان.",
                      "example": "email_verification"
                    },
                    "sender": {
                      "type": "string",
                      "description": "رأس `From` الذي يرسل به البريد الإلكتروني.",
                      "example": "Example App <no-reply@mail.example.com>"
                    },
                    "sender_name": {
                      "type": "string",
                      "description": "جزء الاسم المعروض من `sender`.",
                      "example": "Example App"
                    },
                    "sender_email": {
                      "type": "string",
                      "format": "email",
                      "description": "جزء العنوان من `sender`.",
                      "example": "no-reply@mail.example.com"
                    },
                    "sender_kind": {
                      "type": "string",
                      "enum": [
                        "customer",
                        "didit"
                      ],
                      "description": "`customer`: يخرج البريد الإلكتروني من نطاق الإرسال المعتمد لتطبيقك (العلامة البيضاء). `didit`: يخرج من مُرسِل Didit نفسه.",
                      "example": "customer"
                    },
                    "subject": {
                      "type": "string",
                      "description": "سطر الموضوع تماماً كما تم إرساله.",
                      "example": "Action Required: Complete your verification in Example App"
                    },
                    "html": {
                      "type": "string",
                      "description": "كود HTML الخاص بالبريد الإلكتروني تماماً كما يُرسل، مع تضمين شعاره كـ data URL. اعرضه داخل إطار معزول، وتجنب تماماً عرضه مباشرة في DOM الخاص بتطبيقك.",
                      "example": "<!DOCTYPE html><html><body>...</body></html>"
                    },
                    "text": {
                      "type": "string",
                      "description": "كلمات البريد الإلكتروني كنص عادي، كما يحتفظ بها تسلسل رسائل الشخص، للحصول على معاينة موجزة (يظل كود HTML هو البريد الإلكتروني الفعلي الذي يستلمه الشخص).",
                      "example": "Almost there\n\nSome steps need to be completed again.\nHere’s what to fix:\n\nhttps://verify.didit.me/session/abc123"
                    },
                    "language": {
                      "type": "string",
                      "description": "اللغة المكتوب بها البريد الإلكتروني. تكون الإنجليزية (`en`) عندما لا تتوفر `email_language` التي طلبتها.",
                      "example": "en"
                    },
                    "will_be_sent": {
                      "type": "boolean",
                      "description": "ما إذا كان تأكيد التغيير باستخدام `send_email: true` يرسل هذا البريد الإلكتروني. `false` عندما يكون `not_sent_reason` معيناً.",
                      "example": true
                    },
                    "not_sent_reason": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "no_user_action",
                        "no_recipient",
                        "sandbox",
                        null
                      ],
                      "description": "سبب عدم إرسال أي بريد إلكتروني عند التأكيد، أو `null` عند إرساله. `no_user_action`: يتم تنفيذ كل خطوة محددة دون الحاجة إلى تدخل الشخص، لذا تكتمل إعادة التقديم تلقائياً ولا يتم إرسال أي بريد إلكتروني. `no_recipient`: لا يوجد عنوان معروف للشخص ولم تقم بتمرير أي عنوان. `sandbox`: جلسة بيئة تجريبية لم يشترك مستلمها في تسليم رسائل البريد الإلكتروني للبيئة التجريبية، لذا فإن الإرسال يتم بشكل محاكاة فقط.",
                      "example": null
                    },
                    "nodes_to_resubmit": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "node_id",
                          "feature"
                        ],
                        "properties": {
                          "node_id": {
                            "type": "string",
                            "description": "معرّف العقدة كما يظهر في تعريف سير عمل الجلسة (على سبيل المثال `feature_ocr`، `feature_liveness`).",
                            "example": "feature_ocr"
                          },
                          "feature": {
                            "type": "string",
                            "description": "نوع الميزة للعقدة. يتم توحيد الأسماء المستعارة `ID_VERIFICATION` و`POA` و`PHONE` و`EMAIL` من جانب الخادم إلى `OCR` و`PROOF_OF_ADDRESS` و`PHONE_VERIFICATION` و`EMAIL_VERIFICATION`. تجتاز `KYB_REGISTRY` و`KYB_KEY_PEOPLE` و`KYB` التحقق من صحة المخطط ولكن يتم رفضها دائمًا مع قاعدة العمل `400` الموضحة في الأمثلة.",
                            "enum": [
                              "OCR",
                              "OCR_BACK",
                              "NFC",
                              "AML",
                              "FACE",
                              "LIVENESS",
                              "FACE_MATCH",
                              "IP_ANALYSIS",
                              "AGE_ESTIMATION",
                              "PROOF_OF_ADDRESS",
                              "PHONE_VERIFICATION",
                              "EMAIL_VERIFICATION",
                              "FACE_SEARCH",
                              "DATABASE_VALIDATION",
                              "QUESTIONNAIRE",
                              "DOCUMENT_AI",
                              "KYB_DOCUMENTS",
                              "ID_VERIFICATION",
                              "POA",
                              "PHONE",
                              "EMAIL",
                              "KYB_REGISTRY",
                              "KYB_KEY_PEOPLE",
                              "KYB",
                              "GEOLOCATION"
                            ],
                            "example": "OCR"
                          }
                        }
                      }
                    },
                    "requires_user_action": {
                      "type": "boolean",
                      "description": "ما إذا كان فحص واحد محدد على الأقل يتطلب تفاعلاً من المستخدم. هذا لا يتنبأ بالنتيجة النهائية لسير العمل."
                    },
                    "preview_token": {
                      "type": "string",
                      "description": "إيصال موقّع لرسالة البريد الإلكتروني هذه تحديداً، صالح لمدة 15 دقيقة. مرّره كـ `email_preview_token` إلى [تحديث حالة الجلسة](/ar/sessions-api/update-status). سلسلة فارغة في حال عدم وجود مستلم.",
                      "example": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
                    }
                  }
                },
                "examples": {
                  "Will Be Sent": {
                    "summary": "المستلم الافتراضي: العنوان الذي تم التحقق منه في المسار",
                    "value": {
                      "recipient": "person@example.com",
                      "recipient_source": "email_verification",
                      "sender": "Example App <no-reply@mail.example.com>",
                      "sender_name": "Example App",
                      "sender_email": "no-reply@mail.example.com",
                      "sender_kind": "customer",
                      "subject": "Action Required: Complete your verification in Example App",
                      "html": "<!DOCTYPE html><html><body>...</body></html>",
                      "language": "en",
                      "will_be_sent": true,
                      "not_sent_reason": null,
                      "nodes_to_resubmit": [
                        {
                          "node_id": "feature_poa_1",
                          "feature": "PROOF_OF_ADDRESS"
                        }
                      ],
                      "requires_user_action": true,
                      "preview_token": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
                    }
                  },
                  "No User Action": {
                    "summary": "تم تحديد خطوات الواجهة الخلفية فقط، لذا لن يتم إرسال أي بريد إلكتروني",
                    "value": {
                      "recipient": "person@example.com",
                      "recipient_source": "contact_details",
                      "sender": "Example App <no-reply@mail.example.com>",
                      "sender_name": "Example App",
                      "sender_email": "no-reply@mail.example.com",
                      "sender_kind": "customer",
                      "subject": "Action Required: Complete your verification in Example App",
                      "html": "<!DOCTYPE html><html><body>...</body></html>",
                      "language": "en",
                      "will_be_sent": false,
                      "not_sent_reason": "no_user_action",
                      "nodes_to_resubmit": [
                        {
                          "node_id": "feature_aml",
                          "feature": "AML"
                        }
                      ],
                      "requires_user_action": false,
                      "preview_token": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
                    }
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "دائماً `no-store`: تحتوي المعاينة على محتوى تحقق ويجب عدم تخزينها مؤقتاً.",
                "schema": {
                  "type": "string",
                  "example": "no-store"
                }
              }
            }
          },
          "400": {
            "description": "الجلسة ليست في حالة يقبلها هذا الـ endpoint، أو هي في حالة `Resubmitted` بالفعل، أو لا يمكن إعادة إرسال الخطوات المحددة، أو أن أحد الحقول غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Wrong Current Status": {
                    "summary": "الجلسة ليست في حالة يقبلها هذا الـ endpoint",
                    "value": {
                      "detail": "Only sessions with status Approved, Declined, In Review, Kyc Expired, Abandoned, Resubmitted can be updated. Current status: In Progress"
                    }
                  },
                  "Already Resubmitted": {
                    "summary": "الجلسة في حالة Resubmitted بالفعل",
                    "value": [
                      "The new status is the same as the current status."
                    ]
                  },
                  "Nothing To Resubmit": {
                    "summary": "لم يعثر الاختيار التلقائي على أي خطوة تتطلب إعادة التقديم",
                    "value": {
                      "nodes_to_resubmit": "No features found that need resubmission. All features are already approved."
                    }
                  },
                  "Invalid Email": {
                    "summary": "email_address ليس عنوان بريد إلكتروني",
                    "value": {
                      "email_address": [
                        "Enter a valid email address."
                      ]
                    }
                  }
                }
              }
            }
          },
          "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` هذا.",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "summary": "session_id غير معروف",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "الخطوات المطلوب إعادة إرسالها كلها خاصة بالخلفية البرمجية فقط (AML، وDATABASE_VALIDATION، وIP_ANALYSIS)، وقد أُعيد إرسال الجلسة بالفعل لخطوات الخلفية البرمجية فقط خلال آخر 30 ثانية، لذا سترفض عملية تحديث حالة الجلسة إعادة الإرسال هذه. أعد المحاولة بعد انقضاء الفترة المحددة في `Retry-After`.",
            "content": {
              "application/json": {
                "examples": {
                  "Backend-only resubmit throttled": {
                    "value": {
                      "detail": "This session was already resubmitted for backend-only features within the last 30 seconds; repeating it cannot change the outcome. Wait before resubmitting again."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.preview_resubmission(\n    \"11111111-2222-3333-4444-555555555555\",\n    nodes_to_resubmit=[{\n        \"node_id\": \"feature_poa_1\",\n        \"feature\": \"POA\",\n    }],\n    email_language=\"en\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.previewResubmission(\"11111111-2222-3333-4444-555555555555\", {\n  nodes_to_resubmit: [{\n    node_id: \"feature_poa_1\",\n    feature: \"POA\",\n  }],\n  email_language: \"en\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.PreviewResubmission(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsPreviewResubmissionParams{\n\tNodesToResubmit: didit.Some([]didit.SessionsPreviewResubmissionParamsNodesToResubmit{{\n\t\tNodeID:  \"feature_poa_1\",\n\t\tFeature: \"POA\",\n\t}}),\n\tEmailLanguage: didit.String(\"en\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsPreviewResubmissionParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().previewResubmission(\"11111111-2222-3333-4444-555555555555\", SessionsPreviewResubmissionParams.builder()\n        .nodesToResubmit(List.of(SessionsPreviewResubmissionParams.NodesToResubmit.builder()\n                .nodeId(\"feature_poa_1\")\n                .feature(SessionsPreviewResubmissionParams.NodesToResubmit.Feature.of(\"POA\"))\n                .build()))\n        .emailLanguage(\"en\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->previewResubmission('11111111-2222-3333-4444-555555555555', [\n    'nodes_to_resubmit' => [[\n        'node_id' => 'feature_poa_1',\n        'feature' => 'POA',\n    ]],\n    'email_language' => 'en',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.preview_resubmission(\n  \"11111111-2222-3333-4444-555555555555\",\n  nodes_to_resubmit: [{\n    node_id: \"feature_poa_1\",\n    feature: \"POA\",\n  }],\n  email_language: \"en\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.PreviewResubmissionAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsPreviewResubmissionParams\n{\n    NodesToResubmit = new SessionsPreviewResubmissionParamsNodesToResubmit[]\n    {\n        new()\n        {\n            NodeId = \"feature_poa_1\",\n            Feature = \"POA\",\n        },\n    },\n    EmailLanguage = \"en\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/": {
      "get": {
        "summary": "استرداد قاعدة التوجيه",
        "description": "يتطلب `read:cases` للتطبيق المطلوب.",
        "operationId": "retrieve_case_routing_rules",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "retrieve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "record_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseRoutingRule"
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          },
          "404": {
            "description": "السجل غير موجود في هذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->routingRules->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "patch": {
        "summary": "تحديث قاعدة التوجيه",
        "description": "يتطلب `write:cases` للتطبيق المطلوب.",
        "operationId": "update_case_routing_rules",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "update",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "record_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseRoutingRule"
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          },
          "404": {
            "description": "السجل غير موجود في هذا التطبيق."
          },
          "409": {
            "description": "تغيرت قاعدة التوجيه منذ expected_version. راجع أحدث قاعدة قبل إعادة المحاولة."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseRoutingRuleUpdate"
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    name=\"your-name\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.update(\"11111111-2222-3333-4444-555555555555\", {\n  name: \"your-name\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseRoutingRuleUpdate{\n\tName: didit.String(\"your-name\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CaseRoutingRuleUpdate;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().update(\"11111111-2222-3333-4444-555555555555\", CaseRoutingRuleUpdate.builder()\n        .name(\"your-name\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->routingRules->update('11111111-2222-3333-4444-555555555555', [\n    'name' => 'your-name',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  name: \"your-name\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new CaseRoutingRuleUpdate\n{\n    Name = \"your-name\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/case-requests/{request_uuid}/": {
      "get": {
        "operationId": "case_requests_retrieve",
        "x-didit-sdk": {
          "resource": "case_requests",
          "method": "retrieve",
          "auth": "device_token",
          "server": false
        },
        "parameters": [
          {
            "in": "path",
            "name": "request_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMessagingCaseRequestPublic"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          }
        },
        "security": [
          {
            "CaseRequestToken": []
          }
        ],
        "description": "الوصول إلى طلب عميل واحد باستخدام الـ token الخاص بالطلب. لا يتم إرجاع نتائج الحالة الخاصة أو بيانات الهوية الأصلية أو عنوان المستلم. تنتهي صلاحية الطلبات القابلة للتنفيذ بعد سبعة أيام. يؤدي الإلغاء أو حل الحالة إلى إبطال الرابط. الردود غير قابلة للتغيير وتظل دليلاً لتقييم المراجِع؛ ولا توافق مطلقاً على عملية التحقق المصدرية أو تحدثها."
      },
      "post": {
        "operationId": "case_requests_create",
        "x-didit-sdk": {
          "resource": "case_requests",
          "method": "respond",
          "auth": "device_token",
          "server": false
        },
        "parameters": [
          {
            "in": "path",
            "name": "request_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMessagingCaseCustomerResponseRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMessagingCaseCustomerResponseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMessagingCaseCustomerResponseResult"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          },
          "400": {
            "description": "مدخلات غير صالحة، أو غرض غير مدعوم، أو جهة اتصال موثقة غير متاحة، أو استجابة غير قابلة للتعديل موجودة بالفعل."
          },
          "409": {
            "description": "تغيرت المعاينة أو انتهت صلاحيتها. قم بالمعاينة مجدداً قبل التأكيد."
          }
        },
        "security": [
          {
            "CaseRequestToken": []
          }
        ],
        "description": "الوصول إلى طلب عميل واحد باستخدام الـ token الخاص بالطلب. لا يتم إرجاع نتائج الحالة الخاصة أو بيانات الهوية الأصلية أو عنوان المستلم. تنتهي صلاحية الطلبات القابلة للتنفيذ بعد سبعة أيام. يؤدي الإلغاء أو حل الحالة إلى إبطال الرابط. الردود غير قابلة للتغيير وتظل دليلاً لتقييم المراجِع؛ ولا توافق مطلقاً على عملية التحقق المصدرية أو تحدثها."
      }
    },
    "/v3/fraud/checks/plan/": {
      "post": {
        "operationId": "plan_create",
        "x-didit-sdk": {
          "resource": "fraud_checks",
          "method": "plan",
          "auth": "api_key",
          "server": true
        },
        "description": "التحقق من صحة الفحوصات المحددة وتقدير سعرها دون تنفيذ، أو إنشاء جلسة، أو فوترة.",
        "summary": "خطة فحص الاحتيال",
        "tags": [
          "Fraud Check"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/FraudCheckRequestRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudCheckRequestRequest"
              },
              "example": {
                "client_reference": "review-attempt-001",
                "subject": {
                  "identifiers": [
                    {
                      "type": "email",
                      "value": "applicant@example.com"
                    }
                  ],
                  "attributes": {
                    "first_name": "Alex",
                    "last_name": "Example"
                  }
                },
                "checks": {
                  "include": [
                    "networks_same_org",
                    "networks_cross_org",
                    "email_risk"
                  ]
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/FraudCheckRequestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudCheckPlan"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudBadRequestErrorMessage"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.fraud_checks.plan(\n    client_reference=\"review-attempt-001\",\n    subject={\n        \"identifiers\": [{\n            \"type\": \"email\",\n            \"value\": \"applicant@example.com\",\n        }],\n        \"attributes\": {\n            \"first_name\": \"Alex\",\n            \"last_name\": \"Example\",\n        },\n    },\n    checks={\n        \"include\": [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.fraudChecks.plan({\n  client_reference: \"review-attempt-001\",\n  subject: {\n    identifiers: [{\n      type: \"email\",\n      value: \"applicant@example.com\",\n    }],\n    attributes: {\n      first_name: \"Alex\",\n      last_name: \"Example\",\n    },\n  },\n  checks: {\n    include: [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FraudChecks.Plan(ctx, didit.FraudCheckRequestRequest{\n\tClientReference: didit.String(\"review-attempt-001\"),\n\tSubject: didit.FraudCheckSubjectRequest{\n\t\tIdentifiers: []didit.FraudCheckIdentifierRequest{{\n\t\t\tType:  didit.FraudTypeEnum(\"email\"),\n\t\t\tValue: \"applicant@example.com\",\n\t\t}},\n\t\tAttributes: didit.Some(didit.FraudCheckAttributesRequest{\n\t\t\tFirstName: didit.String(\"Alex\"),\n\t\t\tLastName:  didit.String(\"Example\"),\n\t\t}),\n\t},\n\tChecks: didit.Some(didit.FraudCheckModuleSelectionRequest{\n\t\tInclude: didit.Some([]didit.FraudExcludeEnum{didit.FraudExcludeEnum(\"networks_same_org\"), didit.FraudExcludeEnum(\"networks_cross_org\"), didit.FraudExcludeEnum(\"email_risk\")}),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.FraudCheckAttributesRequest;\nimport me.didit.types.FraudCheckIdentifierRequest;\nimport me.didit.types.FraudCheckModuleSelectionRequest;\nimport me.didit.types.FraudCheckRequestRequest;\nimport me.didit.types.FraudCheckSubjectRequest;\nimport me.didit.types.FraudExcludeEnum;\nimport me.didit.types.FraudTypeEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.fraudChecks().plan(FraudCheckRequestRequest.builder()\n        .clientReference(\"review-attempt-001\")\n        .subject(FraudCheckSubjectRequest.builder()\n                .identifiers(List.of(FraudCheckIdentifierRequest.builder()\n                        .type(FraudTypeEnum.of(\"email\"))\n                        .value(\"applicant@example.com\")\n                        .build()))\n                .attributes(FraudCheckAttributesRequest.builder()\n                        .firstName(\"Alex\")\n                        .lastName(\"Example\")\n                        .build())\n                .build())\n        .checks(FraudCheckModuleSelectionRequest.builder()\n                .include(List.of(FraudExcludeEnum.of(\"networks_same_org\"), FraudExcludeEnum.of(\"networks_cross_org\"), FraudExcludeEnum.of(\"email_risk\")))\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->fraudChecks->plan([\n    'client_reference' => 'review-attempt-001',\n    'subject' => [\n        'identifiers' => [[\n            'type' => 'email',\n            'value' => 'applicant@example.com',\n        ]],\n        'attributes' => [\n            'first_name' => 'Alex',\n            'last_name' => 'Example',\n        ],\n    ],\n    'checks' => [\n        'include' => ['networks_same_org', 'networks_cross_org', 'email_risk'],\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.fraud_checks.plan(\n  client_reference: \"review-attempt-001\",\n  subject: {\n    identifiers: [{\n      type: \"email\",\n      value: \"applicant@example.com\",\n    }],\n    attributes: {\n      first_name: \"Alex\",\n      last_name: \"Example\",\n    },\n  },\n  checks: {\n    include: [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FraudChecks.PlanAsync(new FraudCheckRequestRequest\n{\n    ClientReference = \"review-attempt-001\",\n    Subject = new()\n    {\n        Identifiers = new FraudCheckIdentifierRequest[]\n        {\n            new()\n            {\n                Type = \"email\",\n                Value = \"applicant@example.com\",\n            },\n        },\n        Attributes = new FraudCheckAttributesRequest\n        {\n            FirstName = \"Alex\",\n            LastName = \"Example\",\n        },\n    },\n    Checks = new FraudCheckModuleSelectionRequest\n    {\n        Include = new FraudExcludeEnum[] { \"networks_same_org\", \"networks_cross_org\", \"email_risk\" },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/": {
      "get": {
        "summary": "عرض قواعد التوجيه",
        "description": "يتطلب `list:cases` للتطبيق المطلوب.",
        "operationId": "list_case_routing_rules",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CaseRoutingRule"
                      }
                    },
                    "count": {
                      "type": "integer",
                      "description": "عدد التطابقات، بحد أقصى 100. اتبع next للمتابعة بعد الحد الأقصى."
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.routing_rules.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.routingRules.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.RoutingRules.ListAutoPaging(ctx, didit.CasesRoutingRulesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().routingRules().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->routingRules->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.routing_rules.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.RoutingRules.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "summary": "إنشاء قاعدة توجيه",
        "description": "يتطلب `write:cases` للتطبيق المطلوب. اضبط publish=false لإنشاء مسودة غير منشورة؛ ويؤدي النشر إلى إنشاء نسختها الحية الأولى. يؤدي تجاهل مسودة لم تُنشر أبداً إلى حذفها.",
        "operationId": "create_case_routing_rules",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "responses": {
          "201": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseRoutingRule"
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseRoutingRuleCreate"
              },
              "example": {
                "name": "AML screening alerts",
                "conditions": [
                  {
                    "field": "source",
                    "operator": "equals",
                    "value": "AML_SCREENING"
                  }
                ],
                "blueprint": "b1de0000-0000-4000-8000-000000000002"
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.create(\n    name=\"AML screening alerts\",\n    conditions=[{\n        \"field\": \"source\",\n        \"operator\": \"equals\",\n        \"value\": \"AML_SCREENING\",\n    }],\n    blueprint=\"b1de0000-0000-4000-8000-000000000002\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.create({\n  name: \"AML screening alerts\",\n  conditions: [{\n    field: \"source\",\n    operator: \"equals\",\n    value: \"AML_SCREENING\",\n  }],\n  blueprint: \"b1de0000-0000-4000-8000-000000000002\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Create(ctx, didit.CaseRoutingRuleCreate{\n\tName: \"AML screening alerts\",\n\tConditions: []didit.CaseRoutingConditionParam{{\n\t\tField:    \"source\",\n\t\tOperator: \"equals\",\n\t\tValue:    \"AML_SCREENING\",\n\t}},\n\tBlueprint: \"b1de0000-0000-4000-8000-000000000002\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CaseRoutingCondition;\nimport me.didit.types.CaseRoutingRuleCreate;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().create(CaseRoutingRuleCreate.builder()\n        .name(\"AML screening alerts\")\n        .conditions(List.of(CaseRoutingCondition.builder()\n                .field(CaseRoutingCondition.Field.of(\"source\"))\n                .operator(CaseRoutingCondition.Operator.of(\"equals\"))\n                .value(CaseRoutingCondition.Value.ofString(\"AML_SCREENING\"))\n                .build()))\n        .blueprint(\"b1de0000-0000-4000-8000-000000000002\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->routingRules->create([\n    'name' => 'AML screening alerts',\n    'conditions' => [[\n        'field' => 'source',\n        'operator' => 'equals',\n        'value' => 'AML_SCREENING',\n    ]],\n    'blueprint' => 'b1de0000-0000-4000-8000-000000000002',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.create(\n  name: \"AML screening alerts\",\n  conditions: [{\n    field: \"source\",\n    operator: \"equals\",\n    value: \"AML_SCREENING\",\n  }],\n  blueprint: \"b1de0000-0000-4000-8000-000000000002\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.CreateAsync(new CaseRoutingRuleCreate\n{\n    Name = \"AML screening alerts\",\n    Conditions = new CaseRoutingCondition[]\n    {\n        new()\n        {\n            Field = \"source\",\n            Operator = \"equals\",\n            Value = \"AML_SCREENING\",\n        },\n    },\n    Blueprint = \"b1de0000-0000-4000-8000-000000000002\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/publish/": {
      "post": {
        "operationId": "publish_case_routing_rule",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "publish",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "record_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Assignment"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RoutingPublicationPolicyDraftPreconditionRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingPublicationPolicyDraftPreconditionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RoutingPublicationPolicyDraftPreconditionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingPublicationCaseRoutingRule"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "يلزم توفر إذن الوصول إلى الحالة."
          },
          "409": {
            "description": "تغير الإصدار المنشور أو مراجعة المسودة. أعد التحميل قبل إعادة المحاولة."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.publish(\n    \"11111111-2222-3333-4444-555555555555\",\n    expected_version=0,\n    expected_revision=\"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.publish(\"11111111-2222-3333-4444-555555555555\", {\n  expected_version: 0,\n  expected_revision: \"11111111-2222-3333-4444-555555555555\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Publish(ctx, \"11111111-2222-3333-4444-555555555555\", didit.RoutingPublicationPolicyDraftPreconditionRequest{\n\tExpectedVersion:  0,\n\tExpectedRevision: didit.String(\"11111111-2222-3333-4444-555555555555\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.RoutingPublicationPolicyDraftPreconditionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().publish(\"11111111-2222-3333-4444-555555555555\", RoutingPublicationPolicyDraftPreconditionRequest.builder()\n        .expectedVersion(0L)\n        .expectedRevision(\"11111111-2222-3333-4444-555555555555\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->routingRules->publish('11111111-2222-3333-4444-555555555555', [\n    'expected_version' => 0,\n    'expected_revision' => '11111111-2222-3333-4444-555555555555',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.publish(\n  \"11111111-2222-3333-4444-555555555555\",\n  expected_version: 0,\n  expected_revision: \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.PublishAsync(\"11111111-2222-3333-4444-555555555555\", new RoutingPublicationPolicyDraftPreconditionRequest\n{\n    ExpectedVersion = 0,\n    ExpectedRevision = \"11111111-2222-3333-4444-555555555555\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/publish/": {
      "post": {
        "operationId": "publish_case_blueprint",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "publish",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "blueprint_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CasePublicationPolicyDraftPreconditionRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CasePublicationPolicyDraftPreconditionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CasePublicationPolicyDraftPreconditionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CasePublicationCaseBlueprint"
                }
              }
            },
            "description": ""
          },
          "409": {
            "description": "تغيرت النسخة المنشورة أو مراجعة المسودة المحفوظة. أعد التحميل قبل إعادة المحاولة."
          },
          "403": {
            "description": "إذن الحالة المطلوب مفقود."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.publish(\n    \"11111111-2222-3333-4444-555555555555\",\n    expected_version=0,\n    expected_revision=\"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.publish(\"11111111-2222-3333-4444-555555555555\", {\n  expected_version: 0,\n  expected_revision: \"11111111-2222-3333-4444-555555555555\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Publish(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasePublicationPolicyDraftPreconditionRequest{\n\tExpectedVersion:  0,\n\tExpectedRevision: didit.String(\"11111111-2222-3333-4444-555555555555\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasePublicationPolicyDraftPreconditionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().publish(\"11111111-2222-3333-4444-555555555555\", CasePublicationPolicyDraftPreconditionRequest.builder()\n        .expectedVersion(0L)\n        .expectedRevision(\"11111111-2222-3333-4444-555555555555\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->blueprints->publish('11111111-2222-3333-4444-555555555555', [\n    'expected_version' => 0,\n    'expected_revision' => '11111111-2222-3333-4444-555555555555',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.publish(\n  \"11111111-2222-3333-4444-555555555555\",\n  expected_version: 0,\n  expected_revision: \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.PublishAsync(\"11111111-2222-3333-4444-555555555555\", new CasePublicationPolicyDraftPreconditionRequest\n{\n    ExpectedVersion = 0,\n    ExpectedRevision = \"11111111-2222-3333-4444-555555555555\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/preview/": {
      "post": {
        "operationId": "organization_application_cases_requests_preview_create",
        "x-didit-sdk": {
          "resource": "cases.requests",
          "method": "preview",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMessagingCaseRequestPreviewRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMessagingCaseRequestPreviewRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMessagingCaseRequestPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMessagingCaseRequestPreviewResponse"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          },
          "400": {
            "description": "مدخلات غير صالحة، أو غرض غير مدعوم، أو جهة اتصال موثقة غير متاحة، أو استجابة غير قابلة للتعديل موجودة بالفعل."
          },
          "409": {
            "description": "تغيرت المعاينة أو انتهت صلاحيتها. قم بالمعاينة مجدداً قبل التأكيد."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "عرض البريد الإلكتروني الخاص بالإنتاج دون إرساله أو تغيير الحالة. يُرجع بدقة المستلم والمُرسِل والموضوع والنص وpreview_token مُوقَّعاً. أرسل نفس contact_id وpurpose وlanguage وrequest_id وexpires_at وpreview_token للتأكيد في غضون 15 دقيقة.",
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.preview(\n    \"11111111-2222-3333-4444-555555555555\",\n    contact_id=\"11111111-2222-3333-4444-555555555555\",\n    purpose=\"identity_document\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.preview(\"11111111-2222-3333-4444-555555555555\", {\n  contact_id: \"11111111-2222-3333-4444-555555555555\",\n  purpose: \"identity_document\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.Preview(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CustomerMessagingCaseRequestPreviewRequest{\n\tContactID: \"11111111-2222-3333-4444-555555555555\",\n\tPurpose:   didit.CustomerMessagingPurposeEnum(\"identity_document\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CustomerMessagingCaseRequestPreviewRequest;\nimport me.didit.types.CustomerMessagingPurposeEnum;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().preview(\"11111111-2222-3333-4444-555555555555\", CustomerMessagingCaseRequestPreviewRequest.builder()\n        .contactId(\"11111111-2222-3333-4444-555555555555\")\n        .purpose(CustomerMessagingPurposeEnum.of(\"identity_document\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->requests->preview('11111111-2222-3333-4444-555555555555', [\n    'contact_id' => '11111111-2222-3333-4444-555555555555',\n    'purpose' => 'identity_document',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.preview(\n  \"11111111-2222-3333-4444-555555555555\",\n  contact_id: \"11111111-2222-3333-4444-555555555555\",\n  purpose: \"identity_document\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.PreviewAsync(\"11111111-2222-3333-4444-555555555555\", new CustomerMessagingCaseRequestPreviewRequest\n{\n    ContactId = \"11111111-2222-3333-4444-555555555555\",\n    Purpose = \"identity_document\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/action-receipts/": {
      "get": {
        "operationId": "action_receipts_retrieve",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "list_action_receipts",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "maximum": 1000000,
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseActionCaseActionReceiptPage"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "عرض إيصالات إجراءات الجهة المعنية، الأحدث أولاً، بحد أقصى 20 نتيجة لكل صفحة. استخدم next_offset للانتقال إلى الصفحة التالية. لا يظهر نص الملاحظة المدخلة في السجل.",
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.list_action_receipts(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.listActionReceipts(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ListActionReceipts(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesListActionReceiptsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().listActionReceipts(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->listActionReceipts('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.list_action_receipts(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ListActionReceiptsAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/{note_uuid}/": {
      "delete": {
        "operationId": "delete_network_note",
        "x-didit-sdk": {
          "resource": "networks.notes",
          "method": "delete",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "summary": "حذف ملاحظة الشبكة الخاصة بك",
        "description": "يتطلب write:networks والمؤلف المصادق عليه للملاحظة. الحذف نهائي ولا يمكن التراجع عنه. ولا تتأثر بيانات الحساب والتحقق المتصلة.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للشبكة."
          },
          {
            "name": "note_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "token وصول مستخدم Console بالصيغة Bearer <token>."
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف الملاحظة."
          },
          "401": {
            "description": "المصادقة مطلوبة."
          },
          "403": {
            "description": "إذن مفقود أو صلاحية الوصول إلى Networks مفقودة."
          },
          "404": {
            "description": "الشبكة أو الملاحظة غير مرئية لهذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\nclient = Didit()\n\nclient.networks.notes.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"11111111-2222-3333-4444-555555555555\",\n    extra_headers={\"Authorization\": \"Bearer YOUR_CONSOLE_USER_TOKEN\"},\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nconst didit = new Didit({\n  fetch: (url, init) => {\n    const headers = new Headers(init?.headers);\n    headers.set(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\");\n    return fetch(url, { ...init, headers });\n  },\n});\n\nawait didit.networks.notes.delete(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nclient := didit.NewClient()\n\nif err := client.Networks.Notes.Delete(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", didit.NetworksNotesDeleteParams{\n\tAuthorization: \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n}); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.core.RequestOptions;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nDidit client = new Didit();\n\nclient.networks().notes().delete(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", RequestOptions.builder()\n        .header(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\")\n        .build());"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\n$didit = new DiditClient();\n\n$didit->networks->notes->delete('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555', [\n    'authorization' => 'Bearer YOUR_CONSOLE_USER_TOKEN',\n]);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\ndidit = Didit::Client.new\n\ndidit.networks.notes.delete(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n  request_options: { extra_headers: { \"Authorization\" => \"Bearer YOUR_CONSOLE_USER_TOKEN\" } }\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nusing var client = new DiditClient();\n\nawait client.Networks.Notes.DeleteAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", requestOptions: new RequestOptions\n{\n    Headers = new Dictionary<string, string>\n    {\n        [\"Authorization\"] = \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n    },\n});"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/action-receipts/{receipt_uuid}/retry/": {
      "post": {
        "operationId": "action_receipts_retry_create",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "retry_action_receipt",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "receipt_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseActionCaseActionReceipt"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "أعد محاولة هذا الإجراء الفاشل الخاص بالطرف المعني فقط باستخدام مدخلاته المحفوظة. يتم التحقق من إذن الكتابة الحالي. تُرجع الإجراءات المُطبقة إيصالها دون تنفيذها مرة أخرى. إغلاق الحالة مستقل.",
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.retry_action_receipt(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.retryActionReceipt(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RetryActionReceipt(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().retryActionReceipt(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->retryActionReceipt('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.retry_action_receipt(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RetryActionReceiptAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/draft/": {
      "get": {
        "operationId": "get_case_blueprint_draft",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "retrieve_draft",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "blueprint_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CasePublicationPolicyDraftResponse"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "إذن الحالة المطلوب مفقود."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.retrieve_draft(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.retrieveDraft(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.RetrieveDraft(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().retrieveDraft(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->blueprints->retrieveDraft('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.retrieve_draft(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.RetrieveDraftAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "put": {
        "operationId": "save_case_blueprint_draft",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "save_draft",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "blueprint_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CasePublicationPolicyDraftWriteRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CasePublicationPolicyDraftWriteRequest"
              },
              "example": {
                "expected_version": 1,
                "expected_revision": "4e5f0000-0000-4000-8000-000000000003",
                "changes": {
                  "max_active_cases": 20
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CasePublicationPolicyDraftWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CasePublicationPolicyDraft"
                }
              }
            },
            "description": ""
          },
          "409": {
            "description": "تغيرت النسخة المنشورة أو مراجعة المسودة المحفوظة. أعد التحميل قبل إعادة المحاولة."
          },
          "403": {
            "description": "إذن الحالة المطلوب مفقود."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.save_draft(\n    \"11111111-2222-3333-4444-555555555555\",\n    expected_version=1,\n    expected_revision=\"4e5f0000-0000-4000-8000-000000000003\",\n    changes={\"max_active_cases\": 20},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.saveDraft(\"11111111-2222-3333-4444-555555555555\", {\n  expected_version: 1,\n  expected_revision: \"4e5f0000-0000-4000-8000-000000000003\",\n  changes: { max_active_cases: 20 },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.SaveDraft(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasePublicationPolicyDraftWriteRequest{\n\tExpectedVersion:  1,\n\tExpectedRevision: didit.String(\"4e5f0000-0000-4000-8000-000000000003\"),\n\tChanges:          map[string]any{\"max_active_cases\": 20},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.CasePublicationPolicyDraftWriteRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().saveDraft(\"11111111-2222-3333-4444-555555555555\", CasePublicationPolicyDraftWriteRequest.builder()\n        .expectedVersion(1L)\n        .expectedRevision(\"4e5f0000-0000-4000-8000-000000000003\")\n        .changes(Map.of(\"max_active_cases\", 20))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->blueprints->saveDraft('11111111-2222-3333-4444-555555555555', [\n    'expected_version' => 1,\n    'expected_revision' => '4e5f0000-0000-4000-8000-000000000003',\n    'changes' => ['max_active_cases' => 20],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.save_draft(\n  \"11111111-2222-3333-4444-555555555555\",\n  expected_version: 1,\n  expected_revision: \"4e5f0000-0000-4000-8000-000000000003\",\n  changes: { max_active_cases: 20 }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.SaveDraftAsync(\"11111111-2222-3333-4444-555555555555\", new CasePublicationPolicyDraftWriteRequest\n{\n    ExpectedVersion = 1,\n    ExpectedRevision = \"4e5f0000-0000-4000-8000-000000000003\",\n    Changes = new Dictionary<string, object> { [\"max_active_cases\"] = 20 },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "operationId": "discard_case_blueprint_draft",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "discard_draft",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "blueprint_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "204": {
            "description": "لا يوجد نص للاستجابة"
          },
          "409": {
            "description": "تغيرت النسخة المنشورة أو مراجعة المسودة المحفوظة. أعد التحميل قبل إعادة المحاولة."
          },
          "403": {
            "description": "إذن الحالة المطلوب مفقود."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CasePublicationPolicyDraftPreconditionRequest"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.blueprints.discard_draft(\n    \"11111111-2222-3333-4444-555555555555\",\n    expected_version=0,\n    expected_revision=\"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.blueprints.discardDraft(\"11111111-2222-3333-4444-555555555555\", {\n  expected_version: 0,\n  expected_revision: \"11111111-2222-3333-4444-555555555555\",\n});"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Blueprints.DiscardDraft(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasePublicationPolicyDraftPreconditionRequest{\n\tExpectedVersion:  0,\n\tExpectedRevision: didit.String(\"11111111-2222-3333-4444-555555555555\"),\n}); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CasePublicationPolicyDraftPreconditionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().blueprints().discardDraft(\"11111111-2222-3333-4444-555555555555\", CasePublicationPolicyDraftPreconditionRequest.builder()\n        .expectedVersion(0L)\n        .expectedRevision(\"11111111-2222-3333-4444-555555555555\")\n        .build());"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->cases->blueprints->discardDraft('11111111-2222-3333-4444-555555555555', [\n    'expected_version' => 0,\n    'expected_revision' => '11111111-2222-3333-4444-555555555555',\n]);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.blueprints.discard_draft(\n  \"11111111-2222-3333-4444-555555555555\",\n  expected_version: 0,\n  expected_revision: \"11111111-2222-3333-4444-555555555555\"\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.Blueprints.DiscardDraftAsync(\"11111111-2222-3333-4444-555555555555\", new CasePublicationPolicyDraftPreconditionRequest\n{\n    ExpectedVersion = 0,\n    ExpectedRevision = \"11111111-2222-3333-4444-555555555555\",\n});"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/teams/{record_uuid}/": {
      "get": {
        "summary": "استرداد فريق المراجعة",
        "description": "يتطلب `read:cases` للتطبيق المطلوب.",
        "operationId": "retrieve_case_teams",
        "x-didit-sdk": {
          "resource": "cases.teams",
          "method": "retrieve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "record_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseReviewTeam"
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          },
          "404": {
            "description": "السجل غير موجود في هذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.teams.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.teams.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Teams.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().teams().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->teams->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.teams.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Teams.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "patch": {
        "summary": "تحديث فريق المراجعة",
        "description": "يتطلب `write:cases` للتطبيق المطلوب.",
        "operationId": "update_case_teams",
        "x-didit-sdk": {
          "resource": "cases.teams",
          "method": "update",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "record_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseReviewTeam"
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          },
          "404": {
            "description": "السجل غير موجود في هذا التطبيق."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseReviewTeamUpdate"
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.teams.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    name=\"your-name\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.teams.update(\"11111111-2222-3333-4444-555555555555\", {\n  name: \"your-name\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Teams.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseReviewTeamUpdate{\n\tName: didit.String(\"your-name\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CaseReviewTeamUpdate;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().teams().update(\"11111111-2222-3333-4444-555555555555\", CaseReviewTeamUpdate.builder()\n        .name(\"your-name\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->teams->update('11111111-2222-3333-4444-555555555555', [\n    'name' => 'your-name',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.teams.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  name: \"your-name\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Teams.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new CaseReviewTeamUpdate\n{\n    Name = \"your-name\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/report/": {
      "get": {
        "operationId": "download_network_report",
        "x-didit-sdk": {
          "resource": "networks",
          "method": "download_report",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "summary": "تنزيل تقرير أدلة الشبكة",
        "description": "تنزيل ملف PDF لشبكة المؤسسة الحالية، والاتصالات المرصودة بحساباتها، ومراجع الإشارات، وحالة المراجعة. يتطلب read:networks. لا يتضمن معلومات الاستخبارات العالمية وملاحظات المحلل الخاصة. يتم تحديد الحد الأقصى لكل قائمة حسابات وإشارات عند 500 إدخال، ويوضح التقرير متى يكون غير مكتمل. لا يغير الطلب حالة الشبكة. يتم إرجاع الأخطاء بتنسيق JSON.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للشبكة."
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "token وصول مستخدم Console بالصيغة Bearer <token>."
          }
        ],
        "responses": {
          "200": {
            "description": "تقرير أدلة الشبكة. Cache-Control: no-store.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "المصادقة مطلوبة."
          },
          "403": {
            "description": "إذن مفقود أو صلاحية الوصول إلى Networks مفقودة."
          },
          "404": {
            "description": "الشبكة أو الملاحظة غير مرئية لهذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\nclient = Didit()\n\ncontent = client.networks.download_report(\n    \"11111111-2222-3333-4444-555555555555\",\n    extra_headers={\"Authorization\": \"Bearer YOUR_CONSOLE_USER_TOKEN\"},\n)\nwith open(\"download.pdf\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nconst didit = new Didit({\n  fetch: (url, init) => {\n    const headers = new Headers(init?.headers);\n    headers.set(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\");\n    return fetch(url, { ...init, headers });\n  },\n});\n\nconst content = await didit.networks.downloadReport(\"11111111-2222-3333-4444-555555555555\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nclient := didit.NewClient()\n\nresp, err := client.Networks.DownloadReport(ctx, \"11111111-2222-3333-4444-555555555555\", didit.NetworksDownloadReportParams{\n\tAuthorization: \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.core.RequestOptions;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nDidit client = new Didit();\n\nclient.networks().downloadReport(\"11111111-2222-3333-4444-555555555555\", RequestOptions.builder()\n        .header(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\")\n        .build())\n        .writeTo(Path.of(\"download.pdf\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\n$didit = new DiditClient();\n\n$content = $didit->networks->downloadReport('11111111-2222-3333-4444-555555555555', [\n    'authorization' => 'Bearer YOUR_CONSOLE_USER_TOKEN',\n]);\n$content->saveTo('download.pdf');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\ndidit = Didit::Client.new\n\ncontent = didit.networks.download_report(\n  \"11111111-2222-3333-4444-555555555555\",\n  request_options: { extra_headers: { \"Authorization\" => \"Bearer YOUR_CONSOLE_USER_TOKEN\" } }\n)\nFile.binwrite(\"download.pdf\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nusing var client = new DiditClient();\n\nvar content = await client.Networks.DownloadReportAsync(\"11111111-2222-3333-4444-555555555555\", requestOptions: new RequestOptions\n{\n    Headers = new Dictionary<string, string>\n    {\n        [\"Authorization\"] = \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n    },\n});\nawait content.SaveToAsync(\"download.pdf\");"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/": {
      "get": {
        "operationId": "list_network_notes",
        "x-didit-sdk": {
          "resource": "networks.notes",
          "method": "list",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "summary": "عرض ملاحظات الشبكة الخاصة",
        "description": "يمكن لمستخدمي Console الذين لديهم إذن read:networks قراءة الملاحظات على شبكة مرئية للتطبيق. تبقى الملاحظات داخل المؤسسة ولا تتم مشاركتها في المعلومات الاستخباراتية المشتركة. تظهر أحدث الملاحظات أولاً.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للشبكة."
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "token وصول مستخدم Console بالصيغة Bearer <token>."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة من الملاحظات. الحد الأقصى للعدد هو 100؛ استخدم next للمتابعة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NetworkNote"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "المصادقة مطلوبة."
          },
          "403": {
            "description": "إذن مفقود أو صلاحية الوصول إلى Networks مفقودة."
          },
          "404": {
            "description": "الشبكة أو الملاحظة غير مرئية لهذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\nclient = Didit()\n\nfor item in client.networks.notes.list(\n    \"11111111-2222-3333-4444-555555555555\",\n    extra_headers={\"Authorization\": \"Bearer YOUR_CONSOLE_USER_TOKEN\"},\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nconst didit = new Didit({\n  fetch: (url, init) => {\n    const headers = new Headers(init?.headers);\n    headers.set(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\");\n    return fetch(url, { ...init, headers });\n  },\n});\n\nfor await (const item of didit.networks.notes.list(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nclient := didit.NewClient()\n\niter := client.Networks.Notes.ListAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.NetworksNotesListParams{\n\tAuthorization: \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.core.RequestOptions;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nDidit client = new Didit();\n\nfor (var item : client.networks().notes().list(\"11111111-2222-3333-4444-555555555555\", RequestOptions.builder()\n        .header(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\")\n        .build())) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\n$didit = new DiditClient();\n\nforeach ($didit->networks->notes->list('11111111-2222-3333-4444-555555555555', [\n    'authorization' => 'Bearer YOUR_CONSOLE_USER_TOKEN',\n]) as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\ndidit = Didit::Client.new\n\ndidit.networks.notes.list(\n  \"11111111-2222-3333-4444-555555555555\",\n  request_options: { extra_headers: { \"Authorization\" => \"Bearer YOUR_CONSOLE_USER_TOKEN\" } }\n).auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Networks.Notes.ListAsync(\"11111111-2222-3333-4444-555555555555\", requestOptions: new RequestOptions\n{\n    Headers = new Dictionary<string, string>\n    {\n        [\"Authorization\"] = \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n    },\n}))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      },
      "post": {
        "operationId": "create_network_note",
        "x-didit-sdk": {
          "resource": "networks.notes",
          "method": "create",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Networks"
        ],
        "summary": "إضافة ملاحظة شبكة خاصة",
        "description": "يتطلب مستخدم لوحة تحكم يمتلك write:networks. يتم تعيين المؤلف من المستخدم المصادق عليه. قدّم client_reference جديداً وعشوائياً بصيغة UUID لكل ملاحظة؛ وأعد محاولة إرسال نفس النص والمرجع بعد استجابة غير مؤكدة لتجنب التكرار. إعادة استخدام مرجع لنص أو مؤلف أو شبكة أخرى ترجع 409. تتبع الملاحظات التحقيق المستمر عند دمج الشبكات.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للشبكة."
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "token وصول مستخدم Console بالصيغة Bearer <token>."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "comment",
                  "client_reference"
                ],
                "properties": {
                  "comment": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  },
                  "client_reference": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "ملاحظة خاصة محفوظة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkNote"
                }
              }
            }
          },
          "200": {
            "description": "ملاحظة خاصة محفوظة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkNote"
                }
              }
            }
          },
          "400": {
            "description": "ملاحظة غير صالحة أو فارغة."
          },
          "409": {
            "description": "تم استخدام المرجع بالفعل لملاحظة أخرى."
          },
          "401": {
            "description": "المصادقة مطلوبة."
          },
          "403": {
            "description": "إذن مفقود أو صلاحية الوصول إلى Networks مفقودة."
          },
          "404": {
            "description": "الشبكة أو الملاحظة غير مرئية لهذا التطبيق."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\nclient = Didit()\n\nresult = client.networks.notes.create(\n    \"11111111-2222-3333-4444-555555555555\",\n    comment=\"your-comment\",\n    client_reference=\"11111111-2222-3333-4444-555555555555\",\n    extra_headers={\"Authorization\": \"Bearer YOUR_CONSOLE_USER_TOKEN\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nconst didit = new Didit({\n  fetch: (url, init) => {\n    const headers = new Headers(init?.headers);\n    headers.set(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\");\n    return fetch(url, { ...init, headers });\n  },\n});\n\nconst result = await didit.networks.notes.create(\"11111111-2222-3333-4444-555555555555\", {\n  comment: \"your-comment\",\n  client_reference: \"11111111-2222-3333-4444-555555555555\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nclient := didit.NewClient()\n\nresult, err := client.Networks.Notes.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.NetworksNotesCreateParams{\n\tComment:         \"your-comment\",\n\tClientReference: \"11111111-2222-3333-4444-555555555555\",\n\tAuthorization:   \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.core.RequestOptions;\nimport me.didit.types.NetworksNotesCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nDidit client = new Didit();\n\nvar result = client.networks().notes().create(\"11111111-2222-3333-4444-555555555555\", NetworksNotesCreateParams.builder()\n        .comment(\"your-comment\")\n        .clientReference(\"11111111-2222-3333-4444-555555555555\")\n        .build(), RequestOptions.builder()\n        .header(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\n$didit = new DiditClient();\n\n$result = $didit->networks->notes->create('11111111-2222-3333-4444-555555555555', [\n    'comment' => 'your-comment',\n    'client_reference' => '11111111-2222-3333-4444-555555555555',\n    'authorization' => 'Bearer YOUR_CONSOLE_USER_TOKEN',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\ndidit = Didit::Client.new\n\nresult = didit.networks.notes.create(\n  \"11111111-2222-3333-4444-555555555555\",\n  comment: \"your-comment\",\n  client_reference: \"11111111-2222-3333-4444-555555555555\",\n  request_options: { extra_headers: { \"Authorization\" => \"Bearer YOUR_CONSOLE_USER_TOKEN\" } }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.Notes.CreateAsync(\"11111111-2222-3333-4444-555555555555\", new NetworksNotesCreateParams\n{\n    Comment = \"your-comment\",\n    ClientReference = \"11111111-2222-3333-4444-555555555555\",\n}, requestOptions: new RequestOptions\n{\n    Headers = new Dictionary<string, string>\n    {\n        [\"Authorization\"] = \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/draft/": {
      "get": {
        "operationId": "get_case_routing_rule_draft",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "retrieve_draft",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "record_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Assignment"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingPublicationPolicyDraftResponse"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "يلزم توفر إذن الوصول إلى الحالة."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.retrieve_draft(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.retrieveDraft(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.RetrieveDraft(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().retrieveDraft(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->routingRules->retrieveDraft('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.retrieve_draft(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.RetrieveDraftAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "put": {
        "operationId": "save_case_routing_rule_draft",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "save_draft",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "record_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Assignment"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RoutingPublicationPolicyDraftWriteRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingPublicationPolicyDraftWriteRequest"
              },
              "example": {
                "expected_version": 1,
                "expected_revision": "4e5f0000-0000-4000-8000-000000000003",
                "changes": {
                  "priority": 10
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RoutingPublicationPolicyDraftWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingPublicationPolicyDraft"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "يلزم توفر إذن الوصول إلى الحالة."
          },
          "409": {
            "description": "تغير الإصدار المنشور أو مراجعة المسودة. أعد التحميل قبل إعادة المحاولة."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.save_draft(\n    \"11111111-2222-3333-4444-555555555555\",\n    expected_version=1,\n    expected_revision=\"4e5f0000-0000-4000-8000-000000000003\",\n    changes={\"priority\": 10},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.saveDraft(\"11111111-2222-3333-4444-555555555555\", {\n  expected_version: 1,\n  expected_revision: \"4e5f0000-0000-4000-8000-000000000003\",\n  changes: { priority: 10 },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.SaveDraft(ctx, \"11111111-2222-3333-4444-555555555555\", didit.RoutingPublicationPolicyDraftWriteRequest{\n\tExpectedVersion:  1,\n\tExpectedRevision: didit.String(\"4e5f0000-0000-4000-8000-000000000003\"),\n\tChanges:          map[string]any{\"priority\": 10},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.RoutingPublicationPolicyDraftWriteRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().saveDraft(\"11111111-2222-3333-4444-555555555555\", RoutingPublicationPolicyDraftWriteRequest.builder()\n        .expectedVersion(1L)\n        .expectedRevision(\"4e5f0000-0000-4000-8000-000000000003\")\n        .changes(Map.of(\"priority\", 10))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->routingRules->saveDraft('11111111-2222-3333-4444-555555555555', [\n    'expected_version' => 1,\n    'expected_revision' => '4e5f0000-0000-4000-8000-000000000003',\n    'changes' => ['priority' => 10],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.save_draft(\n  \"11111111-2222-3333-4444-555555555555\",\n  expected_version: 1,\n  expected_revision: \"4e5f0000-0000-4000-8000-000000000003\",\n  changes: { priority: 10 }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.SaveDraftAsync(\"11111111-2222-3333-4444-555555555555\", new RoutingPublicationPolicyDraftWriteRequest\n{\n    ExpectedVersion = 1,\n    ExpectedRevision = \"4e5f0000-0000-4000-8000-000000000003\",\n    Changes = new Dictionary<string, object> { [\"priority\"] = 10 },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "operationId": "discard_case_routing_rule_draft",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "discard_draft",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "record_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Assignment"
        ],
        "responses": {
          "204": {
            "description": "لا يوجد نص للاستجابة"
          },
          "403": {
            "description": "يلزم توفر إذن الوصول إلى الحالة."
          },
          "409": {
            "description": "تغير الإصدار المنشور أو مراجعة المسودة. أعد التحميل قبل إعادة المحاولة."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingPublicationPolicyDraftPreconditionRequest"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.routing_rules.discard_draft(\n    \"11111111-2222-3333-4444-555555555555\",\n    expected_version=0,\n    expected_revision=\"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.routingRules.discardDraft(\"11111111-2222-3333-4444-555555555555\", {\n  expected_version: 0,\n  expected_revision: \"11111111-2222-3333-4444-555555555555\",\n});"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.RoutingRules.DiscardDraft(ctx, \"11111111-2222-3333-4444-555555555555\", didit.RoutingPublicationPolicyDraftPreconditionRequest{\n\tExpectedVersion:  0,\n\tExpectedRevision: didit.String(\"11111111-2222-3333-4444-555555555555\"),\n}); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.RoutingPublicationPolicyDraftPreconditionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().routingRules().discardDraft(\"11111111-2222-3333-4444-555555555555\", RoutingPublicationPolicyDraftPreconditionRequest.builder()\n        .expectedVersion(0L)\n        .expectedRevision(\"11111111-2222-3333-4444-555555555555\")\n        .build());"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->cases->routingRules->discardDraft('11111111-2222-3333-4444-555555555555', [\n    'expected_version' => 0,\n    'expected_revision' => '11111111-2222-3333-4444-555555555555',\n]);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.routing_rules.discard_draft(\n  \"11111111-2222-3333-4444-555555555555\",\n  expected_version: 0,\n  expected_revision: \"11111111-2222-3333-4444-555555555555\"\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.RoutingRules.DiscardDraftAsync(\"11111111-2222-3333-4444-555555555555\", new RoutingPublicationPolicyDraftPreconditionRequest\n{\n    ExpectedVersion = 0,\n    ExpectedRevision = \"11111111-2222-3333-4444-555555555555\",\n});"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/duplicates/": {
      "post": {
        "operationId": "duplicates_create",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "find_duplicates",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Case Management"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CaseDuplicateCaseDuplicateQueryRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseDuplicateCaseDuplicateQueryRequest"
              },
              "example": {
                "subject": {
                  "type": "user",
                  "uuid": "5b9a0000-0000-4000-8000-00000000f00d"
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CaseDuplicateCaseDuplicateQueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseDuplicateCaseDuplicatePage"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "راجع الحالات الحالية لموضوع أو لسجل مصدر مملوك قبل إنشاء الحالة يدوياً. يتم إرجاع كل من التحقيقات المفتوحة وتلك التي تم البت فيها. تحتوي كل صفحة على 20 حالة كحد أقصى؛ استخدم next_offset لطلب صفحة أخرى.",
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.find_duplicates(\n    subject={\n        \"type\": \"user\",\n        \"uuid\": \"5b9a0000-0000-4000-8000-00000000f00d\",\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.findDuplicates({\n  subject: {\n    type: \"user\",\n    uuid: \"5b9a0000-0000-4000-8000-00000000f00d\",\n  },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.FindDuplicates(ctx, didit.CaseDuplicateCaseDuplicateQueryRequest{\n\tSubject: didit.Some(didit.CaseDuplicateCaseSubjectInputRequest{\n\t\tType: didit.CaseDuplicateTypeEnum(\"user\"),\n\t\tUUID: \"5b9a0000-0000-4000-8000-00000000f00d\",\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CaseDuplicateCaseDuplicateQueryRequest;\nimport me.didit.types.CaseDuplicateCaseSubjectInputRequest;\nimport me.didit.types.CaseDuplicateTypeEnum;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().findDuplicates(CaseDuplicateCaseDuplicateQueryRequest.builder()\n        .subject(CaseDuplicateCaseSubjectInputRequest.builder()\n                .type(CaseDuplicateTypeEnum.of(\"user\"))\n                .uuid(\"5b9a0000-0000-4000-8000-00000000f00d\")\n                .build())\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->findDuplicates([\n    'subject' => [\n        'type' => 'user',\n        'uuid' => '5b9a0000-0000-4000-8000-00000000f00d',\n    ],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.find_duplicates(\n  subject: {\n    type: \"user\",\n    uuid: \"5b9a0000-0000-4000-8000-00000000f00d\",\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.FindDuplicatesAsync(new CaseDuplicateCaseDuplicateQueryRequest\n{\n    Subject = new CaseDuplicateCaseSubjectInputRequest\n    {\n        Type = \"user\",\n        Uuid = \"5b9a0000-0000-4000-8000-00000000f00d\",\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/preview/": {
      "post": {
        "summary": "توجيه حالة الاختبار",
        "description": "يتطلب `read:cases` للتطبيق المطلوب. يقيّم القواعد الحالية أو مسودة مقدّمة مقابل صلاحيات وصول المراجعين الحالية وتوافرهم ومهاراتهم وقدراتهم الاستيعابية. ولا يحفظ المسودة أو يحجز قدرة المراجعين الاستيعابية.",
        "operationId": "preview_case_routing",
        "x-didit-sdk": {
          "resource": "cases.routing_rules",
          "method": "preview",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "responses": {
          "200": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseRoutingPreview"
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseRoutingPreviewRequest"
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.preview(\n    source=\"MANUAL\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.preview({\n  source: \"MANUAL\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Preview(ctx, didit.CaseRoutingPreviewRequest{\n\tSource: \"MANUAL\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.CaseRoutingPreviewRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().preview(CaseRoutingPreviewRequest.builder()\n        .source(CaseRoutingPreviewRequest.Source.of(\"MANUAL\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->routingRules->preview([\n    'source' => 'MANUAL',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.preview(source: \"MANUAL\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.PreviewAsync(new CaseRoutingPreviewRequest\n{\n    Source = \"MANUAL\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/reviewers/": {
      "get": {
        "summary": "سرد مراجعي الحالات المؤهلين",
        "description": "يتطلب `list:cases` للتطبيق المطلوب.",
        "operationId": "list_case_reviewers",
        "x-didit-sdk": {
          "resource": "cases",
          "method": "list_reviewers",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Case Assignment"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "responses": {
          "200": {
            "description": "نجاح",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "مدخلات غير صالحة."
          },
          "403": {
            "description": "الإذن غير كافٍ."
          },
          "503": {
            "description": "تعذر التحقق من صلاحيات المراجِع. أعد المحاولة لاحقاً."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.list_reviewers()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.listReviewers();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ListReviewers(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().listReviewers();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->listReviewers();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.list_reviewers\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ListReviewersAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/history/": {
      "get": {
        "operationId": "list_case_blueprint_history",
        "x-didit-sdk": {
          "resource": "cases.blueprints",
          "method": "list_history",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "blueprint_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "أي حقل يُستخدم عند ترتيب النتائج.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "عدد النتائج المراد إرجاعها لكل صفحة.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "الفهرس الأولي الذي يبدأ منه إرجاع النتائج.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Case Management"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CasePublicationPaginatedPolicyRevisionList"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "إذن الحالة المطلوب مفقود."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.blueprints.list_history(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.blueprints.listHistory(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Blueprints.ListHistoryAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesBlueprintsListHistoryParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().blueprints().listHistory(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\nforeach ($didit->cases->blueprints->listHistory('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.blueprints.list_history(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Blueprints.ListHistoryAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/": {
      "get": {
        "summary": "تنزيل مستند موقّع",
        "description": "تنزيل ملف PDF الموقّع لمستند واحد من خطوة التوقيع الإلكتروني. استخدم مسار `signed_file` في `signatures[].documents[]` ضمن القرار. يحتوي ملف PDF على المستند الذي عُرض على الموقِّع مع ختم قيم حقوله وصفحة الأدلة (ما لم يتم إيقاف تشغيل `signature_evidence_page`). يحمل ملف PDF لتوقيع متقدم (AES) أيضاً توقيع PAdES مع طابعه الزمني؛ بينما لا يحتوي ملف PDF لتوقيع بسيط على توقيع رقمي أو ختم أو طابع زمني. تتحقق Didit من الملف بمطابقته مع `sha256_signed` قبل إرجاعه.\n\nيعمل مع جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB). يتطلب `read:sessions`؛ ومفتاح API الخاص بك يعمل. راجع [تقرير التوقيع الإلكتروني](/ar/core-technology/electronic-signature/report-electronic-signature#تنزيل-المستندات-الموقعة).",
        "operationId": "get_v3_session_signature_document_file",
        "x-didit-sdk": {
          "resource": "sessions.signatures",
          "method": "download_document",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "description": "خطوة التوقيع الإلكتروني: `node_id` الخاص بالعنصر في `signatures[]`.",
            "schema": {
              "type": "string",
              "example": "feature_signature"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "description": "`id` للمستند في `signatures[].documents[]`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "ملف PDF الموقّع.",
            "headers": {
              "Content-Disposition": {
                "description": "مرفق باسم الملف.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=\"agreement-signed.pdf\""
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة، أو بيانات اعتماد لا يمكنها قراءة هذه الجلسة. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "You do not have permission to perform this action."
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد مستند موقّع مطابق: الجلسة أو الخطوة أو المستند غير موجود، أو تم حذفه، أو لم يتم توقيعه بعد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not signed yet": {
                    "summary": "لم يوقّع الموقّع بعد",
                    "value": {
                      "code": "signature_not_signed",
                      "detail": "signature_not_signed"
                    }
                  },
                  "Unknown document": {
                    "summary": "لا يوجد مستند كهذا في هذه الخطوة",
                    "value": {
                      "code": "signature_not_found",
                      "detail": "signature_not_found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "الملف المخزن لم يعد يطابق تجزئة SHA-256 المسجلة له. لم يتم إرجاع أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Changed file": {
                    "summary": "الملف المخزن لا يتطابق مع التجزئة (hash) الخاصة به",
                    "value": {
                      "code": "signature_document_changed",
                      "detail": "signature_document_changed"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.signatures.download_document(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"feature_signature\",\n    \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.signatures.downloadDocument(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_signature\",\n  \"11111111-2222-3333-4444-555555555555\",\n);\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Signatures.DownloadDocument(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().signatures().downloadDocument(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\n        .writeTo(Path.of(\"download.pdf\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->sessions->signatures->downloadDocument('11111111-2222-3333-4444-555555555555', 'feature_signature', '11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.pdf');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.signatures.download_document(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_signature\",\n  \"11111111-2222-3333-4444-555555555555\"\n)\nFile.binwrite(\"download.pdf\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.Signatures.DownloadDocumentAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.pdf\");"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/signatures/{nodeId}/evidence/": {
      "get": {
        "summary": "تنزيل أدلة التوقيع",
        "description": "تنزيل ملف PDF لأدلة الموقِّع: المستوى والتنسيق، والموقِّع، وعنوان IP، وكل مستند مع تجزئة SHA-256 الأصلية وقيم الحقول وتجزئة SHA-256 لكل ملف موقّع، بالإضافة إلى جلسة الهوية التي تم التحقق منها وتأكيد الرمز والشهادة والطابع الزمني بالنسبة للتوقيع المتقدم (AES). استخدم مسار `evidence_file` لعنصر الموقِّع في `signatures[]`.\n\nمرِّر دائماً `signature_id` عندما تتضمن خطوة التحقق من الشركات (KYB) عدة موقّعين: فبدونه، يختار المسار أحد موقّعي الخطوة. يتطلب `read:sessions`؛ ومفتاح API الخاص بك يعمل.",
        "operationId": "get_v3_session_signature_evidence",
        "x-didit-sdk": {
          "resource": "sessions.signatures",
          "method": "download_evidence",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "description": "خطوة التوقيع الإلكتروني: `node_id` الخاص بالعنصر في `signatures[]`.",
            "schema": {
              "type": "string",
              "example": "feature_signature"
            }
          },
          {
            "name": "signature_id",
            "in": "query",
            "required": false,
            "description": "`id` لعنصر الموقِّع في `signatures[]`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "ملف PDF الخاص بالأدلة.",
            "headers": {
              "Content-Disposition": {
                "description": "مرفق باسم الملف.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=\"signature-evidence.pdf\""
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة، أو بيانات اعتماد لا يمكنها قراءة هذه الجلسة. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "You do not have permission to perform this action."
                }
              }
            }
          },
          "404": {
            "description": "لا توجد أدلة مطابقة: الجلسة أو الخطوة أو الموقّع غير موجود، أو تم حذفه، أو لم يوقّع بعد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not signed yet": {
                    "summary": "لم يوقّع الموقّع بعد",
                    "value": {
                      "code": "signature_not_signed",
                      "detail": "signature_not_signed"
                    }
                  },
                  "Unknown signer": {
                    "summary": "لا يوجد توقيع كهذا في هذه الخطوة",
                    "value": {
                      "code": "signature_not_found",
                      "detail": "signature_not_found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "الملف المخزن لم يعد يطابق تجزئة SHA-256 المسجلة له. لم يتم إرجاع أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Changed file": {
                    "summary": "الملف المخزن لا يتطابق مع التجزئة (hash) الخاصة به",
                    "value": {
                      "code": "signature_document_changed",
                      "detail": "signature_document_changed"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.signatures.download_evidence(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"feature_signature\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.signatures.downloadEvidence(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_signature\",\n);\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Signatures.DownloadEvidence(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", didit.SessionsSignaturesDownloadEvidenceParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().signatures().downloadEvidence(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\")\n        .writeTo(Path.of(\"download.pdf\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->sessions->signatures->downloadEvidence('11111111-2222-3333-4444-555555555555', 'feature_signature');\n$content->saveTo('download.pdf');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.signatures.download_evidence(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_signature\"\n)\nFile.binwrite(\"download.pdf\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.Signatures.DownloadEvidenceAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\");\nawait content.SaveToAsync(\"download.pdf\");"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/signatures/{nodeId}/fields/{fieldId}/image/": {
      "get": {
        "summary": "تنزيل صورة التوقيع",
        "description": "تنزيل التوقيع أو الأحرف الأولى التي وضعها الموقِّع على حقل ما، بصيغة PNG. استخدم `image_url` للحقل في `signatures[].documents[].fields[]`. يتطلب `read:sessions`؛ ومفتاح API الخاص بك يعمل.",
        "operationId": "get_v3_session_signature_field_image",
        "x-didit-sdk": {
          "resource": "sessions.signatures",
          "method": "download_field_image",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "description": "خطوة التوقيع الإلكتروني: `node_id` الخاص بالعنصر في `signatures[]`.",
            "schema": {
              "type": "string",
              "example": "feature_signature"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "description": "الحقل الموجود في نسخة هذا الموقّع، كما هو في `image_url` الخاص بالحقل.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "الصورة.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "الصورة المخزنة لم تعد تطابق تجزئة SHA-256 المسجلة لها.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": "signature_document_changed",
                  "detail": "signature_document_changed"
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة، أو بيانات اعتماد لا يمكنها قراءة هذه الجلسة. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "You do not have permission to perform this action."
                }
              }
            }
          },
          "404": {
            "description": "لا توجد صورة مطابقة: الجلسة أو الخطوة أو الحقل غير موجود، أو تم حذفه، أو لا يحتوي على توقيع أو أحرف أولى مطبقة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Unknown field": {
                    "summary": "لا يوجد حقل كهذا",
                    "value": {
                      "code": "signature_field_not_found",
                      "detail": "signature_field_not_found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.signatures.download_field_image(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"feature_signature\",\n    \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.png\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.signatures.downloadFieldImage(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_signature\",\n  \"11111111-2222-3333-4444-555555555555\",\n);\nawait writeFile(\"download.png\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Signatures.DownloadFieldImage(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.png\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().signatures().downloadFieldImage(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\n        .writeTo(Path.of(\"download.png\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->sessions->signatures->downloadFieldImage('11111111-2222-3333-4444-555555555555', 'feature_signature', '11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.png');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.signatures.download_field_image(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_signature\",\n  \"11111111-2222-3333-4444-555555555555\"\n)\nFile.binwrite(\"download.png\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.Signatures.DownloadFieldImageAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.png\");"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/signatures/{nodeId}/validate/": {
      "post": {
        "summary": "التحقق من صحة التواقيع مرة أخرى",
        "description": "إعادة التحقق من المستندات الموقعة في خطوة التوقيع الإلكتروني. تعيد Didit قراءة كل ملف PDF موقع، وتتحقق من قيمة SHA-256 الخاصة به، وبالنسبة للتوقيع المتقدم (AES)، تتحقق من توقيع PAdES، والشهادة، وبيانات الإلغاء، والطابع الزمني (لا يحتوي التوقيع البسيط على توقيع رقمي، لذا يتم التحقق من سلامة الملف فقط)، ثم تحفظ النتيجة في حقل `validation` الخاص بكل موقع وتُرجع العناصر المحدثة. لا تتم إعادة توقيع أي شيء. أرسل `signature_id` للتحقق من موقع واحد؛ وبدونه، يتم فحص كل موقع في الخطوة، ويفشل الاستدعاء إذا لم يوقع أي منهم.\n\nيتطلب الإذن `write:sessions`؛ يعمل مفتاح API الخاص بك. في لوحة التحكم، هذا هو زر **Validate again**.",
        "operationId": "post_v3_session_signature_validate",
        "x-didit-sdk": {
          "resource": "sessions.signatures",
          "method": "validate",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "description": "خطوة التوقيع الإلكتروني: `node_id` الخاص بالعنصر في `signatures[]`.",
            "schema": {
              "type": "string",
              "example": "feature_signature"
            }
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "signature_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "`id` لعنصر أحد الموقّعين في `signatures[]`."
                  }
                }
              },
              "example": {
                "signature_id": "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "الموقعون الذين تم فحصهم، مع تحديث `validation` الخاص بهم.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "signatures": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SignatureResult"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "ملف PDF موقع ومخزّن لم يعد يطابق SHA-256 المسجل عند توقيعه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Document changed": {
                    "summary": "ملف موقع لم يعد يطابق تجزئته",
                    "value": {
                      "code": "signature_document_changed",
                      "detail": "signature_document_changed"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة، أو بيانات اعتماد لا يمكنها قراءة هذه الجلسة. يؤدي المفتاح المفقود إلى إرجاع `403`؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "You do not have permission to perform this action."
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد توقيع مطابق: الجلسة أو الخطوة أو الموقّع غير موجود أو تم حذفه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Unknown signer": {
                    "summary": "لا يوجد توقيع كهذا في هذه الخطوة",
                    "value": {
                      "code": "signature_not_found",
                      "detail": "signature_not_found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "موقّع الخطوة لم يوقّع بعد، لذا لا يوجد شيء للتحقق منه.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not signed": {
                    "summary": "الموقّع لم يوقّع بعد",
                    "value": {
                      "code": "signature_not_signed",
                      "detail": "signature_not_signed"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.signatures.validate(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"feature_signature\",\n    signature_id=\"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.signatures.validate(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_signature\",\n  {\n    signature_id: \"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\",\n  },\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Signatures.Validate(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", didit.SessionsSignaturesValidateParams{\n\tSignatureID: didit.String(\"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsSignaturesValidateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().signatures().validate(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", SessionsSignaturesValidateParams.builder()\n        .signatureId(\"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->signatures->validate('11111111-2222-3333-4444-555555555555', 'feature_signature', [\n    'signature_id' => '0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.signatures.validate(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"feature_signature\",\n  signature_id: \"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Signatures.ValidateAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", new SessionsSignaturesValidateParams\n{\n    SignatureId = \"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/document-ai/{sessionId}/documents/{documentUuid}/": {
      "patch": {
        "summary": "تحديث مستند في Document AI",
        "description": "صحّح الحقول التي استخرجها Document AI من مستند واحد تم رفعه، أو اضبط حالة مراجعته، أو كلاهما، في جلسة KYC أو KYB. يجب أن يكون `extracted_data` كائن JSON ويتم دمجه مفتاحاً بمفتاح: المفتاح الذي ترسله يحل محل القيمة المخزنة (المفتاح المرسل كـ `null` يُخزّن كـ `null`) والمفاتيح التي تتجاهلها تحتفظ بقيمها. تُغذي حالة المستند نتيجة Document AI لعقدة سير العمل الخاصة به في قرار الجلسة؛ ولا يُعاد احتساب حالة الجلسة نفسها. يُرسل كل استدعاء ناجح، بما في ذلك الاستدعاء الذي لا يغير أي شيء، [webhook](https://docs.didit.me/ar/integration/webhooks) بالحدث `data.updated` والمُشغِّل `manual_review`. يحتاج مفتاح API ذو نطاق محدد إلى `decisions: write`؛ راجع [Document AI](https://docs.didit.me/ar/core-technology/document-ai/overview).",
        "operationId": "patch_v3_document_ai_document",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_document_ai_data",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق (`session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`). يقبل معرّفات جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB): يطابق الخادم المعرّف عبر كلا نوعي الجلسات. يجب أن يكون UUID صالح البنية؛ تؤدي القيمة غير صالحة البنية إلى عدم مطابقة المسار وإرجاع `404` بتنسيق HTML.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "documentUuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لمستند Document AI (`document_ai_documents[].items[].uuid` في `GET /v3/session/{sessionId}/decision/`). يجب أن ينتمي إلى الجلسة الموجودة في المسار.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "44444444-5555-6666-7777-888888888888"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "extracted_data": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "مفاتيح الحقول (المفاتيح التي قمت بتهيئتها للمستند) وقيمها المصححة. يجب أن تكون كائن JSON؛ وتُدمج مفتاحاً بمفتاح في البيانات المخزنة. لا تُرسلها بدلاً من إرسال `null`، حيث يؤدي ذلك إلى إرجاع `400`.",
                    "example": {
                      "invoice_number": "INV-2026-0042"
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "Approved",
                      "Declined",
                      "In Review",
                      "Not Finished"
                    ],
                    "description": "حالة المراجعة الجديدة للمستند.",
                    "example": "Approved"
                  }
                }
              },
              "example": {
                "extracted_data": {
                  "invoice_number": "INV-2026-0042"
                },
                "status": "Approved"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/document-ai/11111111-2222-3333-4444-555555555555/documents/44444444-5555-6666-7777-888888888888/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"extracted_data\": {\"invoice_number\": \"INV-2026-0042\"}, \"status\": \"Approved\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_document_ai_data(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"44444444-5555-6666-7777-888888888888\",\n    extracted_data={\"invoice_number\": \"INV-2026-0042\"},\n    status=\"Approved\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateDocumentAiData(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"44444444-5555-6666-7777-888888888888\",\n  {\n    extracted_data: { invoice_number: \"INV-2026-0042\" },\n    status: \"Approved\",\n  },\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateDocumentAiData(ctx, \"11111111-2222-3333-4444-555555555555\", \"44444444-5555-6666-7777-888888888888\", didit.SessionsUpdateDocumentAiDataParams{\n\tExtractedData: didit.Some(map[string]any{\"invoice_number\": \"INV-2026-0042\"}),\n\tStatus:        didit.Some(didit.SessionsUpdateDocumentAiDataParamsStatus(\"Approved\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUpdateDocumentAiDataParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateDocumentAiData(\"11111111-2222-3333-4444-555555555555\", \"44444444-5555-6666-7777-888888888888\", SessionsUpdateDocumentAiDataParams.builder()\n        .extractedData(Map.of(\"invoice_number\", \"INV-2026-0042\"))\n        .status(SessionsUpdateDocumentAiDataParams.Status.of(\"Approved\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateDocumentAiData('11111111-2222-3333-4444-555555555555', '44444444-5555-6666-7777-888888888888', [\n    'extracted_data' => ['invoice_number' => 'INV-2026-0042'],\n    'status' => 'Approved',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_document_ai_data(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"44444444-5555-6666-7777-888888888888\",\n  extracted_data: { invoice_number: \"INV-2026-0042\" },\n  status: \"Approved\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateDocumentAiDataAsync(\"11111111-2222-3333-4444-555555555555\", \"44444444-5555-6666-7777-888888888888\", new SessionsUpdateDocumentAiDataParams\n{\n    ExtractedData = new Dictionary<string, object> { [\"invoice_number\"] = \"INV-2026-0042\" },\n    Status = new SessionsUpdateDocumentAiDataParamsStatus(\"Approved\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تحديث المستند. يُرجع المستند بعد الدمج.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "uuid",
                    "document_key",
                    "original_filename",
                    "file_url",
                    "status",
                    "extracted_data"
                  ],
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف المستند."
                    },
                    "document_key": {
                      "type": "string",
                      "description": "المستند المُعَدّ الذي يتوافق معه هذا الرفع."
                    },
                    "original_filename": {
                      "type": "string",
                      "nullable": true,
                      "description": "اسم الملف الذي رُفع به المستند."
                    },
                    "file_url": {
                      "type": "string",
                      "nullable": true,
                      "description": "مسار تخزين الملف المرفوع. هذا ليس رابط تنزيل: اقرأ `file_url` الموقّع مسبقاً من قرار الجلسة لتنزيل الملف."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Not Finished",
                        "Approved",
                        "Declined",
                        "In Review",
                        "Resub Requested"
                      ],
                      "description": "حالة مراجعة المستند."
                    },
                    "extracted_data": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "جميع الحقول المستخرجة بعد الدمج، مفهرسة حسب مفتاح الحقل."
                    }
                  }
                },
                "example": {
                  "uuid": "44444444-5555-6666-7777-888888888888",
                  "document_key": "invoice",
                  "original_filename": "invoice-2026-09.pdf",
                  "file_url": "document_ai/11111111-2222-3333-4444-555555555555-66666666-7777-8888-9999-000000000000.pdf",
                  "status": "Approved",
                  "extracted_data": {
                    "invoice_number": "INV-2026-0042",
                    "total_amount": 1250.0,
                    "issue_date": "2026-09-01"
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق، يتم فحصه قبل البحث عن المستند: قيمة `status` ليست من القيم المسموح بها، أو تم إرسال `extracted_data` كـ `null`.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid status": {
                    "summary": "status ليس ضمن التعداد",
                    "value": {
                      "status": [
                        "\"Rejected\" is not a valid choice."
                      ]
                    }
                  },
                  "Null extracted_data": {
                    "summary": "extracted_data بقيمة null",
                    "value": {
                      "extracted_data": [
                        "This field may not be null."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو أنها خارج حدود مفتاح ذي نطاق محدد، أو لا يوجد مستند حالي بمعرّف UUID هذا ينتمي إليها. يتم البحث عن الجلسة قبل التحقق من بيانات الاعتماد، لذلك فإن معرّف `sessionId` غير المعروف يُعيد `404` حتى بدون مفتاح صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف، أو أنها حُذفت",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside key limits": {
                    "summary": "الجلسة خارج حدود مفتاح ذي نطاق محدد (تُعاد أيضاً للجلسة المحذوفة منذ لحظات)",
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "Unknown document": {
                    "summary": "documentUuid لا ينتمي إلى الجلسة",
                    "value": {
                      "detail": "Document AI document not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/aml/dataset-freshness/": {
      "get": {
        "summary": "الحصول على حداثة مجموعة بيانات AML",
        "description": "عرض مدى حداثة مجموعات البيانات المستخدمة في فحص AML، لكل فئة مصادر (`sanctions` و`pep` و`warnings` و`adverse_media`)، كدليل تدقيق لـ [مراقبة AML المستمرة](https://docs.didit.me/ar/core-technology/aml-screening/continuous-monitoring-aml-screening#إثبات-تشغيل-المراقبة). الإجابة على مستوى المنصة بالكامل: لا توجد جلسة في المسار، ولا توجد بيانات عميل في نص الطلب، وهي نفس الإجابة لكل تطبيق.\n\nتكون النتيجة دائماً `200` للمفتاح المقبول. تحقق من `availability` أولاً: عندما لا تكون `available`، تكون قيمة `dataset_freshness` هي `null`. لا يتم تقدير التواريخ أبداً: الفئة التي لم تبلغ مجموعات بياناتها عن أي تاريخ تكون غير موجودة في `sources`، والفئة التي أبلغت بعض مجموعات بياناتها فقط عن تاريخ تكون قيمة `oldest_updated_at: null` فيها. تؤخذ القراءات أثناء تشغيل المراقبة المستمرة، وليس عند كل استدعاء؛ ويوضح `captured_at` وقت أخذها.\n\nيحتاج مفتاح API محدد النطاق إلى إذن `sessions: read`؛ ولا يمكن لمفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة استدعاء هذا الـ endpoint. لا يتم احتساب أي تكلفة.",
        "operationId": "get_aml_dataset_freshness",
        "x-didit-sdk": {
          "resource": "aml",
          "method": "retrieve_dataset_freshness",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/aml/dataset-freshness/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.aml.retrieve_dataset_freshness()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.aml.retrieveDatasetFreshness();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AML.RetrieveDatasetFreshness(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.aml().retrieveDatasetFreshness();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->aml->retrieveDatasetFreshness();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.aml.retrieve_dataset_freshness\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Aml.RetrieveDatasetFreshnessAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "أحدث قراءة لحداثة مجموعة البيانات، أو `null` مع توضيح السبب.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dataset_freshness",
                    "availability"
                  ],
                  "properties": {
                    "dataset_freshness": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/AMLDatasetFreshness"
                        }
                      ],
                      "nullable": true,
                      "description": "أحدث قراءة، أو `null` عندما لا تكون `availability` بالقيمة `available`."
                    },
                    "availability": {
                      "type": "string",
                      "enum": [
                        "available",
                        "not_configured",
                        "not_yet_collected"
                      ],
                      "description": "`available` عند وجود قراءة؛ و`not_configured` عندما لا يتم جمع تواريخ مجموعة البيانات في هذه البيئة؛ و`not_yet_collected` عند إعداد الجمع ولكن لا توجد قراءة بعد."
                    }
                  }
                },
                "examples": {
                  "Available": {
                    "value": {
                      "dataset_freshness": {
                        "captured_at": "2026-10-17T06:00:12.345678+00:00",
                        "provider": "aml_data_source",
                        "catalog_version": "20261017054500-abc",
                        "sources": {
                          "sanctions": {
                            "last_updated_at": "2026-10-17T04:10:00+00:00",
                            "oldest_updated_at": "2026-10-15T22:30:00+00:00",
                            "dataset_count": 48,
                            "dated_dataset_count": 48
                          },
                          "pep": {
                            "last_updated_at": "2026-10-16T23:05:00+00:00",
                            "oldest_updated_at": null,
                            "dataset_count": 12,
                            "dated_dataset_count": 11
                          }
                        }
                      },
                      "availability": "available"
                    }
                  },
                  "Not collected yet": {
                    "value": {
                      "dataset_freshness": null,
                      "availability": "not_yet_collected"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API. المفتاح الذي تم إنشاؤه مع تاريخ انتهاء هو فقط الذي يمكن أن تنتهي صلاحيته؛ بعد هذا التاريخ، تجيب جميع الطلبات باستخدامه بـ `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. يتلقى المفتاح المفقود الرسالة العامة؛ بينما يتلقى المفتاح الخاطئ أو الملغى أو منتهي الصلاحية الرمز `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without sessions read": {
                    "value": {
                      "detail": "This API key has no read access to sessions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the key's IP list": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 600 طلب GET في الدقيقة باستخدام مفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني حتى إعادة تعيين النافذة الحالية البالغة دقيقة واحدة.",
                "schema": {
                  "type": "integer",
                  "example": 23
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها في الدقيقة ضمن هذه الميزانية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix عند إعادة تعيين النافذة.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/lists/": {
      "get": {
        "summary": "عرض القوائم",
        "description": "يعرض قوائم التطبيق، بدءاً من الأحدث: قوائم النظام التي يوفرها Didit (قائمة حظر واحدة لكل نوع مدخلة، والقائمة المخصصة **High Risk Countries**، وأي قائمة سماح تابعة للنظام) وقوائم السماح والقوائم المخصصة التي أنشأتها. يمكنك التصفية باستخدام `list_type` و`entry_type`؛ لا تظهر القوائم المحذوفة مطلقاً. النتائج مقسمة إلى صفحات باستخدام `limit` و`offset`. يتطلب مفتاح API محدد النطاق صلاحية `workflows: read`. راجع [القوائم](https://docs.didit.me/ar/management-api/lists/overview) لمعرفة وظيفة كل نوع قائمة.",
        "operationId": "list_lists",
        "x-didit-sdk": {
          "resource": "lists",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "parameters": [
          {
            "name": "list_type",
            "in": "query",
            "required": false,
            "description": "القوائم من هذا النوع فقط.",
            "schema": {
              "type": "string",
              "enum": [
                "blocklist",
                "allowlist",
                "custom"
              ]
            }
          },
          {
            "name": "entry_type",
            "in": "query",
            "required": false,
            "description": "القوائم من نوع الإدخال هذا فقط.",
            "schema": {
              "type": "string",
              "enum": [
                "face",
                "document",
                "phone",
                "email",
                "ip_address",
                "device_fingerprint",
                "wallet_address",
                "bank_account",
                "country",
                "user",
                "business",
                "key"
              ]
            }
          },
          {
            "name": "ordering",
            "in": "query",
            "required": false,
            "description": "ترتيب الفرز: `-created_at` (الأحدث أولاً، وهو الافتراضي) أو `created_at` (الأقدم أولاً).",
            "schema": {
              "type": "string",
              "enum": [
                "-created_at",
                "created_at"
              ],
              "default": "-created_at"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "حجم الصفحة. القيمة الافتراضية 50. القيمة الأعلى من 1000000 تُرجع `400`؛ والقيمة الصفرية أو السالبة أو غير الرقمية ترجع إلى 50.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "فهرس يستند إلى الصفر للعنصر الأول المراد إرجاعه. يُفضل اتباع `next`. القيمة التي تزيد عن 1000000 تُرجع `400`؛ والقيمة السالبة أو غير الرقمية ترجع تلقائياً إلى 0.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/lists/?list_type=blocklist' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.lists.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.lists.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Lists.ListAutoPaging(ctx, didit.ListsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.lists().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->lists->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.lists.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Lists.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة من القوائم.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العدد الإجمالي للقوائم المطابقة للمرشحات."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ComplianceList"
                      }
                    }
                  }
                },
                "examples": {
                  "Lists": {
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "22222222-3333-4444-5555-666666666666",
                          "name": "Trusted office IPs",
                          "description": "Office egress ranges",
                          "list_type": "allowlist",
                          "entry_type": "ip_address",
                          "is_system": false,
                          "entry_count": 3,
                          "last_entry_added_at": "2026-10-02T08:15:27.501334Z",
                          "created_at": "2026-09-30T13:20:45.889120Z",
                          "updated_at": "2026-09-30T13:20:45.889120Z"
                        },
                        {
                          "uuid": "11111111-2222-3333-4444-555555555555",
                          "name": "Face Blocklist",
                          "description": "Blocked biometric faces. When a face matching an entry in this list is detected during liveness verification, the session will be automatically declined.",
                          "list_type": "blocklist",
                          "entry_type": "face",
                          "is_system": true,
                          "entry_count": 12,
                          "last_entry_added_at": "2026-10-09T16:42:03.118204Z",
                          "created_at": "2026-01-14T10:02:11.402917Z",
                          "updated_at": "2026-01-14T10:02:11.402917Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "أحد معاملات الاستعلام غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown list type": {
                    "value": {
                      "list_type": [
                        "\"denylist\" is not a valid choice."
                      ]
                    }
                  },
                  "Unsupported ordering": {
                    "value": {
                      "ordering": [
                        "\"name\" is not a valid choice."
                      ]
                    }
                  },
                  "Limit too large": {
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: read` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no read access to workflows."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد القراءة المشترك البالغ 600 طلب في الدقيقة لكل مفتاح API. التزم بالمدة المحددة في `Retry-After` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "أنشئ قائمة",
        "description": "ينشئ قائمة سماح أو قائمة مخصصة في التطبيق الذي ينتمي إليه مفتاح API. لا يمكن إنشاء قوائم الحظر: يوفّر Didit قائمة حظر نظام واحدة لكل نوع مدخلة، وتضيف إليها عبر [إنشاء مدخلة قائمة](https://docs.didit.me/ar/management-api/lists/create-entry). لا يمكن تغيير `entry_type` بعد الإنشاء وهو يحدد كيفية التحقق من قيم المدخلات ومطابقتها. تميّز مدخلات قائمة السماح العناصر المتطابقة على أنها موثوقة (على سبيل المثال، تتخطى قائمة سماح الوجوه إجراء الوجه المكرر) ولا تتجاوز أبداً تطابق قائمة الحظر؛ قم بالإشارة إلى أي قائمة من شرط قاعدة سير العمل أو قاعدة المعاملة باستخدام `value_type: \"list\"`. يتطلب مفتاح API محدد النطاق إذن `workflows: write`.",
        "operationId": "create_list",
        "x-didit-sdk": {
          "resource": "lists",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "list_type",
                  "entry_type"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "اسم القائمة. يجب أن يختلف عن اسم كل قائمة أخرى في التطبيق، بما في ذلك قوائم النظام."
                  },
                  "description": {
                    "type": "string",
                    "default": "",
                    "description": "وصف اختياري بنص حر."
                  },
                  "list_type": {
                    "type": "string",
                    "enum": [
                      "allowlist",
                      "custom"
                    ],
                    "description": "`allowlist` أو `custom`. ويتم رفض `blocklist` بالرمز `400`."
                  },
                  "entry_type": {
                    "type": "string",
                    "enum": [
                      "face",
                      "document",
                      "phone",
                      "email",
                      "ip_address",
                      "device_fingerprint",
                      "wallet_address",
                      "bank_account",
                      "country",
                      "user",
                      "business",
                      "key"
                    ],
                    "description": "ما تحتويه القائمة: `face`، أو `document` (رقم المستند)، أو `phone`، أو `email`، أو `ip_address` (عنوان IP أو نطاق CIDR)، أو `device_fingerprint`، أو `wallet_address`، أو `bank_account`، أو `country` (وفق معيار ISO 3166-1 alpha-3)، أو `user` أو `business` (الخاص بـ `vendor_data` لديك)، أو `key` (أي سلسلة نصية). وتحدد هذه القيمة كيفية التحقق من صحة قيم الإدخال ومطابقتها. لا يمكن تغييرها لاحقاً."
                  }
                }
              },
              "examples": {
                "IP allowlist": {
                  "value": {
                    "name": "Trusted office IPs",
                    "description": "Office egress ranges",
                    "list_type": "allowlist",
                    "entry_type": "ip_address"
                  }
                },
                "Custom country list": {
                  "value": {
                    "name": "Enhanced due diligence countries",
                    "list_type": "custom",
                    "entry_type": "country"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/lists/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"name\": \"Trusted office IPs\",\n    \"description\": \"Office egress ranges\",\n    \"list_type\": \"allowlist\",\n    \"entry_type\": \"ip_address\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.create(\n    name=\"Trusted office IPs\",\n    description=\"Office egress ranges\",\n    list_type=\"allowlist\",\n    entry_type=\"ip_address\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.create({\n  name: \"Trusted office IPs\",\n  description: \"Office egress ranges\",\n  list_type: \"allowlist\",\n  entry_type: \"ip_address\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Create(ctx, didit.ListsCreateParams{\n\tName:        \"Trusted office IPs\",\n\tDescription: didit.String(\"Office egress ranges\"),\n\tListType:    \"allowlist\",\n\tEntryType:   \"ip_address\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.ListsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().create(ListsCreateParams.builder()\n        .name(\"Trusted office IPs\")\n        .description(\"Office egress ranges\")\n        .listType(ListsCreateParams.ListType.of(\"allowlist\"))\n        .entryType(ListsCreateParams.EntryType.of(\"ip_address\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->lists->create([\n    'name' => 'Trusted office IPs',\n    'description' => 'Office egress ranges',\n    'list_type' => 'allowlist',\n    'entry_type' => 'ip_address',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.create(\n  name: \"Trusted office IPs\",\n  description: \"Office egress ranges\",\n  list_type: \"allowlist\",\n  entry_type: \"ip_address\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.CreateAsync(new ListsCreateParams\n{\n    Name = \"Trusted office IPs\",\n    Description = \"Office egress ranges\",\n    ListType = \"allowlist\",\n    EntryType = \"ip_address\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء القائمة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceList"
                },
                "examples": {
                  "New allowlist": {
                    "value": {
                      "uuid": "22222222-3333-4444-5555-666666666666",
                      "name": "Trusted office IPs",
                      "description": "Office egress ranges",
                      "list_type": "allowlist",
                      "entry_type": "ip_address",
                      "is_system": false,
                      "entry_count": 0,
                      "last_entry_added_at": null,
                      "created_at": "2026-10-12T09:15:44.031876Z",
                      "updated_at": "2026-10-12T09:15:44.031876Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "نص الطلب غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Blocklist refused": {
                    "value": {
                      "list_type": [
                        "Cannot create additional blocklist lists. System blocklists are auto-created for each application."
                      ]
                    }
                  },
                  "Duplicate name": {
                    "value": {
                      "name": [
                        "A list with this name already exists for this application."
                      ]
                    }
                  },
                  "Missing fields": {
                    "value": {
                      "name": [
                        "This field is required."
                      ],
                      "list_type": [
                        "This field is required."
                      ],
                      "entry_type": [
                        "This field is required."
                      ]
                    }
                  },
                  "Unknown entry type": {
                    "value": {
                      "entry_type": [
                        "\"iban\" is not a valid choice."
                      ]
                    }
                  },
                  "Name too long": {
                    "value": {
                      "name": [
                        "Ensure this field has no more than 255 characters."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: write` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no write access to workflows."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/lists/{list_uuid}/": {
      "get": {
        "summary": "الحصول على قائمة",
        "description": "يُرجع قائمة واحدة خاصة بالتطبيق مع عدد الإدخالات فيها ووقت إضافة أحدث إدخال لها. عند طلب قائمة تابعة لتطبيق آخر، أو قائمة محذوفة، يتم إرجاع `404`. يُرجع هذا الـ endpoint القائمة فقط: لقراءة قيمها، استخدم [عرض إدخالات القائمة](https://docs.didit.me/ar/management-api/lists/list-entries). يحتاج مفتاح API ذو نطاق محدد إلى `workflows: read`.",
        "operationId": "get_list",
        "x-didit-sdk": {
          "resource": "lists",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "parameters": [
          {
            "name": "list_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للقائمة، كما تم إرجاعه بواسطة سرد القوائم أو إنشاء قائمة.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->lists->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "القائمة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceList"
                },
                "examples": {
                  "System face blocklist": {
                    "value": {
                      "uuid": "11111111-2222-3333-4444-555555555555",
                      "name": "Face Blocklist",
                      "description": "Blocked biometric faces. When a face matching an entry in this list is detected during liveness verification, the session will be automatically declined.",
                      "list_type": "blocklist",
                      "entry_type": "face",
                      "is_system": true,
                      "entry_count": 12,
                      "last_entry_added_at": "2026-10-09T16:42:03.118204Z",
                      "created_at": "2026-01-14T10:02:11.402917Z",
                      "updated_at": "2026-01-14T10:02:11.402917Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: read` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no read access to workflows."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد قائمة بهذا المعرّف UUID في التطبيق المرتبط بمفتاح API، أو قد تم حذفها.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No List matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد القراءة المشترك البالغ 600 طلب في الدقيقة لكل مفتاح API. التزم بالمدة المحددة في `Retry-After` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث قائمة",
        "description": "إعادة تسمية قائمة أو تغيير وصفها. تتم قراءة `name` و`description` فقط؛ ويتم تجاهل أي حقل آخر، بحيث يحتفظ `list_type` و`entry_type` بالقيم التي أُنشئا بها. لا يمكن تعديل قوائم النظام وتُرجع `400`. تحتوي الاستجابة على `name` و`description` فقط: استدعِ [الحصول على قائمة](https://docs.didit.me/ar/management-api/lists/get) للحصول على القائمة الكاملة. يحتاج مفتاح API ذو النطاق المحدد إلى `workflows: write`.",
        "operationId": "update_list",
        "x-didit-sdk": {
          "resource": "lists",
          "method": "update",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "parameters": [
          {
            "name": "list_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للقائمة، كما تم إرجاعه بواسطة سرد القوائم أو إنشاء قائمة.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "الاسم الجديد. يجب أن يختلف عن اسم أي قائمة أخرى في التطبيق."
                  },
                  "description": {
                    "type": "string",
                    "description": "الوصف الجديد. أرسل سلسلة فارغة لمسحه."
                  }
                }
              },
              "examples": {
                "Rename": {
                  "value": {
                    "name": "Trusted office and VPN IPs"
                  }
                },
                "Rename and describe": {
                  "value": {
                    "name": "Trusted office and VPN IPs",
                    "description": "Office egress ranges and the corporate VPN"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\": \"Trusted office and VPN IPs\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.update(\n    \"11111111-2222-3333-4444-555555555555\",\n    name=\"Trusted office and VPN IPs\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.update(\"11111111-2222-3333-4444-555555555555\", {\n  name: \"Trusted office and VPN IPs\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsUpdateParams{\n\tName: didit.String(\"Trusted office and VPN IPs\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.ListsUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().update(\"11111111-2222-3333-4444-555555555555\", ListsUpdateParams.builder()\n        .name(\"Trusted office and VPN IPs\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->lists->update('11111111-2222-3333-4444-555555555555', [\n    'name' => 'Trusted office and VPN IPs',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.update(\n  \"11111111-2222-3333-4444-555555555555\",\n  name: \"Trusted office and VPN IPs\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new ListsUpdateParams\n{\n    Name = \"Trusted office and VPN IPs\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تحديث القائمة. يتم إرجاع الحقول القابلة للتعديل فقط.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name",
                    "description"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "اسم القائمة بعد التحديث."
                    },
                    "description": {
                      "type": "string",
                      "description": "وصف القائمة بعد التحديث."
                    }
                  }
                },
                "examples": {
                  "Renamed": {
                    "value": {
                      "name": "Trusted office and VPN IPs",
                      "description": "Office egress ranges"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "القائمة هي قائمة نظام، أو أن نص الطلب غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "System list": {
                    "value": {
                      "non_field_errors": [
                        "System lists cannot be modified."
                      ]
                    }
                  },
                  "Duplicate name": {
                    "value": {
                      "name": [
                        "A list with this name already exists for this application."
                      ]
                    }
                  },
                  "Blank name": {
                    "value": {
                      "name": [
                        "This field may not be blank."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: write` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no write access to workflows."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد قائمة بهذا المعرّف UUID في التطبيق المرتبط بمفتاح API، أو قد تم حذفها.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No List matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "summary": "حذف قائمة",
        "description": "يحذف قائمة سماح أو قائمة مخصصة جنباً إلى جنب مع مدخلاتها. الحذف لا يمكن التراجع عنه: لن تظهر القائمة ومدخلاتها بعد ذلك في أي عملية قراءة، كما أن شروط قواعد سير العمل والمعاملات التي تشير إلى القائمة ستعتبرها قائمة فارغة من ذلك الحين فصاعداً. تحتفظ الجلسات والمعاملات التي تم تقييمها بالفعل بنتائجها، ويمكن إعادة استخدام الاسم لقائمة جديدة. لا يمكن حذف قوائم النظام وتعيد الرمز `400`؛ لإفراغ إحداها، [احذف مدخلاتها](https://docs.didit.me/ar/management-api/lists/delete-entry). يتطلب مفتاح API محدد النطاق إذن `workflows: write`.",
        "operationId": "delete_list",
        "x-didit-sdk": {
          "resource": "lists",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "parameters": [
          {
            "name": "list_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للقائمة، كما تم إرجاعه بواسطة سرد القوائم أو إنشاء قائمة.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.lists.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.lists.delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Lists.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.lists().delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->lists->delete('11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.lists.delete(\"11111111-2222-3333-4444-555555555555\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Lists.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف القائمة ومدخلاتها. لا يوجد نص استجابة."
          },
          "400": {
            "description": "القائمة هي قائمة نظام.",
            "content": {
              "application/json": {
                "examples": {
                  "System list": {
                    "value": {
                      "detail": "System lists cannot be deleted."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: write` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no write access to workflows."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد قائمة بهذا المعرّف UUID في التطبيق المرتبط بمفتاح API، أو قد تم حذفها بالفعل.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No List matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/lists/{list_uuid}/entries/": {
      "get": {
        "summary": "عرض مدخلات القائمة",
        "description": "يعرض المدخلات الحالية لقائمة واحدة، بدءاً من الأحدث. يطابق `search` جزءاً من `value` أو `display_label` للمدخلة بصرف النظر عن حالة الأحرف، بينما يضيق `reference_session_id` النتائج لتقتصر على المدخلات المأخوذة من جلسة تحقق واحدة لشخص. عناوين URL للصور في `metadata` هي روابط URL موقعة ومؤقتة الصلاحية يُعاد إصدارها مع كل استدعاء؛ ويتلقى مفتاح API محدد النطاق بدون صلاحية `media: read` القيمة `null` بدلاً منها. يتطلب مفتاح API محدد النطاق صلاحية `workflows: read`.",
        "operationId": "list_list_entries",
        "x-didit-sdk": {
          "resource": "lists.entries",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "parameters": [
          {
            "name": "list_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للقائمة، كما تم إرجاعه بواسطة سرد القوائم أو إنشاء قائمة.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "نص غير حساس لحالة الأحرف يجب أن يحتوي عليه `value` أو `display_label` الخاص بالمدخلة.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference_session_id",
            "in": "query",
            "required": false,
            "description": "فقط الإدخالات المأخوذة من جلسة التحقق من الشخص هذه، على سبيل المثال لمعرفة أي من وجوهها مدرج بالفعل.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "حجم الصفحة. القيمة الافتراضية 50. القيمة الأعلى من 1000000 تُرجع `400`؛ والقيمة الصفرية أو السالبة أو غير الرقمية ترجع إلى 50.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "فهرس يستند إلى الصفر للعنصر الأول المراد إرجاعه. يُفضل اتباع `next`. القيمة التي تزيد عن 1000000 تُرجع `400`؛ والقيمة السالبة أو غير الرقمية ترجع تلقائياً إلى 0.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/entries/?search=example.com' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.lists.entries.list(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.lists.entries.list(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Lists.Entries.ListAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsEntriesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.lists().entries().list(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->lists->entries->list('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.lists.entries.list(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Lists.Entries.ListAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة من المدخلات، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العدد الإجمالي للإدخالات المطابقة للمرشحات."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ComplianceListEntry"
                      }
                    }
                  }
                },
                "examples": {
                  "Entries": {
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
                          "value": "X1234567",
                          "display_label": "Jane Doe - X1234567",
                          "comment": "",
                          "added_by": "api",
                          "reference_session_id": "33333333-4444-5555-6666-777777777777",
                          "reference_session_number": 1042,
                          "reference_session_type": "kyc",
                          "reference_object_uuid": "66666666-7777-8888-9999-000000000000",
                          "metadata": {
                            "full_name": "Jane Doe",
                            "issuing_state": "ESP",
                            "document_type": "ID",
                            "region": "",
                            "document_number": "X1234567"
                          },
                          "created_at": "2026-10-12T10:06:12.774915Z"
                        },
                        {
                          "uuid": "eeeeeeee-ffff-0000-1111-222222222222",
                          "value": "y7654321",
                          "display_label": "",
                          "comment": "Reported by a partner",
                          "added_by": "api",
                          "reference_session_id": null,
                          "reference_session_number": null,
                          "reference_session_type": null,
                          "reference_object_uuid": null,
                          "metadata": null,
                          "created_at": "2026-10-03T07:48:30.552810Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "أحد معاملات الاستعلام غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid session id": {
                    "value": {
                      "reference_session_id": [
                        "Must be a valid UUID."
                      ]
                    }
                  },
                  "Limit too large": {
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: read` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no read access to workflows."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد قائمة بهذا المعرّف UUID في التطبيق المرتبط بمفتاح API، أو قد تم حذفها.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "List not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد القراءة المشترك البالغ 600 طلب في الدقيقة لكل مفتاح API. التزم بالمدة المحددة في `Retry-After` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "أنشئ إدخالاً في القائمة",
        "description": "يضيف إدخالاً واحداً إلى القائمة بإحدى طرق ثلاث: عبر `value`؛ أو من جلسة تحقق باستخدام `reference_session_id`، حيث تقرأ Didit القيمة من أحدث سجل في الجلسة لنوع إدخال القائمة وتربط الإدخال به؛ أو عبر `value` مع `reference_object_uuid` و`metadata.reference_type` للإشارة إلى معاملة أو مستخدم أو شركة. في قوائم الحظر التابعة للنظام الخاصة بالوجه والمستند والهاتف والبريد الإلكتروني، يتم أيضاً تمييز السجل المقروء من الجلسة كمحظور، بحيث يتم رفض الجلسات المطابقة الجديدة؛ وفي قوائم الحظر التابعة للنظام الخاصة بالمستخدمين والشركات، يتم تعيين المستخدمين أو الشركات المطابقة إلى `BLOCKED`. لا يتم تغيير الجلسات والمعاملات التي انتهت بالفعل. يتطلب مفتاح API محدد النطاق `workflows: write`. راجع [إنشاء إدخال قائمة](https://docs.didit.me/ar/management-api/lists/create-entry) لكل وضع.",
        "operationId": "create_list_entry",
        "x-didit-sdk": {
          "resource": "lists.entries",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "parameters": [
          {
            "name": "list_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للقائمة المراد الإضافة إليها. بالنسبة للوجه الذي يتوفر لديك كصورة فقط، استخدم تحميل وجه إلى قائمة بدلاً من ذلك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "أرسل `value` أو `reference_session_id` أو كليهما. تعتمد الحقول المستخدمة على `entry_type` الخاص بالقائمة.",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "القيمة المراد إدراجها، ويتم التحقق منها وفقاً لـ `entry_type` الخاص بالقائمة: `email` عنوان بريد إلكتروني صالح؛ `phone` رقم دولي صالح، مخزن بتنسيق E.164؛ `ip_address` عنوان IP أو نطاق CIDR (على سبيل المثال `10.0.0.0/8`)؛ `device_fingerprint` 8 أحرف على الأقل من الحروف والأرقام و`-` و`_` و`:` و`.` (ترفض قائمة الحظر البصمة التي أبلغت عنها عدة أجهزة مختلفة)؛ `country` رمز ISO 3166-1 alpha-2 أو alpha-3، مخزن بتنسيق alpha-3؛ `user` و`business` هما `vendor_data`؛ وأي نوع آخر هو سلسلة نصية غير فارغة. تخزن بأحرف صغيرة باستثناء أرقام الهواتف ورموز الدول، وتحتفظ القائمة بكل قيمة مرة واحدة فقط (غير حساسة لحالة الأحرف). مطلوب ما لم يتم إرسال `reference_session_id`؛ ويجب تركه فارغاً عند استخدام `face_image_source` لالتقاط المستندات."
                  },
                  "reference_session_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "جلسة تحقق من شخص أو شركة تابعة لتطبيقك لأخذ القيمة منها. يقرأ Didit أحدث سجل للجلسة من نوع إدخال القائمة (`face` أو `document` أو `phone` أو `email` أو `ip_address` أو `device_fingerprint`)، ويربط الإدخال بالجلسة وبذلك السجل، ويملأ `display_label` و `metadata` للمستندات. بالنسبة لقائمة حظر `device_fingerprint`، يتم رفض الجلسة التي تحتوي فقط على بصمة فئة الجهاز أو التي اكتملت على أكثر من جهاز واحد: أرسل البصمة الدقيقة كـ `value`. بالنسبة لأنواع الإدخال الأخرى، أو عندما لا تحتوي الجلسة على مثل هذا السجل، أرسل `value` أيضاً؛ ويتم بعد ذلك تخزين `value` الخاصة بك مع استمرار ربط الإدخال بالجلسة."
                  },
                  "reference_object_uuid": {
                    "type": "string",
                    "format": "uuid",
                    "description": "معرّف UUID للسجل الذي يمثله الإدخال عندما لا يأتي من جلسة: معرّف UUID للمعاملة، أو `didit_internal_id` لمستخدم أو شركة. قم بإقرانه مع `metadata.reference_type`. يُستبدل بسجل الجلسة عندما يوفره `reference_session_id`."
                  },
                  "face_image_source": {
                    "type": "string",
                    "enum": [
                      "liveness",
                      "front_image_camera_front",
                      "back_image_camera_front"
                    ],
                    "default": "liveness",
                    "description": "قوائم الوجوه التي تحتوي على `reference_session_id`: تحدد الصورة التي تم أخذ الوجه منها من صور الجلسة. القيمة `liveness` (الافتراضية) هي صورة السيلفي لكشف الحيوية. والخاصيتان `front_image_camera_front` و`back_image_camera_front` هما صورتا السيلفي اللتان التقطتهما الكاميرا الأمامية أثناء تصوير المستخدم للوجه الأمامي أو الخلفي لمستنده: تُقبلان فقط في قائمة حظر الوجوه الخاصة بالنظام، مع `reference_session_id` وقيمة `value` فارغة. يمكن إضافة كل صورة سيلفي مرة واحدة ويجب أن تُظهر وجهاً واحداً واضحاً."
                  },
                  "reference_node_id": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 100,
                    "description": "مع `face_image_source` لالتقاط المستند: عقدة التحقق من الهوية التي تُستخدم صورتها السيلفي، في مسارات سير العمل التي تحتوي على أكثر من عقدة. القيمة الافتراضية هي أحدث عملية تحقق من الهوية تحتوي على تلك الصورة. يُرفض استخدامه مع `liveness`."
                  },
                  "display_label": {
                    "type": "string",
                    "maxLength": 512,
                    "description": "تسمية سهلة القراءة. عندما تكون فارغة، تستنتج Didit واحدة من الجلسة متى أمكنها ذلك (على سبيل المثال اسم حامل المستند ورقمه)."
                  },
                  "comment": {
                    "type": "string",
                    "description": "ملاحظة بنص حر، مثل سبب الإدراج في القائمة."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "كائن JSON بصيغة حرة يُخزن مع القيد ويُعاد كما تم تخزينه. استخدم `reference_type` و `reference_id` لتربط لوحة التحكم بالمصدر. يتم تعيين `reference_image_url` و `front_image_url` بواسطة Didit فقط ويتم تجاهلهما إذا أرسلتهما. بالنسبة لقيد تمت قراءته من جلسة، يتم دمج مفاتيح Didit مع مفاتيحك.",
                    "properties": {
                      "reference_type": {
                        "type": "string",
                        "enum": [
                          "transaction",
                          "vendor_user",
                          "vendor_business"
                        ],
                        "description": "ما يشير إليه `reference_object_uuid`."
                      },
                      "reference_id": {
                        "type": "string",
                        "description": "معرّف السجل المصدر."
                      }
                    }
                  }
                }
              },
              "examples": {
                "By value": {
                  "value": {
                    "value": "+14155552671",
                    "comment": "Reported fraud"
                  }
                },
                "From a session": {
                  "value": {
                    "reference_session_id": "33333333-4444-5555-6666-777777777777"
                  }
                },
                "Face from a document-capture selfie": {
                  "value": {
                    "reference_session_id": "33333333-4444-5555-6666-777777777777",
                    "face_image_source": "front_image_camera_front"
                  }
                },
                "From a transaction": {
                  "value": {
                    "value": "0x52908400098527886E0F7030069857D2E4169EE7",
                    "reference_object_uuid": "55555555-6666-7777-8888-999999999999",
                    "comment": "Linked to a chargeback",
                    "metadata": {
                      "reference_type": "transaction",
                      "reference_id": "55555555-6666-7777-8888-999999999999"
                    }
                  }
                },
                "Country": {
                  "value": {
                    "value": "PRK",
                    "comment": "Sanctioned jurisdiction"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/entries/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"value\": \"+14155552671\", \"comment\": \"Reported fraud\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.entries.create(\n    \"11111111-2222-3333-4444-555555555555\",\n    value=\"+14155552671\",\n    comment=\"Reported fraud\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.entries.create(\"11111111-2222-3333-4444-555555555555\", {\n  value: \"+14155552671\",\n  comment: \"Reported fraud\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Entries.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsEntriesCreateParams{\n\tValue:   didit.String(\"+14155552671\"),\n\tComment: didit.String(\"Reported fraud\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.ListsEntriesCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().entries().create(\"11111111-2222-3333-4444-555555555555\", ListsEntriesCreateParams.builder()\n        .value(\"+14155552671\")\n        .comment(\"Reported fraud\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->lists->entries->create('11111111-2222-3333-4444-555555555555', [\n    'value' => '+14155552671',\n    'comment' => 'Reported fraud',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.entries.create(\n  \"11111111-2222-3333-4444-555555555555\",\n  value: \"+14155552671\",\n  comment: \"Reported fraud\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.Entries.CreateAsync(\"11111111-2222-3333-4444-555555555555\", new ListsEntriesCreateParams\n{\n    Value = \"+14155552671\",\n    Comment = \"Reported fraud\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء الإدخال.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceListEntry"
                },
                "examples": {
                  "By value": {
                    "value": {
                      "uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                      "value": "+14155552671",
                      "display_label": "",
                      "comment": "Reported fraud",
                      "added_by": "api",
                      "reference_session_id": null,
                      "reference_session_number": null,
                      "reference_session_type": null,
                      "reference_object_uuid": null,
                      "metadata": null,
                      "created_at": "2026-10-12T10:04:51.220391Z"
                    }
                  },
                  "Document from a session": {
                    "value": {
                      "uuid": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
                      "value": "X1234567",
                      "display_label": "Jane Doe - X1234567",
                      "comment": "",
                      "added_by": "api",
                      "reference_session_id": "33333333-4444-5555-6666-777777777777",
                      "reference_session_number": 1042,
                      "reference_session_type": "kyc",
                      "reference_object_uuid": "66666666-7777-8888-9999-000000000000",
                      "metadata": {
                        "full_name": "Jane Doe",
                        "issuing_state": "ESP",
                        "document_type": "ID",
                        "region": "",
                        "document_number": "X1234567"
                      },
                      "created_at": "2026-10-12T10:06:12.774915Z"
                    }
                  },
                  "From a transaction": {
                    "value": {
                      "uuid": "dddddddd-eeee-ffff-0000-111111111111",
                      "value": "0x52908400098527886e0f7030069857d2e4169ee7",
                      "display_label": "",
                      "comment": "Linked to a chargeback",
                      "added_by": "api",
                      "reference_session_id": null,
                      "reference_session_number": null,
                      "reference_session_type": null,
                      "reference_object_uuid": "55555555-6666-7777-8888-999999999999",
                      "metadata": {
                        "reference_type": "transaction",
                        "reference_id": "55555555-6666-7777-8888-999999999999"
                      },
                      "created_at": "2026-10-12T10:20:40.117062Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "نص الطلب غير صالح، أو القيمة موجودة بالفعل في القائمة، أو يتعذر على الجلسة تقديم القيمة.",
            "content": {
              "application/json": {
                "examples": {
                  "Nothing to list": {
                    "value": {
                      "value": [
                        "Either 'value' or 'reference_session_id' must be provided."
                      ]
                    }
                  },
                  "Duplicate value": {
                    "value": {
                      "value": [
                        "An entry with this value already exists in this list."
                      ]
                    }
                  },
                  "Invalid phone": {
                    "value": {
                      "value": [
                        "Invalid phone number. Provide a valid international number (e.g. +1234567890)."
                      ]
                    }
                  },
                  "Invalid IP": {
                    "value": {
                      "value": [
                        "Invalid IP address or CIDR range (e.g. 192.168.1.1 or 10.0.0.0/24)."
                      ]
                    }
                  },
                  "Invalid country": {
                    "value": {
                      "value": [
                        "Invalid country code: XX. Provide a valid ISO 3166-1 alpha-2 or alpha-3 country code."
                      ]
                    }
                  },
                  "Device-class fingerprint": {
                    "value": {
                      "value": [
                        "This value is a device-class fingerprint: several distinct devices have reported it, so blocklisting it would decline unrelated people. Block the user by document, face, email or phone instead."
                      ]
                    }
                  },
                  "Unknown session": {
                    "value": {
                      "reference_session_id": [
                        "Session not found or does not belong to this application."
                      ]
                    }
                  },
                  "No data in session": {
                    "value": {
                      "value": [
                        "Either provide a 'value' or ensure the session contains data for this entry type."
                      ]
                    }
                  },
                  "Selfie on another list": {
                    "value": {
                      "face_image_source": [
                        "A document-capture selfie can only be added to the face blocklist."
                      ]
                    }
                  },
                  "No clear face in selfie": {
                    "value": {
                      "face_image_source": [
                        "No clear face was found in this selfie, so it cannot be blocklisted."
                      ]
                    }
                  },
                  "Selfie already listed": {
                    "value": {
                      "face_image_source": [
                        "This selfie is already in the blocklist."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: write` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no write access to workflows."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد قائمة بهذا المعرّف UUID في التطبيق المرتبط بمفتاح API، أو قد تم حذفها.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "List not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          },
          "503": {
            "description": "تحليل الوجه لصورة سيلفي ملتقطة مع المستند غير متاح مؤقتًا. لم تتم إضافة أي شيء؛ يُرجى إعادة المحاولة لاحقًا.",
            "content": {
              "application/json": {
                "examples": {
                  "Unavailable": {
                    "value": {
                      "detail": "Service temporarily unavailable. Please try again later."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/lists/{list_uuid}/entries/{entry_uuid}/": {
      "delete": {
        "summary": "حذف مدخل في القائمة",
        "description": "يحذف مدخلاً واحداً من القائمة، بما في ذلك قوائم النظام. يتوقف المدخل عن المطابقة فوراً، والحذف لا يمكن التراجع عنه: لإدراج القيمة مرة أخرى، أنشئ مدخلاً جديداً. في قائمة الحظر الخاصة بالنظام للوجوه أو المستندات أو أرقام الهواتف أو البريد الإلكتروني، لن يُعلَّم السجل الذي يمثله المدخل بأنه مدرج في قائمة الحظر بعد ذلك؛ وفي قائمة حظر النظام للمستخدمين أو الشركات، يعود مستخدمو أو شركات التطبيق الذين تتطابق `vendor_data` الخاصة بهم مع قيمة المدخل (أو الذين يتطابق `didit_internal_id` الخاص بهم مع `reference_object_uuid` التابع له) وتكون حالتهم `BLOCKED` إلى الحالة `ACTIVE`. تحتفظ الجلسات والمعاملات التي اكتملت بالفعل بحالتها. يتطلب مفتاح API محدد النطاق إذن `workflows: write`.",
        "operationId": "delete_list_entry",
        "x-didit-sdk": {
          "resource": "lists.entries",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "parameters": [
          {
            "name": "list_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للقائمة التي تحتوي على المُدخل.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "entry_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للمُدخل، كما تم إرجاعه بواسطة سرد مدخلات القائمة أو إنشاء مدخل في القائمة.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/entries/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.lists.entries.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.lists.entries.delete(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Lists.Entries.Delete(ctx, \"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.lists().entries().delete(\"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->lists->entries->delete('11111111-2222-3333-4444-555555555555', 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.lists.entries.delete(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Lists.Entries.DeleteAsync(\"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف الإدخال. لا يوجد محتوى استجابة."
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: write` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no write access to workflows."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد إدخال بهذا المعرّف UUID في هذه القائمة، أو أن القائمة ليست ضمن التطبيق المرتبط بمفتاح API أو تم حذفها، أو أن الإدخال قد تم حذفه بالفعل.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No ListEntry matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/lists/{list_uuid}/entries/face-upload/": {
      "post": {
        "summary": "رفع وجه إلى قائمة",
        "description": "يضيف وجهاً إلى قائمة حظر الوجوه أو قائمة السماح بها من صورة JPEG أو PNG مرمزة بـ base64، وذلك عندما لا تتوفر جلسة تحقق للإشارة إليها. ترصد Didit الوجوه في الصورة، وتستخدم الوجه الأكبر، وتنشئ إدخالاً تكون قيمته `value` و`reference_object_uuid` هما معرّف UUID للوجه الجديد. يؤدي الوجه المدرج في قائمة الحظر إلى رفض الجلسات الجديدة التي يتطابق وجهها معه؛ بينما يتخطى الوجه المدرج في قائمة السماح إجراء الوجه المكرر ولا يتجاوز أبداً أي تطابق مع قائمة الحظر. في تطبيق البيئة التجريبية، لا يتم تحليل الصورة ولا يتطابق الإدخال مع أي شيء. يتطلب مفتاح API محدد النطاق صلاحية `workflows: write`. لإدراج وجه من جلسة موجودة، استخدم [إنشاء إدخال في قائمة](https://docs.didit.me/ar/management-api/lists/create-entry) مع `reference_session_id` بدلاً من ذلك.",
        "operationId": "upload_list_entry_face",
        "x-didit-sdk": {
          "resource": "lists.entries",
          "method": "upload_face",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Lists"
        ],
        "parameters": [
          {
            "name": "list_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لقائمة ذات `entry_type: face` و`list_type: blocklist` أو `allowlist`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "image"
                ],
                "properties": {
                  "image": {
                    "type": "string",
                    "format": "byte",
                    "description": "صورة بصيغة JPEG أو PNG بترميز Base64، وبحجم أقصاه 2 ميغابايت بعد فك الترميز، تُظهر وجهاً واضحاً للعيان. أرسل سلسلة base64 المجردة، دون البادئة `data:image/...;base64,`."
                  },
                  "comment": {
                    "type": "string",
                    "default": "",
                    "description": "ملاحظة اختيارية بنص حر، مثل سبب الإدراج في القائمة."
                  }
                }
              },
              "examples": {
                "Face image": {
                  "value": {
                    "image": "/9j/4AAQSkZJRgABAQAAAQABAAD...",
                    "comment": "Known fraud attempt"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/entries/face-upload/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d \"{\\\"image\\\": \\\"$(base64 < face.jpg | tr -d '\\n')\\\", \\\"comment\\\": \\\"Known fraud attempt\\\"}\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.entries.upload_face(\n    \"11111111-2222-3333-4444-555555555555\",\n    image=\"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n    comment=\"Known fraud attempt\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.entries.uploadFace(\"11111111-2222-3333-4444-555555555555\", {\n  image: \"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n  comment: \"Known fraud attempt\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Entries.UploadFace(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsEntriesUploadFaceParams{\n\tImage:   \"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n\tComment: didit.String(\"Known fraud attempt\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.ListsEntriesUploadFaceParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().entries().uploadFace(\"11111111-2222-3333-4444-555555555555\", ListsEntriesUploadFaceParams.builder()\n        .image(\"/9j/4AAQSkZJRgABAQAAAQABAAD...\")\n        .comment(\"Known fraud attempt\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->lists->entries->uploadFace('11111111-2222-3333-4444-555555555555', [\n    'image' => '/9j/4AAQSkZJRgABAQAAAQABAAD...',\n    'comment' => 'Known fraud attempt',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.entries.upload_face(\n  \"11111111-2222-3333-4444-555555555555\",\n  image: \"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n  comment: \"Known fraud attempt\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.Entries.UploadFaceAsync(\"11111111-2222-3333-4444-555555555555\", new ListsEntriesUploadFaceParams\n{\n    Image = \"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n    Comment = \"Known fraud attempt\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء إدخال الوجه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceListEntry"
                },
                "examples": {
                  "Uploaded face": {
                    "value": {
                      "uuid": "cccccccc-dddd-eeee-ffff-000000000000",
                      "value": "44444444-5555-6666-7777-888888888888",
                      "display_label": "Manually uploaded face",
                      "comment": "Known fraud attempt",
                      "added_by": "api",
                      "reference_session_id": null,
                      "reference_session_number": null,
                      "reference_session_type": null,
                      "reference_object_uuid": "44444444-5555-6666-7777-888888888888",
                      "metadata": {
                        "reference_image_url": "https://media.example.com/faces/reference.jpg?expires=1760263938&signature=3f9a1c"
                      },
                      "created_at": "2026-10-12T10:12:18.904467Z"
                    }
                  },
                  "Sandbox application": {
                    "value": {
                      "uuid": "cccccccc-dddd-eeee-ffff-000000000000",
                      "value": "44444444-5555-6666-7777-888888888888",
                      "display_label": "Sandbox face entry",
                      "comment": "Known fraud attempt",
                      "added_by": "api",
                      "reference_session_id": null,
                      "reference_session_number": null,
                      "reference_session_type": null,
                      "reference_object_uuid": "44444444-5555-6666-7777-888888888888",
                      "metadata": {
                        "sandbox": true
                      },
                      "created_at": "2026-10-12T10:12:18.904467Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "القائمة لا تقبل عمليات تحميل صور الوجه، أو أن الصورة مفقودة أو غير صالحة أو كبيرة جداً أو لا تُظهر وجهاً صالحاً للاستخدام. لم يتم إنشاء أي مدخل.",
            "content": {
              "application/json": {
                "examples": {
                  "Not a face list": {
                    "value": {
                      "detail": "Face upload is only available for face-type lists."
                    }
                  },
                  "Custom face list": {
                    "value": {
                      "detail": "Face upload is only available for face blocklists and allowlists."
                    }
                  },
                  "Missing image": {
                    "value": {
                      "image": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid base64": {
                    "value": {
                      "image": [
                        "Invalid base64 encoding."
                      ]
                    }
                  },
                  "Too large": {
                    "value": {
                      "image": [
                        "Image exceeds maximum size of 2 MB."
                      ]
                    }
                  },
                  "Unreadable image": {
                    "value": {
                      "image": "Invalid image. Provide a valid base64-encoded JPG or PNG."
                    }
                  },
                  "No face": {
                    "value": {
                      "image": "No face detected in the image. Please upload a clear photo with a visible face."
                    }
                  },
                  "No usable face": {
                    "value": {
                      "image": "Could not extract face embedding. Try a different image."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: write` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no write access to workflows."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد قائمة بهذا المعرّف UUID في التطبيق المرتبط بمفتاح API، أو قد تم حذفها.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "List not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          },
          "503": {
            "description": "تحليل الوجه غير متاح مؤقتًا. لم يتم إنشاء أي مدخل؛ يُرجى إعادة المحاولة لاحقًا.",
            "content": {
              "application/json": {
                "examples": {
                  "Unavailable": {
                    "value": {
                      "detail": "Service temporarily unavailable. Please try again later."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/blocklist/": {
      "get": {
        "summary": "سرد العناصر المدرجة في قائمة الحظر",
        "description": "يعرض موجزاً مقسماً إلى صفحات للوجوه، ومستندات الهوية، وأرقام الهواتف، وعناوين البريد الإلكتروني الخاصة بجلسات التحقق في التطبيق والمدرجة حالياً في قائمة الحظر، بدءاً من الأحدث بحسب `blocklisted_at`؛ يمكنك التصفية باستخدام `item_type`. لا يتم تضمين عناصر الجلسات المحذوفة. يغطي الموجز السجلات المدرجة في قائمة الحظر من جلسة (باستخدام [إضافة عناصر الجلسة إلى قائمة الحظر](https://docs.didit.me/ar/management-api/blocklist/add)، أو من لوحة التحكم، أو عبر مدخلة قائمة تم إنشاؤها من جلسة)؛ أما القيم المضافة يدوياً إلى قائمة، والوجوه المرفوعة، والوجوه المأخوذة من صورة سيلفي لالتقاط المستند وأنواع المدخلات الأخرى فتتم قراءتها عبر [عرض مدخلات القائمة](https://docs.didit.me/ar/management-api/lists/list-entries). يُعد كل من `face_image` و`front_image` روابط URL موقعة ومؤقتة الصلاحية، ويتلقى مفتاح API محدد النطاق بدون صلاحية `media: read` القيمة `null`. يتطلب مفتاح API محدد النطاق صلاحية `workflows: read`.",
        "operationId": "list_blocklist_items",
        "x-didit-sdk": {
          "resource": "blocklist",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Blocklist"
        ],
        "parameters": [
          {
            "name": "item_type",
            "in": "query",
            "required": false,
            "description": "العناصر من هذا النوع فقط. عند حذفه، يتم إرجاع كل نوع.",
            "schema": {
              "type": "string",
              "enum": [
                "face",
                "document",
                "phone",
                "email"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "حجم الصفحة. القيمة الافتراضية 50. القيمة الأعلى من 1000000 تُرجع `400`؛ والقيمة الصفرية أو السالبة أو غير الرقمية ترجع إلى 50.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "فهرس يستند إلى الصفر للعنصر الأول المراد إرجاعه. يُفضل اتباع `next`. القيمة التي تزيد عن 1000000 تُرجع `400`؛ والقيمة السالبة أو غير الرقمية ترجع تلقائياً إلى 0.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/blocklist/?item_type=document' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.blocklist.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.blocklist.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Blocklist.ListAutoPaging(ctx, didit.BlocklistListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.blocklist().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->blocklist->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.blocklist.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Blocklist.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة من العناصر المدرجة في قائمة الحظر، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العدد الإجمالي للعناصر الموجودة في قائمة الحظر المطابقة للمرشحات."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlocklistedItem"
                      }
                    }
                  }
                },
                "examples": {
                  "Mixed feed": {
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "type": "document",
                          "session_id": "33333333-4444-5555-6666-777777777777",
                          "session_number": 1042,
                          "blocklisted_at": "2026-10-12T10:06:12.701553Z",
                          "face_image": null,
                          "document_type": "ID",
                          "document_number": "X1234567",
                          "front_image": "https://media.example.com/documents/front.jpg?expires=1760263938&signature=8b2e47",
                          "phone_number": null,
                          "country_code": null,
                          "email": null
                        },
                        {
                          "type": "phone",
                          "session_id": "77777777-8888-9999-0000-111111111111",
                          "session_number": 1017,
                          "blocklisted_at": "2026-10-08T15:31:09.400127Z",
                          "face_image": null,
                          "document_type": null,
                          "document_number": null,
                          "front_image": null,
                          "phone_number": "+14155552671",
                          "country_code": "US",
                          "email": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "أحد معاملات الاستعلام غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown item type": {
                    "value": {
                      "item_type": [
                        "\"wallet\" is not a valid choice."
                      ]
                    }
                  },
                  "Limit too large": {
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: read` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no read access to workflows."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد القراءة المشترك البالغ 600 طلب في الدقيقة لكل مفتاح API. التزم بالمدة المحددة في `Retry-After` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/blocklist/add/": {
      "post": {
        "summary": "إضافة عناصر الجلسة إلى قائمة الحظر",
        "description": "يضيف الوجه أو مستند الهوية أو رقم الهاتف أو البريد الإلكتروني الخاص بجلسة تحقق لشخص واحد في التطبيق إلى قائمة الحظر. لكل نوع محدد، تأخذ Didit السجل الأحدث للجلسة، وتضع عليه علامة تفيد بأنه مدرج في قائمة الحظر، وتضيف مدخلاً مرتبطاً بالجلسة إلى قائمة الحظر المطابقة في النظام (`added_by: \"api\"`)، بحيث يتم رفض الجلسات الجديدة التي تطابق الوجه أو رقم المستند أو رقم الهاتف أو البريد الإلكتروني. يتم التحقق من كل عنصر محدد أولاً، وبالتالي إذا كان أحدها مفقوداً فلن تتم إضافة أي شيء إلى قائمة الحظر؛ وتكرار الاستدعاء لعنصر مدرج بالفعل يحتفظ بمدخله الفردي ويُحدّث `blocklisted_at`. لا تتغير الجلسة نفسها والجلسات التي انتهت بالفعل. يتطلب مفتاح API محدد النطاق الصلاحية `workflows: write`.",
        "operationId": "add_to_blocklist",
        "x-didit-sdk": {
          "resource": "blocklist",
          "method": "add",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Blocklist"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "session_id"
                ],
                "description": "يجب أن تكون علامة `blocklist_*` واحدة على الأقل مضبوطة على `true`.",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "جلسة تحقق من شخص تابعة لتطبيقك. يتم رفض الجلسات المحذوفة."
                  },
                  "blocklist_face": {
                    "type": "boolean",
                    "default": false,
                    "description": "إضافة وجه الجلسة إلى قائمة الحظر."
                  },
                  "blocklist_document": {
                    "type": "boolean",
                    "default": false,
                    "description": "إضافة مستند الهوية للجلسة إلى قائمة الحظر. يتطلب المستند دولة إصداره ونوعه ورقمه والاسم الكامل."
                  },
                  "blocklist_phone": {
                    "type": "boolean",
                    "default": false,
                    "description": "إضافة رقم هاتف الجلسة إلى قائمة الحظر."
                  },
                  "blocklist_email": {
                    "type": "boolean",
                    "default": false,
                    "description": "إضافة البريد الإلكتروني للجلسة إلى قائمة الحظر."
                  }
                }
              },
              "examples": {
                "Face and document": {
                  "value": {
                    "session_id": "33333333-4444-5555-6666-777777777777",
                    "blocklist_face": true,
                    "blocklist_document": true
                  }
                },
                "Phone only": {
                  "value": {
                    "session_id": "33333333-4444-5555-6666-777777777777",
                    "blocklist_phone": true
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/blocklist/add/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"session_id\": \"33333333-4444-5555-6666-777777777777\",\n    \"blocklist_face\": true,\n    \"blocklist_document\": true\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.blocklist.add(\n    session_id=\"33333333-4444-5555-6666-777777777777\",\n    blocklist_face=True,\n    blocklist_document=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.blocklist.add({\n  session_id: \"33333333-4444-5555-6666-777777777777\",\n  blocklist_face: true,\n  blocklist_document: true,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Blocklist.Add(ctx, didit.BlocklistAddParams{\n\tSessionID:         \"33333333-4444-5555-6666-777777777777\",\n\tBlocklistFace:     didit.Bool(true),\n\tBlocklistDocument: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.BlocklistAddParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.blocklist().add(BlocklistAddParams.builder()\n        .sessionId(\"33333333-4444-5555-6666-777777777777\")\n        .blocklistFace(true)\n        .blocklistDocument(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->blocklist->add([\n    'session_id' => '33333333-4444-5555-6666-777777777777',\n    'blocklist_face' => true,\n    'blocklist_document' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.blocklist.add(\n  session_id: \"33333333-4444-5555-6666-777777777777\",\n  blocklist_face: true,\n  blocklist_document: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Blocklist.AddAsync(new BlocklistAddParams\n{\n    SessionId = \"33333333-4444-5555-6666-777777777777\",\n    BlocklistFace = true,\n    BlocklistDocument = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تمت إضافة العناصر المحددة إلى قائمة الحظر.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "دائماً `Successfully updated blocklist.`"
                    }
                  }
                },
                "examples": {
                  "Blocklisted": {
                    "value": {
                      "message": "Successfully updated blocklist."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "نص الطلب غير صالح، أو أن الجلسة ليست جلسة تحقق تابعة لهذا التطبيق، أو ليس لديها سجل من النوع المحدد. لم تتم إضافة أي شيء إلى قائمة الحظر.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown session": {
                    "value": {
                      "non_field_errors": [
                        "Session not found"
                      ]
                    }
                  },
                  "No item selected": {
                    "value": {
                      "non_field_errors": [
                        "Must specify at least one item to blocklist"
                      ]
                    }
                  },
                  "No face record": {
                    "value": {
                      "non_field_errors": [
                        "Session does not have a face record"
                      ]
                    }
                  },
                  "Incomplete document": {
                    "value": {
                      "non_field_errors": [
                        "To blocklist a document, the document must have an issuing state, document type, document number and full name"
                      ]
                    }
                  },
                  "Invalid session id": {
                    "value": {
                      "session_id": [
                        "Must be a valid UUID."
                      ]
                    }
                  },
                  "Missing session id": {
                    "value": {
                      "session_id": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: write` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no write access to workflows."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/blocklist/remove/": {
      "post": {
        "summary": "إزالة عناصر الجلسة من قائمة الحظر",
        "description": "يرفع الحظر عن الوجه أو مستند الهوية أو رقم الهاتف أو عنوان البريد الإلكتروني لجلسة واحدة للتحقق من شخص تابعة للتطبيق. لكل نوع محدد، يأخذ Didit أحدث سجل للجلسة، ويمحو علامة الحظر الخاصة به ويحذف مدخلات قائمة الحظر الخاصة بالنظام التي تم إنشاؤها من ذلك السجل، بحيث لا يؤدي إلى رفض جلسات جديدة بعد الآن. المدخلات المضافة إلى قائمة حسب القيمة لا يتم المساس بها: يمكنك العثور عليها عبر [List list entries](https://docs.didit.me/ar/management-api/lists/list-entries) وحذفها عبر [Delete a list entry](https://docs.didit.me/ar/management-api/lists/delete-entry). ينجح إلغاء حظر سجل غير محظور دون تغيير أي شيء، ولا تتغير الجلسات التي اكتملت بالفعل. يتطلب مفتاح API المحدد النطاق الإذن `workflows: write`.",
        "operationId": "remove_from_blocklist",
        "x-didit-sdk": {
          "resource": "blocklist",
          "method": "remove",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Blocklist"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "session_id"
                ],
                "description": "يجب أن تكون علامة `unblock_*` واحدة على الأقل مضبوطة على `true`.",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "جلسة تحقق من شخص تابعة لتطبيقك. يتم رفض الجلسات المحذوفة."
                  },
                  "unblock_face": {
                    "type": "boolean",
                    "default": false,
                    "description": "إلغاء الحظر عن وجه الجلسة."
                  },
                  "unblock_document": {
                    "type": "boolean",
                    "default": false,
                    "description": "إلغاء الحظر عن مستند الهوية للجلسة."
                  },
                  "unblock_phone": {
                    "type": "boolean",
                    "default": false,
                    "description": "إلغاء الحظر عن رقم هاتف الجلسة."
                  },
                  "unblock_email": {
                    "type": "boolean",
                    "default": false,
                    "description": "إلغاء الحظر عن عنوان البريد الإلكتروني للجلسة."
                  }
                }
              },
              "examples": {
                "Face and document": {
                  "value": {
                    "session_id": "33333333-4444-5555-6666-777777777777",
                    "unblock_face": true,
                    "unblock_document": true
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/blocklist/remove/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"session_id\": \"33333333-4444-5555-6666-777777777777\",\n    \"unblock_face\": true,\n    \"unblock_document\": true\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.blocklist.remove(\n    session_id=\"33333333-4444-5555-6666-777777777777\",\n    unblock_face=True,\n    unblock_document=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.blocklist.remove({\n  session_id: \"33333333-4444-5555-6666-777777777777\",\n  unblock_face: true,\n  unblock_document: true,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Blocklist.Remove(ctx, didit.BlocklistRemoveParams{\n\tSessionID:       \"33333333-4444-5555-6666-777777777777\",\n\tUnblockFace:     didit.Bool(true),\n\tUnblockDocument: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.BlocklistRemoveParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.blocklist().remove(BlocklistRemoveParams.builder()\n        .sessionId(\"33333333-4444-5555-6666-777777777777\")\n        .unblockFace(true)\n        .unblockDocument(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->blocklist->remove([\n    'session_id' => '33333333-4444-5555-6666-777777777777',\n    'unblock_face' => true,\n    'unblock_document' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.blocklist.remove(\n  session_id: \"33333333-4444-5555-6666-777777777777\",\n  unblock_face: true,\n  unblock_document: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Blocklist.RemoveAsync(new BlocklistRemoveParams\n{\n    SessionId = \"33333333-4444-5555-6666-777777777777\",\n    UnblockFace = true,\n    UnblockDocument = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم رفع الحظر عن العناصر المحددة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "دائماً `Successfully removed from blocklist.`"
                    }
                  }
                },
                "examples": {
                  "Unblocked": {
                    "value": {
                      "message": "Successfully removed from blocklist."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "نص الطلب غير صالح، أو أن الجلسة ليست جلسة تحقق تابعة لهذا التطبيق، أو ليس لديها سجل من النوع المحدد. لم يتم تغيير أي شيء.",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown session": {
                    "value": {
                      "non_field_errors": [
                        "Session not found"
                      ]
                    }
                  },
                  "No item selected": {
                    "value": {
                      "non_field_errors": [
                        "Must specify at least one item to unblock"
                      ]
                    }
                  },
                  "No email record": {
                    "value": {
                      "non_field_errors": [
                        "Session does not have an email record"
                      ]
                    }
                  },
                  "Invalid session id": {
                    "value": {
                      "session_id": [
                        "Must be a valid UUID."
                      ]
                    }
                  },
                  "Missing session id": {
                    "value": {
                      "session_id": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. تُرجع حالات فشل المصادقة الأخرى الرمز `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يحصل على `401`)، أو أن مفتاح API محدد النطاق يفتقر إلى `workflows: write` أو تم استخدامه من عنوان IP خارج قائمة السماح الخاصة به.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without workflows access": {
                    "value": {
                      "detail": "This API key has no write access to workflows."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/webhook/": {
      "get": {
        "summary": "الحصول على تكوين webhook",
        "description": "إرجاع إعدادات webhook الخاصة بالتطبيق في استدعاء واحد: كل [وجهة webhook](https://docs.didit.me/ar/management-api/webhook/list-destinations) مع سر التوقيع الخاص بها، وأنواع الأحداث التي يمكن لوجهة الاشتراك فيها، وعنوان URL لـ webhook على مستوى التطبيق (القديم)، وإصداره وسره، وسياسة الاحتفاظ بالبيانات والقوالب البيومترية، ومضيفي العودة لمحفظة Digital ID. ترسل Didit إشعارات webhook إلى الوجهات، وتكون كل منها موقعة باستخدام `secret_shared_key` الخاص بها؛ ويُستخدم `webhook_url` و`webhook_version` و`secret_shared_key` على المستوى الأعلى فقط عندما لا تكون هناك أي وجهة مُمكّنة، وحينها فقط للأحداث `status.updated` و`data.updated`. تحتوي الاستجابة على أسرار التوقيع، لذا احرص على إبقائها بعيدة عن السجلات والأكواد البرمجية من جانب العميل. يتطلب مفتاح API محدد النطاق إذن `webhooks: read`.",
        "operationId": "get_webhook_config",
        "x-didit-sdk": {
          "resource": "webhooks",
          "method": "retrieve_config",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/webhook/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.retrieve_config()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.retrieveConfig();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.RetrieveConfig(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().retrieveConfig();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->retrieveConfig();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.retrieve_config\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.RetrieveConfigAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تكوين webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookConfig"
                },
                "examples": {
                  "One destination": {
                    "value": {
                      "webhook_url": "https://yourapp.com/webhooks/didit",
                      "webhook_version": "v3",
                      "secret_shared_key": "dGhpcy1pcy10aGUtYXBwLWxldmVsLXNlY3JldC0wMDA",
                      "capture_method": "MOBILE",
                      "data_retention_months": 24,
                      "face_retention_policy": "delete_with_session",
                      "face_retention_days": null,
                      "biometric_consent_mode": "auto",
                      "available_events": [
                        {
                          "value": "status.updated",
                          "label": "Session status updated"
                        },
                        {
                          "value": "data.updated",
                          "label": "Session data updated"
                        },
                        {
                          "value": "user.status.updated",
                          "label": "User status updated"
                        },
                        {
                          "value": "user.data.updated",
                          "label": "User data updated"
                        },
                        {
                          "value": "business.status.updated",
                          "label": "Business status updated"
                        },
                        {
                          "value": "business.data.updated",
                          "label": "Business data updated"
                        },
                        {
                          "value": "activity.created",
                          "label": "Activity created"
                        },
                        {
                          "value": "transaction.created",
                          "label": "Transaction created"
                        },
                        {
                          "value": "transaction.status.updated",
                          "label": "Transaction status updated"
                        },
                        {
                          "value": "travel_rule.status.updated",
                          "label": "Travel Rule Status Updated"
                        },
                        {
                          "value": "workflow.compliance_changed",
                          "label": "Workflow Compliance Changed"
                        }
                      ],
                      "allowed_return_hosts": [
                        "shop.example.com"
                      ],
                      "endpoints": [
                        {
                          "uuid": "11111111-2222-3333-4444-555555555555",
                          "label": "Production session webhooks",
                          "url": "https://yourapp.com/webhooks/didit",
                          "enabled": true,
                          "webhook_version": "v3",
                          "secret_shared_key": "dGhpcy1pcy1hbi1leGFtcGxlLXNlY3JldC0wMDAwMDA",
                          "subscribed_events": [
                            "status.updated",
                            "data.updated"
                          ],
                          "created_at": "2026-01-04T08:00:00.000000Z",
                          "updated_at": "2026-04-22T14:09:11.523671Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. عند فقدان `x-api-key` أو عدم صلاحيته أو إلغائه، تتلقى `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا الـ endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without webhooks read": {
                    "value": {
                      "detail": "This API key has no read access to webhooks."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 600 طلب GET في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (600).",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-get"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "تحديث تهيئة webhook",
        "description": "تحديث جزئي لإعدادات مستوى التطبيق: رابط webhook القديم وإصداره وسره، وسياسة الاحتفاظ بالبيانات والقوالب البيومترية، ومضيفي العودة لمحفظة Digital ID. أرسل الحقول المراد تغييرها فقط؛ تكون الاستجابة هي التكوين الكامل، بنفس بنية `GET /v3/webhook/`. لا تُدار الوجهات هنا: يمكنك إنشاؤها وتحديثها وحذفها باستخدام endpoints `/v3/webhook/destinations/`، ولا ترسل حقل `endpoints` إلى هذا الـ endpoint. ينطبق أي تغيير في `data_retention_months` أيضاً على الجلسات الحالية، ولا يمكن استعادة الجلسات التي تُحذف بسببه؛ راجع [الاحتفاظ بالبيانات](https://docs.didit.me/ar/console/data-retention) أولاً. يحتاج مفتاح API محدود النطاق إلى `webhooks: write`.",
        "operationId": "update_webhook_config",
        "x-didit-sdk": {
          "resource": "webhooks",
          "method": "update_config",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "أرسل الحقول المراد تغييرها فقط. لا تتم إدارة الوجهات هنا.",
                "properties": {
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "nullable": true,
                    "maxLength": 2000,
                    "description": "رابط webhook قديم على مستوى التطبيق. يستخدمه Didit فقط في حال لم يكن لدى التطبيق أي وجهة مُمكَّنة، وحينها فقط للحدثين `status.updated` و`data.updated`. وهو لا يُنشئ وجهة، وأي عملية إنشاء أو تحديث أو حذف لوجهة لاحقة ستحل محله. لتلقي إشعارات webhook، أنشئ وجهة باستخدام `POST /v3/webhook/destinations/` بدلاً من ذلك."
                  },
                  "webhook_version": {
                    "type": "string",
                    "enum": [
                      "v1",
                      "v2",
                      "v3"
                    ],
                    "description": "إصدار payload لـ `webhook_url` القديم."
                  },
                  "rotate_secret_key": {
                    "type": "boolean",
                    "default": false,
                    "description": "تستبدل القيمة `true` المفتاح `secret_shared_key` على مستوى التطبيق بقيمة عشوائية جديدة على الفور؛ وتكون القيمة الجديدة في الاستجابة. ولا تتغير أسرار الوجهات. كل استدعاء يتضمن `true` يُنشئ سراً جديداً، لذا فإن العملية ليست idempotent."
                  },
                  "capture_method": {
                    "type": "string",
                    "enum": [
                      "MOBILE",
                      "MOBILE_AND_DESKTOP"
                    ],
                    "description": "إعداد تطبيق قديم. لا يقرأه سير التحقق."
                  },
                  "data_retention_months": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 1,
                    "maximum": 120,
                    "description": "نافذة الحذف التلقائي بالأشهر (يُحتسب الشهر على أنه 30 يوماً)، أو `null` لعدم وجود حذف تلقائي. ينطبق التغيير على الجلسات الحالية أيضاً: يتم حذف كل جلسة تحقق من المستخدمين أقدم من النافذة الجديدة تلقائياً، وهذا الحذف غير قابل للتراجع."
                  },
                  "face_retention_policy": {
                    "type": "string",
                    "enum": [
                      "delete_with_session",
                      "retain_until_user_deleted"
                    ],
                    "description": "ما يحدث لتضمين الوجه الخاص بالجلسة عند حذف الجلسة. يتطلب `retain_until_user_deleted` وجود `face_retention_days` في الطلب نفسه أو تعيينه مسبقاً. ينطبق أي تغيير على عمليات حذف الجلسات من ذلك الحين فصاعداً؛ ولا ينشئ أو يمسح أي قالب بيومتري موجود."
                  },
                  "face_retention_days": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "فترة الاحتفاظ، بالأيام، بالقوالب البيومترية بموجب `retain_until_user_deleted`."
                  },
                  "biometric_consent_mode": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "always",
                      "never"
                    ],
                    "description": "متى يطلب التدفق المستضاف وحزم SDK الأصلية من الشخص الموافقة البيومترية الصريحة قبل التقاط الوجه. يطلب `auto` (الافتراضي) فقط عند انطباق مُشغِّل: ولاية مُعلنة، أو عنوان IP الخاص بالشخص، أو جهة إصدار مستند الهوية في إلينوي أو تكساس أو كولورادو، أو يبدو أن الشخص في الولايات المتحدة دون ولاية معروفة. يطلب `always` من كل شخص يلتقط سير العمل الخاص به وجهاً. لا يعرض `never` الخطوة أبداً، وتقوم بجمع الموافقة بنفسك قبل التقاط صورة سيلفي. يتم تسجيل كل تغيير في سجل التدقيق. راجع [الموافقة البيومترية](https://docs.didit.me/ar/getting-started/biometric-consent)."
                  },
                  "allowed_return_hosts": {
                    "type": "array",
                    "maxItems": 20,
                    "description": "يستبدل القائمة الكاملة لمضيفي العودة لمحفظة الهوية الرقمية (Digital ID). أسماء مضيفين مجردة فقط، مثل `shop.example.com`: بدون بروتوكول أو منفذ أو مسار أو محارف بديلة. يتم تحويل القيم إلى أحرف صغيرة وتجاهل التكرارات. أرسل `[]` لمسح القائمة.",
                    "items": {
                      "type": "string",
                      "maxLength": 253
                    }
                  },
                  "allowed_domains": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "description": "يستبدل القائمة الكاملة للأصول المسموح بها. الأصول (على سبيل المثال `https://app.example.com`؛ و`http` مسموح به فقط لـ `localhost`) التي يمكن تضمين سير عمل التحقق المستضاف فيها والتي يمكنها إعادة المستخدم إليها عبر callback للجلسة. لا تتأثر الاستدعاءات بين الخوادم. القائمة الفارغة تعني عدم وجود أي قيود. تقوم Didit بتخزين كل أصل بأحرف صغيرة دون منفذ افتراضي. يفشل الإدخال غير الصالح بالرمز `400` في `allowed_domains`. أرسل `[]` لإزالة القيد.",
                    "example": [
                      "https://app.example.com"
                    ]
                  }
                }
              },
              "examples": {
                "Enable biometric template retention": {
                  "value": {
                    "face_retention_policy": "retain_until_user_deleted",
                    "face_retention_days": 365,
                    "biometric_consent_mode": "auto"
                  }
                },
                "Rotate the legacy secret": {
                  "value": {
                    "rotate_secret_key": true
                  }
                },
                "Set data retention": {
                  "value": {
                    "data_retention_months": 24
                  }
                },
                "Register return hosts": {
                  "value": {
                    "allowed_return_hosts": [
                      "shop.example.com",
                      "app.example.com"
                    ]
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/webhook/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"face_retention_policy\": \"retain_until_user_deleted\", \"face_retention_days\": 365}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.update_config(\n    face_retention_policy=\"retain_until_user_deleted\",\n    face_retention_days=365,\n    biometric_consent_mode=\"auto\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.updateConfig({\n  face_retention_policy: \"retain_until_user_deleted\",\n  face_retention_days: 365,\n  biometric_consent_mode: \"auto\",\n});\nconsole.log(result);"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.WebhooksUpdateConfigParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().updateConfig(WebhooksUpdateConfigParams.builder()\n        .faceRetentionPolicy(WebhooksUpdateConfigParams.FaceRetentionPolicy.of(\"retain_until_user_deleted\"))\n        .faceRetentionDays(365L)\n        .biometricConsentMode(WebhooksUpdateConfigParams.BiometricConsentMode.of(\"auto\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->updateConfig([\n    'face_retention_policy' => 'retain_until_user_deleted',\n    'face_retention_days' => 365,\n    'biometric_consent_mode' => 'auto',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.update_config(\n  face_retention_policy: \"retain_until_user_deleted\",\n  face_retention_days: 365,\n  biometric_consent_mode: \"auto\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.UpdateConfigAsync(new WebhooksUpdateConfigParams\n{\n    FaceRetentionPolicy = new WebhooksUpdateConfigParamsFaceRetentionPolicy(\"retain_until_user_deleted\"),\n    FaceRetentionDays = 365,\n    BiometricConsentMode = new WebhooksUpdateConfigParamsBiometricConsentMode(\"auto\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التكوين الكامل بعد التحديث، بنفس بنية `GET /v3/webhook/`. عندما تقوم بتدوير السر، قم بتخزين `secret_shared_key` الجديد قبل التخلص من الاستجابة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookConfig"
                },
                "examples": {
                  "Retention enabled": {
                    "value": {
                      "webhook_url": "https://yourapp.com/webhooks/didit",
                      "webhook_version": "v3",
                      "secret_shared_key": "dGhpcy1pcy10aGUtYXBwLWxldmVsLXNlY3JldC0wMDA",
                      "capture_method": "MOBILE",
                      "data_retention_months": 24,
                      "face_retention_policy": "retain_until_user_deleted",
                      "face_retention_days": 365,
                      "biometric_consent_mode": "auto",
                      "available_events": [
                        {
                          "value": "status.updated",
                          "label": "Session status updated"
                        },
                        {
                          "value": "data.updated",
                          "label": "Session data updated"
                        },
                        {
                          "value": "user.status.updated",
                          "label": "User status updated"
                        },
                        {
                          "value": "user.data.updated",
                          "label": "User data updated"
                        },
                        {
                          "value": "business.status.updated",
                          "label": "Business status updated"
                        },
                        {
                          "value": "business.data.updated",
                          "label": "Business data updated"
                        },
                        {
                          "value": "activity.created",
                          "label": "Activity created"
                        },
                        {
                          "value": "transaction.created",
                          "label": "Transaction created"
                        },
                        {
                          "value": "transaction.status.updated",
                          "label": "Transaction status updated"
                        },
                        {
                          "value": "travel_rule.status.updated",
                          "label": "Travel Rule Status Updated"
                        },
                        {
                          "value": "workflow.compliance_changed",
                          "label": "Workflow Compliance Changed"
                        }
                      ],
                      "allowed_return_hosts": [
                        "shop.example.com"
                      ],
                      "endpoints": [
                        {
                          "uuid": "11111111-2222-3333-4444-555555555555",
                          "label": "Production session webhooks",
                          "url": "https://yourapp.com/webhooks/didit",
                          "enabled": true,
                          "webhook_version": "v3",
                          "secret_shared_key": "dGhpcy1pcy1hbi1leGFtcGxlLXNlY3JldC0wMDAwMDA",
                          "subscribed_events": [
                            "status.updated",
                            "data.updated"
                          ],
                          "created_at": "2026-01-04T08:00:00.000000Z",
                          "updated_at": "2026-04-22T14:09:11.523671Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق: يتم تعيين كل حقل غير صالح إلى قائمة من الرسائل، ولا يتم تغيير أي شيء. نص الطلب الذي لا يمثل JSON صالحاً يُرجع `{\"detail\": \"JSON parse error - ...\"}`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "كل حقل غير صالح مقترن بقائمة من الرسائل.",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Retention days missing": {
                    "value": {
                      "face_retention_days": [
                        "A finite retention duration is required when face retention is enabled."
                      ],
                      "biometric_consent_mode": "auto"
                    }
                  },
                  "Retention window out of range": {
                    "value": {
                      "data_retention_months": [
                        "Ensure this value is less than or equal to 120."
                      ]
                    }
                  },
                  "Invalid return host": {
                    "value": {
                      "allowed_return_hosts": [
                        "'https://shop.example.com' is not a hostname. Register the bare host (e.g. shop.example.com): no scheme, port, path or wildcard."
                      ]
                    }
                  },
                  "Invalid choice": {
                    "value": {
                      "face_retention_policy": [
                        "\"forever\" is not a valid choice."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. عند فقدان `x-api-key` أو عدم صلاحيته أو إلغائه، تتلقى `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا الـ endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without webhooks write": {
                    "value": {
                      "detail": "This API key has no write access to webhooks."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 300 طلب كتابة (POST، PATCH، PUT، DELETE) في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (300).",
                "schema": {
                  "type": "integer",
                  "example": 300
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-write"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/webhook/destinations/{destination_uuid}/analytics/": {
      "get": {
        "summary": "الحصول على تحليلات وجهة webhook",
        "description": "إجماليات التسليم، ومعدل الفشل، وأوقات الاستجابة لوجهة webhook واحدة، على مدار النطاق بالكامل (`summary`) ولكل يوم بتوقيت UTC (`points`). تُحسب كل محاولة كعملية تسليم: الإرسال الأول للحدث، وكل [إعادة محاولة](https://docs.didit.me/ar/integration/webhooks#سياسة-إعادة-المحاولة) تلقائية، وكل إعادة إرسال. يُعد التسليم فاشلاً عندما تكون حالة HTTP المسجلة له 400 أو أعلى، وبالتالي تُحتسب مهلات الانتهاء (المسجلة كـ `504`) وإخفاقات الاتصال (`503`) على أنها فاشلة؛ أما التسليم الذي لا يزال في قائمة الانتظار فيُحتسب في `total_deliveries` فقط. سجلات التسليم متاحة لمدة 30 يوماً تقريباً. يتطلب مفتاح API محدد النطاق إذن `webhooks: read`.",
        "operationId": "get_webhook_destination_analytics",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "retrieve_analytics",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "destination_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للوجهة (الـ `uuid` المُرجع بواسطة `GET /v3/webhook/destinations/`).",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "أول يوم بتوقيت UTC لتضمينه، بالصيغة `YYYY-MM-DD` (شاملاً ذلك اليوم). اتركه فارغاً للبدء من أقدم تسليم متاح. يُقبل `dateFrom` كاسم بديل.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-10-01"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "آخر يوم بتوقيت UTC يتم تضمينه، بصيغة `YYYY-MM-DD` (شامل). يجب ألا يكون أقدم من `date_from`. يُقبل `dateTo` كاسم بديل.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-10-16"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/analytics/?date_from=2026-10-01&date_to=2026-10-16' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.retrieve_analytics(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.retrieveAnalytics(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.RetrieveAnalytics(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WebhooksDestinationsRetrieveAnalyticsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().retrieveAnalytics(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->destinations->retrieveAnalytics('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.retrieve_analytics(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.RetrieveAnalyticsAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "إحصاءات التسليم للوجهة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "points"
                  ],
                  "properties": {
                    "summary": {
                      "type": "object",
                      "description": "الإجماليات عبر النطاق المطلوب.",
                      "required": [
                        "total_deliveries",
                        "failed_deliveries",
                        "min_response_time_ms",
                        "avg_response_time_ms",
                        "max_response_time_ms",
                        "error_rate_percentage"
                      ],
                      "properties": {
                        "total_deliveries": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "محاولات التسليم، بما في ذلك المحاولات الموجودة في قائمة الانتظار."
                        },
                        "failed_deliveries": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "المحاولات التي تكون حالة HTTP المسجلة لها 400 أو أعلى."
                        },
                        "min_response_time_ms": {
                          "type": "integer",
                          "nullable": true,
                          "description": "أسرع محاولة بالمللي ثانية، أو `null` عند عدم تسجيل وقت لأي محاولة."
                        },
                        "avg_response_time_ms": {
                          "type": "integer",
                          "nullable": true,
                          "description": "متوسط وقت المحاولة بالمللي ثانية، مقرباً، أو `null` عند عدم وجود وقت مسجل لأي محاولة."
                        },
                        "max_response_time_ms": {
                          "type": "integer",
                          "nullable": true,
                          "description": "أبطأ محاولة بالمللي ثانية، أو `null` في حال عدم وجود وقت مسجل لأي محاولة."
                        },
                        "error_rate_percentage": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100,
                          "description": "`failed_deliveries` / `total_deliveries` x 100، مقربة إلى عدد صحيح. وتكون `0` عند عدم وجود عمليات تسليم."
                        }
                      }
                    },
                    "points": {
                      "type": "array",
                      "description": "إدخال واحد لكل يوم بتوقيت UTC شهد عمليات تسليم، بدءاً من الأقدم. يتم حذف الأيام التي لا تحتوي على عمليات تسليم، لذا املأ الفجوات بالأصفار عند تمثيلها بيانياً.",
                      "items": {
                        "type": "object",
                        "required": [
                          "date",
                          "total_deliveries",
                          "failed_deliveries",
                          "min_response_time_ms",
                          "avg_response_time_ms",
                          "max_response_time_ms"
                        ],
                        "properties": {
                          "date": {
                            "type": "string",
                            "format": "date",
                            "description": "اليوم بتوقيت UTC، بصيغة `YYYY-MM-DD`."
                          },
                          "total_deliveries": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "محاولات التسليم، بما في ذلك المحاولات الموجودة في قائمة الانتظار."
                          },
                          "failed_deliveries": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "المحاولات التي تكون حالة HTTP المسجلة لها 400 أو أعلى."
                          },
                          "min_response_time_ms": {
                            "type": "integer",
                            "nullable": true,
                            "description": "أسرع محاولة بالمللي ثانية، أو `null` عند عدم تسجيل وقت لأي محاولة."
                          },
                          "avg_response_time_ms": {
                            "type": "integer",
                            "nullable": true,
                            "description": "متوسط وقت المحاولة بالمللي ثانية، مقرباً، أو `null` عند عدم وجود وقت مسجل لأي محاولة."
                          },
                          "max_response_time_ms": {
                            "type": "integer",
                            "nullable": true,
                            "description": "أبطأ محاولة بالمللي ثانية، أو `null` في حال عدم وجود وقت مسجل لأي محاولة."
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Three days of deliveries": {
                    "value": {
                      "summary": {
                        "total_deliveries": 1250,
                        "failed_deliveries": 12,
                        "min_response_time_ms": 38,
                        "avg_response_time_ms": 164,
                        "max_response_time_ms": 5004,
                        "error_rate_percentage": 1
                      },
                      "points": [
                        {
                          "date": "2026-10-14",
                          "total_deliveries": 410,
                          "failed_deliveries": 0,
                          "min_response_time_ms": 38,
                          "avg_response_time_ms": 152,
                          "max_response_time_ms": 911
                        },
                        {
                          "date": "2026-10-15",
                          "total_deliveries": 395,
                          "failed_deliveries": 12,
                          "min_response_time_ms": 41,
                          "avg_response_time_ms": 190,
                          "max_response_time_ms": 5004
                        },
                        {
                          "date": "2026-10-16",
                          "total_deliveries": 445,
                          "failed_deliveries": 0,
                          "min_response_time_ms": 40,
                          "avg_response_time_ms": 151,
                          "max_response_time_ms": 1220
                        }
                      ]
                    }
                  },
                  "No deliveries in range": {
                    "value": {
                      "summary": {
                        "total_deliveries": 0,
                        "failed_deliveries": 0,
                        "min_response_time_ms": null,
                        "avg_response_time_ms": null,
                        "max_response_time_ms": null,
                        "error_rate_percentage": 0
                      },
                      "points": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "قيمة `date_from` أو `date_to` ليست تاريخاً بصيغة `YYYY-MM-DD`، أو `date_to` يسبق `date_from`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "كل حقل غير صالح مقترن بقائمة من الرسائل.",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Malformed date": {
                    "value": {
                      "date_from": [
                        "Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
                      ]
                    }
                  },
                  "Reversed range": {
                    "value": {
                      "date_to": [
                        "date_to must be greater than or equal to date_from."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. عند فقدان `x-api-key` أو عدم صلاحيته أو إلغائه، تتلقى `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا الـ endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without webhooks read": {
                    "value": {
                      "detail": "This API key has no read access to webhooks."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد وجهة بهذا المعرّف UUID للتطبيق، أو قد تم حذفها.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Destination not found": {
                    "value": {
                      "detail": "Webhook destination not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 600 طلب GET في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (600).",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-get"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/webhook/destinations/{destination_uuid}/deliveries/": {
      "get": {
        "summary": "عرض قائمة بعمليات التسليم إلى وجهة webhook",
        "description": "تصفح كل محاولات التسليم إلى وجهة webhook واحدة عبر الصفحات، الأحدث أولاً. يُعد الإرسال الأول لكل حدث، وكل [إعادة محاولة](https://docs.didit.me/ar/integration/webhooks#سياسة-إعادة-المحاولة) تلقائية، وكل إعادة إرسال مدخلات منفصلة. تتضمن المدخلات حالة HTTP ووقت الاستجابة ولكن لا تتضمن payload: قم بجلب عملية تسليم واحدة لقراءة رؤوسها ومتنها. تكون قيمة `count` دقيقة حتى 100 وتقرأ 100 لما هو أعلى من ذلك، لذا اتبع `next` حتى تصبح `null`. تتوفر سجلات التسليم لمدة 30 يومًا تقريبًا. يتطلب مفتاح API محدد النطاق `webhooks: read` و `decisions: read`؛ ولا يمكن لمفتاح يقتصر على بعض مسارات سير العمل أو الجلسات المقبولة استخدام هذا الـ endpoint.",
        "operationId": "list_webhook_destination_deliveries",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "list_deliveries",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "destination_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للوجهة (الـ `uuid` المُرجع بواسطة `GET /v3/webhook/destinations/`).",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "الحد الأقصى لعدد عمليات التسليم لكل صفحة. القيمة الافتراضية هي 50. أي قيمة ليست عدداً صحيحاً موجباً تعود تلقائياً إلى 50؛ وأي قيمة تزيد عن 1000000 تُرجع `400`.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "عدد عمليات التسليم المراد تخطيها. القيمة الافتراضية هي 0. يُفضّل تتبّع رابطي `next` و`previous` من الاستجابة.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "example": 0
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "أول يوم بتوقيت UTC لتضمينه، بالصيغة `YYYY-MM-DD` (شاملاً ذلك اليوم). اتركه فارغاً للبدء من أقدم تسليم متاح. يُقبل `dateFrom` كاسم بديل.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-10-01"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "آخر يوم بتوقيت UTC يتم تضمينه، بصيغة `YYYY-MM-DD` (شامل). يجب ألا يكون أقدم من `date_from`. يُقبل `dateTo` كاسم بديل.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-10-16"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/deliveries/?limit=50&date_from=2026-10-01' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.webhooks.destinations.list_deliveries(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.webhooks.destinations.listDeliveries(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Webhooks.Destinations.ListDeliveriesAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WebhooksDestinationsListDeliveriesParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.webhooks().destinations().listDeliveries(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->webhooks->destinations->listDeliveries('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.webhooks.destinations.list_deliveries(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Webhooks.Destinations.ListDeliveriesAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة واحدة من عمليات التسليم، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "عمليات التسليم المطابقة، دقيقة حتى 100 وبحد أقصى 100 بعد ذلك. استخدم `next` لمعرفة ما إذا كانت هناك صفحات إضافية."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDestinationDelivery"
                      }
                    }
                  }
                },
                "examples": {
                  "Failed delivery, its retry and a queued event": {
                    "value": {
                      "count": 3,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "66666666-7777-8888-9999-000000000003",
                          "session_id": null,
                          "request_url": "https://yourapp.com/webhooks/didit",
                          "response_status": null,
                          "response_time_ms": null,
                          "status": "APPROVED",
                          "webhook_type": "transaction.created",
                          "created_at": "2026-10-15T09:23:02.871190Z"
                        },
                        {
                          "uuid": "66666666-7777-8888-9999-000000000002",
                          "session_id": "22222222-3333-4444-5555-666666666666",
                          "request_url": "https://yourapp.com/webhooks/didit",
                          "response_status": 200,
                          "response_time_ms": 143,
                          "status": "In Progress",
                          "webhook_type": "status.updated",
                          "created_at": "2026-10-15T09:22:19.104233Z"
                        },
                        {
                          "uuid": "66666666-7777-8888-9999-000000000001",
                          "session_id": "22222222-3333-4444-5555-666666666666",
                          "request_url": "https://yourapp.com/webhooks/didit",
                          "response_status": 503,
                          "response_time_ms": 412,
                          "status": "In Progress",
                          "webhook_type": "status.updated",
                          "created_at": "2026-10-15T09:21:18.412345Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "قيمة `date_from` أو `date_to` ليست تاريخاً بصيغة `YYYY-MM-DD`، أو `date_to` يسبق `date_from`، أو `limit` أو `offset` أكبر من 1000000 (هذا الخطأ يكون عبارة عن مصفوفة JSON من الرسائل).",
            "content": {
              "application/json": {
                "examples": {
                  "Malformed date": {
                    "value": {
                      "date_from": [
                        "Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
                      ]
                    }
                  },
                  "Reversed range": {
                    "value": {
                      "date_to": [
                        "date_to must be greater than or equal to date_from."
                      ]
                    }
                  },
                  "Limit too large": {
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. عند فقدان `x-api-key` أو عدم صلاحيته أو إلغائه، تتلقى `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`. المفتاح المقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة يتلقى `This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint.`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without webhooks read": {
                    "value": {
                      "detail": "This API key has no read access to webhooks."
                    }
                  },
                  "Scoped key without decisions read": {
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد وجهة بهذا المعرّف UUID للتطبيق، أو قد تم حذفها.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Destination not found": {
                    "value": {
                      "detail": "Webhook destination not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 600 طلب GET في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (600).",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-get"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/webhook/destinations/{destination_uuid}/deliveries/{delivery_uuid}/": {
      "get": {
        "summary": "الحصول على تسليم وجهة webhook",
        "description": "استرداد محاولة تسليم واحدة إلى وجهة webhook مع رؤوس الطلب الدقيقة ونص JSON اللذين أرسلتهما Didit، وحالة HTTP التي أرجعها endpoint الخاص بك ووقت الاستجابة. الحقلان `request_header` و`request_body` هما نص JSON: قم بتحليلهما لقراءة رؤوس التوقيع والـ payload، على سبيل المثال للتحقق من [التحقق من التوقيع](https://docs.didit.me/ar/integration/webhooks#التحقق-من-التوقيع) مقارنة بـ `secret_shared_key` الخاص بالوجهة. لا يحتوي التسليم مطلقاً على سر التوقيع، ولا تسجل Didit نص استجابة endpoint الخاص بك. يحتاج مفتاح API المخصص إلى `webhooks: read` و`decisions: read`؛ ولا يمكن لمفتاح مقتصر على بعض مهام سير العمل أو على الجلسات المقبولة استخدام هذا الـ endpoint.",
        "operationId": "get_webhook_destination_delivery",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "retrieve_delivery",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "destination_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للوجهة التي تم إرسال عملية التسليم إليها.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "delivery_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لعملية التسليم: وهو الـ `uuid` لمدخل تم إرجاعه بواسطة `GET /v3/webhook/destinations/{destination_uuid}/deliveries/`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "66666666-7777-8888-9999-000000000001"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/deliveries/66666666-7777-8888-9999-000000000001/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.retrieve_delivery(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"66666666-7777-8888-9999-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.retrieveDelivery(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"66666666-7777-8888-9999-000000000001\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.RetrieveDelivery(ctx, \"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().retrieveDelivery(\"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->destinations->retrieveDelivery('11111111-2222-3333-4444-555555555555', '66666666-7777-8888-9999-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.retrieve_delivery(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"66666666-7777-8888-9999-000000000001\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.RetrieveDeliveryAsync(\"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التسليم، مع رؤوس الطلب ونصه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDestinationDeliveryDetail"
                },
                "examples": {
                  "Connection failure": {
                    "value": {
                      "uuid": "66666666-7777-8888-9999-000000000001",
                      "session_id": "22222222-3333-4444-5555-666666666666",
                      "request_url": "https://yourapp.com/webhooks/didit",
                      "response_status": 503,
                      "response_time_ms": 412,
                      "status": "In Progress",
                      "webhook_type": "status.updated",
                      "created_at": "2026-10-15T09:21:18.412345Z",
                      "request_header": "{\"Content-Type\": \"application/json\", \"X-Signature\": \"a5e02a03404e1337a0198e6be15d34abbd053c658a0e51e5d0e78554213ef29b\", \"X-Signature-V2\": \"927e7cb770c94ce745939bff73f04aa200015f3bc64795ba46c2aaf78a6cedc5\", \"X-Signature-Simple\": \"e37b0d4c716c72bb5ae7127b9cc455d28ab4686e9e22312b4ec2327409a73302\", \"X-Timestamp\": \"1792056078\", \"User-Agent\": \"DiditWebhook/2.0 +https://didit.me\"}",
                      "request_body": "{\"application_id\":\"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\"created_at\":1792056057,\"environment\":\"live\",\"event_id\":\"33333333-4444-5555-6666-777777777777\",\"sandbox_scenario\":null,\"session_id\":\"22222222-3333-4444-5555-666666666666\",\"status\":\"In Progress\",\"timestamp\":1792056078,\"vendor_data\":\"user-123\",\"webhook_type\":\"status.updated\",\"workflow_id\":\"44444444-5555-6666-7777-888888888888\",\"workflow_version\":3}"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. عند فقدان `x-api-key` أو عدم صلاحيته أو إلغائه، تتلقى `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`. المفتاح المقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة يتلقى `This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint.`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without webhooks read": {
                    "value": {
                      "detail": "This API key has no read access to webhooks."
                    }
                  },
                  "Scoped key without decisions read": {
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الوجهة غير موجودة للتطبيق أو تم حذفها، أو التسليم غير موجود أو يتبع لوجهة أخرى أو لم يعد متاحًا.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Destination not found": {
                    "value": {
                      "detail": "Webhook destination not found."
                    }
                  },
                  "Delivery not found": {
                    "value": {
                      "detail": "Webhook delivery not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 600 طلب GET في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (600).",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-get"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/webhook/destinations/{destination_uuid}/deliveries/{delivery_uuid}/resend/": {
      "post": {
        "summary": "إعادة إرسال تسليم وجهة webhook",
        "description": "أعد إرسال عملية تسليم سابقة، على سبيل المثال بعد تعطل الـ endpoint الخاص بك. يأخذ Didit الـ payload المخزن، ويعيّن `timestamp` جديداً، ويوقع عليه مجدداً باستخدام `secret_shared_key` الحالي للوجهة (`X-Signature` و`X-Signature-V2` و`X-Signature-Simple` و`X-Timestamp`) ويرسله عبر POST إلى `request_url` الخاص بعملية التسليم، حتى لو تغير عنوان URL الخاص بالوجهة منذ ذلك الحين أو تم تعطيل الوجهة. يبقى `event_id` وبقية الـ payload دون تغيير، لذا يمكنك إزالة التكرار بناءً على `event_id`. ينتظر الاستدعاء ما يصل إلى 5 ثوانٍ للـ endpoint الخاص بك ويُرجع التسليم الجديد برمز `200` أياً كان رد الـ endpoint الخاص بك: اقرأ `response_status`. لا تتم إعادة محاولة إعادة الإرسال تلقائياً، فكل استدعاء يرسل من جديد ويُنشئ عملية تسليم جديدة، والطلب ليس له جسم. يحتاج مفتاح API المحدود الصلاحيات إلى إذن `webhooks: write` و`decisions: read`؛ ولا يمكن لمفتاح يقتصر على بعض مهام سير العمل أو على الجلسات المقبولة استخدام هذا الـ endpoint.",
        "operationId": "resend_webhook_destination_delivery",
        "x-didit-sdk": {
          "resource": "webhooks.destinations",
          "method": "resend_delivery",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "destination_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID للوجهة التي تم إرسال عملية التسليم إليها.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "delivery_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لعملية التسليم المراد إعادة إرسالها: وهو الـ `uuid` لمدخل تم إرجاعه بواسطة `GET /v3/webhook/destinations/{destination_uuid}/deliveries/`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "66666666-7777-8888-9999-000000000001"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/deliveries/66666666-7777-8888-9999-000000000001/resend/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.resend_delivery(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"66666666-7777-8888-9999-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.resendDelivery(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"66666666-7777-8888-9999-000000000001\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.ResendDelivery(ctx, \"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().resendDelivery(\"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->webhooks->destinations->resendDelivery('11111111-2222-3333-4444-555555555555', '66666666-7777-8888-9999-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.resend_delivery(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"66666666-7777-8888-9999-000000000001\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.ResendDeliveryAsync(\"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التسليم الجديد، الذي جرت محاولته بالفعل. تمثل `response_status` ما أجاب به endpoint الخاص بك هذه المرة (`504` انتهاء المهلة، `503` فشل الاتصال). يظل التسليم الأصلي دون تغيير.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDestinationDeliveryDetail"
                },
                "examples": {
                  "Accepted on resend": {
                    "value": {
                      "uuid": "66666666-7777-8888-9999-000000000004",
                      "session_id": "22222222-3333-4444-5555-666666666666",
                      "request_url": "https://yourapp.com/webhooks/didit",
                      "response_status": 200,
                      "response_time_ms": 151,
                      "status": "In Progress",
                      "webhook_type": "status.updated",
                      "created_at": "2026-10-16T14:05:42.330981Z",
                      "request_header": "{\"Content-Type\": \"application/json\", \"X-Signature\": \"b8eb1e376517ee0cad8ba98ff7f8fd35fc72eca231000963a96a335f82328835\", \"X-Signature-V2\": \"9efd2ce9ed1303e1d05273ef9608a59363ed9789a05253db4748b3e8e50cb109\", \"X-Signature-Simple\": \"bf3a9dc04b2c20ab539203b0cd5cca2a10f630bf62d8feb6d68d82af80f64774\", \"X-Timestamp\": \"1792159542\", \"User-Agent\": \"DiditWebhook/2.0 +https://didit.me\"}",
                      "request_body": "{\"application_id\":\"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\"created_at\":1792056057,\"environment\":\"live\",\"event_id\":\"33333333-4444-5555-6666-777777777777\",\"sandbox_scenario\":null,\"session_id\":\"22222222-3333-4444-5555-666666666666\",\"status\":\"In Progress\",\"timestamp\":1792159542,\"vendor_data\":\"user-123\",\"webhook_type\":\"status.updated\",\"workflow_id\":\"44444444-5555-6666-7777-888888888888\",\"workflow_version\":3}"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "تعذر توقيع التسليم المخزن مرة أخرى. لم يتم إرسال أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    },
                    "code": {
                      "type": "string",
                      "description": "رمز خطأ ثابت قابل للقراءة آلياً. اعتمد في تفريع منطقك البرمجي على هذا الرمز، وليس على `detail`."
                    }
                  }
                },
                "examples": {
                  "Unsignable delivery": {
                    "value": {
                      "detail": "Invalid webhook data format",
                      "code": "invalid_webhook_payload"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. عند فقدان `x-api-key` أو عدم صلاحيته أو إلغائه، تتلقى `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`. المفتاح المقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة يتلقى `This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint.`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without webhooks write": {
                    "value": {
                      "detail": "This API key has no write access to webhooks."
                    }
                  },
                  "Scoped key without decisions read": {
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الوجهة غير موجودة للتطبيق أو تم حذفها، أو التسليم غير موجود أو يتبع لوجهة أخرى أو لم يعد متاحًا.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Destination not found": {
                    "value": {
                      "detail": "Webhook destination not found."
                    }
                  },
                  "Delivery not found": {
                    "value": {
                      "detail": "Webhook delivery not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 300 طلب كتابة (POST، PATCH، PUT، DELETE) في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (300).",
                "schema": {
                  "type": "integer",
                  "example": 300
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-write"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/events/": {
      "get": {
        "summary": "عرض أحداث المراقبة",
        "description": "عرض أحداث المراقبة المخزنة لتطبيقك، الأحدث بحسب `occurred_at` أولاً، مع عوامل تصفية اختيارية تتحد باستخدام AND. تُكرر عوامل التصفية متعددة القيم (`event_category`، و`action_type`، و`status`، و`retention_class`) المعامل وتطابق أيًا من القيم؛ أما عوامل التصفية الأخرى فتتطلب تطابقًا تامًا، وتؤدي القيم غير المعروفة ببساطة إلى عدم إرجاع أي أحداث. كل نتيجة تمثل ملخصًا: استدعِ `GET /v3/events/{event_uuid}/` للحصول على الـ payload، وسياق الجهاز، وإثراء IP، وأدلة القواعد، ويُفضل استخدام `GET /v3/events/subjects/{vendor_data}/` لسجل جهة معنية واحدة. تعمل عمليات القراءة سواء تم تفعيل استيعاب الأحداث أم لا. يتطلب مفتاح API محدد النطاق صلاحية `transactions: read`. راجع [استيعاب الأحداث](https://docs.didit.me/ar/transaction-monitoring/events).",
        "operationId": "list_monitoring_events",
        "x-didit-sdk": {
          "resource": "monitoring_events",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Monitoring Events"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "الحد الأقصى لعدد الأحداث لكل صفحة. القيمة الافتراضية هي 50. تُرْجِع القيم التي تزيد عن 1000000 الرمز `400`؛ وأي قيمة غير عددية أو صفرية أو سالبة تعود تلقائياً إلى 50.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "عدد الأحداث المراد تخطيها. القيمة الافتراضية هي 0. يُفضّل تتبّع رابط `next` من الاستجابة.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "example": 0
          },
          {
            "name": "event_category",
            "in": "query",
            "required": false,
            "description": "الأحداث في هذه الفئات فقط. كرر المعامل لعدة قيم (`?event_category=payment&event_category=dispute`)؛ ويتم إرجاع أي حدث يطابق أيًا منها.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "auth",
                  "session",
                  "gameplay",
                  "bonus",
                  "affiliate",
                  "payment",
                  "dispute",
                  "security",
                  "responsible_gambling",
                  "custom"
                ]
              }
            },
            "example": [
              "payment",
              "dispute"
            ]
          },
          {
            "name": "action_type",
            "in": "query",
            "required": false,
            "description": "فقط الأحداث التي تتضمن أنواع الإجراءات هذه (مطابقة تامة، حساسة لحالة الأحرف). كرر لعدة قيم.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "example": [
              "deposit_completed",
              "chargeback_opened"
            ]
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "فقط الأحداث التي لها هذه الحالات. كرر لعدة قيم.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACCEPTED",
                  "APPROVED",
                  "IN_REVIEW",
                  "DECLINED"
                ]
              }
            },
            "example": [
              "IN_REVIEW",
              "DECLINED"
            ]
          },
          {
            "name": "retention_class",
            "in": "query",
            "required": false,
            "description": "الأحداث في فئات الاحتفاظ هذه فقط. كرر لعدة قيم.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "low_value",
                  "standard",
                  "risk_relevant",
                  "monetary_or_compliance"
                ]
              }
            },
            "example": [
              "risk_relevant"
            ]
          },
          {
            "name": "subject_vendor_data",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `vendor_data` الخاص بالموضوع. يمكن للمعرّف نفسه أن يسمي فرداً وشركة؛ أضف `subject_entity_type` لاختيار أحدهما، أو استخدم `GET /v3/events/subjects/{vendor_data}/`.",
            "schema": {
              "type": "string"
            },
            "example": "user-42"
          },
          {
            "name": "subject_entity_type",
            "in": "query",
            "required": false,
            "description": "يعيد `company` أحداث كيانات الشركات فقط؛ وأي قيمة أخرى غير فارغة (على سبيل المثال `individual`) تعيد أحداث الأفراد فقط. احذفه لإعادة كليهما.",
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "company"
              ]
            },
            "example": "individual"
          },
          {
            "name": "business_vendor_data",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `business.vendor_data` المرسل مع الحدث.",
            "schema": {
              "type": "string"
            },
            "example": "merchant-7"
          },
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `session.session_id`.",
            "schema": {
              "type": "string"
            },
            "example": "web-session-abc"
          },
          {
            "name": "device_fingerprint",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `device_context.fingerprint`.",
            "schema": {
              "type": "string"
            },
            "example": "fp-a8c1"
          },
          {
            "name": "ip_address",
            "in": "query",
            "required": false,
            "description": "تطابق تام في عنوان IP الخاص بالحدث.",
            "schema": {
              "type": "string"
            },
            "example": "203.0.113.42"
          },
          {
            "name": "game_id",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `game_id` المُروَّج إلى المستوى الأعلى.",
            "schema": {
              "type": "string"
            },
            "example": "poker-holdem-01"
          },
          {
            "name": "round_id",
            "in": "query",
            "required": false,
            "description": "تطابق تام مع `round_id` المُروَّج إلى المستوى الأعلى.",
            "schema": {
              "type": "string"
            },
            "example": "round-88231"
          },
          {
            "name": "affiliate_code",
            "in": "query",
            "required": false,
            "description": "تطابق تام مع `affiliate_code` المُروَّج إلى المستوى الأعلى.",
            "schema": {
              "type": "string"
            },
            "example": "aff-summer"
          },
          {
            "name": "payment_reference_id",
            "in": "query",
            "required": false,
            "description": "تطابق تام في مرجع الدفع (من `transaction_context.payment_reference_id` أو `payload.payment_reference_id`).",
            "schema": {
              "type": "string"
            },
            "example": "dep_735"
          },
          {
            "name": "counterparty_vendor_data",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `counterparty_vendor_data` المُروَّج إلى المستوى الأعلى.",
            "schema": {
              "type": "string"
            },
            "example": "user-77"
          },
          {
            "name": "matched_only",
            "in": "query",
            "required": false,
            "description": "تُرجع القيمة `true` (وكذلك `1` أو `yes`، بدون تحسس لحالة الأحرف) الأحداث التي طابقت قاعدة واحدة على الأقل فقط (`rules_matched_count` أكبر من 0). وتُتجاهل أي قيمة أخرى.",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "example": true
          },
          {
            "name": "occurred_from",
            "in": "query",
            "required": false,
            "description": "فقط الأحداث التي يكون فيها `occurred_at` في هذه اللحظة أو بعدها (شاملًا). أرسل قيمة بتنسيق ISO 8601: مثل `2026-10-01T00:00:00Z`، أو إزاحة صريحة مع ترميز `+` بنسبة مئوية (`2026-10-01T02:00:00%2B02:00`؛ حيث يتم فك ترميز `+` غير المرمز كمسافة وتتعذر قراءة القيمة)، أو تاريخ بمفرده (`2026-10-01`)، وهو ما يعني 00:00:00 UTC من ذلك اليوم. تُقرأ القيمة بدون إزاحة على أنها بتوقيت UTC. لا تُقبل القيم بأي تنسيق آخر.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-10-01T00:00:00Z"
          },
          {
            "name": "occurred_to",
            "in": "query",
            "required": false,
            "description": "فقط الأحداث التي يكون فيها `occurred_at` في هذه اللحظة أو قبلها (شاملًا). التاريخ بمفرده يعني بداية ذلك اليوم، لذا فإن `occurred_to=2026-10-15` يستبعد بقية يوم 15 أكتوبر؛ أرسل `2026-10-15T23:59:59Z` لتضمينه. أرسل قيمة بتنسيق ISO 8601: مثل `2026-10-01T00:00:00Z`، أو إزاحة صريحة مع ترميز `+` بنسبة مئوية (`2026-10-01T02:00:00%2B02:00`؛ حيث يتم فك ترميز `+` غير المرمز كمسافة وتتعذر قراءة القيمة)، أو تاريخ بمفرده (`2026-10-01`)، وهو ما يعني 00:00:00 UTC من ذلك اليوم. تُقرأ القيمة بدون إزاحة على أنها بتوقيت UTC. لا تُقبل القيم بأي تنسيق آخر.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-10-17T23:59:59Z"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "تطابق لسلسلة فرعية غير حساس لحالة الأحرف في `event_id` أو `action_type` أو `subject_vendor_data` أو `counterparty_vendor_data`.",
            "schema": {
              "type": "string"
            },
            "example": "chargeback"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/events/?event_category=payment&event_category=dispute&matched_only=true&occurred_from=2026-10-01T00:00:00Z&limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.monitoring_events.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.monitoringEvents.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.MonitoringEvents.ListAutoPaging(ctx, didit.MonitoringEventsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.monitoringEvents().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->monitoringEvents->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.monitoring_events.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.MonitoringEvents.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة واحدة من ملخصات الأحداث.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringEventPage"
                },
                "examples": {
                  "Payment and dispute events": {
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "event_uuid": "11111111-2222-3333-4444-555555555555",
                          "event_id": "chargeback-2026-10-16-000318",
                          "event_category": "dispute",
                          "action_type": "chargeback_opened",
                          "occurred_at": "2026-10-16T14:02:11Z",
                          "received_at": "2026-10-16T14:02:12.418230Z",
                          "status": "IN_REVIEW",
                          "score": 60,
                          "subject_vendor_data": "user-42",
                          "subject_entity_type": "individual",
                          "subject_uuid": "66666666-7777-8888-9999-000000000000",
                          "counterparty_vendor_data": null,
                          "session_id": null,
                          "device_fingerprint": null,
                          "ip_address": null,
                          "ip_country": null,
                          "amount": "250.000000000000000000",
                          "currency": "EUR",
                          "game_id": null,
                          "round_id": null,
                          "bonus_id": null,
                          "affiliate_code": null,
                          "payment_reference_id": "dep_735",
                          "retention_class": "monetary_or_compliance",
                          "rules_matched_count": 1,
                          "correlation_pending": false,
                          "is_droppable": false
                        },
                        {
                          "event_uuid": "22222222-3333-4444-5555-666666666666",
                          "event_id": "login-2026-10-15-000912",
                          "event_category": "auth",
                          "action_type": "login",
                          "occurred_at": "2026-10-15T08:30:00.120000Z",
                          "received_at": "2026-10-15T08:30:00.734512Z",
                          "status": "ACCEPTED",
                          "score": 0,
                          "subject_vendor_data": "user-42",
                          "subject_entity_type": "individual",
                          "subject_uuid": "66666666-7777-8888-9999-000000000000",
                          "counterparty_vendor_data": null,
                          "session_id": "web-session-abc",
                          "device_fingerprint": "fp-a8c1",
                          "ip_address": "203.0.113.42",
                          "ip_country": "ES",
                          "amount": null,
                          "currency": null,
                          "game_id": null,
                          "round_id": null,
                          "bonus_id": null,
                          "affiliate_code": null,
                          "payment_reference_id": null,
                          "retention_class": "standard",
                          "rules_matched_count": 0,
                          "correlation_pending": false,
                          "is_droppable": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`limit` أو `offset` أكبر من 1000000. نص الاستجابة هو مصفوفة JSON تحتوي على رسالة واحدة. تعود قيمة `limit` غير الرقمية أو غير الموجبة إلى القيمة الافتراضية 50 بدلاً من أن يفشل الطلب.",
            "content": {
              "application/json": {
                "examples": {
                  "limit too large": {
                    "summary": "حقل limit يتجاوز 1000000",
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  },
                  "offset too large": {
                    "summary": "حقل offset يتجاوز 1000000",
                    "value": [
                      "offset must not exceed 1000000."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. المفتاح منتهي الصلاحية فقط هو ما يتلقى `401`؛ أما المفتاح المفقود أو غير الصالح فيتلقى `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح ذو نطاق محدد يفتقر إلى `transactions: read`، أو مفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة (مثل هذا المفتاح لا يصل أبداً إلى بيانات مراقبة المعاملات)، أو طلب من خارج قائمة العناوين المسموح بها للمفتاح.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without access": {
                    "value": {
                      "detail": "This API key has no read access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "IP not allowed": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك طلبات `GET` رصيداً قدره 600 طلب في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء حدث مراقبة",
        "description": "أرسل حدثاً واحداً غير مالي (تسجيل الدخول، الجلسة، أسلوب اللعب، المكافأة، التسويق بالعمولة، الدفع، النزاع، الأمان، المقامرة المسؤولة، أو مخصص) من الواجهة الخلفية الخاصة بك. يتم التحقق من صحة الحدث وفقاً لعقد فئته، ثم يُخزّن، ويُثرى ببيانات عنوان IP مرة واحدة لكل عنوان عام فريد، وتُقيّمه قواعد الأحداث في الوقت الفعلي الخاصة بك قبل إرجاع الاستجابة؛ تعمل القواعد متعددة الموضوعات وتلك ذات النطاق الزمني الطويل بشكل غير متزامن (`correlation_pending: true`)، وفي تطبيق البيئة التجريبية لا تعمل أي قواعد. يمثل `event_id` مفتاح idempotency: يؤدي إرسال نفس `event_id` مع نفس `event_category` و`action_type` و`occurred_at` و`subject.vendor_data` و`payload` إلى إرجاع `200` مع `idempotent_replay: true` والنتيجة المخزنة (لا تتم مقارنة حقول المغلف الأخرى)، بينما تؤدي القيم المختلفة إلى إرجاع `409`. استيعاب الأحداث اختياري لكل تطبيق: حتى يتم تفعيله، يُرجع هذا endpoint رمز `403` مع `code: event_monitoring_disabled` ولا يخزن أي شيء. يحتاج مفتاح API ذو الصلاحيات المحددة إلى `transactions: write`. راجع [استيعاب الأحداث](https://docs.didit.me/ar/transaction-monitoring/events) و[قواعد الأحداث](https://docs.didit.me/ar/transaction-monitoring/event-rules)؛ لإرسال الأحداث من متصفح أو تطبيق، استخدم [إرسال الأحداث عبر SDK](https://docs.didit.me/ar/transaction-monitoring/sdk-event-submission).",
        "operationId": "create_monitoring_event",
        "x-didit-sdk": {
          "resource": "monitoring_events",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Monitoring Events"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitoringEventCreateRequest"
              },
              "examples": {
                "Login": {
                  "value": {
                    "event_id": "login-2026-10-17-000001",
                    "event_category": "auth",
                    "action_type": "login",
                    "occurred_at": "2026-10-17T09:15:02.481Z",
                    "time_zone": "Europe/Madrid",
                    "subject": {
                      "vendor_data": "user-42",
                      "entity_type": "individual"
                    },
                    "session": {
                      "session_id": "web-session-abc",
                      "sequence": 142
                    },
                    "device_context": {
                      "fingerprint": "fp-a8c1",
                      "network_context": {
                        "ip_address": "203.0.113.42"
                      }
                    },
                    "payload": {
                      "method": "password"
                    },
                    "custom_values": {
                      "vip_tier": "gold"
                    }
                  }
                },
                "Deposit completed": {
                  "value": {
                    "event_id": "deposit-2026-10-17-000002",
                    "event_category": "payment",
                    "action_type": "deposit_completed",
                    "occurred_at": "2026-10-17T09:16:40Z",
                    "subject": {
                      "vendor_data": "user-42"
                    },
                    "transaction_context": {
                      "amount": "100.00",
                      "currency": "EUR",
                      "direction": "inbound",
                      "payment_reference_id": "dep_736"
                    },
                    "payload": {
                      "payment_method": "card",
                      "status": "completed"
                    }
                  }
                },
                "Chargeback opened": {
                  "value": {
                    "event_id": "chargeback-2026-10-16-000318",
                    "event_category": "dispute",
                    "action_type": "chargeback_opened",
                    "occurred_at": "2026-10-16T14:02:11Z",
                    "subject": {
                      "vendor_data": "user-42"
                    },
                    "payload": {
                      "payment_reference_id": "dep_735",
                      "chargeback_id": "cb_5521",
                      "amount": "250.00",
                      "currency": "EUR",
                      "reason_code": "fraud"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/events/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"event_id\": \"login-2026-10-17-000001\",\n    \"event_category\": \"auth\",\n    \"action_type\": \"login\",\n    \"occurred_at\": \"2026-10-17T09:15:02.481Z\",\n    \"subject\": {\"vendor_data\": \"user-42\", \"entity_type\": \"individual\"},\n    \"session\": {\"session_id\": \"web-session-abc\", \"sequence\": 142},\n    \"device_context\": {\n      \"fingerprint\": \"fp-a8c1\",\n      \"network_context\": {\"ip_address\": \"203.0.113.42\"}\n    },\n    \"payload\": {\"method\": \"password\"}\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.create(\n    event_id=\"login-2026-10-17-000001\",\n    event_category=\"auth\",\n    action_type=\"login\",\n    occurred_at=\"2026-10-17T09:15:02.481Z\",\n    time_zone=\"Europe/Madrid\",\n    subject={\n        \"vendor_data\": \"user-42\",\n        \"entity_type\": \"individual\",\n    },\n    session={\n        \"session_id\": \"web-session-abc\",\n        \"sequence\": 142,\n    },\n    device_context={\n        \"fingerprint\": \"fp-a8c1\",\n        \"network_context\": {\n            \"ip_address\": \"203.0.113.42\",\n        },\n    },\n    payload={\"method\": \"password\"},\n    custom_values={\"vip_tier\": \"gold\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.create({\n  event_id: \"login-2026-10-17-000001\",\n  event_category: \"auth\",\n  action_type: \"login\",\n  occurred_at: \"2026-10-17T09:15:02.481Z\",\n  time_zone: \"Europe/Madrid\",\n  subject: {\n    vendor_data: \"user-42\",\n    entity_type: \"individual\",\n  },\n  session: {\n    session_id: \"web-session-abc\",\n    sequence: 142,\n  },\n  device_context: {\n    fingerprint: \"fp-a8c1\",\n    network_context: {\n      ip_address: \"203.0.113.42\",\n    },\n  },\n  payload: { method: \"password\" },\n  custom_values: { vip_tier: \"gold\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.Create(ctx, didit.MonitoringEventCreateRequest{\n\tEventID:       \"login-2026-10-17-000001\",\n\tEventCategory: \"auth\",\n\tActionType:    \"login\",\n\tOccurredAt:    time.Date(2026, 10, 17, 9, 15, 2, 0, time.UTC),\n\tTimeZone:      didit.String(\"Europe/Madrid\"),\n\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\tVendorData: \"user-42\",\n\t\tEntityType: didit.String(\"individual\"),\n\t},\n\tSession: didit.Some(didit.MonitoringEventCreateRequestSession{\n\t\tSessionID: didit.String(\"web-session-abc\"),\n\t\tSequence:  didit.Int(142),\n\t}),\n\tDeviceContext: didit.Some(didit.MonitoringEventCreateRequestDeviceContext{\n\t\tFingerprint: didit.String(\"fp-a8c1\"),\n\t\tNetworkContext: didit.Some(didit.MonitoringEventCreateRequestDeviceContextNetworkContext{\n\t\t\tIPAddress: didit.String(\"203.0.113.42\"),\n\t\t}),\n\t}),\n\tPayload:      didit.Some(map[string]any{\"method\": \"password\"}),\n\tCustomValues: didit.Some(map[string]any{\"vip_tier\": \"gold\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.OffsetDateTime;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.MonitoringEventCreateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().create(MonitoringEventCreateRequest.builder()\n        .eventId(\"login-2026-10-17-000001\")\n        .eventCategory(MonitoringEventCreateRequest.EventCategory.of(\"auth\"))\n        .actionType(\"login\")\n        .occurredAt(OffsetDateTime.parse(\"2026-10-17T09:15:02.481Z\"))\n        .timeZone(\"Europe/Madrid\")\n        .subject(MonitoringEventCreateRequest.Subject.builder()\n                .vendorData(\"user-42\")\n                .entityType(\"individual\")\n                .build())\n        .session(MonitoringEventCreateRequest.Session.builder()\n                .sessionId(\"web-session-abc\")\n                .sequence(142L)\n                .build())\n        .deviceContext(MonitoringEventCreateRequest.DeviceContext.builder()\n                .fingerprint(\"fp-a8c1\")\n                .networkContext(MonitoringEventCreateRequest.DeviceContext.NetworkContext.builder()\n                        .ipAddress(\"203.0.113.42\")\n                        .build())\n                .build())\n        .payload(Map.of(\"method\", \"password\"))\n        .customValues(Map.of(\"vip_tier\", MonitoringEventCreateRequest.CustomValuesValue.ofString(\"gold\")))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->monitoringEvents->create([\n    'event_id' => 'login-2026-10-17-000001',\n    'event_category' => 'auth',\n    'action_type' => 'login',\n    'occurred_at' => '2026-10-17T09:15:02.481Z',\n    'time_zone' => 'Europe/Madrid',\n    'subject' => [\n        'vendor_data' => 'user-42',\n        'entity_type' => 'individual',\n    ],\n    'session' => [\n        'session_id' => 'web-session-abc',\n        'sequence' => 142,\n    ],\n    'device_context' => [\n        'fingerprint' => 'fp-a8c1',\n        'network_context' => [\n            'ip_address' => '203.0.113.42',\n        ],\n    ],\n    'payload' => ['method' => 'password'],\n    'custom_values' => ['vip_tier' => 'gold'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.create(\n  event_id: \"login-2026-10-17-000001\",\n  event_category: \"auth\",\n  action_type: \"login\",\n  occurred_at: \"2026-10-17T09:15:02.481Z\",\n  time_zone: \"Europe/Madrid\",\n  subject: {\n    vendor_data: \"user-42\",\n    entity_type: \"individual\",\n  },\n  session: {\n    session_id: \"web-session-abc\",\n    sequence: 142,\n  },\n  device_context: {\n    fingerprint: \"fp-a8c1\",\n    network_context: {\n      ip_address: \"203.0.113.42\",\n    },\n  },\n  payload: { method: \"password\" },\n  custom_values: { vip_tier: \"gold\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.CreateAsync(new MonitoringEventCreateRequest\n{\n    EventId = \"login-2026-10-17-000001\",\n    EventCategory = \"auth\",\n    ActionType = \"login\",\n    OccurredAt = DateTimeOffset.Parse(\"2026-10-17T09:15:02.481Z\"),\n    TimeZone = \"Europe/Madrid\",\n    Subject = new()\n    {\n        VendorData = \"user-42\",\n        EntityType = \"individual\",\n    },\n    Session = new MonitoringEventCreateRequestSession\n    {\n        SessionId = \"web-session-abc\",\n        Sequence = 142,\n    },\n    DeviceContext = new MonitoringEventCreateRequestDeviceContext\n    {\n        Fingerprint = \"fp-a8c1\",\n        NetworkContext = new MonitoringEventCreateRequestDeviceContextNetworkContext\n        {\n            IpAddress = \"203.0.113.42\",\n        },\n    },\n    Payload = new Dictionary<string, object> { [\"method\"] = \"password\" },\n    CustomValues = new Dictionary<string, object> { [\"vip_tier\"] = \"gold\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم تخزين الحدث وتقييمه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringEventIngestResult"
                },
                "examples": {
                  "Stored, no rule matched": {
                    "value": {
                      "event_uuid": "33333333-4444-5555-6666-777777777777",
                      "event_id": "login-2026-10-17-000001",
                      "status": "ACCEPTED",
                      "score": 0,
                      "rules_evaluated_count": 6,
                      "rules_matched_count": 0,
                      "correlation_pending": false,
                      "retention_class": "standard",
                      "expires_at": "2026-11-16T09:15:02.481000Z",
                      "idempotent_replay": false,
                      "rule_matches": []
                    }
                  },
                  "Rule matched, async rule pending": {
                    "value": {
                      "event_uuid": "33333333-4444-5555-6666-777777777777",
                      "event_id": "login-2026-10-17-000001",
                      "status": "IN_REVIEW",
                      "score": 40,
                      "rules_evaluated_count": 6,
                      "rules_matched_count": 1,
                      "correlation_pending": true,
                      "retention_class": "risk_relevant",
                      "expires_at": "2027-01-15T09:15:02.481000Z",
                      "idempotent_replay": false,
                      "rule_matches": [
                        {
                          "rule_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                          "library_key": null,
                          "mode": "ACTIVE",
                          "is_async": false
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "إعادة تشغيل idempotency: تم تخزين حدث يحمل `event_id` هذا والمحتوى نفسه بالفعل. لم يتم تخزين أو تقييم أي شيء مرة أخرى؛ يصف نص الاستجابة الحدث المخزّن.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringEventIngestResult"
                },
                "examples": {
                  "Replay": {
                    "value": {
                      "event_uuid": "33333333-4444-5555-6666-777777777777",
                      "event_id": "login-2026-10-17-000001",
                      "status": "ACCEPTED",
                      "score": 0,
                      "rules_evaluated_count": 6,
                      "rules_matched_count": 0,
                      "correlation_pending": false,
                      "retention_class": "standard",
                      "expires_at": "2026-11-16T09:15:02.481000Z",
                      "idempotent_replay": true,
                      "rule_matches": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق. تكون مفاتيح نص الطلب هي الحقول؛ وتكون الحقول المتداخلة كائنات متداخلة. لم يتم تخزين أي شيء.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing fields": {
                    "value": {
                      "event_id": [
                        "This field is required."
                      ],
                      "subject": [
                        "This field is required."
                      ]
                    }
                  },
                  "Unknown category": {
                    "value": {
                      "event_category": [
                        "\"login\" is not a valid choice."
                      ]
                    }
                  },
                  "occurred_at too old": {
                    "value": {
                      "occurred_at": [
                        "occurred_at is more than 7 days in the past. Use the batch import lane for backfills."
                      ]
                    }
                  },
                  "occurred_at in the future": {
                    "value": {
                      "occurred_at": [
                        "occurred_at is more than 5 minutes in the future."
                      ]
                    }
                  },
                  "Missing subject vendor_data": {
                    "value": {
                      "subject": {
                        "vendor_data": [
                          "This field is required."
                        ]
                      }
                    }
                  },
                  "Missing required payload keys": {
                    "value": {
                      "payload": [
                        "payment.deposit_completed requires: payment_method, status."
                      ]
                    }
                  },
                  "Missing one-of payload key": {
                    "value": {
                      "payload": [
                        "dispute.chargeback_opened requires one of: dispute_id, chargeback_id."
                      ]
                    }
                  },
                  "Security change without changed_field": {
                    "value": {
                      "payload": [
                        "security.*_changed requires 'changed_field'."
                      ]
                    }
                  },
                  "Payload too large": {
                    "value": {
                      "payload": [
                        "payload exceeds 16384 bytes. Summarise telemetry client-side."
                      ]
                    }
                  },
                  "Too many custom_values": {
                    "value": {
                      "custom_values": [
                        "custom_values accepts at most 100 keys."
                      ]
                    }
                  },
                  "Nested custom value": {
                    "value": {
                      "custom_values": [
                        "custom_values['limits'] must be a scalar - rule conditions cannot address nested values."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. المفتاح منتهي الصلاحية فقط هو ما يتلقى `401`؛ أما المفتاح المفقود أو غير الصالح فيتلقى `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح ذو نطاق محدد يفتقر إلى `transactions: write`، أو مفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة (مثل هذا المفتاح لا يصل أبداً إلى بيانات مراقبة المعاملات)، أو طلب من خارج قائمة العناوين المسموح بها للمفتاح. يُرجع أيضاً مع `code: event_monitoring_disabled` أثناء تعطيل استيعاب الأحداث للتطبيق؛ لا يتم تخزين أي شيء في تلك الحالة، ويتم إجراء الفحص قبل التحقق من صحة نص الطلب.",
            "content": {
              "application/json": {
                "examples": {
                  "Event monitoring disabled": {
                    "value": {
                      "detail": "Event monitoring is not enabled for this application. Turn on event ingestion in the transaction monitoring settings before submitting events.",
                      "code": "event_monitoring_disabled"
                    }
                  },
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without access": {
                    "value": {
                      "detail": "This API key has no write access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "IP not allowed": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "تم استخدام `event_id` بالفعل لحدث ذي محتوى مختلف (الفئة، نوع الإجراء، `occurred_at`، أو `vendor_data` الخاص بالموضوع، أو payload). أرسل الحدث بقيمة `event_id` جديدة.",
            "content": {
              "application/json": {
                "examples": {
                  "event_id reused": {
                    "value": {
                      "event_id": "event_id 'login-2026-10-17-000001' already exists with a different payload."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك عمليات إنشاء المعاملات واستيعاب الأحداث (`POST /v3/transactions/`، `POST /v3/events/`، `POST /v3/events/batch/`) رصيداً قدره 600 طلب في الدقيقة لكل مفتاح API، وهو منفصل عن رصيد الـ 300 المشترك بين سائر طلبات الكتابة الأخرى. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني التي يجب انتظارها قبل إعادة المحاولة، مقربة للأعلى لتقع إعادة المحاولة في النافذة التالية.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Ingestion rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/events/batch/": {
      "post": {
        "summary": "إنشاء أحداث مراقبة مجمّعة",
        "description": "إرسال ما بين 1 و500 حدث في طلب واحد، كل منها داخل نفس الغلاف مثل `POST /v3/events/`. يتم التحقق من صحة كل عنصر وتخزينه وتقييمه بشكل مستقل، ويحصل على نتيجته الخاصة (`accepted` أو `replayed` أو `rejected`)، وبالتالي فإن وجود حدث واحد غير صالح لا يؤدي أبداً إلى التراجع عن بقية الأحداث: تكون الاستجابة `201` عندما لا يُرفض أي عنصر و`207` عند رفض عنصر واحد على الأقل، وكلاهما يعني أنه تمت معالجة الطلب. أرسل `{\"events\": [...]}`؛ كما تُقبل أيضاً مصفوفة JSON مجردة من الأحداث. يجب تفعيل استقبال الأحداث للتطبيق، وإلا سيعيد الطلب بالكامل الرمز `403` مع `code: event_monitoring_disabled` ولن يتم تخزين أي شيء. يحتاج مفتاح API محدود النطاق إلى `transactions: write`. راجع [Batches](https://docs.didit.me/ar/transaction-monitoring/events#الدفعات).",
        "operationId": "create_monitoring_events_batch",
        "x-didit-sdk": {
          "resource": "monitoring_events",
          "method": "create_batch",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Monitoring Events"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "events"
                ],
                "properties": {
                  "events": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "من 1 إلى 500 حدث. يتبع كل عنصر `MonitoringEventCreateRequest`، بما في ذلك النافذة الزمنية الممتدة لـ 7 أيام في الماضي و5 دقائق في المستقبل لـ `occurred_at`.",
                    "items": {
                      "$ref": "#/components/schemas/MonitoringEventCreateRequest"
                    }
                  }
                }
              },
              "example": {
                "events": [
                  {
                    "event_id": "login-2026-10-17-000001",
                    "event_category": "auth",
                    "action_type": "login",
                    "occurred_at": "2026-10-17T09:15:02.481Z",
                    "subject": {
                      "vendor_data": "user-42"
                    }
                  },
                  {
                    "event_id": "deposit-2026-10-17-000002",
                    "event_category": "payment",
                    "action_type": "deposit_completed",
                    "occurred_at": "2026-10-17T09:16:40Z",
                    "subject": {
                      "vendor_data": "user-42"
                    },
                    "transaction_context": {
                      "amount": "100.00",
                      "currency": "EUR",
                      "payment_reference_id": "dep_736"
                    },
                    "payload": {
                      "payment_method": "card",
                      "status": "completed"
                    }
                  }
                ]
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/events/batch/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"events\": [\n      {\"event_id\": \"login-2026-10-17-000001\", \"event_category\": \"auth\", \"action_type\": \"login\",\n       \"occurred_at\": \"2026-10-17T09:15:02.481Z\", \"subject\": {\"vendor_data\": \"user-42\"}},\n      {\"event_id\": \"deposit-2026-10-17-000002\", \"event_category\": \"payment\", \"action_type\": \"deposit_completed\",\n       \"occurred_at\": \"2026-10-17T09:16:40.000Z\", \"subject\": {\"vendor_data\": \"user-42\"},\n       \"transaction_context\": {\"amount\": \"100.00\", \"currency\": \"EUR\", \"payment_reference_id\": \"dep_736\"},\n       \"payload\": {\"payment_method\": \"card\", \"status\": \"completed\"}}\n    ]\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.create_batch(\n    events=[{\n        \"event_id\": \"login-2026-10-17-000001\",\n        \"event_category\": \"auth\",\n        \"action_type\": \"login\",\n        \"occurred_at\": \"2026-10-17T09:15:02.481Z\",\n        \"subject\": {\n            \"vendor_data\": \"user-42\",\n        },\n    }, {\n        \"event_id\": \"deposit-2026-10-17-000002\",\n        \"event_category\": \"payment\",\n        \"action_type\": \"deposit_completed\",\n        \"occurred_at\": \"2026-10-17T09:16:40Z\",\n        \"subject\": {\n            \"vendor_data\": \"user-42\",\n        },\n        \"transaction_context\": {\n            \"amount\": \"100.00\",\n            \"currency\": \"EUR\",\n            \"payment_reference_id\": \"dep_736\",\n        },\n        \"payload\": {\"payment_method\": \"card\", \"status\": \"completed\"},\n    }],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.createBatch({\n  events: [{\n    event_id: \"login-2026-10-17-000001\",\n    event_category: \"auth\",\n    action_type: \"login\",\n    occurred_at: \"2026-10-17T09:15:02.481Z\",\n    subject: {\n      vendor_data: \"user-42\",\n    },\n  }, {\n    event_id: \"deposit-2026-10-17-000002\",\n    event_category: \"payment\",\n    action_type: \"deposit_completed\",\n    occurred_at: \"2026-10-17T09:16:40Z\",\n    subject: {\n      vendor_data: \"user-42\",\n    },\n    transaction_context: {\n      amount: \"100.00\",\n      currency: \"EUR\",\n      payment_reference_id: \"dep_736\",\n    },\n    payload: { payment_method: \"card\", status: \"completed\" },\n  }],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.CreateBatch(ctx, didit.MonitoringEventsCreateBatchParams{\n\tEvents: []didit.MonitoringEventCreateRequest{{\n\t\tEventID:       \"login-2026-10-17-000001\",\n\t\tEventCategory: \"auth\",\n\t\tActionType:    \"login\",\n\t\tOccurredAt:    time.Date(2026, 10, 17, 9, 15, 2, 0, time.UTC),\n\t\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\t\tVendorData: \"user-42\",\n\t\t},\n\t}, {\n\t\tEventID:       \"deposit-2026-10-17-000002\",\n\t\tEventCategory: \"payment\",\n\t\tActionType:    \"deposit_completed\",\n\t\tOccurredAt:    time.Date(2026, 10, 17, 9, 16, 40, 0, time.UTC),\n\t\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\t\tVendorData: \"user-42\",\n\t\t},\n\t\tTransactionContext: didit.Some(didit.MonitoringEventCreateRequestTransactionContext{\n\t\t\tAmount:             didit.String(\"100.00\"),\n\t\t\tCurrency:           didit.String(\"EUR\"),\n\t\t\tPaymentReferenceID: didit.String(\"dep_736\"),\n\t\t}),\n\t\tPayload: didit.Some(map[string]any{\"payment_method\": \"card\", \"status\": \"completed\"}),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.OffsetDateTime;\nimport java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.MonitoringEventCreateRequest;\nimport me.didit.types.MonitoringEventsCreateBatchParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().createBatch(MonitoringEventsCreateBatchParams.builder()\n        .events(List.of(\n                MonitoringEventCreateRequest.builder()\n                        .eventId(\"login-2026-10-17-000001\")\n                        .eventCategory(MonitoringEventCreateRequest.EventCategory.of(\"auth\"))\n                        .actionType(\"login\")\n                        .occurredAt(OffsetDateTime.parse(\"2026-10-17T09:15:02.481Z\"))\n                        .subject(MonitoringEventCreateRequest.Subject.builder()\n                                .vendorData(\"user-42\")\n                                .build())\n                        .build(),\n                MonitoringEventCreateRequest.builder()\n                        .eventId(\"deposit-2026-10-17-000002\")\n                        .eventCategory(MonitoringEventCreateRequest.EventCategory.of(\"payment\"))\n                        .actionType(\"deposit_completed\")\n                        .occurredAt(OffsetDateTime.parse(\"2026-10-17T09:16:40Z\"))\n                        .subject(MonitoringEventCreateRequest.Subject.builder()\n                                .vendorData(\"user-42\")\n                                .build())\n                        .transactionContext(MonitoringEventCreateRequest.TransactionContext.builder()\n                                .amount(\"100.00\")\n                                .currency(\"EUR\")\n                                .paymentReferenceId(\"dep_736\")\n                                .build())\n                        .payload(Map.of(\"payment_method\", \"card\", \"status\", \"completed\"))\n                        .build()))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->monitoringEvents->createBatch([\n    'events' => [[\n        'event_id' => 'login-2026-10-17-000001',\n        'event_category' => 'auth',\n        'action_type' => 'login',\n        'occurred_at' => '2026-10-17T09:15:02.481Z',\n        'subject' => [\n            'vendor_data' => 'user-42',\n        ],\n    ], [\n        'event_id' => 'deposit-2026-10-17-000002',\n        'event_category' => 'payment',\n        'action_type' => 'deposit_completed',\n        'occurred_at' => '2026-10-17T09:16:40Z',\n        'subject' => [\n            'vendor_data' => 'user-42',\n        ],\n        'transaction_context' => [\n            'amount' => '100.00',\n            'currency' => 'EUR',\n            'payment_reference_id' => 'dep_736',\n        ],\n        'payload' => ['payment_method' => 'card', 'status' => 'completed'],\n    ]],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.create_batch(\n  events: [{\n    event_id: \"login-2026-10-17-000001\",\n    event_category: \"auth\",\n    action_type: \"login\",\n    occurred_at: \"2026-10-17T09:15:02.481Z\",\n    subject: {\n      vendor_data: \"user-42\",\n    },\n  }, {\n    event_id: \"deposit-2026-10-17-000002\",\n    event_category: \"payment\",\n    action_type: \"deposit_completed\",\n    occurred_at: \"2026-10-17T09:16:40Z\",\n    subject: {\n      vendor_data: \"user-42\",\n    },\n    transaction_context: {\n      amount: \"100.00\",\n      currency: \"EUR\",\n      payment_reference_id: \"dep_736\",\n    },\n    payload: { payment_method: \"card\", status: \"completed\" },\n  }]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.CreateBatchAsync(new MonitoringEventsCreateBatchParams\n{\n    Events = new MonitoringEventCreateRequest[]\n    {\n        new()\n        {\n            EventId = \"login-2026-10-17-000001\",\n            EventCategory = \"auth\",\n            ActionType = \"login\",\n            OccurredAt = DateTimeOffset.Parse(\"2026-10-17T09:15:02.481Z\"),\n            Subject = new()\n            {\n                VendorData = \"user-42\",\n            },\n        },\n        new()\n        {\n            EventId = \"deposit-2026-10-17-000002\",\n            EventCategory = \"payment\",\n            ActionType = \"deposit_completed\",\n            OccurredAt = DateTimeOffset.Parse(\"2026-10-17T09:16:40Z\"),\n            Subject = new()\n            {\n                VendorData = \"user-42\",\n            },\n            TransactionContext = new MonitoringEventCreateRequestTransactionContext\n            {\n                Amount = \"100.00\",\n                Currency = \"EUR\",\n                PaymentReferenceId = \"dep_736\",\n            },\n            Payload = new Dictionary<string, object> { [\"payment_method\"] = \"card\", [\"status\"] = \"completed\" },\n        },\n    },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "لم يتم رفض أي عنصر: كل عنصر حالته `accepted` أو `replayed`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "accepted_count",
                    "replayed_count",
                    "rejected_count",
                    "results"
                  ],
                  "properties": {
                    "accepted_count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العناصر المخزنة والمقيّمة."
                    },
                    "replayed_count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العناصر المخزنة بالفعل بنفس المحتوى."
                    },
                    "rejected_count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العناصر غير المخزنة."
                    },
                    "results": {
                      "type": "array",
                      "description": "إدخال واحد لكل عنصر، وفق ترتيب الطلب.",
                      "items": {
                        "type": "object",
                        "description": "نتيجة عنصر واحد. تحمل العناصر المقبولة والمعاد تشغيلها أيضاً كل حقل من `MonitoringEventIngestResult`؛ بينما تحمل العناصر المرفوضة `event_id` و`errors` بدلاً من ذلك.",
                        "required": [
                          "index",
                          "outcome"
                        ],
                        "properties": {
                          "index": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "موضع العنصر في مصفوفة `events` الخاصة بك."
                          },
                          "outcome": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "replayed",
                              "rejected"
                            ],
                            "description": "`accepted`: تم التخزين والتقييم. `replayed`: تم تخزينه بالفعل بنفس المحتوى. `rejected`: لم يتم التخزين؛ راجع `errors`."
                          },
                          "event_id": {
                            "type": "string",
                            "nullable": true,
                            "description": "حقل `event_id` الخاص بك. في العناصر المرفوضة بواسطة التحقق من الصحة، تتم قراءته من مفتاح `event_id` بصيغة snake_case الخاص بالعنصر، لذا يكون null عندما يُغفله العنصر أو يرسل الاسم المستعار `eventId`."
                          },
                          "errors": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "العناصر المرفوضة فقط. أخطاء التحقق مفهرسة حسب الحقل، بنفس شكل استجابة `400` الخاصة بـ `POST /v3/events/`؛ ويتم الإبلاغ عن `event_id` المُعاد استخدامه بمحتوى مختلف كسلسلة نصية تحت `errors.event_id`."
                          },
                          "event_uuid": {
                            "type": "string",
                            "format": "uuid",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ACCEPTED",
                              "APPROVED",
                              "IN_REVIEW",
                              "DECLINED"
                            ],
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "score": {
                            "type": "integer",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "rules_evaluated_count": {
                            "type": "integer",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "rules_matched_count": {
                            "type": "integer",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "correlation_pending": {
                            "type": "boolean",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "retention_class": {
                            "type": "string",
                            "enum": [
                              "low_value",
                              "standard",
                              "risk_relevant",
                              "monetary_or_compliance"
                            ],
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "expires_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "idempotent_replay": {
                            "type": "boolean",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "rule_matches": {
                            "type": "array",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط.",
                            "items": {
                              "type": "object",
                              "required": [
                                "rule_id",
                                "library_key",
                                "mode",
                                "is_async"
                              ],
                              "properties": {
                                "rule_id": {
                                  "type": "string",
                                  "format": "uuid",
                                  "description": "معرّف UUID للقاعدة."
                                },
                                "library_key": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "مفتاح المكتبة عندما يتم تثبيت القاعدة من مكتبة القواعد، وإلا يكون null."
                                },
                                "mode": {
                                  "type": "string",
                                  "enum": [
                                    "ACTIVE",
                                    "TEST"
                                  ],
                                  "description": "تسجل قواعد `TEST` التطابق ولكنها لا تطبق أي إجراءات."
                                },
                                "is_async": {
                                  "type": "boolean",
                                  "description": "تكون `true` عندما تكون المطابقة ناتجة عن المعالجة غير المتزامنة."
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "All landed": {
                    "value": {
                      "accepted_count": 1,
                      "replayed_count": 1,
                      "rejected_count": 0,
                      "results": [
                        {
                          "index": 0,
                          "outcome": "accepted",
                          "event_uuid": "33333333-4444-5555-6666-777777777777",
                          "event_id": "login-2026-10-17-000001",
                          "status": "ACCEPTED",
                          "score": 0,
                          "rules_evaluated_count": 6,
                          "rules_matched_count": 0,
                          "correlation_pending": false,
                          "retention_class": "standard",
                          "expires_at": "2026-11-16T09:15:02.481000Z",
                          "idempotent_replay": false,
                          "rule_matches": []
                        },
                        {
                          "index": 1,
                          "outcome": "replayed",
                          "event_uuid": "11111111-2222-3333-4444-555555555555",
                          "event_id": "deposit-2026-10-17-000002",
                          "status": "ACCEPTED",
                          "score": 0,
                          "rules_evaluated_count": 6,
                          "rules_matched_count": 0,
                          "correlation_pending": false,
                          "retention_class": "monetary_or_compliance",
                          "expires_at": null,
                          "idempotent_replay": true,
                          "rule_matches": []
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "207": {
            "description": "تم رفض عنصر واحد على الأقل. تم تخزين العناصر الأخرى؛ قم بتصحيح العناصر المرفوضة وإعادة إرسالها فقط (إعادة إرسال عنصر مقبول آمنة، حيث يعود بحالة `replayed`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "accepted_count",
                    "replayed_count",
                    "rejected_count",
                    "results"
                  ],
                  "properties": {
                    "accepted_count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العناصر المخزنة والمقيّمة."
                    },
                    "replayed_count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العناصر المخزنة بالفعل بنفس المحتوى."
                    },
                    "rejected_count": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "العناصر غير المخزنة."
                    },
                    "results": {
                      "type": "array",
                      "description": "إدخال واحد لكل عنصر، وفق ترتيب الطلب.",
                      "items": {
                        "type": "object",
                        "description": "نتيجة عنصر واحد. تحمل العناصر المقبولة والمعاد تشغيلها أيضاً كل حقل من `MonitoringEventIngestResult`؛ بينما تحمل العناصر المرفوضة `event_id` و`errors` بدلاً من ذلك.",
                        "required": [
                          "index",
                          "outcome"
                        ],
                        "properties": {
                          "index": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "موضع العنصر في مصفوفة `events` الخاصة بك."
                          },
                          "outcome": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "replayed",
                              "rejected"
                            ],
                            "description": "`accepted`: تم التخزين والتقييم. `replayed`: تم تخزينه بالفعل بنفس المحتوى. `rejected`: لم يتم التخزين؛ راجع `errors`."
                          },
                          "event_id": {
                            "type": "string",
                            "nullable": true,
                            "description": "حقل `event_id` الخاص بك. في العناصر المرفوضة بواسطة التحقق من الصحة، تتم قراءته من مفتاح `event_id` بصيغة snake_case الخاص بالعنصر، لذا يكون null عندما يُغفله العنصر أو يرسل الاسم المستعار `eventId`."
                          },
                          "errors": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "العناصر المرفوضة فقط. أخطاء التحقق مفهرسة حسب الحقل، بنفس شكل استجابة `400` الخاصة بـ `POST /v3/events/`؛ ويتم الإبلاغ عن `event_id` المُعاد استخدامه بمحتوى مختلف كسلسلة نصية تحت `errors.event_id`."
                          },
                          "event_uuid": {
                            "type": "string",
                            "format": "uuid",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ACCEPTED",
                              "APPROVED",
                              "IN_REVIEW",
                              "DECLINED"
                            ],
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "score": {
                            "type": "integer",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "rules_evaluated_count": {
                            "type": "integer",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "rules_matched_count": {
                            "type": "integer",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "correlation_pending": {
                            "type": "boolean",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "retention_class": {
                            "type": "string",
                            "enum": [
                              "low_value",
                              "standard",
                              "risk_relevant",
                              "monetary_or_compliance"
                            ],
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "expires_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "idempotent_replay": {
                            "type": "boolean",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط."
                          },
                          "rule_matches": {
                            "type": "array",
                            "description": "العناصر المقبولة والمعاد تشغيلها فقط.",
                            "items": {
                              "type": "object",
                              "required": [
                                "rule_id",
                                "library_key",
                                "mode",
                                "is_async"
                              ],
                              "properties": {
                                "rule_id": {
                                  "type": "string",
                                  "format": "uuid",
                                  "description": "معرّف UUID للقاعدة."
                                },
                                "library_key": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "مفتاح المكتبة عندما يتم تثبيت القاعدة من مكتبة القواعد، وإلا يكون null."
                                },
                                "mode": {
                                  "type": "string",
                                  "enum": [
                                    "ACTIVE",
                                    "TEST"
                                  ],
                                  "description": "تسجل قواعد `TEST` التطابق ولكنها لا تطبق أي إجراءات."
                                },
                                "is_async": {
                                  "type": "boolean",
                                  "description": "تكون `true` عندما تكون المطابقة ناتجة عن المعالجة غير المتزامنة."
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Partial success": {
                    "value": {
                      "accepted_count": 1,
                      "replayed_count": 0,
                      "rejected_count": 2,
                      "results": [
                        {
                          "index": 0,
                          "outcome": "accepted",
                          "event_uuid": "33333333-4444-5555-6666-777777777777",
                          "event_id": "login-2026-10-17-000001",
                          "status": "ACCEPTED",
                          "score": 0,
                          "rules_evaluated_count": 6,
                          "rules_matched_count": 0,
                          "correlation_pending": false,
                          "retention_class": "standard",
                          "expires_at": "2026-11-16T09:15:02.481000Z",
                          "idempotent_replay": false,
                          "rule_matches": []
                        },
                        {
                          "index": 1,
                          "event_id": "deposit-2026-10-17-000002",
                          "outcome": "rejected",
                          "errors": {
                            "payload": [
                              "payment.deposit_completed requires: payment_method, status."
                            ]
                          }
                        },
                        {
                          "index": 2,
                          "event_id": "login-2026-10-16-000777",
                          "outcome": "rejected",
                          "errors": {
                            "event_id": "event_id 'login-2026-10-16-000777' already exists with a different payload."
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "الدفعة نفسها غير صالحة: حقل `events` مفقود أو ليس مصفوفة، أو فارغ، أو يحتوي على أكثر من 500 عنصر. لم يتم تخزين أي شيء؛ قسّم الدفعات الكبيرة.",
            "content": {
              "application/json": {
                "examples": {
                  "Not a list": {
                    "value": {
                      "events": "Expected a list of events."
                    }
                  },
                  "Empty": {
                    "value": {
                      "events": "At least one event is required."
                    }
                  },
                  "Too many": {
                    "value": {
                      "events": "A batch accepts at most 500 events; received 612."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. المفتاح منتهي الصلاحية فقط هو ما يتلقى `401`؛ أما المفتاح المفقود أو غير الصالح فيتلقى `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح ذو نطاق محدد يفتقر إلى `transactions: write`، أو مفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة (مثل هذا المفتاح لا يصل أبداً إلى بيانات مراقبة المعاملات)، أو طلب من خارج قائمة العناوين المسموح بها للمفتاح. يُرجع أيضاً مع `code: event_monitoring_disabled` أثناء تعطيل استيعاب الأحداث للتطبيق؛ لا يتم تخزين أي شيء في تلك الحالة، ويتم إجراء الفحص قبل التحقق من صحة نص الطلب.",
            "content": {
              "application/json": {
                "examples": {
                  "Event monitoring disabled": {
                    "value": {
                      "detail": "Event monitoring is not enabled for this application. Turn on event ingestion in the transaction monitoring settings before submitting events.",
                      "code": "event_monitoring_disabled"
                    }
                  },
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without access": {
                    "value": {
                      "detail": "This API key has no write access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "IP not allowed": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك عمليات إنشاء المعاملات واستيعاب الأحداث (`POST /v3/transactions/`، `POST /v3/events/`، `POST /v3/events/batch/`) رصيداً قدره 600 طلب في الدقيقة لكل مفتاح API، وهو منفصل عن رصيد الـ 300 المشترك بين سائر طلبات الكتابة الأخرى. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني التي يجب انتظارها قبل إعادة المحاولة، مقربة للأعلى لتقع إعادة المحاولة في النافذة التالية.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Ingestion rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/events/sdk-token/": {
      "post": {
        "summary": "إصدار token لمراقبة SDK",
        "description": "إصدار بيانات اعتماد جهاز قصيرة الأجل مرتبطة بموضوع واحد، حتى يتمكن تطبيق الويب أو الجوال لديك من إرسال أحداث ذلك المستخدم مباشرة إلى Didit دون مفتاح API. يُرسل التطبيق `monitoring_token` المُعاد في الرأس `X-Monitoring-Token` إلى مسار الجهاز (`POST /v1/events/` و`POST /v1/events/batch/`)، حيث يتم دائمًا استبدال الموضوع بـ `vendor_data` هذا، وتُرفض الأحداث الخارجة عن `allowed_event_categories`، وتستهلك كل عملية إرسال حدث استخدامًا واحدًا، ويُرفض أي طلب لا تتطابق فيه قيمة `Origin` مع `bind_to_origin`. استدعه من واجهتك الخلفية فقط؛ لا يُنشئ الإصدار سوى بيانات الاعتماد ولا شيء غير ذلك (لا يتم إنشاء أي مستخدم). يجب تفعيل استيعاب الأحداث للتطبيق، وإلا فإن هذا الـ endpoint يُرجع `403` مع `code: event_monitoring_disabled` بدلاً من إصدار بيانات اعتماد لا يمكنها الكتابة أبدًا. يحتاج مفتاح API ذو النطاق المحدد إلى `transactions: write`. راجع [إرسال أحداث SDK](https://docs.didit.me/ar/transaction-monitoring/sdk-event-submission).",
        "operationId": "create_monitoring_event_sdk_token",
        "x-didit-sdk": {
          "resource": "monitoring_events",
          "method": "create_sdk_token",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Monitoring Events"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "تُقبل أسماء camelCase البديلة: `vendorData` و`entityType` و`allowedEventCategories` و`ttlSeconds` و`maxUses` و`bindToOrigin`.",
                "required": [
                  "vendor_data"
                ],
                "properties": {
                  "vendor_data": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "المعرّف الخاص بك للكيان الذي ينتمي إليه كل حدث يتم إرساله باستخدام بيانات الاعتماد هذه."
                  },
                  "entity_type": {
                    "type": "string",
                    "maxLength": 32,
                    "default": "individual",
                    "description": "يربط `company` الموضوع بكيان شركة؛ وأي قيمة أخرى (الافتراضية `individual`) تربطه بفرد."
                  },
                  "allowed_event_categories": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "auth",
                        "session",
                        "gameplay",
                        "bonus",
                        "affiliate",
                        "payment",
                        "dispute",
                        "security",
                        "responsible_gambling",
                        "custom"
                      ]
                    },
                    "description": "الفئات التي يجوز لبيانات الاعتماد إرسالها. احذفها أو أرسل `[]` للسماح بجميع الفئات."
                  },
                  "ttl_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 86400,
                    "default": 900,
                    "description": "عمر صلاحية بيانات الاعتماد بالثواني."
                  },
                  "max_uses": {
                    "type": "integer",
                    "minimum": 1,
                    "nullable": true,
                    "default": 1000,
                    "description": "عدد الأحداث التي يجوز لبيانات الاعتماد إرسالها (تستهلك الدفعة استخداماً واحداً لكل حدث). أرسل `null` لعدم تحديد حد أقصى طوال فترة الصلاحية."
                  },
                  "bind_to_origin": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true,
                    "description": "عند تعيينه، يجب أن يتطابق رأس `Origin` للمتصفح لكل طلب جهاز مع هذه القيمة تماماً؛ ويتم رفض أي طلب بدون رأس `Origin`."
                  }
                }
              },
              "example": {
                "vendor_data": "user-42",
                "allowed_event_categories": [
                  "auth",
                  "session",
                  "gameplay"
                ],
                "ttl_seconds": 900,
                "max_uses": 1000,
                "bind_to_origin": "https://app.example.com"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/events/sdk-token/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"vendor_data\": \"user-42\",\n    \"allowed_event_categories\": [\"auth\", \"session\", \"gameplay\"],\n    \"ttl_seconds\": 900,\n    \"max_uses\": 1000,\n    \"bind_to_origin\": \"https://app.example.com\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.create_sdk_token(\n    vendor_data=\"user-42\",\n    allowed_event_categories=[\"auth\", \"session\", \"gameplay\"],\n    ttl_seconds=900,\n    max_uses=1000,\n    bind_to_origin=\"https://app.example.com\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.createSdkToken({\n  vendor_data: \"user-42\",\n  allowed_event_categories: [\"auth\", \"session\", \"gameplay\"],\n  ttl_seconds: 900,\n  max_uses: 1000,\n  bind_to_origin: \"https://app.example.com\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.CreateSDKToken(ctx, didit.MonitoringEventsCreateSDKTokenParams{\n\tVendorData:             \"user-42\",\n\tAllowedEventCategories: didit.Some([]didit.MonitoringEventsCreateSDKTokenParamsAllowedEventCategories{\"auth\", \"session\", \"gameplay\"}),\n\tTTLSeconds:             didit.Int(900),\n\tMaxUses:                didit.Int(1000),\n\tBindToOrigin:           didit.String(\"https://app.example.com\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.MonitoringEventsCreateSdkTokenParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().createSdkToken(MonitoringEventsCreateSdkTokenParams.builder()\n        .vendorData(\"user-42\")\n        .allowedEventCategories(List.of(MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of(\"auth\"), MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of(\"session\"), MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of(\"gameplay\")))\n        .ttlSeconds(900L)\n        .maxUses(1000L)\n        .bindToOrigin(\"https://app.example.com\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->monitoringEvents->createSdkToken([\n    'vendor_data' => 'user-42',\n    'allowed_event_categories' => ['auth', 'session', 'gameplay'],\n    'ttl_seconds' => 900,\n    'max_uses' => 1000,\n    'bind_to_origin' => 'https://app.example.com',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.create_sdk_token(\n  vendor_data: \"user-42\",\n  allowed_event_categories: [\"auth\", \"session\", \"gameplay\"],\n  ttl_seconds: 900,\n  max_uses: 1000,\n  bind_to_origin: \"https://app.example.com\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.CreateSdkTokenAsync(new MonitoringEventsCreateSdkTokenParams\n{\n    VendorData = \"user-42\",\n    AllowedEventCategories = new MonitoringEventsCreateSdkTokenParamsAllowedEventCategories[] { \"auth\", \"session\", \"gameplay\" },\n    TtlSeconds = 900,\n    MaxUses = 1000,\n    BindToOrigin = \"https://app.example.com\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إصدار بيانات الاعتماد. مرّر `monitoring_token` إلى التطبيق وعامله كسرّ حتى `expires_at`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "monitoring_token",
                    "expires_at",
                    "allowed_event_categories",
                    "max_uses",
                    "bind_to_origin"
                  ],
                  "properties": {
                    "monitoring_token": {
                      "type": "string",
                      "description": "بيانات اعتماد الجهاز (token آمن لعناوين URL مكوّن من 43 حرفاً). أرسله في الرأس `X-Monitoring-Token`."
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "وقت التوقف عن قبول بيانات الاعتماد."
                    },
                    "allowed_event_categories": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "auth",
                          "session",
                          "gameplay",
                          "bonus",
                          "affiliate",
                          "payment",
                          "dispute",
                          "security",
                          "responsible_gambling",
                          "custom"
                        ]
                      },
                      "description": "الفئات التي يجوز لبيانات الاعتماد إرسالها؛ وتعني `[]` جميع الفئات."
                    },
                    "max_uses": {
                      "type": "integer",
                      "nullable": true,
                      "description": "ميزانية الأحداث لبيانات الاعتماد؛ تعني قيمة null عدم وجود حد أقصى."
                    },
                    "bind_to_origin": {
                      "type": "string",
                      "nullable": true,
                      "description": "الأصل الذي ترتبط به بيانات الاعتماد، أو null."
                    }
                  }
                },
                "example": {
                  "monitoring_token": "q7ZtR2xKp9VbN4mWc8LdH1sYfJ3gT6uEaQ0oPiXzBkC",
                  "expires_at": "2026-10-17T09:30:02.481000Z",
                  "allowed_event_categories": [
                    "auth",
                    "session",
                    "gameplay"
                  ],
                  "max_uses": 1000,
                  "bind_to_origin": "https://app.example.com"
                }
              }
            }
          },
          "400": {
            "description": "فشل التحقق: حقل `vendor_data` مفقود، أو `ttl_seconds` خارج النطاق من 60 إلى 86400، أو `max_uses` أقل من 1، أو فئة غير معروفة (مفهرسة بموضعها في المصفوفة).",
            "content": {
              "application/json": {
                "examples": {
                  "Missing vendor_data": {
                    "value": {
                      "vendor_data": [
                        "This field is required."
                      ]
                    }
                  },
                  "ttl_seconds too short": {
                    "value": {
                      "ttl_seconds": [
                        "Ensure this value is greater than or equal to 60."
                      ]
                    }
                  },
                  "Unknown category": {
                    "value": {
                      "allowed_event_categories": {
                        "1": [
                          "\"login\" is not a valid choice."
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. المفتاح منتهي الصلاحية فقط هو ما يتلقى `401`؛ أما المفتاح المفقود أو غير الصالح فيتلقى `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح ذو نطاق محدد يفتقر إلى `transactions: write`، أو مفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة (مثل هذا المفتاح لا يصل أبداً إلى بيانات مراقبة المعاملات)، أو طلب من خارج قائمة العناوين المسموح بها للمفتاح. يُرجع أيضاً مع `code: event_monitoring_disabled` أثناء تعطيل استيعاب الأحداث للتطبيق؛ لا يتم تخزين أي شيء في تلك الحالة، ويتم إجراء الفحص قبل التحقق من صحة نص الطلب.",
            "content": {
              "application/json": {
                "examples": {
                  "Event monitoring disabled": {
                    "value": {
                      "detail": "Event monitoring is not enabled for this application. Turn on event ingestion in the transaction monitoring settings before submitting events.",
                      "code": "event_monitoring_disabled"
                    }
                  },
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without access": {
                    "value": {
                      "detail": "This API key has no write access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "IP not allowed": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك طلبات الكتابة (`POST`، `PATCH`، `DELETE`) رصيداً قدره 300 طلب في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/events/{event_uuid}/": {
      "get": {
        "summary": "الحصول على حدث المراقبة",
        "description": "استرداد حدث مراقبة واحد مع كل ما ترجعه القائمة بالإضافة إلى payload والقيم المخصصة وسياق الجهاز ومصدر الحقول (`field_sources`) وحقول النطاق التي جرى رفعها إلى المستوى الرئيسي و`expires_at` وكل عمليات تشغيل القواعد المطابقة مع أدلتها، وإثراء عنوان IP والوسوم التي أرفقتها القواعد. عندما تكون `correlation_pending` بقيمة `true`، فهذا يعني أن هناك قاعدة غير متزامنة لا تزال بحاجة إلى التشغيل؛ اقرأ الحدث مرة أخرى بعد بضع دقائق للحصول على `status` و`score` و`rule_runs` النهائية. تعمل عمليات القراءة سواء تم تفعيل استيعاب الأحداث أم لا. يتطلب مفتاح API المخصص الصلاحية `transactions: read`. راجع [الأدلة](https://docs.didit.me/ar/transaction-monitoring/event-rules#الأدلة) و[إثراء عنوان IP](https://docs.didit.me/ar/transaction-monitoring/ip-enrichment).",
        "operationId": "get_monitoring_event",
        "x-didit-sdk": {
          "resource": "monitoring_events",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Monitoring Events"
        ],
        "parameters": [
          {
            "name": "event_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف Didit للحدث (`event_uuid` من استجابة الإنشاء أو الدُفعة أو القائمة أو المخطط الزمني)، وليس `event_id` الخاص بك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/events/11111111-2222-3333-4444-555555555555/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.retrieve(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->monitoringEvents->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الحدث مع الأدلة الخاصة به.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringEventDetail"
                },
                "examples": {
                  "Login from a VPN, in review": {
                    "value": {
                      "event_uuid": "33333333-4444-5555-6666-777777777777",
                      "event_id": "login-2026-10-17-000001",
                      "event_category": "auth",
                      "action_type": "login",
                      "occurred_at": "2026-10-17T09:15:02.481000Z",
                      "received_at": "2026-10-17T09:15:02.903114Z",
                      "status": "IN_REVIEW",
                      "score": 40,
                      "subject_vendor_data": "user-42",
                      "subject_entity_type": "individual",
                      "subject_uuid": "66666666-7777-8888-9999-000000000000",
                      "counterparty_vendor_data": null,
                      "session_id": "web-session-abc",
                      "device_fingerprint": "fp-a8c1",
                      "ip_address": "203.0.113.42",
                      "ip_country": "ES",
                      "amount": null,
                      "currency": null,
                      "game_id": null,
                      "round_id": null,
                      "bonus_id": null,
                      "affiliate_code": null,
                      "payment_reference_id": null,
                      "retention_class": "risk_relevant",
                      "rules_matched_count": 1,
                      "correlation_pending": false,
                      "is_droppable": true,
                      "payload": {
                        "method": "password"
                      },
                      "custom_values": {
                        "vip_tier": "gold",
                        "vpn_or_proxy_detected": true
                      },
                      "device_context": {
                        "fingerprint": "fp-a8c1",
                        "network_context": {
                          "ip_address": "203.0.113.42",
                          "ip_country": "Spain",
                          "ip_country_code": "ES",
                          "ip_city": "Madrid",
                          "asn_number": 64500,
                          "asn_organization": "Example Networks",
                          "is_vpn_or_tor": true,
                          "is_data_center": false
                        }
                      },
                      "field_sources": {
                        "subject.vendor_data": "customer",
                        "event_category": "customer",
                        "action_type": "customer",
                        "occurred_at": "customer",
                        "received_at": "server",
                        "payload.method": "customer",
                        "session.session_id": "customer",
                        "session.sequence": "customer",
                        "device_context.fingerprint": "customer",
                        "device_context.network_context.ip_address": "customer",
                        "device_context.network_context.ip_country": "server",
                        "device_context.network_context.ip_country_code": "server",
                        "device_context.network_context.ip_city": "server",
                        "device_context.network_context.asn_number": "server",
                        "device_context.network_context.asn_organization": "server",
                        "device_context.network_context.is_vpn_or_tor": "server",
                        "device_context.network_context.is_data_center": "server"
                      },
                      "session_sequence": 142,
                      "table_id": null,
                      "hand_id": null,
                      "match_id": null,
                      "market_id": null,
                      "side": null,
                      "role": null,
                      "net_result_amount": null,
                      "payment_fingerprint": null,
                      "instrument_reference_hash": null,
                      "withdrawal_address_hash": null,
                      "dispute_id": null,
                      "chargeback_id": null,
                      "changed_field": null,
                      "identity_match_ref": null,
                      "schema_version": 1,
                      "expires_at": "2027-01-15T09:15:02.481000Z",
                      "rules_evaluated_count": 6,
                      "rule_runs": [
                        {
                          "rule_uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                          "rule_title": "Login from VPN or Tor",
                          "library_key": null,
                          "matched": true,
                          "mode": "ACTIVE",
                          "is_async": false,
                          "severity": "MEDIUM",
                          "score_delta": 40,
                          "action_summary": "score +40; add_tag:VPN_LOGIN",
                          "matched_payload": [
                            {
                              "field": "event.ip.is_vpn_or_tor",
                              "operator": "eq",
                              "expected_value": true,
                              "current_value": true,
                              "matched": true,
                              "group_index": null,
                              "group_logic": "AND",
                              "field_source": "server"
                            }
                          ],
                          "created_at": "2026-10-17T09:15:02.951207Z"
                        }
                      ],
                      "ip_enrichment": {
                        "ip_country_code": "ES",
                        "ip_city": "Madrid",
                        "asn_number": 64500,
                        "asn_organization": "Example Networks",
                        "is_vpn_or_tor": true,
                        "is_data_center": false,
                        "proxy_type": null,
                        "last_enriched_at": "2026-10-17T09:15:02.910442Z"
                      },
                      "subject_profile": null,
                      "tags": [
                        "VPN_LOGIN"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. المفتاح منتهي الصلاحية فقط هو ما يتلقى `401`؛ أما المفتاح المفقود أو غير الصالح فيتلقى `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح ذو نطاق محدد يفتقر إلى `transactions: read`، أو مفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة (مثل هذا المفتاح لا يصل أبداً إلى بيانات مراقبة المعاملات)، أو طلب من خارج قائمة العناوين المسموح بها للمفتاح.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without access": {
                    "value": {
                      "detail": "This API key has no read access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "IP not allowed": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد حدث بهذا المعرّف `event_uuid` في التطبيق: لم يتم تخزينه مطلقاً، أو تم حذفه، أو ينتمي إلى تطبيق آخر. أي جزء مسار لا يمثل UUID لا يطابق المسار ويُرجع أيضاً `404`.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No MonitoringEvent matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك طلبات `GET` رصيداً قدره 600 طلب في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/events/subjects/{vendor_data}/": {
      "get": {
        "summary": "الحصول على المخطط الزمني لأحداث الموضوع",
        "description": "سرد كل أحداث المراقبة لجهة معينة، الأحدث حسب `occurred_at` أولاً. معرّف `vendor_data` فريد فقط ضمن نوع الكيان الواحد، لذا يمكن لنفس المعرّف أن يُشير إلى فرد وشركة في آنٍ واحد: يحدد `entity_type` الجدول الزمني الذي تتلقاه، والقيمة الافتراضية هي `individual`، لذا تتطلب أحداث الشركة تعيين `entity_type=company`. تنطبق عوامل التصفية الخاصة بـ `GET /v3/events/` أيضاً، ويُرجع `vendor_data` الذي ليس لديه أي أحداث صفحة فارغة بدلاً من `404`. يتطلب مفتاح API محدد النطاق إذن `transactions: read`. راجع [قراءة الأحداث السابقة](https://docs.didit.me/ar/transaction-monitoring/events#قراءة-الأحداث-واسترجاعها).",
        "operationId": "get_monitoring_event_subject_timeline",
        "x-didit-sdk": {
          "resource": "monitoring_events",
          "method": "retrieve_subject_timeline",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Monitoring Events"
        ],
        "parameters": [
          {
            "name": "vendor_data",
            "in": "path",
            "required": true,
            "description": "المعرّف الخاص بك للكيان (`subject.vendor_data` لأحداثه). شفّره بترميز URL؛ لا يمكن لـ endpoint هذا معالجة قيمة تحتوي على `/`.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "example": "user-42"
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "description": "تُرجع القيمة `company` الشركة المرتبطة بقيمة `vendor_data` هذه؛ بينما يُرجع أي قيمة أخرى، أو عدم تقديم قيمة، الفرد. تُقبل `subject_entity_type` كاسم بديل عند غياب `entity_type`.",
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "company"
              ],
              "default": "individual"
            },
            "example": "individual"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "الحد الأقصى لعدد الأحداث لكل صفحة. القيمة الافتراضية هي 50. تُرْجِع القيم التي تزيد عن 1000000 الرمز `400`؛ وأي قيمة غير عددية أو صفرية أو سالبة تعود تلقائياً إلى 50.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "عدد الأحداث المراد تخطيها. القيمة الافتراضية هي 0. يُفضّل تتبّع رابط `next` من الاستجابة.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "example": 0
          },
          {
            "name": "event_category",
            "in": "query",
            "required": false,
            "description": "الأحداث في هذه الفئات فقط. كرر المعامل لعدة قيم (`?event_category=payment&event_category=dispute`)؛ ويتم إرجاع أي حدث يطابق أيًا منها.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "auth",
                  "session",
                  "gameplay",
                  "bonus",
                  "affiliate",
                  "payment",
                  "dispute",
                  "security",
                  "responsible_gambling",
                  "custom"
                ]
              }
            },
            "example": [
              "payment",
              "dispute"
            ]
          },
          {
            "name": "action_type",
            "in": "query",
            "required": false,
            "description": "فقط الأحداث التي تتضمن أنواع الإجراءات هذه (مطابقة تامة، حساسة لحالة الأحرف). كرر لعدة قيم.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "example": [
              "deposit_completed",
              "chargeback_opened"
            ]
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "فقط الأحداث التي لها هذه الحالات. كرر لعدة قيم.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACCEPTED",
                  "APPROVED",
                  "IN_REVIEW",
                  "DECLINED"
                ]
              }
            },
            "example": [
              "IN_REVIEW",
              "DECLINED"
            ]
          },
          {
            "name": "retention_class",
            "in": "query",
            "required": false,
            "description": "الأحداث في فئات الاحتفاظ هذه فقط. كرر لعدة قيم.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "low_value",
                  "standard",
                  "risk_relevant",
                  "monetary_or_compliance"
                ]
              }
            },
            "example": [
              "risk_relevant"
            ]
          },
          {
            "name": "business_vendor_data",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `business.vendor_data` المرسل مع الحدث.",
            "schema": {
              "type": "string"
            },
            "example": "merchant-7"
          },
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `session.session_id`.",
            "schema": {
              "type": "string"
            },
            "example": "web-session-abc"
          },
          {
            "name": "device_fingerprint",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `device_context.fingerprint`.",
            "schema": {
              "type": "string"
            },
            "example": "fp-a8c1"
          },
          {
            "name": "ip_address",
            "in": "query",
            "required": false,
            "description": "تطابق تام في عنوان IP الخاص بالحدث.",
            "schema": {
              "type": "string"
            },
            "example": "203.0.113.42"
          },
          {
            "name": "game_id",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `game_id` المُروَّج إلى المستوى الأعلى.",
            "schema": {
              "type": "string"
            },
            "example": "poker-holdem-01"
          },
          {
            "name": "round_id",
            "in": "query",
            "required": false,
            "description": "تطابق تام مع `round_id` المُروَّج إلى المستوى الأعلى.",
            "schema": {
              "type": "string"
            },
            "example": "round-88231"
          },
          {
            "name": "affiliate_code",
            "in": "query",
            "required": false,
            "description": "تطابق تام مع `affiliate_code` المُروَّج إلى المستوى الأعلى.",
            "schema": {
              "type": "string"
            },
            "example": "aff-summer"
          },
          {
            "name": "payment_reference_id",
            "in": "query",
            "required": false,
            "description": "تطابق تام في مرجع الدفع (من `transaction_context.payment_reference_id` أو `payload.payment_reference_id`).",
            "schema": {
              "type": "string"
            },
            "example": "dep_735"
          },
          {
            "name": "counterparty_vendor_data",
            "in": "query",
            "required": false,
            "description": "تطابق تام في `counterparty_vendor_data` المُروَّج إلى المستوى الأعلى.",
            "schema": {
              "type": "string"
            },
            "example": "user-77"
          },
          {
            "name": "matched_only",
            "in": "query",
            "required": false,
            "description": "تُرجع القيمة `true` (وكذلك `1` أو `yes`، بدون تحسس لحالة الأحرف) الأحداث التي طابقت قاعدة واحدة على الأقل فقط (`rules_matched_count` أكبر من 0). وتُتجاهل أي قيمة أخرى.",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "example": true
          },
          {
            "name": "occurred_from",
            "in": "query",
            "required": false,
            "description": "فقط الأحداث التي يكون فيها `occurred_at` في هذه اللحظة أو بعدها (شاملًا). أرسل قيمة بتنسيق ISO 8601: مثل `2026-10-01T00:00:00Z`، أو إزاحة صريحة مع ترميز `+` بنسبة مئوية (`2026-10-01T02:00:00%2B02:00`؛ حيث يتم فك ترميز `+` غير المرمز كمسافة وتتعذر قراءة القيمة)، أو تاريخ بمفرده (`2026-10-01`)، وهو ما يعني 00:00:00 UTC من ذلك اليوم. تُقرأ القيمة بدون إزاحة على أنها بتوقيت UTC. لا تُقبل القيم بأي تنسيق آخر.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-10-01T00:00:00Z"
          },
          {
            "name": "occurred_to",
            "in": "query",
            "required": false,
            "description": "فقط الأحداث التي يكون فيها `occurred_at` في هذه اللحظة أو قبلها (شاملًا). التاريخ بمفرده يعني بداية ذلك اليوم، لذا فإن `occurred_to=2026-10-15` يستبعد بقية يوم 15 أكتوبر؛ أرسل `2026-10-15T23:59:59Z` لتضمينه. أرسل قيمة بتنسيق ISO 8601: مثل `2026-10-01T00:00:00Z`، أو إزاحة صريحة مع ترميز `+` بنسبة مئوية (`2026-10-01T02:00:00%2B02:00`؛ حيث يتم فك ترميز `+` غير المرمز كمسافة وتتعذر قراءة القيمة)، أو تاريخ بمفرده (`2026-10-01`)، وهو ما يعني 00:00:00 UTC من ذلك اليوم. تُقرأ القيمة بدون إزاحة على أنها بتوقيت UTC. لا تُقبل القيم بأي تنسيق آخر.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-10-17T23:59:59Z"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "تطابق لسلسلة فرعية غير حساس لحالة الأحرف في `event_id` أو `action_type` أو `subject_vendor_data` أو `counterparty_vendor_data`.",
            "schema": {
              "type": "string"
            },
            "example": "chargeback"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/events/subjects/user-42/?entity_type=individual&limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.monitoring_events.retrieve_subject_timeline(\n    \"user-42\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.monitoringEvents.retrieveSubjectTimeline(\"user-42\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.MonitoringEvents.RetrieveSubjectTimelineAutoPaging(ctx, \"user-42\", didit.MonitoringEventsRetrieveSubjectTimelineParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.monitoringEvents().retrieveSubjectTimeline(\"user-42\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->monitoringEvents->retrieveSubjectTimeline('user-42') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.monitoring_events.retrieve_subject_timeline(\"user-42\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.MonitoringEvents.RetrieveSubjectTimelineAsync(\"user-42\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة واحدة من أحداث الشخص المعني.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringEventPage"
                },
                "examples": {
                  "Individual timeline": {
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "event_uuid": "11111111-2222-3333-4444-555555555555",
                          "event_id": "chargeback-2026-10-16-000318",
                          "event_category": "dispute",
                          "action_type": "chargeback_opened",
                          "occurred_at": "2026-10-16T14:02:11Z",
                          "received_at": "2026-10-16T14:02:12.418230Z",
                          "status": "IN_REVIEW",
                          "score": 60,
                          "subject_vendor_data": "user-42",
                          "subject_entity_type": "individual",
                          "subject_uuid": "66666666-7777-8888-9999-000000000000",
                          "counterparty_vendor_data": null,
                          "session_id": null,
                          "device_fingerprint": null,
                          "ip_address": null,
                          "ip_country": null,
                          "amount": "250.000000000000000000",
                          "currency": "EUR",
                          "game_id": null,
                          "round_id": null,
                          "bonus_id": null,
                          "affiliate_code": null,
                          "payment_reference_id": "dep_735",
                          "retention_class": "monetary_or_compliance",
                          "rules_matched_count": 1,
                          "correlation_pending": false,
                          "is_droppable": false
                        },
                        {
                          "event_uuid": "22222222-3333-4444-5555-666666666666",
                          "event_id": "login-2026-10-15-000912",
                          "event_category": "auth",
                          "action_type": "login",
                          "occurred_at": "2026-10-15T08:30:00.120000Z",
                          "received_at": "2026-10-15T08:30:00.734512Z",
                          "status": "ACCEPTED",
                          "score": 0,
                          "subject_vendor_data": "user-42",
                          "subject_entity_type": "individual",
                          "subject_uuid": "66666666-7777-8888-9999-000000000000",
                          "counterparty_vendor_data": null,
                          "session_id": "web-session-abc",
                          "device_fingerprint": "fp-a8c1",
                          "ip_address": "203.0.113.42",
                          "ip_country": "ES",
                          "amount": null,
                          "currency": null,
                          "game_id": null,
                          "round_id": null,
                          "bonus_id": null,
                          "affiliate_code": null,
                          "payment_reference_id": null,
                          "retention_class": "standard",
                          "rules_matched_count": 0,
                          "correlation_pending": false,
                          "is_droppable": true
                        }
                      ]
                    }
                  },
                  "No events": {
                    "value": {
                      "count": 0,
                      "next": null,
                      "previous": null,
                      "results": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`limit` أو `offset` أكبر من 1000000. نص الاستجابة هو مصفوفة JSON تحتوي على رسالة واحدة. تعود قيمة `limit` غير الرقمية أو غير الموجبة إلى القيمة الافتراضية 50 بدلاً من أن يفشل الطلب.",
            "content": {
              "application/json": {
                "examples": {
                  "limit too large": {
                    "summary": "حقل limit يتجاوز 1000000",
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  },
                  "offset too large": {
                    "summary": "حقل offset يتجاوز 1000000",
                    "value": [
                      "offset must not exceed 1000000."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. المفتاح منتهي الصلاحية فقط هو ما يتلقى `401`؛ أما المفتاح المفقود أو غير الصالح فيتلقى `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح ذو نطاق محدد يفتقر إلى `transactions: read`، أو مفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة (مثل هذا المفتاح لا يصل أبداً إلى بيانات مراقبة المعاملات)، أو طلب من خارج قائمة العناوين المسموح بها للمفتاح.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without access": {
                    "value": {
                      "detail": "This API key has no read access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "IP not allowed": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك طلبات `GET` رصيداً قدره 600 طلب في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/events/enrichment-metrics/": {
      "get": {
        "summary": "الحصول على مقاييس إثراء الأحداث",
        "description": "إرجاع عدادات استيعاب الأحداث وإثراء عنوان IP لتطبيقك لفترة محددة، مجمّعة عبر كل مسار (الخادم والدفعة والجهاز)، حتى تتمكن من مراقبة حجم الأحداث والتأكد من تسوية الإثراء مرة واحدة لكل عنوان فريد بدلاً من مرة واحدة لكل حدث. تغطي الفترة اليوم بالإضافة إلى الأيام السابقة المحددة بـ `days`، محسوبة حسب تاريخ تقويم UTC. تكون النسب الثلاث فارغة (null) عندما يكون مقامها صفراً. يحتاج مفتاح API ذو النطاق المحدد إلى `transactions: read`. راجع [IP enrichment](https://docs.didit.me/ar/transaction-monitoring/events#إثراء-عنوان-ip).",
        "operationId": "get_monitoring_event_enrichment_metrics",
        "x-didit-sdk": {
          "resource": "monitoring_events",
          "method": "retrieve_enrichment_metrics",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Monitoring Events"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "طول الفترة بالأيام. القيمة الافتراضية هي 30؛ ويتم حصر القيم بين 1 و365، وفي حال إدخال قيمة ليست عدداً صحيحاً يتم الرجوع إلى 30 تلقائياً. تُعاد القيمة المطبقة كـ `period_days`.",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 365
            },
            "example": 30
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/events/enrichment-metrics/?days=30' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.retrieve_enrichment_metrics()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.retrieveEnrichmentMetrics();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.RetrieveEnrichmentMetrics(ctx, didit.MonitoringEventsRetrieveEnrichmentMetricsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().retrieveEnrichmentMetrics();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->monitoringEvents->retrieveEnrichmentMetrics();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.retrieve_enrichment_metrics\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.RetrieveEnrichmentMetricsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "العدادات والنسب للفترة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "events_ingested",
                    "events_rejected",
                    "enrichment_lookups",
                    "enrichment_cache_hits",
                    "enrichment_provider_calls",
                    "enrichment_skipped_low_value",
                    "unique_ips_seen",
                    "period_days",
                    "cache_hit_rate",
                    "unique_ip_ratio",
                    "provider_calls_per_1k_events"
                  ],
                  "properties": {
                    "events_ingested": {
                      "type": "integer",
                      "description": "تم تخزين أحداث جديدة. لا يتم احتساب عمليات إعادة التشغيل المتوافقة مع idempotency."
                    },
                    "events_rejected": {
                      "type": "integer",
                      "description": "العناصر المرفوضة داخل طلبات الدفعات (مسارات الخادم والجهاز). لا يتم احتساب طلب الحدث الفردي المرفوض."
                    },
                    "enrichment_lookups": {
                      "type": "integer",
                      "description": "الأحداث التي تم حل عنوان IP العام الخاص بها، سواء من ذاكرة التخزين المؤقت أو حديثاً."
                    },
                    "enrichment_cache_hits": {
                      "type": "integer",
                      "description": "عمليات البحث التي تمت الإجابة عليها من التخزين المؤقت."
                    },
                    "enrichment_provider_calls": {
                      "type": "integer",
                      "description": "عمليات البحث التي تطلبت حلاً جديداً للعنوان."
                    },
                    "enrichment_skipped_low_value": {
                      "type": "integer",
                      "description": "أحداث القياس عن بُعد منخفضة القيمة التي لم يكن عنوانها معروفاً بالفعل. وهي لا تؤدي أبداً إلى عملية حلّ جديدة خاصة بها."
                    },
                    "unique_ips_seen": {
                      "type": "integer",
                      "description": "العناوين التي احتاجت إلى إعادة تحديدها."
                    },
                    "period_days": {
                      "type": "integer",
                      "description": "قيمة `days` المطبقة بعد التقييد."
                    },
                    "cache_hit_rate": {
                      "type": "number",
                      "nullable": true,
                      "description": "`enrichment_cache_hits / enrichment_lookups`، مقربة إلى 4 منازل عشرية. تكون Null عند عدم وجود عمليات بحث."
                    },
                    "unique_ip_ratio": {
                      "type": "number",
                      "nullable": true,
                      "description": "`unique_ips_seen / events_ingested`، مقربة إلى 4 أرقام عشرية. تكون Null عند عدم استيعاب أي أحداث."
                    },
                    "provider_calls_per_1k_events": {
                      "type": "number",
                      "nullable": true,
                      "description": "القرارات الجديدة لكل 1000 حدث تم استيعابه، مقربة إلى منزلتين عشريتين. تكون Null عند عدم استيعاب أي أحداث."
                    }
                  }
                },
                "examples": {
                  "Last 30 days": {
                    "value": {
                      "events_ingested": 128450,
                      "events_rejected": 214,
                      "enrichment_lookups": 41230,
                      "enrichment_cache_hits": 40118,
                      "enrichment_provider_calls": 1112,
                      "enrichment_skipped_low_value": 74320,
                      "unique_ips_seen": 1112,
                      "period_days": 30,
                      "cache_hit_rate": 0.973,
                      "unique_ip_ratio": 0.0087,
                      "provider_calls_per_1k_events": 8.66
                    }
                  },
                  "No events yet": {
                    "value": {
                      "events_ingested": 0,
                      "events_rejected": 0,
                      "enrichment_lookups": 0,
                      "enrichment_cache_hits": 0,
                      "enrichment_provider_calls": 0,
                      "enrichment_skipped_low_value": 0,
                      "unique_ips_seen": 0,
                      "period_days": 30,
                      "cache_hit_rate": null,
                      "unique_ip_ratio": null,
                      "provider_calls_per_1k_events": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. المفتاح منتهي الصلاحية فقط هو ما يتلقى `401`؛ أما المفتاح المفقود أو غير الصالح فيتلقى `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح ذو نطاق محدد يفتقر إلى `transactions: read`، أو مفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة (مثل هذا المفتاح لا يصل أبداً إلى بيانات مراقبة المعاملات)، أو طلب من خارج قائمة العناوين المسموح بها للمفتاح.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without access": {
                    "value": {
                      "detail": "This API key has no read access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "IP not allowed": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك طلبات `GET` رصيداً قدره 600 طلب في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/events/{event_uuid}/delete/": {
      "delete": {
        "summary": "حذف حدث المراقبة",
        "description": "حذف حدث مراقبة واحد نهائياً مع عمليات تشغيل القواعد والملاحظات وروابط الوسوم المرتبطة به، على سبيل المثال حدث أُرسل عن طريق الخطأ. بعد الرمز `204`، يختفي الحدث من كل عمليات القراءة (تُرجع عملية الاسترداد `404`، ولا يعود يظهر في القائمة أو في الجدول الزمني للموضوع)، ويكون الحذف غير قابل للتراجع عنه، ويصبح `event_id` الخاص به متاحاً للاستخدام لحدث جديد. لا تتأثر: المستخدم أو الشركة التي ارتبط بها الحدث، والحالات التي فتحتها إحدى القواعد، ومدخلات القائمة التي أضافتها إحدى القواعد، والدرجات والحالات المطبقة بالفعل على أحداث أخرى. لمحو كل شيء عن شخص أو شركة، احذف المستخدم أو الشركة بدلاً من ذلك، وهو ما يحذف أحداثهما أيضاً. يحتاج مفتاح API المخصص إلى `transactions: write`.",
        "operationId": "delete_monitoring_event",
        "x-didit-sdk": {
          "resource": "monitoring_events",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Monitoring Events"
        ],
        "parameters": [
          {
            "name": "event_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف Didit للحدث (`event_uuid` من استجابة الإنشاء أو الدُفعة أو القائمة أو المخطط الزمني)، وليس `event_id` الخاص بك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "11111111-2222-3333-4444-555555555555"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/events/11111111-2222-3333-4444-555555555555/delete/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.monitoring_events.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.monitoringEvents.delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.MonitoringEvents.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.monitoringEvents().delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->monitoringEvents->delete('11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.monitoring_events.delete(\"11111111-2222-3333-4444-555555555555\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.MonitoringEvents.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف الحدث. لا يوجد نص استجابة (body)."
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. المفتاح منتهي الصلاحية فقط هو ما يتلقى `401`؛ أما المفتاح المفقود أو غير الصالح فيتلقى `403`.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`x-api-key` مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح ذو نطاق محدد يفتقر إلى `transactions: write`، أو مفتاح مقتصر على بعض مسارات سير العمل أو على الجلسات المقبولة (مثل هذا المفتاح لا يصل أبداً إلى بيانات مراقبة المعاملات)، أو طلب من خارج قائمة العناوين المسموح بها للمفتاح.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing or invalid API key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without access": {
                    "value": {
                      "detail": "This API key has no write access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "IP not allowed": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا يوجد حدث بهذا المعرّف `event_uuid` في التطبيق: لم يتم تخزينه مطلقاً، أو تم حذفه، أو ينتمي إلى تطبيق آخر. أي جزء مسار لا يمثل UUID لا يطابق المسار ويُرجع أيضاً `404`.",
            "content": {
              "application/json": {
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No MonitoringEvent matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: تتشارك طلبات الكتابة (`POST`، `PATCH`، `DELETE`) رصيداً قدره 300 طلب في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/": {
      "post": {
        "summary": "إعادة إنشاء جلسة KYC لطرف من الأشخاص الرئيسيين",
        "description": "منح طرف من الأشخاص الرئيسيين في جلسة التحقق من الشركات (KYB) جلسة KYC فردية جديدة بعد حذف جلسته السابقة أو انتهاء صلاحيتها قبل أن يبدأها الشخص، حتى يتسنى إنهاء فحص الأشخاص الرئيسيين مرة أخرى؛ لا ترسل أي متن للطلب. يعمل هذا الإجراء عندما تكون جلسة KYC الخاصة بالطرف قد حُذفت (`kyc_session_deleted: true`) أو انتهت صلاحيتها قبل أن يبدأها الشخص (`Expired`، لم تبدأ قط). الجلسة التي لا تزال قيد التنفيذ أو التي انتهت بأي حالة أخرى (`Approved`، `Declined`، `In Review`، `Abandoned`، ...) تُرجع `409` ما لم تكن محذوفة. الطرف الذي لم يمتلك جلسة قط أو الطرف من نوع شركة يُرجع دائمًا `409`. تُنشئ Didit جلسة KYC مستضافة جديدة باستخدام سير العمل الذي جرى التحقق من الطرف باستخدامه (أحدث إصدار منشور منه) أو، عندما يتعذر معرفة ذلك، سير العمل الذي تحدده إعدادات الأشخاص الرئيسيين لدور الطرف، وبالتالي يظل الرابط صالحًا حتى انتهاء مدة جلسة سير عمل KYC؛ وتُرسل الرابط بالبريد الإلكتروني إلى الطرف في حال توفر بريده الإلكتروني في السجل، وتُفرغ `is_skipped`، وتعيد احتساب فحص الأشخاص الرئيسيين وحالة جلسة الشركة. ثم تُرسل [webhook](https://docs.didit.me/ar/integration/webhooks) من نوع `data.updated` لجلسة الشركة مع المُشغِّل `console_key_people_regenerate`؛ لاستثناء الطرف بدلاً من ذلك، استخدم `PATCH /v3/session/{sessionId}/kyb/parties/{partyUuid}/`. يتطلب مفتاح API المقيَّد الصلاحية `decisions: write`، وبدون `sessions: write` سيتلقى `kyc_session_url` بقيمة `null`. الجلسات المحذوفة تكون مؤهلة حتى لو كان الشخص قد بدأ بالفعل عملية التحقق أو أنهاها. الجلسات المستوردة لا تكون مؤهلة عن طريق انتهاء الصلاحية؛ بل يجب أن تكون محذوفة.",
        "operationId": "post_v3_session_kyb_party_regenerate",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "regenerate_kyb_party",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB) الأصلية (الأب).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "partyUuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لطرف الأشخاص الرئيسيين (`key_people_checks[].submitted.parties[].uuid` في قرار جلسة الشركة). يجب أن ينتمي إلى الجلسة المُشار إليها بواسطة `sessionId`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/session/33333333-4444-5555-6666-777777777777/kyb/parties/0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41/regenerate/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.regenerate_kyb_party(\n    \"33333333-4444-5555-6666-777777777777\",\n    \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.regenerateKybParty(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.RegenerateKYBParty(ctx, \"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().regenerateKybParty(\"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->regenerateKybParty('33333333-4444-5555-6666-777777777777', '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.regenerate_kyb_party(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.RegenerateKybPartyAsync(\"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم إنشاء جلسة KYC جديدة. يُرجع الطرف المحدّث مع جلسته الفرعية الجديدة، والتي تنتهي صلاحيتها بعد مدة انتهاء صلاحية جلسة سير عمل KYC الخاص بها.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KYBKeyPeopleParty"
                },
                "example": {
                  "uuid": "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41",
                  "entity_type": "person",
                  "source": "USER",
                  "name": "Jane Smith",
                  "first_name": "Jane",
                  "last_name": "Smith",
                  "company_name": null,
                  "registration_number": null,
                  "email": "user@example.com",
                  "nationality": "GB",
                  "phone_number": null,
                  "date_of_birth": "1980-05-04",
                  "position": "Director",
                  "custom_fields": {},
                  "is_active": true,
                  "is_skipped": false,
                  "requires_verification": true,
                  "roles": [
                    {
                      "role": "director",
                      "ownership_percent": null,
                      "voting_percent": null
                    }
                  ],
                  "kyc_session_id": "55555555-6666-7777-8888-999999999999",
                  "kyc_session_status": "Not Started",
                  "kyc_session_url": "https://verify.didit.me/session/abc123def456",
                  "kyc_session_deleted": false,
                  "kyb_sub_session_id": null,
                  "kyb_sub_session_status": null,
                  "kyb_sub_session_url": null,
                  "kyb_sub_session_deleted": false,
                  "verification_workflow_type": "kyc",
                  "verification_workflow_id": "12121212-3434-5656-7878-909090909090",
                  "verification_workflow_label": "Key People KYC",
                  "verification_workflow_features": [
                    {
                      "feature": "ID_VERIFICATION",
                      "status": "Not Finished"
                    },
                    {
                      "feature": "LIVENESS",
                      "status": "Not Finished"
                    },
                    {
                      "feature": "AML",
                      "status": "Not Finished"
                    }
                  ],
                  "didit_internal_id": null
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو أنها خارج حدود مفتاح ذي نطاق محدد؛ أو لا يوجد طرف بمعرّف UUID هذا في تطبيقك؛ أو أن الطرف ينتمي إلى جلسة أخرى. كل حالة لها `detail` خاص بها. يتم البحث عن الجلسة قبل التحقق من بيانات الاعتماد، لذلك فإن معرّف `sessionId` غير المعروف يُعيد `404` حتى بدون مفتاح صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف، أو أنها حُذفت",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside key limits": {
                    "summary": "الجلسة خارج سير العمل أو حدود المقبولة فقط الخاصة بمفتاح ذي نطاق محدد",
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "Unknown party": {
                    "summary": "لا يوجد طرف بهذا المعرّف UUID في تطبيقك",
                    "value": {
                      "detail": "No BusinessParty matches the given query."
                    }
                  },
                  "Party of another session": {
                    "summary": "معرّف partyUuid موجود ولكنه ينتمي إلى جلسة مختلفة",
                    "value": {
                      "detail": "Party does not belong to the given session."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "لا يملك الطرف أي جلسة KYC مؤهلة لاستبدالها. ما لم تكن محذوفة، لا يمكن إعادة إنشاء جلسة لا تزال قيد التنفيذ أو انتهت بحالة أخرى (`Approved` أو `Declined` أو `In Review` أو `Abandoned` أو غيرها). كما أن الطرف الذي لم يمتلك جلسة من قبل أو الطرف الذي يمثل شركة يُرجع الخطأ `409` أيضاً. الجلسة المؤهلة هي التي حُذفت أو انتهت صلاحيتها قبل أن يبدأ الشخص فيها. وتعد الجلسات المحذوفة مؤهلة حتى لو كان الشخص قد بدأ بالفعل في التحقق أو أنهاه. لا تتأهل الجلسات المستوردة بمجرد انتهاء الصلاحية؛ بل يجب أن تكون محذوفة. فرّع بناءً على `code`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "detail",
                    "code"
                  ],
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "kyb_party_kyc_session_not_deleted"
                      ],
                      "description": "رمز خطأ ثابت قابل للقراءة آلياً."
                    }
                  }
                },
                "example": {
                  "detail": "This party's KYC session is still live (it has neither been deleted nor expired without starting), so it cannot be regenerated.",
                  "code": "kyb_party_kyc_session_not_deleted"
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/transactions/{transaction_id}/notes/": {
      "get": {
        "summary": "عرض قائمة بملاحظات المعاملة",
        "description": "عرض الملاحظات المسجلة على معاملة خاضعة للمراقبة، الأحدث أولاً (تنازليًا بحسب `created_at`): الملاحظات التي تضيفها عبر API، والملاحظات وتغييرات الحالة التي يجريها المراجعون في لوحة التحكم، والملاحظات التي يضيفها Didit تلقائيًا (إجراء `add_note` الخاص بقاعدة ما، أو مشكلة في إنشاء جلسة تحقق من إجراء المستخدم)، والتي تحمل `actor_name` بقيمة `Rule Engine`. يُميز `metadata` بين أنواع الملاحظات المختلفة.\n\nتُعرض النتائج مقسمة إلى صفحات باستخدام `limit` و`offset`. تكون قيمة `count` دقيقة حتى 100 ومحددة بحد أقصى 100 بعد ذلك، لذا اتبع `next` حتى تصبح `null` بدلاً من حساب الصفحات استنادًا إلى `count`. هذه عملية قراءة دون أي آثار جانبية.\n\nيتطلب مفتاح API محدد النطاق صلاحية `transactions: read`؛ ولا يمكن للمفتاح المقتصر على بعض عمليات سير العمل أو على الجلسات المقبولة استدعاء هذا الـ endpoint. يرى المراجعون القائمة نفسها تحت **Notes** في [تفاصيل المعاملة](https://docs.didit.me/ar/transaction-monitoring/console#تفاصيل-المعاملة).",
        "operationId": "list_transaction_notes",
        "x-didit-sdk": {
          "resource": "transactions.notes",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لمعاملة Didit: وهو `uuid` الذي تُرجعه `POST /v3/transactions/` و`GET /v3/transactions/`. لا يُقبل `txn_id` الخاص بك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "abcdef12-3456-7890-abcd-ef1234567890"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "description": "عدد الملاحظات لكل صفحة. القيمة الافتراضية هي 50. أي قيمة ليست عدداً صحيحاً موجباً تعود تلقائياً إلى 50؛ وتُرجع القيمة التي تتجاوز 1000000 الرمز `400`."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "description": "موضع يستند إلى الصفر للملاحظة الأولى المراد إرجاعها. يُفضل اتباع `next`. أي قيمة ليست عدداً صحيحاً غير سالب ترجع تلقائياً إلى 0؛ والقيمة التي تزيد عن 1000000 تُرجع `400`."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/transactions/abcdef12-3456-7890-abcd-ef1234567890/notes/?limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.notes.list(\n    \"abcdef12-3456-7890-abcd-ef1234567890\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.notes.list(\"abcdef12-3456-7890-abcd-ef1234567890\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.Notes.ListAutoPaging(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\", didit.TransactionsNotesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().notes().list(\"abcdef12-3456-7890-abcd-ef1234567890\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->transactions->notes->list('abcdef12-3456-7890-abcd-ef1234567890') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.notes.list(\"abcdef12-3456-7890-abcd-ef1234567890\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.Notes.ListAsync(\"abcdef12-3456-7890-abcd-ef1234567890\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة من الملاحظات، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد الملاحظات على المعاملة: دقيق حتى 100، ويقتصر على 100 كحد أقصى بعد ذلك. تتبّع `next` بدلاً من حساب الصفحات بناءً عليه."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TransactionNote"
                      }
                    }
                  }
                },
                "examples": {
                  "API, Console and rule notes": {
                    "value": {
                      "count": 3,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "c1111111-2222-4333-8444-555555555555",
                          "note": "Customer confirmed the withdrawal by phone.",
                          "actor_email": null,
                          "actor_name": null,
                          "metadata": {
                            "mentioned_emails": [
                              "analyst@example.com"
                            ]
                          },
                          "created_at": "2026-10-16T10:05:12.481203Z"
                        },
                        {
                          "uuid": "c2222222-3333-4444-8555-666666666666",
                          "note": "Status changed from IN_REVIEW to APPROVED. Reason: Source of funds verified",
                          "actor_email": "reviewer@example.com",
                          "actor_name": "Alex Reviewer",
                          "metadata": {
                            "type": "status_change",
                            "previous_status": "IN_REVIEW",
                            "new_status": "APPROVED",
                            "reason_code": "SOF_VERIFIED",
                            "reason_label": "Source of funds verified"
                          },
                          "created_at": "2026-10-15T17:22:40.103911Z"
                        },
                        {
                          "uuid": "c3333333-4444-4555-8666-777777777777",
                          "note": "Large withdrawal to a new wallet: check the source of funds.",
                          "actor_email": null,
                          "actor_name": "Rule Engine",
                          "metadata": {
                            "rule_uuid": "d1111111-2222-4333-8444-555555555555",
                            "source": "rule_action"
                          },
                          "created_at": "2026-10-15T08:42:12.004518Z"
                        }
                      ]
                    }
                  },
                  "No notes yet": {
                    "value": {
                      "count": 0,
                      "next": null,
                      "previous": null,
                      "results": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`limit` أو `offset` أكبر من 1000000. نص الاستجابة هو مصفوفة JSON من الرسائل، وليس كائناً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "examples": {
                  "Limit too large": {
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  },
                  "Offset too large": {
                    "value": [
                      "offset must not exceed 1000000."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API. المفتاح الذي تم إنشاؤه مع تاريخ انتهاء هو فقط الذي يمكن أن تنتهي صلاحيته؛ بعد هذا التاريخ، تجيب جميع الطلبات باستخدامه بـ `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. يتلقى المفتاح المفقود الرسالة العامة؛ بينما يتلقى المفتاح الخاطئ أو الملغى أو منتهي الصلاحية الرمز `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without transactions read": {
                    "value": {
                      "detail": "This API key has no read access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the key's IP list": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد معاملة بمعرّف UUID هذا في التطبيق (لم يتم إنشاؤها مطلقاً، أو محذوفة، أو مملوكة لتطبيق آخر). إن قيمة `transaction_id` التي لا تمثل معرّف UUID لا تصل إلى واجهة API: بل تُرجع صفحة HTML برمز `404` بدلاً من نص JSON هذا.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No Transaction matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 600 طلب GET في الدقيقة باستخدام مفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني حتى إعادة تعيين النافذة الحالية البالغة دقيقة واحدة.",
                "schema": {
                  "type": "integer",
                  "example": 23
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها في الدقيقة ضمن هذه الميزانية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix عند إعادة تعيين النافذة.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "إنشاء ملاحظة معاملة",
        "description": "أضف ملاحظة بنص عادي إلى المخطط الزمني لمراجعة معاملة خاضعة للمراقبة، حيث يراها مراجعو لوحة التحكم. الملاحظة هي سياق وليست قراراً: لا تتغير `status` الخاصة بالمعاملة ولا `score` ولا التنبيهات، ولا يتم إرسال أي webhook، ولا يتم احتساب أي تكلفة. تكتسب `activities` الخاصة بالمعاملة إدخالاً بقيمة `TRANSACTION_NOTE_ADDED`.\n\nالملاحظات المنشأة باستخدام مفتاح API ليس لها مؤلف: يكون كل من `actor_email` و`actor_name` بقيمة `null`، لذا ضع المؤلف داخل النص إذا كنت بحاجة إليه. يجب أن ينتمي كل عنوان بريد إلكتروني في `mentioned_emails` إلى عضو في مؤسستك، وإلا سيفشل الطلب بأكمله بالرمز `400`؛ تُخزن الإشارات بأحرف صغيرة وتتم إزالة التكرارات منها، ولا يقوم هذا الـ endpoint بإشعار الأعضاء المشار إليهم.\n\nينشئ كل استدعاء ملاحظة جديدة، لذا فإن إعادة محاولة طلب انتهت مهلته قد تؤدي إلى إضافتها مرتين: قم بسرد الملاحظات قبل إعادة المحاولة. لا يوجد endpoint في API لتعديل ملاحظة أو إزالتها. يحتاج مفتاح API محدود النطاق إلى إذن `transactions: write`؛ ولا يمكن لمفتاح مقتصر على بعض عمليات سير العمل أو على الجلسات المقبولة استدعاء هذا الـ endpoint.",
        "operationId": "create_transaction_note",
        "x-didit-sdk": {
          "resource": "transactions.notes",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لمعاملة Didit: وهو `uuid` الذي تُرجعه `POST /v3/transactions/` و`GET /v3/transactions/`. لا يُقبل `txn_id` الخاص بك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "abcdef12-3456-7890-abcd-ef1234567890"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "note"
                ],
                "properties": {
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ملاحظة كنص عادي. يتم اقتطاع المسافات البيضاء في البداية والنهاية، ويتم رفض الملاحظة الفارغة. لا يوجد حد للطول."
                  },
                  "mentioned_emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    },
                    "default": [],
                    "description": "عناوين البريد الإلكتروني لأعضاء مؤسستك المراد الإشارة إليهم. يجب أن يكون كل منها بريداً إلكترونياً صالحاً لعضو في المؤسسة."
                  }
                }
              },
              "examples": {
                "Note with a mention": {
                  "value": {
                    "note": "Customer confirmed the withdrawal by phone.",
                    "mentioned_emails": [
                      "analyst@example.com"
                    ]
                  }
                },
                "Plain note": {
                  "value": {
                    "note": "Source of funds document requested by email."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/transactions/abcdef12-3456-7890-abcd-ef1234567890/notes/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"note\": \"Customer confirmed the withdrawal by phone.\", \"mentioned_emails\": [\"analyst@example.com\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.notes.create(\n    \"abcdef12-3456-7890-abcd-ef1234567890\",\n    note=\"Customer confirmed the withdrawal by phone.\",\n    mentioned_emails=[\"analyst@example.com\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.notes.create(\"abcdef12-3456-7890-abcd-ef1234567890\", {\n  note: \"Customer confirmed the withdrawal by phone.\",\n  mentioned_emails: [\"analyst@example.com\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Notes.Create(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\", didit.TransactionsNotesCreateParams{\n\tNote:            \"Customer confirmed the withdrawal by phone.\",\n\tMentionedEmails: didit.Some([]string{\"analyst@example.com\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.TransactionsNotesCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().notes().create(\"abcdef12-3456-7890-abcd-ef1234567890\", TransactionsNotesCreateParams.builder()\n        .note(\"Customer confirmed the withdrawal by phone.\")\n        .mentionedEmails(List.of(\"analyst@example.com\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->transactions->notes->create('abcdef12-3456-7890-abcd-ef1234567890', [\n    'note' => 'Customer confirmed the withdrawal by phone.',\n    'mentioned_emails' => ['analyst@example.com'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.notes.create(\n  \"abcdef12-3456-7890-abcd-ef1234567890\",\n  note: \"Customer confirmed the withdrawal by phone.\",\n  mentioned_emails: [\"analyst@example.com\"]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Notes.CreateAsync(\"abcdef12-3456-7890-abcd-ef1234567890\", new TransactionsNotesCreateParams\n{\n    Note = \"Customer confirmed the withdrawal by phone.\",\n    MentionedEmails = new string[] { \"analyst@example.com\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تم إنشاء الملاحظة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionNote"
                },
                "examples": {
                  "Created": {
                    "value": {
                      "uuid": "c1111111-2222-4333-8444-555555555555",
                      "note": "Customer confirmed the withdrawal by phone.",
                      "actor_email": null,
                      "actor_name": null,
                      "metadata": {
                        "mentioned_emails": [
                          "analyst@example.com"
                        ]
                      },
                      "created_at": "2026-10-16T10:05:12.481203Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "نص الطلب غير صالح: الحقل `note` مفقود أو null أو فارغ، أو يوجد عنوان غير صالح في `mentioned_emails` (الأخطاء مفهرسة حسب الموضع في القائمة)، أو عنوان مذكور ليس عضواً في مؤسستك. لم يتم إنشاء أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "أخطاء الحقول مفهرسة حسب اسم الحقل.",
                  "additionalProperties": {}
                },
                "examples": {
                  "Missing note": {
                    "value": {
                      "note": [
                        "This field is required."
                      ]
                    }
                  },
                  "Blank note": {
                    "value": {
                      "note": [
                        "This field may not be blank."
                      ]
                    }
                  },
                  "Invalid email": {
                    "value": {
                      "mentioned_emails": {
                        "0": [
                          "Enter a valid email address."
                        ]
                      }
                    }
                  },
                  "Not an organization member": {
                    "value": {
                      "mentioned_emails": [
                        "Mentioned users must belong to this organization and have access to this application."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API. المفتاح الذي تم إنشاؤه مع تاريخ انتهاء هو فقط الذي يمكن أن تنتهي صلاحيته؛ بعد هذا التاريخ، تجيب جميع الطلبات باستخدامه بـ `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. يتلقى المفتاح المفقود الرسالة العامة؛ بينما يتلقى المفتاح الخاطئ أو الملغى أو منتهي الصلاحية الرمز `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without transactions write": {
                    "value": {
                      "detail": "This API key has no write access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the key's IP list": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد معاملة بمعرّف UUID هذا في التطبيق (لم يتم إنشاؤها مطلقاً، أو محذوفة، أو مملوكة لتطبيق آخر). إن قيمة `transaction_id` التي لا تمثل معرّف UUID لا تصل إلى واجهة API: بل تُرجع صفحة HTML برمز `404` بدلاً من نص JSON هذا.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No Transaction matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 300 طلب كتابة في الدقيقة باستخدام مفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني حتى إعادة تعيين النافذة الحالية البالغة دقيقة واحدة.",
                "schema": {
                  "type": "integer",
                  "example": 23
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها في الدقيقة ضمن هذه الميزانية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix عند إعادة تعيين النافذة.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/transactions/{transaction_id}/related/": {
      "get": {
        "summary": "عرض المعاملات ذات الصلة",
        "description": "عرض قائمة بالمعاملات الأخرى في تطبيقك التي تتضمن نفس الأشخاص أو الشركات مثل هذه المعاملة. تُعد المعاملة ذات صلة عندما يكون لأي من أطرافها، في أي دور، نفس قيمة `vendor_data` الخاصة بأحد أطراف هذه المعاملة. لا يتم إرجاع المعاملة نفسها أبدًا، ويتم تجاهل الأطراف التي ليس لديها `vendor_data`: عندما لا يمتلك أي من أطراف هذه المعاملة قيمة منها، تكون النتيجة فارغة دائمًا.\n\nتستخدم النتائج بنية الملخص الخاصة بـ `GET /v3/transactions/`، مرتبة من الأحدث أولاً (`txn_date`، ثم `created_at`). مقسمة إلى صفحات باستخدام `limit` و `offset`؛ تكون قيمة `count` دقيقة حتى 100 وتتوقف عند 100 كحد أقصى لما فوق ذلك، لذا تابع الرابط `next` حتى تصبح قيمته `null`.\n\nيتطلب مفتاح API محدد النطاق صلاحية `transactions: read`؛ ولا يمكن لمفتاح مقتصر على بعض مهام سير العمل أو على الجلسات المقبولة استدعاء هذا الـ endpoint. أرسل نفس قيمة `vendor_data` لنفس الشخص أو الشركة في كل [معاملة](https://docs.didit.me/ar/transaction-monitoring/transactions#الطرف-المعني-والطرف-المقابل) لجعل هذه القائمة مكتملة.",
        "operationId": "list_related_transactions",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "list_related",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لمعاملة Didit: وهو `uuid` الذي تُرجعه `POST /v3/transactions/` و`GET /v3/transactions/`. لا يُقبل `txn_id` الخاص بك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "abcdef12-3456-7890-abcd-ef1234567890"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000
            },
            "description": "عدد المعاملات لكل صفحة. القيمة الافتراضية هي 50. أي قيمة ليست عدداً صحيحاً موجباً تعود تلقائياً إلى 50؛ وتُرجع القيمة التي تتجاوز 1000000 الرمز `400`."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000
            },
            "description": "موضع يستند إلى الصفر للمعاملة الأولى المراد إرجاعها. يُفضل اتباع `next`. القيمة التي ليست عدداً صحيحاً غير سالب ترجع تلقائياً إلى 0؛ والقيمة التي تزيد عن 1000000 تُرجع `400`."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/transactions/abcdef12-3456-7890-abcd-ef1234567890/related/?limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.list_related(\n    \"abcdef12-3456-7890-abcd-ef1234567890\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.listRelated(\"abcdef12-3456-7890-abcd-ef1234567890\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.ListRelatedAutoPaging(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\", didit.TransactionsListRelatedParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().listRelated(\"abcdef12-3456-7890-abcd-ef1234567890\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->transactions->listRelated('abcdef12-3456-7890-abcd-ef1234567890') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.list_related(\"abcdef12-3456-7890-abcd-ef1234567890\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.ListRelatedAsync(\"abcdef12-3456-7890-abcd-ef1234567890\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة من المعاملات ذات الصلة، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "عدد المعاملات ذات الصلة: دقيق حتى 100، ويقتصر على 100 كحد أقصى بعد ذلك. تتبّع `next` بدلاً من حساب الصفحات بناءً عليه."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL مطلق للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TransactionSummary"
                      }
                    }
                  }
                },
                "examples": {
                  "One related transaction": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "abcdef99-3456-4890-abcd-ef1234567890",
                          "transaction_number": 4087,
                          "txn_id": "your-txn-2026-10-02-017",
                          "transaction_type": "finance",
                          "action_type": "deposit",
                          "status": "APPROVED",
                          "source": "LIVE",
                          "direction": "INBOUND",
                          "amount": "250",
                          "currency": "EUR",
                          "currency_type": "fiat",
                          "preferred_currency_amount": "270.08",
                          "preferred_currency_code": "USD",
                          "payment_details": "Card top-up",
                          "txn_date": "2026-10-02T14:10:00Z",
                          "created_at": "2026-10-02T14:10:03.512244Z",
                          "score": 12,
                          "severity": "LOW",
                          "decision_reason_code": null,
                          "decision_reason_label": null,
                          "tags": [],
                          "subject_name": "Maria Garcia",
                          "subject_vendor_data": "user-12345",
                          "subject_type": "user",
                          "subject_uuid": "e1111111-2222-4333-8444-555555555555",
                          "counterparty_name": null,
                          "counterparty_vendor_data": null,
                          "counterparty_country": null,
                          "subject_country": "ESP",
                          "assigned_to_name": null,
                          "travel_rule_status": null,
                          "application_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                          "application_name": "Production app",
                          "organization_id": "11111111-2222-3333-4444-555555555555",
                          "organization_name": "Example Org"
                        }
                      ]
                    }
                  },
                  "No party has vendor_data": {
                    "value": {
                      "count": 0,
                      "next": null,
                      "previous": null,
                      "results": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`limit` أو `offset` أكبر من 1000000. نص الاستجابة هو مصفوفة JSON من الرسائل، وليس كائناً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "examples": {
                  "Limit too large": {
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  },
                  "Offset too large": {
                    "value": [
                      "offset must not exceed 1000000."
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API. المفتاح الذي تم إنشاؤه مع تاريخ انتهاء هو فقط الذي يمكن أن تنتهي صلاحيته؛ بعد هذا التاريخ، تجيب جميع الطلبات باستخدامه بـ `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. يتلقى المفتاح المفقود الرسالة العامة؛ بينما يتلقى المفتاح الخاطئ أو الملغى أو منتهي الصلاحية الرمز `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without transactions read": {
                    "value": {
                      "detail": "This API key has no read access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the key's IP list": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد معاملة بمعرّف UUID هذا في التطبيق (لم يتم إنشاؤها مطلقاً، أو محذوفة، أو مملوكة لتطبيق آخر). إن قيمة `transaction_id` التي لا تمثل معرّف UUID لا تصل إلى واجهة API: بل تُرجع صفحة HTML برمز `404` بدلاً من نص JSON هذا.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No Transaction matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 600 طلب GET في الدقيقة باستخدام مفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني حتى إعادة تعيين النافذة الحالية البالغة دقيقة واحدة.",
                "schema": {
                  "type": "integer",
                  "example": 23
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها في الدقيقة ضمن هذه الميزانية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix عند إعادة تعيين النافذة.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/businesses/{business_session_id}/pdf/": {
      "get": {
        "summary": "تنزيل تقرير PDF لجلسة شركة",
        "description": "توليد تقرير PDF لجلسة التحقق من الشركات (KYB) واحدة: بيانات سجل الشركات، والأشخاص الرئيسيون والمستفيدون الحقيقيون، والمستندات، ونتائج فحص AML وميزات سير العمل الأخرى، بالإضافة إلى وسوم الجلسة ونشاط المراجعة. عند تفعيل تخصيص العلامة البيضاء، يتضمن التقرير شعارك ورابط سياسة الخصوصية الخاصة بك. جسم الاستجابة هو ملف PDF نفسه (`application/pdf`)، وليس JSON.\n\nيجب أن تكون الجلسة بحالة `Approved` أو `Declined` أو `In Review`؛ حيث تُرجع أي حالة أخرى كود `403`، لذا انتظر [webhook](https://docs.didit.me/ar/integration/webhooks) الخاص بالحدث `status.updated` أولاً. يتم توليد التقرير عند كل استدعاء ولا تتم فوترة أي رسوم، لذا يُفضل تخزين الملف بدلاً من جلبه بشكل متكرر. يقوم `GET /v3/session/{sessionId}/generate-pdf/` بتوليد النوع نفسه من التقارير باستخدام معرّف الجلسة بمفرده.\n\nيُعد تقرير PDF من الوسائط: يحتاج مفتاح API المحدود الصلاحيات إلى `businesses: read` و `media: read`، ولا يمكن لمفتاح مقيد ببعض مسارات سير العمل أو بالجلسات المقبولة فقط استدعاؤه.",
        "operationId": "get_business_session_pdf",
        "x-didit-sdk": {
          "resource": "businesses",
          "method": "generate_session_pdf",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة.",
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق. يجب أن يكون التطبيق الذي ينتمي إليه مفتاح API: أي مفتاح يُستخدم مع تطبيق آخر يتلقى الرمز `403`.",
            "example": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
          },
          {
            "name": "business_session_id",
            "in": "path",
            "required": true,
            "description": "`session_id` لجلسة التحقق من الشركات (KYB)، كما تم إرجاعه عند إنشاء الجلسة. تُرجع جلسة تابعة لتطبيق آخر `404`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "22222222-3333-4444-5555-666666666666"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl --fail -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/businesses/22222222-3333-4444-5555-666666666666/pdf/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  --output business_report.pdf"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\ncontent = client.businesses.generate_session_pdf(\n    \"22222222-3333-4444-5555-666666666666\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst content = await didit.businesses.generateSessionPdf(\"22222222-3333-4444-5555-666666666666\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresp, err := client.Businesses.GenerateSessionPDF(ctx, \"22222222-3333-4444-5555-666666666666\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.businesses().generateSessionPdf(\"22222222-3333-4444-5555-666666666666\")\n        .writeTo(Path.of(\"download.pdf\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$content = $didit->businesses->generateSessionPdf('22222222-3333-4444-5555-666666666666');\n$content->saveTo('download.pdf');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ncontent = didit.businesses.generate_session_pdf(\"22222222-3333-4444-5555-666666666666\")\nFile.binwrite(\"download.pdf\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar content = await client.Businesses.GenerateSessionPdfAsync(\"22222222-3333-4444-5555-666666666666\");\nawait content.SaveToAsync(\"download.pdf\");"
          }
        ],
        "responses": {
          "200": {
            "description": "ملف PDF المُصيَّر، يتم إرجاعه مباشرة كملف ثنائي `application/pdf`.",
            "headers": {
              "Content-Disposition": {
                "description": "دائماً `attachment; filename=business_{business_session_id}.pdf`.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=business_22222222-3333-4444-5555-666666666666.pdf"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API. المفتاح الذي تم إنشاؤه مع تاريخ انتهاء هو فقط الذي يمكن أن تنتهي صلاحيته؛ بعد هذا التاريخ، تجيب جميع الطلبات باستخدامه بـ `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به أو أن الجلسة لم تنتهِ بعد. اقرأ `detail`: جلسة ليست بحالة `Approved`، أو `Declined`، أو `In Review`، أو مفتاح API مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو `application_id` لا يتبع لتطبيق المفتاح، أو مفتاح بنطاق محدد يفتقر إلى `media: read` أو `businesses: read`، أو مفتاح مقيد بمهام سير العمل أو الجلسات المقبولة، أو طلب قادم من خارج قائمة IP الخاصة بالمفتاح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Session not finished": {
                    "value": {
                      "detail": "You can only generate a PDF for sessions in review, declined or approved."
                    }
                  },
                  "Missing or invalid key": {
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Another application": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without media read": {
                    "value": {
                      "detail": "This API key has no read access to media."
                    }
                  },
                  "Scoped key without businesses read": {
                    "value": {
                      "detail": "This API key has no read access to companies."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the key's IP list": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة أعمال بهذا المعرّف في التطبيق (لم يتم إنشاؤها مطلقاً، أو تم حذفها، أو يملكها تطبيق آخر). القيمة التي لا تمثل UUID تُرجع صفحة HTML برمز `404` بدلاً من متن JSON هذا.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "Business session not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 600 طلب GET في الدقيقة باستخدام مفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني حتى إعادة تعيين النافذة الحالية البالغة دقيقة واحدة.",
                "schema": {
                  "type": "integer",
                  "example": 23
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها في الدقيقة ضمن هذه الميزانية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix عند إعادة تعيين النافذة.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/pdf/": {
      "get": {
        "summary": "تنزيل تقرير PDF للمعاملة",
        "description": "توليد تقرير PDF لمعاملة خاضعة للمراقبة: نظرة عامة والقرار، والأطراف وطرق الدفع، والخصائص المخصصة، والتنبيهات وعمليات تشغيل القواعد، ونتائج الفحص وTravel Rule، وملخص الشبكة، وتفاصيل التكلفة، وما يصل إلى 50 معاملة ذات صلة وأحدث 20 إدخال نشاط. نص الاستجابة هو ملف PDF نفسه (`application/pdf`)، وليس JSON.\n\nيتم إنشاء التقرير من البيانات الحالية للمعاملة مع كل استدعاء، لذا اطلبه مجددًا بعد حدوث تغيير في الحالة. لا يتم تخزين أي شيء ولا تتم فوترة أي شيء. قد يستغرق التوليد بضع ثوانٍ، لذا استخدم مهلة عميل سخية.\n\nيقع هذا الـ endpoint في مسار محدد النطاق للتطبيق: ضع معرّف مؤسستك ومعرّف التطبيق الذي ينتمي إليه مفتاح API الخاص بك في عنوان URL ([اعثر على معرّف مؤسستك](https://docs.didit.me/ar/getting-started/api-authentication#العثور-على-معرّف-المؤسسة-الخاص-بك)). يُحتسب تقرير PDF ضمن الوسائط: يحتاج مفتاح API المحدد النطاق إلى `media: read` و`transactions: read`، ولا يمكن لمفتاح مقيد ببعض مسارات سير العمل أو بجلسات مقبولة استدعاءه.",
        "operationId": "get_transaction_pdf",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "generate_pdf",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة.",
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق. يجب أن يكون التطبيق الذي ينتمي إليه مفتاح API: أي مفتاح يُستخدم مع تطبيق آخر يتلقى الرمز `403`.",
            "example": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
          },
          {
            "name": "transaction_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لمعاملة Didit: وهو `uuid` الذي تُرجعه `POST /v3/transactions/` و`GET /v3/transactions/`. لا يُقبل `txn_id` الخاص بك.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "abcdef12-3456-7890-abcd-ef1234567890"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl --fail -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/transactions/abcdef12-3456-7890-abcd-ef1234567890/pdf/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  --output transaction_report.pdf"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\ncontent = client.transactions.generate_pdf(\n    \"abcdef12-3456-7890-abcd-ef1234567890\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst content = await didit.transactions.generatePdf(\"abcdef12-3456-7890-abcd-ef1234567890\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresp, err := client.Transactions.GeneratePDF(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.transactions().generatePdf(\"abcdef12-3456-7890-abcd-ef1234567890\")\n        .writeTo(Path.of(\"download.pdf\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$content = $didit->transactions->generatePdf('abcdef12-3456-7890-abcd-ef1234567890');\n$content->saveTo('download.pdf');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ncontent = didit.transactions.generate_pdf(\"abcdef12-3456-7890-abcd-ef1234567890\")\nFile.binwrite(\"download.pdf\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar content = await client.Transactions.GeneratePdfAsync(\"abcdef12-3456-7890-abcd-ef1234567890\");\nawait content.SaveToAsync(\"download.pdf\");"
          }
        ],
        "responses": {
          "200": {
            "description": "ملف PDF المُصيَّر، يتم إرجاعه مباشرة كملف ثنائي `application/pdf`.",
            "headers": {
              "Content-Disposition": {
                "description": "دائماً `attachment; filename=transaction_{transaction_uuid}.pdf`.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=transaction_abcdef12-3456-7890-abcd-ef1234567890.pdf"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API. المفتاح الذي تم إنشاؤه مع تاريخ انتهاء هو فقط الذي يمكن أن تنتهي صلاحيته؛ بعد هذا التاريخ، تجيب جميع الطلبات باستخدامه بـ `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. اقرأ `detail`: مفتاح API مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو `application_id` لا يخص تطبيق المفتاح، أو مفتاح ذو نطاق محدد بدون `media: read` أو `transactions: read`، أو مفتاح مقتصر على سير العمل أو الجلسات المقبولة، أو طلب من خارج قائمة العناوين الخاصة بالمفتاح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Another application": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without media read": {
                    "value": {
                      "detail": "This API key has no read access to media."
                    }
                  },
                  "Scoped key without transactions read": {
                    "value": {
                      "detail": "This API key has no read access to transactions."
                    }
                  },
                  "Key limited to workflows or approved sessions": {
                    "value": {
                      "detail": "This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint."
                    }
                  },
                  "Outside the key's IP list": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد معاملة بمعرّف UUID هذا في التطبيق (لم يتم إنشاؤها مطلقاً، أو محذوفة، أو مملوكة لتطبيق آخر). إن قيمة `transaction_uuid` التي لا تمثل معرّف UUID لا تصل إلى واجهة API: بل تُرجع صفحة HTML برمز `404` بدلاً من نص JSON هذا.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not found": {
                    "value": {
                      "detail": "No Transaction matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 600 طلب GET في الدقيقة باستخدام مفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني حتى إعادة تعيين النافذة الحالية البالغة دقيقة واحدة.",
                "schema": {
                  "type": "integer",
                  "example": 23
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها في الدقيقة ضمن هذه الميزانية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix عند إعادة تعيين النافذة.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/analytics/": {
      "get": {
        "summary": "الحصول على تحليلات التطبيق",
        "description": "قراءة الأرقام الكامنة وراء [لوحة التحكم التحليلية](https://docs.didit.me/ar/console/analytics) في Business Console لنطاق زمني محدد. من دون `scope` و `widget_keys` تكون الاستجابة هي ملخص التحقق من المستخدمين (KYC) (`ApplicationAnalyticsSummary`): أعداد الجلسات اليومية، إجماليات الحالات، معدل التحويل، نفس الأرقام للفترة السابقة ذات الطول المماثل، المواقع الجغرافية، التركيبة السكانية، الأجهزة، مسارات سير العمل، وقت التحقق النشط، عمليات إعادة الإرسال، التحذيرات والسلاسل الزمنية. مع `scope` أو `widget_keys` تكون الاستجابة هي عناصر واجهة مستخدم لعلامة تبويب واحدة في لوحة التحكم (`ApplicationAnalyticsWidgetResponse`): `kyc`، أو `kyb`، أو `transactions` أو `home`.\n\nتعتمد أعداد الجلسات على تاريخ إنشاء الجلسة (UTC) وتعكس الحالة الحالية لكل جلسة. تأتي من تجميعات يومية يتم تحديثها في الخلفية، لذا قد يستغرق ظهور أحدث نشاط وقتاً قصيراً. يتم تجاهل معرّفات وإصدارات سير العمل غير الصالحة بدلاً من رفضها. لا تتم فوترة أي شيء.\n\nيمكن فقط لمفتاح API ذي الوصول الكامل استدعاء هذا الـ endpoint: يحصل كل مفتاح ذي نطاق محدود على `403` بغض النظر عن الصلاحيات التي يحملها، وكذلك المفتاح التابع لتطبيق آخر. راجع [مفاتيح API](https://docs.didit.me/ar/console/api-keys).",
        "operationId": "get_application_analytics",
        "x-didit-sdk": {
          "resource": "analytics",
          "method": "retrieve",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Analytics"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة.",
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق. يجب أن يكون التطبيق الذي ينتمي إليه مفتاح API: أي مفتاح يُستخدم مع تطبيق آخر يتلقى الرمز `403`.",
            "example": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-10-01"
            },
            "description": "اليوم الأول من النطاق، `YYYY-MM-DD`، شاملاً ذلك اليوم (UTC). أرسله مع `end_date`: إذا كان أحدهما مفقوداً، فسيتم تجاهل كليهما ويمتد النطاق من 30 يوماً قبل اليوم وحتى اليوم."
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-10-15"
            },
            "description": "آخر يوم في النطاق، بصيغة `YYYY-MM-DD`، شامل (بتوقيت UTC). يُحتسب أي تاريخ مستقبلي على أنه اليوم. لا يجوز أن يتجاوز النطاق 730 يوماً."
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "home",
                "kyc",
                "kyb",
                "transactions"
              ]
            },
            "description": "علامة تبويب لوحة التحكم المراد إرجاع التطبيقات المصغرة (widgets) لها (غير حساسة لحالة الأحرف). اتركها، مع `widget_keys`، للحصول على ملخص KYC. إرسال `widget_keys` فقط يعني ضمناً `kyc`. تقبل `home` أي تطبيق مصغر لـ KYC أو KYB أو المعاملات، وتعتمد افتراضياً تخطيط الصفحة الرئيسية المحفوظ للتطبيق."
          },
          {
            "name": "widget_keys",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "tx_count_total,tx_count_daily"
            },
            "description": "مفاتيح عناصر واجهة المستخدم (widgets) مفصولة بفواصل، وتتم الإجابة عليها بهذا الترتيب. يتم استبعاد المفاتيح التي لا يقبلها النطاق؛ وعند عدم تبقي أي منها، ستحصل على القيم الافتراضية للنطاق. KYC: `kyc_sessions_volume`، `kyc_warning_insights`، `kyc_id_locations`، `kyc_ip_locations`، `kyc_workflow_funnel`، `kyc_average_verification_time`، `kyc_conversion_rate`، `kyc_conversion_by_country`، `kyc_resubmission_insights`، `kyc_original_status_distribution`، `kyc_database_validation_coverage`، `kyc_database_validation_latency`، `kyc_demographics`، `kyc_device_details`. KYB: `kyb_sessions_volume`، `kyb_workflow_funnel`، `kyb_average_verification_time`، `kyb_ip_locations`، `kyb_business_country_distribution`، `kyb_warning_insights`، `kyb_conversion_rate`، `kyb_conversion_by_country`، `kyb_industry_breakdown`، `kyb_resubmission_insights`، `kyb_original_status_distribution`، `kyb_registry_coverage`، `kyb_registry_data_completeness`، `kyb_device_details`. المعاملات: `tx_count_total`، `tx_count_daily`، `tx_volume_total_preferred_currency`، `tx_volume_daily_preferred_currency`، `tx_average_amount`، `tx_average_amount_daily`، `tx_transaction_category_breakdown`، `tx_action_type_breakdown`، `tx_status_volume_trend`، `tx_user_ip_or_country_distribution`، `tx_tag_breakdown`، `tx_top_rules_triggered`، `tx_team_member_performance`، `tx_score_histogram`."
          },
          {
            "name": "workflow_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "33333333-4444-5555-6666-777777777777"
            },
            "description": "معرّفات سير العمل مفصولة بفواصل. تقيّد ملخص KYC وعناصر واجهة مستخدم KYC وKYB بسير العمل المحدد فقط. يتم تجاهل القيم التي ليست بصيغة UUID؛ وعندما لا تكون أي قيمة صالحة، يتم إلغاء التصفية. يقبل الملخص أيضاً `workflow_id`."
          },
          {
            "name": "versions",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "3,4"
            },
            "description": "أرقام إصدارات سير العمل مفصولة بفواصل. لا تنطبق إلا بالاقتران مع `workflow_ids`؛ ويتم تجاهل القيم التي ليست أرقاماً صحيحة. يُقبل `version` كاسم بديل."
          },
          {
            "name": "branch_path_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "default"
            },
            "description": "معرّفات مسارات الفروع مفصولة بفواصل. تنطبق فقط مع `workflow_ids`، وفقط على مقاييس KYC. تُسجَّل المقاييس حالياً فقط لـ `default` (جميع المسارات مجتمعة)، لذا فإن أي قيمة أخرى تُرجع مقاييس فارغة. يُقبل `branch_path_id` كاسم بديل."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "عناصر واجهة المعاملات فقط: معرّفات UUID للوسوم أو أسماء الوسوم مفصولة بفواصل."
          },
          {
            "name": "transaction_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "finance"
            },
            "description": "عناصر واجهة المعاملات فقط: فئات المعاملات مفصولة بفواصل."
          },
          {
            "name": "action_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "withdrawal"
            },
            "description": "عناصر واجهة المعاملات فقط: أنواع الإجراءات مفصولة بفواصل (غير حساسة لحالة الأحرف)."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/analytics/?start_date=2026-10-01&end_date=2026-10-15' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.analytics.retrieve()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.analytics.retrieve();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Analytics.Retrieve(ctx, didit.AnalyticsRetrieveParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.analytics().retrieve();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->analytics->retrieve();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.analytics.retrieve\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Analytics.RetrieveAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "ملخص KYC، أو التطبيقات المصغّرة المطلوبة عند إرسال `scope` أو `widget_keys`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApplicationAnalyticsSummary"
                    },
                    {
                      "$ref": "#/components/schemas/ApplicationAnalyticsWidgetResponse"
                    }
                  ]
                },
                "examples": {
                  "KYC summary": {
                    "value": {
                      "grouping_mode": "day",
                      "data_points": [
                        {
                          "rounded_date": "2026-10-14",
                          "total": 12,
                          "approved": 8,
                          "declined": 1,
                          "canceled": 1,
                          "pending": 2,
                          "in_review": 1,
                          "expired": 1,
                          "abandoned": 0,
                          "in_progress": 1,
                          "not_started": 0,
                          "manually_approved": 1,
                          "manually_declined": 0
                        },
                        {
                          "rounded_date": "2026-10-15",
                          "total": 10,
                          "approved": 6,
                          "declined": 2,
                          "canceled": 0,
                          "pending": 2,
                          "in_review": 2,
                          "expired": 0,
                          "abandoned": 0,
                          "in_progress": 0,
                          "not_started": 0,
                          "manually_approved": 0,
                          "manually_declined": 1
                        }
                      ],
                      "request_breakdown": {
                        "total_approved": 14,
                        "total_in_review": 3,
                        "total_declined": 3,
                        "total_canceled": 1,
                        "total_pending": 4,
                        "total_expired": 1,
                        "total_abandoned": 0,
                        "total_in_progress": 1,
                        "total_not_started": 0,
                        "total_manually_approved": 1,
                        "total_manually_declined": 1
                      },
                      "conversion_rate": 70.0,
                      "location_stats": {
                        "countries": [
                          {
                            "session_count": 15,
                            "country": "Spain",
                            "country_code": "ES"
                          },
                          {
                            "session_count": 7,
                            "country": "Portugal",
                            "country_code": "PT"
                          }
                        ],
                        "ip_countries": [
                          {
                            "session_count": 15,
                            "country": "Spain",
                            "country_code": "ES"
                          },
                          {
                            "session_count": 7,
                            "country": "Portugal",
                            "country_code": "PT"
                          }
                        ],
                        "id_countries": [
                          {
                            "country": "Spain",
                            "country_code": "ES",
                            "session_count": 14
                          },
                          {
                            "country": "Portugal",
                            "country_code": "PT",
                            "session_count": 6
                          }
                        ],
                        "conversion_by_country": [
                          {
                            "country": "Spain",
                            "country_code": "ES",
                            "finished": 13,
                            "approved": 10
                          },
                          {
                            "country": "Portugal",
                            "country_code": "PT",
                            "finished": 6,
                            "approved": 4
                          }
                        ],
                        "cities": [
                          {
                            "session_count": 9,
                            "location": "Madrid, Spain",
                            "latitude": 40.4168,
                            "longitude": -3.7038
                          }
                        ]
                      },
                      "demographic_stats": {
                        "age_distribution": {
                          "under_18": 0,
                          "18_24": 5,
                          "25_34": 8,
                          "35_44": 4,
                          "45_64": 2,
                          "65_plus": 1
                        },
                        "gender_distribution": {
                          "M": 11,
                          "F": 9
                        }
                      },
                      "device_details": {
                        "device_models": [
                          {
                            "device": "Apple",
                            "count": 12
                          },
                          {
                            "device": "Android",
                            "count": 10
                          }
                        ],
                        "browsers": [
                          {
                            "browser": "Safari",
                            "count": 12
                          },
                          {
                            "browser": "Chrome",
                            "count": 10
                          }
                        ],
                        "operating_systems": [
                          {
                            "os": "iOS",
                            "count": 12
                          },
                          {
                            "os": "Android",
                            "count": 10
                          }
                        ]
                      },
                      "workflow_funnel_stats": {
                        "33333333-4444-5555-6666-777777777777": {
                          "total": 22,
                          "steps": {
                            "OCR": {
                              "reached": 21
                            },
                            "LIVENESS": {
                              "reached": 19
                            },
                            "FACE_MATCH": {
                              "reached": 19
                            },
                            "AML": {
                              "reached": 18
                            }
                          }
                        }
                      },
                      "verification_time_stats": {
                        "overall_avg_seconds": 64.0,
                        "overall_count": 18,
                        "per_feature": {
                          "OCR": {
                            "avg_seconds": 41.2,
                            "total_seconds": 741.6,
                            "count": 18
                          },
                          "LIVENESS": {
                            "avg_seconds": 22.8,
                            "total_seconds": 410.4,
                            "count": 18
                          }
                        },
                        "per_sub_step": {
                          "OCR": {
                            "front_id_photo": {
                              "avg_seconds": 18.3,
                              "total_seconds": 329.4,
                              "count": 18
                            }
                          }
                        }
                      },
                      "resubmission_stats": {
                        "first_pass": 17,
                        "second": 2,
                        "third_plus": 1,
                        "abandoned": 0
                      },
                      "warning_stats": {
                        "ID_VERIFICATION": {
                          "total": 21,
                          "risks": {
                            "DOCUMENT_EXPIRED": {
                              "error": 1,
                              "warning": 0,
                              "information": 0
                            }
                          }
                        },
                        "LIVENESS": {
                          "total": 19,
                          "risks": {
                            "LOW_LIVENESS_SCORE": {
                              "error": 0,
                              "warning": 2,
                              "information": 0
                            }
                          }
                        }
                      },
                      "original_status_stats": {
                        "approved": 13,
                        "in_review": 5,
                        "declined": 2
                      },
                      "demographic_time_series": [
                        {
                          "date": "2026-10-14",
                          "age_distribution": {
                            "under_18": 0,
                            "18_24": 3,
                            "25_34": 4,
                            "35_44": 2,
                            "45_64": 1,
                            "65_plus": 0
                          },
                          "gender_distribution": {
                            "M": 6,
                            "F": 4
                          }
                        },
                        {
                          "date": "2026-10-15",
                          "age_distribution": {
                            "under_18": 0,
                            "18_24": 2,
                            "25_34": 4,
                            "35_44": 2,
                            "45_64": 1,
                            "65_plus": 1
                          },
                          "gender_distribution": {
                            "M": 5,
                            "F": 5
                          }
                        }
                      ],
                      "device_time_series": [
                        {
                          "date": "2026-10-14",
                          "devices": {
                            "Apple": 7,
                            "Android": 5
                          },
                          "browsers": {
                            "Safari": 7,
                            "Chrome": 5
                          },
                          "operating_systems": {
                            "iOS": 7,
                            "Android": 5
                          }
                        },
                        {
                          "date": "2026-10-15",
                          "devices": {
                            "Apple": 5,
                            "Android": 5
                          },
                          "browsers": {
                            "Safari": 5,
                            "Chrome": 5
                          },
                          "operating_systems": {
                            "iOS": 5,
                            "Android": 5
                          }
                        }
                      ],
                      "verification_time_time_series": [
                        {
                          "date": "2026-10-14",
                          "overall_avg": 66.1,
                          "per_feature": {
                            "OCR": 42.0,
                            "LIVENESS": 24.1
                          }
                        },
                        {
                          "date": "2026-10-15",
                          "overall_avg": 61.5,
                          "per_feature": {
                            "OCR": 40.2,
                            "LIVENESS": 21.3
                          }
                        }
                      ],
                      "resubmission_time_series": [
                        {
                          "date": "2026-10-14",
                          "first_pass": 9,
                          "second": 1,
                          "third_plus": 0,
                          "abandoned": 0
                        },
                        {
                          "date": "2026-10-15",
                          "first_pass": 8,
                          "second": 1,
                          "third_plus": 1,
                          "abandoned": 0
                        }
                      ],
                      "original_status_time_series": [
                        {
                          "date": "2026-10-14",
                          "approved": 7,
                          "in_review": 3,
                          "declined": 1
                        },
                        {
                          "date": "2026-10-15",
                          "approved": 6,
                          "in_review": 2,
                          "declined": 1
                        }
                      ],
                      "previous_data_points": [
                        {
                          "rounded_date": "2026-10-12",
                          "total": 9,
                          "approved": 6,
                          "declined": 1,
                          "canceled": 1,
                          "pending": 1
                        },
                        {
                          "rounded_date": "2026-10-13",
                          "total": 11,
                          "approved": 7,
                          "declined": 2,
                          "canceled": 0,
                          "pending": 2
                        }
                      ],
                      "previous_request_breakdown": {
                        "total_approved": 13,
                        "total_in_review": 2,
                        "total_declined": 3,
                        "total_canceled": 1,
                        "total_pending": 3
                      }
                    }
                  },
                  "Transaction widgets": {
                    "value": {
                      "scope": "transactions",
                      "available_widget_keys": [
                        "tx_count_total",
                        "tx_count_daily",
                        "tx_volume_total_preferred_currency",
                        "tx_volume_daily_preferred_currency",
                        "tx_average_amount",
                        "tx_average_amount_daily",
                        "tx_transaction_category_breakdown",
                        "tx_action_type_breakdown",
                        "tx_status_volume_trend",
                        "tx_user_ip_or_country_distribution",
                        "tx_tag_breakdown",
                        "tx_top_rules_triggered",
                        "tx_team_member_performance",
                        "tx_score_histogram"
                      ],
                      "requested_widget_keys": [
                        "tx_count_total",
                        "tx_count_daily"
                      ],
                      "widgets": {
                        "tx_count_total": {
                          "kind": "metric",
                          "title": "Transaction count",
                          "value": 42
                        },
                        "tx_count_daily": {
                          "kind": "time_series",
                          "title": "Transaction count",
                          "items": [
                            {
                              "date": "2026-10-14",
                              "value": 20
                            },
                            {
                              "date": "2026-10-15",
                              "value": 22
                            }
                          ],
                          "previous_items": [
                            {
                              "date": "2026-10-12",
                              "value": 18
                            },
                            {
                              "date": "2026-10-13",
                              "value": 15
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "نطاق تاريخ أو نطاق غير صالح. جسم الاستجابة هو كائن مفهرس بالمعامل المخالف، مع رسالة نصية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "examples": {
                  "Bad date format": {
                    "value": {
                      "start_date": "Invalid date format. Use YYYY-MM-DD (e.g., 2024-01-15)."
                    }
                  },
                  "Start after end": {
                    "value": {
                      "start_date": "Start date must be before or equal to end date."
                    }
                  },
                  "Range too long": {
                    "value": {
                      "date_range": "Date range cannot exceed 730 days (2 years)."
                    }
                  },
                  "Unknown scope": {
                    "value": {
                      "scope": "Unsupported analytics scope."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API. المفتاح الذي تم إنشاؤه مع تاريخ انتهاء هو فقط الذي يمكن أن تنتهي صلاحيته؛ بعد هذا التاريخ، تجيب جميع الطلبات باستخدامه بـ `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. اقرأ `detail`: مفتاح API مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو مفتاح لتطبيق آخر، أو أي مفتاح ذو نطاق محدد، أو طلب من خارج قائمة العناوين الخاصة بالمفتاح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Another application": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key": {
                    "value": {
                      "detail": "This API key has no access to this endpoint."
                    }
                  },
                  "Outside the key's IP list": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 600 طلب GET في الدقيقة باستخدام مفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني حتى إعادة تعيين النافذة الحالية البالغة دقيقة واحدة.",
                "schema": {
                  "type": "integer",
                  "example": 23
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها في الدقيقة ضمن هذه الميزانية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix عند إعادة تعيين النافذة.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/analytics/today/": {
      "get": {
        "summary": "الحصول على عمليات التحقق اليوم حسب الساعة",
        "operationId": "get_application_analytics_today",
        "x-didit-sdk": {
          "resource": "analytics",
          "method": "retrieve_today",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Analytics"
        ],
        "description": "جلسات التحقق من المستخدمين (KYC) لليوم، بدءًا من منتصف الليل بالتوقيت المحلي في `tz`، محسوبة بحسب الساعة المحلية التي أُنشئت فيها، بجانب نفس الساعات من نفس اليوم من الأسبوع السابق، ومقسمة حسب النتيجة الحالية لكل منها: مقبولة، قيد المراجعة، أو مرفوضة. هذه هي بطاقة الحجم في الصفحة الرئيسية لـ Business Console.\n\nالقيمة `total` تمثل إجمالي اليوم حتى الآن. بينما تحسب `previous_total_so_far` يوم المقارنة حتى نفس الوقت المحلي فقط، بحيث تقارن التغيرات بينهما نفس الجزء من كلا اليومين. وتكون الساعات المتبقية من اليوم `0`. واليوم الذي يتغير فيه التوقيت يحتوي على 23 أو 25 ساعة: الساعة المفقودة تبقى `0` والساعة المكررة تتضمن كلتيهما.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة.",
            "example": "11111111-2222-3333-4444-555555555555"
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق. يجب أن يكون التطبيق الذي ينتمي إليه مفتاح API: أي مفتاح يُستخدم مع تطبيق آخر يتلقى الرمز `403`.",
            "example": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
          },
          {
            "name": "tz",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "UTC",
              "example": "Europe/Madrid"
            },
            "description": "المنطقة الزمنية وفقاً لـ IANA التي يبدأ منتصف ليلها اليوم، على سبيل المثال `Europe/Madrid` أو `America/Mexico_City`. لا تُرسله لاستخدام UTC."
          }
        ],
        "responses": {
          "200": {
            "description": "عمليات التحقق لليوم حسب الساعة المحلية، وعمليات التحقق ليوم المقارنة، ونتائج اليوم.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationAnalyticsToday"
                },
                "examples": {
                  "Madrid, 14:00": {
                    "value": {
                      "time_zone": "Europe/Madrid",
                      "date": "2026-10-30",
                      "current_hour": 14,
                      "previous_date": "2026-10-23",
                      "hours": [
                        3,
                        1,
                        0,
                        0,
                        1,
                        2,
                        4,
                        9,
                        14,
                        18,
                        21,
                        19,
                        22,
                        24,
                        27,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                      ],
                      "previous_hours": [
                        2,
                        1,
                        1,
                        0,
                        1,
                        3,
                        5,
                        8,
                        12,
                        16,
                        19,
                        18,
                        20,
                        22,
                        24,
                        26,
                        23,
                        19,
                        15,
                        12,
                        9,
                        7,
                        5,
                        3
                      ],
                      "total": 165,
                      "previous_total_so_far": 151,
                      "outcomes": {
                        "approved": 139,
                        "in_review": 6,
                        "declined": 18
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "منطقة زمنية غير معروفة. يكون نص الاستجابة مفهرساً بالمعامل، مع قائمة من الرسائل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Unknown time zone": {
                    "value": {
                      "tz": [
                        "Unknown time zone: Europe/Atlantis."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API. المفتاح الذي تم إنشاؤه مع تاريخ انتهاء هو فقط الذي يمكن أن تنتهي صلاحيته؛ بعد هذا التاريخ، تجيب جميع الطلبات باستخدامه بـ `401`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. اقرأ `detail`: مفتاح API مفقود أو غير صالح (لا يُرجع `401` مطلقاً)، أو مفتاح لتطبيق آخر، أو أي مفتاح ذو نطاق محدد، أو طلب من خارج قائمة العناوين الخاصة بالمفتاح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Another application": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key": {
                    "value": {
                      "detail": "This API key has no access to this endpoint."
                    }
                  },
                  "Outside the key's IP list": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 600 طلب GET في الدقيقة باستخدام مفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After`، ثم أعد المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني حتى إعادة تعيين النافذة الحالية البالغة دقيقة واحدة.",
                "schema": {
                  "type": "integer",
                  "example": 23
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها في الدقيقة ضمن هذه الميزانية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix عند إعادة تعيين النافذة.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/analytics/today/?tz=Europe%2FMadrid' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          }
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/webhooks/": {
      "get": {
        "summary": "عرض عمليات تسليم webhook للجلسة",
        "description": "سرد كل عمليات تسليم webhook التي سجلها Didit لجلسة تحقق واحدة، سواء للمستخدمين (KYC) أو الشركات (KYB)، الأحدث أولاً، كمصفوفة JSON عادية (غير مقسّمة إلى صفحات). يمثل كل إدخال محاولة واحدة لوجهة معينة: الإرسال الأول، وكل [إعادة محاولة](https://docs.didit.me/ar/integration/webhooks#سياسة-إعادة-المحاولة) تلقائية، وكل إعادة إرسال هي إدخالات منفصلة لها معرّف `uuid` خاص بها، وتحتفظ إعادات المحاولة وإعادات الإرسال بقيمة `event_id` الخاصة بـ payload. حقلا `request_header` و`request_body` هما نصوص بتنسيق JSON؛ يمكنك تحليلهما لقراءة التوقيعات وpayload. تتوفر سجلات التسليم لمدة 30 يوماً تقريباً، لذا فإن المصفوفة الفارغة تعني أنه لم يتم إرسال أي webhook للجلسة بعد أو أن جميع عمليات التسليم أقدم من تلك المدة. يتطلب مفتاح API محدد النطاق إذنَي `sessions: read` و`decisions: read`.",
        "operationId": "get_v3_session_webhooks",
        "x-didit-sdk": {
          "resource": "sessions.webhooks",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق، للمستخدمين (KYC) أو للشركات (KYB): `session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`. يطابق الخادم المعرّف عبر كلا نوعي الجلسات.\n\n**يجب أن يكون UUID صالحًا.** يطابق المسار قيم UUID صالحة البنية فقط، لذا يتم رفض أي قيمة غير صالحة البنية بواسطة موجه URL قبل تشغيل أي كود برمجي للتطبيق وتكون الاستجابة صفحة **HTML** برمز `404` بدلاً من تنسيق JSON لـ `{\"detail\": ...}` الموضح أدناه.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "22222222-3333-4444-5555-666666666666"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/session/22222222-3333-4444-5555-666666666666/webhooks/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.webhooks.list(\n    \"22222222-3333-4444-5555-666666666666\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.webhooks.list(\"22222222-3333-4444-5555-666666666666\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Webhooks.List(ctx, \"22222222-3333-4444-5555-666666666666\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().webhooks().list(\"22222222-3333-4444-5555-666666666666\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->webhooks->list('22222222-3333-4444-5555-666666666666');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.webhooks.list(\"22222222-3333-4444-5555-666666666666\").each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Webhooks.ListAsync(\"22222222-3333-4444-5555-666666666666\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "كل عملية تسليم مسجلة للجلسة، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionWebhookDelivery"
                  }
                },
                "examples": {
                  "Failed delivery and its successful retry": {
                    "value": [
                      {
                        "uuid": "66666666-7777-8888-9999-000000000002",
                        "session_id": "22222222-3333-4444-5555-666666666666",
                        "request_url": "https://yourapp.com/webhooks/didit",
                        "response_status": 200,
                        "status": "In Progress",
                        "webhook_type": "status.updated",
                        "request_header": "{\"Content-Type\": \"application/json\", \"X-Signature\": \"9188851d160b5b3aacfc946e4dde1f061b7e568662518942c927ddaf507f533d\", \"X-Signature-V2\": \"381236af514d3fb538579365ac5a24f2464ce1b8224c6e770c60d8201c43ecc5\", \"X-Signature-Simple\": \"4740131dc38f29e78a8508371979be74967d5307464494bd3148a03b4d6c8716\", \"X-Timestamp\": \"1792056139\", \"User-Agent\": \"DiditWebhook/2.0 +https://didit.me\"}",
                        "request_body": "{\"application_id\":\"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\"created_at\":1792056057,\"environment\":\"live\",\"event_id\":\"33333333-4444-5555-6666-777777777777\",\"sandbox_scenario\":null,\"session_id\":\"22222222-3333-4444-5555-666666666666\",\"status\":\"In Progress\",\"timestamp\":1792056139,\"vendor_data\":\"user-123\",\"webhook_type\":\"status.updated\",\"workflow_id\":\"44444444-5555-6666-7777-888888888888\",\"workflow_version\":3}",
                        "created_at": "2026-10-15T09:22:19.104233Z"
                      },
                      {
                        "uuid": "66666666-7777-8888-9999-000000000001",
                        "session_id": "22222222-3333-4444-5555-666666666666",
                        "request_url": "https://yourapp.com/webhooks/didit",
                        "response_status": 503,
                        "status": "In Progress",
                        "webhook_type": "status.updated",
                        "request_header": "{\"Content-Type\": \"application/json\", \"X-Signature\": \"a5e02a03404e1337a0198e6be15d34abbd053c658a0e51e5d0e78554213ef29b\", \"X-Signature-V2\": \"927e7cb770c94ce745939bff73f04aa200015f3bc64795ba46c2aaf78a6cedc5\", \"X-Signature-Simple\": \"e37b0d4c716c72bb5ae7127b9cc455d28ab4686e9e22312b4ec2327409a73302\", \"X-Timestamp\": \"1792056078\", \"User-Agent\": \"DiditWebhook/2.0 +https://didit.me\"}",
                        "request_body": "{\"application_id\":\"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\"created_at\":1792056057,\"environment\":\"live\",\"event_id\":\"33333333-4444-5555-6666-777777777777\",\"sandbox_scenario\":null,\"session_id\":\"22222222-3333-4444-5555-666666666666\",\"status\":\"In Progress\",\"timestamp\":1792056078,\"vendor_data\":\"user-123\",\"webhook_type\":\"status.updated\",\"workflow_id\":\"44444444-5555-6666-7777-888888888888\",\"workflow_version\":3}",
                        "created_at": "2026-10-15T09:21:18.412345Z"
                      }
                    ]
                  },
                  "No webhook sent yet": {
                    "value": []
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. يؤدي عدم وجود `x-api-key`، أو استخدام مفتاح غير صالح أو ملغى، إلى تلقي `Authentication credentials were not provided or are invalid.`. يتلقى مفتاح تطبيق آخر `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا الـ endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`. يؤدي وجود `sessionId` غير معروف إلى إرجاع `404` قبل التحقق من بيانات الاعتماد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Key of another application": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without sessions read": {
                    "value": {
                      "detail": "This API key has no read access to sessions."
                    }
                  },
                  "Scoped key without decisions read": {
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة أو تم حذفها (`Not found.`، تُعاد قبل التحقق من بيانات الاعتماد)، أو أنها خارج حدود سير العمل أو حدود الحالة الخاصة بمفتاح ذي نطاق محدد (`Session not found.`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside the key's limits": {
                    "value": {
                      "detail": "Session not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 600 طلب GET في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (600).",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-get"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/webhook/{webhook_uuid}": {
      "get": {
        "summary": "الحصول على تسليم webhook للجلسة",
        "description": "استرداد عملية تسليم webhook واحدة لجلسة تحقق: عنوان URL الذي تم الإرسال إليه، وحالة HTTP التي أرجعها endpoint الخاص بك، والرؤوس الدقيقة ونص JSON اللذين أرسلتهما Didit. الحقلان `request_header` و`request_body` هما نص JSON؛ للتحقق من [التحقق من التوقيع](https://docs.didit.me/ar/integration/webhooks#التحقق-من-التوقيع)، أعد حساب `X-Signature-V2` من النص الذي تم تحليله باستخدام السر الخاص بالوجهة التي أُرسل إليها (أو السر على مستوى التطبيق لعملية تسليم إلى عنوان URL القديم لـ webhook). المسار لا يحتوي على شرطة مائلة في نهايته: وإذا وُجدت فإنه يرجع `404`. يتطلب مفتاح API المخصص الصلاحيتين `sessions: read` و`decisions: read`.",
        "operationId": "get_v3_session_webhook",
        "x-didit-sdk": {
          "resource": "sessions.webhooks",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق، للمستخدمين (KYC) أو للشركات (KYB): `session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`. يطابق الخادم المعرّف عبر كلا نوعي الجلسات.\n\n**يجب أن يكون UUID صالحًا.** يطابق المسار قيم UUID صالحة البنية فقط، لذا يتم رفض أي قيمة غير صالحة البنية بواسطة موجه URL قبل تشغيل أي كود برمجي للتطبيق وتكون الاستجابة صفحة **HTML** برمز `404` بدلاً من تنسيق JSON لـ `{\"detail\": ...}` الموضح أدناه.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "22222222-3333-4444-5555-666666666666"
          },
          {
            "name": "webhook_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لعملية التسليم: وهو الـ `uuid` لمدخل تم إرجاعه بواسطة `GET /v3/session/{sessionId}/webhooks/`. يجب أن ينتمي إلى الجلسة الموجودة في المسار.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "66666666-7777-8888-9999-000000000001"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/session/22222222-3333-4444-5555-666666666666/webhook/66666666-7777-8888-9999-000000000001' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.webhooks.retrieve(\n    \"22222222-3333-4444-5555-666666666666\",\n    \"66666666-7777-8888-9999-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.webhooks.retrieve(\n  \"22222222-3333-4444-5555-666666666666\",\n  \"66666666-7777-8888-9999-000000000001\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Webhooks.Retrieve(ctx, \"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().webhooks().retrieve(\"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->webhooks->retrieve('22222222-3333-4444-5555-666666666666', '66666666-7777-8888-9999-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.webhooks.retrieve(\n  \"22222222-3333-4444-5555-666666666666\",\n  \"66666666-7777-8888-9999-000000000001\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Webhooks.RetrieveAsync(\"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التسليم، مع رؤوس الطلب ونصه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionWebhookDelivery"
                },
                "examples": {
                  "Connection failure": {
                    "value": {
                      "uuid": "66666666-7777-8888-9999-000000000001",
                      "session_id": "22222222-3333-4444-5555-666666666666",
                      "request_url": "https://yourapp.com/webhooks/didit",
                      "response_status": 503,
                      "status": "In Progress",
                      "webhook_type": "status.updated",
                      "request_header": "{\"Content-Type\": \"application/json\", \"X-Signature\": \"a5e02a03404e1337a0198e6be15d34abbd053c658a0e51e5d0e78554213ef29b\", \"X-Signature-V2\": \"927e7cb770c94ce745939bff73f04aa200015f3bc64795ba46c2aaf78a6cedc5\", \"X-Signature-Simple\": \"e37b0d4c716c72bb5ae7127b9cc455d28ab4686e9e22312b4ec2327409a73302\", \"X-Timestamp\": \"1792056078\", \"User-Agent\": \"DiditWebhook/2.0 +https://didit.me\"}",
                      "request_body": "{\"application_id\":\"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\"created_at\":1792056057,\"environment\":\"live\",\"event_id\":\"33333333-4444-5555-6666-777777777777\",\"sandbox_scenario\":null,\"session_id\":\"22222222-3333-4444-5555-666666666666\",\"status\":\"In Progress\",\"timestamp\":1792056078,\"vendor_data\":\"user-123\",\"webhook_type\":\"status.updated\",\"workflow_id\":\"44444444-5555-6666-7777-888888888888\",\"workflow_version\":3}",
                      "created_at": "2026-10-15T09:21:18.412345Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. يؤدي عدم وجود `x-api-key`، أو استخدام مفتاح غير صالح أو ملغى، إلى تلقي `Authentication credentials were not provided or are invalid.`. يتلقى مفتاح تطبيق آخر `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا الـ endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`. يؤدي وجود `sessionId` غير معروف إلى إرجاع `404` قبل التحقق من بيانات الاعتماد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Key of another application": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without sessions read": {
                    "value": {
                      "detail": "This API key has no read access to sessions."
                    }
                  },
                  "Scoped key without decisions read": {
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة أو تم حذفها (`Not found.`، تُعاد قبل التحقق من بيانات الاعتماد)، أو أنها خارج حدود سير العمل أو حدود الحالة الخاصة بمفتاح ذي نطاق محدد (`Session not found.`). عملية التسليم غير الموجودة، أو التابعة لجلسة أخرى، أو التي لم تعد متاحة تُعيد `No WebhookLog matches the given query.`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside the key's limits": {
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "Delivery not in this session": {
                    "value": {
                      "detail": "No WebhookLog matches the given query."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 600 طلب GET في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (600).",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-get"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/webhook/{webhook_uuid}/resend": {
      "post": {
        "summary": "إعادة إرسال تسليم webhook للجلسة",
        "description": "أعد إرسال webhook جلسة مسجّل إلى الرابط الذي أُرسل إليه في البداية، مع نفس payload و`event_id` و`timestamp` جديد ورأس `X-Timestamp` جديد وتوقيعات جديدة. توقّع Didit الطلب باستخدام السر الحالي للوجهة التي يتبع لها التسليم (أو السر على مستوى التطبيق للتسليم إلى رابط webhook القديم)، وتنتظر حتى 5 ثوانٍ لاستجابة endpoint الخاص بك، وتسجل المحاولة كتسليم جديد وتعيده برمز `200` بصرف النظر عما أجاب به endpoint الخاص بك: راجع `response_status`. لا تتم إعادة محاولة إعادة الإرسال تلقائياً، وكل استدعاء يرسل مرة أخرى، لذا اجعل endpoint الخاص بك يدعم idempotency بالاعتماد على `event_id`. لا يحتوي المسار على شرطة مائلة لاحقة ولا يحتوي الطلب على جسم. يحتاج مفتاح API ذو الصلاحيات المحددة إلى `webhooks: write` و`decisions: read`.",
        "operationId": "post_v3_session_webhook_resend",
        "x-didit-sdk": {
          "resource": "sessions.webhooks",
          "method": "resend",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق، للمستخدمين (KYC) أو للشركات (KYB): `session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`. يطابق الخادم المعرّف عبر كلا نوعي الجلسات.\n\n**يجب أن يكون UUID صالحًا.** يطابق المسار قيم UUID صالحة البنية فقط، لذا يتم رفض أي قيمة غير صالحة البنية بواسطة موجه URL قبل تشغيل أي كود برمجي للتطبيق وتكون الاستجابة صفحة **HTML** برمز `404` بدلاً من تنسيق JSON لـ `{\"detail\": ...}` الموضح أدناه.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "22222222-3333-4444-5555-666666666666"
          },
          {
            "name": "webhook_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لعملية التسليم المراد إعادة إرسالها: وهو الـ `uuid` لمدخل تم إرجاعه بواسطة `GET /v3/session/{sessionId}/webhooks/`. يجب أن ينتمي إلى الجلسة الموجودة في المسار.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "66666666-7777-8888-9999-000000000001"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/session/22222222-3333-4444-5555-666666666666/webhook/66666666-7777-8888-9999-000000000001/resend' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.webhooks.resend(\n    \"22222222-3333-4444-5555-666666666666\",\n    \"66666666-7777-8888-9999-000000000001\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.webhooks.resend(\n  \"22222222-3333-4444-5555-666666666666\",\n  \"66666666-7777-8888-9999-000000000001\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Webhooks.Resend(ctx, \"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().webhooks().resend(\"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->webhooks->resend('22222222-3333-4444-5555-666666666666', '66666666-7777-8888-9999-000000000001');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.webhooks.resend(\n  \"22222222-3333-4444-5555-666666666666\",\n  \"66666666-7777-8888-9999-000000000001\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Webhooks.ResendAsync(\"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التسليم الجديد، الذي جرت محاولته بالفعل. تمثل `response_status` ما أجاب به endpoint الخاص بك هذه المرة. يظل التسليم الأصلي دون تغيير.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionWebhookDelivery"
                },
                "examples": {
                  "Accepted on resend": {
                    "value": {
                      "uuid": "66666666-7777-8888-9999-000000000004",
                      "session_id": "22222222-3333-4444-5555-666666666666",
                      "request_url": "https://yourapp.com/webhooks/didit",
                      "response_status": 200,
                      "status": "In Progress",
                      "webhook_type": "status.updated",
                      "request_header": "{\"Content-Type\": \"application/json\", \"X-Signature\": \"b8eb1e376517ee0cad8ba98ff7f8fd35fc72eca231000963a96a335f82328835\", \"X-Signature-V2\": \"9efd2ce9ed1303e1d05273ef9608a59363ed9789a05253db4748b3e8e50cb109\", \"X-Signature-Simple\": \"bf3a9dc04b2c20ab539203b0cd5cca2a10f630bf62d8feb6d68d82af80f64774\", \"X-Timestamp\": \"1792159542\", \"User-Agent\": \"DiditWebhook/2.0 +https://didit.me\"}",
                      "request_body": "{\"application_id\":\"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\"created_at\":1792056057,\"environment\":\"live\",\"event_id\":\"33333333-4444-5555-6666-777777777777\",\"sandbox_scenario\":null,\"session_id\":\"22222222-3333-4444-5555-666666666666\",\"status\":\"In Progress\",\"timestamp\":1792159542,\"vendor_data\":\"user-123\",\"webhook_type\":\"status.updated\",\"workflow_id\":\"44444444-5555-6666-7777-888888888888\",\"workflow_version\":3}",
                      "created_at": "2026-10-16T14:05:42.330981Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "تعذرت إعادة إرسال التسليم. حدد المسار بناءً على `code`: يعني `webhook_url_missing` أن التسليم لا يحتوي على عنوان URL مسجل ولم يُرسل أي شيء؛ ويعني `webhook_resend_error` تعذر إعادة توقيع التسليم المخزن أو تعذر إكمال المحاولة. بعد `webhook_resend_error`، يبدأ الحقل `detail` بـ `Error processing webhook resend:` متبوعًا بنص تشخيصي يمكن أن يتغير.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    },
                    "code": {
                      "type": "string",
                      "description": "رمز خطأ ثابت قابل للقراءة آلياً. اعتمد في تفريع منطقك البرمجي على هذا الرمز، وليس على `detail`."
                    }
                  }
                },
                "examples": {
                  "No recorded URL": {
                    "value": {
                      "detail": "The webhook delivery does not have a request URL configured",
                      "code": "webhook_url_missing"
                    }
                  },
                  "Resend failed": {
                    "value": {
                      "detail": "Error processing webhook resend: Invalid webhook data format",
                      "code": "webhook_resend_error"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "الطلب غير مسموح به. يؤدي عدم وجود `x-api-key`، أو استخدام مفتاح غير صالح أو ملغى، إلى تلقي `Authentication credentials were not provided or are invalid.`. يتلقى مفتاح تطبيق آخر `You do not have permission to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا الـ endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't be used from this IP address.`. يؤدي وجود `sessionId` غير معروف إلى إرجاع `404` قبل التحقق من بيانات الاعتماد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid key": {
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Key of another application": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without webhooks write": {
                    "value": {
                      "detail": "This API key has no write access to webhooks."
                    }
                  },
                  "Scoped key without decisions read": {
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "Outside the IP allowlist": {
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة أو تم حذفها (`Not found.`، تُعاد قبل التحقق من بيانات الاعتماد)، أو أنها خارج حدود سير العمل أو حدود الحالة الخاصة بمفتاح ذي نطاق محدد (`Session not found.`). عملية التسليم غير الموجودة، أو التابعة لجلسة أخرى، أو التي لم تعد متاحة تُعيد `Webhook log not found`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside the key's limits": {
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "Delivery not in this session": {
                    "value": {
                      "detail": "Webhook log not found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: أكثر من 300 طلب كتابة (POST، PATCH، PUT، DELETE) في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (300).",
                "schema": {
                  "type": "integer",
                  "example": 300
                }
              },
              "X-RateLimit-Remaining": {
                "description": "الطلبات المتبقية في النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.",
                "schema": {
                  "type": "integer",
                  "example": 1792056120
                }
              },
              "X-RateLimit-Scope": {
                "description": "اسم الميزانية التي تم تجاوزها.",
                "schema": {
                  "type": "string",
                  "example": "generic-write"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Throttled": {
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/events/": {
      "get": {
        "summary": "عرض أحداث الجلسة",
        "description": "قراءة التسلسل الزمني لأحداث جلسة تحقق واحدة، مرتبة من الأحدث أولاً حسب `sent_at`: الشاشات التي رآها المستخدم، الأزرار وعمليات الرفع، المحاولات الفاشلة، تغييرات الحالة وخطوات الميزات، وتتبّع توجيه سير العمل. يعمل مع معرّفات جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB). يتم تخزين الأحداث بشكل غير متزامن، لذا قد يستغرق ظهور الحدث الجديد بضع ثوانٍ. النتائج مقسمة إلى صفحات باستخدام `limit` و `offset`؛ اتبع `next` حتى تصبح `null`. يحتاج مفتاح API ذو النطاق المحدود إلى `sessions: read` و `decisions: read`، ودون `media: read` يتلقى `file_url` كـ `null`. أحداث التوجيه موصوفة في [استرداد الجلسة](https://docs.didit.me/ar/sessions-api/retrieve-session).",
        "operationId": "get_v3_session_events",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "list_events",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق (`session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`). يقبل معرّفات جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB): يطابق الخادم المعرّف عبر كلا نوعي الجلسات. يجب أن يكون UUID صالح البنية؛ تؤدي القيمة غير صالحة البنية إلى عدم مطابقة المسار وإرجاع `404` بتنسيق HTML.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "الحد الأقصى لعدد الأحداث لكل صفحة. القيمة الافتراضية هي 50. أي قيمة أقل من 1 أو غير عددية تعود تلقائياً إلى 50؛ وأي قيمة تزيد عن 1,000,000 تُرجع `400`.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000,
              "example": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "عدد النتائج المراد تخطيها قبل أول نتيجة مُرجعة. القيمة الافتراضية هي 0؛ وأي قيمة سالبة أو غير رقمية تعود تلقائياً إلى 0، بينما تُرجع القيمة التي تتجاوز 1,000,000 الرمز `400`. يُفضّل تتبّع عناوين URL في `next` و`previous`.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000,
              "example": 0
            }
          },
          {
            "name": "ordering",
            "in": "query",
            "required": false,
            "description": "تجاوز اختياري للترتيب. الترتيب الافتراضي هو `-sent_at`. مرّر اسم حقل نتيجة (على سبيل المثال `sent_at` أو `created_at` أو `event_type` أو `feature_step` أو `step`) للترتيب تصاعدياً، وأضف البادئة `-` للترتيب تنازلياً، وافصل بين الحقول المتعددة بفواصل. يتم تجاهل الحقول غير المعروفة.",
            "schema": {
              "type": "string",
              "example": "sent_at"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/events/?limit=50' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.list_events(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.listEvents(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.ListEventsAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsListEventsParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().listEvents(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->sessions->listEvents('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.list_events(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.ListEventsAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة واحدة من أحداث الجلسة، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "العدد الإجمالي لأحداث الجلسة."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SessionEvent"
                      }
                    }
                  }
                },
                "examples": {
                  "Completed session": {
                    "value": {
                      "count": 3,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "aaaaaaaa-1111-2222-3333-444444444444",
                          "event_type": "SESSION_STATUS_CHANGED",
                          "created_at": "2026-09-14T10:02:13.904512Z",
                          "component": null,
                          "feature_step": null,
                          "step": null,
                          "details": {
                            "old_status": "In Progress",
                            "current_status": "Approved"
                          },
                          "ip_address": null,
                          "user_agent": null,
                          "device_info": null,
                          "file_url": null,
                          "sent_at": 1789380131482
                        },
                        {
                          "uuid": "bbbbbbbb-1111-2222-3333-444444444444",
                          "event_type": "FEATURE_STEP_CHANGED",
                          "created_at": "2026-09-14T10:01:49.210377Z",
                          "component": null,
                          "feature_step": null,
                          "step": null,
                          "details": {
                            "old_feature_step": "OCR",
                            "current_feature_step": "LIVENESS"
                          },
                          "ip_address": null,
                          "user_agent": null,
                          "device_info": null,
                          "file_url": null,
                          "sent_at": 1789380107103
                        },
                        {
                          "uuid": "cccccccc-1111-2222-3333-444444444444",
                          "event_type": "STEP_RENDERED",
                          "created_at": "2026-09-14T10:01:00.581930Z",
                          "component": "DocumentCapture",
                          "feature_step": "OCR",
                          "step": "DOCUMENT_CAPTURE_FRONT",
                          "details": {},
                          "ip_address": "203.0.113.24",
                          "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1",
                          "device_info": {
                            "device_model": "iPhone"
                          },
                          "file_url": null,
                          "sent_at": 1789380058776
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`limit` أو `offset` أكبر من 1,000,000. نص الاستجابة هو مصفوفة JSON تحتوي على رسالة واحدة.",
            "content": {
              "application/json": {
                "examples": {
                  "Limit too large": {
                    "summary": "limit=2000000",
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  },
                  "Offset too large": {
                    "summary": "offset=2000000",
                    "value": [
                      "offset must not exceed 1000000."
                    ]
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without sessions read": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى sessions: read",
                    "value": {
                      "detail": "This API key has no read access to sessions."
                    }
                  },
                  "Scoped key without decisions read": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: read",
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو أنها خارج سير عمل مفتاح ذي نطاق محدد أو حدوده المقتصرة على الحالات المقبولة فقط. يتم البحث عن الجلسة قبل التحقق من بيانات الاعتماد، لذلك فإن معرّف `sessionId` غير المعروف يُعيد `404` حتى بدون مفتاح صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف، أو أنها حُذفت",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside key limits": {
                    "summary": "الجلسة خارج سير العمل أو حدود المقبولة فقط الخاصة بمفتاح ذي نطاق محدد",
                    "value": {
                      "detail": "Session not found."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 600 طلب GET في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/aml-screening-history/": {
      "get": {
        "summary": "عرض سجل فحص AML",
        "description": "سرد كل عملية إعادة فحص مكتملة ضمن المراقبة المستمرة لفحص AML الخاص بجلسة ما، مرتبة تنازلياً حسب `completed_at` (الأحدث أولاً)، بما في ذلك عمليات التشغيل التي لم تسفر عن أي تغيير: حيث إن التنبيهات وإدخالات النشاط وwebhooks لا تنطلق إلا عند تغير النتيجة، لذا فإن هذا السجل هو الدليل على أن الشخص الذي لا توجد عليه ملاحظات كان لا يزال يخضع للفحص. يعمل مع معرّفات جلسات KYC وKYB؛ مرّر `node_id` إذا نفذت الجلسة أكثر من خطوة AML واحدة. يتم سرد عمليات إعادة الفحص الخاصة بالمراقبة المستمرة فقط (عملية الفحص الأولى هي جزء من قرار الجلسة) ولا تتم إعادة بناء عمليات التشغيل السابقة لإنشاء هذا السجل، لذلك تُرجع الجلسة التي ليس بها مراقبة مستمرة قائمة فارغة. قيمة `count` دقيقة حتى 100 ويتم تحديد سقف لها عند 100 لما يزيد عن ذلك، لذا اتبع `next` حتى تصبح `null`. مرّر `month` لقراءة شهر تقويمي واحد في كل مرة. يتطلب مفتاح API محدد النطاق إذن `decisions: read`؛ راجع [مراقبة AML المستمرة](https://docs.didit.me/ar/core-technology/aml-screening/continuous-monitoring-aml-screening).",
        "operationId": "get_v3_session_aml_screening_history",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "list_aml_screening_history",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق (`session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`). يقبل معرّفات جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB): يطابق الخادم المعرّف عبر كلا نوعي الجلسات. يجب أن يكون UUID صالح البنية؛ تؤدي القيمة غير صالحة البنية إلى عدم مطابقة المسار وإرجاع `404` بتنسيق HTML.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "معرّف عقدة مخطط سير العمل لفحص AML. مطلوب فقط عندما تُجري الجلسة أكثر من خطوة AML واحدة؛ بدونه يتم استخدام أحدث فحص AML. يُرجع الاستدعاء `404` عند تحديد عقدة غير معروفة.",
            "schema": {
              "type": "string",
              "example": "feature_aml_1"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "شهر تقويمي بتوقيت UTC بصيغة `YYYY-MM`. يتم إرجاع عمليات الفحص المكتملة في ذلك الشهر فقط؛ ومن دونه يتم إرجاع كل شهر. يُرجع الشهر غير الصالح `400`.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "example": "2026-09"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "الحد الأقصى لعدد عمليات الفحص لكل صفحة. القيمة الافتراضية هي 50. أي قيمة أقل من 1 أو غير عددية تعود تلقائياً إلى 50؛ وأي قيمة تزيد عن 1,000,000 تُرجع `400`.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 1000000,
              "example": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "عدد النتائج المراد تخطيها قبل أول نتيجة مُرجعة. القيمة الافتراضية هي 0؛ وأي قيمة سالبة أو غير رقمية تعود تلقائياً إلى 0، بينما تُرجع القيمة التي تتجاوز 1,000,000 الرمز `400`. يُفضّل تتبّع عناوين URL في `next` و`previous`.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 1000000,
              "example": 0
            }
          },
          {
            "name": "ordering",
            "in": "query",
            "required": false,
            "description": "تجاوز اختياري للترتيب. الترتيب الافتراضي هو `-completed_at`. مرّر اسم حقل نتيجة (على سبيل المثال `completed_at` أو `started_at` أو `outcome` أو `score`) للترتيب تصاعدياً، وأضف البادئة `-` للترتيب تنازلياً، وافصل بين الحقول المتعددة بفواصل. يتم تجاهل الحقول غير المعروفة.",
            "schema": {
              "type": "string",
              "example": "completed_at"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/aml-screening-history/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.list_aml_screening_history(\n    \"11111111-2222-3333-4444-555555555555\",\n):\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.listAmlScreeningHistory(\"11111111-2222-3333-4444-555555555555\")) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.ListAMLScreeningHistoryAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsListAMLScreeningHistoryParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().listAmlScreeningHistory(\"11111111-2222-3333-4444-555555555555\")) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->sessions->listAmlScreeningHistory('11111111-2222-3333-4444-555555555555') as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.list_aml_screening_history(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.ListAmlScreeningHistoryAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة واحدة من عمليات الفحص، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "next",
                    "previous",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "maximum": 100,
                      "description": "عدد مرات التشغيل، دقيق حتى 100 ويقتصر على 100 كحد أقصى بعد ذلك."
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL للصفحة التالية، أو `null` في الصفحة الأخيرة."
                    },
                    "previous": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL للصفحة السابقة، أو `null` في الصفحة الأولى."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AMLScreeningRun"
                      }
                    }
                  }
                },
                "examples": {
                  "Monitored subject": {
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "uuid": "dddddddd-1111-2222-3333-444444444444",
                          "run_id": "aaaaaaaa-1111-2222-3333-444444444444",
                          "completed_at": "2026-09-14T04:12:33.481207Z",
                          "started_at": "2026-09-14T04:00:01.002311Z",
                          "outcome": "NO_CHANGE",
                          "trigger": "ONGOING_MONITORING",
                          "provider": "aml_data_source",
                          "status": "Approved",
                          "score": 0.0,
                          "total_hits": 0,
                          "new_hits": 0,
                          "entities_screened": 1,
                          "dataset_freshness": {
                            "captured_at": "2026-09-14T03:58:02.114820+00:00",
                            "provider": "aml_data_source",
                            "catalog_version": "2026-09-13",
                            "sources": {
                              "sanctions": {
                                "last_updated_at": "2026-09-13T21:10:00+00:00",
                                "oldest_updated_at": "2026-09-11T06:00:00+00:00",
                                "dataset_count": 120,
                                "dated_dataset_count": 120
                              },
                              "pep": {
                                "last_updated_at": "2026-09-13T08:00:00+00:00",
                                "oldest_updated_at": null,
                                "dataset_count": 45,
                                "dated_dataset_count": 44
                              },
                              "warnings": {
                                "last_updated_at": "2026-09-12T18:45:00+00:00",
                                "oldest_updated_at": "2026-09-01T00:00:00+00:00",
                                "dataset_count": 30,
                                "dated_dataset_count": 30
                              }
                            }
                          }
                        },
                        {
                          "uuid": "eeeeeeee-1111-2222-3333-444444444444",
                          "run_id": "bbbbbbbb-1111-2222-3333-444444444444",
                          "completed_at": "2026-09-13T04:11:58.020914Z",
                          "started_at": "2026-09-13T04:00:00.871022Z",
                          "outcome": "FAILED",
                          "trigger": "ONGOING_MONITORING",
                          "provider": "aml_data_source",
                          "status": "Approved",
                          "score": 0.0,
                          "total_hits": 0,
                          "new_hits": null,
                          "entities_screened": 0,
                          "dataset_freshness": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`limit` أو `offset` أكبر من 1,000,000 (مصفوفة JSON تحتوي على رسالة واحدة)، أو `month` ليس شهراً تقويمياً بصيغة `YYYY-MM` (كائن مفتاحه `month`).",
            "content": {
              "application/json": {
                "examples": {
                  "Limit too large": {
                    "summary": "limit=2000000",
                    "value": [
                      "limit must not exceed 1000000."
                    ]
                  },
                  "Offset too large": {
                    "summary": "offset=2000000",
                    "value": [
                      "offset must not exceed 1000000."
                    ]
                  },
                  "Malformed month": {
                    "summary": "month=2026-13",
                    "value": {
                      "month": [
                        "Not a calendar month. Use YYYY-MM."
                      ]
                    }
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "month": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions read": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: read",
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو أنها خارج حدود مفتاح ذي نطاق محدد، أو ليس لديها فحص AML (لقيمة `node_id` المحددة). يتم البحث عن الجلسة قبل التحقق من بيانات الاعتماد، لذلك فإن معرّف `sessionId` غير المعروف يُعيد `404` حتى بدون مفتاح صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف، أو أنها حُذفت",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside key limits": {
                    "summary": "الجلسة خارج حدود مفتاح ذي نطاق محدد (تُعاد أيضاً للجلسة المحذوفة منذ لحظات)",
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "No AML check": {
                    "summary": "لم تقم الجلسة بتشغيل خطوة AML على الإطلاق",
                    "value": {
                      "detail": "The session does not have an AML check."
                    }
                  },
                  "No AML check for node": {
                    "summary": "حقل node_id لا يتطابق مع أي فحص AML للجلسة",
                    "value": {
                      "detail": "The session does not have an AML check for node 'feature_aml_2'."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 600 طلب GET في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/aml-screening-history/export/": {
      "get": {
        "summary": "تصدير سجل فحص AML بتنسيق CSV",
        "description": "تنزيل سجل المراقبة المستمرة نفسه كما في `GET /v3/session/{sessionId}/aml-screening-history/` كملف CSV، بمعدل سطر واحد لكل عملية إعادة فحص مكتملة، الأحدث أولاً، وجاهز لتقديمه إلى مدقق الحسابات. يتم بث الملف كاملاً (من دون تقسيم إلى صفحات) ويبدأ بسطر رأس؛ وتعني الخلية الفارغة غير معروف، ولا يتم تقدير تواريخ مجموعات البيانات أبداً، وتُسبق القيمة التي تبدأ صيغة جدول بيانات بفاصلة عليا. يعمل مع معرّفات جلسات KYC وKYB؛ مرِّر `node_id` عندما تُشغّل الجلسة أكثر من خطوة AML واحدة. مرِّر `month` لتصدير شهر تقويمي واحد. يتم إرجاع الأخطاء بتنسيق JSON وليس CSV. يحتاج مفتاح API ذو النطاق المحدد إلى `decisions: read` و`media: read`: نظراً لأن الاستجابة عبارة عن ملف، فإن المفتاح الذي لا يحتوي على `media: read` يحصل على `403`.",
        "operationId": "get_v3_session_aml_screening_history_export",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "export_aml_screening_history",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق (`session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`). يقبل معرّفات جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB): يطابق الخادم المعرّف عبر كلا نوعي الجلسات. يجب أن يكون UUID صالح البنية؛ تؤدي القيمة غير صالحة البنية إلى عدم مطابقة المسار وإرجاع `404` بتنسيق HTML.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "معرّف عقدة مخطط سير العمل لفحص AML. مطلوب فقط عندما تُجري الجلسة أكثر من خطوة AML واحدة؛ بدونه يتم استخدام أحدث فحص AML. يُرجع الاستدعاء `404` عند تحديد عقدة غير معروفة.",
            "schema": {
              "type": "string",
              "example": "feature_aml_1"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "شهر تقويمي بتوقيت UTC بصيغة `YYYY-MM`. يتم إرجاع عمليات الفحص المكتملة في ذلك الشهر فقط؛ ومن دونه يتم إرجاع كل شهر. يُرجع الشهر غير الصالح `400`.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "example": "2026-09"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/aml-screening-history/export/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -o aml-screening-history.csv"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.export_aml_screening_history(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.csv\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.exportAmlScreeningHistory(\"11111111-2222-3333-4444-555555555555\");\nawait writeFile(\"download.csv\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.ExportAMLScreeningHistory(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsExportAMLScreeningHistoryParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.csv\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().exportAmlScreeningHistory(\"11111111-2222-3333-4444-555555555555\")\n        .writeTo(Path.of(\"download.csv\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->sessions->exportAmlScreeningHistory('11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.csv');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.export_aml_screening_history(\"11111111-2222-3333-4444-555555555555\")\nFile.binwrite(\"download.csv\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.ExportAmlScreeningHistoryAsync(\"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.csv\");"
          }
        ],
        "responses": {
          "200": {
            "description": "ملف CSV، يتم بثه بتنسيق `text/csv` بنهايات أسطر CRLF. الأعمدة بالترتيب: `screened_at` (وقت انتهاء إعادة الفحص)، و`outcome` (`NO_CHANGE` أو `CHANGED` أو `FAILED`)، و`provider` (معرّف مبهم لمصدر بيانات AML؛ لا تفرّع بناءً عليه)، و`aml_status`، و`aml_score`، و`total_hits`، و`datasets_captured_at`، و`datasets_sanctions_last_updated_at`، و`datasets_pep_last_updated_at`، و`datasets_warnings_last_updated_at`، و`datasets_adverse_media_last_updated_at`، و`datasets_catalog_version`، و`run_id` (تشغيل المراقبة)، و`entities_screened` (`1`، أو `0` للتشغيل الفاشل) و`new_hits` (فارغ عندما يكون غير معروف). التواريخ بتنسيق ISO 8601 مع فارق UTC. تُرجع الجلسة التي ليس لها عمليات إعادة فحص بعد سطر الرأس فقط.",
            "headers": {
              "Content-Disposition": {
                "description": "`attachment; filename=\"aml-screening-history-{sessionId}.csv\"`، أو `aml-screening-history-{sessionId}-{month}.csv` عند تمرير `month`.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=\"aml-screening-history-11111111-2222-3333-4444-555555555555.csv\""
                }
              }
            },
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "screened_at,outcome,provider,aml_status,aml_score,total_hits,datasets_captured_at,datasets_sanctions_last_updated_at,datasets_pep_last_updated_at,datasets_warnings_last_updated_at,datasets_adverse_media_last_updated_at,datasets_catalog_version,run_id,entities_screened,new_hits\r\n2026-09-14T04:12:33.481207+00:00,NO_CHANGE,aml_data_source,Approved,0.0,0,2026-09-14T03:58:02.114820+00:00,2026-09-13T21:10:00+00:00,2026-09-13T08:00:00+00:00,2026-09-12T18:45:00+00:00,,2026-09-13,aaaaaaaa-1111-2222-3333-444444444444,1,0\r\n2026-09-13T04:11:58.020914+00:00,FAILED,aml_data_source,Approved,0.0,0,,,,,,,bbbbbbbb-1111-2222-3333-444444444444,0,\r\n"
              }
            }
          },
          "400": {
            "description": "`month` ليس شهراً تقويمياً بصيغة `YYYY-MM`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "month": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "Malformed month": {
                    "summary": "month=2026-13",
                    "value": {
                      "month": [
                        "Not a calendar month. Use YYYY-MM."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions read": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: read",
                    "value": {
                      "detail": "This API key has no read access to decisions."
                    }
                  },
                  "Scoped key without media read": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى media: read (الاستجابة عبارة عن ملف)",
                    "value": {
                      "detail": "This API key has no read access to media."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو أنها خارج حدود مفتاح ذي نطاق محدد، أو ليس لديها فحص AML (لقيمة `node_id` المحددة). يتم البحث عن الجلسة قبل التحقق من بيانات الاعتماد، لذلك فإن معرّف `sessionId` غير المعروف يُعيد `404` حتى بدون مفتاح صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف، أو أنها حُذفت",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside key limits": {
                    "summary": "الجلسة خارج حدود مفتاح ذي نطاق محدد (تُعاد أيضاً للجلسة المحذوفة منذ لحظات)",
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "No AML check": {
                    "summary": "لم تقم الجلسة بتشغيل خطوة AML على الإطلاق",
                    "value": {
                      "detail": "The session does not have an AML check."
                    }
                  },
                  "No AML check for node": {
                    "summary": "حقل node_id لا يتطابق مع أي فحص AML للجلسة",
                    "value": {
                      "detail": "The session does not have an AML check for node 'feature_aml_2'."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 600 طلب GET في الدقيقة لكل مفتاح API. انتظر لعدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/add-images/": {
      "patch": {
        "summary": "إضافة صورة إلى جلسة",
        "description": "إرفاق صورة إضافية واحدة أو ملف PDF بنتيجة التحقق من الهوية (`model_type=kyc`) أو إثبات العنوان (`model_type=poa`) لجلسة التحقق من المستخدمين (KYC) مكتملة، مثل الأدلة التي تم جمعها خارج سير العمل. يجب أن تكون الجلسة بحالة `Approved` أو `Declined` أو `In Review` أو `Kyc Expired` وأن تتضمن النتيجة المحددة بواسطة `model_type`؛ جلسات التحقق من الشركات (KYB) غير مدعومة. يضيف كل استدعاء ملفاً واحداً (إلى أحدث نتيجة عند تشغيل الخطوة أكثر من مرة)، ويحتفظ بالملفات الحالية ويسجل إدخال `FILE_ADDED` في سجل نشاط الجلسة؛ لا يرسل الرفع أي webhook ولا يغير حالة الجلسة. يتم ضغط الملف عند الرفع ويتم إرجاعه في `extra_files` ضمن قرار الجلسة. هذا الـ endpoint محدود بـ 10 طلبات في الدقيقة لكل مفتاح API. يحتاج مفتاح API ذو النطاق المحدد إلى إذن `sessions: write`، وبدون `media: read` يتلقى روابط `extra_files` كـ `null`.",
        "operationId": "patch_v3_session_add_images",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "add_images",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من المستخدمين (KYC) لإضافة الملف إليها (وهو `session_id` المُرجع بواسطة `POST /v3/session/`). يرجع معرّف جلسة التحقق من الشركات (KYB) الرمز `404`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "model_type"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "الصورة أو ملف PDF. الامتدادات المسموح بها: `jpg`، و`jpeg`، و`png`، و`webp`، و`tiff`، و`pdf`. بحد أقصى 15 ميغابايت عند الرفع؛ ثم يُضغط الملف ويُرفض برمز `400` إذا ظل حجمه أكبر من 2 ميغابايت (2,097,152 بايت). يتم رفض الملفات الفارغة."
                  },
                  "model_type": {
                    "type": "string",
                    "enum": [
                      "kyc",
                      "poa"
                    ],
                    "description": "`kyc` يضيف الملف إلى نتيجة التحقق من الهوية، و`poa` إلى نتيجة إثبات العنوان.",
                    "example": "kyc"
                  },
                  "file_password": {
                    "type": "string",
                    "description": "كلمة مرور ملف PDF مشفر. بدونها، أو عند إدخال كلمة مرور خاطئة، يُرجع ملف PDF المشفر الرمز `400`."
                  }
                }
              },
              "example": {
                "file": "(binary)",
                "model_type": "kyc"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/add-images/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'file=@./back-of-id.jpg' \\\n  -F 'model_type=kyc'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.add_images(\n    \"11111111-2222-3333-4444-555555555555\",\n    file=open(\"image.jpg\", \"rb\"),\n    model_type=\"kyc\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.addImages(\"11111111-2222-3333-4444-555555555555\", {\n  file: await fileFromPath(\"image.jpg\"),\n  model_type: \"kyc\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.AddImages(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsAddImagesParams{\n\tFile:      didit.FileFromPath(\"image.jpg\"),\n\tModelType: \"kyc\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.SessionsAddImagesParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().addImages(\"11111111-2222-3333-4444-555555555555\", SessionsAddImagesParams.builder()\n        .file(Path.of(\"image.jpg\"))\n        .modelType(SessionsAddImagesParams.ModelType.of(\"kyc\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->addImages('11111111-2222-3333-4444-555555555555', [\n    'file' => File::fromPath('image.jpg'),\n    'model_type' => 'kyc',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.add_images(\n  \"11111111-2222-3333-4444-555555555555\",\n  file: Pathname(\"image.jpg\"),\n  model_type: \"kyc\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.AddImagesAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsAddImagesParams\n{\n    File = FileUpload.FromPath(\"image.jpg\"),\n    ModelType = \"kyc\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تمت إضافة الملف. يُرجع كل الملفات الإضافية لتلك النتيجة، بما في ذلك الملف الجديد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "extra_files"
                  ],
                  "properties": {
                    "extra_files": {
                      "type": "array",
                      "description": "روابط موقعة مسبقاً قصيرة الأجل لجميع الملفات الإضافية للنتيجة المحددة بواسطة `model_type`، الأقدم أولاً. كل رابط يكون `null` لمفتاح API ذي نطاق محدد بدون إذن `media: read`. اقرأ روابط جديدة من قرار الجلسة لاحقاً.",
                      "items": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true
                      }
                    }
                  }
                },
                "example": {
                  "extra_files": [
                    "https://media.example.com/session/11111111-2222-3333-4444-555555555555/kyc-extra-files/66666666-7777-8888-9999-000000000000.jpg?expires=1789383731&signature=abc123"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق. تصل أخطاء الحقول على شكل `{\"<field>\": [\"<message>\"]}`؛ وتصل أخطاء ملفات PDF المشفرة على شكل `{\"detail\": \"...\"}`.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing file": {
                    "summary": "لا يوجد جزء ملف في النموذج",
                    "value": {
                      "file": [
                        "No file was submitted."
                      ]
                    }
                  },
                  "Missing model_type": {
                    "summary": "تم إغفال model_type",
                    "value": {
                      "model_type": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid model_type": {
                    "summary": "حقل model_type ليس kyc أو poa",
                    "value": {
                      "model_type": [
                        "\"passport\" is not a valid choice."
                      ]
                    }
                  },
                  "File too large": {
                    "summary": "يتجاوز حجم الملف المرفوع 15 ميجابايت",
                    "value": {
                      "file": [
                        "File size should not exceed 15 MB"
                      ]
                    }
                  },
                  "Too large after compression": {
                    "summary": "لا يزال الحجم يتجاوز 2 ميغابايت بعد الضغط",
                    "value": {
                      "file": [
                        "File size is too big. Max allowed size is 2097152 bytes."
                      ]
                    }
                  },
                  "Encrypted PDF": {
                    "summary": "ملف PDF مشفر بدون file_password",
                    "value": {
                      "detail": "The PDF is encrypted. Please upload a decrypted PDF or a photo instead."
                    }
                  },
                  "Wrong PDF password": {
                    "summary": "file_password لا يفتح ملف PDF",
                    "value": {
                      "detail": "The PDF password is incorrect. Please provide the correct password."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without sessions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى sessions: write",
                    "value": {
                      "detail": "This API key has no write access to sessions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو أنها خارج حدود مفتاح ذي نطاق محدد؛ أو أنها جلسة KYB أو ليست في إحدى الحالات `Approved` أو `Declined` أو `In Review` أو `Kyc Expired`؛ أو ليس لديها نتيجة لنوع `model_type` المطلوب (يتم التحقق قبل التحقق من صحة الملف). يتم البحث عن الجلسة قبل التحقق من بيانات الاعتماد، لذلك فإن معرّف `sessionId` غير المعروف يُعيد `404` حتى بدون مفتاح صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف، أو أنها حُذفت",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside key limits": {
                    "summary": "الجلسة خارج سير العمل أو حدود المقبولة فقط الخاصة بمفتاح ذي نطاق محدد",
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "Not eligible": {
                    "summary": "لم تكتمل الجلسة بعد، أو معرّف جلسة KYB",
                    "value": {
                      "detail": "No Session matches the given query."
                    }
                  },
                  "No ID verification": {
                    "summary": "تم تعيين model_type=kyc في جلسة لا تتضمن التحقق من الهوية",
                    "value": {
                      "detail": "The session does not have KYC data."
                    }
                  },
                  "No Proof of Address": {
                    "summary": "تم تعيين model_type=poa في جلسة لا تتضمن إثبات العنوان",
                    "value": {
                      "detail": "The session does not have POA data."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 10 طلبات إضافة صور في الدقيقة لكل مفتاح API (تُحتسب الطلبات المرفوضة أيضاً). تنطبق أيضاً الميزانية المشتركة البالغة 300 طلب كتابة في الدقيقة. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Session add-images rate limit exceeded. You can make up to 10 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DocumentProcessingBusy"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/update-aml-status/": {
      "patch": {
        "summary": "تحديث حالة فحص AML",
        "description": "تعيين حالة فحص AML للجلسة ككل (حالة `status` لإدخال `aml_screenings[]` في قرار الجلسة)، على سبيل المثال `Approved` بعد قيام فريقك بحل كل مطابقة. يعمل مع معرّفات جلسات KYC و KYB؛ مرّر `node_id` (معامل استعلام أو حقل في نص الطلب) عندما تتضمن الجلسة أكثر من خطوة AML واحدة، وإلا فسيتم تحديث أحدث فحص AML. عندما تتغير الحالة فعلياً، يتم تسجيل إدخال نشاط `AML_STATUS_UPDATED` ويتم إرسال [webhook](https://docs.didit.me/ar/integration/webhooks) من نوع `data.updated`؛ يؤدي إرسال الحالة الحالية إلى إرجاع `200` دون تغيير أي شيء. لا تتم إعادة احتساب حالة الجلسة: استخدم `PATCH /v3/session/{sessionId}/update-status/` لقرار الجلسة و `PATCH /v3/session/{sessionId}/update-aml-hit-status/` لنتائج المطابقة الفردية. يتطلب مفتاح API محدد النطاق صلاحية `decisions: write`.",
        "operationId": "patch_v3_session_update_aml_status",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_aml_status",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق (`session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`). يقبل معرّفات جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB): يطابق الخادم المعرّف عبر كلا نوعي الجلسات. يجب أن يكون UUID صالح البنية؛ تؤدي القيمة غير صالحة البنية إلى عدم مطابقة المسار وإرجاع `404` بتنسيق HTML.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "معرّف عقدة مخطط سير العمل لفحص AML المراد تحديثه. مطلوب فقط عند تشغيل الجلسة لأكثر من خطوة AML واحدة. له الأولوية على `node_id` في جسم الطلب.",
            "schema": {
              "type": "string",
              "example": "feature_aml_1"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "Not Finished",
                      "Approved",
                      "Declined",
                      "In Review",
                      "Resub Requested"
                    ],
                    "description": "الحالة الجديدة لفحص AML.",
                    "example": "Approved"
                  },
                  "node_id": {
                    "type": "string",
                    "description": "معرّف عقدة مخطط سير العمل لفحص AML، كبديل لمعامل الاستعلام.",
                    "example": "feature_aml_1"
                  }
                }
              },
              "example": {
                "status": "Approved"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PATCH 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-aml-status/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\": \"Approved\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_aml_status(\n    \"11111111-2222-3333-4444-555555555555\",\n    status=\"Approved\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateAmlStatus(\"11111111-2222-3333-4444-555555555555\", {\n  status: \"Approved\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateAMLStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateAMLStatusParams{\n\tStatus: \"Approved\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateAmlStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateAmlStatus(\"11111111-2222-3333-4444-555555555555\", SessionsUpdateAmlStatusParams.builder()\n        .status(SessionsUpdateAmlStatusParams.Status.of(\"Approved\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateAmlStatus('11111111-2222-3333-4444-555555555555', [\n    'status' => 'Approved',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_aml_status(\n  \"11111111-2222-3333-4444-555555555555\",\n  status: \"Approved\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateAmlStatusAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdateAmlStatusParams\n{\n    Status = \"Approved\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تعيين حالة فحص AML (أو بقيت دون تغيير عندما كانت تحمل هذه القيمة بالفعل).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message",
                    "status",
                    "previous_status"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "دائماً `AML status updated successfully`."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Not Finished",
                        "Approved",
                        "Declined",
                        "In Review",
                        "Resub Requested"
                      ],
                      "description": "حالة فحص AML الآن."
                    },
                    "previous_status": {
                      "type": "string",
                      "enum": [
                        "Not Finished",
                        "Approved",
                        "Declined",
                        "In Review",
                        "Resub Requested"
                      ],
                      "description": "الحالة قبل الاستدعاء. تساوي `status` عندما لا يتغير شيء."
                    }
                  }
                },
                "example": {
                  "message": "AML status updated successfully",
                  "status": "Approved",
                  "previous_status": "In Review"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق: `status` مفقود أو ليس أحد القيم المسموح بها. يتم إجراء البحث عن فحص AML أولاً، لذا فإن الجلسة التي لا تحتوي على فحص AML تُرجع `404` حتى مع وجود نص طلب غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing status": {
                    "summary": "نص الطلب فارغ أو بدون حالة",
                    "value": {
                      "status": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid status": {
                    "summary": "status ليس ضمن التعداد",
                    "value": {
                      "status": [
                        "\"Cleared\" is not a valid choice."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو أنها خارج حدود مفتاح ذي نطاق محدد، أو ليس لديها فحص AML (لقيمة `node_id` المحددة). يتم البحث عن الجلسة قبل التحقق من بيانات الاعتماد، لذلك فإن معرّف `sessionId` غير المعروف يُعيد `404` حتى بدون مفتاح صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Unknown session": {
                    "summary": "لا توجد جلسة بهذا المعرّف، أو أنها حُذفت",
                    "value": {
                      "detail": "Not found."
                    }
                  },
                  "Outside key limits": {
                    "summary": "الجلسة خارج حدود مفتاح ذي نطاق محدد (تُعاد أيضاً للجلسة المحذوفة منذ لحظات)",
                    "value": {
                      "detail": "Session not found."
                    }
                  },
                  "No AML check": {
                    "summary": "لم تقم الجلسة بتشغيل خطوة AML على الإطلاق",
                    "value": {
                      "detail": "The session does not have an AML check."
                    }
                  },
                  "No AML check for node": {
                    "summary": "حقل node_id لا يتطابق مع أي فحص AML للجلسة",
                    "value": {
                      "detail": "The session does not have an AML check for node 'feature_aml_2'."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/status/": {
      "get": {
        "summary": "الحصول على حالة الخدمة (عام، دون مصادقة)",
        "description": "يعرض حالة كل خدمة من خدمات Didit (`operational` أو `degraded` أو `down`)، والحالة العامة (أسوأ حالة بينها)، والحوادث الجارية أو التي تم حلها خلال آخر 7 أيام. يمكنك استخدامه لتشغيل أداة عرض الحالة أو للتحقق من حالة تشغيل Didit من خلال تكاملك.\n\nعام: لا ترسل أي رأس مصادقة. لا تحتوي الاستجابة على بيانات المؤسسة وتكون متطابقة لجميع المستدعين. يتم تخزين الاستجابات مؤقتاً لمدة 30 ثانية، لذا لا تجرِ استقصاءً أكثر من مرة واحدة كل 30 ثانية.",
        "operationId": "get_v3_status",
        "tags": [
          "Status"
        ],
        "security": [
          {}
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "حالة الخدمة الحالية.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceStatusFeed"
                },
                "examples": {
                  "One service degraded": {
                    "summary": "حادثة جارية وواحدة تم حلها هذا الأسبوع",
                    "value": {
                      "status": "degraded",
                      "updated_at": "2026-10-13T09:41:07.512345Z",
                      "services": [
                        {
                          "key": "service_id_verification",
                          "name": "ID verification",
                          "status": "operational"
                        },
                        {
                          "key": "service_liveness_face_match",
                          "name": "Liveness and face match",
                          "status": "operational"
                        },
                        {
                          "key": "service_aml_screening",
                          "name": "AML screening",
                          "status": "operational"
                        },
                        {
                          "key": "service_kyb_registries",
                          "name": "KYB registries",
                          "status": "operational"
                        },
                        {
                          "key": "service_database_validation",
                          "name": "Database validation",
                          "status": "degraded"
                        },
                        {
                          "key": "service_phone_delivery",
                          "name": "Phone verification delivery",
                          "status": "operational"
                        },
                        {
                          "key": "service_email_delivery",
                          "name": "Email verification delivery",
                          "status": "operational"
                        },
                        {
                          "key": "service_transaction_monitoring",
                          "name": "Transaction monitoring",
                          "status": "operational"
                        }
                      ],
                      "incidents": [
                        {
                          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                          "service": "service_database_validation",
                          "service_name": "Database validation",
                          "state": "degraded",
                          "status": "ongoing",
                          "title": "Database validation is degraded in Brazil.",
                          "body": "Checks against Brazil (CPF) may be slow or fail since 08:55 UTC.",
                          "affected": "Brazil (CPF)",
                          "country_name": "Brazil",
                          "started_at": "2026-10-13T08:55:00Z",
                          "resolved_at": null,
                          "duration_minutes": null
                        },
                        {
                          "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                          "service": "service_aml_screening",
                          "service_name": "AML screening",
                          "state": "down",
                          "status": "resolved",
                          "title": "AML screening is back to normal.",
                          "body": "Recovered at 14:32 UTC after 17 minutes.",
                          "affected": "",
                          "country_name": "",
                          "started_at": "2026-10-11T14:15:00Z",
                          "resolved_at": "2026-10-11T14:32:00Z",
                          "duration_minutes": 17
                        }
                      ]
                    }
                  },
                  "All operational": {
                    "summary": "لا توجد حوادث في آخر 7 أيام",
                    "value": {
                      "status": "operational",
                      "updated_at": "2026-10-13T09:41:07.512345Z",
                      "services": [
                        {
                          "key": "service_id_verification",
                          "name": "ID verification",
                          "status": "operational"
                        },
                        {
                          "key": "service_liveness_face_match",
                          "name": "Liveness and face match",
                          "status": "operational"
                        },
                        {
                          "key": "service_aml_screening",
                          "name": "AML screening",
                          "status": "operational"
                        },
                        {
                          "key": "service_kyb_registries",
                          "name": "KYB registries",
                          "status": "operational"
                        },
                        {
                          "key": "service_database_validation",
                          "name": "Database validation",
                          "status": "operational"
                        },
                        {
                          "key": "service_phone_delivery",
                          "name": "Phone verification delivery",
                          "status": "operational"
                        },
                        {
                          "key": "service_email_delivery",
                          "name": "Email verification delivery",
                          "status": "operational"
                        },
                        {
                          "key": "service_transaction_monitoring",
                          "name": "Transaction monitoring",
                          "status": "operational"
                        }
                      ],
                      "incidents": []
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "أكثر من 600 طلب GET في دقيقة واحدة من نفس عنوان IP (أو نفس مفتاح API، إذا قمت بإرسال مفتاح). التزم بـ `Retry-After` قبل إعادة المحاولة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "detail"
                  ],
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute."
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -fsS https://verification.didit.me/v3/status/"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import requests\n\nresp = requests.get('https://verification.didit.me/v3/status/', timeout=5)\nresp.raise_for_status()\nfeed = resp.json()\nprint(feed['status'])\nfor service in feed['services']:\n    if service['status'] != 'operational':\n        print(service['key'], service['status'])"
          },
          {
            "lang": "javascript",
            "label": "JavaScript",
            "source": "const feed = await fetch('https://verification.didit.me/v3/status/').then((r) => r.json());\nconsole.log(feed.status);\nconst affected = feed.services.filter((s) => s.status !== 'operational');\nconsole.log(affected.map((s) => `${s.key}: ${s.status}`));"
          }
        ],
        "x-didit-sdk": {
          "resource": "system",
          "method": "retrieve_status",
          "auth": "public",
          "server": false
        }
      }
    },
    "/v3/organization/bank-verification-pricing/": {
      "get": {
        "summary": "الحصول على أسعار التحقق البنكي (عام، بدون مصادقة)",
        "description": "يعرض السعر المعلن لكل طريقة من طرق التحقق المصرفي في كل دولة: تسجيل الدخول المصرفي مع الإضافات الخاصة بالرصيد والمعاملات، وفحص الحساب. تظهر الطريقة التي لا تتيحها الدولة حالياً على أنها غير متوفرة، وبدون سعر. يمكنك استخدامه لتقدير تكلفة خطوة مصرفية قبل بناء سير العمل، أو لعرض الأسعار المصرفية في منتجك الخاص.\n\nعام: لا ترسل أي رأس مصادقة. لا تحتوي الاستجابة على أي بيانات للمؤسسة وتكون متطابقة لجميع المستدعين. يتم تخزينها مؤقتاً بشكل عام لمدة ساعة وتحمل `ETag`، لذا أرسل `If-None-Match` لتلقي `304 Not Modified` عندما لا يطرأ أي تغيير.\n\nتكون الطريقة `available` فقط في الدول التي يقدمها Didit فيها في بيئة الإنتاج حالياً، وتكون قيمة `price_usd` الخاصة بها `null` في أي مكان آخر، وبالتالي لا يعرض الموجز مطلقاً سعراً لخدمة لا يمكنك شراؤها. تشمل الحالة `available: false` أي دولة لا يتوفر لها سعر معتمد، أو أي طريقة لا تدعمها الدولة، أو أي مسار لم يتم تفعيله بعد.\n\nهذه أسعار معلنة قبل تطبيق خصم خطتك. يُطبق خصم خطتك على السعر المصرفي بأكمله، ويحل السعر التفاوضي أو التعاقدي محل السعر المعلن لمؤسستك.",
        "operationId": "get_v3_bank_verification_pricing",
        "tags": [
          "Pricing"
        ],
        "security": [
          {}
        ],
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -fsS https://verification.didit.me/v3/organization/bank-verification-pricing/"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# This call needs no API key.\nclient = Didit()\n\nresult = client.pricing.bank_verification()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// This call needs no API key.\nconst didit = new Didit();\n\nconst result = await didit.pricing.bankVerification();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// This call needs no API key.\nclient := didit.NewClient()\n\nresult, err := client.Pricing.BankVerification(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// This call needs no API key.\nDidit client = new Didit();\n\nvar result = client.pricing().bankVerification();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// This call needs no API key.\n$didit = new DiditClient();\n\n$result = $didit->pricing->bankVerification();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# This call needs no API key.\ndidit = Didit::Client.new\n\nresult = didit.pricing.bank_verification\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// This call needs no API key.\nusing var client = new DiditClient();\n\nvar result = await client.Pricing.BankVerificationAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-sdk": {
          "resource": "pricing",
          "method": "bank_verification",
          "auth": "none",
          "server": true
        },
        "responses": {
          "200": {
            "description": "أسعار قائمة التحقق البنكي حسب الدولة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankVerificationPricing"
                },
                "examples": {
                  "Two countries": {
                    "summary": "دولة واحدة تدعم كلتا الطريقتين، وأخرى لا تدعم أياً منهما",
                    "value": {
                      "currency": "USD",
                      "statement_upload": {
                        "price_usd": "0.0000",
                        "included_after_charged_bank_attempt": true,
                        "standalone_available": false
                      },
                      "own_provider_fee_usd": "0.0200",
                      "countries": {
                        "GBR": {
                          "name": "United Kingdom",
                          "methods": {
                            "open_banking": {
                              "available": true,
                              "market": "UK and EEA",
                              "price_usd": "0.7900",
                              "add_ons": {
                                "balance": "0.3500",
                                "transactions": "1.3000"
                              }
                            },
                            "account_lookup": {
                              "available": true,
                              "price_usd": "0.4000"
                            }
                          }
                        },
                        "CAN": {
                          "name": "Canada",
                          "methods": {
                            "open_banking": {
                              "available": false,
                              "market": null,
                              "price_usd": null,
                              "add_ons": {}
                            },
                            "account_lookup": {
                              "available": false,
                              "price_usd": null
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "لم يتغير: لا يزال `ETag` الذي أرسلته في `If-None-Match` متطابقاً. لا يوجد محتوى."
          }
        }
      }
    },
    "/v3/session/{sessionId}/simulate/": {
      "post": {
        "summary": "محاكاة حالة جلسة في البيئة التجريبية",
        "description": "فرض حالة نهائية على جلسة في البيئة التجريبية بأثر رجعي، من واجهتك الخلفية، دون تشغيل سير العمل. لتطبيقات البيئة التجريبية فقط: تُرجع الجلسة في بيئة الإنتاج الرمز `404`. يعمل لجلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB).\n\nقم بتعيين `new_status`، أو اترك `scenario` أو `risk` يوفره. يضيف `risk` (أو أول خطر تحمله القيم السحرية للسيناريو) ذلك التحذير إلى الجلسة. يتم تسجيل التغيير في نشاط الجلسة.\n\nتُرسل `send_webhooks` (القيمة الافتراضية `true`) إشعارات webhook نفسها تماماً التي يرسلها تغيير الحالة الفعلي. عند التعيين على `false`، لا تزال الحالة تتغير وتستمر لوحة التحكم في التحديث مباشرة، ولكن لا يتم تسجيل أو إرسال أي webhook، ولا تعيد استعادة إشعارات webhook الفائتة إرسال ذلك القرار أبداً، ويرسل التغيير التالي للحالة إشعارات webhook كالمعتاد. تعكس الاستجابة القيمة المطبقة.\n\nيتطلب الامتياز `write:sessions`؛ يحتاج مفتاح API مقيّد النطاق إلى وصول للكتابة إلى الجلسات. يُرجع `session_id` غير المعروف الرمز `404` وتُرجع جلسة تطبيق آخر الرمز `403`، وكلاهما قبل قراءة نص الطلب؛ تُرجع الجلسة في بيئة الإنتاج الرمز `404` فقط بعد التحقق من صحة نص الطلب. للمحاكاة من سير العمل المستضاف باستخدام token الخاص بالجلسة نفسها، استخدم `POST /v3/session/{sessionId}/sandbox/simulate/`. راجع [البيئة التجريبية وبيانات الاختبار](/ar/integration/sandbox-testing) للاطلاع على كتالوج السيناريوهات.",
        "operationId": "post_v3_session_simulate",
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق في البيئة التجريبية. يقبل معرّفات جلسات المستخدمين (KYC) والشركات (KYB).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxSimulateRequest"
              },
              "examples": {
                "Scenario Without Webhooks": {
                  "summary": "الرفض عبر سيناريو دون إرسال webhooks",
                  "value": {
                    "scenario": "decline_aml_hit",
                    "send_webhooks": false
                  }
                },
                "Status Only": {
                  "summary": "الموافقة وإرسال أحداث webhook المعتادة",
                  "value": {
                    "new_status": "Approved"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تغيرت الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxSimulateResponse"
                },
                "examples": {
                  "Simulated": {
                    "summary": "مرفوضة عبر سيناريو، لم يتم إرسال webhooks",
                    "value": {
                      "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                      "previous_status": "In Progress",
                      "status": "Declined",
                      "scenario": "decline_aml_hit",
                      "risk": "POSSIBLE_MATCH_FOUND",
                      "send_webhooks": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق: سيناريو أو مخاطرة غير معروفة، أو عدم وجود `new_status` عندما لا يوفره أي من `scenario` أو `risk`، أو حالة لا يقوم هذا الـ endpoint بتعيينها، أو أن الجلسة تحمل بالفعل الحالة المطلوبة (مصفوفة JSON مجردة).",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown Scenario": {
                    "summary": "السيناريو ليس موجوداً في الكتالوج",
                    "value": {
                      "scenario": [
                        "Unknown sandbox scenario: 'not-a-scenario'."
                      ]
                    }
                  },
                  "Unknown Risk": {
                    "summary": "عنصر risk ليس موجوداً في الكتالوج",
                    "value": {
                      "risk": [
                        "Unknown sandbox risk case: 'NOT_A_RISK'."
                      ]
                    }
                  },
                  "Missing new_status": {
                    "summary": "لا توجد new_status أو scenario أو risk",
                    "value": {
                      "new_status": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid new_status": {
                    "summary": "حالة لا تضبطها المحاكاة",
                    "value": {
                      "new_status": [
                        "\"Resubmitted\" is not a valid choice."
                      ]
                    }
                  },
                  "Same Status": {
                    "summary": "الجلسة لها هذه الحالة بالفعل",
                    "value": [
                      "The new status is the same as the current status."
                    ]
                  }
                }
              }
            }
          },
          "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 sessions."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة بقيمة `session_id` هذه، أو أنها جلسة إنتاج مباشرة (ليست في البيئة التجريبية).",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "summary": "جلسة غير معروفة أو في بيئة الإنتاج",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST \\\n  https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/simulate/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scenario\": \"decline_aml_hit\", \"send_webhooks\": false}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.simulate(\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    scenario=\"decline_aml_hit\",\n    send_webhooks=False,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.simulate(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", {\n  scenario: \"decline_aml_hit\",\n  send_webhooks: false,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Simulate(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", didit.SandboxSimulateRequest{\n\tScenario:     didit.String(\"decline_aml_hit\"),\n\tSendWebhooks: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SandboxSimulateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().simulate(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", SandboxSimulateRequest.builder()\n        .scenario(\"decline_aml_hit\")\n        .sendWebhooks(false)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->simulate('3fa85f64-5717-4562-b3fc-2c963f66afa6', [\n    'scenario' => 'decline_aml_hit',\n    'send_webhooks' => false,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.simulate(\n  \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  scenario: \"decline_aml_hit\",\n  send_webhooks: false\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.SimulateAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", new SandboxSimulateRequest\n{\n    Scenario = \"decline_aml_hit\",\n    SendWebhooks = false,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "simulate",
          "auth": "api_key",
          "server": true
        }
      }
    },
    "/v3/session/{sessionId}/sandbox/simulate/": {
      "post": {
        "summary": "محاكاة حالة جلسة في البيئة التجريبية من العميل",
        "description": "المحاكاة نفسها مثل `POST /v3/session/{sessionId}/simulate/`، مع المصادقة باستخدام `Session-Token` الخاص بالجلسة (يُرجع في `session_token` بواسطة [Create Session](/ar/sessions-api/create-session)) بدلاً من مفتاح API الخاص بك، حتى تتمكن أداة اختبار أو سير العمل المستضاف من استدعائه من جانب العميل. يعمل نص الطلب والاستجابة و`send_webhooks` تماماً كما هو الحال في ذلك endpoint.\n\nيؤدي استخدام `Session-Token` لتطبيق في بيئة الإنتاج (غير التجريبية)، أو رمز لا يطابق `sessionId` في المسار، إلى إرجاع `404`. راجع [Sandbox & Test Data](/ar/integration/sandbox-testing).",
        "operationId": "post_v3_session_sandbox_simulate",
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "SessionTokenAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق في البيئة التجريبية. يجب أن يتطابق مع الجلسة المرمزة في Session-Token المستخدم للمصادقة.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxSimulateRequest"
              },
              "examples": {
                "Scenario Without Webhooks": {
                  "summary": "الرفض عبر سيناريو دون إرسال webhooks",
                  "value": {
                    "scenario": "decline_aml_hit",
                    "send_webhooks": false
                  }
                },
                "Status Only": {
                  "summary": "الموافقة وإرسال أحداث webhook المعتادة",
                  "value": {
                    "new_status": "Approved"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تغيرت الحالة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxSimulateResponse"
                },
                "examples": {
                  "Simulated": {
                    "summary": "مرفوضة عبر سيناريو، لم يتم إرسال webhooks",
                    "value": {
                      "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                      "previous_status": "In Progress",
                      "status": "Declined",
                      "scenario": "decline_aml_hit",
                      "risk": "POSSIBLE_MATCH_FOUND",
                      "send_webhooks": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق: سيناريو أو مخاطرة غير معروفة، أو عدم وجود `new_status` عندما لا يوفره أي من `scenario` أو `risk`، أو حالة لا يقوم هذا الـ endpoint بتعيينها، أو أن الجلسة تحمل بالفعل الحالة المطلوبة (مصفوفة JSON مجردة).",
            "content": {
              "application/json": {
                "examples": {
                  "Unknown Scenario": {
                    "summary": "السيناريو ليس موجوداً في الكتالوج",
                    "value": {
                      "scenario": [
                        "Unknown sandbox scenario: 'not-a-scenario'."
                      ]
                    }
                  },
                  "Unknown Risk": {
                    "summary": "عنصر risk ليس موجوداً في الكتالوج",
                    "value": {
                      "risk": [
                        "Unknown sandbox risk case: 'NOT_A_RISK'."
                      ]
                    }
                  },
                  "Missing new_status": {
                    "summary": "لا توجد new_status أو scenario أو risk",
                    "value": {
                      "new_status": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid new_status": {
                    "summary": "حالة لا تضبطها المحاكاة",
                    "value": {
                      "new_status": [
                        "\"Resubmitted\" is not a valid choice."
                      ]
                    }
                  },
                  "Same Status": {
                    "summary": "الجلسة لها هذه الحالة بالفعل",
                    "value": [
                      "The new status is the same as the current status."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "رأس `Session-Token` مفقود أو غير صالح.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Session Token": {
                    "summary": "Session-Token مفقود أو غير صالح",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "ينتمي `Session-Token` إلى تطبيق في بيئة الإنتاج (غير تجريبية)، أو لا يتطابق مع `sessionId` في المسار.",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "summary": "جلسة مباشرة، أو عدم تطابق بين session_id / token",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST \\\n  https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/sandbox/simulate/ \\\n  -H 'Session-Token: YOUR_SESSION_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"new_status\": \"Approved\", \"send_webhooks\": false}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import requests\n\nresponse = requests.post(\n    \"https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/sandbox/simulate/\",\n    headers={\"Session-Token\": \"YOUR_SESSION_TOKEN\"},\n    json={\"new_status\": \"Approved\", \"send_webhooks\": False},\n)\nresponse.raise_for_status()\nprint(response.json())"
          }
        ],
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "simulate_sandbox",
          "auth": "device_token",
          "server": false
        }
      }
    },
    "/v3/session/{sessionId}/features/overrides/": {
      "get": {
        "summary": "سرد عمليات تجاوز الفحص للجلسة",
        "description": "كل تجاوز لحالة ميزة (خطوة) فردية في جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB)، الأحدث أولاً وبدون تقسيم صفحات: التجاوزات المطبقة، وتلك التي تنتظر إنهاء الشخص لسير العمل (`pending_until_flow_finishes`)، والملغاة، وكل منها يوضح من طلبها، والسبب، وما إذا كانت قد طُبقت بينما كان الشخص لا يزال في سير العمل (`forced`).\n\nيوضح لك `person_in_flow` ما إذا كان التجاوز الجديد باستخدام `defer_until_flow_finishes: true` سينتظر. ويوضح `flow_finished_at` آخر مرة أنهى فيها الشخص سير العمل؛ وتكون قيمته `null` بينما لا يزال فيه (بما في ذلك إعادة الإرسال) وعندما أُغلقت الجلسة قبل أن ينتهي.\n\nيتطلب صلاحية `read:sessions`؛ ويحتاج مفتاح API محدود النطاق إلى وصول للقراءة إلى القرارات.",
        "operationId": "get_v3_session_feature_overrides",
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق. يقبل معرّفات جلسات المستخدمين (KYC) والشركات (KYB).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "تجاوزات الفحص الخاصة بالجلسة، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "session_id",
                    "person_in_flow",
                    "flow_finished_at",
                    "overrides"
                  ],
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    },
                    "person_in_flow": {
                      "type": "boolean",
                      "description": "ما إذا كان الشخص لا يزال في المسار، بحيث ينتظر التجاوز الجديد مع `defer_until_flow_finishes: true`.",
                      "example": true
                    },
                    "flow_finished_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "متى أنهى الشخص التدفق آخر مرة. وتكون `null` طالما أنه لا يزال بداخله (بما في ذلك إعادة التقديم) وعندما أُغلقت الجلسة قبل أن يُنهيه (متروكة أو منتهية الصلاحية أو تم اتخاذ قرار في منتصف التدفق).",
                      "example": null
                    },
                    "overrides": {
                      "type": "array",
                      "description": "كل تجاوز للجلسة، الأحدث أولاً.",
                      "items": {
                        "$ref": "#/components/schemas/FeatureStatusOverride"
                      }
                    }
                  }
                },
                "examples": {
                  "Overrides": {
                    "summary": "تجاوز واحد قيد الانتظار، وتجاوز واحد مُطبّق",
                    "value": {
                      "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                      "person_in_flow": true,
                      "flow_finished_at": null,
                      "overrides": [
                        {
                          "id": "9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3",
                          "node_id": "feature_liveness_1",
                          "feature_type": "",
                          "feature_model": "Face",
                          "previous_status": "Declined",
                          "new_status": "Approved",
                          "state": "pending_until_flow_finishes",
                          "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": null,
                          "cancel_reason": null
                        },
                        {
                          "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                          "node_id": "feature_ocr_1",
                          "feature_type": "",
                          "feature_model": "KYC",
                          "previous_status": "In Review",
                          "new_status": "Approved",
                          "state": "applied",
                          "forced": true,
                          "reason": "Document manually verified by compliance.",
                          "requested_by": {
                            "email": "reviewer@example.com",
                            "name": "Alex Reviewer",
                            "type": "CONSOLE_USER"
                          },
                          "requested_at": "2026-10-13T09:15:00Z",
                          "applied_at": "2026-10-13T09:15:00Z",
                          "cancelled_at": null,
                          "cancel_reason": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق.",
            "content": {
              "application/json": {
                "examples": {
                  "Expired API Key": {
                    "summary": "مفتاح API محدد النطاق تجاوز تاريخ انتهاء صلاحيته",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "بيانات اعتماد مفقودة، أو جهة مستدعية تفتقر إلى امتياز `read: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": "المستدعي يفتقر إلى read: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 read access to decisions."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "لا توجد جلسة KYC أو KYB بمعرّف `session_id` هذا.",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "summary": "session_id غير معروف",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET \\\n  https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/features/overrides/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.list_feature_overrides(\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.listFeatureOverrides(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListFeatureOverrides(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().listFeatureOverrides(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->listFeatureOverrides('3fa85f64-5717-4562-b3fc-2c963f66afa6');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.list_feature_overrides(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ListFeatureOverridesAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "list_feature_overrides",
          "auth": "api_key",
          "server": true
        }
      }
    },
    "/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/": {
      "post": {
        "summary": "إلغاء تجاوز التحقق الذي ينتظر اكتمال سير العمل",
        "description": "إلغاء تجاوز حالة ميزة (خطوة) لا تزال `pending_until_flow_finishes`، حتى لا يتم تطبيقه أبداً. يحتفظ التحقق بحالته، ويتم تسجيل الإلغاء في نشاط الجلسة كـ `FEATURE_OVERRIDE_CANCELLED`، ولا يتم إرسال أي webhook. تكون الاستجابة هي التجاوز مع `state: cancelled` و `cancel_reason: cancelled_by_reviewer`.\n\nأي تجاوز تم تطبيقه بالفعل أو تم إلغاؤه يعيد `409` مع الرمز `feature_override_not_pending`. يمكنك العثور على معرّفات التجاوز عبر `GET /v3/session/{sessionId}/features/overrides/` أو في كائن `override` المرتجع من تحديث حالة الميزة.\n\nيتطلب امتياز `write:sessions`؛ ويحتاج مفتاح API المحدد النطاق إلى إذن كتابة للقرارات.",
        "operationId": "post_v3_session_feature_override_cancel",
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "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"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST \\\n  https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/features/overrides/9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3/cancel/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.cancel_feature_override(\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.cancelFeatureOverride(\n  \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\",\n);\nconsole.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;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().cancelFeatureOverride(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->cancelFeatureOverride('3fa85f64-5717-4562-b3fc-2c963f66afa6', '9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.cancel_feature_override(\n  \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.CancelFeatureOverrideAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "cancel_feature_override",
          "auth": "api_key",
          "server": true
        }
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/add/": {
      "post": {
        "summary": "إضافة وسم إلى شبكة",
        "description": "وضع إحدى علامات تطبيقك على الشبكة. يُرجع تفاصيل الشبكة، التي تسرد خاصية `tags` فيها علامات تطبيقك على الشبكة، مع `201` عند إضافة العلامة و`200` إذا كانت موجودة بالفعل على الشبكة. تُرجع العلامة التي تنتمي إلى تطبيق آخر، أو غير الموجودة، الخطأ 404 `Tag not found.`. يتطلب مفتاح API بصلاحيات وصول كاملة، أو `write:networks` لعضو في لوحة التحكم.",
        "operationId": "add_network_tag",
        "tags": [
          "Networks"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "description": "معرّف UUID للشبكة."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NetworkTagRequest"
              },
              "example": {
                "tag_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/3fa85f64-5717-4562-b3fc-2c963f66afa6/tags/add/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tag_uuid\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.add_tag(\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    tag_uuid=\"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.addTag(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", {\n  tag_uuid: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.AddTag(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", didit.NetworkTagRequest{\n\tTagUUID: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.NetworkTagRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().addTag(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", NetworkTagRequest.builder()\n        .tagUuid(\"7c9e6679-7425-40de-944b-e07fc1f90ae7\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->networks->addTag('3fa85f64-5717-4562-b3fc-2c963f66afa6', [\n    'tag_uuid' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.add_tag(\n  \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  tag_uuid: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.AddTagAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", new NetworkTagRequest\n{\n    TagUuid = \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تمت إضافة الوسم. يُرجع تفاصيل الشبكة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkDetailResponse"
                },
                "example": {
                  "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "network_id": "N-0042",
                  "name": null,
                  "status": "in_review",
                  "risk": {
                    "score": 82,
                    "band": "high",
                    "bar": 0.82
                  },
                  "pattern_types": [
                    "exact_same_device",
                    "same_email"
                  ],
                  "signal_types": [
                    "device",
                    "email"
                  ],
                  "member_counts": {
                    "total": 3,
                    "users": 3,
                    "businesses": 0,
                    "transaction_parties": 0
                  },
                  "member_status": {
                    "approved": 1,
                    "declined": 1,
                    "in_review": 0,
                    "not_completed": 1
                  },
                  "signal_coverage": {
                    "device": {
                      "signals": 1,
                      "subjects": 3,
                      "coverage": 1.0
                    },
                    "email": {
                      "signals": 1,
                      "subjects": 2,
                      "coverage": 0.6667
                    }
                  },
                  "first_activity_at": "2026-10-01T09:12:44Z",
                  "last_activity_at": "2026-10-12T16:03:10Z",
                  "stats": {
                    "members": {
                      "total": 3,
                      "users": 3,
                      "businesses": 0,
                      "transaction_parties": 0
                    },
                    "member_status": {
                      "approved": 1,
                      "declined": 1,
                      "in_review": 0,
                      "not_completed": 1
                    },
                    "signals": {
                      "total": 2,
                      "by_type": {
                        "device": {
                          "signals": 1,
                          "subjects": 3,
                          "coverage": 1.0
                        },
                        "email": {
                          "signals": 1,
                          "subjects": 2,
                          "coverage": 0.6667
                        }
                      }
                    }
                  },
                  "fraud_tags": [],
                  "risk_signals": {
                    "residential_proxy_reuse": {
                      "detected": false,
                      "signal_count": 0,
                      "max_subject_count": 0
                    },
                    "email_intelligence": {
                      "enriched_signal_count": 1,
                      "high_risk_count": 0,
                      "social_profile_count": 0
                    },
                    "phone_intelligence": {
                      "enriched_signal_count": 0,
                      "high_risk_count": 0
                    }
                  },
                  "reviewed_at": "2026-10-12T16:30:00Z",
                  "reviewed_by": "reviewer@example.com",
                  "review_reason": "Shared device across three new accounts.",
                  "notes_count": 0,
                  "sharing_mode": "global",
                  "cross_org_available": true,
                  "cross_org_unavailable_reason": null,
                  "tags": [
                    {
                      "uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                      "name": "SUSPICIOUS",
                      "color": "#6366F1",
                      "source": "custom",
                      "added_by": null,
                      "added_at": "2026-10-13T08:15:00Z"
                    }
                  ],
                  "outcomes": {
                    "approved": 1,
                    "declined": 1,
                    "in_review": 0,
                    "total": 3
                  },
                  "patterns": [
                    {
                      "type": "background",
                      "score": 0.8125,
                      "members": 3,
                      "reason": null,
                      "computed_at": "2026-10-13T08:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "200": {
            "description": "الوسم موجود بالفعل على الشبكة وتُرك كما هو. يُرجع تفاصيل الشبكة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkDetailResponse"
                },
                "example": {
                  "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "network_id": "N-0042",
                  "name": null,
                  "status": "in_review",
                  "risk": {
                    "score": 82,
                    "band": "high",
                    "bar": 0.82
                  },
                  "pattern_types": [
                    "exact_same_device",
                    "same_email"
                  ],
                  "signal_types": [
                    "device",
                    "email"
                  ],
                  "member_counts": {
                    "total": 3,
                    "users": 3,
                    "businesses": 0,
                    "transaction_parties": 0
                  },
                  "member_status": {
                    "approved": 1,
                    "declined": 1,
                    "in_review": 0,
                    "not_completed": 1
                  },
                  "signal_coverage": {
                    "device": {
                      "signals": 1,
                      "subjects": 3,
                      "coverage": 1.0
                    },
                    "email": {
                      "signals": 1,
                      "subjects": 2,
                      "coverage": 0.6667
                    }
                  },
                  "first_activity_at": "2026-10-01T09:12:44Z",
                  "last_activity_at": "2026-10-12T16:03:10Z",
                  "stats": {
                    "members": {
                      "total": 3,
                      "users": 3,
                      "businesses": 0,
                      "transaction_parties": 0
                    },
                    "member_status": {
                      "approved": 1,
                      "declined": 1,
                      "in_review": 0,
                      "not_completed": 1
                    },
                    "signals": {
                      "total": 2,
                      "by_type": {
                        "device": {
                          "signals": 1,
                          "subjects": 3,
                          "coverage": 1.0
                        },
                        "email": {
                          "signals": 1,
                          "subjects": 2,
                          "coverage": 0.6667
                        }
                      }
                    }
                  },
                  "fraud_tags": [],
                  "risk_signals": {
                    "residential_proxy_reuse": {
                      "detected": false,
                      "signal_count": 0,
                      "max_subject_count": 0
                    },
                    "email_intelligence": {
                      "enriched_signal_count": 1,
                      "high_risk_count": 0,
                      "social_profile_count": 0
                    },
                    "phone_intelligence": {
                      "enriched_signal_count": 0,
                      "high_risk_count": 0
                    }
                  },
                  "reviewed_at": "2026-10-12T16:30:00Z",
                  "reviewed_by": "reviewer@example.com",
                  "review_reason": "Shared device across three new accounts.",
                  "notes_count": 0,
                  "sharing_mode": "global",
                  "cross_org_available": true,
                  "cross_org_unavailable_reason": null,
                  "tags": [
                    {
                      "uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                      "name": "SUSPICIOUS",
                      "color": "#6366F1",
                      "source": "custom",
                      "added_by": null,
                      "added_at": "2026-10-13T08:15:00Z"
                    }
                  ],
                  "outcomes": {
                    "approved": 1,
                    "declined": 1,
                    "in_review": 0,
                    "total": 3
                  },
                  "patterns": [
                    {
                      "type": "background",
                      "score": 0.8125,
                      "members": 3,
                      "reason": null,
                      "computed_at": "2026-10-13T08:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح: `tag_uuid` مفقود أو ليس UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag_uuid": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "Missing tag_uuid": {
                    "summary": "tag_uuid مفقود",
                    "value": {
                      "tag_uuid": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid tag_uuid": {
                    "summary": "tag_uuid غير صالح",
                    "value": {
                      "tag_uuid": [
                        "Must be a valid UUID."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "بيانات اعتماد مفقودة أو غير صالحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "بيانات اعتماد مفقودة أو غير صالحة",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "ينتمي مفتاح API إلى تطبيق آخر، أو أنه مفتاح ذو وصول مقيد: تتطلب endpoint الخاصة بـ Networks مفتاحاً كامل الوصول. يتطلب token عضو لوحة التحكم إذن `write:networks`. يتم إرجاعه أيضاً مع `code: networks_not_entitled` عندما لا تكون Networks مفعّلة للمؤسسة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Networks not enabled": {
                    "summary": "الشبكات غير مفعّلة",
                    "value": {
                      "detail": "Networks is disabled for this organization. Contact Didit support if you believe this is an error.",
                      "code": "networks_not_entitled"
                    }
                  },
                  "Restricted API key": {
                    "summary": "مفتاح API مقيد",
                    "value": {
                      "detail": "This API key has no access to this endpoint."
                    }
                  },
                  "No permission": {
                    "summary": "لا يوجد إذن",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "غير موجود.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Network not found": {
                    "summary": "لم يتم العثور على الشبكة",
                    "value": {
                      "detail": "Network not found."
                    }
                  },
                  "Tag not found": {
                    "summary": "العلامة غير موجودة",
                    "value": {
                      "detail": "Tag not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-didit-sdk": {
          "resource": "networks",
          "method": "add_tag",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        }
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/remove/": {
      "post": {
        "summary": "إزالة وسم من شبكة",
        "description": "إزالة أحد وسوم تطبيقك من الشبكة. يُرجع تفاصيل الشبكة. يعرض خطأ 404 عندما لا يكون الوسم موجوداً على الشبكة، أو لا ينتمي إلى تطبيقك. يتطلب مفتاح API كامل الصلاحيات، أو إذن `write:networks` لعضو لوحة التحكم.",
        "operationId": "remove_network_tag",
        "tags": [
          "Networks"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          },
          {
            "name": "network_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "description": "معرّف UUID للشبكة."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NetworkTagRequest"
              },
              "example": {
                "tag_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/3fa85f64-5717-4562-b3fc-2c963f66afa6/tags/remove/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tag_uuid\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.remove_tag(\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    tag_uuid=\"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.removeTag(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", {\n  tag_uuid: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RemoveTag(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", didit.NetworkTagRequest{\n\tTagUUID: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.NetworkTagRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().removeTag(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", NetworkTagRequest.builder()\n        .tagUuid(\"7c9e6679-7425-40de-944b-e07fc1f90ae7\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->networks->removeTag('3fa85f64-5717-4562-b3fc-2c963f66afa6', [\n    'tag_uuid' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.remove_tag(\n  \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  tag_uuid: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RemoveTagAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", new NetworkTagRequest\n{\n    TagUuid = \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تمت إزالة الوسم من الشبكة. يُرجع تفاصيل الشبكة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkDetailResponse"
                },
                "example": {
                  "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "network_id": "N-0042",
                  "name": null,
                  "status": "in_review",
                  "risk": {
                    "score": 82,
                    "band": "high",
                    "bar": 0.82
                  },
                  "pattern_types": [
                    "exact_same_device",
                    "same_email"
                  ],
                  "signal_types": [
                    "device",
                    "email"
                  ],
                  "member_counts": {
                    "total": 3,
                    "users": 3,
                    "businesses": 0,
                    "transaction_parties": 0
                  },
                  "member_status": {
                    "approved": 1,
                    "declined": 1,
                    "in_review": 0,
                    "not_completed": 1
                  },
                  "signal_coverage": {
                    "device": {
                      "signals": 1,
                      "subjects": 3,
                      "coverage": 1.0
                    },
                    "email": {
                      "signals": 1,
                      "subjects": 2,
                      "coverage": 0.6667
                    }
                  },
                  "first_activity_at": "2026-10-01T09:12:44Z",
                  "last_activity_at": "2026-10-12T16:03:10Z",
                  "stats": {
                    "members": {
                      "total": 3,
                      "users": 3,
                      "businesses": 0,
                      "transaction_parties": 0
                    },
                    "member_status": {
                      "approved": 1,
                      "declined": 1,
                      "in_review": 0,
                      "not_completed": 1
                    },
                    "signals": {
                      "total": 2,
                      "by_type": {
                        "device": {
                          "signals": 1,
                          "subjects": 3,
                          "coverage": 1.0
                        },
                        "email": {
                          "signals": 1,
                          "subjects": 2,
                          "coverage": 0.6667
                        }
                      }
                    }
                  },
                  "fraud_tags": [],
                  "risk_signals": {
                    "residential_proxy_reuse": {
                      "detected": false,
                      "signal_count": 0,
                      "max_subject_count": 0
                    },
                    "email_intelligence": {
                      "enriched_signal_count": 1,
                      "high_risk_count": 0,
                      "social_profile_count": 0
                    },
                    "phone_intelligence": {
                      "enriched_signal_count": 0,
                      "high_risk_count": 0
                    }
                  },
                  "reviewed_at": "2026-10-12T16:30:00Z",
                  "reviewed_by": "reviewer@example.com",
                  "review_reason": "Shared device across three new accounts.",
                  "notes_count": 0,
                  "sharing_mode": "global",
                  "cross_org_available": true,
                  "cross_org_unavailable_reason": null,
                  "tags": [],
                  "outcomes": {
                    "approved": 1,
                    "declined": 1,
                    "in_review": 0,
                    "total": 3
                  },
                  "patterns": [
                    {
                      "type": "background",
                      "score": 0.8125,
                      "members": 3,
                      "reason": null,
                      "computed_at": "2026-10-13T08:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح: `tag_uuid` مفقود أو ليس UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag_uuid": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "Missing tag_uuid": {
                    "summary": "tag_uuid مفقود",
                    "value": {
                      "tag_uuid": [
                        "This field is required."
                      ]
                    }
                  },
                  "Invalid tag_uuid": {
                    "summary": "tag_uuid غير صالح",
                    "value": {
                      "tag_uuid": [
                        "Must be a valid UUID."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "بيانات اعتماد مفقودة أو غير صالحة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "بيانات اعتماد مفقودة أو غير صالحة",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "ينتمي مفتاح API إلى تطبيق آخر، أو أنه مفتاح ذو وصول مقيد: تتطلب endpoint الخاصة بـ Networks مفتاحاً كامل الوصول. يتطلب token عضو لوحة التحكم إذن `write:networks`. يتم إرجاعه أيضاً مع `code: networks_not_entitled` عندما لا تكون Networks مفعّلة للمؤسسة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Networks not enabled": {
                    "summary": "الشبكات غير مفعّلة",
                    "value": {
                      "detail": "Networks is disabled for this organization. Contact Didit support if you believe this is an error.",
                      "code": "networks_not_entitled"
                    }
                  },
                  "Restricted API key": {
                    "summary": "مفتاح API مقيد",
                    "value": {
                      "detail": "This API key has no access to this endpoint."
                    }
                  },
                  "No permission": {
                    "summary": "لا يوجد إذن",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "غير موجود.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "موجود في الأخطاء ذات الرموز، على سبيل المثال `networks_not_entitled`."
                    }
                  }
                },
                "examples": {
                  "Network not found": {
                    "summary": "لم يتم العثور على الشبكة",
                    "value": {
                      "detail": "Network not found."
                    }
                  },
                  "Tag not found": {
                    "summary": "العلامة غير موجودة",
                    "value": {
                      "detail": "Tag not found."
                    }
                  },
                  "Tag not on the network": {
                    "summary": "العلامة ليست على الشبكة",
                    "value": {
                      "detail": "This tag is not on the network."
                    }
                  }
                }
              }
            }
          }
        },
        "x-didit-sdk": {
          "resource": "networks",
          "method": "remove_tag",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        }
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/remind/": {
      "post": {
        "summary": "تذكير العميل بطلب",
        "description": "أعد إرسال البريد الإلكتروني لطلب العميل قيد الانتظار، إلى نفس المستلم المتحقق منه، وبنفس المحتوى. يمكنك تذكير الطلب مرة واحدة كحد أقصى كل 24 ساعة. لا يغير التذكير أي شيء آخر: يحتفظ الطلب بالموعد النهائي وتحتفظ الحالة بحالتها. يُسجّل كل تذكير في الحالة كحدث CUSTOMER_REQUEST مع الإجراء `reminded`. تعبر قيمة `delivery_status` في الاستجابة عن كيفية انتهاء تسليم هذا التذكير: SENT أو SIMULATED (لم يُرسل البريد الإلكتروني) أو UNKNOWN (ربما تم قبول البريد الإلكتروني؛ ولن يُعاد إرساله تلقائياً). تشير `next_reminder_at` إلى الوقت الذي يمكنك فيه تذكير هذا الطلب مجدداً. تُعيد 409 مع `reason` عندما لا يعود الطلب متاحاً للعميل للإجابة عليه، و429 مع `retry_at` ورأس `Retry-After` عندما يتم تذكير الطلب خلال آخر 24 ساعة. تتطلب `write:cases`.",
        "operationId": "organization_application_cases_requests_remind_create",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "in": "path",
            "name": "application_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "description": "معرّف UUID للتطبيق."
          },
          {
            "in": "path",
            "name": "case_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "description": "معرّف الحالة UUID."
          },
          {
            "in": "path",
            "name": "request_uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "description": "معرّف UUID لطلب العميل، من قائمة طلبات الحالة."
          }
        ],
        "tags": [
          "Case Management"
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/requests/3fa85f64-5717-4562-b3fc-2c963f66afa6/remind/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.remind(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.remind(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.Remind(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().remind(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$result = $didit->cases->requests->remind('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.remind(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.RemindAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم تسجيل التذكير وإرسال رسالته الإلكترونية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request",
                    "reminded_at",
                    "delivery_status",
                    "next_reminder_at"
                  ],
                  "properties": {
                    "request": {
                      "$ref": "#/components/schemas/CustomerMessagingCaseRequest"
                    },
                    "reminded_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "وقت تسجيل هذا التذكير."
                    },
                    "delivery_status": {
                      "type": "string",
                      "enum": [
                        "SENT",
                        "SIMULATED",
                        "UNKNOWN"
                      ],
                      "description": "كيف انتهى تسليم هذا التذكير. SIMULATED: لم يتم إرسال البريد الإلكتروني. UNKNOWN: ربما تم قبول البريد الإلكتروني؛ ولن يُعاد إرساله تلقائياً."
                    },
                    "next_reminder_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "الوقت الذي يمكنك فيه التذكير بهذا الطلب مجدداً: `reminded_at` زائد 24 ساعة."
                    }
                  }
                },
                "example": {
                  "request": {
                    "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                    "purpose": "confirm_details",
                    "language": "en",
                    "recipient": "customer@example.com",
                    "expires_at": "2026-10-20T09:00:00Z",
                    "actor_email": "reviewer@example.com",
                    "delivery_status": "SENT",
                    "delivered_at": "2026-10-13T09:00:04Z",
                    "cancelled_at": null,
                    "responded_at": null,
                    "response": null,
                    "has_attachment": false,
                    "created_at": "2026-10-13T09:00:00Z"
                  },
                  "reminded_at": "2026-10-14T10:30:00Z",
                  "delivery_status": "SENT",
                  "next_reminder_at": "2026-10-15T10:30:00Z"
                }
              }
            }
          },
          "400": {
            "description": "الحالة لديها قرار قيد الموافقة. نص الاستجابة عبارة عن قائمة من النصوص.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "example": [
                  "Customer messages require an active case without a pending resolution."
                ]
              }
            }
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن الحالات المطلوب."
          },
          "404": {
            "description": "الطلب أو الحالة غير متاحة لهذا المستدعي."
          },
          "409": {
            "description": "لم يعد الطلب بانتظار العميل، لذا لا يوجد ما يمكن تذكيره به. يوضح `reason` السبب: `answered` (أجاب العميل)، أو `cancelled`، أو `expired`، أو `closed` (تم حل الحالة بعد إرسال الطلب، حتى لو أُعيد فتحها لاحقاً)، أو `not_actionable` (تحديث قيد المراجعة لا يطلب شيئاً)، أو `not_delivered` (لم يتم إرسال أول بريد إلكتروني)، أو `contact_unavailable` (البريد الإلكتروني الذي تم التحقق منه لم يعد متاحاً).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "case_request_not_waiting"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "answered",
                        "cancelled",
                        "expired",
                        "closed",
                        "not_actionable",
                        "not_delivered",
                        "contact_unavailable"
                      ]
                    }
                  }
                },
                "example": {
                  "detail": "This request no longer waits on the customer, so there is nothing to remind them of.",
                  "code": "case_request_not_waiting",
                  "reason": "answered"
                }
              }
            }
          },
          "429": {
            "description": "تم إرسال تذكير بالطلب بالفعل خلال آخر 24 ساعة. يحدد `retry_at` ورأس `Retry-After` متى يمكنك التذكير به مجدداً.",
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل أن تتمكن من التذكير بهذا الطلب مجدداً.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 3600
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "case_request_reminder_too_soon"
                      ]
                    },
                    "retry_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "example": {
                  "detail": "This request was already reminded in the last 24 hours.",
                  "code": "case_request_reminder_too_soon",
                  "retry_at": "2026-10-15T10:30:00Z"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-didit-sdk": {
          "resource": "cases.requests",
          "method": "remind",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        }
      }
    },
    "/v3/session/{sessionId}/decision-email-preview/": {
      "post": {
        "summary": "معاينة البريد الإلكتروني لقرار الجلسة",
        "description": "عرض البريد الإلكتروني الذي يتلقاه الشخص عندما تقوم بتعيين الجلسة على `Approved` أو `Declined` مع `send_email: true`، دون تغيير الجلسة أو إرسال أي شيء. تُظهر الاستجابة الموضوع وكود HTML تماماً كما يتم إرسالهما، والمستلم، والمُرسِل، واللغة، وما إذا كان تأكيد التغيير سيؤدي إلى إرسال البريد الإلكتروني على الإطلاق (`will_be_sent`، `not_sent_reason`).\n\nالمستلم هو عنوان الشخص نفسه: العنوان الذي تحقق منه في خطوة التحقق من البريد الإلكتروني ضمن سير العمل، أو العنوان المقدم في `contact_details` عند إنشاء الجلسة. المُرسِل هو نطاق المُرسِل الذي تم التحقق منه لتطبيقك عند تطبيق العلامة البيضاء (`sender_kind: customer`)، وإلا فإنه مُرسِل Didit (`sender_kind: didit`).\n\nلإرسال ما قمت بمعاينته تماماً، قم باستدعاء [Update Session Status](/ar/sessions-api/update-status) مع نفس قيمة `new_status`، و`send_email: true`، وتعيين `email_address` إلى `recipient`، وتعيين `email_language` إلى `language`، وتعيين `email_preview_token` إلى `preview_token`. ينتهي إيصال الاستلام بعد 15 دقيقة. إذا تغير المستلم، أو اللغة، أو حالة الجلسة، أو المُرسِل، أو البريد الإلكتروني منذ المعاينة، فإن التحديث يُرجع `409` قبل تغيير أي شيء؛ قم بالمعاينة مجدداً والتأكيد باستخدام الإيصال الجديد.\n\nيعمل مع جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB) في الحالات `Approved` أو `Declined` أو `In Review` أو `Kyc Expired` أو `Abandoned` أو `Resubmitted`. يتم إجراء فحص الحالة قبل التحقق من صحة نص الطلب. يتطلب امتياز `write:sessions`؛ يتطلب مفتاح API محدد النطاق إذن كتابة للقرارات. تستخدم الاستجابات `Cache-Control: no-store`: تعامل معها كمحتوى تحقق حساس.",
        "operationId": "post_v3_session_decision_email_preview",
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق. يقبل معرّفات جلسات المستخدمين (KYC) والشركات (KYB).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "new_status"
                ],
                "properties": {
                  "new_status": {
                    "type": "string",
                    "enum": [
                      "Approved",
                      "Declined"
                    ],
                    "description": "القرار الذي تريد معاينة بريده الإلكتروني.",
                    "example": "Approved"
                  },
                  "email_language": {
                    "type": "string",
                    "default": "en",
                    "description": "لغة البريد الإلكتروني، بنفس القيمة الافتراضية مثل تحديث حالة الجلسة. اللغة غير المتوفرة تعود تلقائياً إلى الإنجليزية؛ يحدد الحقل `language` في الاستجابة اللغة المستخدمة.",
                    "example": "en"
                  }
                }
              },
              "examples": {
                "Approved": {
                  "summary": "معاينة البريد الإلكتروني للحالة المقبولة باللغة الإنجليزية",
                  "value": {
                    "new_status": "Approved"
                  }
                },
                "Declined in Spanish": {
                  "summary": "معاينة البريد الإلكتروني للحالة المرفوضة باللغة الإسبانية",
                  "value": {
                    "new_status": "Declined",
                    "email_language": "es"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "معاينة فقط. تظل الجلسة دون تغيير ولا يتم إرسال أي بريد إلكتروني.",
            "headers": {
              "Cache-Control": {
                "description": "دائماً `no-store`: تحتوي المعاينة على محتوى تحقق ويجب عدم تخزينها مؤقتاً.",
                "schema": {
                  "type": "string",
                  "example": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "recipient",
                    "recipient_source",
                    "sender",
                    "sender_name",
                    "sender_email",
                    "sender_kind",
                    "subject",
                    "html",
                    "text",
                    "language",
                    "will_be_sent",
                    "not_sent_reason",
                    "preview_token"
                  ],
                  "properties": {
                    "recipient": {
                      "type": "string",
                      "description": "العنوان الذي يُرسل إليه البريد الإلكتروني. سلسلة فارغة عند عدم معرفة أي عنوان للشخص: وعندئذٍ لا يمكن إرسال بريد إلكتروني ويكون `preview_token` فارغاً أيضاً. مرّره كـ `email_address` عند التأكيد.",
                      "example": "person@example.com"
                    },
                    "recipient_source": {
                      "type": "string",
                      "enum": [
                        "email_verification",
                        "contact_details",
                        ""
                      ],
                      "description": "مصدر `recipient`. القيمة `email_verification`: العنوان الذي تحقق منه الشخص في خطوة التحقق من البريد الإلكتروني في سير العمل. القيمة `contact_details`: العنوان المقدَّم في `contact_details` عند إنشاء الجلسة. سلسلة نصية فارغة في حال عدم وجود عنوان.",
                      "example": "email_verification"
                    },
                    "sender": {
                      "type": "string",
                      "description": "رأس `From` الذي يرسل به البريد الإلكتروني.",
                      "example": "Example App <no-reply@mail.example.com>"
                    },
                    "sender_name": {
                      "type": "string",
                      "description": "جزء الاسم المعروض من `sender`.",
                      "example": "Example App"
                    },
                    "sender_email": {
                      "type": "string",
                      "format": "email",
                      "description": "جزء العنوان من `sender`.",
                      "example": "no-reply@mail.example.com"
                    },
                    "sender_kind": {
                      "type": "string",
                      "enum": [
                        "customer",
                        "didit"
                      ],
                      "description": "`customer`: يخرج البريد الإلكتروني من نطاق الإرسال المعتمد لتطبيقك (العلامة البيضاء). `didit`: يخرج من مُرسِل Didit نفسه.",
                      "example": "customer"
                    },
                    "subject": {
                      "type": "string",
                      "description": "سطر الموضوع تماماً كما تم إرساله.",
                      "example": "Your verification has been approved in Example App"
                    },
                    "html": {
                      "type": "string",
                      "description": "كود HTML الخاص بالبريد الإلكتروني تماماً كما يُرسل، مع تضمين شعاره كـ data URL. اعرضه داخل إطار معزول، وتجنب تماماً عرضه مباشرة في DOM الخاص بتطبيقك.",
                      "example": "<!DOCTYPE html><html><body>...</body></html>"
                    },
                    "text": {
                      "type": "string",
                      "description": "كلمات البريد الإلكتروني كنص عادي، كما يحتفظ بها تسلسل رسائل الشخص، للحصول على معاينة موجزة (يظل كود HTML هو البريد الإلكتروني الفعلي الذي يستلمه الشخص).",
                      "example": "Verification Approved\n\nYour identity has been successfully verified with Acme Pay. No further action is needed on your part."
                    },
                    "language": {
                      "type": "string",
                      "description": "اللغة المكتوب بها البريد الإلكتروني. تكون الإنجليزية (`en`) عندما لا تتوفر `email_language` التي طلبتها.",
                      "example": "en"
                    },
                    "will_be_sent": {
                      "type": "boolean",
                      "description": "ما إذا كان تأكيد التغيير باستخدام `send_email: true` يرسل هذا البريد الإلكتروني. `false` عندما يكون `not_sent_reason` معيناً.",
                      "example": true
                    },
                    "not_sent_reason": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "status_unchanged",
                        "notification_emails_disabled",
                        "no_recipient",
                        "sandbox",
                        null
                      ],
                      "description": "سبب عدم إرسال أي بريد إلكتروني عند التأكيد، أو `null` عند إرساله. `status_unchanged`: تمتلك الجلسة هذه الحالة بالفعل، لذا فإن التحديث لا يغير شيئاً ولا يرسل شيئاً. `notification_emails_disabled`: تم إنشاء الجلسة دون `contact_details.send_notification_emails: true`، لذا لن يُرسل أي بريد إلكتروني خاص بالقرار إلى العنوان المحدد في `contact_details`. `no_recipient`: لا يوجد عنوان معروف للشخص. `sandbox`: جلسة بيئة تجريبية لم يشترك مستلمها في تسليم رسائل البريد الإلكتروني للبيئة التجريبية، لذا فإن الإرسال يتم بشكل محاكاة فقط.",
                      "example": null
                    },
                    "preview_token": {
                      "type": "string",
                      "description": "إيصال موقّع لرسالة البريد الإلكتروني هذه تحديداً، صالح لمدة 15 دقيقة. مرّره كـ `email_preview_token` إلى [تحديث حالة الجلسة](/ar/sessions-api/update-status). سلسلة فارغة في حال عدم وجود مستلم.",
                      "example": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
                    }
                  }
                },
                "examples": {
                  "Will Be Sent": {
                    "summary": "يتم إرسال البريد الإلكتروني المقبول إلى العنوان الذي تم التحقق منه في سير العمل",
                    "value": {
                      "recipient": "person@example.com",
                      "recipient_source": "email_verification",
                      "sender": "Example App <no-reply@mail.example.com>",
                      "sender_name": "Example App",
                      "sender_email": "no-reply@mail.example.com",
                      "sender_kind": "customer",
                      "subject": "Your verification has been approved in Example App",
                      "html": "<!DOCTYPE html><html><body>...</body></html>",
                      "language": "en",
                      "will_be_sent": true,
                      "not_sent_reason": null,
                      "preview_token": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
                    }
                  },
                  "No Recipient": {
                    "summary": "لا يوجد عنوان معروف لهذا الشخص",
                    "value": {
                      "recipient": "",
                      "recipient_source": "",
                      "sender": "Example App <no-reply@mail.example.com>",
                      "sender_name": "Example App",
                      "sender_email": "no-reply@mail.example.com",
                      "sender_kind": "customer",
                      "subject": "Your verification has been declined in Example App",
                      "html": "<!DOCTYPE html><html><body>...</body></html>",
                      "language": "en",
                      "will_be_sent": false,
                      "not_sent_reason": "no_recipient",
                      "preview_token": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "الجلسة ليست في حالة يقبلها هذا الـ endpoint (`{\"detail\": ...}`)، أو جسم الطلب غير صالح (`{\"<field>\": [\"<message>\"]}`).",
            "content": {
              "application/json": {
                "examples": {
                  "Wrong Current Status": {
                    "summary": "الجلسة ليست في حالة يقبلها هذا الـ endpoint",
                    "value": {
                      "detail": "Only sessions with status Approved, Declined, In Review, Kyc Expired, Abandoned, Resubmitted can be updated. Current status: In Progress"
                    }
                  },
                  "Invalid new_status": {
                    "summary": "حقل new_status ليس Approved أو Declined",
                    "value": {
                      "new_status": [
                        "\"Resubmitted\" is not a valid choice."
                      ]
                    }
                  },
                  "Missing new_status": {
                    "summary": "تم إغفال حقل مطلوب",
                    "value": {
                      "new_status": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            }
          },
          "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` هذا.",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "summary": "session_id غير معروف",
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST \\\n  https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/decision-email-preview/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"new_status\": \"Approved\", \"email_language\": \"en\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.preview_decision_email(\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    new_status=\"Approved\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.previewDecisionEmail(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", {\n  new_status: \"Approved\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.PreviewDecisionEmail(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", didit.SessionsPreviewDecisionEmailParams{\n\tNewStatus: \"Approved\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsPreviewDecisionEmailParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().previewDecisionEmail(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", SessionsPreviewDecisionEmailParams.builder()\n        .newStatus(SessionsPreviewDecisionEmailParams.NewStatus.of(\"Approved\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->previewDecisionEmail('3fa85f64-5717-4562-b3fc-2c963f66afa6', [\n    'new_status' => 'Approved',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.preview_decision_email(\n  \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  new_status: \"Approved\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.PreviewDecisionEmailAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", new SessionsPreviewDecisionEmailParams\n{\n    NewStatus = \"Approved\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "preview_decision_email",
          "auth": "api_key",
          "server": true
        }
      }
    },
    "/v3/travel-rule/join/{token}/": {
      "get": {
        "summary": "الحصول على دعوة انضمام مجاني",
        "description": "عام وغير مصادق عليه. يعرض الدعوة التي يتبع لها رابط الانضمام أثناء كونه مفتوحاً: من قدّم الطلب، والعنوان الذي أُرسلت إليه، وقيم الدليل التي ستتم تعبئتها مسبقاً. يُعد الـ token هو وسيلة المصادقة.",
        "operationId": "getTravelRuleJoinInvitation",
        "x-didit-sdk": {
          "resource": "travel_rule.join",
          "method": "get_invitation",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "token الدعوة من رابط الانضمام."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://verification.didit.me/v3/travel-rule/join/{token}/"
          }
        ],
        "responses": {
          "200": {
            "description": "الدعوة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleJoinInvitation"
                }
              }
            }
          },
          "404": {
            "description": "لا توجد دعوة مرتبطة بهذا الرابط."
          },
          "410": {
            "description": "لم تعد الدعوة مفتوحة: إما منتهية الصلاحية، أو تم استخدامها بالفعل، أو تم سحبها."
          }
        }
      },
      "post": {
        "summary": "تسجيل حساب Travel Rule مجاني",
        "description": "عام وغير مصادق عليه. يُنشئ حساب Travel Rule مجانياً للـ VASP الطرف المقابل الذي استلم طلباً. يجب أن يكون البريد الإلكتروني هو العنوان الذي أُرسلت إليه الدعوة. يتم إرسال رمز مكوّن من 6 أحرف إليه عبر البريد الإلكتروني؛ أرسله إلى endpoint التحقق لإكمال العملية. تخضع محاولات التسجيل لحد المعدل لكل عنوان ولكل عنوان IP.",
        "operationId": "registerTravelRuleJoin",
        "x-didit-sdk": {
          "resource": "travel_rule.join",
          "method": "register",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "token الدعوة من رابط الانضمام."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleJoinRegisterRequest"
              },
              "example": {
                "email": "compliance@example.com",
                "password": "a-long-passphrase"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/join/{token}/ \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\": \"compliance@example.com\", \"password\": \"a-long-passphrase\"}'"
          }
        ],
        "responses": {
          "202": {
            "description": "تم إنشاء الحساب وإرسال رمز عبر البريد الإلكتروني.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "يطلب من الطرف المقابل تفقد بريده الإلكتروني بحثًا عن رمز التحقق."
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "العنوان الذي أُرسل الرمز إليه."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "عنوان البريد الإلكتروني ليس العنوان المدعو إليه، أو تم رفض كلمة المرور أو العنوان."
          },
          "404": {
            "description": "لا توجد دعوة مرتبطة بهذا الرابط."
          },
          "410": {
            "description": "لم تعد الدعوة مفتوحة: إما منتهية الصلاحية، أو تم استخدامها بالفعل، أو تم سحبها."
          },
          "429": {
            "description": "محاولات انضمام كثيرة جدًا. تحدد رؤوس `X-RateLimit-*` الميزانية التي تم استهلاكها."
          }
        }
      }
    },
    "/v3/travel-rule/join/{token}/verify/": {
      "post": {
        "summary": "التحقق من حساب Travel Rule مجاني",
        "description": "عام وغير مصادق عليه. يستهلك الرمز المُرسل عبر البريد الإلكتروني، ويُنشئ المؤسسة المجانية، ويرد ببيانات الاعتماد التي يستخدمها تطبيقها على endpoints مساحة العمل. تلقي بيانات Travel Rule مجاني.",
        "operationId": "verifyTravelRuleJoin",
        "x-didit-sdk": {
          "resource": "travel_rule.join",
          "method": "verify",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "token الدعوة من رابط الانضمام."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleJoinVerifyRequest"
              },
              "example": {
                "email": "compliance@example.com",
                "code": "123456"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/join/{token}/verify/ \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\": \"compliance@example.com\", \"code\": \"123456\"}'"
          }
        ],
        "responses": {
          "201": {
            "description": "بيانات اعتماد المؤسسة والتطبيق.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleJoinCredentials"
                }
              }
            }
          },
          "400": {
            "description": "تم رفض الرمز أو البريد الإلكتروني."
          },
          "404": {
            "description": "لا توجد دعوة مرتبطة بهذا الرابط."
          },
          "410": {
            "description": "لم تعد الدعوة مفتوحة: إما منتهية الصلاحية، أو تم استخدامها بالفعل، أو تم سحبها."
          },
          "429": {
            "description": "محاولات انضمام كثيرة جدًا. تحدد رؤوس `X-RateLimit-*` الميزانية التي تم استهلاكها."
          }
        }
      }
    },
    "/v3/travel-rule/workspace/": {
      "get": {
        "summary": "الحصول على مساحة عمل Travel Rule المجانية",
        "description": "يقرأ مساحة العمل المجانية لتطبيق انضم مجاناً: مطالبة الدليل، وإثبات النطاق، والفوترة وإدراج شبكة Didit.",
        "operationId": "getTravelRuleWorkspace",
        "x-didit-sdk": {
          "resource": "travel_rule.workspace",
          "method": "get",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/workspace/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.get()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.get();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.Get(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().get();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->workspace->get();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.get\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.GetAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "مساحة العمل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWorkspace"
                }
              }
            }
          },
          "404": {
            "description": "لم ينضم هذا التطبيق إلى المستوى المجاني، لذا لا يملك مساحة عمل مجانية."
          }
        }
      }
    },
    "/v3/travel-rule/workspace/claim/": {
      "post": {
        "summary": "المطالبة بمدخل الدليل",
        "description": "المطالبة بمدخل الدليل الذي تمثله مساحة العمل هذه. عندما يكون بريد العمل على نطاق مدرج في المدخل، يتم إثبات المطالبة وتطبيقها على الفور: حيث تتم تعبئة ملف تعريف VASP وإعدادات Travel Rule من المدخل ويتم تفعيل Travel Rule، بحيث يتم توجيه التحويل التالي إليها عبر شبكة Didit. بخلاف ذلك، تنتظر المطالبة المراجعة (`pending_review`).",
        "operationId": "claimTravelRuleWorkspace",
        "x-didit-sdk": {
          "resource": "travel_rule.workspace",
          "method": "claim",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleWorkspaceClaimRequest"
              },
              "example": {
                "vasp_id": "0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/claim/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vasp_id\": \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.claim(\n    vasp_id=\"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.claim({\n  vasp_id: \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.Claim(ctx, didit.TravelRuleWorkspaceClaimRequest{\n\tVASPID: \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWorkspaceClaimRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().claim(TravelRuleWorkspaceClaimRequest.builder()\n        .vaspId(\"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->workspace->claim([\n    'vasp_id' => '0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.claim(vasp_id: \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.ClaimAsync(new TravelRuleWorkspaceClaimRequest\n{\n    VaspId = \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "مساحة العمل مع حالة المطالبة الخاصة بها.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWorkspace"
                }
              }
            }
          },
          "400": {
            "description": "لا يوجد إدخال في الدليل بهذا المعرّف."
          },
          "404": {
            "description": "لم ينضم هذا التطبيق إلى المستوى المجاني، لذا لا يملك مساحة عمل مجانية."
          }
        }
      }
    },
    "/v3/travel-rule/workspace/domain/code/": {
      "post": {
        "summary": "إرسال رمز التحقق من النطاق عبر البريد الإلكتروني",
        "description": "يرسل رمزاً لمرة واحدة عبر البريد الإلكتروني إلى عنوان العمل الخاص بمساحة العمل لإثبات تحكمها في نطاق البريد الإلكتروني. تخضع العملية لحد المعدل، ويتم قبول عدد محدود من المحاولات الخاطئة لكل رمز. يُرجع أيضاً سجل TXT لبديل DNS.",
        "operationId": "sendTravelRuleWorkspaceDomainCode",
        "x-didit-sdk": {
          "resource": "travel_rule.workspace",
          "method": "send_domain_code",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/domain/code/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.send_domain_code()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.sendDomainCode();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.SendDomainCode(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().sendDomainCode();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->workspace->sendDomainCode();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.send_domain_code\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.SendDomainCodeAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "النطاق، وحالته وسجل TXT.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWorkspaceDomainCodeResponse"
                }
              }
            }
          },
          "404": {
            "description": "لم ينضم هذا التطبيق إلى المستوى المجاني، لذا لا يملك مساحة عمل مجانية."
          }
        }
      }
    },
    "/v3/travel-rule/workspace/domain/confirm/": {
      "post": {
        "summary": "تأكيد رمز التحقق من النطاق",
        "description": "يستهلك الرمز المرسل عبر البريد الإلكتروني ويضع علامة على أن نطاق البريد الإلكتروني تم التحقق منه.",
        "operationId": "confirmTravelRuleWorkspaceDomain",
        "x-didit-sdk": {
          "resource": "travel_rule.workspace",
          "method": "confirm_domain",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleWorkspaceDomainConfirmRequest"
              },
              "example": {
                "code": "123456"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/domain/confirm/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\": \"123456\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.confirm_domain(\n    code=\"123456\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.confirmDomain({\n  code: \"123456\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.ConfirmDomain(ctx, didit.TravelRuleWorkspaceDomainConfirmRequest{\n\tCode: \"123456\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWorkspaceDomainConfirmRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().confirmDomain(TravelRuleWorkspaceDomainConfirmRequest.builder()\n        .code(\"123456\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->workspace->confirmDomain([\n    'code' => '123456',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.confirm_domain(code: \"123456\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.ConfirmDomainAsync(new TravelRuleWorkspaceDomainConfirmRequest\n{\n    Code = \"123456\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "مساحة العمل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWorkspace"
                }
              }
            }
          },
          "400": {
            "description": "الرمز غير صحيح أو منتهي الصلاحية أو تم استخدامه بالفعل."
          },
          "404": {
            "description": "لم ينضم هذا التطبيق إلى المستوى المجاني، لذا لا يملك مساحة عمل مجانية."
          }
        }
      }
    },
    "/v3/travel-rule/workspace/domain/dns/": {
      "post": {
        "summary": "التحقق من النطاق من واقع سجل TXT الخاص به",
        "description": "يتحقق من سجل TXT بالقيمة `didit-tr-verify.<domain>` الذي يرجعه endpoint الخاص بالرمز ويحدد النطاق كمتحقق منه عند تطابقه. يُعد أحد الإثباتين كافياً: الرمز المرسل عبر البريد الإلكتروني أو سجل TXT.",
        "operationId": "verifyTravelRuleWorkspaceDomainDns",
        "x-didit-sdk": {
          "resource": "travel_rule.workspace",
          "method": "verify_domain_dns",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/domain/dns/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.verify_domain_dns()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.verifyDomainDns();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.VerifyDomainDNS(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().verifyDomainDns();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->workspace->verifyDomainDns();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.verify_domain_dns\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.VerifyDomainDnsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "مساحة العمل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWorkspace"
                }
              }
            }
          },
          "400": {
            "description": "لم يتم العثور على سجل TXT أو أنه غير متطابق."
          },
          "404": {
            "description": "لم ينضم هذا التطبيق إلى المستوى المجاني، لذا لا يملك مساحة عمل مجانية."
          }
        }
      }
    },
    "/v3/travel-rule/workspace/billing/": {
      "post": {
        "summary": "تمكين الفوترة الصادرة",
        "description": "تقوم بتشغيل فوترة Travel Rule الصادرة لمساحة العمل. يظل الاستلام مجانياً. لا يمكن إيقاف تشغيل هذا الإجراء مجدداً عبر API: اتصل بفريق دعم Didit.",
        "operationId": "enableTravelRuleWorkspaceBilling",
        "x-didit-sdk": {
          "resource": "travel_rule.workspace",
          "method": "enable_billing",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleWorkspaceBillingRequest"
              },
              "example": {
                "enabled": true
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/billing/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"enabled\": true}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.enable_billing(\n    enabled=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.enableBilling({\n  enabled: true,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.EnableBilling(ctx, didit.TravelRuleWorkspaceBillingRequest{\n\tEnabled: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWorkspaceBillingRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().enableBilling(TravelRuleWorkspaceBillingRequest.builder()\n        .enabled(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->workspace->enableBilling([\n    'enabled' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.enable_billing(enabled: true)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.EnableBillingAsync(new TravelRuleWorkspaceBillingRequest\n{\n    Enabled = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "مساحة العمل التي تكون فيها قيمة `billing_enabled` هي true.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWorkspace"
                }
              }
            }
          },
          "400": {
            "description": "كانت قيمة `enabled` هي false."
          },
          "404": {
            "description": "لم ينضم هذا التطبيق إلى المستوى المجاني، لذا لا يملك مساحة عمل مجانية."
          }
        }
      }
    },
    "/v3/investigator/summary/": {
      "get": {
        "operationId": "investigator_summary",
        "summary": "ملخص المحقق",
        "description": "المرحلة، وأعداد عناصر قائمة الانتظار، والتقارير التي أُعدّت واتُّخذ قرار بشأنها اليوم، والتوافق لمدة 30 يوماً، والأسعار ومستوى الاستقلالية لكل قائمة انتظار. تتطلب المفاتيح المقيدة نطاق `decisions` (قراءة)؛ كما تتطلب تنبيهات المعاملات نطاق `transactions` أيضاً.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "stage": {
                      "type": "string"
                    },
                    "last_report_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    },
                    "prepared_today": {
                      "type": "integer"
                    },
                    "ready_to_accept": {
                      "type": "integer"
                    },
                    "open": {
                      "type": "integer"
                    },
                    "decided_today": {
                      "type": "integer"
                    },
                    "automation_rate_month": {
                      "type": "number",
                      "nullable": true
                    },
                    "preparing": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "identity",
                "transactions"
              ],
              "default": "all"
            },
            "description": "`identity` (الجلسات، والحالات التي لم يتم فتحها بواسطة قاعدة معاملات) أو `transactions` (تنبيهات المعاملات، والحالات التي فتحتها قاعدة معاملات)."
          },
          {
            "in": "query",
            "name": "timezone",
            "schema": {
              "type": "string"
            },
            "description": "المنطقة الزمنية وفقاً لـ IANA (على سبيل المثال `Europe/Madrid`) التي يُحتسب بدءاً منها \"اليوم\". الافتراضي هو UTC."
          }
        ],
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "retrieve_summary",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_summary()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveSummary();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveSummary(ctx, didit.InvestigatorRetrieveSummaryParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveSummary();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->retrieveSummary();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_summary\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveSummaryAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/queue/": {
      "get": {
        "operationId": "investigator_queue",
        "summary": "عرض قائمة انتظار المحقق",
        "description": "التقارير المفتوحة، **جاهزة للقبول** أولاً، ثم حسب الموعد النهائي، والمخاطر، والانتظار. يغطي `counts` كل نوع ضمن النطاق. الحد الأقصى لـ `count` هو 100. تتطلب المفاتيح المقيدة نطاق `decisions` (قراءة)؛ وتتطلب تنبيهات المعاملات أيضاً `transactions`.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "counts": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvestigatorQueueRow"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "identity",
                "transactions"
              ],
              "default": "all"
            },
            "description": "`identity` (الجلسات، والحالات التي لم يتم فتحها بواسطة قاعدة معاملات) أو `transactions` (تنبيهات المعاملات، والحالات التي فتحتها قاعدة معاملات)."
          },
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "string"
            },
            "description": "`session`، أو `business_session`، أو `transaction`، أو `case`، أو عدة قيم مفصولة بفواصل."
          },
          {
            "in": "query",
            "name": "queue",
            "schema": {
              "type": "string",
              "enum": [
                "kyc",
                "kyb",
                "aml",
                "transactions",
                "cases"
              ]
            }
          },
          {
            "in": "query",
            "name": "recommendation",
            "schema": {
              "type": "string",
              "enum": [
                "approve",
                "decline",
                "escalate",
                "request"
              ]
            }
          },
          {
            "in": "query",
            "name": "confidence",
            "schema": {
              "type": "string",
              "enum": [
                "high",
                "moderate",
                "low"
              ]
            }
          },
          {
            "in": "query",
            "name": "ready",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            },
            "description": "الاسم، أو الشركة، أو عنوان الحالة، أو الرقم، أو معرّف المعاملة، أو معرّف العنصر."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "list_queue",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.investigator.list_queue():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.investigator.listQueue()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Investigator.ListQueueAutoPaging(ctx, didit.InvestigatorListQueueParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.investigator().listQueue()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->investigator->listQueue() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.investigator.list_queue.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Investigator.ListQueueAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/investigator/runs/{run_id}/": {
      "get": {
        "operationId": "investigator_run_retrieve",
        "summary": "الحصول على تقرير Investigator",
        "description": "التقرير الكامل لعملية تشغيل واحدة. 404 عندما لا تحتوي عملية التشغيل على تقرير مكتمل، أو عند حذف العنصر الخاص بها. تحتاج المفاتيح المقيدة إلى نطاق `decisions` (قراءة)؛ وتتطلب تنبيهات المعاملات أيضاً نطاق `transactions`.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestigatorRunDetail"
                }
              }
            }
          },
          "404": {
            "description": "غير موجود، أو لا يوجد تقرير."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "retrieve_run",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_run(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveRun(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveRun(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveRun(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->retrieveRun('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_run(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveRunAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/runs/{run_id}/accept/": {
      "post": {
        "operationId": "investigator_run_accept",
        "summary": "قبول توصية",
        "description": "يطبق الإجراء الموصى به عبر المسار العادي للعنصر، بحيث يتم إطلاق webhooks المعتادة لديك. يجعله `narrative` معدلاً ومقبولاً. تتطلب المفاتيح المقيدة نطاق `decisions` (كتابة)؛ وتتطلب تنبيهات المعاملات أيضاً نطاق `transactions` (كتابة). يؤدي تصعيد عملية تحقق أو معاملة إلى فتح حالة.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestigatorDecision"
                }
              }
            }
          },
          "409": {
            "description": "تم اتخاذ القرار بالفعل، أو التقرير غير جاهز، أو توجد آلية حماية تحتجز العنصر."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvestigatorAcceptRequest"
              },
              "example": {
                "send_email": false
              }
            }
          }
        },
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "accept_run",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.accept_run(\n    \"11111111-2222-3333-4444-555555555555\",\n    send_email=False,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.acceptRun(\"11111111-2222-3333-4444-555555555555\", {\n  send_email: false,\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.AcceptRun(ctx, \"11111111-2222-3333-4444-555555555555\", didit.InvestigatorAcceptRequest{\n\tSendEmail: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.InvestigatorAcceptRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().acceptRun(\"11111111-2222-3333-4444-555555555555\", InvestigatorAcceptRequest.builder()\n        .sendEmail(false)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->acceptRun('11111111-2222-3333-4444-555555555555', [\n    'send_email' => false,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.accept_run(\n  \"11111111-2222-3333-4444-555555555555\",\n  send_email: false\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.AcceptRunAsync(\"11111111-2222-3333-4444-555555555555\", new InvestigatorAcceptRequest\n{\n    SendEmail = false,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/runs/{run_id}/override/": {
      "post": {
        "operationId": "investigator_run_override",
        "summary": "تجاوز توصية",
        "description": "يتخذ إجراءً آخر مع تحديد فئة وسبب. كما يلغي قراراً اتخذه Investigator بمفرده طالما أنه لا يزال سارياً. تتطلب المفاتيح المقيدة نطاق `decisions` (كتابة)؛ وتتطلب تنبيهات المعاملات أيضاً نطاق `transactions` (كتابة). يؤدي تصعيد عملية تحقق أو معاملة إلى فتح حالة.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestigatorDecision"
                }
              }
            }
          },
          "409": {
            "description": "تم اتخاذ القرار بالفعل، أو توجد آلية حماية تحتجز العنصر."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvestigatorOverrideRequest"
              },
              "example": {
                "action": "decline",
                "category": "evidence_misread",
                "reason": "The proof of address is older than three months."
              }
            }
          }
        },
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "override_run",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.override_run(\n    \"11111111-2222-3333-4444-555555555555\",\n    action=\"decline\",\n    category=\"evidence_misread\",\n    reason=\"The proof of address is older than three months.\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.overrideRun(\"11111111-2222-3333-4444-555555555555\", {\n  action: \"decline\",\n  category: \"evidence_misread\",\n  reason: \"The proof of address is older than three months.\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.OverrideRun(ctx, \"11111111-2222-3333-4444-555555555555\", didit.InvestigatorOverrideRequest{\n\tAction:   \"decline\",\n\tCategory: \"evidence_misread\",\n\tReason:   \"The proof of address is older than three months.\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.InvestigatorOverrideRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().overrideRun(\"11111111-2222-3333-4444-555555555555\", InvestigatorOverrideRequest.builder()\n        .action(InvestigatorOverrideRequest.Action.of(\"decline\"))\n        .category(InvestigatorOverrideRequest.Category.of(\"evidence_misread\"))\n        .reason(\"The proof of address is older than three months.\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->overrideRun('11111111-2222-3333-4444-555555555555', [\n    'action' => 'decline',\n    'category' => 'evidence_misread',\n    'reason' => 'The proof of address is older than three months.',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.override_run(\n  \"11111111-2222-3333-4444-555555555555\",\n  action: \"decline\",\n  category: \"evidence_misread\",\n  reason: \"The proof of address is older than three months.\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.OverrideRunAsync(\"11111111-2222-3333-4444-555555555555\", new InvestigatorOverrideRequest\n{\n    Action = \"decline\",\n    Category = \"evidence_misread\",\n    Reason = \"The proof of address is older than three months.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/runs/batch-accept/": {
      "post": {
        "operationId": "investigator_batch_accept",
        "summary": "قبول التوصيات دفعة واحدة",
        "description": "يقبل ما يصل إلى 50 تقريراً تم وضع علامة «جاهز للقبول» عليها. كل تقرير يُعد قراره الخاص: يتم تخطي أي تقرير لا يمكن قبوله مع ذكر السبب. تتطلب المفاتيح المقيدة نطاق `decisions` (كتابة)؛ كما تتطلب تنبيهات المعاملات نطاق `transactions` (كتابة). يؤدي تصعيد عملية تحقق أو معاملة إلى فتح حالة.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestigatorBatchAcceptResponse"
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvestigatorBatchAcceptRequest"
              }
            }
          }
        },
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "batch_accept_runs",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.batch_accept_runs(\n    run_ids=[\"11111111-2222-3333-4444-555555555555\"],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.batchAcceptRuns({\n  run_ids: [\"11111111-2222-3333-4444-555555555555\"],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.BatchAcceptRuns(ctx, didit.InvestigatorBatchAcceptRequest{\n\tRunIDs: []string{\"11111111-2222-3333-4444-555555555555\"},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.InvestigatorBatchAcceptRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().batchAcceptRuns(InvestigatorBatchAcceptRequest.builder()\n        .runIds(List.of(\"11111111-2222-3333-4444-555555555555\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->batchAcceptRuns([\n    'run_ids' => ['11111111-2222-3333-4444-555555555555'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.batch_accept_runs(run_ids: [\"11111111-2222-3333-4444-555555555555\"])\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.BatchAcceptRunsAsync(new InvestigatorBatchAcceptRequest\n{\n    RunIds = new string[] { \"11111111-2222-3333-4444-555555555555\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/transactions/{transaction_id}/": {
      "get": {
        "operationId": "investigator_transaction_retrieve",
        "summary": "الحصول على مراجعة Investigator لمعاملة",
        "description": "آخر مراجعة للمعاملة، أو `investigator: null` عندما لم تخضع لأي مراجعة من قبل. تحتاج المفاتيح المقيدة إلى نطاقَي `decisions` و`transactions` (قراءة).",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transaction_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "investigator": {
                      "$ref": "#/components/schemas/InvestigatorBlock"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "ليست معاملة هذا التطبيق."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "retrieve_transaction",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_transaction(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveTransaction(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveTransaction(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveTransaction(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->retrieveTransaction('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_transaction(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveTransactionAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/guardrails/": {
      "get": {
        "operationId": "investigator_guardrails",
        "summary": "عرض حواجز الحماية المقفلة",
        "description": "الحواجز الوقائية الخمسة التي تنطبق على كل قائمة انتظار. ولا يمكن إيقاف تشغيلها. تحتاج المفاتيح المقيدة إلى نطاق `decisions` (قراءة)؛ وتتطلب تنبيهات المعاملات أيضاً نطاق `transactions`.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "enum": [
                              "sanctions_to_person",
                              "no_tipping_off",
                              "no_protected_characteristics",
                              "never_files_reports",
                              "every_decision_logged"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "locked": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "list_guardrails",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.list_guardrails()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.listGuardrails();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.ListGuardrails(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().listGuardrails();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->listGuardrails();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.list_guardrails\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.ListGuardrailsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/dashboard/": {
      "get": {
        "operationId": "investigator_dashboard",
        "summary": "لوحة تحكم المحقق",
        "description": "آخر 30 يوماً: المراجعات، والقرارات، ومعدل الأتمتة، والساعات الموفرة، والإنفاق، والتجاوزات، وعينات الجودة منذ الإطلاق الفعلي، والأرقام الأسبوعية ولكل قائمة انتظار. تحتاج المفاتيح المقيدة إلى scope `decisions` (قراءة)؛ وتتطلب تنبيهات المعاملات أيضاً `transactions`.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "stage": {
                      "type": "string"
                    },
                    "window_days": {
                      "type": "integer"
                    },
                    "reviews": {
                      "type": "integer"
                    },
                    "decided": {
                      "type": "integer"
                    },
                    "automated": {
                      "type": "integer"
                    },
                    "automation_rate": {
                      "type": "number",
                      "nullable": true
                    },
                    "hours_saved": {
                      "type": "number",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "identity",
                "transactions"
              ],
              "default": "all"
            },
            "description": "`identity` (الجلسات، والحالات التي لم يتم فتحها بواسطة قاعدة معاملات) أو `transactions` (تنبيهات المعاملات، والحالات التي فتحتها قاعدة معاملات)."
          }
        ],
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "retrieve_dashboard",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_dashboard()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveDashboard();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveDashboard(ctx, didit.InvestigatorRetrieveDashboardParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveDashboard();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->retrieveDashboard();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_dashboard\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveDashboardAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/performance/": {
      "get": {
        "operationId": "investigator_performance",
        "summary": "أداء المحقق",
        "description": "التوافق مع فريقك، والحجم، والوقت الموفر، ومعايرة الثقة، والنتائج لكل قائمة انتظار، وأسباب التجاوز، ونقاط الخلاف لفترة معينة. تتطلب المفاتيح المقيدة نطاق `decisions` (قراءة)؛ وتتطلب تنبيهات المعاملات أيضاً نطاق `transactions`.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "period": {
                      "type": "integer"
                    },
                    "start": {
                      "type": "string",
                      "format": "date"
                    },
                    "end": {
                      "type": "string",
                      "format": "date"
                    },
                    "investigated": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "identity",
                "transactions"
              ],
              "default": "all"
            },
            "description": "`identity` (الجلسات، والحالات التي لم يتم فتحها بواسطة قاعدة معاملات) أو `transactions` (تنبيهات المعاملات، والحالات التي فتحتها قاعدة معاملات)."
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "type": "string",
              "enum": [
                "7",
                "30",
                "90"
              ],
              "default": "30"
            },
            "description": "الأيام، منتهية باليوم الحالي."
          }
        ],
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "retrieve_performance",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_performance()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrievePerformance();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrievePerformance(ctx, didit.InvestigatorRetrievePerformanceParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrievePerformance();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->retrievePerformance();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_performance\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrievePerformanceAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/investigator/activity/": {
      "get": {
        "operationId": "investigator_activity",
        "summary": "سرد نشاط المحقق",
        "description": "سجل التدقيق القابل للإلحاق فقط، الأحدث أولاً. يُعد القبول المجمّع إدخالاً واحداً. يضيف `counts` لكل مجموعة و`actors`. تتطلب المفاتيح المقيدة نطاق `decisions` (قراءة)؛ تتطلب تنبيهات المعاملات أيضاً نطاق `transactions`.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "counts": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "actors": {
                      "type": "array",
                      "items": {}
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "`id`, `at`, `kind`, `group`, `queue`, `run_id`, `item`, `actor`, `agent_version`, `data`, `report_version`, `steps`, `sources`, `batch`."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "identity",
                "transactions"
              ],
              "default": "all"
            },
            "description": "`identity` (الجلسات، والحالات التي لم يتم فتحها بواسطة قاعدة معاملات) أو `transactions` (تنبيهات المعاملات، والحالات التي فتحتها قاعدة معاملات)."
          },
          {
            "in": "query",
            "name": "group",
            "schema": {
              "type": "string",
              "enum": [
                "agent",
                "decisions",
                "overrides",
                "autonomy"
              ]
            }
          },
          {
            "in": "query",
            "name": "actor",
            "schema": {
              "type": "string"
            },
            "description": "`agent` لـ Investigator، أو البريد الإلكتروني لشخص."
          },
          {
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "until",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "list_activity",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.investigator.list_activity():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.investigator.listActivity()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Investigator.ListActivityAutoPaging(ctx, didit.InvestigatorListActivityParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.investigator().listActivity()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->investigator->listActivity() as $item) {\n    print_r($item);\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.investigator.list_activity.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Investigator.ListActivityAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/investigator/activity/export/": {
      "get": {
        "operationId": "investigator_activity_export",
        "summary": "تصدير نشاط Investigator",
        "description": "الإدخالات نفسها كملف CSV، صف واحد لكل قرار، الأحدث أولاً، حتى 10,000 إدخال. تتطلب المفاتيح المقيدة نطاق `decisions` (قراءة)؛ وتتطلب تنبيهات المعاملات أيضاً نطاق `transactions`.",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "identity",
                "transactions"
              ],
              "default": "all"
            },
            "description": "`identity` (الجلسات، والحالات التي لم يتم فتحها بواسطة قاعدة معاملات) أو `transactions` (تنبيهات المعاملات، والحالات التي فتحتها قاعدة معاملات)."
          },
          {
            "in": "query",
            "name": "group",
            "schema": {
              "type": "string",
              "enum": [
                "agent",
                "decisions",
                "overrides",
                "autonomy"
              ]
            }
          },
          {
            "in": "query",
            "name": "actor",
            "schema": {
              "type": "string"
            },
            "description": "`agent` لـ Investigator، أو البريد الإلكتروني لشخص."
          },
          {
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "until",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "export_activity",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.investigator.export_activity()\nwith open(\"download.csv\", \"wb\") as file:\n    file.write(content)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.investigator.exportActivity();\nawait writeFile(\"download.csv\", Buffer.from(await content.arrayBuffer()));"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Investigator.ExportActivity(ctx, didit.InvestigatorExportActivityParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.csv\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.investigator().exportActivity()\n        .writeTo(Path.of(\"download.csv\"));"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$content = $didit->investigator->exportActivity();\n$content->saveTo('download.csv');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.investigator.export_activity\nFile.binwrite(\"download.csv\", content)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Investigator.ExportActivityAsync();\nawait content.SaveToAsync(\"download.csv\");"
          }
        ]
      }
    },
    "/v3/investigator/settings/": {
      "get": {
        "operationId": "investigator_settings_retrieve",
        "summary": "الحصول على إعدادات Investigator",
        "description": "المرحلة (`none`، أو `shadow`، أو `live`) وحد الإنفاق الشهري مع إنفاق هذا الشهر. تتطلب المفاتيح المقيدة نطاق الصلاحية `applications` (قراءة).",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestigatorSettings"
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "retrieve_settings",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_settings()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveSettings();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveSettings(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveSettings();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->retrieveSettings();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_settings\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveSettingsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "patch": {
        "operationId": "investigator_settings_update",
        "summary": "تحديث إعدادات المحقق",
        "description": "تغيير المرحلة، أو الحد الأقصى للإنفاق الشهري، أو كليهما. يتطلب الانتقال إلى ما بعد `none` خطة تتضمن Investigator (خطة Growth أو أعلى)؛ كما يتطلب `live` عقداً يحدد سعره، إذا كان لديك عقد. تتطلب المفاتيح المقيدة نطاق `applications` (كتابة).",
        "tags": [
          "Investigator"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestigatorSettings"
                }
              }
            }
          },
          "400": {
            "description": "لم يتم إرسال أي من الحقلين، أو توجد قيمة غير صالحة."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "يفتقر المفتاح إلى النطاق المطلوب، أو أن نوع العنصر غير قابل للقراءة، أو أن الخطة لا تتضمن Investigator."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvestigatorSettings"
              },
              "example": {
                "stage": "shadow",
                "monthly_spend_limit": "500.00"
              }
            }
          }
        },
        "x-didit-sdk": {
          "resource": "investigator",
          "method": "update_settings",
          "auth": "api_key",
          "server": true
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.update_settings(\n    stage=\"shadow\",\n    monthly_spend_limit=\"500.00\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.updateSettings({\n  stage: \"shadow\",\n  monthly_spend_limit: \"500.00\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.UpdateSettings(ctx, didit.InvestigatorSettingsParam{\n\tStage:             didit.Some(didit.InvestigatorSettingsStage(\"shadow\")),\n\tMonthlySpendLimit: didit.String(\"500.00\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.InvestigatorSettings;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().updateSettings(InvestigatorSettings.builder()\n        .stage(InvestigatorSettings.Stage.of(\"shadow\"))\n        .monthlySpendLimit(\"500.00\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->investigator->updateSettings([\n    'stage' => 'shadow',\n    'monthly_spend_limit' => '500.00',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.update_settings(\n  stage: \"shadow\",\n  monthly_spend_limit: \"500.00\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.UpdateSettingsAsync(new InvestigatorSettings\n{\n    Stage = new InvestigatorSettingsStage(\"shadow\"),\n    MonthlySpendLimit = \"500.00\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/travel-rule/wallet-addresses/import/": {
      "post": {
        "summary": "استيراد عناوين المحافظ مجمّعة",
        "description": "أضف ما يصل إلى 10,000 محفظة إلى دفتر عناوين Travel Rule الخاص بك في استدعاء واحد، بصيغة JSON أو كملف CSV. يمكن إرسال المحفظة عبر عنوانها، أو عبر تجزئة SHA-256 لعنوانها المكتوب بأحرف صغيرة (`address_hash`) للحفاظ على خصوصية العنوان، أو كلاهما معاً. عملية الاستيراد تتسم بالـ idempotency: يتم الإبلاغ عن المحفظة الموجودة بالفعل في الدفتر على أنها `existing` وتُترك دون تعديل، بحيث يمكن إرسال الملف نفسه مرة أخرى. يتم التحقق من صحة كل صف على حدة، لذا فإن وجود صف غير صالح لا يؤدي أبداً إلى فشل الصفوف الأخرى. المحفظة المستوردة عبر قيمتها المجزأة تتطابق فقط مع التحويلات إلى ذلك العنوان ويمكن إثباتها باستخدام أداة إثبات ملكية المحفظة مثل أي إدخال آخر.",
        "operationId": "importTravelRuleWalletAddresses",
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-didit-sdk": {
          "resource": "travel_rule.wallet_addresses",
          "method": "bulk_import",
          "auth": "api_key",
          "server": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "entries"
                    ],
                    "properties": {
                      "entries": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 10000,
                        "items": {
                          "$ref": "#/components/schemas/WalletAddressImportRow"
                        }
                      }
                    }
                  },
                  {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10000,
                    "items": {
                      "$ref": "#/components/schemas/WalletAddressImportRow"
                    }
                  }
                ]
              },
              "example": {
                "entries": [
                  {
                    "address": "0xBeneficiaryWallet01",
                    "chain": "ETH",
                    "holder_name": "Ana Diaz",
                    "holder_vendor_data": "user-042"
                  },
                  {
                    "address_hash": "4f7d2e1c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e",
                    "chain": "bitcoin",
                    "holder_vendor_data": "user-043"
                  },
                  {
                    "address": "rExchangeSharedAddress01",
                    "chain": "XRP",
                    "memo": "104729",
                    "holder_name": "Ana Diaz"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "ملف CSV بترميز UTF-8 بحجم لا يتجاوز 5 ميغابايت مع صف رأس يحدد أسماء أعمدته (حقول الصفوف أو أسمائها المستعارة). تُعتبر الخلايا الفارغة كأنها لم تُرسل؛ وتتجاهل عملية الاستيراد الأعمدة التي لا تقرؤها."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl (JSON)",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/wallet-addresses/import/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"entries\": [{\"address\": \"0xBeneficiaryWallet01\", \"chain\": \"ETH\", \"holder_name\": \"Ana Diaz\"}, {\"address\": \"rExchangeSharedAddress01\", \"chain\": \"XRP\", \"memo\": \"104729\"}]}'"
          },
          {
            "lang": "curl",
            "label": "curl (CSV)",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/wallet-addresses/import/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -F 'file=@wallets.csv;type=text/csv'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.wallet_addresses.bulk_import(\n    body={\n        \"entries\": [{\n            \"address\": \"0xBeneficiaryWallet01\",\n            \"chain\": \"ETH\",\n            \"holder_name\": \"Ana Diaz\",\n            \"holder_vendor_data\": \"user-042\",\n        }, {\n            \"address_hash\": \"4f7d2e1c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e\",\n            \"chain\": \"bitcoin\",\n            \"holder_vendor_data\": \"user-043\",\n        }, {\n            \"address\": \"rExchangeSharedAddress01\",\n            \"chain\": \"XRP\",\n            \"memo\": \"104729\",\n            \"holder_name\": \"Ana Diaz\",\n        }],\n    },\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.walletAddresses.bulkImport({\n  file: await fileFromPath(\"wallet-addresses.csv\"),\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.WalletAddresses.BulkImport(ctx, didit.TravelRuleWalletAddressesBulkImportParams{\n\tFile: didit.Some(didit.FileFromPath(\"wallet-addresses.csv\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.TravelRuleWalletAddressesBulkImportParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().walletAddresses().bulkImport(TravelRuleWalletAddressesBulkImportParams.builder()\n        .file(Path.of(\"wallet-addresses.csv\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->walletAddresses->bulkImport([\n    'file' => File::fromPath('wallet-addresses.csv'),\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.wallet_addresses.bulk_import(\n  body: {\n    entries: [{\n      address: \"0xBeneficiaryWallet01\",\n      chain: \"ETH\",\n      holder_name: \"Ana Diaz\",\n      holder_vendor_data: \"user-042\",\n    }, {\n      address_hash: \"4f7d2e1c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e\",\n      chain: \"bitcoin\",\n      holder_vendor_data: \"user-043\",\n    }, {\n      address: \"rExchangeSharedAddress01\",\n      chain: \"XRP\",\n      memo: \"104729\",\n      holder_name: \"Ana Diaz\",\n    }],\n  }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.WalletAddresses.BulkImportAsync(new TravelRuleWalletAddressesBulkImportParams\n{\n    File = FileUpload.FromPath(\"wallet-addresses.csv\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "تم إنشاء كل صف، أو كان موجوداً بالفعل في السجل، أو كان تكراراً لصف سابق.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletAddressImportReport"
                },
                "example": {
                  "total": 3,
                  "created": 2,
                  "existing": 1,
                  "duplicate": 0,
                  "failed": 0,
                  "rows": [
                    {
                      "row": 1,
                      "status": "existing",
                      "entry_id": "11111111-2222-3333-4444-555555555555",
                      "errors": {},
                      "duplicate_of_row": null
                    },
                    {
                      "row": 2,
                      "status": "created",
                      "entry_id": "22222222-3333-4444-5555-666666666666",
                      "errors": {},
                      "duplicate_of_row": null
                    },
                    {
                      "row": 3,
                      "status": "created",
                      "entry_id": "33333333-4444-5555-6666-777777777777",
                      "errors": {},
                      "duplicate_of_row": null
                    }
                  ]
                }
              }
            }
          },
          "207": {
            "description": "فشل صف واحد على الأقل؛ وتم استيراد الصفوف الأخرى. يحدد كل صف فاشل أخطاءه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletAddressImportReport"
                },
                "example": {
                  "total": 2,
                  "created": 1,
                  "existing": 0,
                  "duplicate": 0,
                  "failed": 1,
                  "rows": [
                    {
                      "row": 1,
                      "status": "created",
                      "entry_id": "44444444-5555-6666-7777-888888888888",
                      "errors": {},
                      "duplicate_of_row": null
                    },
                    {
                      "row": 2,
                      "status": "failed",
                      "entry_id": null,
                      "errors": {
                        "address": [
                          "Send address, address_hash or both."
                        ]
                      },
                      "duplicate_of_row": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "لا يمكن قراءة الطلب نفسه: تم إرسال كل من `entries` و`file`، أو لم يتم إرسال أي منهما؛ أكثر من 10,000 صف؛ ملف يتجاوز 5 ميغابايت، أو ليس بتنسيق UTF-8 CSV، أو بدون صف رأس أو بدون صفوف.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "file": [
                    "At most 10000 rows per import."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/counterparty-contacts/": {
      "get": {
        "summary": "سرد جهات اتصال الطرف المقابل",
        "description": "عناوين الامتثال التي قد يرسل إليها مسار EMAIL لتطبيقك: جهات اتصال منصة Didit بالإضافة إلى جهات الاتصال الخاصة بتطبيقك، بما في ذلك المرتدة، الأحدث أولاً. مقسمة إلى صفحات باستخدام `limit` (الافتراضي 50) و`offset`؛ يتوقف `count` عند 100، لذا فإن 100 تعني 100 أو أكثر.",
        "operationId": "listTravelRuleCounterpartyContacts",
        "x-didit-sdk": {
          "resource": "travel_rule.counterparty_contacts",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "counterparty",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "جهات الاتصال الخاصة بإدخال الدليل هذا فقط. يجب أن تكون بتنسيق UUID؛ والقيمة الفارغة تعني عدم تطبيق تصفية."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "حجم الصفحة، القيمة الافتراضية 50."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "الصفوف المراد تخطيها."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/travel-rule/counterparty-contacts/?counterparty={vasp_id}' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.counterparty_contacts.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.counterpartyContacts.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.CounterpartyContacts.ListAutoPaging(ctx, didit.TravelRuleCounterpartyContactsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().counterpartyContacts().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->travelRule->counterpartyContacts->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.counterparty_contacts.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.CounterpartyContacts.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "جهات الاتصال.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TravelRuleCounterpartyContact"
                      }
                    }
                  }
                },
                "example": {
                  "count": 1,
                  "next": null,
                  "previous": null,
                  "results": [
                    {
                      "uuid": "6c1f9b8e-2d4a-4f7e-8b3c-5a9d0e1f2a3b",
                      "counterparty": "0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91",
                      "counterparty_name": "Example Counterparty VASP",
                      "email": "compliance@counterparty.example",
                      "name": "Compliance desk",
                      "source": "application",
                      "scope": "application",
                      "created_by": "",
                      "verified_at": null,
                      "is_invalid": false,
                      "invalid_reason": "",
                      "invalid_detail": "",
                      "invalid_at": null,
                      "created_at": "2026-10-19T09:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`counterparty` ليس بصيغة UUID.",
            "content": {
              "application/json": {
                "example": {
                  "counterparty": [
                    "Must be a valid UUID."
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "إضافة جهة اتصال للطرف المقابل",
        "description": "يضيف عنوان امتثال خاصاً لإدخال دليل واحد. لا يراه ويستخدمه سوى تطبيقك، ويكتب مسار EMAIL إليه قبل أي جهة اتصال بالمنصة. وتؤدي إضافة عنوان يمتلكه الإدخال بالفعل ضمن جهات اتصالك الخاصة إلى إرجاع جهة الاتصال تلك.",
        "operationId": "createTravelRuleCounterpartyContact",
        "x-didit-sdk": {
          "resource": "travel_rule.counterparty_contacts",
          "method": "create",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleCounterpartyContactCreate"
              },
              "example": {
                "counterparty": "0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91",
                "email": "compliance@counterparty.example",
                "name": "Compliance desk"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/counterparty-contacts/ \\\n  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"counterparty\": \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\", \"email\": \"compliance@counterparty.example\", \"name\": \"Compliance desk\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.counterparty_contacts.create(\n    counterparty=\"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n    email=\"compliance@counterparty.example\",\n    name=\"Compliance desk\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.counterpartyContacts.create({\n  counterparty: \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n  email: \"compliance@counterparty.example\",\n  name: \"Compliance desk\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.CounterpartyContacts.Create(ctx, didit.TravelRuleCounterpartyContactCreate{\n\tCounterparty: \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n\tEmail:        \"compliance@counterparty.example\",\n\tName:         didit.String(\"Compliance desk\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleCounterpartyContactCreate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().counterpartyContacts().create(TravelRuleCounterpartyContactCreate.builder()\n        .counterparty(\"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\")\n        .email(\"compliance@counterparty.example\")\n        .name(\"Compliance desk\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->counterpartyContacts->create([\n    'counterparty' => '0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91',\n    'email' => 'compliance@counterparty.example',\n    'name' => 'Compliance desk',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.counterparty_contacts.create(\n  counterparty: \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n  email: \"compliance@counterparty.example\",\n  name: \"Compliance desk\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.CounterpartyContacts.CreateAsync(new TravelRuleCounterpartyContactCreate\n{\n    Counterparty = \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n    Email = \"compliance@counterparty.example\",\n    Name = \"Compliance desk\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "201": {
            "description": "تمت إضافة جهة الاتصال.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleCounterpartyContact"
                },
                "example": {
                  "uuid": "6c1f9b8e-2d4a-4f7e-8b3c-5a9d0e1f2a3b",
                  "counterparty": "0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91",
                  "counterparty_name": "Example Counterparty VASP",
                  "email": "compliance@counterparty.example",
                  "name": "Compliance desk",
                  "source": "application",
                  "scope": "application",
                  "created_by": "",
                  "verified_at": null,
                  "is_invalid": false,
                  "invalid_reason": "",
                  "invalid_detail": "",
                  "invalid_at": null,
                  "created_at": "2026-10-19T09:00:00Z"
                }
              }
            }
          },
          "400": {
            "description": "حقل مفقود أو غير صالح، أو لا يوجد إدخال دليل بهذا المعرّف.",
            "content": {
              "application/json": {
                "example": {
                  "counterparty": [
                    "No directory entry with this id."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/counterparty-contacts/{contact_uuid}/": {
      "delete": {
        "summary": "حذف جهة اتصال الطرف المقابل",
        "description": "يحذف إحدى جهات الاتصال الخاصة بتطبيقك. يتوقف مسار EMAIL فوراً عن تحديثها. لا يمكن حذف جهات اتصال المنصة.",
        "operationId": "deleteTravelRuleCounterpartyContact",
        "x-didit-sdk": {
          "resource": "travel_rule.counterparty_contacts",
          "method": "delete",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "contact_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE https://verification.didit.me/v3/travel-rule/counterparty-contacts/{contact_uuid}/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.travel_rule.counterparty_contacts.delete(\n    \"11111111-2222-3333-4444-555555555555\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.travelRule.counterpartyContacts.delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.TravelRule.CounterpartyContacts.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.travelRule().counterpartyContacts().delete(\"11111111-2222-3333-4444-555555555555\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->travelRule->counterpartyContacts->delete('11111111-2222-3333-4444-555555555555');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.counterparty_contacts.delete(\"11111111-2222-3333-4444-555555555555\")"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.TravelRule.CounterpartyContacts.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");"
          }
        ],
        "responses": {
          "204": {
            "description": "تم الحذف."
          },
          "404": {
            "description": "لا توجد جهة اتصال في تطبيقك تملك هذا المعرّف. تُرجع جهة الاتصال التابعة للمنصة رمز 404 أيضاً."
          }
        }
      }
    },
    "/v3/travel-rule/transfers/": {
      "get": {
        "summary": "سرد تحويلات Travel Rule",
        "description": "تحويلات Travel Rule الخاصة بتطبيقك، الأحدث أولاً، مقسمة إلى صفحات باستخدام `limit` (الافتراضي 50) و`offset`. تحمل الصفوف أسماء VASP والمحافظ والملاحظات فقط، ولا تتضمن أبداً بيانات الأشخاص. تحدد القيم المفصولة بفواصل عدة عناصر. تُرجع القيمة غير المعروفة استجابة 400 مع ذكر اسم المعامل، على سبيل المثال `{\"direction\": [\"Unknown value(s): inbound.\"]}`.",
        "operationId": "listTravelRuleTransfers",
        "x-didit-sdk": {
          "resource": "travel_rule.transfers",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "INBOUND أو OUTBOUND أو كلاهما مفصولين بفاصلة. حساس لحالة الأحرف."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "حالة تحويل واحدة أو أكثر، مفصولة بفواصل."
          },
          {
            "name": "rail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "واحد أو أكثر من INTERNAL، TRP، GTR، TRUST، VERIFYVASP، SYGNA، EMAIL، TEST_VASP، مفصولة بفواصل."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "withdrawal، أو deposit أو message، مفصولة بفواصل."
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "عملة المعاملة، غير حساسة لحالة الأحرف."
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "التحويلات التي تم إنشاؤها في هذا اليوم أو بعده (UTC)، بتنسيق YYYY-MM-DD."
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "التحويلات التي تم إنشاؤها في هذا اليوم أو قبله (UTC)، بتنسيق YYYY-MM-DD."
          },
          {
            "name": "counterparty",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف `id` الخاص بإدخال في الدليل أو عضو في شبكة Didit من GET /v3/travel-rule/vasps/: تحويلاتك مع ذلك الطرف المقابل. تؤدي القيمة التي لا تمثل معرّفاً صالحاً إلى الرد بالرمز 400."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "حجم الصفحة، القيمة الافتراضية 50."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "الصفوف المراد تخطيها."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/travel-rule/transfers/?direction=OUTBOUND&status=AWAITING_COUNTERPARTY' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.transfers.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.transfers.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.Transfers.ListAutoPaging(ctx, didit.TravelRuleTransfersListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().transfers().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->travelRule->transfers->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.transfers.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.Transfers.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة من التحويلات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TravelRuleTransferRow"
                      }
                    }
                  }
                },
                "example": {
                  "count": 1,
                  "next": null,
                  "previous": null,
                  "results": [
                    {
                      "id": "5b0f6c2e-2a4d-4f0e-9a41-0c3f9a7e1d22",
                      "transaction_id": "a3c1e8f4-7b62-4d1a-8e0b-2f9d6c4b7a10",
                      "txn_id": "wd-2026-10-19-0042",
                      "txn_date": "2026-10-19T08:41:12Z",
                      "kind": "withdrawal",
                      "direction": "OUTBOUND",
                      "status": "AWAITING_COUNTERPARTY",
                      "rail": "TRP",
                      "asset": "ETH",
                      "amount": "1.25",
                      "originator_vasp": "Origin CASP SL",
                      "beneficiary_vasp": "Example Counterparty VASP",
                      "originator_wallet": "0x77ccff0cc624a53cd8b8d8703ced826710211ec7",
                      "beneficiary_wallet": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb",
                      "originator_memo": "",
                      "beneficiary_memo": "",
                      "originator_wallet_type": "vasp",
                      "beneficiary_wallet_type": "vasp",
                      "matched_transaction_id": null,
                      "deadline_at": "2026-10-21T08:41:13Z",
                      "created_at": "2026-10-19T08:41:13Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "قيمة التصفية غير صالحة.",
            "content": {
              "application/json": {
                "example": {
                  "start_date": [
                    "Use the YYYY-MM-DD format."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v3/session/imports/providers/": {
      "get": {
        "summary": "عرض مزودي الترحيل",
        "description": "المزودون الـ 15 الذين يمكنك ترحيل عمليات التحقق منهم: ما يحتاجه كل منهم للاتصال، وما إذا كانت واجهة برمجة التطبيقات الخاصة به تدعم إدراج السجلات، والأذونات التي يحتاجها مفتاحه، وتعيين الحالة الافتراضي الخاص به.",
        "operationId": "get_v3_session_imports_providers_list",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "list_providers",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "موفرو الترحيل.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providers": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ImportProvider"
                      }
                    },
                    "mapping_targets": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "skipped_statuses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.list_providers()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.listProviders();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.ListProviders(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().listProviders();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->listProviders();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.list_providers\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.ListProvidersAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/imports/providers/check/": {
      "post": {
        "summary": "التحقق من مفتاح المزود",
        "description": "قراءة المزود باستخدام مفتاحك قبل إنشاء الترحيل. لا يتم تخزين أي شيء.",
        "operationId": "post_v3_session_imports_providers_check",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "check_provider",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "sumsub",
                      "jumio",
                      "veriff",
                      "onfido",
                      "persona",
                      "metamap",
                      "socure",
                      "idnow",
                      "shufti",
                      "idenfy",
                      "ondato",
                      "trulioo",
                      "au10tix",
                      "complycube",
                      "other"
                    ],
                    "description": "مصدر الترحيل، من `GET /v3/session/imports/providers/`. مطلوب عندما يكون `source` هو `provider`."
                  },
                  "credentials": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "المفتاح المخصص للقراءة فقط الخاص بالمزود، بأسماء الحقول التي تسردها `credential_fields`. مشفر في وضع السكون، ولا يُعاد أبداً، ويتم محوه عند انتهاء الاستيراد. أرسله كسلسلة JSON نصية في multipart."
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "region": {
                        "type": "string",
                        "description": "منطقة المزود، إحدى `regions` التابعة له (Onfido: `eu`، `us`، `ca`)."
                      }
                    }
                  },
                  "record_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "لمزودي `api_ids`: معرف السجل الأول للتصدير الخاص بك."
                  }
                },
                "required": [
                  "provider",
                  "credentials"
                ]
              },
              "example": {
                "provider": "sumsub",
                "credentials": {
                  "app_token": "YOUR_PROVIDER_APP_TOKEN",
                  "secret_key": "YOUR_PROVIDER_SECRET_KEY"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "يمكن للمفتاح قراءة السجلات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "credential_hint": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "رفض المزود المفتاح: `code`، `detail`، `missing_permissions`، `suggested_region`."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.check_provider(\n    provider=\"sumsub\",\n    credentials={\"app_token\": \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\": \"YOUR_PROVIDER_SECRET_KEY\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.checkProvider({\n  provider: \"sumsub\",\n  credentials: { app_token: \"YOUR_PROVIDER_APP_TOKEN\", secret_key: \"YOUR_PROVIDER_SECRET_KEY\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.CheckProvider(ctx, didit.SessionsImportsCheckProviderParams{\n\tProvider:    \"sumsub\",\n\tCredentials: map[string]string{\"app_token\": \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\": \"YOUR_PROVIDER_SECRET_KEY\"},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsImportsCheckProviderParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().checkProvider(SessionsImportsCheckProviderParams.builder()\n        .provider(SessionsImportsCheckProviderParams.Provider.of(\"sumsub\"))\n        .credentials(Map.of(\"app_token\", \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\", \"YOUR_PROVIDER_SECRET_KEY\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->checkProvider([\n    'provider' => 'sumsub',\n    'credentials' => ['app_token' => 'YOUR_PROVIDER_APP_TOKEN', 'secret_key' => 'YOUR_PROVIDER_SECRET_KEY'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.check_provider(\n  provider: \"sumsub\",\n  credentials: { app_token: \"YOUR_PROVIDER_APP_TOKEN\", secret_key: \"YOUR_PROVIDER_SECRET_KEY\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.CheckProviderAsync(new SessionsImportsCheckProviderParams\n{\n    Provider = \"sumsub\",\n    Credentials = new Dictionary<string, string> { [\"app_token\"] = \"YOUR_PROVIDER_APP_TOKEN\", [\"secret_key\"] = \"YOUR_PROVIDER_SECRET_KEY\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/imports/{importId}/start/": {
      "post": {
        "summary": "بدء تشغيل تجريبي",
        "description": "بدء عملية ترحيل اكتمل تشغيلها التجريبي (`READY`): تقوم نفس المهمة بالاستيراد الفعلي، مع تعيين الحالات وخيار قوالب الوجه كما أُرسلت الآن.",
        "operationId": "post_v3_session_imports_start",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "start",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status_mapping": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "Approved",
                        "Declined",
                        "In Review",
                        "Expired",
                        "Not Finished",
                        "Abandoned"
                      ]
                    },
                    "description": "تعديلات على تعيين الحالة الافتراضي للمزود: من حالة المصدر إلى حالة Didit. يتم تخطي الحالتين `Not Finished` و`Abandoned` وحسابهما، ولا يتم استيرادهما أبداً."
                  },
                  "face_templates": {
                    "type": "boolean",
                    "default": false,
                    "description": "إنشاء قوالب بيومترية للوجوه من صور السيلفي المستوردة والبحث عنها ومقارنتها بوجوه التطبيق وقائمة الحظر. يتم وضع علامة على التطابقات للمراجعة فقط. يتطلب `lawful_basis_confirmed`."
                  },
                  "lawful_basis_confirmed": {
                    "type": "boolean",
                    "default": false,
                    "description": "يؤكد أن لديك أساساً قانونياً لمشاركة صور السيلفي هذه مع Didit كمعالج."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "مهمة الاستيراد.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionImportJob"
                }
              }
            }
          },
          "400": {
            "description": "المهمة ليست في حالة ينطبق عليها هذا الإجراء."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.start(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.start(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Start(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsImportsStartParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().start(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->start('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.start(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.StartAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/imports/{importId}/pause/": {
      "post": {
        "summary": "إيقاف مهمة استيراد مؤقتاً",
        "description": "إيقاف استيراد قيد الانتظار أو قيد التشغيل مؤقتاً.",
        "operationId": "post_v3_session_imports_pause",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "pause",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "مهمة الاستيراد.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionImportJob"
                }
              }
            }
          },
          "400": {
            "description": "المهمة ليست في حالة ينطبق عليها هذا الإجراء."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.pause(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.pause(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Pause(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().pause(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->pause('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.pause(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.PauseAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/imports/{importId}/resume/": {
      "post": {
        "summary": "استئناف مهمة استيراد",
        "description": "استئناف عملية استيراد أوقفتها مؤقتاً. تستأنف المهمة التي تم إيقافها مؤقتاً بسبب حد المعدل لدى المزود تلقائياً.",
        "operationId": "post_v3_session_imports_resume",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "resume",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "مهمة الاستيراد.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionImportJob"
                }
              }
            }
          },
          "400": {
            "description": "المهمة ليست في حالة ينطبق عليها هذا الإجراء."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.resume(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.resume(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Resume(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().resume(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->resume('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.resume(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.ResumeAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/imports/{importId}/cancel/": {
      "post": {
        "summary": "إلغاء مهمة استيراد",
        "description": "إلغاء الاستيراد. تبقى البيانات التي تم استيرادها؛ ويتم مسح الملف الذي تم رفعه والمفتاح.",
        "operationId": "post_v3_session_imports_cancel",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "cancel",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "مهمة الاستيراد.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionImportJob"
                }
              }
            }
          },
          "400": {
            "description": "المهمة ليست في حالة ينطبق عليها هذا الإجراء."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.cancel(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.cancel(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Cancel(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().cancel(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->cancel('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.cancel(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.CancelAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/imports/{importId}/retry/": {
      "post": {
        "summary": "إعادة محاولة الترحيل",
        "description": "إعادة تشغيل عملية ترحيل منتهية كمهمة جديدة، باستخدام مفتاح جديد (تم محو المفتاح القديم). تحتفظ العملية بمزود الخدمة وسير العمل والمنطقة ومطابقة الحالات واختيار قوالب الوجه؛ ويتم تخطي كل ما هو موجود بالفعل في Didit.",
        "operationId": "post_v3_session_imports_retry",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "retry",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "credentials": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "المفتاح المخصص للقراءة فقط الخاص بالمزود، بأسماء الحقول التي تسردها `credential_fields`. مشفر في وضع السكون، ولا يُعاد أبداً، ويتم محوه عند انتهاء الاستيراد. أرسله كسلسلة JSON نصية في multipart."
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "معرّفات السجلات أو ملف التصدير مجدداً، لمزودي `api_ids` و`export_file`."
                  }
                }
              },
              "example": {
                "credentials": {
                  "app_token": "YOUR_PROVIDER_APP_TOKEN",
                  "secret_key": "YOUR_PROVIDER_SECRET_KEY"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "مهمة الاستيراد الجديدة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionImportJob"
                }
              }
            }
          },
          "400": {
            "description": "ليست عملية ترحيل، أو لم تنتهِ، أو رفض المزود المفتاح."
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.retry(\n    \"11111111-2222-3333-4444-555555555555\",\n    credentials={\"app_token\": \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\": \"YOUR_PROVIDER_SECRET_KEY\"},\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.retry(\"11111111-2222-3333-4444-555555555555\", {\n  credentials: { app_token: \"YOUR_PROVIDER_APP_TOKEN\", secret_key: \"YOUR_PROVIDER_SECRET_KEY\" },\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Retry(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsImportsRetryParams{\n\tCredentials: didit.Some(map[string]string{\"app_token\": \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\": \"YOUR_PROVIDER_SECRET_KEY\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsImportsRetryParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().retry(\"11111111-2222-3333-4444-555555555555\", SessionsImportsRetryParams.builder()\n        .credentials(Map.of(\"app_token\", \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\", \"YOUR_PROVIDER_SECRET_KEY\"))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->retry('11111111-2222-3333-4444-555555555555', [\n    'credentials' => ['app_token' => 'YOUR_PROVIDER_APP_TOKEN', 'secret_key' => 'YOUR_PROVIDER_SECRET_KEY'],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.retry(\n  \"11111111-2222-3333-4444-555555555555\",\n  credentials: { app_token: \"YOUR_PROVIDER_APP_TOKEN\", secret_key: \"YOUR_PROVIDER_SECRET_KEY\" }\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.RetryAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsImportsRetryParams\n{\n    Credentials = new Dictionary<string, string> { [\"app_token\"] = \"YOUR_PROVIDER_APP_TOKEN\", [\"secret_key\"] = \"YOUR_PROVIDER_SECRET_KEY\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/import-jobs/": {
      "get": {
        "summary": "عرض مهام الاستيراد",
        "description": "كل عملية استيراد للتطبيق بصيغة واحدة: عمليات استيراد التحقق والترحيل، للأشخاص والشركات.",
        "operationId": "get_v3_import_jobs_list",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "list_jobs",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "sessions",
                "users",
                "businesses"
              ],
              "default": "all"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "مهام الاستيراد، الأحدث أولاً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ImportJobSummary"
                      }
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "all": {
                          "type": "integer"
                        },
                        "running_and_waiting": {
                          "type": "integer"
                        },
                        "needs_attention": {
                          "type": "integer"
                        },
                        "done": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.list_jobs()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.listJobs();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.ListJobs(ctx, didit.SessionsImportsListJobsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().listJobs();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->listJobs();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.list_jobs\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.ListJobsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/import-jobs/active/": {
      "get": {
        "summary": "سرد مهام الاستيراد النشطة",
        "description": "ما قيد التشغيل أو في الانتظار، بالإضافة إلى ما انتهى للتو، لمؤشر التقدم.",
        "operationId": "get_v3_import_jobs_active",
        "x-didit-sdk": {
          "resource": "sessions.imports",
          "method": "list_active_jobs",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "مهام الاستيراد النشطة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ImportJobSummary"
                      }
                    },
                    "running": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "مفتاح API مفقود أو غير صالح أو ملغى، أو لا يمكن للجهة المستدعية استيراد عمليات التحقق لهذا التطبيق.",
            "content": {
              "application/json": {
                "examples": {
                  "Forbidden": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.list_active_jobs()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.listActiveJobs();\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.ListActiveJobs(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().listActiveJobs();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->imports->listActiveJobs();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.list_active_jobs\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.ListActiveJobsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/organization/{organization_id}/application/{application_id}/transactions/delete/": {
      "delete": {
        "summary": "حذف المعاملات دفعة واحدة",
        "description": "حذف معاملة واحدة أو أكثر بشكل دائم. حددها باستخدام `transaction_uuids`، أو احذف كل المعاملات في التطبيق باستخدام `delete_all: true`.\n\nتُحذف المعاملة المحذوفة مع السجلات الخاصة بها فقط: أطرافها، والوسوم، والملاحظات، وروابط طرق الدفع، والمستندات وكل نسخة مخزنة من ملفاتها، وعمليات تشغيل القواعد، والتنبيهات، ونتائج المزود، ولقطة الشبكة، وبيانات Travel Rule. تبقى الحالات والأشخاص والشركات؛ وتتم إزالة ارتباطها بالمعاملة المحذوفة. تتوقف مسودات التقارير التنظيمية عن إدراجها ويُعاد بناؤها بدونها. الحذف دائم ولا يمكن التراجع عنه؛ ولا يوجد endpoint للتراجع.\n\nإذا كانت أي معاملة محددة مدرجة في تقرير تنظيمي نهائي، فسيتم رفض الطلب بأكمله برمز `409` ولن يُحذف أي شيء. يستخدم نص الاستجابة `code: in_filed_report` ويحدد اسم كل معاملة والتقارير التي تدرجها. احذف تلك التقارير، ثم أعد إرسال الطلب.",
        "operationId": "batch_delete_transactions",
        "x-didit-sdk": {
          "resource": "transactions",
          "method": "batch_delete",
          "auth": "api_key",
          "server": true,
          "scope": "application"
        },
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID الخاص بالمؤسسة."
          },
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف UUID للتطبيق."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "oneOf": [
                  {
                    "title": "Selected transactions",
                    "required": [
                      "transaction_uuids"
                    ],
                    "properties": {
                      "transaction_uuids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "description": "معرّفات UUID لمعاملات Didit المطلوب حذفها. مطلوبة ما لم تكن `delete_all` مضبوطة على true.",
                        "minItems": 1
                      },
                      "delete_all": {
                        "type": "boolean",
                        "enum": [
                          false
                        ],
                        "default": false,
                        "description": "اتركه دون إرسال أو أرسل `false` عند تحديد المعاملات باستخدام `transaction_uuids`."
                      }
                    }
                  },
                  {
                    "title": "All transactions",
                    "required": [
                      "delete_all"
                    ],
                    "properties": {
                      "delete_all": {
                        "type": "boolean",
                        "enum": [
                          true
                        ],
                        "description": "حذف كل المعاملات في التطبيق. يتم تجاهل `transaction_uuids`."
                      },
                      "transaction_uuids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "description": "يتم تجاهله عندما تكون قيمة `delete_all` هي true."
                      }
                    }
                  }
                ]
              },
              "examples": {
                "Selected transactions": {
                  "value": {
                    "transaction_uuids": [
                      "abcdef12-3456-7890-abcd-ef1234567890",
                      "12345678-90ab-cdef-1234-567890abcdef"
                    ]
                  }
                },
                "All transactions": {
                  "value": {
                    "delete_all": true
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl (selected transactions)",
            "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/transactions/delete/' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"transaction_uuids\": [\"abcdef12-3456-7890-abcd-ef1234567890\"]}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.transactions.batch_delete(\n    body={\n        \"transaction_uuids\": [\"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\"],\n    },\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.transactions.batchDelete({\n  transaction_uuids: [\"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\"],\n});"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.TransactionsBatchDeleteParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.transactions().batchDelete(TransactionsBatchDeleteParams.builder()\n        .putAdditionalProperty(\"transaction_uuids\", List.of(\"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\"))\n        .build());"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n$didit = new DiditClient();\n\n$didit->transactions->batchDelete([\n    'transaction_uuids' => ['abcdef12-3456-7890-abcd-ef1234567890', '12345678-90ab-cdef-1234-567890abcdef'],\n]);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.transactions.batch_delete(\n  body: {\n    transaction_uuids: [\"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\"],\n  }\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Transactions.BatchDeleteAsync(new TransactionsBatchDeleteParams\n{\n    TransactionUuids = new string[] { \"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\" },\n});"
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف المعاملات المحددة."
          },
          "400": {
            "description": "لم يتم تقديم أي محدد للمعاملة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transaction_uuids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "transaction_uuids": [
                    "This field is required unless delete_all is true."
                  ]
                }
              }
            }
          },
          "403": {
            "description": "لا يمكن لمفتاح API حذف المعاملات. يتطلب endpoint إذن `write:transactions`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "توجد معاملة محددة واحدة على الأقل مدرجة في تقرير تنظيمي نهائي. لم يتم حذف أي شيء.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InFiledReportError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/travel-rule/networks/": {
      "get": {
        "summary": "الحصول على شبكات Travel Rule",
        "description": "قراءة الحالة الحقيقية لكل شبكة لهذا التطبيق: ما إذا كانت ترسل عبر عضويتك الخاصة أو عبر عضوية Didit، ولماذا لا يمكنها ذلك بعد. يُرجع أيضاً استبيان العناية الواجبة والمشاركين لديك. القراءة لا تنشئ أي شيء.",
        "operationId": "getTravelRuleNetworks",
        "x-didit-sdk": {
          "resource": "travel_rule.networks",
          "method": "retrieve",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/networks/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.retrieve()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.retrieve();\nconsole.log(result);"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().retrieve();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->networks->retrieve();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.retrieve\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.RetrieveAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "حالات الشبكة والاستبيان والمشاركون.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleNetworksOverview"
                },
                "examples": {
                  "Before the questionnaire": {
                    "value": {
                      "platform_networks_enabled": false,
                      "questionnaire": {
                        "status": "draft",
                        "answers": {},
                        "submitted_at": null,
                        "reviewed_at": null,
                        "review_note": "",
                        "history": [],
                        "updated_at": null
                      },
                      "participants": [],
                      "networks": {
                        "gtr": {
                          "rail": "GTR",
                          "mode": "unavailable",
                          "state": "didit_onboarding",
                          "reason": "didit_membership_not_live",
                          "platform_available": false,
                          "connected": false,
                          "participant": null,
                          "vasps_reachable": 0,
                          "routed_30d": 0
                        },
                        "trust": {
                          "rail": "TRUST",
                          "mode": "unavailable",
                          "state": "unavailable",
                          "reason": "own_membership_only",
                          "platform_available": false,
                          "connected": false,
                          "participant": null,
                          "vasps_reachable": 0,
                          "routed_30d": 0
                        },
                        "verifyvasp": {
                          "rail": "VERIFYVASP",
                          "mode": "unavailable",
                          "state": "didit_onboarding",
                          "reason": "didit_membership_not_live",
                          "platform_available": false,
                          "connected": false,
                          "participant": null,
                          "vasps_reachable": 0,
                          "routed_30d": 0
                        },
                        "sygna": {
                          "rail": "SYGNA",
                          "mode": "unavailable",
                          "state": "didit_onboarding",
                          "reason": "didit_membership_not_live",
                          "platform_available": false,
                          "connected": false,
                          "participant": null,
                          "vasps_reachable": 0,
                          "routed_30d": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          }
        }
      }
    },
    "/v3/travel-rule/networks/questionnaire/": {
      "get": {
        "summary": "الحصول على استبيان الشبكة",
        "description": "قراءة استبيان العناية الواجبة للشبكة من Didit لهذا التطبيق، وحالته، وملاحظة مراجعة Didit. التطبيق الذي لم يحفظ استبياناً من قبل يقرأ مسودة فارغة.",
        "operationId": "getTravelRuleNetworkQuestionnaire",
        "x-didit-sdk": {
          "resource": "travel_rule.networks",
          "method": "retrieve_questionnaire",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET https://verification.didit.me/v3/travel-rule/networks/questionnaire/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.retrieve_questionnaire()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.retrieveQuestionnaire();\nconsole.log(result);"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().retrieveQuestionnaire();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->networks->retrieveQuestionnaire();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.retrieve_questionnaire\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.RetrieveQuestionnaireAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الاستبيان.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaire"
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          }
        }
      },
      "put": {
        "summary": "حفظ إجابات استبيان الشبكة",
        "description": "حفظ الإجابات على الاستبيان طالما أنه بحالة draft أو changes_requested. عمليات الحفظ جزئية: يتم الاحتفاظ بالإجابات التي لا ترسلها.",
        "operationId": "updateTravelRuleNetworkQuestionnaire",
        "x-didit-sdk": {
          "resource": "travel_rule.networks",
          "method": "update_questionnaire",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PUT https://verification.didit.me/v3/travel-rule/networks/questionnaire/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"legal_name\": \"Example VASP Ltd\", \"incorporation_country\": \"ES\", \"aml_ctf_policy_attested\": true}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.update_questionnaire(\n    legal_name=\"Example VASP Ltd\",\n    incorporation_country=\"ES\",\n    aml_ctf_policy_attested=True,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.updateQuestionnaire({\n  legal_name: \"Example VASP Ltd\",\n  incorporation_country: \"ES\",\n  aml_ctf_policy_attested: true,\n});\nconsole.log(result);"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleNetworkQuestionnaireAnswers;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().updateQuestionnaire(TravelRuleNetworkQuestionnaireAnswers.builder()\n        .legalName(\"Example VASP Ltd\")\n        .incorporationCountry(\"ES\")\n        .amlCtfPolicyAttested(true)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->networks->updateQuestionnaire([\n    'legal_name' => 'Example VASP Ltd',\n    'incorporation_country' => 'ES',\n    'aml_ctf_policy_attested' => true,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.update_questionnaire(\n  legal_name: \"Example VASP Ltd\",\n  incorporation_country: \"ES\",\n  aml_ctf_policy_attested: true\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.UpdateQuestionnaireAsync(new TravelRuleNetworkQuestionnaireAnswers\n{\n    LegalName = \"Example VASP Ltd\",\n    IncorporationCountry = \"ES\",\n    AmlCtfPolicyAttested = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaireAnswers"
              },
              "example": {
                "legal_name": "Example VASP Ltd",
                "incorporation_country": "ES",
                "aml_ctf_policy_attested": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "الاستبيان مع الإجابات المدمجة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaire"
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق، مفهرس بحسب الحقل."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "الوصول إلى الشبكة عبر عضوية Didit ليس مفتوحاً بعد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "travel_rule_platform_networks_disabled"
                      ]
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "الاستبيان موجود لدى Didit أو تم اتخاذ قرار بشأنه: لا يمكن تغييره إلا أثناء حالتي draft أو changes_requested.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "travel_rule_questionnaire_not_editable"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/networks/questionnaire/submit/": {
      "post": {
        "summary": "إرسال استبيان الشبكة",
        "description": "أرسل الاستبيان المحفوظ إلى مراجعة Didit. يجب أن تكون الإجابات المحفوظة كاملة: كل حقل باستثناء lei وdata_protection_contact_email، مع صحة الإقرارات الثلاثة (true). تقوم Didit بقبوله، أو طلب تغييرات (تعديل وإعادة الإرسال) أو رفضه. تُحال الشبكات التي طلبتها أثناء فترة تعليقه إلى إجراءات التسجيل الخاصة بها بمجرد قبوله.",
        "operationId": "submitTravelRuleNetworkQuestionnaire",
        "x-didit-sdk": {
          "resource": "travel_rule.networks",
          "method": "submit_questionnaire",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/networks/questionnaire/submit/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.submit_questionnaire()\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.submitQuestionnaire();\nconsole.log(result);"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().submitQuestionnaire();\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->networks->submitQuestionnaire();\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.submit_questionnaire\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.SubmitQuestionnaireAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الاستبيان المُقدَّم.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaire"
                }
              }
            }
          },
          "400": {
            "description": "الإجابات المحفوظة غير مكتملة أو غير صالحة، مفهرسة حسب الحقل."
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "الوصول إلى الشبكة عبر عضوية Didit ليس مفتوحاً بعد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "travel_rule_platform_networks_disabled"
                      ]
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "الاستبيان موجود لدى Didit أو تم اتخاذ قرار بشأنه: لا يمكن تغييره إلا أثناء حالتي draft أو changes_requested.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "travel_rule_questionnaire_not_editable"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/networks/{network}/request/": {
      "post": {
        "summary": "طلب شبكة Travel Rule",
        "description": "طلب المشارك الخاص بهذا التطبيق على شبكة تشملها عضوية Didit (مثل GTR أو Sygna). بدون استبيان معتمد، ينتظر المشارك ذلك (questionnaire_pending)؛ ومع وجود استبيان معتمد، ينتقل إلى مرحلة التسجيل على الشبكة (submitted_to_network) ويصبح نشطاً بمجرد أن تمنحه الشبكة رمزاً. الإجراء idempotent: يتم إرجاع المشارك المعلق أو قيد التسجيل أو النشط دون تغيير. إذا رفضت الشبكة التسجيل (تم تعيين last_error)، فإن إرسال الطلب مرة أخرى يؤدي إلى إعادة المحاولة. لا يمكن الوصول إلى TRUST وVerifyVASP إلا من خلال عضويتك الخاصة: تقبل TRUST الأعضاء لكل VASP، وتخدم VerifyVASP Enclave معرّف VASP واحداً.",
        "operationId": "requestTravelRuleNetworkAccess",
        "x-didit-sdk": {
          "resource": "travel_rule.networks",
          "method": "request_access",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "network",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "gtr",
                "sygna"
              ]
            },
            "description": "الشبكة المطلوب الانضمام إليها من خلال عضوية Didit."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/networks/gtr/request/ \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.request_access(\n    \"your-network\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.requestAccess(\"your-network\");\nconsole.log(result);"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().requestAccess(\"your-network\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->networks->requestAccess('your-network');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.request_access(\"your-network\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.RequestAccessAsync(\"your-network\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "المشارك الخاص بك على الشبكة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleNetworkParticipant"
                }
              }
            }
          },
          "400": {
            "description": "شبكة غير معروفة، أو شبكة لا تدعمها Didit (اربط عضويتك الخاصة)، أو تطبيق في البيئة التجريبية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "travel_rule_network_own_membership_only",
                        "travel_rule_network_sandbox_application"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "مفتاح API مفقود أو غير صالح."
          },
          "403": {
            "description": "الوصول إلى الشبكة عبر عضوية Didit ليس مفتوحاً بعد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "travel_rule_platform_networks_disabled"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/address-validation/": {
      "post": {
        "summary": "التحقق من عنوان",
        "description": "تأكيد وجود العنوان والحصول عليه مُوحَّداً: خطوط التسليم ومكوناته وإحداثياته. يؤكد هذا العنوان فقط؛ ولا يربط العنوان بأي شخص مطلقاً.\n\n**الطلب.** أرسل العنوان في سطر واحد (`address`) أو كحقول مهيكلة (`address_line_1` واختيارياً `address_line_2` و`city` و`region` و`postal_code`)، وتجنب إرسال الاثنين معاً، وحدد دائماً `country` الخاص به (ISO 3166-1 alpha-2 أو alpha-3).\n\n**النتيجة.** تكون قيمة `address_validation.status` هي `verified` (مؤكد حتى مستوى المبنى)، أو `partially_verified` (مؤكد حتى مستوى الشارع أو أعلى فقط)، أو `not_verified` (تطابقت المنطقة أو المدينة فقط، أو لم يتطابق أي شيء)، أو `unavailable` (تعذر إجراء التحقق). رمز حالة HTTP هو `200` لكل طلب مكتمل، بما في ذلك `unavailable`؛ أعد محاولة النتيجة `unavailable` لاحقاً.\n\n**الفوترة.** تبلغ تكلفة الاستدعاء المباشر $0.10 لكل عنوان تم التحقق منه. لا يتم فرض رسوم على النتيجة `unavailable`. لا يتم تخزين أي شيء باستثناء سجل الاستخدام: لا يتم إنشاء أي جلسة ويتم إرجاع النتيجة في هذه الاستجابة فقط.\n\n**البيئة التجريبية.** تتحقق مفاتيح البيئة التجريبية من صحة الطلب وتُرجع دائماً نتيجة حتمية `verified` تعكس العنوان المُرسل، دون استهلاك أرصدة.\n\n**المصادقة.** أرسل مفتاح API الخاص بتطبيقك في `x-api-key`. تُرجع بيانات الاعتماد المفقودة أو غير الصالحة الرمز `403` - لا تُرجع واجهة API هذه الرمز `401` مطلقاً.\n\n**حد المعدل.** ميزانية كتابة مشتركة تبلغ 300 طلب في الدقيقة لكل مفتاح API عبر endpoints الخاصة بـ POST/PATCH/DELETE (عمليات إنشاء المعاملات واستيعاب الأحداث لها ميزانية منفصلة تبلغ 600).",
        "operationId": "post_v3_address_validation",
        "x-didit-sdk": {
          "resource": "address_validation",
          "method": "validate",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Standalone APIs"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/address-validation/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"address_line_1\": \"1600 Amphitheatre Pkwy\",\n    \"city\": \"Mountain View\",\n    \"region\": \"CA\",\n    \"postal_code\": \"94043\",\n    \"country\": \"US\"\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.address_validation.validate(\n    address_line_1=\"1600 Amphitheatre Pkwy\",\n    city=\"Mountain View\",\n    region=\"CA\",\n    postal_code=\"94043\",\n    country=\"US\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.addressValidation.validate({\n  address_line_1: \"1600 Amphitheatre Pkwy\",\n  city: \"Mountain View\",\n  region: \"CA\",\n  postal_code: \"94043\",\n  country: \"US\",\n});\nconsole.log(result);"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.AddressValidationRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.addressValidation().validate(AddressValidationRequest.builder()\n        .addressLine1(\"1600 Amphitheatre Pkwy\")\n        .city(\"Mountain View\")\n        .region(\"CA\")\n        .postalCode(\"94043\")\n        .country(\"US\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->addressValidation->validate([\n    'address_line_1' => '1600 Amphitheatre Pkwy',\n    'city' => 'Mountain View',\n    'region' => 'CA',\n    'postal_code' => '94043',\n    'country' => 'US',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.address_validation.validate(\n  address_line_1: \"1600 Amphitheatre Pkwy\",\n  city: \"Mountain View\",\n  region: \"CA\",\n  postal_code: \"94043\",\n  country: \"US\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.AddressValidation.ValidateAsync(new AddressValidationRequest\n{\n    AddressLine1 = \"1600 Amphitheatre Pkwy\",\n    City = \"Mountain View\",\n    Region = \"CA\",\n    PostalCode = \"94043\",\n    Country = \"US\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddressValidationRequest"
              },
              "examples": {
                "Structured": {
                  "summary": "حقول العنوان المهيكل",
                  "value": {
                    "address_line_1": "1600 Amphitheatre Pkwy",
                    "city": "Mountain View",
                    "region": "CA",
                    "postal_code": "94043",
                    "country": "US"
                  }
                },
                "One line": {
                  "summary": "العنوان بالكامل في سطر واحد",
                  "value": {
                    "address": "Paseo de la Castellana 259, 28046 Madrid",
                    "country": "ES"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "اكتمل التحقق. اقرأ `address_validation.status`؛ يكون كود HTTP دائماً `200` للطلب المكتمل.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressValidationResponse"
                },
                "examples": {
                  "Verified": {
                    "summary": "عنوان حقيقي، مؤكَّد حتى مستوى المبنى",
                    "value": {
                      "request_id": "6f7d2c1e-1c5a-4a1e-9b8f-2a1f0f4b9c3d",
                      "address_validation": {
                        "status": "verified",
                        "verification_level": "premise",
                        "address": {
                          "address_line_1": "1600 Amphitheatre Pkwy",
                          "address_line_2": null,
                          "city": "Mountain View",
                          "region": "CA",
                          "postal_code": "94043-1351",
                          "country": "US"
                        },
                        "formatted_address": "1600 Amphitheatre Pkwy, Mountain View CA 94043-1351",
                        "latitude": 37.422022,
                        "longitude": -122.08429
                      },
                      "created_at": "2026-10-27T11:20:00.000000+00:00"
                    }
                  },
                  "Not verified": {
                    "summary": "شارع مختلق: تطابقت المدينة فقط",
                    "value": {
                      "request_id": "0b9e3f4a-6c2d-4e8b-a1f7-5d3c2b1a0e9f",
                      "address_validation": {
                        "status": "not_verified",
                        "verification_level": "locality",
                        "address": {
                          "address_line_1": "Calle Inventada Que No Existe 99999 28046",
                          "address_line_2": null,
                          "city": "Madrid",
                          "region": "Madrid",
                          "postal_code": null,
                          "country": "ES"
                        },
                        "formatted_address": "Calle Inventada Que No Existe 99999 28046, Madrid, MADRID, SPAIN",
                        "latitude": 40.42603054,
                        "longitude": -3.68645331
                      },
                      "created_at": "2026-10-27T11:21:00.000000+00:00"
                    }
                  },
                  "Unavailable": {
                    "summary": "تعذر تشغيل التحقق؛ لم يتم احتساب رسوم",
                    "value": {
                      "request_id": "3c1b2a0f-9e8d-4c7b-b6a5-1f0e9d8c7b6a",
                      "address_validation": {
                        "status": "unavailable",
                        "verification_level": null,
                        "address": null,
                        "formatted_address": null,
                        "latitude": null,
                        "longitude": null
                      },
                      "created_at": "2026-10-27T11:22:00.000000+00:00"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AddressValidationValidationError"
          },
          "403": {
            "$ref": "#/components/responses/AddressValidationPermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitedWrite"
          }
        }
      }
    },
    "/v3/travel-rule/wallet-proofs/": {
      "get": {
        "summary": "عرض قائمة بإثباتات المحفظة بلقطات الشاشة للمراجعة",
        "description": "قائمة انتظار المراجعة الخاصة بك لإثباتات ملكية المحفظة عبر لقطات الشاشة. لقطة الشاشة هي الإثبات الوحيد الذي لا تستطيع Didit التحقق منه بنفسها: بمجرد أن يقوم المستخدم النهائي بتحميلها من أداة الواجهة، تظل في حالة PENDING حتى توافق عليها أو ترفضها عبر POST /v3/travel-rule/wallet-proofs/{proof_uuid}/decision/. يتم الترتيب من الأقدم أولاً، بحيث تتم معالجة قائمة الانتظار بدءاً من الإثبات الذي انتظر لأطول فترة. تظهر فقط لقطات الشاشة التي تم تحميلها، ولا يظهر أبداً أي إثبات لم يقم المستخدم النهائي بتحميل ملف له بعد، ولا يظهر أي إثبات لمحفظة قمت بحذفها من دفتر العناوين لديك (تغلق Didit هذه الإثباتات كـ OWNERSHIP_CHANGED).",
        "operationId": "listTravelRuleWalletProofs",
        "x-didit-sdk": {
          "resource": "travel_rule.wallet_proofs",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "أي إثباتات سيتم إدراجها. القيمة الافتراضية هي PENDING، وهي الإثباتات التي لا تزال بحاجة إلى اتخاذ قرار.",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "VERIFIED",
                "REJECTED",
                "EXPIRED"
              ],
              "default": "PENDING"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://verification.didit.me/v3/travel-rule/wallet-proofs/?status=PENDING \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.wallet_proofs.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.walletProofs.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().walletProofs().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->travelRule->walletProofs->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.wallet_proofs.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.WalletProofs.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ],
        "responses": {
          "200": {
            "description": "إثباتات لقطات الشاشة مقسّمة إلى صفحات. يكون العدد دقيقاً حتى 100 ويُحدد سقفه عند 100 لما يتجاوز ذلك.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TravelRuleWalletProofReview"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "حالة غير معروفة."
          },
          "401": {
            "description": "x-api-key مفقود أو غير صالح."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن المعاملات."
          }
        }
      }
    },
    "/v3/travel-rule/wallet-proofs/{proof_uuid}/decision/": {
      "post": {
        "summary": "الموافقة على إثبات المحفظة عبر لقطة شاشة أو رفضه",
        "description": "اتخاذ قرار بشأن إثبات لقطة شاشة من قائمة انتظار المراجعة الخاصة بك. يؤدي approve إلى التحقق من الإثبات ومدخل دفتر العناوين وتطبيق الملكية على التحويل الذي تم إنشاء جلسة عنصر الواجهة من أجله، تماماً كما يفعل التوقيع الذي تم التحقق منه. لا تؤكد لقطة الشاشة أبداً تحويلاً أرسله عميل آخر لدى Didit عبر مسار INTERNAL: يتطلب ذلك رسالة موقعة أو إيداعاً اختبارياً. ويؤدي reject إلى إغلاق الإثبات كـ REJECTED مع failure_reason بقيمة REVIEW_REJECTED؛ حيث يمكن للمستخدم النهائي بدء إثبات جديد من عنصر الواجهة. ويتم الاحتفاظ بالملاحظة مع الإثبات.",
        "operationId": "decideTravelRuleWalletProof",
        "x-didit-sdk": {
          "resource": "travel_rule.wallet_proofs",
          "method": "decide",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "proof_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف proof_id من قائمة انتظار المراجعة.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleWalletProofDecision"
              },
              "example": {
                "decision": "approve",
                "note": "Address matches the wallet app."
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/wallet-proofs/{proof_uuid}/decision/ \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\": \"approve\", \"note\": \"Address matches the wallet app.\"}'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.wallet_proofs.decide(\n    \"11111111-2222-3333-4444-555555555555\",\n    decision=\"approve\",\n    note=\"Address matches the wallet app.\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.walletProofs.decide(\"11111111-2222-3333-4444-555555555555\", {\n  decision: \"approve\",\n  note: \"Address matches the wallet app.\",\n});\nconsole.log(result);"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWalletProofDecision;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().walletProofs().decide(\"11111111-2222-3333-4444-555555555555\", TravelRuleWalletProofDecision.builder()\n        .decision(TravelRuleWalletProofDecision.Decision.of(\"approve\"))\n        .note(\"Address matches the wallet app.\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->walletProofs->decide('11111111-2222-3333-4444-555555555555', [\n    'decision' => 'approve',\n    'note' => 'Address matches the wallet app.',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.wallet_proofs.decide(\n  \"11111111-2222-3333-4444-555555555555\",\n  decision: \"approve\",\n  note: \"Address matches the wallet app.\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.WalletProofs.DecideAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleWalletProofDecision\n{\n    Decision = \"approve\",\n    Note = \"Address matches the wallet app.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "الإثبات الذي تم البت فيه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWalletProofReview"
                }
              }
            }
          },
          "400": {
            "description": "قرار غير صالح، أو ملاحظة تتجاوز 512 حرفاً."
          },
          "401": {
            "description": "x-api-key مفقود أو غير صالح."
          },
          "403": {
            "description": "تفتقر الجهة المستدعية إلى إذن المعاملات."
          },
          "404": {
            "description": "لا يوجد إثبات لقطة شاشة مُرسَل بهذا المعرّف في تطبيقك."
          },
          "409": {
            "description": "تم اتخاذ القرار بشأن الإثبات بالفعل (يتضمن متن الاستجابة حالته)، أو رمز OWNERSHIP_CHANGED: تغير حامل المحفظة أو حُذفت المحفظة بعد إنشاء جلسة عنصر واجهة المستخدم، وبالتالي أُغلق الإثبات ويحتاج الحامل الحالي إلى إثبات جديد.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofError"
                }
              }
            }
          }
        }
      }
    },
    "/v3/travel-rule/widget/{token}/proofs/": {
      "post": {
        "summary": "بدء إثبات ملكية المحفظة",
        "description": "endpoint عام مفتاحه هو token جلسة عنصر واجهة المستخدم، ولا يتطلب أي مفتاح API: يستدعيه عنصر واجهة المستخدم المستضاف عندما يختار المستخدم النهائي طريقة إثبات. لا يُنشأ الإثبات ولا يُحتسب ضمن مسار تحويل الإثباتات الخاص بك إلا بدءاً من هذا الاستدعاء. يؤدي اختيار الطريقة نفسها مجدداً إلى إرجاع الإثبات المفتوح بالفعل (200، التحدي نفسه أو مبلغ الإيداع نفسه) بدلاً من بدء إثبات ثانٍ؛ ويؤدي اختيار طريقة أخرى إلى إغلاق الإثبات غير المكتمل بالحالة METHOD_SWITCHED، باستثناء لقطة الشاشة المُرسلة أو الإيداع التجريبي الذي لا يزال قيد الفحص. يُرجع MESSAGE_SIGNING التحدي المطلوب توقيعه؛ ويُرجع SATOSHI_TEST عنوان الإيداع والمبلغ المحدد والنافذة الزمنية؛ ويتم التحقق من SELF_DECLARATION على الفور (الحالة VERIFIED). تنسيقات التوقيع التي يتم التحقق منها لكل عائلة سلاسل: تقبل سلاسل EVM توقيع personal_sign (EIP-191) بترميز hex؛ وتقبل Bitcoin توقيع signmessage وفق BIP-137 (لعناوين P2PKH وP2SH-P2WPKH وP2WPKH) أو توقيعاً بسيطاً وفق BIP-322 (لعناوين P2WPKH وP2TR) بترميز base64؛ وتقبل Solana توقيع Ed25519 على التحدي بترميز base58؛ وتقبل Tron توقيع signMessageV2 (TIP-191) بترميز hex. ويفشل التوقيع الكامل أو توقيع إثبات الأموال وفق BIP-322، أو عنوان متعدد التوقيع، بالرمز SIGNATURE_UNSUPPORTED_SCHEME.",
        "operationId": "createTravelRuleWidgetProof",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "create_widget_proof",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "token جلسة مبهم يُعاد عند إنشاء جلسة الأداة.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleWidgetProofCreate"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/widget/{token}/proofs/ \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"method\": \"MESSAGE_SIGNING\"}'"
          }
        ],
        "responses": {
          "201": {
            "description": "إثبات جديد بحالة PENDING (أو VERIFIED لـ SELF_DECLARATION).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofSummary"
                }
              }
            }
          },
          "200": {
            "description": "تم استئناف الإثبات المفتوح بالفعل لهذه الطريقة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofSummary"
                }
              }
            }
          },
          "400": {
            "description": "جسم الطلب غير صالح، أو المحفظة لا تتطابق مع التحويل، أو SCREENSHOT غير مسموح به، أو الرمز CHAIN_UNSUPPORTED عندما تكون الطريقة غير متاحة على الشبكة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofError"
                }
              }
            }
          },
          "403": {
            "description": "SELF_DECLARATION غير مسموح به لهذا التطبيق."
          },
          "404": {
            "description": "token غير معروف."
          },
          "409": {
            "description": "الرمز OWNERSHIP_CHANGED: تغير حامل المحفظة أو حُذفت المحفظة بعد إنشاء الجلسة؛ أنشئ جلسة جديدة للحامل الحالي. يُعاد أيضاً لـ SATOSHI_TEST عندما لا تحتوي الجلسة على satoshi_deposit_address، وعندما لا تتبقى أي محاولات للجلسة (لا يوجد رمز؛ يحتوي نص الاستجابة على max_attempts وattempts_used وattempts_remaining بقيمة 0): أنشئ جلسة جديدة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofError"
                }
              }
            }
          },
          "410": {
            "description": "انتهت صلاحية الجلسة."
          }
        }
      }
    },
    "/v3/travel-rule/widget/{token}/proofs/{proof_id}/verify/": {
      "post": {
        "summary": "إرسال أدلة إثبات ملكية المحفظة",
        "description": "endpoint عام مفتاحه هو token جلسة عنصر واجهة المستخدم، ولا يتطلب أي مفتاح API. أرسل الدليل الذي تتطلبه طريقة الإثبات: توقيع لـ MESSAGE_SIGNING، أو txid لـ SATOSHI_TEST (JSON)، أو ملف لـ SCREENSHOT (multipart). تُحتسب كل عملية إرسال كمحاولة. والتوقيع الذي لا يتم التحقق منه، أو الإيداع الذي لا يتطابق، يُرجع الاستجابة 400 مع رمز ويترك الإثبات بالحالة PENDING حتى يتمكن المستخدم النهائي من المحاولة مجدداً. والإيداع الذي تمت رؤيته ولكن لم يتم تأكيده بعد يُرجع الاستجابة 200 بالحالة PENDING وتتم إعادة التحقق منه تلقائياً حتى تُغلق النافذة الزمنية. ولقطة الشاشة تُرجع الاستجابة 200 بالحالة PENDING وتنتظر في قائمة الانتظار للمراجعة الخاصة بك (GET /v3/travel-rule/wallet-proofs/). والإثبات بحالة EXPIRED أو REJECTED لا يتم التحقق منه لاحقاً أبداً: ابدأ إثباتاً جديداً. تنسيقات التوقيع التي يتم التحقق منها لكل عائلة سلاسل: تقبل سلاسل EVM توقيع personal_sign (EIP-191) بترميز hex؛ وتقبل Bitcoin توقيع signmessage وفق BIP-137 (لعناوين P2PKH وP2SH-P2WPKH وP2WPKH) أو توقيعاً بسيطاً وفق BIP-322 (لعناوين P2WPKH وP2TR) بترميز base64؛ وتقبل Solana توقيع Ed25519 على التحدي بترميز base58؛ وتقبل Tron توقيع signMessageV2 (TIP-191) بترميز hex. ويفشل التوقيع الكامل أو توقيع إثبات الأموال وفق BIP-322، أو عنوان متعدد التوقيع، بالرمز SIGNATURE_UNSUPPORTED_SCHEME.",
        "operationId": "verifyTravelRuleWidgetProof",
        "x-didit-sdk": {
          "resource": "travel_rule",
          "method": "verify_widget_proof",
          "auth": "public",
          "server": false
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "token جلسة مبهم يُعاد عند إنشاء جلسة الأداة.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "proof_id",
            "in": "path",
            "required": true,
            "description": "معرّف proof_id الذي تم إرجاعه عند بدء الإثبات.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "signature": {
                    "type": "string",
                    "description": "MESSAGE_SIGNING: توقيع المحفظة على تحدي الإثبات."
                  },
                  "txid": {
                    "type": "string",
                    "description": "SATOSHI_TEST: معرّف المعاملة للإيداع التجريبي."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "SCREENSHOT: صورة تظهر المحفظة في تطبيق المحفظة الخاص بالمستخدم النهائي."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://verification.didit.me/v3/travel-rule/widget/{token}/proofs/{proof_id}/verify/ \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"signature\": \"0x...\"}'"
          }
        ],
        "responses": {
          "200": {
            "description": "VERIFIED، أو لا تزال PENDING (لقطة شاشة قيد المراجعة، إيداع لم يُفهرس أو لم يتم تأكيده بعد، مع الرمز DEPOSIT_NOT_FOUND أو DEPOSIT_UNCONFIRMED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofVerifyResult"
                }
              }
            }
          },
          "400": {
            "description": "دليل مفقود؛ أو محاولة فاشلة تُبقي الإثبات في حالة PENDING حتى يتمكن المستخدم النهائي من المحاولة مجددًا (الرمز SIGNATURE_INVALID أو SIGNATURE_UNSUPPORTED_SCHEME أو DEPOSIT_LOOKUP_FAILED)؛ أو إيداع تجريبي يرفض الإثبات (الرمز DEPOSIT_MISMATCH أو DEPOSIT_STALE أو TXID_REUSED، والحالة REJECTED، مع عدد محاولات الجلسة): يؤدي اختيار طريقة مرة أخرى إلى بدء إثبات جديد طالما أن attempts_remaining أكبر من 0.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofError"
                }
              }
            }
          },
          "404": {
            "description": "token غير معروف، أو لا يوجد إثبات كهذا في هذه الجلسة."
          },
          "409": {
            "description": "الرمز OWNERSHIP_CHANGED (يتم إغلاق الإثبات به)؛ إثبات مغلق (REJECTED أو EXPIRED)، مع حالته والرمز الذي أُغلق به وعدد محاولات الجلسة: اختر طريقة مجدداً لبدء إثبات جديد؛ أو إثبات SELF_DECLARATION، الذي يتم التحقق منه عند بدئه.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofError"
                }
              }
            }
          },
          "410": {
            "description": "انتهت صلاحية الجلسة، أو الرمز WINDOW_EXPIRED عند إغلاق نافذة اختبار satoshi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleWidgetProofError"
                }
              }
            }
          }
        }
      }
    },
    "/v3/id-verification/wallets/verifications/{request_id}/response/": {
      "post": {
        "operationId": "submit_wallet_verification_response",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "submit_verification_response",
          "auth": "api_key",
          "server": true
        },
        "description": "محافظ Digital Credentials API (مثل Google Wallet): أرسل ما أرجعته المحفظة إلى صفحتك أو تطبيقك لعملية تحقق يكون next_action الخاص بها هو request_digital_credential. تفك Didit تشفيره، وتتحقق من توقيع الجهة المُصدِرة مقارنةً بجذور الجهات المُصدِرة الموثوقة، ومن كل قيمة مُعادة مقارنةً بملخصها الموقّع، وتوقيع الجهاز عبر نطاقك الأصلي وهذا الطلب، ثم تتخذ القرار بشأن التحقق: تم التحقق (تتم الفوترة مرة واحدة) أو تم الرفض مع رمز الخطأ. استخدام لمرة واحدة: عملية إرسال ثانية تُرجع التحقق المحسوم قراره.",
        "summary": "إرسال استجابة المحفظة",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "قيمة request_id التي أرجعها الـ endpoint للبدء.",
            "required": true
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest"
              },
              "example": {
                "response": {
                  "protocol": "openid4vp-v1-signed",
                  "data": {
                    "response": "<compact JWE returned by the wallet>"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest"
              },
              "example": {
                "response": {
                  "protocol": "openid4vp-v1-signed",
                  "data": {
                    "response": "<compact JWE returned by the wallet>"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest"
              },
              "example": {
                "response": {
                  "protocol": "openid4vp-v1-signed",
                  "data": {
                    "response": "<compact JWE returned by the wallet>"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "google_wallet",
                      "name": "Google Wallet",
                      "issuing_authority": "Google Wallet (ID pass) and US state issuers (mobile driving licence)"
                    },
                    "country": "USA",
                    "status": "Approved",
                    "outcome": "verified",
                    "error": null,
                    "interaction": "digital_credentials",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": null,
                    "identity": {
                      "full_name": "Alex Example",
                      "first_name": "Alex",
                      "last_name": "Example",
                      "date_of_birth": "1990-01-31",
                      "nationality": "USA",
                      "issuing_state": "USA"
                    },
                    "attributes": {
                      "document_number": "X0000000",
                      "document_expiry_date": "2030-01-31"
                    },
                    "level_of_assurance": "substantial",
                    "verified_at": "2026-01-01T10:01:00Z",
                    "signature_valid": true,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة (x-api-key أو Authorization: Bearer)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ not_found: لا توجد عملية تحقق من المحفظة لهذا التطبيق تتضمن request_id هذا."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ not_a_digital_credentials_wallet: لا تقبل عملية التحقق هذه استجابة من المحفظة."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة التحقق من المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/response/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"response\": {\n    \"protocol\": \"openid4vp-v1-signed\",\n    \"data\": {\n      \"response\": \"<compact JWE returned by the wallet>\"\n    }\n  }\n}'"
          }
        ]
      }
    },
    "/v3/id-verification/wallets/google-wallet/": {
      "post": {
        "operationId": "start_google_wallet_wallet_verification",
        "x-didit-sdk": {
          "resource": "id_wallets",
          "method": "start_google_wallet",
          "auth": "api_key",
          "server": true
        },
        "description": "بدء تسجيل الدخول عبر Google Wallet (Google Wallet (بطاقة الهوية الرقمية) وجهات الإصدار في الولايات الأمريكية (رخصة القيادة على الهاتف المحمول)؛ USA، GBR، BRA، SGP، TWN) بدون أي سير عمل. تتم الفوترة مرة واحدة فقط عند التحقق من الهوية. تتضمن الاستجابة next_action.type=request_digital_credential مع طلب وقّعته Didit لتطبيقك، وهو صالح للاستخدام فقط من الأصل. عند تفاعل المستخدم هناك، مرِّر next_action.digital_credentials.request إلى navigator.credentials.get({digital: ...}) (أو إلى Android Credential Manager كـ GetDigitalCredentialOption requestJson)، ثم أرسل ما تُرجعه المحفظة عبر POST إلى /v3/id-verification/wallets/verifications/{request_id}/response/. يعرض المتصفح رمز QR الخاص به عندما تكون المحفظة على جهاز آخر. تتلقى التطبيقات في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة أبداً.",
        "summary": "بدء التحقق عبر Google Wallet",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "description": "مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو نص طلب آخر فيُرجع 409 idempotency_key_reused."
          }
        ],
        "tags": [
          "Digital ID wallets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest"
              },
              "example": {
                "country": "USA",
                "vendor_data": "your-customer-reference",
                "metadata": {
                  "reference": "example"
                },
                "origin": "https://app.example.com"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse"
                },
                "example": {
                  "request_id": "00000000-0000-4000-8000-000000000001",
                  "wallet_verification": {
                    "wallet": {
                      "id": "google_wallet",
                      "name": "Google Wallet",
                      "issuing_authority": "Google Wallet (ID pass) and US state issuers (mobile driving licence)"
                    },
                    "country": "USA",
                    "status": "Not Finished",
                    "outcome": "pending",
                    "error": null,
                    "interaction": "digital_credentials",
                    "simulated": false,
                    "expires_at": "2026-01-01T10:10:00Z",
                    "next_action": {
                      "type": "request_digital_credential",
                      "digital_credentials": {
                        "protocol": "openid4vp-v1-signed",
                        "request": {
                          "requests": [
                            {
                              "protocol": "openid4vp-v1-signed",
                              "data": {
                                "request": "<compact JWS signed by Didit>"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "identity": null,
                    "attributes": null,
                    "level_of_assurance": null,
                    "verified_at": null,
                    "signature_valid": null,
                    "credential_type": "person_identification"
                  },
                  "vendor_data": "your-customer-reference",
                  "metadata": {
                    "reference": "example"
                  },
                  "created_at": "2026-01-01T10:00:00Z"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest"
                }
              }
            },
            "description": "أخطاء التحقق من صحة الحقول ({field: [messages]})، أو الخطأ return_url_invalid، return_url_not_allowed، origin_invalid، origin_not_allowed، invalid_personal_code، invalid_phone_number أو idempotency_key_invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden"
                }
              }
            },
            "description": "بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو insufficient_credits، أو contract_rate_missing."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع Retry-After)."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم إنشاء أي شيء."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
                }
              }
            },
            "description": "الخطأ wallet_not_configured: لا يمكن لهذه البيئة الوصول إلى المحفظة."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://verification.didit.me/v3/id-verification/wallets/google-wallet/ \\\n  --header 'x-api-key: YOUR_API_KEY' \\\n  --header 'Idempotency-Key: your-unique-attempt-key' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"country\": \"USA\",\n  \"vendor_data\": \"your-customer-reference\",\n  \"metadata\": {\n    \"reference\": \"example\"\n  },\n  \"origin\": \"https://app.example.com\"\n}'"
          }
        ],
        "x-didit-wallet-id": "google_wallet"
      }
    },
    "/v3/session/{sessionId}/kyb/documents/": {
      "post": {
        "summary": "رفع مستندات KYB إلى جلسة",
        "description": "رفع مستند شركة أو أكثر (عقد التأسيس، سجل المساهمين، شهادة التأسيس، ...) إلى خطوة مستندات KYB في جلسة التحقق من الشركات (KYB)، من خادمك الخاص بدلاً من الصفحة المستضافة. تُشغّل Didit مسار المعالجة المستضاف: الضغط، وOCR، وفحوصات التلاعب والمطابقة بين المستندات، وتجميع المستندات، مع تقديم الجلسة عند استيفاء مجموعات المستندات المطلوبة. تكلفة هذه الخطوة رسوم ثابتة واحدة بصرف النظر عن عدد الملفات المرسلة. يجب أن تكون الجلسة مفتوحة وضمن خطوة مستندات KYB، كما يجب أن تكون الشركة المختارة في خطوة السجل موجودة بالفعل. يمكنك الاطلاع على الأشخاص المذكورين في المستندات عبر `GET /v3/session/{sessionId}/kyb/extracted-parties/`. يتطلب `write:businesses`.",
        "operationId": "post_v3_session_kyb_documents",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "upload_kyb_documents",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB). يجب أن تنتمي إلى التطبيق الخاص بمفتاح API.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة سير العمل الخاصة بخطوة KYB. لازمة فقط عندما يحتوي سير العمل على أكثر من عقدة KYB واحدة؛ افتراضياً، تستخدم Didit عقدة الجلسة نفسها.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "documents"
                ],
                "properties": {
                  "documents": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "الملفات المطلوب رفعها: JPG، أو JPEG، أو PNG، أو TIFF، أو WEBP، أو PDF أو أرشيفات ZIP منها. ملفات PDF حتى 50 MB، والصور حتى 6 MB قبل الضغط."
                  },
                  "document_passwords": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "إدخال واحد لكل ملف في `documents`، وبنفس الترتيب: كلمة مرور ملف PDF المحمي، ويكون فارغاً لأي ملف آخر."
                  },
                  "document_group": {
                    "type": "string",
                    "enum": [
                      "LEGAL_PRESENCE",
                      "COMPANY_DETAILS",
                      "OWNERSHIP_STRUCTURE",
                      "REPRESENTATIVES_AUTHORIZATION"
                    ],
                    "description": "مجموعة المستندات المطلوبة التي يستجيب لها هذا الرفع."
                  },
                  "locale": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "اللغة المستخدمة لترجمة استجابة الخطوة التالية."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تمت معالجة المستندات. عندما يتم استيفاء كل مجموعة مطلوبة تتقدم الجلسة ويُحدد `next_step` الخطوة التالية؛ بخلاف ذلك تظل في خطوة المستندات وتوضح `document_groups` و`document_answer` ما لا يزال مفقوداً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "type": "boolean"
                    },
                    "next_step": {
                      "type": "string",
                      "nullable": true,
                      "description": "الخطوة التي توجد بها الجلسة بعد الرفع."
                    },
                    "kyb_status": {
                      "type": "string",
                      "description": "حالة فحص الشركة."
                    },
                    "document_answer": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "النتيجة لكل مستند تم رفعه وعمليات الرفع المتبقية."
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "valid": true,
                  "next_step": "KYB_KEY_PEOPLE",
                  "kyb_status": "In Progress"
                }
              }
            }
          },
          "400": {
            "description": "تم رفض مستند (بسبب التلاعب، أو عدم القابلية للقراءة، أو عدم دعمه) أو أن الجلسة لا تحتوي على شركة KYB بعد. أعد المحاولة بملف آخر طالما تبقت محاولات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "message": "No KYB company found. Submit company data first."
                }
              }
            }
          },
          "402": {
            "description": "لم يتبقَّ لدى المؤسسة أي رصيد لخطوة المستندات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Insufficient credits."
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو تنتمي إلى تطبيق آخر، أو أنها خارج حدود مفتاح ذي نطاق محدد؛ لا توجد تفاصيل تميز بين هذه الحالات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Session not found."
                }
              }
            }
          },
          "409": {
            "description": "الجلسة مكتملة (`kyb_session_not_writable`) أو ليست في خطوة مستندات KYB (`kyb_step_mismatch`، مع تحديد اسم الخطوة الحالية في `next_step`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    },
                    "code": {
                      "type": "string"
                    },
                    "next_step": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "The session is not on the step this operation completes.",
                  "code": "kyb_step_mismatch",
                  "next_step": "KYB_REGISTRY"
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DocumentProcessingBusy"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.upload_kyb_documents(\n    \"33333333-4444-5555-6666-777777777777\",\n    documents=[open(\"document.pdf\", \"rb\")],\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.uploadKybDocuments(\"33333333-4444-5555-6666-777777777777\", {\n  documents: [await fileFromPath(\"document.pdf\")],\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UploadKYBDocuments(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsUploadKYBDocumentsParams{\n\tDocuments: []didit.File{didit.FileFromPath(\"document.pdf\")},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.nio.file.Path;\nimport java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUploadKybDocumentsParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().uploadKybDocuments(\"33333333-4444-5555-6666-777777777777\", SessionsUploadKybDocumentsParams.builder()\n        .documents(List.of(Path.of(\"document.pdf\")))\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\nuse Didit\\File;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->uploadKybDocuments('33333333-4444-5555-6666-777777777777', [\n    'documents' => [File::fromPath('document.pdf')],\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.upload_kyb_documents(\n  \"33333333-4444-5555-6666-777777777777\",\n  documents: [Pathname(\"document.pdf\")]\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UploadKybDocumentsAsync(\"33333333-4444-5555-6666-777777777777\", new SessionsUploadKybDocumentsParams\n{\n    Documents = new FileUpload[] { FileUpload.FromPath(\"document.pdf\") },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/kyb/extracted-parties/": {
      "get": {
        "summary": "عرض قائمة بالأطراف المذكورة في المستندات المرفوعة",
        "description": "إرجاع المساهمين والمديرين الذين وردت أسماؤهم في المستندات المرفوعة إلى جلسة KYB هذه، مدمجين لكل شخص ومنسوبين إلى المستندات التي وردت أسماؤهم فيها. اعرضهم على مقدم الطلب للتأكيد، ثم أعلن عنهم باستخدام نقاط endpoint الخاصة بمسودات الأطراف. يظل النطاق نطاقاً: يحتفظ `ownership_percent.text` بالرقم الحرفي و`min` / `max` بالأرقام المقروءة منه. لا يتم تصنيف أي شخص على أنه UBO هنا؛ يتم تحديد ذلك عند إرسال الأطراف، استناداً إلى إعدادات الدور وحدود الملكية الخاصة بسير العمل. توجد نفس القائمة في قرار الجلسة كـ `document_verifications[].extracted_parties`. يتطلب `read:businesses` أو `read:sessions`.",
        "operationId": "get_v3_session_kyb_extracted_parties",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "list_kyb_extracted_parties",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB). يجب أن تنتمي إلى التطبيق الخاص بمفتاح API.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة سير العمل الخاصة بخطوة KYB. لازمة فقط عندما يحتوي سير العمل على أكثر من عقدة KYB واحدة؛ افتراضياً، تستخدم Didit عقدة الجلسة نفسها.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "الأطراف المذكورة في المستندات الحالية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "parties",
                    "document_count"
                  ],
                  "properties": {
                    "parties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "entity_type": {
                            "type": "string",
                            "enum": [
                              "person",
                              "company"
                            ]
                          },
                          "first_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "last_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "appointment_date": {
                            "type": "string",
                            "nullable": true
                          },
                          "designation": {
                            "type": "string",
                            "nullable": true
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "director",
                                    "non_executive_director",
                                    "secretary",
                                    "chairman",
                                    "ubo",
                                    "shareholder",
                                    "representative",
                                    "founder",
                                    "legal_advisor",
                                    "authorized_signatory",
                                    "trustee",
                                    "beneficiary",
                                    "settlor",
                                    "protector",
                                    "company_officer",
                                    "investor",
                                    "other"
                                  ]
                                },
                                "ownership_percent": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string",
                                      "nullable": true,
                                      "description": "نسبة الملكية تماماً كما يذكرها المستند، مثل `25-50%` أو `>50%` أو `NO EXHIBE`."
                                    },
                                    "min": {
                                      "type": "number",
                                      "nullable": true,
                                      "description": "الرقم الأدنى المقروء من `text`؛ ويكون null عندما ينص على عدم وجود أي رقم."
                                    },
                                    "max": {
                                      "type": "number",
                                      "nullable": true,
                                      "description": "الرقم الأعلى المقروء من `text`؛ يكون null عندما لا يحدد أياً منها."
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "documents": {
                            "type": "array",
                            "description": "المستندات المرفوعة التي ذكرت هذا الطرف.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "document_uuid": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "document_type": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "document_subtype": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "original_filename": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "status": {
                                  "type": "string",
                                  "nullable": true
                                }
                              }
                            }
                          }
                        }
                      },
                      "description": "المساهمون والمديرون المذكورون في المستندات المرفوعة، بعد دمجهم حسب الشخص. لا يُصنف أي شخص هنا بصفته UBO: يتم تحديد ذلك عند إرسال الأطراف."
                    },
                    "document_count": {
                      "type": "integer",
                      "description": "عدد المستندات المرفوعة التي تم قراءة القائمة منها."
                    },
                    "node_id": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "example": {
                  "parties": [
                    {
                      "name": "Ana Lopez",
                      "entity_type": "person",
                      "first_name": "Ana",
                      "last_name": "Lopez",
                      "appointment_date": null,
                      "designation": "Administrador unico",
                      "roles": [
                        {
                          "role": "shareholder",
                          "ownership_percent": {
                            "text": "60%",
                            "min": 60,
                            "max": 60
                          }
                        }
                      ],
                      "documents": [
                        {
                          "document_uuid": "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41",
                          "document_type": "OWNERSHIP_STRUCTURE",
                          "document_subtype": "ARTICLES_OF_INCORPORATION",
                          "original_filename": "acta_constitutiva.pdf",
                          "status": "Approved"
                        }
                      ]
                    }
                  ],
                  "document_count": 1,
                  "node_id": "node_kyb_documents"
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو تنتمي إلى تطبيق آخر، أو أنها خارج حدود مفتاح ذي نطاق محدد؛ لا توجد تفاصيل تميز بين هذه الحالات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Session not found."
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.list_kyb_extracted_parties(\n    \"33333333-4444-5555-6666-777777777777\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.listKybExtractedParties(\"33333333-4444-5555-6666-777777777777\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListKYBExtractedParties(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsListKYBExtractedPartiesParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().listKybExtractedParties(\"33333333-4444-5555-6666-777777777777\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->listKybExtractedParties('33333333-4444-5555-6666-777777777777');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.list_kyb_extracted_parties(\"33333333-4444-5555-6666-777777777777\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ListKybExtractedPartiesAsync(\"33333333-4444-5555-6666-777777777777\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/kyb/parties/drafts/": {
      "get": {
        "summary": "عرض مسودات أطراف KYB",
        "description": "عرض قائمة بالأطراف التي تقوم بإعدادها لجلسة KYB هذه، مرتبة من الأقدم أولاً. لا تُعتبر المسودة طرفًا معلنًا: فهي لا تظهر في القرار أو لوحة التحكم ولا تُنشئ أي جلسة تحقق حتى تقوم بإرسالها باستخدام `POST /v3/session/{sessionId}/kyb/parties/submit/`. يتطلب صلاحية `write:businesses`.",
        "operationId": "get_v3_session_kyb_party_drafts",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "list_kyb_party_drafts",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB). يجب أن تنتمي إلى التطبيق الخاص بمفتاح API.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة سير العمل الخاصة بخطوة KYB. لازمة فقط عندما يحتوي سير العمل على أكثر من عقدة KYB واحدة؛ افتراضياً، تستخدم Didit عقدة الجلسة نفسها.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "المسودات المخزنة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "draft_id",
                          "created_at",
                          "updated_at",
                          "party"
                        ],
                        "properties": {
                          "draft_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "party": {
                            "type": "object",
                            "required": [
                              "entity_type",
                              "nationality"
                            ],
                            "properties": {
                              "entity_type": {
                                "type": "string",
                                "enum": [
                                  "person",
                                  "company"
                                ],
                                "description": "ما إذا كان الطرف فرداً أو شركة."
                              },
                              "full_name": {
                                "type": "string",
                                "maxLength": 255,
                                "description": "الاسم الكامل للشخص. أرسله، أو أرسل `first_name` و`last_name`."
                              },
                              "first_name": {
                                "type": "string",
                                "maxLength": 128
                              },
                              "last_name": {
                                "type": "string",
                                "maxLength": 128
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "director",
                                  "non_executive_director",
                                  "secretary",
                                  "chairman",
                                  "ubo",
                                  "shareholder",
                                  "representative",
                                  "founder",
                                  "legal_advisor",
                                  "authorized_signatory",
                                  "trustee",
                                  "beneficiary",
                                  "settlor",
                                  "protector",
                                  "company_officer",
                                  "investor",
                                  "other"
                                ],
                                "description": "الدور الذي يشغله الطرف. قابل للتبديل مع `roles`؛ وعند إرسال الاثنين معاً يتم دمجهما."
                              },
                              "roles": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "director",
                                    "non_executive_director",
                                    "secretary",
                                    "chairman",
                                    "ubo",
                                    "shareholder",
                                    "representative",
                                    "founder",
                                    "legal_advisor",
                                    "authorized_signatory",
                                    "trustee",
                                    "beneficiary",
                                    "settlor",
                                    "protector",
                                    "company_officer",
                                    "investor",
                                    "other"
                                  ]
                                },
                                "description": "كل دور يحمله الطرف. يحتاج الشخص إلى دور واحد على الأقل (هنا أو في `role`)."
                              },
                              "position": {
                                "type": "string",
                                "maxLength": 128,
                                "description": "المسمى الوظيفي لشخص ما."
                              },
                              "date_of_birth": {
                                "type": "string",
                                "format": "date",
                                "nullable": true
                              },
                              "company_name": {
                                "type": "string",
                                "maxLength": 255,
                                "description": "اسم أحد أطراف الشركة. مطلوب عندما يكون `entity_type` هو `company`."
                              },
                              "registration_number": {
                                "type": "string",
                                "maxLength": 100,
                                "description": "رقم التسجيل لطرف من أطراف الشركة."
                              },
                              "email": {
                                "type": "string",
                                "format": "email",
                                "description": "المكان الذي يُرسل إليه رابط التحقق. مطلوب عندما يتعين على الطرف إكمال عملية التحقق، ويعتمد ذلك على إعدادات الدور وحدود الملكية في سير العمل."
                              },
                              "ownership_percent": {
                                "type": "number",
                                "nullable": true,
                                "description": "حصة الشركة التي يملكها الطرف."
                              },
                              "nationality": {
                                "type": "string",
                                "maxLength": 100,
                                "description": "جنسية الشخص، أو دولة تأسيس الشركة. مطلوبة لكل طرف."
                              },
                              "phone_number": {
                                "type": "string",
                                "maxLength": 32
                              },
                              "custom_fields": {
                                "type": "object",
                                "additionalProperties": true,
                                "description": "حقول إضافية محددة في سير العمل."
                              },
                              "skip_verification": {
                                "type": "boolean",
                                "default": false,
                                "description": "طلب تخطي التحقق لهذا الطرف. يتم قبول الطلب فقط عندما يسمح دور الطرف بالتخطي في إعدادات الأشخاص الرئيسيين لسير العمل."
                              }
                            }
                          }
                        }
                      }
                    },
                    "node_id": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "example": {
                  "parties": [
                    {
                      "draft_id": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d",
                      "created_at": "2026-10-31T10:00:00Z",
                      "updated_at": "2026-10-31T10:00:00Z",
                      "party": {
                        "entity_type": "person",
                        "first_name": "Ana",
                        "last_name": "Lopez",
                        "roles": [
                          "ubo",
                          "director"
                        ],
                        "ownership_percent": 60,
                        "nationality": "MEX",
                        "email": "ana.lopez@example.com",
                        "date_of_birth": "1984-06-12"
                      }
                    }
                  ],
                  "node_id": "node_kyb_key_people"
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو تنتمي إلى تطبيق آخر، أو أنها خارج حدود مفتاح ذي نطاق محدد؛ لا توجد تفاصيل تميز بين هذه الحالات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Session not found."
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.list_kyb_party_drafts(\n    \"33333333-4444-5555-6666-777777777777\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.listKybPartyDrafts(\"33333333-4444-5555-6666-777777777777\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListKYBPartyDrafts(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsListKYBPartyDraftsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().listKybPartyDrafts(\"33333333-4444-5555-6666-777777777777\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->listKybPartyDrafts('33333333-4444-5555-6666-777777777777');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.list_kyb_party_drafts(\"33333333-4444-5555-6666-777777777777\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ListKybPartyDraftsAsync(\"33333333-4444-5555-6666-777777777777\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "post": {
        "summary": "إنشاء مسودة طرف KYB",
        "description": "إضافة طرف (شخص أو شركة) إلى القائمة التي تعدها لجلسة KYB هذه. تنطبق نفس الحقول والقواعد المتبعة في شاشة الأشخاص الرئيسيون المستضافة: يحتاج الشخص إلى `full_name` أو `first_name` و`last_name`، ودور واحد على الأقل وجنسية؛ وتحتاج الشركة إلى `company_name` ودولة التأسيس في `nationality`. لا يتم الإقرار بأي شيء أو فوترته حتى استدعاء `POST /v3/session/{sessionId}/kyb/parties/submit/`. يتطلب إذن `write:businesses`.",
        "operationId": "post_v3_session_kyb_party_drafts",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "create_kyb_party_draft",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB). يجب أن تنتمي إلى التطبيق الخاص بمفتاح API.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة سير العمل الخاصة بخطوة KYB. لازمة فقط عندما يحتوي سير العمل على أكثر من عقدة KYB واحدة؛ افتراضياً، تستخدم Didit عقدة الجلسة نفسها.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entity_type",
                  "nationality"
                ],
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "person",
                      "company"
                    ],
                    "description": "ما إذا كان الطرف فرداً أو شركة."
                  },
                  "full_name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "الاسم الكامل للشخص. أرسله، أو أرسل `first_name` و`last_name`."
                  },
                  "first_name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "last_name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "director",
                      "non_executive_director",
                      "secretary",
                      "chairman",
                      "ubo",
                      "shareholder",
                      "representative",
                      "founder",
                      "legal_advisor",
                      "authorized_signatory",
                      "trustee",
                      "beneficiary",
                      "settlor",
                      "protector",
                      "company_officer",
                      "investor",
                      "other"
                    ],
                    "description": "الدور الذي يشغله الطرف. قابل للتبديل مع `roles`؛ وعند إرسال الاثنين معاً يتم دمجهما."
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "director",
                        "non_executive_director",
                        "secretary",
                        "chairman",
                        "ubo",
                        "shareholder",
                        "representative",
                        "founder",
                        "legal_advisor",
                        "authorized_signatory",
                        "trustee",
                        "beneficiary",
                        "settlor",
                        "protector",
                        "company_officer",
                        "investor",
                        "other"
                      ]
                    },
                    "description": "كل دور يحمله الطرف. يحتاج الشخص إلى دور واحد على الأقل (هنا أو في `role`)."
                  },
                  "position": {
                    "type": "string",
                    "maxLength": 128,
                    "description": "المسمى الوظيفي لشخص ما."
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "company_name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "اسم أحد أطراف الشركة. مطلوب عندما يكون `entity_type` هو `company`."
                  },
                  "registration_number": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "رقم التسجيل لطرف من أطراف الشركة."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "المكان الذي يُرسل إليه رابط التحقق. مطلوب عندما يتعين على الطرف إكمال عملية التحقق، ويعتمد ذلك على إعدادات الدور وحدود الملكية في سير العمل."
                  },
                  "ownership_percent": {
                    "type": "number",
                    "nullable": true,
                    "description": "حصة الشركة التي يملكها الطرف."
                  },
                  "nationality": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "جنسية الشخص، أو دولة تأسيس الشركة. مطلوبة لكل طرف."
                  },
                  "phone_number": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "custom_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "حقول إضافية محددة في سير العمل."
                  },
                  "skip_verification": {
                    "type": "boolean",
                    "default": false,
                    "description": "طلب تخطي التحقق لهذا الطرف. يتم قبول الطلب فقط عندما يسمح دور الطرف بالتخطي في إعدادات الأشخاص الرئيسيين لسير العمل."
                  }
                }
              },
              "example": {
                "entity_type": "person",
                "first_name": "Ana",
                "last_name": "Lopez",
                "roles": [
                  "ubo",
                  "director"
                ],
                "ownership_percent": 60,
                "nationality": "MEX",
                "email": "ana.lopez@example.com",
                "date_of_birth": "1984-06-12"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "تم إنشاء المسودة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "draft_id",
                    "created_at",
                    "updated_at",
                    "party"
                  ],
                  "properties": {
                    "draft_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "party": {
                      "type": "object",
                      "required": [
                        "entity_type",
                        "nationality"
                      ],
                      "properties": {
                        "entity_type": {
                          "type": "string",
                          "enum": [
                            "person",
                            "company"
                          ],
                          "description": "ما إذا كان الطرف فرداً أو شركة."
                        },
                        "full_name": {
                          "type": "string",
                          "maxLength": 255,
                          "description": "الاسم الكامل للشخص. أرسله، أو أرسل `first_name` و`last_name`."
                        },
                        "first_name": {
                          "type": "string",
                          "maxLength": 128
                        },
                        "last_name": {
                          "type": "string",
                          "maxLength": 128
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "director",
                            "non_executive_director",
                            "secretary",
                            "chairman",
                            "ubo",
                            "shareholder",
                            "representative",
                            "founder",
                            "legal_advisor",
                            "authorized_signatory",
                            "trustee",
                            "beneficiary",
                            "settlor",
                            "protector",
                            "company_officer",
                            "investor",
                            "other"
                          ],
                          "description": "الدور الذي يشغله الطرف. قابل للتبديل مع `roles`؛ وعند إرسال الاثنين معاً يتم دمجهما."
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "director",
                              "non_executive_director",
                              "secretary",
                              "chairman",
                              "ubo",
                              "shareholder",
                              "representative",
                              "founder",
                              "legal_advisor",
                              "authorized_signatory",
                              "trustee",
                              "beneficiary",
                              "settlor",
                              "protector",
                              "company_officer",
                              "investor",
                              "other"
                            ]
                          },
                          "description": "كل دور يحمله الطرف. يحتاج الشخص إلى دور واحد على الأقل (هنا أو في `role`)."
                        },
                        "position": {
                          "type": "string",
                          "maxLength": 128,
                          "description": "المسمى الوظيفي لشخص ما."
                        },
                        "date_of_birth": {
                          "type": "string",
                          "format": "date",
                          "nullable": true
                        },
                        "company_name": {
                          "type": "string",
                          "maxLength": 255,
                          "description": "اسم أحد أطراف الشركة. مطلوب عندما يكون `entity_type` هو `company`."
                        },
                        "registration_number": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "رقم التسجيل لطرف من أطراف الشركة."
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "description": "المكان الذي يُرسل إليه رابط التحقق. مطلوب عندما يتعين على الطرف إكمال عملية التحقق، ويعتمد ذلك على إعدادات الدور وحدود الملكية في سير العمل."
                        },
                        "ownership_percent": {
                          "type": "number",
                          "nullable": true,
                          "description": "حصة الشركة التي يملكها الطرف."
                        },
                        "nationality": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "جنسية الشخص، أو دولة تأسيس الشركة. مطلوبة لكل طرف."
                        },
                        "phone_number": {
                          "type": "string",
                          "maxLength": 32
                        },
                        "custom_fields": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "حقول إضافية محددة في سير العمل."
                        },
                        "skip_verification": {
                          "type": "boolean",
                          "default": false,
                          "description": "طلب تخطي التحقق لهذا الطرف. يتم قبول الطلب فقط عندما يسمح دور الطرف بالتخطي في إعدادات الأشخاص الرئيسيين لسير العمل."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "draft_id": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d",
                  "created_at": "2026-10-31T10:00:00Z",
                  "updated_at": "2026-10-31T10:00:00Z",
                  "party": {
                    "entity_type": "person",
                    "first_name": "Ana",
                    "last_name": "Lopez",
                    "roles": [
                      "ubo",
                      "director"
                    ],
                    "ownership_percent": 60,
                    "nationality": "MEX",
                    "email": "ana.lopez@example.com",
                    "date_of_birth": "1984-06-12"
                  }
                }
              }
            }
          },
          "400": {
            "description": "أحد حقول الأطراف غير صالح أو أن أحد الحقول المطلوبة مفقود.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "non_field_errors": [
                    "Person parties require at least one role."
                  ]
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو تنتمي إلى تطبيق آخر، أو أنها خارج حدود مفتاح ذي نطاق محدد؛ لا توجد تفاصيل تميز بين هذه الحالات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Session not found."
                }
              }
            }
          },
          "409": {
            "description": "الجلسة مكتملة (`kyb_session_not_writable`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "This verification session is no longer accepting changes.",
                  "code": "kyb_session_not_writable"
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.create_kyb_party_draft(\n    \"33333333-4444-5555-6666-777777777777\",\n    entity_type=\"person\",\n    first_name=\"Ana\",\n    last_name=\"Lopez\",\n    roles=[\"ubo\", \"director\"],\n    date_of_birth=\"1984-06-12\",\n    email=\"ana.lopez@example.com\",\n    ownership_percent=60.0,\n    nationality=\"MEX\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.createKybPartyDraft(\"33333333-4444-5555-6666-777777777777\", {\n  entity_type: \"person\",\n  first_name: \"Ana\",\n  last_name: \"Lopez\",\n  roles: [\"ubo\", \"director\"],\n  date_of_birth: \"1984-06-12\",\n  email: \"ana.lopez@example.com\",\n  ownership_percent: 60.0,\n  nationality: \"MEX\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.CreateKYBPartyDraft(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsCreateKYBPartyDraftParams{\n\tEntityType:       \"person\",\n\tFirstName:        didit.String(\"Ana\"),\n\tLastName:         didit.String(\"Lopez\"),\n\tRoles:            didit.Some([]didit.SessionsCreateKYBPartyDraftParamsRoles{\"ubo\", \"director\"}),\n\tDateOfBirth:      didit.String(\"1984-06-12\"),\n\tEmail:            didit.String(\"ana.lopez@example.com\"),\n\tOwnershipPercent: didit.Float(60.0),\n\tNationality:      \"MEX\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import java.time.LocalDate;\nimport java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsCreateKybPartyDraftParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().createKybPartyDraft(\"33333333-4444-5555-6666-777777777777\", SessionsCreateKybPartyDraftParams.builder()\n        .entityType(SessionsCreateKybPartyDraftParams.EntityType.of(\"person\"))\n        .firstName(\"Ana\")\n        .lastName(\"Lopez\")\n        .roles(List.of(SessionsCreateKybPartyDraftParams.Roles.of(\"ubo\"), SessionsCreateKybPartyDraftParams.Roles.of(\"director\")))\n        .dateOfBirth(LocalDate.parse(\"1984-06-12\"))\n        .email(\"ana.lopez@example.com\")\n        .ownershipPercent(60.0)\n        .nationality(\"MEX\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->createKybPartyDraft('33333333-4444-5555-6666-777777777777', [\n    'entity_type' => 'person',\n    'first_name' => 'Ana',\n    'last_name' => 'Lopez',\n    'roles' => ['ubo', 'director'],\n    'date_of_birth' => '1984-06-12',\n    'email' => 'ana.lopez@example.com',\n    'ownership_percent' => 60.0,\n    'nationality' => 'MEX',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.create_kyb_party_draft(\n  \"33333333-4444-5555-6666-777777777777\",\n  entity_type: \"person\",\n  first_name: \"Ana\",\n  last_name: \"Lopez\",\n  roles: [\"ubo\", \"director\"],\n  date_of_birth: \"1984-06-12\",\n  email: \"ana.lopez@example.com\",\n  ownership_percent: 60.0,\n  nationality: \"MEX\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.CreateKybPartyDraftAsync(\"33333333-4444-5555-6666-777777777777\", new SessionsCreateKybPartyDraftParams\n{\n    EntityType = \"person\",\n    FirstName = \"Ana\",\n    LastName = \"Lopez\",\n    Roles = new SessionsCreateKybPartyDraftParamsRoles[] { \"ubo\", \"director\" },\n    DateOfBirth = \"1984-06-12\",\n    Email = \"ana.lopez@example.com\",\n    OwnershipPercent = 60.0,\n    Nationality = \"MEX\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/kyb/parties/drafts/{draftId}/": {
      "patch": {
        "summary": "تعديل مسودة طرف في KYB",
        "description": "تغيير حقول مسودة طرف واحد. يتم دمج التعديل في المسودة المخزنة والتحقق من صحة الطرف المدمج ككل، لذلك يتم رفض أي تعديل قد يترك الطرف غير مكتمل. يؤدي تغيير `first_name` أو `last_name` إلى استبدال الاسم الكامل المخزن. يتطلب `write:businesses`.",
        "operationId": "patch_v3_session_kyb_party_draft",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "update_kyb_party_draft",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB). يجب أن تنتمي إلى التطبيق الخاص بمفتاح API.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "draftId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لمسودة الطرف (`draft_id` الذي تم إرجاعه عند إنشائها).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة سير العمل الخاصة بخطوة KYB. لازمة فقط عندما يحتوي سير العمل على أكثر من عقدة KYB واحدة؛ افتراضياً، تستخدم Didit عقدة الجلسة نفسها.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "أي مجموعة فرعية من حقول الطرف. يُدمج التعديل في المسودة المحفوظة ويتم التحقق من صحة الطرف المدمج ككل، بحيث يمكن إرسال المسودة التي كانت قابلة للإرسال قبل التعديل بعده أيضاً.",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "person",
                      "company"
                    ],
                    "description": "ما إذا كان الطرف فرداً أو شركة."
                  },
                  "full_name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "الاسم الكامل للشخص. أرسله، أو أرسل `first_name` و`last_name`."
                  },
                  "first_name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "last_name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "director",
                      "non_executive_director",
                      "secretary",
                      "chairman",
                      "ubo",
                      "shareholder",
                      "representative",
                      "founder",
                      "legal_advisor",
                      "authorized_signatory",
                      "trustee",
                      "beneficiary",
                      "settlor",
                      "protector",
                      "company_officer",
                      "investor",
                      "other"
                    ],
                    "description": "الدور الذي يشغله الطرف. قابل للتبديل مع `roles`؛ وعند إرسال الاثنين معاً يتم دمجهما."
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "director",
                        "non_executive_director",
                        "secretary",
                        "chairman",
                        "ubo",
                        "shareholder",
                        "representative",
                        "founder",
                        "legal_advisor",
                        "authorized_signatory",
                        "trustee",
                        "beneficiary",
                        "settlor",
                        "protector",
                        "company_officer",
                        "investor",
                        "other"
                      ]
                    },
                    "description": "كل دور يحمله الطرف. يحتاج الشخص إلى دور واحد على الأقل (هنا أو في `role`)."
                  },
                  "position": {
                    "type": "string",
                    "maxLength": 128,
                    "description": "المسمى الوظيفي لشخص ما."
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "company_name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "اسم أحد أطراف الشركة. مطلوب عندما يكون `entity_type` هو `company`."
                  },
                  "registration_number": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "رقم التسجيل لطرف من أطراف الشركة."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "المكان الذي يُرسل إليه رابط التحقق. مطلوب عندما يتعين على الطرف إكمال عملية التحقق، ويعتمد ذلك على إعدادات الدور وحدود الملكية في سير العمل."
                  },
                  "ownership_percent": {
                    "type": "number",
                    "nullable": true,
                    "description": "حصة الشركة التي يملكها الطرف."
                  },
                  "nationality": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "جنسية الشخص، أو دولة تأسيس الشركة. مطلوبة لكل طرف."
                  },
                  "phone_number": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "custom_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "حقول إضافية محددة في سير العمل."
                  },
                  "skip_verification": {
                    "type": "boolean",
                    "default": false,
                    "description": "طلب تخطي التحقق لهذا الطرف. يتم قبول الطلب فقط عندما يسمح دور الطرف بالتخطي في إعدادات الأشخاص الرئيسيين لسير العمل."
                  }
                }
              },
              "example": {
                "ownership_percent": 55
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "تم تحديث المسودة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "draft_id",
                    "created_at",
                    "updated_at",
                    "party"
                  ],
                  "properties": {
                    "draft_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "party": {
                      "type": "object",
                      "required": [
                        "entity_type",
                        "nationality"
                      ],
                      "properties": {
                        "entity_type": {
                          "type": "string",
                          "enum": [
                            "person",
                            "company"
                          ],
                          "description": "ما إذا كان الطرف فرداً أو شركة."
                        },
                        "full_name": {
                          "type": "string",
                          "maxLength": 255,
                          "description": "الاسم الكامل للشخص. أرسله، أو أرسل `first_name` و`last_name`."
                        },
                        "first_name": {
                          "type": "string",
                          "maxLength": 128
                        },
                        "last_name": {
                          "type": "string",
                          "maxLength": 128
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "director",
                            "non_executive_director",
                            "secretary",
                            "chairman",
                            "ubo",
                            "shareholder",
                            "representative",
                            "founder",
                            "legal_advisor",
                            "authorized_signatory",
                            "trustee",
                            "beneficiary",
                            "settlor",
                            "protector",
                            "company_officer",
                            "investor",
                            "other"
                          ],
                          "description": "الدور الذي يشغله الطرف. قابل للتبديل مع `roles`؛ وعند إرسال الاثنين معاً يتم دمجهما."
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "director",
                              "non_executive_director",
                              "secretary",
                              "chairman",
                              "ubo",
                              "shareholder",
                              "representative",
                              "founder",
                              "legal_advisor",
                              "authorized_signatory",
                              "trustee",
                              "beneficiary",
                              "settlor",
                              "protector",
                              "company_officer",
                              "investor",
                              "other"
                            ]
                          },
                          "description": "كل دور يحمله الطرف. يحتاج الشخص إلى دور واحد على الأقل (هنا أو في `role`)."
                        },
                        "position": {
                          "type": "string",
                          "maxLength": 128,
                          "description": "المسمى الوظيفي لشخص ما."
                        },
                        "date_of_birth": {
                          "type": "string",
                          "format": "date",
                          "nullable": true
                        },
                        "company_name": {
                          "type": "string",
                          "maxLength": 255,
                          "description": "اسم أحد أطراف الشركة. مطلوب عندما يكون `entity_type` هو `company`."
                        },
                        "registration_number": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "رقم التسجيل لطرف من أطراف الشركة."
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "description": "المكان الذي يُرسل إليه رابط التحقق. مطلوب عندما يتعين على الطرف إكمال عملية التحقق، ويعتمد ذلك على إعدادات الدور وحدود الملكية في سير العمل."
                        },
                        "ownership_percent": {
                          "type": "number",
                          "nullable": true,
                          "description": "حصة الشركة التي يملكها الطرف."
                        },
                        "nationality": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "جنسية الشخص، أو دولة تأسيس الشركة. مطلوبة لكل طرف."
                        },
                        "phone_number": {
                          "type": "string",
                          "maxLength": 32
                        },
                        "custom_fields": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "حقول إضافية محددة في سير العمل."
                        },
                        "skip_verification": {
                          "type": "boolean",
                          "default": false,
                          "description": "طلب تخطي التحقق لهذا الطرف. يتم قبول الطلب فقط عندما يسمح دور الطرف بالتخطي في إعدادات الأشخاص الرئيسيين لسير العمل."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "draft_id": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d",
                  "created_at": "2026-10-31T10:00:00Z",
                  "updated_at": "2026-10-31T10:00:00Z",
                  "party": {
                    "entity_type": "person",
                    "first_name": "Ana",
                    "last_name": "Lopez",
                    "roles": [
                      "ubo",
                      "director"
                    ],
                    "ownership_percent": 55,
                    "nationality": "MEX",
                    "email": "ana.lopez@example.com",
                    "date_of_birth": "1984-06-12"
                  }
                }
              }
            }
          },
          "400": {
            "description": "الطرف المدمج غير صالح.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "non_field_errors": [
                    "Person parties require at least one role."
                  ]
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة أو المسودة غير موجودة، أو أن الجلسة خارج تطبيق المفتاح أو حدود مفتاح ذي نطاق محدد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Session not found."
                }
              }
            }
          },
          "409": {
            "description": "الجلسة مكتملة (`kyb_session_not_writable`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "This verification session is no longer accepting changes.",
                  "code": "kyb_session_not_writable"
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_kyb_party_draft(\n    \"33333333-4444-5555-6666-777777777777\",\n    \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n    ownership_percent=55.0,\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateKybPartyDraft(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n  {\n    ownership_percent: 55.0,\n  },\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateKYBPartyDraft(ctx, \"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", didit.SessionsUpdateKYBPartyDraftParams{\n\tOwnershipPercent: didit.Float(55.0),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateKybPartyDraftParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateKybPartyDraft(\"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", SessionsUpdateKybPartyDraftParams.builder()\n        .ownershipPercent(55.0)\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->updateKybPartyDraft('33333333-4444-5555-6666-777777777777', '5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d', [\n    'ownership_percent' => 55.0,\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_kyb_party_draft(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n  ownership_percent: 55.0\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateKybPartyDraftAsync(\"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", new SessionsUpdateKybPartyDraftParams\n{\n    OwnershipPercent = 55.0,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      },
      "delete": {
        "summary": "حذف مسودة طرف KYB",
        "description": "حذف مسودة طرف واحدة. لا تتأثر الأطراف المُعلنة. يتطلب `write:businesses`.",
        "operationId": "delete_v3_session_kyb_party_draft",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "delete_kyb_party_draft",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB). يجب أن تنتمي إلى التطبيق الخاص بمفتاح API.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "draftId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لمسودة الطرف (`draft_id` الذي تم إرجاعه عند إنشائها).",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة سير العمل الخاصة بخطوة KYB. لازمة فقط عندما يحتوي سير العمل على أكثر من عقدة KYB واحدة؛ افتراضياً، تستخدم Didit عقدة الجلسة نفسها.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "تم حذف المسودة. لا يوجد نص استجابة."
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة أو المسودة غير موجودة، أو أن الجلسة خارج تطبيق المفتاح أو حدود مفتاح ذي نطاق محدد.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Session not found."
                }
              }
            }
          },
          "409": {
            "description": "الجلسة مكتملة (`kyb_session_not_writable`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "This verification session is no longer accepting changes.",
                  "code": "kyb_session_not_writable"
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.sessions.delete_kyb_party_draft(\n    \"33333333-4444-5555-6666-777777777777\",\n    \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.sessions.deleteKybPartyDraft(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Sessions.DeleteKYBPartyDraft(ctx, \"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", didit.SessionsDeleteKYBPartyDraftParams{}); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().deleteKybPartyDraft(\"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\");"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$didit->sessions->deleteKybPartyDraft('33333333-4444-5555-6666-777777777777', '5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d');"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.delete_kyb_party_draft(\n  \"33333333-4444-5555-6666-777777777777\",\n  \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\"\n)"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Sessions.DeleteKybPartyDraftAsync(\"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\");"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/kyb/parties/submit/": {
      "post": {
        "summary": "إرسال مسودات أطراف KYB",
        "description": "اعتماد المسودات المخزنة باعتبارها الأشخاص الرئيسيين للشركة. هذه هي خطوة الأشخاص الرئيسيين المستضافة تحت مفتاح API الخاص بك: تحدد Didit من خلال إعدادات الأدوار وحدود الملكية لسير العمل الأطراف التي يجب التحقق منها، وتنشئ جلسة KYC فردية واحدة (أو جلسة KYB فرعية لمالك اعتباري) لكل منهم، وترسل رسائل البريد الإلكتروني التي يطلبها سير العمل، وتُقدّم الجلسة إلى المرحلة التالية. تتم فوترة كل جلسة فرعية كما هو الحال في المسار المستضاف. يتم استهلاك المسودات. تكرار الاستدعاء بعد إرسال ناجح لا يغيّر شيئاً ويرد بـ `200` مع `already_submitted: true` والأطراف الموجودة بالفعل. يجب أن تكون الجلسة في خطوة الأشخاص الرئيسيين. أرسل `kyc_session_url` الخاص بكل شخص إليه، أو قم بتضمينه. يتطلب `write:businesses`.",
        "operationId": "post_v3_session_kyb_parties_submit",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "submit_kyb_parties",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق من الشركات (KYB). يجب أن تنتمي إلى التطبيق الخاص بمفتاح API.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "33333333-4444-5555-6666-777777777777"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "عقدة سير العمل الخاصة بخطوة KYB. لازمة فقط عندما يحتوي سير العمل على أكثر من عقدة KYB واحدة؛ افتراضياً، تستخدم Didit عقدة الجلسة نفسها.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "اللغة المستخدمة لترجمة استجابة الخطوة التي تنتقل إليها الجلسة."
                  }
                }
              },
              "example": {
                "locale": "es"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "الأطراف المُصرّح بها (أو المُصرّح بها مسبقاً).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "type": "boolean"
                    },
                    "next_step": {
                      "type": "string",
                      "nullable": true,
                      "description": "الخطوة التي توجد بها الجلسة."
                    },
                    "status": {
                      "type": "string",
                      "description": "حالة جلسة الشركة."
                    },
                    "advanced": {
                      "type": "boolean",
                      "description": "تكون `true` عندما يُقر هذا الاستدعاء بالأطراف ويتقدّم بالجلسة."
                    },
                    "already_submitted": {
                      "type": "boolean",
                      "description": "تكون `true` عندما تكون الأطراف قد تم الإقرار بها بواسطة استدعاء سابق."
                    },
                    "kyb_key_people_status": {
                      "type": "string"
                    },
                    "parties": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/KYBKeyPeopleParty"
                      }
                    }
                  }
                },
                "example": {
                  "valid": true,
                  "next_step": "FINISHED",
                  "status": "In Progress",
                  "advanced": true,
                  "already_submitted": false,
                  "kyb_key_people_status": "In Progress",
                  "parties": []
                }
              }
            }
          },
          "402": {
            "description": "لم يتبقَّ لدى المؤسسة أي رصيد لجلسات التحقق الفرعية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Insufficient credits."
                }
              }
            }
          },
          "401": {
            "description": "انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز `403`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Expired key": {
                    "summary": "انقضى تاريخ الانتهاء للمفتاح",
                    "value": {
                      "detail": "This API key has expired."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`، وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Missing or invalid credentials": {
                    "summary": "لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح",
                    "value": {
                      "detail": "Authentication credentials were not provided or are invalid."
                    }
                  },
                  "Other application": {
                    "summary": "مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة",
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    }
                  },
                  "Scoped key without decisions write": {
                    "summary": "المفتاح محدد النطاق يفتقر إلى decisions: write",
                    "value": {
                      "detail": "This API key has no write access to decisions."
                    }
                  },
                  "IP not allowed": {
                    "summary": "الطلب وارد من خارج قائمة IP المسموح بها للمفتاح",
                    "value": {
                      "detail": "This API key can't be used from this IP address."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "الجلسة غير موجودة، أو تم حذفها، أو تنتمي إلى تطبيق آخر، أو أنها خارج حدود مفتاح ذي نطاق محدد؛ لا توجد تفاصيل تميز بين هذه الحالات.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "example": {
                  "detail": "Session not found."
                }
              }
            }
          },
          "409": {
            "description": "`kyb_no_party_drafts`: لا يوجد شيء لتقديمه. `kyb_parties_already_submitted`: تمت إضافة مسودات بعد التصريح بالأطراف. `kyb_step_mismatch`: الجلسة ليست في خطوة الأشخاص الرئيسيون (يحدد `next_step` خطوتها). `kyb_session_not_writable`: الجلسة مكتملة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    },
                    "code": {
                      "type": "string"
                    },
                    "next_step": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "There are no draft parties to submit.",
                  "code": "kyb_no_party_drafts"
                }
              }
            }
          },
          "429": {
            "description": "تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "رسالة خطأ سهلة القراءة."
                    }
                  }
                },
                "examples": {
                  "Rate limited": {
                    "summary": "استُنفدت الميزانية المخصصة للدقيقة الحالية",
                    "value": {
                      "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "عدد الثواني الواجب انتظارها قبل إعادة المحاولة.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 30
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.submit_kyb_parties(\n    \"33333333-4444-5555-6666-777777777777\",\n    locale=\"es\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.submitKybParties(\"33333333-4444-5555-6666-777777777777\", {\n  locale: \"es\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.SubmitKYBParties(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsSubmitKYBPartiesParams{\n\tLocale: didit.String(\"es\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.SessionsSubmitKybPartiesParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().submitKybParties(\"33333333-4444-5555-6666-777777777777\", SessionsSubmitKybPartiesParams.builder()\n        .locale(\"es\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->submitKybParties('33333333-4444-5555-6666-777777777777', [\n    'locale' => 'es',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.submit_kyb_parties(\n  \"33333333-4444-5555-6666-777777777777\",\n  locale: \"es\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.SubmitKybPartiesAsync(\"33333333-4444-5555-6666-777777777777\", new SessionsSubmitKybPartiesParams\n{\n    Locale = \"es\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    },
    "/v3/session/{sessionId}/files-export/": {
      "post": {
        "summary": "تصدير كل ملفات الجلسة",
        "description": "بدء إعداد ملف ZIP واحد يحتوي على كل صورة وفيديو ومستند من جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB)، بالجودة الأصلية: يتم تخزين الملفات في ملف ZIP تماماً كما تم التقاطها دون إعادة ضغطها مطلقاً. يستجيب بـ `202` مع التصدير؛ اقرأه باستخدام `GET /v3/session/{sessionId}/files-export/{exportId}/` حتى تصبح `status` هي `READY`، ثم نزّل `download_url`. طالما لا يزال تصدير لنفس الجلسة قيد الإعداد، يتم إرجاع ذلك التصدير بدلاً من إنشاء تصدير جديد.\n\nيُحذف ملف ZIP بعد 24 ساعة من جاهزيته، وفوراً عند حذف الجلسة. لا يمكن تصدير جلسة محذوفة. يتم تسجيل كل عملية تصدير وكل رابط تنزيل يُمنح في سجل التدقيق الخاص بالجلسة. يحتاج مفتاح API محدد الصلاحيات إلى `media: read` و`decisions: read`؛ ويحتاج مستخدم لوحة التحكم إلى صلاحية قراءة الجلسات.",
        "operationId": "post_v3_session_files_export",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "export_files",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق (`session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`). يقبل معرّفات جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB). تُرجع الجلسة المحذوفة `404`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/files-export/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.export_files(\n    \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.exportFiles(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ExportFiles(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().exportFiles(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->exportFiles('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.export_files(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ExportFilesAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "202": {
            "description": "التصدير، قيد الإعداد.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFilesExport"
                },
                "example": {
                  "export_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                  "session_id": "11111111-2222-3333-4444-555555555555",
                  "status": "PENDING",
                  "file_count": null,
                  "size_bytes": null,
                  "download_url": null,
                  "expires_at": null,
                  "error": null,
                  "created_at": "2026-10-29T12:00:03Z",
                  "completed_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/session/{sessionId}/files-export/{exportId}/": {
      "get": {
        "summary": "الحصول على تصدير ملفات الجلسة",
        "description": "تقدم عملية التصدير التي بدأت باستخدام `POST /v3/session/{sessionId}/files-export/`. بمجرد أن تصبح `status` هي `READY`، يكون `download_url` عبارة عن عنوان URL موقّع لملف ZIP يظل صالحاً لفترة قصيرة؛ اقرأ عملية التصدير مرة أخرى للحصول على رابط جديد حتى `expires_at`. تُسجَّل كل عملية قراءة تمنح رابط تنزيل في سجل التدقيق الخاص بالجلسة. وتصدير جلسة محذوفة يعيد `404`.",
        "operationId": "get_v3_session_files_export",
        "x-didit-sdk": {
          "resource": "sessions",
          "method": "get_files_export",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "description": "معرّف UUID لجلسة التحقق (`session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`). يقبل معرّفات جلسات التحقق من المستخدمين (KYC) والتحقق من الشركات (KYB). تُرجع الجلسة المحذوفة `404`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "11111111-2222-3333-4444-555555555555"
            }
          },
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "description": "معرّف `export_id` الذي تم إرجاعه بواسطة `POST /v3/session/{sessionId}/files-export/`.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X GET 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/files-export/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/' \\\n  -H 'x-api-key: YOUR_API_KEY'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.get_files_export(\n    \"11111111-2222-3333-4444-555555555555\",\n    \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.getFilesExport(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n);\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.GetFilesExport(ctx, \"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().getFilesExport(\"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\");\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->sessions->getFilesExport('11111111-2222-3333-4444-555555555555', 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee');\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.get_files_export(\n  \"11111111-2222-3333-4444-555555555555\",\n  \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.GetFilesExportAsync(\"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\");\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ],
        "responses": {
          "200": {
            "description": "التصدير.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFilesExport"
                },
                "example": {
                  "export_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                  "session_id": "11111111-2222-3333-4444-555555555555",
                  "status": "READY",
                  "file_count": 9,
                  "size_bytes": 18734120,
                  "download_url": "https://storage.example.com/session/11111111-2222-3333-4444-555555555555/files-export/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/session-42-files.zip?X-Amz-Signature=...",
                  "expires_at": "2026-10-30T12:00:41Z",
                  "error": null,
                  "created_at": "2026-10-29T12:00:03Z",
                  "completed_at": "2026-10-29T12:00:41Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v3/travel-rule/unmatched/": {
      "get": {
        "summary": "عرض قائمة بإيداعات Travel Rule غير المتطابقة",
        "description": "الإيداعات الواردة التي لا تزال بانتظار بيانات Travel Rule من VASP المُرسِل: حالة تحويلها هي `AWAITING_COUNTERPARTY` أو `NOT_ENOUGH_COUNTERPARTY_DATA` أو `COUNTERPARTY_VASP_NOT_FOUND`، ولا توجد رسالة مستلمة مقترنة بها، ولم يقم أحد بمطابقتها يدوياً. الصفوف وعوامل التصفية هي نفسها كما في `GET /v3/travel-rule/transfers/`، الأحدث أولاً، ومقسّمة إلى صفحات باستخدام `limit` (الافتراضي 50) و`offset`. يمكنك إقران إيداع بالرسالة التي أرسلها VASP المُرسِل باستخدام `POST /v3/travel-rule/unmatched/{transaction_uuid}/match/`.",
        "operationId": "listUnmatchedTravelRuleDeposits",
        "x-didit-sdk": {
          "resource": "travel_rule.unmatched_deposits",
          "method": "list",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "INBOUND أو OUTBOUND أو كلاهما مفصولين بفاصلة. حساس لحالة الأحرف."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "حالة تحويل واحدة أو أكثر، مفصولة بفواصل."
          },
          {
            "name": "rail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "واحد أو أكثر من INTERNAL، TRP، GTR، TRUST، VERIFYVASP، SYGNA، EMAIL، TEST_VASP، مفصولة بفواصل."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "withdrawal، أو deposit أو message، مفصولة بفواصل."
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "عملة المعاملة، غير حساسة لحالة الأحرف."
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "التحويلات التي تم إنشاؤها في هذا اليوم أو بعده (UTC)، بتنسيق YYYY-MM-DD."
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "التحويلات التي تم إنشاؤها في هذا اليوم أو قبله (UTC)، بتنسيق YYYY-MM-DD."
          },
          {
            "name": "counterparty",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "معرّف `id` الخاص بإدخال في الدليل أو عضو في شبكة Didit من GET /v3/travel-rule/vasps/: تحويلاتك مع ذلك الطرف المقابل. تؤدي القيمة التي لا تمثل معرّفاً صالحاً إلى الرد بالرمز 400."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000
            },
            "description": "حجم الصفحة، القيمة الافتراضية 50."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "description": "الصفوف المراد تخطيها."
          }
        ],
        "responses": {
          "200": {
            "description": "صفحة من الإيداعات غير المتطابقة.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TravelRuleTransferRow"
                      }
                    }
                  }
                },
                "example": {
                  "count": 1,
                  "next": null,
                  "previous": null,
                  "results": [
                    {
                      "id": "7d3a1c55-0b9e-4d52-8a3c-1f6e2b9d4a08",
                      "transaction_id": "c41f9b2e-5a8d-4e0c-9f17-3b6d8a2e5c91",
                      "txn_id": "dep-2026-10-20-0007",
                      "txn_date": "2026-10-19T08:41:12Z",
                      "kind": "deposit",
                      "direction": "INBOUND",
                      "status": "AWAITING_COUNTERPARTY",
                      "rail": "TRP",
                      "asset": "ETH",
                      "amount": "1.25",
                      "originator_vasp": "",
                      "beneficiary_vasp": "Example Counterparty VASP",
                      "originator_wallet": "0x77ccff0cc624a53cd8b8d8703ced826710211ec7",
                      "beneficiary_wallet": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb",
                      "originator_memo": "",
                      "beneficiary_memo": "",
                      "originator_wallet_type": "vasp",
                      "beneficiary_wallet_type": "vasp",
                      "matched_transaction_id": null,
                      "deadline_at": null,
                      "created_at": "2026-10-19T08:41:13Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "قيمة التصفية غير صالحة.",
            "content": {
              "application/json": {
                "example": {
                  "start_date": [
                    "Use the YYYY-MM-DD format."
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.unmatched_deposits.list():\n    print(item)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.unmatchedDeposits.list()) {\n  console.log(item);\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.UnmatchedDeposits.ListAutoPaging(ctx, didit.TravelRuleUnmatchedDepositsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().unmatchedDeposits().list()) {\n    System.out.println(item);\n}"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\nforeach ($didit->travelRule->unmatchedDeposits->list() as $item) {\n    print_r($item->toArray());\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.unmatched_deposits.list.auto_paging_each do |item|\n  puts item.to_h\nend"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.UnmatchedDeposits.ListAsync())\n{\n    Console.WriteLine(JsonSerializer.Serialize(item));\n}"
          }
        ]
      }
    },
    "/v3/travel-rule/unmatched/{transaction_uuid}/match/": {
      "post": {
        "summary": "مطابقة إيداع Travel Rule مع رسالة مستلمة",
        "operationId": "matchUnmatchedTravelRuleDeposit",
        "x-didit-sdk": {
          "resource": "travel_rule.unmatched_deposits",
          "method": "match",
          "auth": "api_key",
          "server": true
        },
        "tags": [
          "Travel Rule"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "ربط إيداع وارد لا يزال بانتظار بيانات المُرسِل برسالة Travel Rule التي أرسلها VASP المُرسِل بشأنه. يأخذ الإيداع بيانات المُرسِل والطرف المقابل VASP وقناة التحويل من الرسالة، وتسجل عمليتا التحويل كلتاهما التطابق في خطّيهما الزمنيين. `transaction_uuid` هو `transaction_id` الخاص بالإيداع من `GET /v3/travel-rule/unmatched/`. حقل `transaction_id` في النص هو `transaction_id` الخاص بالرسالة المستلمة، من صف في `GET /v3/travel-rule/transfers/?kind=message`؛ لا يتم العثور على `id` الخاص بالتحويل نفسه. يجب أن تكون الرسالة لنفس الأصل الخاص بالإيداع. يعيد الإيداع أو الرسالة المحذوفة من لوحة التحكم رمز `404`؛ أما الذي انتقل بالفعل إلى مرحلة أخرى (تمت مطابقته، أو لم يعد في حالة انتظار) فيعيد رمز `409`.",
        "parameters": [
          {
            "name": "transaction_uuid",
            "in": "path",
            "required": true,
            "description": "معرّف `transaction_id` للإيداع غير المطابق.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleManualMatchRequest"
              },
              "example": {
                "transaction_id": "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "كلا التحويلين بعد المطابقة.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRuleManualMatchResponse"
                },
                "example": {
                  "deposit": {
                    "id": "7d3a1c55-0b9e-4d52-8a3c-1f6e2b9d4a08",
                    "transaction_id": "c41f9b2e-5a8d-4e0c-9f17-3b6d8a2e5c91",
                    "txn_id": "dep-2026-10-20-0007",
                    "txn_date": "2026-10-19T08:41:12Z",
                    "kind": "deposit",
                    "direction": "INBOUND",
                    "status": "AWAITING_COUNTERPARTY",
                    "rail": "TRP",
                    "asset": "ETH",
                    "amount": "1.25",
                    "originator_vasp": "Example Counterparty VASP",
                    "beneficiary_vasp": "Example Counterparty VASP",
                    "originator_wallet": "0x77ccff0cc624a53cd8b8d8703ced826710211ec7",
                    "beneficiary_wallet": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb",
                    "originator_memo": "",
                    "beneficiary_memo": "",
                    "originator_wallet_type": "vasp",
                    "beneficiary_wallet_type": "vasp",
                    "matched_transaction_id": "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24",
                    "deadline_at": null,
                    "created_at": "2026-10-19T08:41:13Z"
                  },
                  "message": {
                    "id": "2b8e6f10-9c3a-47d1-b5e2-0a4c7d9f3e66",
                    "transaction_id": "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24",
                    "txn_id": "msg-2026-10-20-0003",
                    "txn_date": "2026-10-19T08:41:12Z",
                    "kind": "message",
                    "direction": "INBOUND",
                    "status": "COMPLETED",
                    "rail": "TRP",
                    "asset": "ETH",
                    "amount": "1.25",
                    "originator_vasp": "Origin CASP SL",
                    "beneficiary_vasp": "Example Counterparty VASP",
                    "originator_wallet": "0x77ccff0cc624a53cd8b8d8703ced826710211ec7",
                    "beneficiary_wallet": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb",
                    "originator_memo": "",
                    "beneficiary_memo": "",
                    "originator_wallet_type": "vasp",
                    "beneficiary_wallet_type": "vasp",
                    "matched_transaction_id": null,
                    "deadline_at": "2026-10-21T08:41:13Z",
                    "created_at": "2026-10-19T08:41:13Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "خطأ في التحقق: `transaction_id` مفقود، أو هو الإيداع نفسه، أو ليس رسالة Travel Rule مستلمة، أو يخص أصلاً مختلفاً عن الإيداع؛ أو أن المعاملة الموجودة في المسار ليست إيداعاً وارداً.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Error": {
                    "value": {
                      "transaction_id": [
                        "The travel rule message is for a different asset than the deposit."
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "إيداع أو رسالة غير معروفة، أو تم حذف أحدهما.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "detail": "No TravelRuleTransfer matches the given query."
                }
              }
            }
          },
          "409": {
            "description": "لم يعد الإيداع بانتظار بيانات المُرسِل، أو تمت مطابقة الرسالة بالفعل مع إيداع.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Error": {
                    "value": {
                      "detail": "This deposit is no longer waiting for originator data."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.unmatched_deposits.match(\n    \"11111111-2222-3333-4444-555555555555\",\n    transaction_id=\"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\n)\nprint(result)"
          },
          {
            "lang": "javascript",
            "label": "Node.js",
            "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.unmatchedDeposits.match(\"11111111-2222-3333-4444-555555555555\", {\n  transaction_id: \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\n});\nconsole.log(result);"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.UnmatchedDeposits.Match(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleManualMatchRequest{\n\tTransactionID: \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleManualMatchRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().unmatchedDeposits().match(\"11111111-2222-3333-4444-555555555555\", TravelRuleManualMatchRequest.builder()\n        .transactionId(\"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\")\n        .build());\nSystem.out.println(result);"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\n\nrequire 'vendor/autoload.php';\n\nuse Didit\\DiditClient;\n\n// Reads DIDIT_API_KEY.\n$didit = new DiditClient();\n\n$result = $didit->travelRule->unmatchedDeposits->match('11111111-2222-3333-4444-555555555555', [\n    'transaction_id' => 'e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24',\n]);\nprint_r($result->toArray());"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.unmatched_deposits.match(\n  \"11111111-2222-3333-4444-555555555555\",\n  transaction_id: \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\"\n)\nputs result.to_h"
          },
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.UnmatchedDeposits.MatchAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleManualMatchRequest\n{\n    TransactionId = \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DocumentAIDetectedCode": {
        "type": "object",
        "required": [
          "type",
          "page_number",
          "position",
          "x",
          "y",
          "width",
          "height",
          "page_width",
          "page_height",
          "raw_payload",
          "parsed_payload"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "الترميز المكتشف، على سبيل المثال `QR_CODE`، أو `CODE_128`، أو `EAN_13`، أو `DATA_MATRIX`، أو `PDF_417`."
          },
          "page_number": {
            "type": "integer",
            "minimum": 1,
            "description": "رقم الصفحة (بدءاً من 1)."
          },
          "position": {
            "type": "array",
            "nullable": true,
            "description": "المضلع المكتشف بإحداثيات البكسل للصفحة المعروضة. يكون `null` عند عدم توفر موقع موثوق.",
            "items": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "items": {
                "type": "integer"
              }
            }
          },
          "x": {
            "type": "integer",
            "nullable": true,
            "description": "الحافة اليسرى للمربع المحيط بوحدات البكسل في الصفحة المعروضة."
          },
          "y": {
            "type": "integer",
            "nullable": true,
            "description": "الحافة العلوية لمربع الإحاطة بوحدات البكسل الخاصة بالصفحة المعروضة."
          },
          "width": {
            "type": "integer",
            "nullable": true,
            "description": "عرض المربع المحيط ببكسلات الصفحة المعروضة."
          },
          "height": {
            "type": "integer",
            "nullable": true,
            "description": "ارتفاع المربع المحيط ببكسلات الصفحة المعروضة."
          },
          "page_width": {
            "type": "integer",
            "description": "عرض الصفحة المعروضة بالبكسل."
          },
          "page_height": {
            "type": "integer",
            "description": "ارتفاع الصفحة المعروضة بالبكسل."
          },
          "raw_payload": {
            "type": "string",
            "description": "payload الخام الخاص بأداة فك الترميز في شكل سلسلة base64 عند توفره؛ وإلا فسيكون سلسلة فارغة."
          },
          "parsed_payload": {
            "nullable": true,
            "description": "سلسلة نصية مفكوكة الترميز أو قيمة مهيكلة. `null` عندما تم تحديد موقع الرمز ولكن تعذر فك ترميزه."
          }
        }
      },
      "SessionImportJob": {
        "type": "object",
        "required": [
          "uuid",
          "status",
          "import_type",
          "source_format",
          "source_filename",
          "total_rows",
          "processed_rows",
          "created_count",
          "updated_count",
          "skipped_count",
          "failed_count"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف مهمة الاستيراد. استخدم هذه القيمة لمتابعة التقدم بشكل دوري وجلب أخطاء الصفوف."
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "COMPLETED",
              "FAILED",
              "PAUSED",
              "CANCELLED",
              "READY"
            ]
          },
          "import_type": {
            "type": "string",
            "enum": [
              "user_verification",
              "business_verification",
              "status_rules",
              "transactions"
            ]
          },
          "source_format": {
            "type": "string",
            "enum": [
              "csv",
              "ndjson"
            ]
          },
          "source_filename": {
            "type": "string"
          },
          "total_rows": {
            "type": "integer",
            "format": "int64"
          },
          "processed_rows": {
            "type": "integer",
            "format": "int64"
          },
          "checkpoint_row": {
            "type": "integer",
            "format": "int64"
          },
          "created_count": {
            "type": "integer",
            "format": "int64"
          },
          "updated_count": {
            "type": "integer",
            "format": "int64"
          },
          "skipped_count": {
            "type": "integer",
            "format": "int64"
          },
          "failed_count": {
            "type": "integer",
            "format": "int64"
          },
          "total_media_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "last_error": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "state": {
            "type": "string",
            "enum": [
              "ready",
              "queued",
              "running",
              "paused",
              "completed",
              "errors",
              "failed",
              "cancelled"
            ],
            "description": "حالة المهمة كما تعرضها لوحة التحكم؛ تشير `errors` إلى مهمة مكتملة تحتوي على صفوف مرفوضة."
          },
          "source": {
            "type": "string",
            "enum": [
              "file",
              "api",
              "provider"
            ]
          },
          "provider": {
            "type": "string",
            "description": "مصدر الترحيل؛ فارغ لعمليات الاستيراد عبر الملفات أو API."
          },
          "provider_options": {
            "type": "object"
          },
          "credential_hint": {
            "type": "string",
            "description": "الأحرف الأولى من المفتاح الذي يحتفظ به الترحيل. لا يتم إرجاع المفتاح نفسه أبداً."
          },
          "credentials_expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "resumes_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "عندما تُستأنف تلقائياً مهمة أوقفها حد المعدل لدى المزود مؤقتاً."
          },
          "status_mapping": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "is_dry_run": {
            "type": "boolean"
          },
          "dry_run_summary": {
            "type": "object",
            "description": "ما وجده التشغيل التجريبي: `total`، و`by_status`، و`already_in_didit`، و`same_person`، و`not_finished`، و`failed`، و`unmapped_statuses`."
          },
          "face_templates_enabled": {
            "type": "boolean"
          },
          "lawful_basis_confirmed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "not_finished_count": {
            "type": "integer",
            "format": "int64"
          },
          "same_person_count": {
            "type": "integer",
            "format": "int64"
          },
          "face_templates_count": {
            "type": "integer",
            "format": "int64"
          },
          "face_duplicates_count": {
            "type": "integer",
            "format": "int64"
          },
          "face_blocklist_hits_count": {
            "type": "integer",
            "format": "int64"
          },
          "created_by_name": {
            "type": "string",
            "nullable": true
          },
          "created_by_email": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SessionImportError": {
        "type": "object",
        "required": [
          "uuid",
          "row_number",
          "error",
          "raw_row"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "row_number": {
            "type": "integer",
            "format": "int64"
          },
          "external_id": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "type": "string"
          },
          "raw_row": {
            "type": "object",
            "additionalProperties": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BrandingCustomizationUpdate": {
        "type": "object",
        "description": "نص التحديث الجزئي للعلامة التجارية. قدّم الحقول التي تريد تغييرها فقط. تقبل الألوان السداسية عشرية التنسيق `#RRGGBB` أو `#RRGGBBAA`. لا يُقبل النطاق المخصص والبريد الإلكتروني بالعلامة البيضاء هنا.",
        "properties": {
          "color_primary": {
            "type": "string",
            "description": "لون العناوين / النص الأساسي."
          },
          "color_secondary": {
            "type": "string",
            "description": "لون الفقرة / النص الثانوي."
          },
          "color_background": {
            "type": "string",
            "description": "لون خلفية الصفحة."
          },
          "color_panel": {
            "type": "string",
            "description": "لون اللوحة / التمييز."
          },
          "color_panel_10": {
            "type": "string",
            "description": "لون اللوحة بنسبة عتامة 10%."
          },
          "color_on_panel_1": {
            "type": "string",
            "description": "لون النص المساعد في اللوحات."
          },
          "color_on_panel_2": {
            "type": "string",
            "description": "لون الشارة / العلامة على اللوحات."
          },
          "color_on_background": {
            "type": "string",
            "description": "لون النص على الخلفية."
          },
          "color_button_1": {
            "type": "string",
            "description": "لون الزر الأساسي."
          },
          "color_button_2": {
            "type": "string",
            "description": "لون الزر الثانوي."
          },
          "color_button_text_1": {
            "type": "string",
            "description": "لون نص الزر الأساسي."
          },
          "color_button_text_2": {
            "type": "string",
            "description": "لون نص الزر الثانوي."
          },
          "color_pill_text": {
            "type": "string",
            "description": "لون النص للشارات وحقول الإدخال ومحددات الخيارات."
          },
          "border_radius_panel": {
            "type": "integer",
            "minimum": 0,
            "description": "نصف قطر زاوية اللوحة بالبكسل."
          },
          "border_radius_buttons": {
            "type": "integer",
            "minimum": 0,
            "description": "نصف قطر زاوية الزر بالبكسل."
          },
          "font_family": {
            "type": "string",
            "description": "اسم عائلة خط Google (مثل `Inter`، `AR One Sans`)."
          },
          "font_weight": {
            "type": "string",
            "description": "وزن الخط المتاح للعائلة المحددة (مثل `regular`، `500`، `700`)."
          },
          "app_public_name": {
            "type": "string",
            "nullable": true,
            "description": "الاسم العام المعروض في مسار التحقق."
          },
          "privacy_policy_url": {
            "type": "string",
            "nullable": true,
            "description": "رابط سياسة الخصوصية المعروض للمستخدم النهائي."
          },
          "skip_welcome_screen": {
            "type": "boolean",
            "description": "تخطي شاشة الترحيب الأولية."
          },
          "disable_login_with_didit": {
            "type": "boolean",
            "description": "المتابعة كضيف بدلاً من عرض شاشة تسجيل الدخول عبر Didit. لا يمكن إعادته إلى `false` أثناء تكوين نطاق مخصص (400)."
          },
          "hide_progress_bar": {
            "type": "boolean",
            "description": "إخفاء شريط التقدم أثناء سير العمل."
          },
          "callback_seconds": {
            "type": "integer",
            "minimum": 0,
            "description": "التأخير (بالثواني) قبل إعادة التوجيه إلى رابط الاستدعاء."
          },
          "delete_logo_square": {
            "type": "boolean",
            "description": "عندما تكون `true`، يُزال الشعار المربع الحالي."
          },
          "delete_logo_rectangular": {
            "type": "boolean",
            "description": "عندما تكون `true`، يُزال الشعار المستطيل الحالي."
          },
          "delete_logo_rectangular_dark": {
            "type": "boolean",
            "description": "عندما تكون `true`، يُزال شعار الوضع الداكن الحالي، وتصبح قيمة `logo_rectangular_dark` حينها `null`. إذا قام نفس طلب multipart أيضاً برفع `image_rectangular_dark`، فستكون الأولوية لعملية الرفع."
          },
          "delete_favicon": {
            "type": "boolean",
            "description": "عندما تكون `true`، تتم إزالة أيقونة الموقع (favicon) الحالية."
          }
        }
      },
      "BrandingCustomization": {
        "type": "object",
        "description": "العلامة التجارية ذات العلامة البيضاء لتطبيق ما: الألوان والخطوط وأنصاف الأقطار وروابط الشعار وخيارات UI/UX. روابط الشعار للقراءة فقط (عيّنها عن طريق تحميل الصور). النطاق المخصص والبريد الإلكتروني للعلامة البيضاء غير مشمولين.",
        "properties": {
          "color_primary": {
            "type": "string"
          },
          "color_secondary": {
            "type": "string"
          },
          "color_background": {
            "type": "string"
          },
          "color_panel": {
            "type": "string"
          },
          "color_panel_10": {
            "type": "string"
          },
          "color_on_panel_1": {
            "type": "string"
          },
          "color_on_panel_2": {
            "type": "string"
          },
          "color_on_background": {
            "type": "string"
          },
          "color_button_1": {
            "type": "string"
          },
          "color_button_2": {
            "type": "string"
          },
          "color_button_text_1": {
            "type": "string"
          },
          "color_button_text_2": {
            "type": "string"
          },
          "color_pill_text": {
            "type": "string"
          },
          "border_radius_panel": {
            "type": "integer"
          },
          "border_radius_buttons": {
            "type": "integer"
          },
          "font_family": {
            "type": "string"
          },
          "font_weight": {
            "type": "string"
          },
          "font_url": {
            "type": "string",
            "nullable": true,
            "description": "للقراءة فقط. رابط ورقة أنماط Google Fonts التي تم حلها لمجموعة الخطوط المحددة."
          },
          "logo_square": {
            "type": "string",
            "nullable": true,
            "description": "رابط للقراءة فقط للشعار المربع. يتم الرفع عبر `image_square`."
          },
          "logo_rectangular": {
            "type": "string",
            "nullable": true,
            "description": "رابط للقراءة فقط للشعار المستطيل. يتم الرفع عبر `image_rectangular`."
          },
          "logo_rectangular_dark": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "للقراءة فقط. رابط موقّع مؤقت للشعار المستطيل للوضع الداكن، يُعرض على خلفية داكنة. `null` عند عدم تعيين شعار داكن أو إذا كانت الشعارات المستطيلة لا تُعرض لحسابك. ارفعه باستخدام `image_rectangular_dark`."
          },
          "favicon": {
            "type": "string",
            "nullable": true,
            "description": "رابط للقراءة فقط للأيقونة المفضلة (favicon). يتم الرفع عبر `image_favicon`."
          },
          "app_public_name": {
            "type": "string",
            "nullable": true
          },
          "privacy_policy_url": {
            "type": "string",
            "nullable": true
          },
          "skip_welcome_screen": {
            "type": "boolean"
          },
          "disable_login_with_didit": {
            "type": "boolean"
          },
          "hide_progress_bar": {
            "type": "boolean"
          },
          "callback_seconds": {
            "type": "integer"
          }
        }
      },
      "WebhookEvent": {
        "type": "string",
        "description": "اسم حدث webhook المدعوم. استخدم هذه النصوص بدقة في `subscribed_events`؛ حيث يتم رفض القيم غير المدعومة.",
        "enum": [
          "status.updated",
          "data.updated",
          "user.status.updated",
          "user.data.updated",
          "business.status.updated",
          "business.data.updated",
          "activity.created",
          "transaction.created",
          "transaction.status.updated",
          "travel_rule.status.updated",
          "workflow.compliance_changed",
          "transaction_rule_suggestions.created",
          "auth.signup",
          "auth.login",
          "auth.login_failed",
          "auth.password_reset_requested",
          "auth.password_reset_completed",
          "auth.mfa_changed",
          "auth.new_device",
          "auth.account_locked",
          "investigator.report.ready",
          "investigator.decision.automated",
          "investigator.decision.overridden",
          "investigator.decision.contested",
          "investigator.question.raised",
          "investigator.automation.paused",
          "investigator.rfi.answered",
          "investigator.rfi.overdue",
          "investigator.drift.detected",
          "investigator.sla.breached",
          "investigator.qa.failed",
          "investigator.external.report.ready"
        ]
      },
      "WebhookSubscribedEvents": {
        "type": "array",
        "description": "أداة تصفية الأحداث لوجهة webhook هذه. تسلّم Didit فقط إشعارات webhook التي يتطابق نوع الحدث الخاص بها تماماً مع إحدى هذه القيم — لا يوجد اشتراك باستخدام أحرف البدل. عند الإرسال، يجب أن تحتوي القائمة على حدث صالح واحد على الأقل (يتم رفض `[]` الصريحة بالرمز 400)؛ والوجهة التي تكون قائمتها فارغة (تم إغفال الحقل عند الإنشاء) لا تتلقى أي شيء. عند التحديث، يتم استبدال القائمة بالكامل ولا تُدمج أبداً.",
        "minItems": 1,
        "uniqueItems": true,
        "items": {
          "$ref": "#/components/schemas/WebhookEvent"
        },
        "example": [
          "status.updated",
          "data.updated"
        ]
      },
      "PhoneVerificationSendResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الجلسة لعملية التحقق. يُرجع إرسال `Retry` نفس قيمة `request_id` مثل الإرسال الأصلي. يظهر هذا المعرّف في Business Console، ويتم إرجاعه مرة أخرى بواسطة طلب `POST /v3/phone/check/` مكتمل، ويمكن تمريره إلى `GET /v3/session/{sessionId}/decision/`."
          },
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "Retry",
              "Blocked"
            ],
            "description": "`Success` — تم إرسال OTP لعملية تحقق جديدة. `Retry` — تمت إعادة إرسال OTP لعملية التحقق المعلقة التي تم إنشاؤها بواسطة إرسال سابق. `Blocked` — رفضت طبقة مكافحة الاحتيال الإرسال؛ يتم إنهاء عملية التحقق فورًا كـ `Declined` ولا تتم فوترة أي شيء."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "سبب كون الإرسال `Blocked` (على سبيل المثال، `repeated_attempts`، أو `suspicious`، أو `spam`). ويكون `null` في حالتي `Success` و`Retry`."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "نسخة مطابقة من `vendor_data` المخزنة في الجلسة (من الإرسال الأول)."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "نسخة مطابقة من `metadata` المخزنة في الجلسة (من الإرسال الأول)."
          }
        }
      },
      "PhoneVerificationCheckResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "عند `Approved`/`Declined`: معرّف الجلسة لعملية التحقق المتطابقة — مطابق لـ `request_id` المُرجع بواسطة `POST /v3/phone/send/`. عند `Failed` و`Expired or Not Found`: معرّف UUID عشوائي لمرة واحدة لا يمكن البحث عنه لاحقاً."
          },
          "status": {
            "type": "string",
            "enum": [
              "Approved",
              "Declined",
              "Failed",
              "Expired or Not Found"
            ],
            "description": "`Approved` — رمز صحيح، دون وجود مخاطر تؤدي إلى الرفض. `Declined` — نهائية: تطابقت مخاطر تؤدي إلى الرفض أو استُنفد الحد المسموح به من المحاولات (3). `Failed` — رمز خاطئ، مع بقاء محاولات متبقية. `Expired or Not Found` — لا توجد عملية تحقق معلقة لهذا الرقم خلال آخر 5 دقائق."
          },
          "message": {
            "type": "string",
            "description": "تفسير سهل القراءة للنتيجة، بما في ذلك عدد المحاولات المتبقية بعد إدخال رمز خاطئ."
          },
          "phone": {
            "type": "object",
            "nullable": true,
            "description": "تقرير الهاتف الكامل. يتواجد (غير فارغ non-null) فقط في النتائج النهائية (`Approved`/`Declined`)؛ ويكون `null` في حالة `Failed` وغير موجود في حالة `Expired or Not Found`.",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "Approved",
                  "Declined",
                  "In Review",
                  "Not Finished",
                  "Expired"
                ],
                "description": "الحالة النهائية للتحقق من رقم الهاتف. تطابق `status` على المستوى الأعلى لعمليات الفحص المكتملة."
              },
              "phone_number_prefix": {
                "type": "string",
                "description": "رمز الاتصال بالدولة مسبوقاً بـ `+` (مثل `+1`).",
                "example": "+1"
              },
              "phone_number": {
                "type": "string",
                "description": "الرقم الوطني بدون رمز الاتصال الدولي للدولة.",
                "example": "4155552671"
              },
              "full_number": {
                "type": "string",
                "description": "الرقم الكامل بتنسيق E.164.",
                "example": "+14155552671"
              },
              "country_code": {
                "type": "string",
                "nullable": true,
                "description": "دولة الرقم وفق المعيار ISO 3166-1 alpha-2.",
                "example": "US"
              },
              "country_name": {
                "type": "string",
                "description": "اسم الدولة الكامل المشتق من `country_code`.",
                "example": "United States"
              },
              "carrier": {
                "type": "object",
                "description": "الشبكة الحالية التي تخدم الرقم، من البحث عن شركة الاتصالات الذي تم إجراؤه عند الإنهاء.",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "اسم شركة الاتصالات. سلسلة نصية فارغة إذا لم يتمكن البحث من تحديدها."
                  },
                  "type": {
                    "type": "string",
                    "description": "نوع الخط الوارد من البحث: `mobile`، أو `fixed_line`، أو `voip`، أو `isp`، أو `vpn`، أو `toll_free`، أو `premium_rate`، أو `pager`، أو `payphone`، أو `satellite`، أو `service`، أو `shared_cost`، أو `short_codes_commercial`، أو `calling_cards`، أو `local_rate`، أو `universal_access`، أو `voice_mail`، أو `other`، أو `unknown`."
                  }
                }
              },
              "is_disposable": {
                "type": "boolean",
                "description": "تكون `true` عندما ينتمي الرقم إلى خدمة أرقام مؤقتة أو مخصصة للاستخدام لمرة واحدة."
              },
              "is_virtual": {
                "type": "boolean",
                "description": "تكون `true` عندما يكون نوع الخط افتراضيًا (`voip` أو `isp` أو `vpn`)."
              },
              "verification_method": {
                "type": "string",
                "description": "القناة التي سلّمت الرمز لمرة واحدة بالفعل بمجرد تأكيد التسليم (مثل `whatsapp`، `sms`)؛ وحتى ذلك الحين، تكون القناة المطلوبة."
              },
              "verification_attempts": {
                "type": "integer",
                "description": "عدد مرات إرسال رمز OTP لعملية التحقق هذه (1، أو 2 بعد إعادة المحاولة)."
              },
              "verified_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت إدخال الرمز الصحيح. تكون القيمة `null` إذا لم تتم الموافقة على التحقق مطلقاً."
              },
              "warnings": {
                "type": "array",
                "description": "تحذيرات المخاطر المسجلة أثناء التحقق (مكرر، أو قابل للتخلص منه، أو VoIP، أو تجاوز المحاولات، أو قائمة الحظر، وما إلى ذلك). مصفوفة فارغة في حال عدم وجود أي منها.",
                "items": {
                  "type": "object",
                  "properties": {
                    "feature": {
                      "type": "string",
                      "description": "الميزة التي أطلقت التحذير. دائماً `PHONE` هنا."
                    },
                    "risk": {
                      "type": "string",
                      "description": "رمز مخاطر مقروء آلياً."
                    },
                    "additional_data": {
                      "type": "object",
                      "nullable": true,
                      "description": "السياق الخاص بالمخاطر (على سبيل المثال، معرّف الجلسة المكررة للمخاطر المكررة). يكون `null` عندما لا تتضمن المخاطر أي بيانات إضافية."
                    },
                    "log_type": {
                      "type": "string",
                      "enum": [
                        "error",
                        "warning",
                        "information"
                      ],
                      "description": "مستوى الخطورة. تؤدي مخاطر `error` إلى رفض عملية التحقق، وتضع `warning` علامة عليها للمراجعة، ويتم تسجيل `information` دون التأثير على الحالة."
                    },
                    "short_description": {
                      "type": "string",
                      "description": "ملخص للمخاطر في سطر واحد مقروء للبشر."
                    },
                    "long_description": {
                      "type": "string",
                      "description": "تفسير سهل القراءة للمخاطر."
                    }
                  }
                }
              },
              "lifecycle": {
                "type": "array",
                "description": "سجل تدقيق زمني لعملية التحقق. يكون `type` الخاص بالحدث أحد القيم التالية: `PHONE_VERIFICATION_MESSAGE_SENT`، أو `PHONE_VERIFICATION_RETRY_MESSAGE_SENT`، أو `PHONE_VERIFICATION_BLOCKED`، أو `PHONE_DELIVERY_DELIVERED`، أو `PHONE_DELIVERY_UNDELIVERABLE`، أو `VALID_CODE_ENTERED`، أو `INVALID_CODE_ENTERED`، أو `PHONE_VERIFICATION_APPROVED`، أو `PHONE_VERIFICATION_DECLINED`، أو `PHONE_VERIFICATION_IN_REVIEW`، أو `PHONE_VERIFICATION_EXPIRED`.",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "نوع الحدث."
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "وقت وقوع الحدث."
                    },
                    "details": {
                      "type": "object",
                      "nullable": true,
                      "description": "الـ payload الخاص بالحدث. أحداث الإرسال: `{status, reason, channel, actual_channel}` (يتم ملء `actual_channel` بمجرد تأكيد التسليم). أحداث التسليم: `{channel, status}`. أحداث إدخال الرمز: `{code_tried, status}`. أحداث الحالة النهائية: `null`، أو `{reason}` عندما تكون مرفوضة أو قيد المراجعة."
                    },
                    "fee": {
                      "type": "number",
                      "description": "المبلغ بالدولار الأمريكي المفوتر لهذا الحدث. لا يكون صفراً إلا في أحداث الإرسال (سعر التسليم)؛ ويكون 0 لإدخالات الرمز وتأكيدات التسليم وأحداث الحالة."
                    }
                  }
                }
              },
              "matches": {
                "type": "array",
                "description": "جلسات أخرى لتطبيقك (KYC أو KYB أو API) حيث تم استخدام رقم الهاتف نفسه بواسطة مستخدم مختلف (`vendor_data` مختلفة). حتى 5 مدخلات، وتكون مطابقة قائمة الحظر لمدخل القائمة الاصطناعي أولاً عند وجودها (تحتفظ التطابقات المشتقة من الجلسة بترتيب الاستعلام). مصفوفة فارغة عند عدم وجود أي تطابقات.",
                "items": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة لعملية التحقق الأخرى التي استخدمت رقم الهاتف هذا."
                    },
                    "session_number": {
                      "type": "integer",
                      "description": "رقم تسلسلي سهل القراءة لتلك الجلسة."
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "`vendor_data` لتلك الجلسة."
                    },
                    "verification_date": {
                      "type": "string",
                      "description": "وقت إنشاء تلك الجلسة (`YYYY-MM-DDTHH:MM:SSZ`)."
                    },
                    "phone_number": {
                      "type": "string",
                      "description": "رقم الهاتف المتطابق."
                    },
                    "status": {
                      "type": "string",
                      "description": "حالة تلك الجلسة (مثل `Approved`، `Declined`، `In Progress`)."
                    },
                    "is_blocklisted": {
                      "type": "boolean",
                      "description": "ما إذا كان رقم الهاتف موجوداً في قائمة الحظر الخاصة بتطبيقك."
                    },
                    "api_service": {
                      "type": "string",
                      "nullable": true,
                      "description": "بالنسبة للجلسات من نوع API، واجهة API المستقلة التي أنشأتها (مثل `PHONE_VERIFICATION`)؛ و `null` لجلسات التحقق العادية."
                    },
                    "source": {
                      "type": "string",
                      "description": "مكان العثور على التطابق. عادةً ما يكون `session`؛ وإذا حدث تطابق مع قائمة الحظر عبر إدخال في قائمة تابعة للمؤسسة، يُضاف في البداية تطابق اصطناعي يحتوي على `source: \"list_entry\"` وقيمة null لكل من `session_id`/`session_number`."
                    }
                  }
                }
              },
              "phone_social": {
                "$ref": "#/components/schemas/PhoneSocialFootprint"
              },
              "phone_intelligence": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PhoneIntelligence"
                  }
                ],
                "description": "إشارات معلومات الهاتف. تتوفر فقط عندما تكون قيمة `enable_enrichment` هي `true` في الفحص."
              }
            }
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "`vendor_data` لجلسة التحقق المطابقة. وتكون `null` عند `Expired or Not Found`."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "`metadata` لجلسة التحقق المتطابقة. `null` عند `Expired or Not Found`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "الطابع الزمني لاستجابة هذا الفحص."
          }
        }
      },
      "EmailVerificationSendResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الجلسة لعملية التحقق. يُرجع إرسال `Retry` نفس قيمة `request_id` مثل الإرسال الأصلي. يظهر هذا المعرّف في Business Console، ويتم إرجاعه مرة أخرى بواسطة طلب `POST /v3/email/check/` مكتمل، ويمكن تمريره إلى `GET /v3/session/{sessionId}/decision/`."
          },
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "Retry",
              "Undeliverable"
            ],
            "description": "`Success` — تم إرسال OTP عبر البريد الإلكتروني لعملية تحقق جديدة (تتم فوترتها). `Retry` — تم إرسال OTP جديد عبر البريد الإلكتروني لعملية التحقق المعلقة التي تم إنشاؤها بواسطة إرسال سابق (مجانًا). `Undeliverable` — فشل العنوان في التحقق من إمكانية التسليم أو تعذر إرسال الرسالة؛ يتم إنهاء عملية التحقق فورًا كـ `Declined` ولا تتم فوترة أي شيء."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "enum": [
              "email_can_not_be_delivered",
              null
            ],
            "description": "`email_can_not_be_delivered` عندما تكون `status` هي `Undeliverable`؛ و`null` خلاف ذلك."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "نسخة مطابقة من `vendor_data` المخزنة في الجلسة (من الإرسال الأول)."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "نسخة مطابقة من `metadata` المخزنة في الجلسة (من الإرسال الأول)."
          }
        }
      },
      "EmailVerificationCheckResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "عند `Approved`/`Declined`: معرّف الجلسة لعملية التحقق المتطابقة — مطابق لـ `request_id` المُرجع بواسطة `POST /v3/email/send/`. عند `Failed` و`Expired or Not Found`: معرّف UUID عشوائي لمرة واحدة لا يمكن البحث عنه لاحقاً."
          },
          "status": {
            "type": "string",
            "enum": [
              "Approved",
              "Declined",
              "Failed",
              "Expired or Not Found"
            ],
            "description": "`Approved` — رمز صحيح، دون وجود مخاطر تؤدي إلى الرفض. `Declined` — نهائية: تطابقت مخاطر تؤدي إلى الرفض أو استُنفد الحد المسموح به من المحاولات (3). `Failed` — رمز خاطئ، مع بقاء محاولات متبقية. `Expired or Not Found` — لا توجد عملية تحقق معلقة لهذا العنوان خلال آخر 5 دقائق."
          },
          "message": {
            "type": "string",
            "description": "تفسير سهل القراءة للنتيجة، بما في ذلك عدد المحاولات المتبقية بعد إدخال رمز خاطئ."
          },
          "email": {
            "type": "object",
            "nullable": true,
            "description": "تقرير البريد الإلكتروني الكامل. موجود (غير null) فقط في النتائج النهائية (`Approved`/`Declined`)؛ ويكون `null` في حالة `Failed` وغير موجود في حالة `Expired or Not Found`.",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "Approved",
                  "Declined",
                  "In Review",
                  "Not Finished",
                  "Expired"
                ],
                "description": "الحالة النهائية للتحقق من البريد الإلكتروني. تطابق `status` على المستوى الأعلى لعمليات الفحص المكتملة."
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "عنوان البريد الإلكتروني الذي تم التحقق منه.",
                "example": "alice@example.com"
              },
              "is_breached": {
                "type": "boolean",
                "description": "تكون القيمة `true` عندما يظهر العنوان في تسريبات بيانات معروفة (يتم إجراء فحص معلومات الاختراق عند الإتمام)."
              },
              "breaches": {
                "type": "array",
                "description": "ما يصل إلى أحدث 5 اختراقات معروفة تتضمن هذا العنوان. مصفوفة فارغة (أو محذوفة) عندما تكون قيمة `is_breached` هي `false`.",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "معرّف الاختراق."
                    },
                    "domain": {
                      "type": "string",
                      "description": "نطاق الخدمة المخترقة."
                    },
                    "breach_date": {
                      "type": "string",
                      "format": "date",
                      "description": "تاريخ حدوث الانتهاك."
                    },
                    "breach_emails_count": {
                      "type": "integer",
                      "description": "العدد الإجمالي للحسابات التي كُشفت في الاختراق."
                    },
                    "description": {
                      "type": "string",
                      "description": "وصف سهل القراءة للخرق (قد يحتوي على ترميز HTML)."
                    },
                    "logo_path": {
                      "type": "string",
                      "description": "رابط URL لشعار الخدمة المخترقة."
                    },
                    "data_classes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "فئات البيانات المكشوفة، بتنسيق snake_case (مثل `email_addresses` و`passwords`)."
                    },
                    "is_verified": {
                      "type": "boolean",
                      "description": "ما إذا كان قد تم التحقق من صحة الاختراق."
                    }
                  }
                }
              },
              "is_disposable": {
                "type": "boolean",
                "description": "تكون `true` عندما ينتمي النطاق إلى مزود بريد مؤقت/للاستخدام لمرة واحدة معروف."
              },
              "is_undeliverable": {
                "type": "boolean",
                "description": "تكون القيمة `true` عندما يتعذر على العنوان استلام البريد (فشل التحقق من الصيغة أو DNS/MX، أو ارتدت الرسالة)."
              },
              "verification_attempts": {
                "type": "integer",
                "description": "عدد مرات إرسال رمز OTP لعملية التحقق هذه (1، أو 2 بعد إعادة المحاولة)."
              },
              "verified_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت إدخال الرمز الصحيح. تكون القيمة `null` إذا لم تتم الموافقة على التحقق مطلقاً."
              },
              "warnings": {
                "type": "array",
                "description": "تحذيرات المخاطر المسجلة أثناء التحقق (مكرر، أو مخترق، أو قابل للتخلص منه، أو غير قابل للتسليم، أو تجاوز المحاولات، أو قائمة الحظر، وما إلى ذلك). مصفوفة فارغة في حال عدم وجود أي منها.",
                "items": {
                  "type": "object",
                  "properties": {
                    "feature": {
                      "type": "string",
                      "description": "الميزة التي أطلقت التحذير. دائماً `EMAIL` هنا."
                    },
                    "risk": {
                      "type": "string",
                      "description": "رمز مخاطر مقروء آلياً."
                    },
                    "additional_data": {
                      "type": "object",
                      "nullable": true,
                      "description": "السياق الخاص بالمخاطر (على سبيل المثال، معرّف الجلسة المكررة للمخاطر المكررة). يكون `null` عندما لا تتضمن المخاطر أي بيانات إضافية."
                    },
                    "log_type": {
                      "type": "string",
                      "enum": [
                        "error",
                        "warning",
                        "information"
                      ],
                      "description": "مستوى الخطورة. تؤدي مخاطر `error` إلى رفض عملية التحقق، وتضع `warning` علامة عليها للمراجعة، ويتم تسجيل `information` دون التأثير على الحالة."
                    },
                    "short_description": {
                      "type": "string",
                      "description": "ملخص للمخاطر في سطر واحد مقروء للبشر."
                    },
                    "long_description": {
                      "type": "string",
                      "description": "تفسير سهل القراءة للمخاطر."
                    }
                  }
                }
              },
              "lifecycle": {
                "type": "array",
                "description": "سجل تدقيق زمني لعملية التحقق. يكون `type` الخاص بالحدث أحد القيم التالية: `EMAIL_VERIFICATION_MESSAGE_SENT`، أو `EMAIL_VERIFICATION_RETRY_MESSAGE_SENT`، أو `VALID_CODE_ENTERED`، أو `INVALID_CODE_ENTERED`، أو `EMAIL_VERIFICATION_APPROVED`، أو `EMAIL_VERIFICATION_DECLINED`، أو `EMAIL_VERIFICATION_IN_REVIEW`، أو `EMAIL_VERIFICATION_EXPIRED`.",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "نوع الحدث."
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "وقت وقوع الحدث."
                    },
                    "details": {
                      "type": "object",
                      "nullable": true,
                      "description": "الـ payload الخاص بالحدث. أحداث الإرسال: `{status, reason}`. أحداث إدخال الرمز: `{code_tried, status}`. أحداث الحالة النهائية: `null`، أو `{reason}` عندما تكون مرفوضة أو قيد المراجعة."
                    },
                    "fee": {
                      "type": "number",
                      "description": "المبلغ بالدولار الأمريكي المفوتر لهذا الحدث. لا يكون صفراً إلا عند أول إرسال ناجح؛ ويكون 0 لإعادات المحاولة وإدخالات الرمز وأحداث الحالة."
                    }
                  }
                }
              },
              "matches": {
                "type": "array",
                "description": "جلسات أخرى لتطبيقك (KYC أو KYB أو API) تم فيها استخدام نفس عنوان البريد الإلكتروني بواسطة مستخدم مختلف (`vendor_data` مختلف). ما يصل إلى 5 إدخالات؛ تتم إضافة مطابقة قائمة حظر اصطناعية من إدخال القائمة في البداية عند وجودها (وفقط عند عدم وجود بريد إلكتروني مدرج في قائمة الحظر مشتق من الجلسة) — تحافظ المطابقات المشتقة من الجلسات على ترتيب created_at. مصفوفة فارغة عند عدم وجود مطابقات.",
                "items": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف الجلسة لعملية التحقق الأخرى التي استخدمت عنوان البريد الإلكتروني هذا."
                    },
                    "session_number": {
                      "type": "integer",
                      "description": "رقم تسلسلي سهل القراءة لتلك الجلسة."
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "`vendor_data` لتلك الجلسة."
                    },
                    "verification_date": {
                      "type": "string",
                      "description": "وقت إنشاء تلك الجلسة (`YYYY-MM-DDTHH:MM:SSZ`)."
                    },
                    "email": {
                      "type": "string",
                      "description": "عنوان البريد الإلكتروني المتطابق."
                    },
                    "status": {
                      "type": "string",
                      "description": "حالة تلك الجلسة (مثل `Approved`، `Declined`، `In Progress`)."
                    },
                    "is_blocklisted": {
                      "type": "boolean",
                      "description": "ما إذا كان عنوان البريد الإلكتروني موجوداً في قائمة الحظر الخاصة بتطبيقك."
                    },
                    "api_service": {
                      "type": "string",
                      "nullable": true,
                      "description": "بالنسبة للجلسات من نوع API، واجهة API المستقلة التي أنشأتها (مثل `PHONE_VERIFICATION`)؛ و `null` لجلسات التحقق العادية."
                    },
                    "source": {
                      "type": "string",
                      "description": "مكان العثور على التطابق. عادةً ما يكون `session`؛ وإذا حدث تطابق مع قائمة الحظر عبر إدخال في قائمة تابعة للمؤسسة، يُضاف في البداية تطابق اصطناعي يحتوي على `source: \"list_entry\"` وقيمة null لكل من `session_id`/`session_number`."
                    }
                  }
                }
              },
              "email_social": {
                "$ref": "#/components/schemas/EmailSocialFootprint"
              },
              "email_intelligence": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EmailIntelligence"
                  }
                ],
                "description": "إشارات معلومات البريد الإلكتروني. متوفرة فقط عندما تكون قيمة `enable_enrichment` هي `true` في الفحص."
              }
            }
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "`vendor_data` لجلسة التحقق المطابقة. وتكون `null` عند `Expired or Not Found`."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "`metadata` لجلسة التحقق المتطابقة. `null` عند `Expired or Not Found`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "الطابع الزمني لاستجابة هذا الفحص."
          }
        }
      },
      "WorkflowListItem": {
        "type": "object",
        "description": "إصدار سير عمل واحد في عرض القائمة.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرف UUID لكل إصدار. يُستخدم كـ `{settings_uuid}` لعمليات الجلب/التحديث/الحذف، وكـ `workflow_id` عند إنشاء الجلسات."
          },
          "workflow_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف مجموعة ثابت تشترك فيه جميع إصدارات سير العمل نفسه. يساوي `uuid` للإصدار 1."
          },
          "workflow_label": {
            "type": "string",
            "description": "اسم العرض لسير العمل."
          },
          "workflow_type": {
            "type": "string",
            "nullable": true,
            "description": "النوع الأساسي لمهام سير العمل البسيطة: `kyc`، أو `kyb`، أو `adaptive_age_verification`، أو `biometric_authentication`، وما إلى ذلك. تكون القيمة `null` لمهام سير العمل المستندة إلى المخطط بدون ميزة KYB."
          },
          "is_default": {
            "type": "boolean",
            "description": "ما إذا كان هذا هو سير العمل الافتراضي للجلسات الجديدة."
          },
          "is_archived": {
            "type": "boolean"
          },
          "is_white_label_enabled": {
            "type": "boolean",
            "description": "ما إذا كان تخصيص العلامة البيضاء ينطبق على الجلسات التي تم إنشاؤها باستخدام سير العمل هذا."
          },
          "total_price": {
            "type": "number",
            "description": "سعر ثابت لكل عملية تحقق بالدولار الأمريكي (رقم JSON، يستثني الميزات ذات الأسعار المتغيرة مثل DATABASE_VALIDATION و PHONE_VERIFICATION)."
          },
          "min_price": {
            "type": "number",
            "description": "أرخص سعر ثابت عبر مسارات مخطط سير العمل، بالدولار الأمريكي."
          },
          "max_price": {
            "type": "number",
            "description": "أعلى سعر ثابت عبر مسارات مخطط سير العمل، بالدولار الأمريكي."
          },
          "features": {
            "type": "string",
            "description": "الميزات المُمكّنة كسلسلة نصية واحدة مفصولة بـ `\" + \"`، مثل `\"OCR + LIVENESS + FACE_MATCH\"`. افصل السلسلة عند `\" + \"` للحصول على قائمة."
          },
          "is_simple_workflow": {
            "type": "boolean",
            "description": "تكون القيمة True عندما لا يحتوي سير العمل على مخطط سير عمل مخصص."
          },
          "is_editable": {
            "type": "boolean",
            "description": "تكون True عندما يكون هذا الإصدار مسودة `draft` (المسودات قابلة للتعديل مباشرة؛ أما الإصدارات المنشورة فهي غير قابلة للتغيير في لوحة التحكم Console)."
          },
          "workflow_url": {
            "type": "string",
            "format": "uri",
            "description": "رابط التحقق العام القابل للمشاركة لسير العمل هذا (`https://verify.didit.me/u/<token>`)."
          },
          "max_retry_attempts": {
            "type": "integer",
            "description": "الحد الأقصى لمحاولات إعادة المحاولة المسموح بها بعد عملية تحقق مرفوضة (0-10)."
          },
          "retry_window_days": {
            "type": "integer",
            "nullable": true,
            "description": "النافذة الزمنية المتجددة بالأيام المستخدمة لحساب عمليات إعادة المحاولة (1-365). تعني القيمة `null` حداً طوال الوقت."
          },
          "session_expiration_time": {
            "type": "integer",
            "description": "عدد الثواني قبل انتهاء صلاحية الجلسة غير المكتملة (3600-2419200)."
          },
          "version": {
            "type": "integer",
            "description": "رقم الإصدار ضمن مجموعة `workflow_id`، بدءاً من 1."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ],
            "description": "حالة الإصدار. تستخدم الجلسات الجديدة أحدث إصدار `published` لمجموعة ما."
          },
          "has_draft": {
            "type": "boolean",
            "description": "تكون القيمة True عندما يكون أي إصدار في مجموعة `workflow_id` هذه مسودة حالياً."
          },
          "created_by": {
            "type": "object",
            "nullable": true,
            "description": "من أنشأ هذا الإصدار: `{name, email, type}` حيث يكون `type` هو `user` (مستخدم لوحة التحكم، مع تعيين `email`) أو `api_key` (`name` هو معرّف العميل، و`email` هو null). وتكون القيمة `null` في حال عدم تسجيل أي منشئ.",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string",
                "nullable": true
              },
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "api_key"
                ]
              }
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SimpleWorkflowRequest": {
        "type": "object",
        "description": "أنشئ سير عمل خطياً بسيطاً. تحوّل API قائمة الميزات هذه داخلياً إلى مخطط سير عمل قائم على العقد. قائمة بيضاء صارمة للحقول: أي مفتاح غير مدرج هنا (بما في ذلك `workflow_type`) يتم رفضه برمز 400.",
        "required": [
          "features"
        ],
        "properties": {
          "workflow_label": {
            "type": "string",
            "maxLength": 50,
            "default": "ID Verification",
            "description": "اسم العرض لسير العمل (بحد أقصى 50 حرفاً). القيمة الافتراضية هي `\"ID Verification\"` عند حذفه — احرص دائماً على تعيينه لتبقى مسارات سير العمل قابلة للتمييز.",
            "example": "Standard KYC"
          },
          "is_default": {
            "type": "boolean",
            "description": "تعيين سير العمل هذا كافتراضي للجلسات الجديدة."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ],
            "description": "احذف هذا الحقل لإنشاء سير عمل منشور وجاهز للجلسات. استخدم `draft` فقط عندما تريد الحفظ دون نشر."
          },
          "features": {
            "type": "array",
            "minItems": 1,
            "description": "ميزات التحقق حسب ترتيب التنفيذ. تربط واجهة API كل عنصر بالعنصر التالي وتضيف عقدة حالة نهائية واحدة تلقائياً.",
            "items": {
              "$ref": "#/components/schemas/SimpleWorkflowFeature"
            }
          },
          "is_white_label_enabled": {
            "type": "boolean",
            "description": "تمكين تخصيص العلامة البيضاء للجلسات التي تم إنشاؤها باستخدام سير العمل هذا.",
            "default": false
          },
          "is_desktop_allowed": {
            "type": "boolean",
            "description": "السماح بتشغيل مسار التحقق على متصفحات أجهزة سطح المكتب.",
            "default": false
          },
          "max_retry_attempts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10,
            "default": 3,
            "description": "الحد الأقصى لمحاولات إعادة المحاولة المسموح بها بعد عملية تحقق مرفوضة. القيمة `0` تحظر المستخدم بعد الرفض الأول."
          },
          "retry_window_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "nullable": true,
            "default": 7,
            "description": "النافذة الزمنية المتجددة بالأيام المستخدمة لحساب عمليات إعادة المحاولة. تفرض القيمة `null` حداً طوال الوقت."
          },
          "face_liveness_max_attempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3,
            "default": 3,
            "description": "الحد الأقصى لعمليات إرسال كشف الحيوية لكل جلسة. القيمة الافتراضية 3: محاولة أولية واحدة بالإضافة إلى محاولتي إعادة. يتم أيضاً نسخ هذه القيمة في عُقد سير عمل كشف الحيوية وتقدير العمر المنشأة ما لم يستبدلها إعداد على مستوى الميزة."
          },
          "face_match_max_attempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3,
            "default": 3,
            "description": "الحد الأقصى لعمليات إرسال مطابقة الوجه لكل جلسة. القيمة الافتراضية 3: محاولة أولية واحدة بالإضافة إلى محاولتي إعادة. يتم أيضاً نسخ هذه القيمة في عُقد سير عمل مطابقة الوجه المنشأة ما لم يستبدلها إعداد على مستوى الميزة."
          },
          "session_expiration_time": {
            "type": "integer",
            "minimum": 3600,
            "maximum": 2419200,
            "default": 604800,
            "description": "عدد الثواني قبل انتهاء صلاحية الجلسة غير المكتملة. الحد الأدنى ساعة واحدة (3600)، والحد الأقصى 4 أسابيع (2419200)."
          }
        }
      },
      "SimpleWorkflowUpdateRequest": {
        "type": "object",
        "description": "تحديث البيانات الوصفية لسير العمل أو استبدال القائمة الخطية الكاملة للميزات. قائمة بيضاء صارمة للحقول: يُرفض أي مفتاح غير مدرج هنا برمز 400.",
        "properties": {
          "workflow_label": {
            "type": "string",
            "maxLength": 50,
            "description": "اسم العرض لسير العمل (بحد أقصى 50 حرفاً)."
          },
          "is_default": {
            "type": "boolean",
            "description": "تعيين سير العمل هذا كافتراضي للجلسات الجديدة."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ],
            "description": "يتحكم في تحديد الإصدارات. احذفه لتحديث الإصدار الحالي في مكانه (المسودات تُنشر تلقائياً). استخدام `published` على إصدار منشور بالفعل يُنشئ إصداراً جديداً ويُعيده. لا يكون `draft` صالحاً إلا عندما يكون الإصدار لا يزال مسودة."
          },
          "features": {
            "type": "array",
            "minItems": 1,
            "description": "إذا تم توفيره، فإن هذا يستبدل ترتيب الميزات وتكوينها بالكامل.",
            "items": {
              "$ref": "#/components/schemas/SimpleWorkflowFeature"
            }
          },
          "is_white_label_enabled": {
            "type": "boolean",
            "description": "تمكين تخصيص العلامة البيضاء للجلسات التي تم إنشاؤها باستخدام سير العمل هذا."
          },
          "is_desktop_allowed": {
            "type": "boolean",
            "description": "السماح بتشغيل مسار التحقق على متصفحات أجهزة سطح المكتب."
          },
          "max_retry_attempts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10,
            "description": "الحد الأقصى لمحاولات إعادة المحاولة المسموح بها بعد عملية تحقق مرفوضة. القيمة `0` تحظر المستخدم بعد الرفض الأول."
          },
          "retry_window_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "nullable": true,
            "description": "النافذة الزمنية المتجددة بالأيام المستخدمة لحساب عمليات إعادة المحاولة. تفرض القيمة `null` حداً طوال الوقت."
          },
          "face_liveness_max_attempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3,
            "description": "الحد الأقصى لعمليات إرسال كشف الحيوية لكل جلسة. يتم أيضاً نسخ هذه القيمة في عُقد سير عمل كشف الحيوية وتقدير العمر المنشأة ما لم يستبدلها إعداد على مستوى الميزة."
          },
          "face_match_max_attempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3,
            "description": "الحد الأقصى لعمليات إرسال مطابقة الوجه لكل جلسة. يتم أيضاً نسخ هذه القيمة في عُقد سير عمل مطابقة الوجه المنشأة ما لم يستبدلها إعداد على مستوى الميزة."
          },
          "session_expiration_time": {
            "type": "integer",
            "minimum": 3600,
            "maximum": 2419200,
            "description": "عدد الثواني قبل انتهاء صلاحية الجلسة غير المكتملة. الحد الأدنى ساعة واحدة (3600)، والحد الأقصى 4 أسابيع (2419200)."
          }
        }
      },
      "SimpleWorkflowFeature": {
        "type": "object",
        "required": [
          "feature"
        ],
        "properties": {
          "feature": {
            "type": "string",
            "description": "الميزة المراد تشغيلها. استخدم القيم المكتوبة بالأحرف الكبيرة الموضحة هنا.",
            "enum": [
              "OCR",
              "NFC",
              "LIVENESS",
              "FACE_MATCH",
              "PROOF_OF_ADDRESS",
              "QUESTIONNAIRE",
              "DOCUMENT_AI",
              "PHONE_VERIFICATION",
              "EMAIL_VERIFICATION",
              "DATABASE_VALIDATION",
              "AML",
              "IP_ANALYSIS",
              "AGE_ESTIMATION",
              "KYB_REGISTRY",
              "KYB_DOCUMENTS",
              "KYB_KEY_PEOPLE",
              "SIGNATURE"
            ]
          },
          "config": {
            "type": "object",
            "description": "إعدادات خاصة بالميزة. بالنسبة لـ `QUESTIONNAIRE`، قم بتضمين `questionnaire_uuid` مع `questionnaire_id` الذي يرجعه endpoint إنشاء الاستبيان. بالنسبة لـ `SIGNATURE`، يحتاج سير العمل الذي يدخل حيز الإنتاج إلى مستند للتوقيع: اضبط `signature_documents_source` على `session` أو `both` حتى تتمكن كل جلسة من تقديم مستنداتها الخاصة، أو أرسل `status: \"draft\"` وأضف المستندات قبل النشر. يُرفض `signature_level: \"aes\"` مع `aes_not_available` طالما أن `signature_availability.aes` هي `false` في سير العمل. بالنسبة لـ `OCR`، يحدد `methods` طرق التحقق من الهوية التي يجوز لكل دولة استخدامها (التقاط المستندات، والبحث بدون مستندات في مصدر حكومي أو مصدر موثوق آخر، ومحافظ الهوية الرقمية)؛ احذفه وستكون جميع الدول مقتصرة على التقاط المستندات فقط. بالنسبة لـ `SIGNATURE`، راجع [إعدادات التوقيع الإلكتروني](/ar/management-api/workflows/feature-configs#التوقيع-الإلكتروني): يقبل `signature_level` القيمة `simple` (الافتراضية، لا يلزم التحقق من الهوية أو البريد الإلكتروني أو الهاتف) و`aes` حاليًا، وتتم إدارة مستندات سير العمل وحقولها في لوحة التحكم، لذا أرسل المستندات والحقول لكل جلسة عبر API مع `signature_documents_source: \"session\"`.",
            "additionalProperties": true
          },
          "label": {
            "type": "string",
            "description": "تسمية داخلية اختيارية لعقدة سير العمل هذه."
          }
        }
      },
      "ReviewItem": {
        "type": "object",
        "description": "إدخال واحد في سجل مراجعة الجلسة / موجز النشاط. تتضمن تغييرات الحالة `previous_status` و`new_status` و`previous_value` و`new_value` و`changed_fields`؛ وتتضمن التعليقات `comment` و(بالنسبة لتعليقات وحدة التحكم) `mentioned_emails`؛ وتكون الحقول المتبقية `null` أو فارغة عندما لا تنطبق على نوع النشاط.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "المعرّف الفريد لمدخل الخلاصة هذا.",
            "example": "de0561bc-5583-4409-9171-1a31a4c8a5f4"
          },
          "activity_type": {
            "type": "string",
            "enum": [
              "COMMENT",
              "STATUS_UPDATED",
              "KYC_DATA_UPDATED",
              "POA_DATA_UPDATED",
              "FILE_ADDED",
              "FILE_REMOVED",
              "AML_ONGOING_MATCH",
              "AML_STATUS_UPDATED",
              "AML_HIT_STATUS_UPDATED",
              "KYB_DATA_UPDATED",
              "KYB_DOCUMENT_UPLOADED",
              "TAG_ADDED",
              "TAG_REMOVED",
              "FEATURE_OVERRIDE_PENDING",
              "FEATURE_OVERRIDE_APPLIED",
              "FEATURE_OVERRIDE_CANCELLED"
            ],
            "description": "نوع النشاط الذي يسجله هذا الإدخال. تأتي صفوف `STATUS_UPDATED` من القرارات اليدوية (`PATCH /v3/session/{session_id}/update-status/`) ومن الإدخالات المضافة عبر `POST …/reviews/` (والتي يتم تعيينها افتراضياً إلى هذا النوع حتى عند عدم تسجيل أي حالة). تأتي صفوف `COMMENT` من مراجعي Console؛ كما يتم تخزين مشاهدات صفحة التفاصيل في Console كصفوف `COMMENT` مميزة بـ `metadata.system_event = \"DETAIL_VIEWED\"`. تتبع الأنواع المتبقية تعديلات البيانات وتغييرات الملفات والعلامات ونشاط مراقبة AML. تتم كتابة صفوف STATUS_UPDATED أيضاً بواسطة جهات تابعة للنظام (مثل مراقبة AML المستمرة مع actor_type SYSTEM، والتحديثات التلقائية لحالة الميزات)، وليس فقط عبر endpoint تحديث الحالة ومنشورات المراجعة اليدوية. تسجل `FEATURE_OVERRIDE_PENDING` و `FEATURE_OVERRIDE_APPLIED` و `FEATURE_OVERRIDE_CANCELLED` تجاوزاً لحالة فحص واحد (`PATCH /v3/session/{session_id}/features/{node_id}/update-status/`): سواء كان مطلوباً للانتظار حتى انتهاء سير العمل، أو تم تطبيقه، أو تم إلغاؤه. وهي تحمل حالة الفحص في `previous_value` / `new_value` (`{\"status\": ...}`)، وتترك `previous_status` و `new_status` بقيمة `null`، وتحدد التجاوز في `metadata` (`feature_override_id`، `node_id`، `feature_model`، `forced`، `state`، `cancel_reason`). يحمل الإدخال الخاص بالطلب تعليق المراجِع في `comment`؛ ويتم تسجيل التجاوز المطبق عند انتهاء سير العمل مع `actor_type` بقيمة `SYSTEM`.",
            "example": "STATUS_UPDATED"
          },
          "actor_display": {
            "type": "string",
            "description": "تسمية كاتب سهلة القراءة، يتم حلها بهذا الترتيب: الاسم الكامل للفاعل ← معرّف حساب Console ← الجزء المحلي من `actor_email` ← `\"API Client\"` (للفاعلين من نوع `API_KEY`) ← `\"System\"` (للفاعلين من نوع `SYSTEM`) ← `\"Unknown\"`. تعرض الإدخالات التي تم إنشاؤها عبر `POST …/reviews/` دائماً `\"Unknown\"` لأن هذا الـ endpoint لا يسجل إسناداً للفاعل.",
            "example": "API Client"
          },
          "actor_email": {
            "type": "string",
            "nullable": true,
            "description": "البريد الإلكتروني لمستخدم Console الذي نفّذ الإجراء. يكون `null` للجهات الفاعلة عبر مفتاح API والنظام.",
            "example": null
          },
          "actor_type": {
            "type": "string",
            "enum": [
              "API_KEY",
              "CONSOLE_USER",
              "SYSTEM"
            ],
            "description": "من نفّذ الإجراء: مفتاح API، أو مستخدم لوحة التحكم، أو Didit نفسها (`SYSTEM`، مثل مراقبة AML المستمرة). الإدخالات التي تم إنشاؤها عبر `POST …/reviews/` تحمل القيمة الافتراضية `CONSOLE_USER` بغض النظر عن الجهة التي أجرت الاستدعاء.",
            "example": "API_KEY"
          },
          "new_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Not Started",
              "In Progress",
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned",
              "Kyc Expired",
              "Resubmitted",
              "Awaiting User"
            ],
            "description": "حالة الجلسة المسجلة بواسطة هذا الإدخال (لتحديثات الحالة). `null` للتعليقات وإدخالات تغيير البيانات.",
            "example": "Approved"
          },
          "previous_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Not Started",
              "In Progress",
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned",
              "Kyc Expired",
              "Resubmitted",
              "Awaiting User"
            ],
            "description": "الحالة التي كانت عليها الجلسة قبل التغيير. يتم ملؤها في مدخلات `STATUS_UPDATED` المكتوبة بواسطة endpoint تحديث الحالة؛ وتكون `null` في المدخلات المضافة عبر `POST …/reviews/`. يتم ملؤها أيضاً في صفوف STATUS_UPDATED المكتوبة بواسطة النظام.",
            "example": "In Review"
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "description": "ملاحظة بنص حر مرفقة بالإدخال، أو `null`.",
            "example": "Document re-checked manually; address matches."
          },
          "mentioned_emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "description": "مستخدمو Console المُشار إليهم عبر `@email` في التعليق. يكون فارغاً دائماً للإدخالات التي تم إنشاؤها عبر واجهة API هذه — حيث تعد معالجة الإشارة ميزة خاصة بـ Console فقط.",
            "example": []
          },
          "previous_value": {
            "type": "object",
            "nullable": true,
            "description": "لقطة للبيانات المعدلة قبل الإجراء، على سبيل المثال `{\"status\": \"In Review\"}` عند تغيير الحالة. تكون `null` عندما لم يتغير شيء.",
            "example": {
              "status": "In Review"
            }
          },
          "new_value": {
            "type": "object",
            "nullable": true,
            "description": "لقطة للبيانات المعدلة بعد الإجراء، على سبيل المثال `{\"status\": \"Approved\"}`. تكون `null` عندما لم يتغير شيء.",
            "example": {
              "status": "Approved"
            }
          },
          "changed_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "أسماء الحقول التي تم تعديلها بواسطة هذا النشاط (مثل `[\"status\"]`). تكون فارغة للتعليقات وللإدخالات المضافة عبر `POST …/reviews/`.",
            "example": [
              "status"
            ]
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "سياق إضافي للمدخلات المنشأة بواسطة النظام. تحمل عمليات عرض صفحة التفاصيل في Console القيمة `{\"system_event\": \"DETAIL_VIEWED\", \"detail_type\": \"verification\"}` بحيث يمكن استبعادها عبر التصفية من منطق الإشعارات. يحمل أي `COMMENT` قام كاتبه بتعديله في Console الحقل `edited_at`، وهو وقت آخر تعديل بتنسيق ISO 8601 (ويحتوي `comment` و`mentioned_emails` حينئذٍ على النص المعدل والإشارات المذكورة فيه). ويكون `null` للمدخلات العادية.",
            "example": null
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت كتابة المُدخل، بتنسيق ISO 8601 UTC.",
            "example": "2026-06-12T00:19:31.918735Z"
          }
        }
      },
      "QuestionnaireListItem": {
        "type": "object",
        "description": "إصدار استبيان واحد في عرض القائمة.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرف UUID لكل إصدار. يُستخدم كـ `{questionnaire_uuid}` لعمليات الجلب/التحديث/الحذف وكـ `questionnaire_uuid` في إعدادات ميزة QUESTIONNAIRE لسير العمل."
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "default_language": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_simple_questionnaire": {
            "type": "boolean",
            "description": "تكون القيمة True للاستبيانات الخطية التي تم إنشاؤها عبر واجهة API هذه؛ وتكون False للاستبيانات القائمة على المخططات التي تم إنشاؤها في لوحة التحكم."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "question_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "أنواع العناصر بالأحرف الكبيرة للأسئلة القابلة للإجابة، بحسب ترتيب الإنشاء (مثل `SHORT_TEXT` و`MULTIPLE_CHOICE` و`FILE_UPLOAD`). تُستثنى العناصر الهيكلية `SECTION_HEADER` و`SEPARATOR`. مدخل واحد لكل سؤال، لذا يمكن أن تتكرر القيم."
          },
          "workflow_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "أسماء سير العمل التي تستخدم هذا الاستبيان. تكون حالياً دائماً `[]` في هذه الـ endpoint (يتم ملؤها فقط في قائمة Console)."
          },
          "questionnaire_group_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف ثابت يجمع جميع إصدارات الاستبيان نفسه."
          },
          "version": {
            "type": "integer",
            "description": "رقم الإصدار ضمن المجموعة، بدءاً من 1."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت نشر هذا الإصدار. القيمة `null` للمسودات."
          },
          "is_editable": {
            "type": "boolean",
            "description": "صحيح عندما يكون هذا الإصدار مسودة `draft`."
          }
        }
      },
      "SimpleQuestionnaireRequest": {
        "type": "object",
        "description": "أنشئ استبياناً خطياً بسيطاً. تحوّل API عناصر `form_elements` إلى المخطط الداخلي للاستبيان.",
        "required": [
          "title",
          "languages",
          "form_elements"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "اسم داخلي للاستبيان."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "languages": {
            "type": "array",
            "description": "اللغات المضمنة في كل تسمية. يجب أن تتضمن `en`.",
            "items": {
              "type": "string"
            },
            "example": [
              "en"
            ]
          },
          "default_language": {
            "type": "string",
            "description": "اللغة الافتراضية. يجب تضمينها في `languages`.",
            "example": "en"
          },
          "is_active": {
            "type": "boolean",
            "default": true
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ],
            "description": "احذف هذا الحقل لإنشاء استبيان منشور وجاهز لمهام سير العمل."
          },
          "form_elements": {
            "type": "array",
            "minItems": 1,
            "description": "الأسئلة بالترتيب الدقيق الذي يجب أن يراها المستخدمون به. التفريع والحقول المشروطة غير مدعومة.",
            "items": {
              "$ref": "#/components/schemas/SimpleQuestionnaireElement"
            }
          }
        }
      },
      "SimpleQuestionnaireUpdateRequest": {
        "type": "object",
        "description": "تحديث البيانات الوصفية للاستبيان أو استبدال قائمة `form_elements` الخطية الكاملة.",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "default_language": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          },
          "form_elements": {
            "type": "array",
            "minItems": 1,
            "description": "إذا تم توفيره، فإن هذا يستبدل قائمة الأسئلة الخطية بالكامل.",
            "items": {
              "$ref": "#/components/schemas/SimpleQuestionnaireElement"
            }
          }
        }
      },
      "SimpleQuestionnaireElement": {
        "type": "object",
        "required": [
          "element_type",
          "label"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "معرّف سؤال ثابت واختياري. إذا تم حذفه، تنشئ API المعرّفات `q1` و `q2` وما إلى ذلك. استخدم أحرفاً صغيرة وأرقاماً وشرطات سفلية لسهولة القراءة.",
            "example": "source_of_funds"
          },
          "element_type": {
            "type": "string",
            "description": "نوع السؤال. تقبل الـ API هذه القيم بالأحرف الصغيرة وما يعادلها بالأحرف الكبيرة.",
            "enum": [
              "short_text",
              "long_text",
              "dropdown",
              "single_choice",
              "multiple_choice",
              "number",
              "image",
              "file_upload",
              "time",
              "email",
              "address",
              "phone",
              "country",
              "date_picker",
              "consent",
              "section_header",
              "separator",
              "heading",
              "paragraph"
            ]
          },
          "label": {
            "type": "object",
            "description": "تسمية السؤال حسب رمز اللغة، على سبيل المثال `{ \"en\": \"Source of funds\" }`.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "string"
            }
          },
          "placeholder": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "string"
            }
          },
          "is_required": {
            "type": "boolean",
            "default": false
          },
          "options": {
            "type": "array",
            "description": "يُستخدم مع `dropdown` و`single_choice` و`multiple_choice`. إذا تم حذف `value`، تنشئ واجهة API قيمة استناداً إلى تسمية الخيار.",
            "items": {
              "type": "object",
              "required": [
                "label"
              ],
              "properties": {
                "value": {
                  "type": "string"
                },
                "label": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "max_files": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5,
            "description": "يُستخدم مع `file_upload` أو `image`."
          },
          "validation": {
            "type": "object",
            "nullable": true,
            "description": "التحقق الاختياري من التنسيق لـ `short_text` أو `long_text` أو `number`. يُفرَض أثناء ملء المستخدم للحقل (لا يمكنه المتابعة حتى يجتازه) وتتم إعادة التحقق منه بواسطة API عند الإرسال.",
            "properties": {
              "pattern": {
                "type": "string",
                "description": "تعبير نمطي (مجموعة فرعية من ECMA-262) يجب أن تتطابق القيمة معه بالكامل. لـ `short_text` و`long_text`. لا تضف محددات البداية والنهاية ^/$؛ حيث تتم مطابقة القيمة بالكامل."
              },
              "min_length": {
                "type": "integer",
                "minimum": 0,
                "description": "الحد الأدنى لعدد الأحرف. لكل من `short_text` و`long_text`."
              },
              "max_length": {
                "type": "integer",
                "minimum": 0,
                "description": "الحد الأقصى لعدد الأحرف. خاص بـ `short_text` و`long_text`."
              },
              "min": {
                "type": "number",
                "description": "الحد الأدنى للقيمة الرقمية. لـ `number`."
              },
              "max": {
                "type": "number",
                "description": "الحد الأقصى للقيمة العددية. خاص بـ `number`."
              },
              "error_message": {
                "type": "object",
                "description": "رسالة مترجمة تظهر عند فشل التحقق، مفهرسة برمز اللغة.",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "QuestionnaireDetail": {
        "type": "object",
        "description": "تفاصيل الاستبيان الكاملة المرجعة من endpoint الخاصة بـ GET وPOST (إنشاء) وPATCH (تحديث).",
        "properties": {
          "questionnaire_id": {
            "type": "string",
            "format": "uuid",
            "description": "المعرّف الفريد للاستبيان. استخدم هذا المعرّف عند الإشارة إلى الاستبيان من سير العمل أو في طلبات التحديث/الحذف اللاحقة."
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "default_language": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_simple_questionnaire": {
            "type": "boolean"
          },
          "graph": {
            "type": "object",
            "description": "هيكل المخطط مع start_node وخريطة العقد."
          },
          "sections": {
            "type": "array",
            "description": "محتوى الاستبيان مجمّعاً في أقسام (مستمد من المخطط).",
            "items": {
              "type": "object"
            }
          },
          "questionnaire_group_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف ثابت يجمع جميع إصدارات الاستبيان نفسه."
          },
          "version": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "is_editable": {
            "type": "boolean",
            "description": "تكون القيمة True عندما يكون من الممكن تعديل الاستبيان مباشرة في مكانه (إصدارات المسودة)."
          }
        }
      },
      "UserListItem": {
        "type": "object",
        "description": "مستخدم تم التحقق منه.",
        "properties": {
          "didit_internal_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID الداخلي الثابت من Didit لهذا المستخدم."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "معرّفك الفريد لهذا المستخدم (يتم تمريره عند إنشاء الجلسات). يمكن أن يكون هذا null في حال عدم تقديم معرّف بائع."
          },
          "display_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم عرض مخصص تم تعيينه بواسطتك"
          },
          "full_name": {
            "type": "string",
            "nullable": true,
            "description": "الاسم الكامل المستخرج من المستندات التي تم التحقق منها"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "effective_name": {
            "type": "string",
            "nullable": true,
            "description": "أفضل اسم متاح: display_name إذا كان محدداً، وإلا فـ full_name"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "FLAGGED",
              "BLOCKED"
            ],
            "description": "حالة دورة حياة سجل المستخدم (ليست حالة جلسة). القيمة الافتراضية هي `ACTIVE`، و`FLAGGED` تميز المستخدم للمراجعة اليدوية، و`BLOCKED` تمنع إنشاء جلسات جديدة لقيمة `vendor_data` هذه."
          },
          "portrait_image_url": {
            "type": "string",
            "nullable": true,
            "description": "رابط موقع مسبقاً للصورة الشخصية للمستخدم (تنتهي صلاحيته بعد بضع ساعات)"
          },
          "session_count": {
            "type": "integer",
            "description": "العدد الإجمالي لجلسات التحقق لهذا المستخدم"
          },
          "approved_count": {
            "type": "integer",
            "description": "عدد الجلسات المقبولة"
          },
          "declined_count": {
            "type": "integer",
            "description": "عدد الجلسات المرفوضة"
          },
          "in_review_count": {
            "type": "integer",
            "description": "عدد الجلسات قيد المراجعة"
          },
          "issuing_states": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "رموز ISO 3166-1 alpha-3 لدول الإصدار الواردة في مستندات الهوية المقبولة لهذا المستخدم، مثل `[\"USA\", \"ESP\"]`. مصفوفة فارغة في حال عدم وجود أي منها."
          },
          "approved_emails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "عناوين البريد الإلكتروني التي تم التحقق منها والمجمعة من الجلسات المقبولة لهذا المستخدم، على سبيل المثال `[\"john@example.com\"]`."
          },
          "approved_phones": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "أرقام الهواتف التي تم التحقق منها والمجمعة من الجلسات المقبولة لهذا المستخدم، على سبيل المثال `[\"+14155551234\"]`."
          },
          "features": {
            "type": "object",
            "description": "الحالة المجمعة لكل ميزة عبر جميع جلسات هذا المستخدم. المفاتيح المحتملة: `ID_VERIFICATION`، `NFC`، `LIVENESS`، `FACE_MATCH`، `POA`، `QUESTIONNAIRE`، `EMAIL_VERIFICATION`، `PHONE`، `AML`، `IP_ANALYSIS`، `AGE_ESTIMATION`، `DATABASE_VALIDATION`. القيم المحتملة: `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"
          }
        }
      },
      "BlocklistItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "face",
              "document",
              "phone",
              "email"
            ]
          },
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "session_number": {
            "type": "integer"
          },
          "blocklisted_at": {
            "type": "string",
            "format": "date-time"
          },
          "face_image": {
            "type": "string",
            "nullable": true
          },
          "document_type": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "string",
            "nullable": true
          },
          "phone_number": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "UserDetailItem": {
        "type": "object",
        "description": "تفاصيل المستخدم الكاملة. يوسع UserListItem بالبيانات الوصفية، والتعليقات، وحقل updated_at.",
        "allOf": [
          {
            "$ref": "#/components/schemas/UserListItem"
          },
          {
            "type": "object",
            "properties": {
              "metadata": {
                "type": "object",
                "description": "بيانات وصفية مخصصة بتنسيق JSON أرفقتها بهذا المستخدم. القيمة الافتراضية هي `{}`."
              },
              "tags": {
                "type": "array",
                "description": "تعيينات العلامات. ملاحظة: في استجابات التفاصيل يكون كل إدخال كائن *ربط* علامة (`{uuid, tag: {...}, added_by_email, added_by_name, created_at}`)، على عكس التنسيق المسطح `{uuid, name, color}` المُستخدم في استجابات القوائم.",
                "items": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "معرّف UUID لتعيين الوسم (وليس الوسم نفسه)."
                    },
                    "tag": {
                      "type": "object",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string",
                          "nullable": true
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "didit",
                            "custom"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "added_by_email": {
                      "type": "string",
                      "nullable": true
                    },
                    "added_by_name": {
                      "type": "string",
                      "nullable": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              },
              "comments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "comment_type": {
                      "type": "string",
                      "enum": [
                        "COMMENT",
                        "STATUS_CHANGED",
                        "METADATA_UPDATED",
                        "TAG_ADDED",
                        "TAG_REMOVED",
                        "PROFILE_UPDATED"
                      ]
                    },
                    "comment": {
                      "type": "string",
                      "nullable": true
                    },
                    "actor_email": {
                      "type": "string",
                      "nullable": true
                    },
                    "actor_name": {
                      "type": "string",
                      "nullable": true
                    },
                    "previous_status": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "ACTIVE",
                        "FLAGGED",
                        "BLOCKED",
                        null
                      ]
                    },
                    "new_status": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "ACTIVE",
                        "FLAGGED",
                        "BLOCKED",
                        null
                      ]
                    },
                    "previous_value": {
                      "type": "object",
                      "nullable": true,
                      "description": "قيم الحقول السابقة لإدخالات PROFILE_UPDATED."
                    },
                    "new_value": {
                      "type": "object",
                      "nullable": true,
                      "description": "قيم الحقول الجديدة لمدخلات PROFILE_UPDATED."
                    },
                    "changed_fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "أسماء الحقول التي تم تغييرها بواسطة إدخال PROFILE_UPDATED."
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true
                    },
                    "mentioned_emails": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "description": "سجل الأنشطة والتعليقات الخاصة بهذا المستخدم (تغييرات الحالة، تعديلات الملف التعريفي، الملاحظات اليدوية)."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "BusinessListItem": {
        "type": "object",
        "description": "شركة تم التحقق منها.",
        "properties": {
          "didit_internal_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID الداخلي الثابت من Didit لهذه الشركة."
          },
          "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"
          }
        }
      },
      "BusinessDetailItem": {
        "type": "object",
        "description": "تفاصيل الشركة الكاملة. يمتد من BusinessListItem بإضافة البيانات الوصفية وupdated_at.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BusinessListItem"
          },
          {
            "type": "object",
            "properties": {
              "metadata": {
                "type": "object",
                "description": "بيانات وصفية مخصصة بتنسيق JSON أرفقتها بهذه الشركة. القيمة الافتراضية هي `{}`."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "TransactionDetail": {
        "type": "object",
        "description": "سجل المراقبة الكامل لمعاملة واحدة، كما يتم إرجاعه بواسطة `GET /v3/transactions/{transaction_id}/` و`POST /v3/transactions/`.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف المعاملة الثابت من Didit. يُستخدم كـ `{transaction_id}` لعمليات الاستدعاء اللاحقة."
          },
          "environment": {
            "type": "string",
            "enum": [
              "live",
              "sandbox"
            ],
            "description": "بيئة التطبيق الذي يملك المعاملة. يتم تخزين معاملة `sandbox` ولكن لا يتم تقييمها أو فحصها أو إرسال إشعارات بشأنها أو فوترتها مطلقاً، لذا فإن القيمة الفارغة لـ `rule_runs` تعني \"لم يتم التقييم\"."
          },
          "transaction_number": {
            "type": "integer",
            "description": "رقم المعاملة التسلسلي بنطاق التطبيق المعروض في وحدة التحكم (مثل `4123`)."
          },
          "txn_id": {
            "type": "string",
            "description": "معرّف `transaction_id` الذي أدخلته وقت الإنشاء (بحد أقصى 128 حرفاً). فريد لكل تطبيق."
          },
          "txn_date": {
            "type": "string",
            "format": "date-time",
            "description": "وقت حدوث المعاملة (من `transaction_at`؛ القيمة الافتراضية هي وقت الإرسال)."
          },
          "zone_id": {
            "type": "string",
            "nullable": true,
            "description": "معرّف المنطقة الزمنية لـ IANA المقدم في وقت الإنشاء."
          },
          "transaction_type": {
            "type": "string",
            "description": "الفئة ذات المستوى الأعلى كما تم تخزينها: `finance`، `kyc`، `travelRule`، `userPlatformEvent`، `gamblingBet`، `gamblingLimitChange`، `gamblingBonusChange`، `auditTrailEvent`. يُرجى ملاحظة أن القيم المتعددة الكلمات يتم إرجاعها بصيغة camelCase حتى لو تم إرسالها بصيغة snake_case."
          },
          "action_type": {
            "type": "string",
            "description": "النوع الفرعي ضمن الفئة (مثل `deposit`، `withdrawal`، `transfer`). يتم تعيينه افتراضياً إلى الفئة عند عدم تقديمه."
          },
          "direction": {
            "type": "string",
            "enum": [
              "INBOUND",
              "OUTBOUND"
            ],
            "description": "الاتجاه بالنسبة إلى الشخص المعني. يُخزّن بأحرف كبيرة بصرف النظر عن حالة الأحرف المُرسلة (يُقبل `in`/`out`/`inbound`/`outbound` في المدخلات)."
          },
          "status": {
            "type": "string",
            "enum": [
              "APPROVED",
              "IN_REVIEW",
              "DECLINED",
              "AWAITING_USER"
            ],
            "description": "قرار المراقبة الحالي. يتم إنشاء المعاملات بالحالة `APPROVED`؛ وقد تغيرها القواعد إلى `IN_REVIEW`/`DECLINED` بشكل متزامن."
          },
          "source": {
            "type": "string",
            "enum": [
              "LIVE",
              "IMPORTED"
            ],
            "description": "مصدر نشأة السجل: `LIVE` للمعاملات المرسلة عبر API أو SDK، و`IMPORTED` للمعاملات المحملة عبر الاستيراد من لوحة التحكم."
          },
          "amount": {
            "type": "string",
            "description": "مبلغ المعاملة كسلسلة عشرية مع تجريد الأصفار اللاحقة (على سبيل المثال `\"1500\"`، `\"0.5\"`، `\"0.123456789012345678\"`). حتى 18 منزلة عشرية."
          },
          "currency": {
            "type": "string",
            "description": "رمز العملة الخاص بـ `amount`. يُقبل أي رمز أبجدي وفق معيار ISO 4217 (مثل `EUR`، و`USD`، و`NGN`)، وكذلك يُقبل رمز أصل مشفر (مثل `BTC`). يُفضل استخدام رمز متداول حالياً. ليس لكل رمز مقبول سعر صرف: عندما لا يتوفر سعر صرف للرمز (على سبيل المثال وحدة المحاسبة `XSU` وفق ISO، أو رمز عملة مشفرة لا تحدد Didit سعراً له)، يفشل التحويل التلقائي ويتم إرجاع `preferred_currency_amount` بقيمة فارغة (null) ما لم يقدّم الطلب قيمة محولة مسبقاً في `amount_in_default_currency`."
          },
          "currency_type": {
            "type": "string",
            "nullable": true,
            "description": "`fiat` أو `crypto`، كما تم إرسالها في `currency_kind`."
          },
          "amount_in_default_currency": {
            "type": "string",
            "nullable": true,
            "description": "المبلغ المحوّل مسبقاً الذي قدّمته، كسلسلة نصية عشرية مع إزالة الأصفار اللاحقة."
          },
          "default_currency_code": {
            "type": "string",
            "nullable": true
          },
          "preferred_currency_amount": {
            "type": "string",
            "nullable": true,
            "description": "`amount` محولاً إلى العملة المفضلة للتطبيق، عندما يكون متاحًا."
          },
          "preferred_currency_code": {
            "type": "string",
            "nullable": true
          },
          "payment_details": {
            "type": "string",
            "nullable": true,
            "description": "مرجع الدفع أو الملاحظة بنص حر من الإرسال."
          },
          "payment_txn_id": {
            "type": "string",
            "nullable": true,
            "description": "مرجع نظام الدفع الخارجي (مثل تجزئة معاملة البلوكتشين) من `payment_reference_id`."
          },
          "score": {
            "type": "integer",
            "description": "درجة المخاطر التراكمية الناتجة عن القواعد (عادة من 0 إلى 100). القيمة الأعلى = مخاطر أكبر."
          },
          "severity": {
            "type": "string",
            "nullable": true,
            "enum": [
              "UNKNOWN",
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL"
            ],
            "description": "شدة المخاطر المصنفة المحددة بواسطة القواعد/المزودين (`UNKNOWN`، `LOW`، `MEDIUM`، `HIGH`، `CRITICAL`). تكون `null` حتى يحددها إجراء ما."
          },
          "decision_reason_code": {
            "type": "string",
            "nullable": true,
            "description": "السبب المقروء آلياً للحالة الحالية `status`."
          },
          "decision_reason_label": {
            "type": "string",
            "nullable": true,
            "description": "تسمية سهلة القراءة لـ `decision_reason_code`."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "نسخة ميسّرة من `vendor_data` الخاصة بمقدم الطلب."
          },
          "metadata": {
            "type": "object",
            "description": "لقطة من payload لـ `subject` و`counterparty` كما تم إرسالها في وقت الإنشاء."
          },
          "props": {
            "type": "object",
            "description": "الخصائص `custom_properties` التي قدمتها وقت الإنشاء. يمكن الوصول إلى كل مفتاح في شروط القواعد عبر `custom_values.<key>`."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "color": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "didit",
                    "custom"
                  ],
                  "description": "ما إذا كان الوسم إعداداً مسبقاً من Didit أو وسماً مخصصاً."
                }
              }
            },
            "description": "العلامات المرفقة بالمعاملة (يدوياً أو عبر القواعد)."
          },
          "parties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "APPLICANT",
                    "REMITTER",
                    "BENEFICIARY",
                    "COUNTERPARTY"
                  ],
                  "description": "دور الطرف. يُعيّن endpoint الإنشاء كلاً من `APPLICANT` (الموضوع) و`COUNTERPARTY`."
                },
                "entity_type": {
                  "type": "string",
                  "enum": [
                    "individual",
                    "company",
                    "external",
                    "unhostedWallet"
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "USER",
                    "BUSINESS",
                    "EXTERNAL"
                  ],
                  "description": "ترتبط أطراف `USER`/`BUSINESS` بكيان مملوك لـ Didit عبر `vendor_data`. أما أطراف `EXTERNAL` فلا يوجد كيان Didit خلفها."
                },
                "vendor_data": {
                  "type": "string",
                  "nullable": true,
                  "description": "معرّفك الداخلي للمستخدم/الشركة."
                },
                "full_name": {
                  "type": "string",
                  "nullable": true
                },
                "first_name": {
                  "type": "string",
                  "nullable": true
                },
                "last_name": {
                  "type": "string",
                  "nullable": true
                },
                "country_code": {
                  "type": "string",
                  "nullable": true,
                  "description": "رمز الدولة من `address.country` المُرسل (عادة ISO 3166-1 alpha-3)."
                },
                "dob": {
                  "type": "string",
                  "format": "date",
                  "nullable": true,
                  "description": "تاريخ الميلاد من `date_of_birth` المُرسل."
                },
                "address": {
                  "type": "object",
                  "description": "كائن العنوان كما تم إرساله. يكون `{}` عند حذفه."
                },
                "institution_info": {
                  "type": "object",
                  "description": "تفاصيل المؤسسة كما تم إرسالها. `{}` عند عدم تقديمها."
                },
                "device": {
                  "type": "object",
                  "description": "سياق الجهاز المعياري، بما في ذلك إثراء عنوان IP من جانب الخادم ضمن network_context (الموقع الجغرافي، وإشارات VPN/مركز البيانات) عند تقديم عنوان IP.",
                  "properties": {
                    "fingerprint": {
                      "type": "string",
                      "description": "بصمة جهاز فريدة."
                    },
                    "persistent_device_id": {
                      "type": "string",
                      "description": "معرّف جهاز ثابت عبر الجلسات (مخطط البصمة v2)."
                    },
                    "user_agent": {
                      "type": "string",
                      "description": "سلسلة وكيل المستخدم (user agent) للمتصفح أو التطبيق."
                    },
                    "browser_family": {
                      "type": "string",
                      "description": "عائلة المتصفح (مثل Chrome، وFirefox، وSafari)."
                    },
                    "browser_version": {
                      "type": "string",
                      "description": "سلسلة إصدار المتصفح."
                    },
                    "platform": {
                      "type": "string",
                      "description": "معرّف المنصة (web، ios، android، macos، windows، linux)."
                    },
                    "os_family": {
                      "type": "string",
                      "description": "عائلة نظام التشغيل (مثل iOS وAndroid وWindows)."
                    },
                    "os_version": {
                      "type": "string",
                      "description": "سلسلة إصدار نظام التشغيل."
                    },
                    "accept_language": {
                      "type": "string",
                      "description": "قيمة ترويسة Accept-Language."
                    },
                    "session_id": {
                      "type": "string",
                      "description": "معرّف الجلسة (المخزّن في البيانات الوصفية)."
                    },
                    "session_age_ms": {
                      "type": "number",
                      "description": "عمر الجلسة بالمللي ثانية."
                    },
                    "network_context": {
                      "type": "object",
                      "description": "سياق الشبكة متضمناً عنوان IP والموقع الجغرافي.",
                      "properties": {
                        "ip_address": {
                          "type": "string",
                          "description": "عنوان IP الخاص بالعميل."
                        },
                        "ip_country_code": {
                          "type": "string",
                          "description": "دولة عنوان IP المحددة جغرافياً (ISO 3166-1 alpha-3)."
                        },
                        "latitude": {
                          "type": "number",
                          "description": "خط العرض الجغرافي لعنوان IP."
                        },
                        "longitude": {
                          "type": "number",
                          "description": "خط الطول الجغرافي لعنوان IP."
                        }
                      }
                    }
                  }
                },
                "external_party_snapshot": {
                  "type": "object",
                  "nullable": true,
                  "description": "نسخة مجمّدة من بيانات الطرف للأطراف من نوع `EXTERNAL`. تكون `null` طالما أن الطرف مرتبط بمستخدم أو شركة في Didit."
                }
              }
            },
            "description": "أطراف المعاملة (مقدم الطلب، الطرف المقابل)."
          },
          "payment_methods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "payment_method_type": {
                  "type": "string",
                  "enum": [
                    "bank_card",
                    "bank_account",
                    "e_wallet",
                    "crypto_wallet",
                    "unhosted_wallet",
                    "other"
                  ]
                },
                "label": {
                  "type": "string",
                  "nullable": true
                },
                "fingerprint": {
                  "type": "string",
                  "nullable": true,
                  "description": "تشفير SHA-256 لـ `type:account_id:issuing_country` — معرّف ثابت لربط تكرار استخدام الأداة نفسها."
                },
                "account_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "معرّف الحساب (IBAN، عنوان، token البطاقة، …)."
                },
                "issuing_country": {
                  "type": "string",
                  "nullable": true
                },
                "owner_kind": {
                  "type": "string",
                  "enum": [
                    "USER",
                    "BUSINESS",
                    "EXTERNAL"
                  ]
                },
                "vendor_data": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بك للمستخدم/الشركة المالكة."
                },
                "owner_name": {
                  "type": "string",
                  "nullable": true
                },
                "institution_info": {
                  "type": "object"
                },
                "details": {
                  "type": "object",
                  "description": "كائن `payment_method` الخام كما تم إرساله."
                },
                "external_owner_snapshot": {
                  "type": "object",
                  "nullable": true
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "SOURCE",
                    "DESTINATION",
                    "FUNDING",
                    "BENEFICIARY"
                  ],
                  "description": "كيفية استخدام هذه الطريقة في المعاملة. يحدد endpoint الإنشاء القيمة `SOURCE`/`DESTINATION` بناءً على الاتجاه (الصادر: الموضوع = SOURCE؛ الوارد: الموضوع = DESTINATION)."
                }
              }
            },
            "description": "طرق الدفع المرتبطة بالمعاملة."
          },
          "documents": {
            "type": "array",
            "description": "الملفات المرفقة بالمعاملة من لوحة التحكم. `[]` في حال عدم وجود أي ملفات.",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "nullable": true
                },
                "note": {
                  "type": "string",
                  "nullable": true
                },
                "uploaded_by": {
                  "type": "string",
                  "nullable": true
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "files": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "uuid": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "file_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "رابط URL موقّع قصير الأجل للتنزيل؛ اطلبه عند الحاجة بدلاً من تخزينه."
                      },
                      "original_filename": {
                        "type": "string",
                        "nullable": true
                      },
                      "file_size": {
                        "type": "integer",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          },
          "activities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "activity_type": {
                  "type": "string",
                  "description": "على سبيل المثال `TRANSACTION_CREATED`، أو `TRANSACTION_NOTE_ADDED`، أو `TRANSACTION_STATUS_CHANGED`."
                },
                "source": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "nullable": true
                },
                "title": {
                  "type": "string",
                  "nullable": true
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "metadata": {
                  "type": "object"
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "description": "مدخلات سجل الأنشطة (الإنشاء، الملاحظات، المراجعات اليدوية، تغييرات الحالة)."
          },
          "alerts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "UNKNOWN",
                    "LOW",
                    "MEDIUM",
                    "HIGH",
                    "CRITICAL"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "OPEN",
                    "INVESTIGATING",
                    "AWAITING_USER",
                    "PENDING_SAR",
                    "SAR_FILED",
                    "RESOLVED",
                    "DISMISSED"
                  ]
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "RULE",
                    "PROVIDER",
                    "MANUAL"
                  ]
                },
                "metadata": {
                  "type": "object"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "due_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                }
              }
            },
            "description": "فارغ دائماً اليوم. التنبيه المفتوح هو معاملة بالحالة `IN_REVIEW` أو `AWAITING_USER`."
          },
          "rule_runs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "rule": {
                  "type": "string",
                  "format": "uuid",
                  "description": "معرّف UUID للقاعدة التي تم تشغيلها."
                },
                "rule_title": {
                  "type": "string"
                },
                "rule_description": {
                  "type": "string",
                  "nullable": true
                },
                "rule_category": {
                  "type": "string"
                },
                "matched": {
                  "type": "boolean",
                  "description": "ما إذا كانت شروط القاعدة تطابقت مع هذه المعاملة. يتم تسجيل التشغيل فقط للقواعد المتطابقة، لذلك تحمل التقييمات الحية دائماً القيمة `true`."
                },
                "is_test": {
                  "type": "boolean",
                  "description": "تكون القيمة True عندما تعمل القاعدة في وضع الاختبار TEST (دون أي تأثير على الحالة/الدرجة)."
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "DISABLED",
                    "TEST"
                  ]
                },
                "severity": {
                  "type": "string",
                  "nullable": true
                },
                "score_delta": {
                  "type": "integer",
                  "description": "الدرجة المضافة بواسطة إجراءات `add_score` الخاصة بهذه القاعدة."
                },
                "status_target": {
                  "type": "string",
                  "nullable": true,
                  "description": "الحالة المحددة بواسطة إجراء `change_status`، إن وُجدت."
                },
                "action_summary": {
                  "type": "string",
                  "nullable": true,
                  "description": "ملخص للإجراءات التي نفذتها القاعدة، مفصولة بـ `; ` (مثل `score +30; change_status:IN_REVIEW; add_tag:high_risk_country`). الأجزاء: `score +N`، و`change_status:<STATUS>`، و`add_tag:<name>`، و`add_note`، و`add_to_list`، و`open_case`. تكون القيمة `null` عندما لا تنفذ القاعدة أي إجراء."
                },
                "metadata": {
                  "type": "object",
                  "description": "تفاصيل التقييم: `scope_match`، و`conditions[]`، و`aggregations[]`. يحمل كل إدخال شرط `field`، و`operator`، و`expected_value`، و`current_value` المقروءة من المعاملة، و`matched`، و`group_index`، و`group_logic`. ويحمل كل إدخال تجميع (السرعة / العدد / المجموع) `metric`، و`field`، و`operator`، و`expected_value`، و`computed_value`، أي القيمة التي انتهى إليها التجميع، و`window`، و`filters`، و`matched`، و`sample_references`؛ وتحتوي التجميعات غير المتزامنة المؤجلة على `computed_value: null` و`deferred: true`. مجموعة الشروط المتداخلة هي إدخال `conditions[]` واحد مع `operator` بقيمة `any_of` أو `all_of`، و`field` بقيمة null، ونتائج أعضائها تحت `conditions` الخاصة بها."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "description": "نتائج التنفيذ لكل قاعدة — أي القواعد تم تشغيلها، وما هو تأثيرها على درجة المخاطر."
          },
          "provider_results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "provider": {
                  "type": "string"
                },
                "result_type": {
                  "type": "string",
                  "enum": [
                    "FIAT_MONITORING",
                    "WALLET_SCREENING",
                    "TRANSACTION_SCREENING",
                    "TRAVEL_RULE",
                    "NETWORK_GRAPH",
                    "CUSTOM"
                  ]
                },
                "status": {
                  "type": "string"
                },
                "severity": {
                  "type": "string",
                  "nullable": true
                },
                "score": {
                  "type": "integer"
                },
                "summary": {
                  "type": "string",
                  "nullable": true
                },
                "payload": {
                  "type": "object",
                  "description": "payload استجابة المزود الخام."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "description": "بيانات payload الخام من المزود (فحص AML، تحليلات البلوكتشين، إلخ)."
          },
          "travel_rule": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionTravelRule"
              }
            ],
            "description": "تحويل أو فحص Travel Rule. تتم تعبئته عند إرسال `travel_rule_details`، وكذلك عند تفعيل Travel Rule وإنشاء المعاملة مع `transaction_category: travelRule` (تبدأ Didit التبادل بنفسها، حتى بدون `travel_rule_details`). وتكون القيمة `null` في حال عدم وجود تحويل أو فحص. في التحويل الوارد، تظل بيانات `originator_data` و`beneficiary_data` الخاصة بالطرف المقابل محجوبة (`data_masked: true`) حتى يتم تأكيد ملكية المحفظة."
          },
          "network_snapshot": {
            "type": "object",
            "nullable": true,
            "description": "لقطة المخطط للمعاملات/الأطراف ذات الصلة المستخدمة بواسطة محرك القواعد. إما `network_snapshot` المُرسلة مع المعاملة أو المخطط الذي تُنشئه Didit من فحص AML ناجح للمحفظة (والذي يحل محل المخطط المُرسَل). وتكون `null` عندما لا يوجد أي منهما.",
            "properties": {
              "uuid": {
                "type": "string",
                "format": "uuid"
              },
              "nodes": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "edges": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "metrics": {
                "type": "object"
              }
            }
          },
          "remediation": {
            "type": "object",
            "nullable": true,
            "description": "جلسة معالجة معروضة على المستخدم عندما تكون إعادة التحقق مطلوبة. حلت محلها `action_required`، وهي الكتلة القياسية؛ تم الإبقاء عليها للتوافق مع الإصدارات السابقة.",
            "properties": {
              "session_id": {
                "type": "string"
              },
              "session_token": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "status": {
                "type": "string"
              }
            }
          },
          "action_required": {
            "type": "object",
            "nullable": true,
            "description": "الإجراء المعلّق المطلوب من المستخدم النهائي لإكمال هذه المعاملة، أو null في حال عدم وجود أي إجراء. تشغّل حزم Didit SDK الإجراء تلقائياً بشكل افتراضي وتحدّث المعاملة عند انتهائه. نوعان، يتم التمييز بينهما بواسطة `type`: `verification_session` (جلسة تحقق مستضافة تم إنشاؤها بواسطة إجراء قاعدة) و`wallet_ownership` (جلسة أداة ملكية المحفظة التي تم إنشاؤها تلقائياً لتحويل Travel Rule الذي يتطلب إثبات التحكم في المحفظة، مقيد بإعداد Travel Rule المسمى `auto_wallet_verification`). عند إمكانية تطبيق كليهما، تكون الأولوية لـ `wallet_ownership` لأنه يعطل تبادل Travel Rule.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TransactionVerificationSessionAction"
              },
              {
                "$ref": "#/components/schemas/TransactionWalletOwnershipAction"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "verification_session": "#/components/schemas/TransactionVerificationSessionAction",
                "wallet_ownership": "#/components/schemas/TransactionWalletOwnershipAction"
              }
            }
          },
          "cost_breakdown": {
            "type": "object",
            "nullable": true,
            "description": "تكلفة هذه المعاملة: `total_price` و `items`، عنصر واحد لكل رسم، ويتضمن كل منها `usage_type` و `price` و `details` و `created_at`. إعادة فحص المعاملة نفسها تُعد عنصراً جديداً."
          }
        }
      },
      "TravelRuleSettingsDetail": {
        "type": "object",
        "properties": {
          "is_enabled": {
            "type": "boolean",
            "description": "ما إذا كان سير عمل تفاوض Travel Rule المُدار نشطاً لمعاملات `travelRule` الصادرة في هذا التطبيق."
          },
          "jurisdiction": {
            "type": "string",
            "maxLength": 8,
            "description": "كود الولاية القضائية التشغيلية الخاصة بـ VASP لديك. القيمة الافتراضية `\"EU\"`. تقوم Didit بمطابقته مع النظام الذي تدمغه على معاملات Travel Rule الخاصة بك كـ `travel_rule_regime` (على سبيل المثال، يتحول `EU` أو كود دولة عضو في الاتحاد الأوروبي إلى `eu`)، والذي يمكن لقواعد المعاملات الاستناد إليه. يراه عملاء Didit الآخرون باعتباره ولايتك القضائية في دليل VASP بمجرد أن تُدرج شبكة Didit ملفك التعريفي."
          },
          "name_matching_strictness": {
            "type": "string",
            "enum": [
              "NONE",
              "STRICT",
              "CONTAINS",
              "DEFAULT",
              "FUZZY"
            ],
            "description": "مدى دقة مطابقة أسماء المستفيدين المطلوبة قبل أن تصل المعاملة إلى حالة COMPLETED. تقبل `CONTAINS` اسماً تظهر جميع كلماته في الاسم الآخر."
          },
          "confirmation_timeout_hours": {
            "type": "integer",
            "minimum": 1,
            "description": "الساعات التي يجوز خلالها أن تظل معاملة AWAITING_COUNTERPARTY غير مؤكدة قبل أن تُنهي أداة المسح الدورية صلاحيتها. القيمة الافتراضية 48."
          },
          "timeout_outcome": {
            "type": "string",
            "enum": [
              "HOLD",
              "REJECT",
              "PROCEED"
            ],
            "description": "ما يحدث للمعاملة الأساسية عند انتهاء صلاحية التحويل. القيمة الافتراضية HOLD. تكون لـ sunrise_policy وnon_responsive_policy الأولوية عند انطباقهما وتعيينهما."
          },
          "threshold_amount": {
            "type": "string",
            "description": "سلسلة نصية عشرية، بالعملة الافتراضية لتطبيقك. الحد الأدنى لمبلغ التحويل الذي يُشغّل التبادل المُدار؛ التحويلات الأقل منه تُحسم مباشرة إلى NOT_APPLICABLE. تقارن Didit مبلغ المعاملة محولاً إلى عملتك الافتراضية، أو قيمة `amount_in_default_currency` التي ترسلها؛ وعند عدم توفر مبلغ محوّل، لا يُطبّق الحد. القيمة الافتراضية هي \"0.00\" (لا تفرض لائحة TFR في الاتحاد الأوروبي حداً أدنى للمبلغ)."
          },
          "ownership_validation_mode": {
            "type": "string",
            "enum": [
              "FULL",
              "SIMPLIFIED",
              "AUTOMATED"
            ],
            "description": "مقدار الإثبات الذي تتطلبه ملكية المحفظة. تتطلب `FULL` دائماً إثباتاً (رسالة موقعة، أو إيداعاً تجريبياً، أو لقطة شاشة تمت مراجعتها)، ولا تقبل مطلقاً مجرد إقرار المستخدم النهائي. تقبل `SIMPLIFIED` إقراراً ذاتياً تحت قيمة `simplified_validation_threshold` وإثباتاً فوقها. تتيح `AUTOMATED` لدفتر العناوين والإثباتات السابقة الإجابة تلقائياً، بما في ذلك الإقرارات الذاتية طالما أن `allow_self_declaration` مضبوطة على true. القيمة الافتراضية هي `AUTOMATED`."
          },
          "simplified_validation_threshold": {
            "type": "string",
            "description": "سلسلة نصية عشرية، القيمة الافتراضية \"0.00\". في وضع `SIMPLIFIED`، يقبل التحويل الذي يقل عن هذا المبلغ (بعملة الحد) إقراراً ذاتياً. ويُعتبر التحويل الذي لا يحتوي على مبلغ بتلك العملة أعلى منه."
          },
          "data_sharing_fields": {
            "$ref": "#/components/schemas/TravelRuleDataSharingFields"
          },
          "matching_rules": {
            "$ref": "#/components/schemas/TravelRuleMatchingRules"
          },
          "legal_name": {
            "type": "string",
            "description": "الاسم القانوني لمؤسسة VASP الخاصة بك. مطلوب (غير فارغ) لتعيين is_enabled إلى true."
          },
          "lei": {
            "type": "string",
            "description": "معرّف الكيان القانوني الخاص بك، المعروض في دليل VASP."
          },
          "compliance_email": {
            "type": "string",
            "format": "email",
            "description": "البريد الإلكتروني لجهة اتصال الامتثال لملف VASP التعريفي الخاص بك. تدرج شبكة Didit ملفك التعريفي فقط بمجرد تأكيد هذا العنوان عبر رابط مرسل بالبريد الإلكتروني (POST /v3/travel-rule/settings/compliance-email/confirmation/)؛ ويتطلب تغييره تأكيداً جديداً."
          },
          "is_discoverable": {
            "type": "boolean",
            "description": "ما إذا كان يمكن إدراج ملف تعريف VASP الخاص بك في شبكة Didit: يتم العثور عليه في GET /v3/travel-rule/vasps/ بواسطة عملاء Didit الآخرين والوصول إليه عبر مسار INTERNAL. يتطلب الإدراج أيضاً تطبيقاً قيد الإنتاج، وتفعيل Travel Rule، واسماً قانونياً، وبريداً إلكترونياً مؤكداً للامتثال؛ يوضح didit_network العناصر المفقودة. القيمة الافتراضية هي true."
          },
          "inbound_auto_accept": {
            "type": "boolean",
            "description": "عند التعيين على true، تتم الموافقة تلقائياً على استفسار TRP الوارد الذي تكون فيه محفظة المستفيد مُدخلةً موثقةً في دفتر العناوين مع تطابق الاسم. وعند التعيين على false، ينتظر ذلك الاستفسار في حالة ON_HOLD حتى توافق عليه أو ترفضه عبر endpoint الخاص بالملكية. لا تتأثر تحويلات مسار INTERNAL والتحويلات بعد الإيداع. القيمة الافتراضية هي true."
          },
          "allow_self_declaration": {
            "type": "boolean",
            "description": "عند التعيين على true، توفر أداة ملكية المحفظة خيار الإقرار الذاتي كطريقة إثبات احتياطية. القيمة الافتراضية هي true."
          },
          "allow_screenshot_proof": {
            "type": "boolean",
            "description": "عند التعيين على true، توفر أداة ملكية المحفظة خيار تحميل لقطة شاشة كطريقة لإثبات الملكية. القيمة الافتراضية هي true."
          },
          "auto_wallet_verification": {
            "type": "boolean",
            "description": "عند التعيين على true، يؤدي إرسال تحويل Travel Rule صادر يتطلب إثبات تحكّم المستخدم النهائي بالمحفظة إلى إنشاء جلسة أداة ملكية المحفظة تلقائياً وتكون مرتبطة بالمعاملة وإظهارها في كتلة action_required الخاصة بالمعاملة. القيمة الافتراضية هي true."
          },
          "vasp_attribution_enabled": {
            "type": "boolean",
            "description": "عند التعيين على true، يُنسَب تحويل Travel Rule الصادر الذي يتعذر على أي مسار توجيهه عبر تحليلات البلوكتشين: يتم تحديد الـ VASP المالك لمحفظة الوجهة، ويُسجَّل الكيان في التحويل ودليل VASP، وتتم إعادة تشغيل المسارات مرة واحدة بالاسم المنسوب. القيمة الافتراضية هي true."
          },
          "counterparty_screening_enabled": {
            "type": "boolean",
            "description": "فحص اختياري للعقوبات والأخبار السلبية لجهات VASP التابعة للطرف المقابل، وتتم الفوترة لكل فحص بسعر فحص AML للشركات. عند تفعيله، تفحص Didit الطرف المقابل الذي يبلغه تبادل صادر (مع إعادة استخدام فحص أُجري منذ أقل من 30 يوماً) ويمكنك فحص إحداها عبر POST /v3/travel-rule/vasps/{vasp_id}/screening/. القيمة الافتراضية false: لا يتم فحص أي شيء ولا تتم الفوترة."
          },
          "sunrise_policy": {
            "type": "string",
            "enum": [
              "",
              "HOLD",
              "REJECT",
              "PROCEED"
            ],
            "description": "ما يفعله التحويل منتهي الصلاحية بمعاملته عندما يكون الطرف المقابل إدخال دليل في اختصاص قضائي مدرج ضمن sunrise_jurisdictions ولا يطبق Travel Rule بعد: HOLD ينقله إلى المراجعة، وREJECT يرفضه، وPROCEED يترك حالته دون تغيير. القيمة الفارغة (الافتراضية) تتبع timeout_outcome. يُطبّق قبل non_responsive_policy."
          },
          "sunrise_jurisdictions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "description": "للقراءة فقط. الدول (ISO 3166 alpha-2) التي تعاملها Didit على أنها في فترة بداية تطبيق Travel Rule، حيث ينطبق sunrise_policy. حالياً CO و KH و VN. أي اختصاص قضائي آخر، أو إذا كان فارغاً أو غير معروف، يتبع timeout_outcome."
          },
          "non_responsive_policy": {
            "type": "string",
            "enum": [
              "",
              "HOLD",
              "REJECT",
              "PROCEED"
            ],
            "description": "ما يفعله التحويل منتهي الصلاحية بمعاملته عندما يكون الطرف المقابل إدخال دليل تكون حالة استجابته UNRESPONSIVE: إما HOLD أو REJECT أو PROCEED، كما هو الحال بالنسبة لـ timeout_outcome. القيمة الفارغة (الافتراضية) تتبع timeout_outcome. يُطبّق sunrise_policy أولاً عندما ينطبق كلاهما."
          },
          "travel_address": {
            "type": "string",
            "description": "للقراءة فقط. Travel Address الخاص بـ VASP لديك - endpoint استعلام TRP الوارد المُرمَّز الذي تستخدمه جهات VASP الأخرى للوصول إليك. يكون فارغاً طالما أن `is_enabled` بقيمة false."
          },
          "disabled_networks": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "GTR",
                "TRUST",
                "VERIFYVASP",
                "SYGNA"
              ]
            },
            "description": "الشبكات المنسحبة من عضوية المنصة. لا يؤدي ذلك إلى تعطيل عضوياتك الخاصة المتصلة أو توفير شبكات غير متاحة.",
            "default": []
          },
          "networks": {
            "type": "object",
            "readOnly": true,
            "description": "حسب الشبكة، كيف سيرسل هذا التطبيق ولماذا يتعذر عليه ذلك. لا يتم تضمين أي شبكة، بما في ذلك GTR، افتراضياً: يمكن الوصول إلى الشبكة من خلال عضويتك المتصلة الخاصة، أو من خلال عضوية Didit بمجرد تفعيل عضوية Didit في تلك الشبكة ونشاط مشاركك الخاص عليها. ليس فحصاً مباشراً لحالة التشغيل أو التسليم.",
            "properties": {
              "gtr": {
                "$ref": "#/components/schemas/TravelRuleNetworkState"
              },
              "trust": {
                "$ref": "#/components/schemas/TravelRuleNetworkState"
              },
              "verifyvasp": {
                "$ref": "#/components/schemas/TravelRuleNetworkState"
              },
              "sygna": {
                "$ref": "#/components/schemas/TravelRuleNetworkState"
              }
            }
          },
          "didit_network": {
            "type": "object",
            "readOnly": true,
            "description": "ما إذا كانت شبكة Didit تُدرج ملف VASP التعريفي الخاص بك، بحيث يعثر عليه عملاء Didit الآخرون في الدليل ويصلون إليه عبر مسار INTERNAL، وكل شرط لم يستوفه بعد.",
            "properties": {
              "listed": {
                "type": "boolean"
              },
              "missing": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "travel_rule_off",
                    "sandbox_application",
                    "not_discoverable",
                    "legal_name_missing",
                    "compliance_email_missing",
                    "compliance_email_unconfirmed",
                    "excluded_by_staff",
                    "internal_organization"
                  ]
                },
                "description": "فارغ عند الإدراج. compliance_email_unconfirmed: أرسل التأكيد باستخدام POST /v3/travel-rule/settings/compliance-email/confirmation/ وافتح الرابط المرسل عبر البريد الإلكتروني. excluded_by_staff: صنفت Didit التطبيق على أنه تجريبي أو توضيحي أو داخلي."
              },
              "compliance_email_confirmed": {
                "type": "boolean",
                "description": "ما إذا كان compliance_email الحالي قد تم تأكيده عبر الرابط المرسل بالبريد الإلكتروني."
              }
            }
          }
        }
      },
      "TravelRuleSettingsUpdate": {
        "type": "object",
        "properties": {
          "is_enabled": {
            "type": "boolean"
          },
          "legal_name": {
            "type": "string",
            "maxLength": 255
          },
          "lei": {
            "type": "string",
            "maxLength": 20
          },
          "jurisdiction": {
            "type": "string",
            "maxLength": 8
          },
          "name_matching_strictness": {
            "type": "string",
            "enum": [
              "NONE",
              "STRICT",
              "CONTAINS",
              "DEFAULT",
              "FUZZY"
            ],
            "description": "يقبل `CONTAINS` اسماً تظهر جميع كلماته في الاسم الآخر."
          },
          "confirmation_timeout_hours": {
            "type": "integer",
            "minimum": 1
          },
          "timeout_outcome": {
            "type": "string",
            "enum": [
              "HOLD",
              "REJECT",
              "PROCEED"
            ]
          },
          "compliance_email": {
            "type": "string",
            "format": "email",
            "description": "البريد الإلكتروني لجهة اتصال الامتثال لملف VASP التعريفي الخاص بك. تدرج شبكة Didit ملفك التعريفي فقط بمجرد تأكيد هذا العنوان عبر رابط مرسل بالبريد الإلكتروني (POST /v3/travel-rule/settings/compliance-email/confirmation/)؛ ويتطلب تغييره تأكيداً جديداً."
          },
          "is_discoverable": {
            "type": "boolean",
            "description": "ما إذا كان يمكن إدراج ملف تعريف VASP الخاص بك في شبكة Didit: يتم العثور عليه في GET /v3/travel-rule/vasps/ بواسطة عملاء Didit الآخرين والوصول إليه عبر مسار INTERNAL. يتطلب الإدراج أيضاً تطبيقاً قيد الإنتاج، وتفعيل Travel Rule، واسماً قانونياً، وبريداً إلكترونياً مؤكداً للامتثال؛ يوضح didit_network العناصر المفقودة. القيمة الافتراضية هي true."
          },
          "threshold_amount": {
            "type": "string",
            "description": "سلسلة نصية عشرية، صفر أو أكثر، بالعملة الافتراضية لتطبيقك. الحد الأدنى لمبلغ التحويل الذي يُشغّل التبادل المُدار."
          },
          "ownership_validation_mode": {
            "type": "string",
            "enum": [
              "FULL",
              "SIMPLIFIED",
              "AUTOMATED"
            ],
            "description": "انظر حقل الاستجابة الذي يحمل الاسم نفسه."
          },
          "simplified_validation_threshold": {
            "type": "string",
            "description": "سلسلة نصية عشرية، 0 أو أكثر."
          },
          "data_sharing_fields": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleDataSharingFields"
              }
            ],
            "description": "يتم الدمج حسب نوع الكيان: أي نوع كيان تستبعده يحتفظ باختياره الحالي. الاختيار الذي لا يمكنه تلبية التزامات المُرسِل لنظام `jurisdiction` الخاص بك (EU TFR أو توصية FATF رقم 16)، بما في ذلك القائمة الفارغة، يتم رفضه بالرمز `400`."
          },
          "matching_rules": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleMatchingRules"
              }
            ],
            "description": "يتم الدمج حسب نوع الكيان، وحسب الحقل داخله. الحقل الذي لا يقارنه نوع الكيان هذا (على سبيل المثال `date_of_birth` لـ `company`) يتم رفضه بالرمز `400`."
          },
          "inbound_auto_accept": {
            "type": "boolean"
          },
          "allow_self_declaration": {
            "type": "boolean"
          },
          "allow_screenshot_proof": {
            "type": "boolean",
            "description": "عند التعيين على true، توفر أداة ملكية المحفظة خيار تحميل لقطة شاشة كطريقة لإثبات الملكية. القيمة الافتراضية هي true."
          },
          "auto_wallet_verification": {
            "type": "boolean"
          },
          "vasp_attribution_enabled": {
            "type": "boolean"
          },
          "counterparty_screening_enabled": {
            "type": "boolean",
            "description": "فحص اختياري للعقوبات والأخبار السلبية لجهات VASP التابعة للطرف المقابل، وتتم الفوترة لكل فحص بسعر فحص AML للشركات. عند تفعيله، تفحص Didit الطرف المقابل الذي يبلغه تبادل صادر (مع إعادة استخدام فحص أُجري منذ أقل من 30 يوماً) ويمكنك فحص إحداها عبر POST /v3/travel-rule/vasps/{vasp_id}/screening/. القيمة الافتراضية false: لا يتم فحص أي شيء ولا تتم الفوترة."
          },
          "sunrise_policy": {
            "type": "string",
            "enum": [
              "",
              "HOLD",
              "REJECT",
              "PROCEED"
            ],
            "description": "HOLD أو REJECT أو PROCEED، أو فارغ لاتباع timeout_outcome. راجع حقل الاستجابة الذي يحمل نفس الاسم."
          },
          "non_responsive_policy": {
            "type": "string",
            "enum": [
              "",
              "HOLD",
              "REJECT",
              "PROCEED"
            ],
            "description": "HOLD أو REJECT أو PROCEED، أو فارغ لاتباع timeout_outcome. راجع حقل الاستجابة الذي يحمل نفس الاسم."
          },
          "disabled_networks": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "GTR",
                "TRUST",
                "VERIFYVASP",
                "SYGNA"
              ]
            },
            "description": "الشبكات المنسحبة من عضوية المنصة. لا يؤدي ذلك إلى تعطيل عضوياتك الخاصة المتصلة أو توفير شبكات غير متاحة.",
            "default": []
          }
        },
        "description": "جميع الحقول اختيارية؛ يُطبّق PUT تحديثاً جزئياً."
      },
      "WalletAddressEntry": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "address": {
            "type": "string",
            "description": "عنوان المحفظة؛ القيمة `\"\"` لمدخل تم استيراده بواسطة التجزئة (hash) فقط. فريد لكل تطبيق وسلسلة وmemo، مع مقارنة العنوان دون مراعاة حالة الأحرف. بعد حذف أحد المدخلات، يمكنك تسجيل نفس العنوان مرة أخرى."
          },
          "chain": {
            "type": "string",
            "description": "رمز الشبكة للعنوان، مثل `ETH` أو `BTC`. عندما تقوم Didit بتوجيه تحويل أو تسجيله، فإنها تطابق مدخلات دفتر العناوين بناءً على عنوان المحفظة، وعندما يتضمن التحويل شبكة، تطابق هذه القيمة أيضاً بغض النظر عن حالة الأحرف. شبكة التحويل هي `beneficiary_data.chain`، وتُملأ من شبكة العملات المشفرة للمعاملة أو رمز العملة (مثل `ETH`) عندما لا ترسلها بنفسك، أو من `chain` لتسجيل ما بعد الإيداع، لذا استخدم الرمز نفسه في كل مكان. المدخلة ذات الشبكة الفارغة تطابق أي شبكة. يُخزن المستفيد من Lightning (معرّف العقدة أو Lightning Address) المسجل على bitcoin بأحرف صغيرة تحت `LIGHTNING`، حيث تتم مطابقة تحويلات Lightning. يتم تخزين الشبكات المعروفة تحت معرّف معياري واحد بغض النظر عن طريقة كتابتها في الإرسال: يتم تخزين \"ethereum\" و\"Ethereum\" و\"ERC20\" كـ ETH، و\"BNB Smart Chain\" و\"BEP20\" كـ BNB، و\"tron\" كـ TRX. أما اسم الشبكة غير المعروف فيُحتفظ به كما هو وارد."
          },
          "holder_vendor_data": {
            "type": "string",
            "description": "معرّفك الداخلي للحائز."
          },
          "holder_name": {
            "type": "string",
            "description": "اسم صاحب المحفظة، يُستخدم لمطابقة اسم المستفيد."
          },
          "entity_type": {
            "type": "string",
            "description": "نص حر، القيمة الافتراضية هي \"individual\"."
          },
          "is_ownership_verified": {
            "type": "boolean",
            "description": "للقراءة فقط. ما إذا كان قد تم إثبات ملكية هذا العنوان."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "travel_address": {
            "type": "string",
            "description": "Travel Address الخاص بـ VASP الطرف المقابل لهذه المحفظة، إن كان معلوماً. يتيح لـ Didit توجيه تحويلات هذا المستفيد عبر مسار TRP، للأصول التي يدعمها TRP (وهي BTC وETH وUSDC على شبكة مُسمّاة)."
          },
          "address_hash": {
            "type": "string",
            "description": "للقراءة فقط. تجزئة SHA-256 للعنوان بالأحرف الصغيرة، بنظام hex ذي الأحرف الصغيرة. يتم مطابقة الإدخال المستورد عبر تجزئته فقط عليه."
          },
          "memo": {
            "type": "string",
            "description": "علامة الوجهة (destination tag) أو المذكرة (memo) التي تشكل جزءًا من المحفظة على شبكة تستخدم المذكرات (XRP وXLM وEOS وATOM وHBAR)؛ القيمة `\"\"` للعنوان بأكمله. لا يطابق الإدخال الذي يحتوي على مذكرة سوى التحويلات التي تحدد تلك المذكرة؛ بينما يطابق الإدخال الذي لا يحتوي عليها العنوان بأكمله."
          },
          "receiving_travel_address": {
            "type": "string",
            "readOnly": true,
            "description": "Travel Address الخاص بك لكل محفظة لهذه المحفظة: قدّمه إلى الـ VASP المُرسِل لكي يحدد استعلام TRP الخاص به هذه المحفظة. يكون فارغاً للمحفظة المسجلة على أنها تابعة لـ VASP آخر، وطالما أن Travel Rule معطل، وقبل حفظ ملف تعريف VASP الخاص بك."
          }
        }
      },
      "WalletAddressEntryCreate": {
        "type": "object",
        "required": [
          "address"
        ],
        "properties": {
          "address": {
            "type": "string",
            "maxLength": 128,
            "description": "عنوان المحفظة. يُخزن عنوان XRP من النوع X-address كعنوان كلاسيكي وعلامته، بحيث يطابق التحويلات التي تشير إلى أيٍّ من الصيغتين."
          },
          "chain": {
            "type": "string",
            "maxLength": 32,
            "description": "رمز السلسلة (token) للعنوان، على سبيل المثال `ETH` أو `BTC`. عندما تقوم Didit بتوجيه تحويل أو تسجيله، فإنها تطابق مدخلات دفتر العناوين بناءً على عنوان المحفظة، وعندما يتضمن التحويل سلسلة، فإنها تطابق هذه القيمة أيضاً، مع تجاهل حالة الأحرف. سلسلة التحويل هي `beneficiary_data.chain`، وتُملأ من سلسلة العملات المشفرة للمعاملة أو رمز العملة (على سبيل المثال `ETH`) عندما لا ترسلها، أو `chain` لتسجيل ما بعد الإيداع، لذا استخدم نفس الـ token في كل مكان. المدخل ذو السلسلة الفارغة يطابق أي سلسلة. تُخزّن السلاسل المعروفة تحت معرّف قياسي واحد بغض النظر عن طريقة الكتابة التي ترسلها: يتم تخزين \"ethereum\" و\"Ethereum\" و\"ERC20\" جميعها كـ ETH، و\"BNB Smart Chain\" و\"BEP20\" كـ BNB، و\"tron\" كـ TRX. أما اسم السلسلة غير المعروف فيتم الاحتفاظ به كما قُدّم."
          },
          "holder_vendor_data": {
            "type": "string",
            "maxLength": 255
          },
          "holder_name": {
            "type": "string",
            "maxLength": 255
          },
          "entity_type": {
            "type": "string",
            "default": "individual",
            "maxLength": 16
          },
          "self_declared": {
            "type": "boolean",
            "default": false,
            "description": "للكتابة فقط. عندما تكون true، يتم إنشاء الإدخال مع التحقق من ملكيته مسبقاً عبر إثبات SELF_DECLARATION. يُرجع 400 عندما يكون `allow_self_declaration` معطلاً في إعدادات Travel Rule الخاصة بك."
          },
          "travel_address": {
            "type": "string",
            "description": "اختياري. عنوان Travel Address الخاص بـ VASP الطرف المقابل لهذه المحفظة، مما يمكّن توجيه TRP للأصول التي يدعمها TRP (وهي BTC و ETH و USDC على شبكة محددة). يؤدي إدخال Travel Address غير صالح إلى إرجاع 400.",
            "maxLength": 512
          },
          "memo": {
            "type": "string",
            "maxLength": 256,
            "description": "اختياري. وسم الوجهة (destination tag) أو المذكرة (memo) التي تشكل جزءاً من المحفظة. XRP: وسم وجهة، عدد صحيح من 0 إلى 4294967295 (يُقبل رقم JSON). XLM: مذكرة نصية تصل إلى 28 بايت، أو معرّف 64 بت أو تجزئة بطول 32 بايت بصيغة hex. EOS: حتى 256 بايت. ATOM: حتى 256 حرفاً. HBAR: حتى 100 بايت. محافظ Bitcoin وEVM وSolana وTron وLitecoin وBitcoin Cash وDogecoin وLightning لا تقبل أي مذكرة: وجود واحدة يؤدي إلى خطأ `400`. الاسم المستعار: `destinationTag` أو `destination_tag`."
          }
        }
      },
      "WalletAddressEntryUpdate": {
        "type": "object",
        "properties": {
          "holder_name": {
            "type": "string",
            "maxLength": 255
          },
          "holder_vendor_data": {
            "type": "string",
            "maxLength": 255
          },
          "entity_type": {
            "type": "string",
            "maxLength": 16
          },
          "travel_address": {
            "type": "string",
            "maxLength": 512
          }
        },
        "description": "طلب PATCH هو تحديث جزئي؛ تعكس الاستجابة فقط holder_name وholder_vendor_data وentity_type وtravel_address وreceiving_travel_address وlabel وowner_type."
      },
      "TravelRuleTransferDetail": {
        "type": "object",
        "description": "كائن التحويل الكامل الذي يتم إرجاعه بواسطة endpoints الخاصة بتأكيد الملكية والإنهاء/الإلغاء. طالما أن ملكية المحفظة لتحويل وارد غير مؤكدة، يتم إرجاع `originator_data` و`beneficiary_data` للطرف المقابل محجوبة (يتم الاحتفاظ بالحرف الأول من كل كلمة؛ بينما تظل المحفظة، والبلوكتشين، وتوجيه VASP قابلة للقراءة) وتكون قيمة `data_masked` هي true.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "AWAITING_COUNTERPARTY",
              "ON_HOLD",
              "COMPLETED",
              "FINISHED",
              "CANCELLED",
              "EXPIRED",
              "COUNTERPARTY_MISMATCHED_DATA",
              "COUNTERPARTY_VASP_NOT_FOUND",
              "COUNTERPARTY_VASP_NOT_REACHABLE",
              "UNCONFIRMED_OWNERSHIP",
              "COUNTERPARTY_VASP_GENERAL_DECLINE",
              "NOT_ENOUGH_COUNTERPARTY_DATA",
              "NOT_APPLICABLE"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "INBOUND",
              "OUTBOUND"
            ]
          },
          "rail": {
            "type": "string",
            "nullable": true,
            "enum": [
              "INTERNAL",
              "TRP",
              "GTR",
              "TRUST",
              "VERIFYVASP",
              "SYGNA",
              "EMAIL",
              "TEST_VASP",
              null
            ],
            "description": "المسار الذي تم توجيه التحويل عبره، أو null عند عدم تحديد أي مسار (على سبيل المثال أقل من الحد، أو محفظة طرف مقابل ذاتية الاستضافة، أو تسجيل بعد الإيداع، أو عدم وجود طرف مقابل يمكن الوصول إليه). تعني INTERNAL أن كلا الجانبين هما تطبيقا Didit؛ وتعني EMAIL أنه تم الوصول إلى الطرف المقابل عبر رابط استلام تم إرساله بالبريد الإلكتروني. تعني TEST_VASP أن Didit Test VASP استجاب للتحويل في البيئة التجريبية. عبر GTR وVERIFYVASP وSYGNA، تقرأ Didit إجابة الطرف المقابل من استجابة الشبكة أو عبر استقصائها كل 5 دقائق. تقوم TRUST بالإرسال فقط، لذا يظل تحويل TRUST في حالة AWAITING_COUNTERPARTY حتى تنتهي صلاحيته. لا يُستخدم مسار الشبكة إلا عندما تكون قد ربطت عضويتك الخاصة بتلك الشبكة. ويتم اختياره بعد اكتمال إنشاء المعاملة، لذا يكون null في تلك الاستجابة."
          },
          "protocol": {
            "type": "string",
            "nullable": true
          },
          "ivms_version": {
            "type": "string",
            "example": "ivms101.2023"
          },
          "required": {
            "type": "boolean"
          },
          "ownership_confirmed": {
            "type": "boolean",
            "nullable": true
          },
          "deadline_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "timeline": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "detail": {
                  "type": "string"
                },
                "name_match": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TravelRuleNameMatch"
                    }
                  ],
                  "nullable": true,
                  "description": "مقارنة الاسم التي حسمها هذا الإدخال، بجوار `detail`. غير موجودة في الإدخالات التي لم تقارن أي اسم."
                },
                "reason": {
                  "type": "string",
                  "description": "موجود فقط في إدخال انتقال ناتج عن فشل التسليم: `email_undeliverable` أو `delivery_failed`، وهي القيمة التي يُبلغ عنها `reason` الخاص بالتحويل."
                }
              }
            }
          },
          "counterparty_vasp": {
            "type": "object",
            "nullable": true,
            "properties": {
              "name": {
                "type": "string"
              },
              "lei": {
                "type": "string"
              },
              "dd_score": {
                "type": "integer",
                "description": "درجة العناية الواجبة من 0 إلى 100، حيث تكون القيمة الأعلى أفضل. نفس المقياس المعتمد في دليل VASP."
              },
              "dd_score_breakdown": {
                "type": "object",
                "description": "مساهمات كل مكون في dd_score، كائن واحد لكل مكون كما هو موضح في دليل VASP (الاختصاص القضائي، التحقق، البروتوكول، معرّف الكيان القانوني LEI، السجل، الأساسيات، الاستجابة)، كل منها يحتوي على {points, max, reason, detail}. تكون القيمة {} حتى يتم تقييم الطرف المقابل.",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "points": {
                      "type": "number",
                      "description": "النقاط الممنوحة لهذا المكوّن."
                    },
                    "max": {
                      "type": "integer",
                      "description": "الحد الأقصى للنقاط التي يمكن لهذا المكوّن منحها."
                    },
                    "reason": {
                      "type": "string",
                      "description": "رمز مقروء آلياً لقرار المكوّن."
                    },
                    "detail": {
                      "type": "string",
                      "description": "سبب مقروء للبشر للنقاط الممنوحة."
                    }
                  }
                }
              },
              "dd_assessed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت آخر تشغيل لتقييم العناية الواجبة. القيمة Null حتى يتم تقييم الطرف المقابل."
              }
            }
          },
          "originator_data": {
            "type": "object",
            "description": "جهة المُرسِل. بالنسبة للتحويلات الواردة، يتم حجب قيم الطرف المقابل حتى يتم تأكيد الملكية."
          },
          "beneficiary_data": {
            "type": "object",
            "description": "طرف المستفيد. بالنسبة للتحويلات الواردة، يتم حجب قيم الطرف المقابل حتى يتم تأكيد الملكية."
          },
          "name_match": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleNameMatch"
              }
            ],
            "nullable": true,
            "description": "مقارنة الاسم التي حسمت التحويل، أو null حتى يتم تشغيل مقارنة واحدة. عندما تكون الأطراف مقنّعة، وفي نسخة العميل الآخر من تبادل INTERNAL، يتم إخفاء `transfer_name` و`compared_name` و`matched_names` و`mismatched_names`. قد تختلف قيمة `score` عن `matched`: تتبع `matched` مستوى الصرامة، بينما تمثل `score` مدى التشابه بين الاسمين الكاملين."
          },
          "data_match": {
            "$ref": "#/components/schemas/TravelRuleDataMatch"
          },
          "mismatched_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "اختصار لـ `data_match.mismatched_fields`. يكون فارغاً عندما لا يختلف أي شيء."
          },
          "data_unmasked": {
            "$ref": "#/components/schemas/TravelRuleDataUnmasked"
          },
          "data_masked": {
            "type": "boolean",
            "description": "صحيح طالما أن البيانات الشخصية للطرف المقابل محجوبة في هذه الاستجابة."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "delivery": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleDelivery"
              }
            ],
            "description": "حالة آخر رسالة يتعين على هذا التحويل إرسالها إلى الطرف الآخر. تكون القيمة Null عندما لا يتعين على التحويل إرسال أي رسالة على الإطلاق (على سبيل المثال، إذا كان أقل من `threshold_amount`، أو محفظة ذاتية الاستضافة مُعلنة، أو تسجيل sunrise)."
          },
          "discovery": {
            "type": "array",
            "description": "كيف بحثت Didit عن الطرف المقابل، إدخال واحد لكل خطوة تم تشغيلها. يكون فارغاً عند عدم تشغيل أي عملية اكتشاف، على سبيل المثال في المعاملات الواردة.",
            "items": {
              "$ref": "#/components/schemas/TravelRuleDiscoveryStep"
            }
          },
          "reason": {
            "type": "string",
            "description": "سبب تعثر معاملة بحالة `COUNTERPARTY_VASP_NOT_FOUND` أو `COUNTERPARTY_VASP_NOT_REACHABLE`؛ وتكون `\"\"` لأي حالة أخرى. يُحدد فشل التسليم ذلك أولاً، في حالة `COUNTERPARTY_VASP_NOT_REACHABLE` فقط: `email_undeliverable` (رفض مزود البريد رسالة الامتثال الإلكترونية ولم يتبق أي عنوان لتجربته: عند إرسالها، أو في رسالة تذكير، أو كارتداد دائم تم الإبلاغ عنه لاحقاً) أو `delivery_failed` (فشل مسار التسليم نهائياً: رفض مسار الشبكة الرسالة أو استنفد محاولات إعادة المحاولة، أو لم يستجب مضيف هوية `TRP`، أو لم يقبل مضيف `TRP` الخاص بالطرف المقابل الاستعلام). وإلا فإن تتبع `discovery` يحدد ذلك: `awaiting_end_user` (لم تُحدد أي خطوة طرفاً مقابلاً يمكن لـ Didit الوصول إليه)، أو `directory_match_no_route` (حددت إحدى الخطوات VASP في الدليل ليس لديه مسار)، أو `picked_member_without_proven_wallet` (اختار المستخدم النهائي أحد عملاء Didit الذي لم يثبت سيطرته على المحفظة)، أو `no_directory_match` عندما لا يُقدم التتبع أي سبب آخر. تؤدي إعادة الإرسال إلى تحريك المعاملة، وبالتالي يتم مسح السبب. راجع [سبب تعثر المعاملة](/ar/transaction-monitoring/travel-rule#لماذا-يتوقف-التحويل)."
          },
          "next_actions": {
            "type": "array",
            "description": "ما يتيح متابعة التحويل؛ `[]` لأي حالة باستثناء `COUNTERPARTY_VASP_NOT_FOUND` أو `COUNTERPARTY_VASP_NOT_REACHABLE`. يتيح `email_undeliverable` خيار `update_compliance_email`، ثم `resend`. ويتيح `delivery_failed` خيار `resend`. ويتيح سبب الاكتشاف `select_counterparty_vasp` و `declare_self_hosted` و `add_vasp_hint` و `resend`.",
            "items": {
              "$ref": "#/components/schemas/TravelRuleNextAction"
            }
          },
          "chain_details": {
            "$ref": "#/components/schemas/TravelRuleChainDetails"
          }
        }
      },
      "TravelRuleOwnershipConfirmRequest": {
        "type": "object",
        "required": [
          "confirmed"
        ],
        "properties": {
          "confirmed": {
            "type": "boolean",
            "description": "true لتأكيد الملكية، وfalse لإنكارها."
          },
          "wallet_address": {
            "type": "string",
            "default": "",
            "description": "تحويلات TRP الواردة: عنوان الدفع الذي تعيده Didit إلى VASP المُرسِل عند الموافقة. القيمة الافتراضية هي عنوان الإدخال المطابق في دفتر العناوين، ثم beneficiary_data.wallet_address. وفي تحويل محفظة ذاتية الاستضافة مُصرَّح عنها لا يذكر محفظة الطرف المقابل، تكون المحفظة التي تحققت من ملكيتها؛ وبدونها يُرفض الطلب برمز 400. يتم تجاهله للتحويلات الأخرى."
          }
        }
      },
      "TravelRuleTransferPatchRequest": {
        "type": "object",
        "description": "قدّم واحداً فقط مما يلي: payment_txn_id (إنهاء)، أو action=cancel، أو action=resend، أو action=update_compliance_email مع compliance_email، أو action=update_originator_wallet مع wallet_address، أو action=beneficiary_vasp مع beneficiary_vasp.",
        "properties": {
          "payment_txn_id": {
            "type": "string",
            "description": "تجزئة المعاملة على السلسلة. تتطلب أن تكون عملية التحويل صادرة وبحالة COMPLETED."
          },
          "action": {
            "type": "string",
            "enum": [
              "cancel",
              "resend",
              "update_compliance_email",
              "update_originator_wallet",
              "beneficiary_vasp"
            ],
            "description": "يقوم \"cancel\" بإلغاء معاملة تحويل غير نهائية. ويعيد \"resend\" تشغيل التوجيه لتحويل صادر عالق في الحالات COUNTERPARTY_VASP_NOT_FOUND أو COUNTERPARTY_VASP_NOT_REACHABLE أو NOT_ENOUGH_COUNTERPARTY_DATA. ويستبدل \"update_compliance_email\" البريد الإلكتروني للامتثال الذي يُرسل إليه الطلب، وذلك في تحويل صادر بإحدى هذه الحالات الثلاث؛ أرسل \"resend\" بعد ذلك. ويسجل \"update_originator_wallet\" المحفظة التي خرجت منها الأموال بالفعل (`wallet_address`، `memo`). ويحدد \"beneficiary_vasp\" الـ VASP للطرف المقابل بنفسك (يتطلب `beneficiary_vasp`) لتحويل صادر بإحدى هذه الحالات: حيث يتم توجيهه إلى ذلك الـ VASP وإعادة إرساله."
          },
          "compliance_email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "description": "مطلوب مع `action: update_compliance_email`. يُحفظ كـ `beneficiary_data.counterparty_vasp_email` لهذا التحويل: ينتمي إلى هذا التحويل فقط ولا ينضم إلى أي مدخل في الدليل ولا إلى أي قائمة جهات اتصال."
          },
          "wallet_address": {
            "type": "string",
            "maxLength": 128,
            "description": "مع `action: update_originator_wallet`: المحفظة التي خرجت منها الأموال. عندما تكون مدخلات UTXO للتحويل معروفة، يجب أن تكون واحدة منها."
          },
          "memo": {
            "type": "string",
            "maxLength": 256,
            "description": "مع `action: update_originator_wallet`: مذكرة المحفظة (memo) أو الوسم الخاص بها على شبكة تدعم المذكرات. اختياري."
          },
          "beneficiary_vasp": {
            "type": "string",
            "format": "uuid",
            "description": "مطلوب مع action=beneficiary_vasp: الـ `id` الخاص بـ VASP في الدليل، من `GET /v3/travel-rule/vasps/`. خيارك يتجاوز كل خطوة اكتشاف تلقائي، ولا يتم تجاوزه أبداً بواسطتها."
          }
        }
      },
      "VaspDirectoryEntry": {
        "type": "object",
        "description": "مزود خدمة أصول افتراضية (VASP) في الدليل أو عضو في شبكة Didit، مع المسارات المتاحة لتطبيقك إليه. يُعد العميل عضواً في شبكة Didit فقط طالما أن تطبيقه في بيئة الإنتاج، وTravel Rule مفعّلة لديه، وملفه التعريفي قابل للاكتشاف، ويمتلك اسماً قانونياً وبريداً إلكترونياً مؤكداً للامتثال، ولم تصنف Didit التطبيق على أنه تجريبي أو توضيحي أو داخلي. يحمل كل صف أيضاً تقييم العناية الواجبة المشترك (dd_score وrisk_level وresponsiveness وessential_checks) بالإضافة إلى القرار الخاص بتطبيقك وفحص الكيان والاستبيانات، والتي لا يراها أي عميل آخر.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الإدخال، لـ GET /v3/travel-rule/vasps/{vasp_id}/."
          },
          "kind": {
            "type": "string",
            "enum": [
              "directory",
              "didit"
            ],
            "description": "directory لمُدخل في الدليل المشترك؛ didit لعضو في شبكة Didit."
          },
          "name": {
            "type": "string"
          },
          "lei": {
            "type": "string"
          },
          "jurisdiction": {
            "type": "string",
            "description": "رمز الدولة وفقاً لـ ISO 3166، كما يوفره المصدر."
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "نطاقات الويب الخاصة بـ VASP. تكون فارغة دائماً لأعضاء شبكة Didit."
          },
          "reachable": {
            "type": "boolean",
            "description": "ما إذا كان تطبيقك يحتوي على مسار متاح إلى هذا VASP، أو إلى أحد كياناته لعلامة تجارية معينة. تكون القيمة دائماً true لعضو شبكة Didit، باستثناء التطبيق في البيئة التجريبية، حيث يكون كل صف false."
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "trading_name",
                    "other_legal_name",
                    "network_name",
                    "attribution",
                    "merged",
                    "staff"
                  ],
                  "description": "trading_name، أو other_legal_name (من سجل LEI العالمي)، أو network_name (الاسم على شبكة Travel Rule)، أو attribution (اسم الكيان الذي تحدده تحليلات البلوكتشين لمحافظ VASP)، أو merged (اسم إدخال مكرر تم دمجه في هذا الإدخال) أو staff."
                }
              }
            },
            "description": "الأسماء الأخرى التي يُعرَف بها VASP."
          },
          "networks": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "قيد حالي لمزود خدمة الأصول الافتراضية (VASP) هذا في دليل أعضاء شبكة Travel Rule. يوضح قيد TRISA هوية VASP على TRISA؛ ولا تمتلك Didit وسيلة TRISA، لذا لا يُعد مساراً على الإطلاق.",
              "properties": {
                "network": {
                  "type": "string",
                  "enum": [
                    "GTR",
                    "TRUST",
                    "VERIFYVASP",
                    "SYGNA",
                    "TRISA"
                  ]
                },
                "code": {
                  "type": "string",
                  "description": "معرّف VASP على تلك الشبكة."
                },
                "listed_name": {
                  "type": "string",
                  "description": "الاسم الذي تدرج الشبكة VASP تحته."
                },
                "country": {
                  "type": "string",
                  "description": "الدولة التي تدرجها الشبكة، عند تقديمها."
                },
                "verified_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true,
                  "description": "وقت تحقق فريق Didit من القائمة المعروضة. تكون القيمة Null للقوائم المقروءة من دليل عام."
                },
                "last_seen_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true,
                  "description": "متى أظهر المصدر القيد آخر مرة. تتم إزالة أي قيد لم يُظهره المصدر لمدة ثلاثة أسابيع."
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "trisa_directory",
                    "staff"
                  ],
                  "description": "مصدر الإدراج: إما دليل TRISA العام، أو موظفو Didit."
                }
              }
            }
          },
          "routes": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "طريقة واحدة يمكن لتطبيقك من خلالها تسليم بيانات Travel Rule إلى VASP هذا، بالترتيب الذي يحاول به الإرسال تجربتها. يحتاج مسار الشبكة إلى عضوية في تلك الشبكة: عضويتك الخاصة (المتصلة في Marketplace) أو عضوية Didit بمجرد حصول Didit عليها. بدونها يُدرج المسار كغير متاح مع ذكر السبب، ولا يُدرج أبدًا كطريقة للوصول إلى VASP.",
              "properties": {
                "rail": {
                  "type": "string",
                  "enum": [
                    "INTERNAL",
                    "TRP",
                    "GTR",
                    "TRUST",
                    "VERIFYVASP",
                    "SYGNA",
                    "EMAIL"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "available",
                    "unavailable"
                  ]
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "",
                    "no_membership",
                    "network_switched_off",
                    "sandbox_application"
                  ],
                  "description": "سبب تعذر استخدام المسار غير المتاح: no_membership (لا تملك أنت ولا Didit عضوية في تلك الشبكة)، أو network_switched_off (قمت بإيقاف تشغيل تلك الشبكة في الإعدادات الخاصة بك)، أو sandbox_application (يرسل تطبيق البيئة التجريبية إلى Didit Test VASP فقط، لذا لا يتوفر أي مسار إليه). يكون فارغاً عندما يكون المسار متاحاً."
                },
                "via": {
                  "type": "string",
                  "enum": [
                    "",
                    "own_membership",
                    "didit_membership",
                    "directory",
                    "contact",
                    "didit_network"
                  ],
                  "description": "كيفية الوصول إلى مسار متاح: own_membership أو didit_membership لمسار الشبكة، أو directory لـ TRP endpoint تم التحقق منه بواسطة الدليل، أو contact لمسار EMAIL، أو didit_network لعضو في شبكة Didit. يكون فارغاً عندما يكون المسار غير متاح."
                }
              }
            }
          },
          "umbrella": {
            "type": "object",
            "nullable": true,
            "description": "العلامة التجارية التي يمثل هذا الإدخال كيانًا خاضعًا للتنظيم تابعًا لها. فارغًا عندما لا يكون جزءًا من إحداها.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "entities": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "كيان خاضع للتنظيم تابع لعلامة تجارية: الكيان القانوني الذي يتلقى التحويل.",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "lei": {
                  "type": "string"
                },
                "jurisdiction": {
                  "type": "string"
                },
                "reachable": {
                  "type": "boolean",
                  "description": "ما إذا كان تطبيقك يحتوي على مسار متاح إليه."
                }
              }
            },
            "description": "بالنسبة للعلامة التجارية، الكيانات الخاضعة للتنظيم التي تتلقى تحويلاتها. التحويل الذي يحدد اسم العلامة التجارية يذهب إلى الكيان الذي يمكن الوصول إليه في الاختصاص القضائي المحدد (beneficiary_data.counterparty_vasp_jurisdiction)، وإلا إلى الكيان الذي ربطه تحليل البلوكتشين بالمحفظة الوجهة، وإلا إلى الكيان الوحيد الذي يمكن الوصول إليه عند عدم تحديد أي اختصاص قضائي. لا يتم التخمين أبداً بين كيانين متطابقين بنفس القدر."
          },
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "جهة اتصال امتثال يمكن لوسيلة EMAIL مراسلتها.",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "email": {
                  "type": "string",
                  "format": "email"
                },
                "name": {
                  "type": "string"
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "staff",
                    "application",
                    "learned"
                  ],
                  "description": "staff: مُنسَّق من قبل Didit؛ application: تمت إضافته بواسطة تطبيقك؛ learned: عنوان استجاب لطلب Travel Rule عبر رابط الاستجابة الخاص به."
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "platform",
                    "application"
                  ],
                  "description": "تُستخدم جهات اتصال المنصة (platform) لجميع تحويلات عملاء Didit؛ أما جهات اتصال التطبيق (application) فهي خاصة بتطبيقك، والذي لا يرى سوى جهات الاتصال التابعة له."
                },
                "verified_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true,
                  "description": "وقت استجابة شخص ما على هذا العنوان لطلب. تكون القيمة Null عندما لا يكون قد تم ذلك بعد."
                }
              }
            },
            "description": "جهات اتصال المنصة لهذا الـ VASP وتلك الخاصة بتطبيقك."
          },
          "dd_status": {
            "type": "string",
            "enum": [
              "NOT_STARTED",
              "IN_PROGRESS",
              "COMPLETED",
              "REJECTED"
            ],
            "description": "حالة التحقق من الإدخال لدى Didit، والمحسوبة بواسطة مكوّن التحقق لـ dd_score. تكون دائماً COMPLETED لعضو شبكة Didit."
          },
          "dd_score": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "درجة العناية الواجبة المشتركة لمدخل الدليل، من 0 إلى 100، حيث تعني القيمة الأعلى أماناً أكبر (راجع dd_score_semantic): وهي مجموع النقاط في dd_score_breakdown. تكون قيمتها Null لعضو شبكة Didit، الذي لا يتم احتساب درجات له. يُظهر المدخل الذي لم يتم تقييمه بعد (dd_assessed_at تكون null) القيمة 0 مع حقل risk_level فارغ، لذا يُرجى الاعتماد على risk_level بدلاً من الدرجة الأولية."
          },
          "reachable_rails": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "INTERNAL",
                "TRP",
                "GTR",
                "TRUST",
                "VERIFYVASP",
                "SYGNA",
                "EMAIL"
              ]
            },
            "description": "شبكات الدفع المسجلة في الإدخال. اقرأ المسارات لمعرفة ما يمكن لتطبيقك استخدامه اليوم."
          },
          "is_didit_customer": {
            "type": "boolean",
            "description": "true لعضو في شبكة Didit (يكون dd_status دائماً COMPLETED، وdd_score فارغاً null، وrisk_level فارغاً لهذه الحالات) ولإدخال في الدليل مرتبط بعميل Didit."
          },
          "dd_score_breakdown": {
            "type": "object",
            "description": "كائن واحد لكل مكوّن من dd_score. المكوّنات وأوزانها (الحد الأقصى) ورموز الأسباب الخاصة بها: jurisdiction، 25 (jurisdiction_not_high_risk، jurisdiction_high_risk، jurisdiction_unknown)؛ verification، 15 (dd_status_completed، dd_status_in_progress، dd_status_not_started، dd_status_rejected)؛ protocol، 15 (native_rail، email_only، no_rail)؛ lei، 10 (lei_valid، lei_missing)؛ history، 10 (history، no_history)؛ essentials، 15 (essential_checks، no_essential_checks)؛ responsiveness، 10 (responsive، unresponsive، responsiveness_unknown). يكون فارغاً لعضو في شبكة Didit.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "points": {
                  "type": "number",
                  "description": "النقاط التي يساهم بها المكوّن، مقربة إلى منزلة عشرية واحدة."
                },
                "max": {
                  "type": "integer",
                  "description": "وزن المكون: النقاط التي يساهم بها في أفضل الأحوال."
                },
                "reason": {
                  "type": "string",
                  "description": "رمز مقروء آلياً لقرار المكوّن."
                },
                "detail": {
                  "type": "string",
                  "description": "توضيح باللغة الإنجليزية في سطر واحد."
                }
              }
            }
          },
          "dd_assessed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت آخر احتساب لـ dd_score وrisk_level وresponsiveness: بعد اكتمال التبادل مع المُدخل، أو إنهائه، أو انتهاء صلاحيته، أو عدم تطابقه، أو رفضه، وعندما تقوم Didit بتحديث المُدخل أو تنقيحه، وأثناء التحديث الأسبوعي للدليل. القيمة Null لعضو في شبكة Didit."
          },
          "dd_score_semantic": {
            "type": "string",
            "enum": [
              "higher_is_safer"
            ],
            "description": "في أي اتجاه تشير dd_score: دائماً higher_is_safer."
          },
          "risk_level": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              ""
            ],
            "description": "النطاق الذي يقع فيه dd_score: إما LOW (70 أو أكثر)، أو MEDIUM (40 إلى 69)، أو HIGH (أقل من 40). يكون فارغاً لعضو في شبكة Didit ولأي إدخال لم يتم تقييمه بعد. يمكنك التصفية باستخدامه عبر risk. فحصك الذي تم وضع علامة عليه لا يغير أبداً هذه القيمة المشتركة: بل يجعل counterparty_risk_level بقيمة HIGH في قواعدك بدلاً من ذلك."
          },
          "responsiveness": {
            "type": "object",
            "description": "ما إذا كان مزود VASP يجيب على طلبات Travel Rule: نسبة الطلبات التي بدأها عملاء Didit تجاهه في آخر 90 يوماً وأجاب عليها. تُحتسب فقط الطلبات المرسلة عبر مسار شبكة أو بروتوكول، أو عبر البريد الإلكتروني إلى عنوان مشترك (عنوان الامتثال الخاص بالإدخال أو جهة اتصال المنصة)؛ ولا يُحتسب أبداً الطلب المرسل إلى عنوان كتبه العميل، أو إلى جهة اتصال خاصة بعميل. يُعتبر الطلب منتهي الصلاحية بلا إجابة؛ وتُعتبر عملية التبادل المكتملة أو الرفض أو عدم تطابق البيانات إجابة؛ بينما لا يُعتبر الطلب الملغى أو المسار الذي لا يمكن الوصول إليه أياً منهما. تكون دائماً UNKNOWN مع أعداد صفرية لأي عضو في شبكة Didit.",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "RESPONSIVE",
                  "UNRESPONSIVE",
                  "UNKNOWN"
                ],
                "description": "UNKNOWN عند وجود أقل من 5 طلبات تم البت فيها خلال الفترة الزمنية؛ وUNRESPONSIVE عند الرد على أقل من 10 بالمئة منها؛ وRESPONSIVE بخلاف ذلك."
              },
              "answered": {
                "type": "integer",
                "description": "الطلبات المحسومة خلال النافذة الزمنية التي رد عليها الـ VASP."
              },
              "total": {
                "type": "integer",
                "description": "الطلبات المحسومة خلال النافذة الزمنية: التي تم الرد عليها بالإضافة إلى منتهية الصلاحية."
              },
              "computed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            }
          },
          "essential_checks": {
            "type": "object",
            "description": "تقرير الفحوصات الأساسية لإدخال الدليل، والذي يتم إنشاؤه حصرياً من المصادر التي تم التحقق منها للمنصة: التسجيل (سجل رسمي يُدرج الـ VASP: سجل MiCA المؤقت للاتحاد الأوروبي، أو دليل TRISA العام، أو سجل LEI العالمي)، والترخيص (تفويض MiCA مسجل وسارٍ)، والنطاق (يطابق نطاق الإدخال نقطة نهاية TRP الخاصة به أو موقع الويب الذي يوفره سجله)، ورمز lei (سجل LEI الخاص به نشط وصادر ومتوافق مع أسماء الإدخال ودولته). يُعد المكوّن الأساسي لـ dd_score هو نسبة الفحوصات المحسومة التي تم اجتيازها بنجاح. يكون فارغاً حتى يتحقق التحديث الأسبوعي للدليل من الإدخال لأول مرة، ودائماً ما يكون فارغاً لأي عضو في شبكة Didit.",
            "properties": {
              "level": {
                "type": "string",
                "enum": [
                  "essential"
                ]
              },
              "checked_at": {
                "type": "string",
                "format": "date-time"
              },
              "checks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "enum": [
                        "registration",
                        "licence",
                        "domain",
                        "lei"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "fail",
                        "unknown"
                      ],
                      "description": "unknown عندما لا يتمكن أي مصدر مسجل من حسم عملية التحقق."
                    },
                    "reason": {
                      "type": "string",
                      "description": "رمز مقروء آلياً للقرار."
                    },
                    "detail": {
                      "type": "string",
                      "description": "توضيح باللغة الإنجليزية في سطر واحد."
                    }
                  }
                }
              },
              "passed": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              },
              "unknown": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            }
          },
          "decision": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleCounterpartyDecision"
              }
            ],
            "nullable": true,
            "description": "قرار تطبيقك بشأن VASP هذا، أو قرار علامته التجارية بالنسبة لكيان ليس لديه قرار خاص به (يذكر inherited_from اسم العلامة التجارية). يكون null في حال عدم وجود أي قرار. خاص بتطبيقك."
          },
          "entity_screening": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleCounterpartyScreening"
              }
            ],
            "nullable": true,
            "description": "أحدث فحص للعقوبات والأخبار السلبية أجراه تطبيقك لـ VASP هذا. يكون null عندما لا تفحصه أبداً. خاص بتطبيقك."
          },
          "questionnaires": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TravelRuleCounterpartyQuestionnaire"
            },
            "description": "استبيانات العناية الواجبة الخاصة بتطبيقك مع VASP هذا، الأحدث أولاً. خاص بتطبيقك."
          }
        },
        "example": {
          "id": "0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91",
          "kind": "directory",
          "name": "Example Counterparty VASP",
          "lei": "529900EXAMPLECPTY001",
          "jurisdiction": "DE",
          "domains": [
            "counterparty.example"
          ],
          "reachable": true,
          "aliases": [
            {
              "name": "Example Counterparty",
              "kind": "trading_name"
            }
          ],
          "networks": [
            {
              "network": "GTR",
              "code": "EXAMPLE01",
              "listed_name": "Example Counterparty VASP",
              "country": "DE",
              "verified_at": "2026-10-12T09:30:00Z",
              "last_seen_at": "2026-10-12T09:30:00Z",
              "source": "staff"
            }
          ],
          "routes": [
            {
              "rail": "GTR",
              "status": "unavailable",
              "reason": "no_membership",
              "via": ""
            },
            {
              "rail": "EMAIL",
              "status": "available",
              "reason": "",
              "via": "contact"
            }
          ],
          "umbrella": null,
          "entities": [],
          "contacts": [
            {
              "id": "6c1f9b8e-2d4a-4f7e-8b3c-5a9d0e1f2a3b",
              "email": "travelrule@counterparty.example",
              "name": "Travel Rule desk",
              "source": "staff",
              "scope": "platform",
              "verified_at": null
            }
          ],
          "dd_status": "NOT_STARTED",
          "dd_score": 62,
          "dd_score_breakdown": {
            "jurisdiction": {
              "points": 25.0,
              "max": 25,
              "reason": "jurisdiction_not_high_risk",
              "detail": "DEU is not on the high-risk jurisdiction list"
            },
            "verification": {
              "points": 3.8,
              "max": 15,
              "reason": "dd_status_not_started",
              "detail": "due diligence status NOT_STARTED"
            },
            "protocol": {
              "points": 6.0,
              "max": 15,
              "reason": "email_only",
              "detail": "reachable over the email fallback only"
            },
            "lei": {
              "points": 10.0,
              "max": 10,
              "reason": "lei_valid",
              "detail": "valid LEI on record"
            },
            "history": {
              "points": 5.0,
              "max": 10,
              "reason": "no_history",
              "detail": "no exchange history"
            },
            "essentials": {
              "points": 7.5,
              "max": 15,
              "reason": "no_essential_checks",
              "detail": "no decided essential check yet"
            },
            "responsiveness": {
              "points": 5.0,
              "max": 10,
              "reason": "responsiveness_unknown",
              "detail": "0 decided recent requests, too few to judge"
            }
          },
          "dd_assessed_at": "2026-10-12T09:30:00Z",
          "dd_score_semantic": "higher_is_safer",
          "risk_level": "MEDIUM",
          "responsiveness": {
            "status": "UNKNOWN",
            "answered": 0,
            "total": 0,
            "computed_at": "2026-10-12T09:30:00Z"
          },
          "essential_checks": {},
          "reachable_rails": [
            "GTR",
            "EMAIL"
          ],
          "is_didit_customer": false,
          "decision": {
            "decision": "APPROVED",
            "reason": "Licensed in DE, questionnaire reviewed",
            "decided_by": "",
            "updated_at": "2026-10-14T10:05:00Z",
            "inherited_from": null
          },
          "entity_screening": {
            "id": "7a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
            "status": "Approved",
            "total_hits": 0,
            "score": null,
            "screened_at": "2026-10-14T09:58:00Z",
            "fresh": true,
            "flagged": false
          },
          "questionnaires": [
            {
              "id": "8b7a6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
              "status": "ANSWERED",
              "form_version": "1",
              "sent_to": "travelrule@counterparty.example",
              "sent_at": "2026-09-02T08:00:00Z",
              "expires_at": "2026-10-02T08:00:00Z",
              "answered_at": "2026-09-04T15:20:00Z",
              "valid_until": "2027-09-04T15:20:00Z",
              "current": true,
              "answers": {
                "legal_name": "Example Counterparty VASP, incorporated in the example jurisdiction.",
                "licensing": "Crypto-asset service provider authorised under MiCA by its national regulator, licence active.",
                "jurisdictions": "EU and EEA. We do not serve the United States.",
                "aml_program": "Written AML/CFT policy, annual independent review, last completed in March 2026.",
                "compliance_officer": "Head of Compliance, reachable at compliance@counterparty.example.",
                "sanctions_screening": "Customers at onboarding and daily; counterparties on every transfer.",
                "transaction_monitoring": "Rule-based monitoring with analyst review; suspicious activity reports filed with the FIU.",
                "travel_rule": "TRP and email; we answer requests within one business day.",
                "custody": "Segregated customer wallets held with a qualified custodian, insured.",
                "ownership": "No shareholder holds 25 percent or more; parent company Example Holding Group.",
                "record_keeping": "Five-year record-keeping for Travel Rule and transaction data, as our regulator requires.",
                "data_protection": "Encrypted at rest and in transit, stored in the EU."
              }
            }
          ]
        }
      },
      "TravelRuleCounterpartyDecision": {
        "type": "object",
        "description": "قرار تطبيقك بشأن VASP للطرف المقابل. خاص بتطبيقك: لا يغيّر أبداً إدخال الدليل المشترك ولا يراه عميل آخر على الإطلاق. إنه يعمل فقط من خلال قواعد المعاملات الخاصة بك (حقل القاعدة counterparty_dd_status والإعدادات المسبقة travel-rule-counterparty-blocked وtravel-rule-counterparty-restricted)؛ ولا يغيّر أبداً كيفية توجيه التحويل.",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "APPROVED",
              "RESTRICTED",
              "BLOCKED"
            ],
            "description": "APPROVED: قام فريقك بالموافقة على الطرف المقابل. RESTRICTED: قد تتم التحويلات إليه بعد المراجعة. BLOCKED: قام فريقك برفضه."
          },
          "reason": {
            "type": "string",
            "maxLength": 255,
            "description": "السبب بنص حر الذي قدمته، ويكون فارغاً في حال عدم وجوده."
          },
          "decided_by": {
            "type": "string",
            "description": "مستخدم لوحة التحكم الذي اتخذ القرار أو قام بتغييره آخر مرة. فارغ عند اتخاذه بواسطة مفتاح API."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "inherited_from": {
            "type": "object",
            "nullable": true,
            "description": "العلامة التجارية التي يتّبع هذا الكيان قرارها لأنك لم تتخذ أي قرار بشأن الكيان نفسه. تكون Null عندما يكون القرار خاصاً بالطرف المقابل نفسه.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      },
      "TravelRuleCounterpartyDecisionResponse": {
        "type": "object",
        "properties": {
          "decision": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleCounterpartyDecision"
              }
            ],
            "nullable": true,
            "description": "القرار المطبق على الطرف المقابل لتطبيقك: قراره الخاص، وإلا (بالنسبة لكيان تابع لعلامة تجارية) قرار العلامة التجارية. القيمة Null عند عدم وجود أي قرار."
          }
        }
      },
      "TravelRuleCounterpartyDecisionRequest": {
        "type": "object",
        "required": [
          "decision"
        ],
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "APPROVED",
              "RESTRICTED",
              "BLOCKED"
            ]
          },
          "reason": {
            "type": "string",
            "maxLength": 255,
            "description": "اختياري. يستبدل السبب السابق؛ احذفه لمسحه."
          }
        }
      },
      "TravelRuleCounterpartyScreening": {
        "type": "object",
        "description": "فحص واحد للعقوبات والأخبار السلبية لكيان الطرف المقابل، يُجرى لحساب تطبيقك وتُفوتر تكلفته عليه. خاص بتطبيقك: لا يراه عميل آخر أبداً.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "Approved",
              "In Review",
              "Declined"
            ],
            "description": "مقبولة: لا يوجد تطابق محتمل يتطلب الانتباه. قيد المراجعة أو مرفوضة: تطابق محتمل مع العقوبات أو الأخبار السلبية."
          },
          "total_hits": {
            "type": "integer",
            "description": "عدد التطابقات المحتملة التي أرجعها الفحص."
          },
          "score": {
            "type": "number",
            "nullable": true,
            "description": "أعلى درجة مخاطر من بين التطابقات المحتملة. Null عندما لا يتطابق أي شيء."
          },
          "screened_at": {
            "type": "string",
            "format": "date-time"
          },
          "fresh": {
            "type": "boolean",
            "description": "ما إذا كان الفحص أحدث من fresh_days (30 يوماً). يُعاد استخدام الفحص الحديث بدلاً من فوترته مرة أخرى."
          },
          "flagged": {
            "type": "boolean",
            "description": "true طالما أن الفحص حديث وحالته In Review أو Declined. وطالما أن أحدث فحص لك تم وضع علامة عليه وظل فحص الطرف المقابل مفعلاً، فإن counterparty_risk_level يكون HIGH في قواعدك."
          }
        }
      },
      "TravelRuleCounterpartyScreeningStatus": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "إعداد Travel Rule الخاص بك counterparty_screening_enabled. معطل افتراضياً؛ لا يتم فحص أي شيء أو فوترته أثناء تعطيله."
          },
          "price": {
            "type": "string",
            "description": "سلسلة نصية عشرية، بالدولار الأمريكي (USD): تكلفة الفحص الواحد لمؤسستك، وهو سعر فحص AML للشركات."
          },
          "fresh_days": {
            "type": "integer",
            "description": "عدد الأيام التي يظل فيها الفحص صالحاً ويُعاد استخدامه."
          },
          "screening": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleCounterpartyScreening"
              }
            ],
            "nullable": true,
            "description": "أحدث فحص أجريته للطرف المقابل. يكون Null إذا لم تفحصه من قبل."
          }
        }
      },
      "TravelRuleCounterpartyScreeningRequest": {
        "type": "object",
        "properties": {
          "refresh": {
            "type": "boolean",
            "default": false,
            "description": "true لإجراء الفحص مجدداً (والفوترة مجدداً) حتى عند وجود فحص حديث."
          }
        }
      },
      "TravelRuleCounterpartyScreeningResult": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "screened",
              "reused"
            ],
            "description": "screened: تم تشغيل فحص جديد وفُوترت قيمته (201). reused: أُعيدت نتيجة فحص حديث ولم تُفوتر أي قيمة (200)."
          },
          "screening": {
            "$ref": "#/components/schemas/TravelRuleCounterpartyScreening"
          }
        }
      },
      "TravelRuleCounterpartyQuestionnaire": {
        "type": "object",
        "description": "استبيان العناية الواجبة واحد أرسله تطبيقك إلى الطرف المقابل: استبيان Didit القياسي، المُرسل عبر البريد الإلكتروني إلى عنوان الامتثال المسجل مع رابط إجابة للاستخدام مرة واحدة. خاص بتطبيقك.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "SENT",
              "ANSWERED",
              "EXPIRED"
            ],
            "description": "SENT: في انتظار الإجابات. ANSWERED: أجاب الطرف المقابل على كل سؤال. EXPIRED: أُغلق رابط الإجابة دون إجابة (انقضى موعده النهائي، أو حل محله استبيان أحدث)، أو تجاوزت الإجابات تاريخ valid_until."
          },
          "form_version": {
            "type": "string",
            "description": "إصدار استبيان Didit القياسي الذي تنتمي إليه الإجابات. حالياً 1."
          },
          "sent_to": {
            "type": "string",
            "format": "email"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "الموعد النهائي للإجابة، 30 يوماً بعد الإرسال. يتوقف الرابط عن العمل بعده."
          },
          "answered_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "valid_until": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "المدة التي تظل فيها الإجابات سارية: 365 يوماً بعد الإجابة. تكون null حتى تتم الإجابة."
          },
          "current": {
            "type": "boolean",
            "description": "true طالما أن الاستبيان بحالة ANSWERED ولم يمر تاريخ valid_until."
          },
          "answers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "الإجابات مفهرسة بواسطة معرّف السؤال: legal_name، وlicensing، وjurisdictions، وaml_program، وcompliance_officer، وsanctions_screening، وtransaction_monitoring، وtravel_rule، وcustody، وownership، وrecord_keeping، وdata_protection. كل إجابة تصل إلى 2,000 حرف. تكون فارغة حتى يتم الرد."
          }
        }
      },
      "TravelRuleCounterpartyQuestionnaireRequest": {
        "type": "object",
        "properties": {
          "sent_to": {
            "type": "string",
            "format": "email",
            "description": "اختياري. عنوان امتثال مسجل للطرف المقابل: بالنسبة لمدخل الدليل فهو عنوان الامتثال الخاص به أو جهة اتصال يراها تطبيقك، وبالنسبة لعضو في شبكة Didit فهو بريد الامتثال الإلكتروني المؤكد الخاص به. الافتراضي: العنوان الذي يُرسل إليه بريد Travel Rule الإلكتروني إلى الطرف المقابل (جهة الاتصال الخاصة بك أولاً، ثم جهة اتصال المنصة، ثم عنوان الامتثال للمدخل)."
          }
        }
      },
      "TravelRuleCounterpartyQuestionnaireList": {
        "type": "object",
        "properties": {
          "questionnaires": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TravelRuleCounterpartyQuestionnaire"
            },
            "description": "الأحدث أولاً."
          }
        }
      },
      "TravelRulePickupInfo": {
        "type": "object",
        "description": "التبادل المعلق وراء رابط الاستلام المُرسل عبر البريد الإلكتروني، كما تعرضه صفحة استجابة الطرف المقابل.",
        "properties": {
          "reference": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف uuid الخاص بالتحويل، كما تعرضه لوحة تحكم VASP المُرسِل."
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "originator_vasp_name": {
            "type": "string"
          },
          "originator_vasp_lei": {
            "type": "string"
          },
          "recipient_vasp_name": {
            "type": "string",
            "description": "VASP الطرف المقابل الذي تم توجيه الطلب إليه."
          },
          "language": {
            "type": "string",
            "description": "لغة بريد الطلب وصفحة الاستجابة، المستندة إلى الولاية القضائية للطرف المقابل."
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "fiat_amount": {
            "type": "string",
            "description": "القيمة المحولة التي قدمها المُرسِل، أو فارغة."
          },
          "fiat_currency": {
            "type": "string"
          },
          "chain": {
            "type": "string"
          },
          "beneficiary_wallet": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "ivms_version": {
            "type": "string"
          },
          "deadline_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى يتوقف الرابط عن الاستجابة."
          },
          "reminders_sent": {
            "type": "integer"
          },
          "contact": {
            "type": "string",
            "description": "قيمة `?contact=` للرابط، يتم إرجاعها كما هي؛ وتكون فارغة إذا لم يتضمن الرابط أي قيمة."
          },
          "decline_reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "data_mismatch",
                "not_our_customer",
                "wallet_not_hosted",
                "sanctions",
                "risk_appetite",
                "jurisdiction",
                "insufficient_data",
                "other"
              ]
            },
            "description": "القيم التي يقبلها `decline_reason`."
          },
          "join_invitation": {
            "type": "object",
            "description": "ما إذا كان الطرف المقابل يمتلك دعوة نشطة للانضمام إلى Didit مجاناً. يُرسل رابط الدعوة فقط في البريد الإلكتروني إلى العنوان المُرسَل إليه، لذا تكون قيمة `url` فارغة هنا.",
            "properties": {
              "eligible": {
                "type": "boolean"
              },
              "url": {
                "type": "string"
              }
            }
          },
          "originator_data": {
            "type": "object",
            "description": "حقول المُرسِل التي يشاركها VASP المُرسِل (`data_sharing_fields`). يتم دائماً تضمين الاسم والمحفظة."
          },
          "beneficiary_data": {
            "type": "object"
          },
          "ivms_request": {
            "type": "object",
            "description": "الطلب نفسه ككائن IVMS 101. يُستبعد طالما أن `data_masked` قيمته true."
          },
          "data_masked": {
            "type": "boolean",
            "description": "دائماً false في هذا الـ endpoint: طلب البريد الإلكتروني يكون صادراً، ولا يتم أبداً حجب مستخدم المُرسِل نفسه."
          }
        }
      },
      "TravelRulePickupRespondRequest": {
        "type": "object",
        "required": [
          "decision"
        ],
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accept",
              "decline"
            ]
          },
          "beneficiary_name": {
            "type": "string",
            "description": "اسم المستفيد كما هو مدون في سجلاتك، بعد معالجته وفق قاعدة الاسم الخاصة بـ VASP المُرسِل. تكون الأولوية لـ `ivms_response` عندما يحدد اسم المستفيد.",
            "maxLength": 255
          },
          "decline_reason": {
            "type": "string",
            "enum": [
              "",
              "data_mismatch",
              "not_our_customer",
              "wallet_not_hosted",
              "sanctions",
              "risk_appetite",
              "jurisdiction",
              "insufficient_data",
              "other"
            ],
            "description": "سبب رفضك. يُسجّل في الجدول الزمني للتحويل لدى VASP المُرسِل. فارغ (الافتراضي) عندما لا تقدم سبباً."
          },
          "decline_detail": {
            "type": "string",
            "maxLength": 512,
            "description": "نص حر؛ مطلوب عندما يكون `decision` هو `decline` ويكون `decline_reason` هو `other`."
          },
          "ivms_response": {
            "type": "object",
            "description": "استجابة IVMS 101 الكاملة الخاصة بك. اسم المستفيد فيها له الأولوية على `beneficiary_name`."
          },
          "contact": {
            "type": "string",
            "format": "uuid",
            "description": "جهة الاتصال التي أُرسل الرابط إليها، من قيمة `?contact=` الخاصة بالرابط. عندما لا يوردها نص الطلب، يُستخدم معامل الاستعلام `contact`."
          }
        }
      },
      "TravelRuleInboundRequest": {
        "type": "object",
        "required": [
          "chain",
          "txid",
          "wallet_address",
          "amount",
          "currency"
        ],
        "properties": {
          "chain": {
            "type": "string",
            "description": "الشبكة التي تم تسوية الإيداع عليها، مثل `ETH`. يتم تخزينها بأحرف صغيرة وتتم مقارنتها بدون حساسية لحالة الأحرف مع مدخلات دفتر عناوين المحفظة لديك، لذا استخدم رمز الشبكة نفسه هناك.",
            "maxLength": 32
          },
          "txid": {
            "type": "string",
            "description": "تجزئة المعاملة على السلسلة. تمت إزالة التكرار مع wallet_address.",
            "maxLength": 128
          },
          "wallet_address": {
            "type": "string",
            "description": "محفظة الوجهة التي استلمت الإيداع عليها. يتم تقسيم عنوان XRP من نوع X-address إلى عنوانه الكلاسيكي ووسمه.",
            "maxLength": 128
          },
          "amount": {
            "type": "string",
            "description": "مبلغ الإيداع كسلسلة عشرية، صفر أو أكثر، بما يصل إلى 18 منزلة عشرية."
          },
          "currency": {
            "type": "string",
            "description": "أصل الإيداع، مثل \"USDC\".",
            "maxLength": 16
          },
          "originator_data": {
            "type": "object",
            "description": "تفاصيل المُرسِل من VASP المرسل، إن كانت معروفة، ككائن مسطح مثل `{\"name\": \"...\"}`. يقرأ Didit الاسم (أو full_name) وfirst_name وlast_name وvendor_data منه.",
            "additionalProperties": true
          },
          "beneficiary_data": {
            "type": "object",
            "description": "تفاصيل المستفيد (عميلك)، ككائن مسطح مثل `{\"name\": \"...\"}`. تطابق Didit الاسم مع holder_name لمدخل دفتر العناوين المطابق، وتُحدد wallet_address وchain من الطلب.",
            "additionalProperties": true
          },
          "originating_vasp": {
            "type": "object",
            "description": "وصف اختياري لـ VASP المُرسِل. يقتصر على هذه المعاملة فقط (`metadata.originating_vasp`، وVASP المُرسِل للمعاملة في GET /v3/travel-rule/transfers/)؛ ولا يُنشئ أبداً إدخالاً مشتركاً في دليل VASP أو يعدله أو يربطه.",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 255
              },
              "lei": {
                "type": "string",
                "maxLength": 20,
                "description": "اختياري. معرّف LEI صالح وفق معيار ISO 17442 من 20 حرفاً، أو فارغ."
              },
              "travel_address": {
                "type": "string",
                "description": "Travel Address الخاص بالمُرسِل، المسجل في هذا التحويل.",
                "maxLength": 512
              }
            }
          },
          "memo": {
            "type": "string",
            "maxLength": 256,
            "description": "اختياري. علامة الوجهة (destination tag) للإيداع أو المذكرة (memo) على شبكة تستخدم المذكرات: في عنوان الإيداع المشترك، هي ما يميّز عملاءك عن بعضهم، وتتم مطابقة مدخل دفتر العناوين الخاص بتلك المذكرة. XRP: علامة وجهة، وهي رقم صحيح من 0 إلى 4294967295 (يُقبل رقم بتنسيق JSON). XLM: مذكرة نصية تصل إلى 28 بايتاً، أو معرّف 64 بت أو تجزئة 32 بايت بصيغة hex. EOS: حتى 256 بايتاً. ATOM: حتى 256 حرفاً. HBAR: حتى 100 بايت. محافظ Bitcoin و EVM و Solana و Tron و Litecoin و Bitcoin Cash و Dogecoin و Lightning لا تقبل أي مذكرة: يؤدي وضع مذكرة هناك إلى إرجاع `400`. الاسم البديل: `destinationTag` أو `destination_tag`."
          },
          "utxo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleUtxo"
              }
            ],
            "description": "اختياري، لسلاسل UTXO فقط. مدخلات معاملة الإيداع ومخرجاتها: محفظة المرسل هي `originator_data.wallet_address` المحددة، وإلا فأكبر مدخل."
          }
        }
      },
      "TravelRuleInboundResponse": {
        "type": "object",
        "properties": {
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID لمعاملة Didit للإيداع الوارد."
          },
          "txn_id": {
            "type": "string",
            "description": "txn_id للمعاملة الواردة: منشأ بواسطة Didit عندما أنشأت Didit المعاملة، أو المعرّف الخاص بك عند إعادة استخدام إيداع لم تتم المطالبة به."
          },
          "created": {
            "type": "boolean",
            "description": "true عندما يسجل هذا الاستدعاء التحويل (HTTP 201)؛ وfalse عند وجود تحويل مسبق لنفس txid وwallet_address بالفعل (HTTP 200)."
          },
          "travel_rule": {
            "$ref": "#/components/schemas/TravelRuleTransferDetail"
          }
        }
      },
      "TravelRuleTestVaspInboundRequest": {
        "type": "object",
        "required": [
          "beneficiary_wallet_address"
        ],
        "properties": {
          "beneficiary_wallet_address": {
            "type": "string",
            "description": "عنوان محفظة الوجهة. يرسل Didit Test VASP إليها، وتتم مطابقتها مع دفتر عناوين المحافظ الخاص بك على شبكة الأصل المالي. تُقبل المحفظة التي ليس لها إدخال مطابق وتُسجّل المعاملة الواردة بالحالة ON_HOLD."
          },
          "scenario": {
            "type": "string",
            "enum": [
              "accept",
              "name_mismatch"
            ],
            "default": "accept",
            "description": "ما يصرح به Didit Test VASP بشأن المستفيد. يصرح `accept` باسم الحامل نفسه؛ بينما يصرح `name_mismatch` باسم لا يوافق عليه أي حامل. القرار نفسه يرجع إليك دائماً."
          },
          "chain": {
            "type": "string",
            "default": "ETH",
            "description": "شبكة البلوكتشين الخاصة بالأصل."
          },
          "amount": {
            "type": "string",
            "default": "1",
            "description": "المبلغ كسلسلة عشرية."
          },
          "currency": {
            "type": "string",
            "default": "ETH",
            "description": "رمز الأصل."
          },
          "reference": {
            "type": "string",
            "description": "مفتاح idempotency اختياري. يؤدي التكرار بنفس القيمة إلى إرجاع التحويل الذي سجله الاستدعاء الأول."
          }
        }
      },
      "TravelRuleTestVaspInboundResponse": {
        "type": "object",
        "properties": {
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID لمعاملة Didit للتحويل الوارد."
          },
          "txn_id": {
            "type": "string",
            "description": "قيمة txn_id التي أنشأتها Didit."
          },
          "scenario": {
            "type": "string",
            "description": "السيناريو الذي تم تشغيله."
          },
          "travel_rule_status": {
            "type": "string",
            "description": "الحالة التي استقر عليها القرار الخاص بتطبيقك."
          },
          "detail": {
            "type": "string",
            "description": "سبب استقرار التحويل على تلك الحالة."
          },
          "test_vasp": {
            "type": "boolean",
            "description": "دائماً true: كان المُرسِل هو Didit Test VASP."
          },
          "travel_rule": {
            "$ref": "#/components/schemas/TravelRuleTransferDetail"
          }
        }
      },
      "TravelRuleWidgetSessionCreate": {
        "type": "object",
        "properties": {
          "wallet_address": {
            "type": "string",
            "description": "عنوان المحفظة المراد التحقق منه. اختياري؛ وعندما يكون فارغاً، يجب تقديم العنوان عند بدء الإثبات.",
            "maxLength": 128
          },
          "chain": {
            "type": "string",
            "description": "رمز السلسلة (token) للعنوان، على سبيل المثال `ETH` أو `BTC` أو `SOL`. استخدم نفس الـ token الموجود في دفتر عناوين محفظتك. يتم توفير توقيع الرسائل واختبار Satoshi فقط للسلاسل المدعومة. يخزّن مدخل دفتر العناوين الذي يتحقق منه الإثبات السلسلة تحت معرّفها القياسي (ETH، BTC، SOL، TRX).",
            "maxLength": 32
          },
          "holder_name": {
            "type": "string",
            "description": "اسم صاحب المحفظة، يُستخدم لمطابقة اسم المستفيد.",
            "maxLength": 255
          },
          "vendor_data": {
            "type": "string",
            "description": "معرّفك الداخلي للحائز، ويُنقَل إلى إدخال دفتر العناوين الذي تم إنشاؤه.",
            "maxLength": 255
          },
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "description": "اختياري. معرّف UUID لمعاملة Didit خاصة بتحويل وفق Travel Rule للمتابعة عند التحقق من الإثبات.",
            "nullable": true
          },
          "satoshi_deposit_address": {
            "type": "string",
            "description": "اختياري. عنوان إيداع تتحكم فيه؛ يؤدي توفيره إلى تمكين طريقة إثبات SATOSHI_TEST.",
            "maxLength": 128
          },
          "callback_url": {
            "type": "string",
            "description": "اختياري. رابط http(s) مطلق يُعيد إليه عنصر واجهة المستخدم العميل بعد الاكتمال.",
            "maxLength": 512
          },
          "expires_in_minutes": {
            "type": "integer",
            "description": "اختياري. مدة صلاحية الرابط المنشأ، بالدقائق. يتم تمديدها تلقائياً لتغطية نافذة اختبار Satoshi عند تقديم SATOSHI_TEST.",
            "default": 60,
            "minimum": 5,
            "maximum": 10080
          }
        }
      },
      "TravelRuleWidgetSessionResponse": {
        "type": "object",
        "properties": {
          "widget_session_id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string",
            "description": "token جلسة مبهم مضمن في عنوان URL للأداة."
          },
          "url": {
            "type": "string",
            "description": "رابط أداة إثبات ملكية المحفظة المستضافة. افتحه كما هو في متصفح النظام (وليس داخل عرض الويب داخل التطبيق في SDK للأجهزة المحمولة مطلقاً)."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TravelRuleWidgetContext": {
        "type": "object",
        "properties": {
          "vasp_name": {
            "type": "string",
            "description": "الاسم القانوني من ملف VASP التعريفي الخاص بك، والذي يظهر للعميل في الأداة. يكون فارغاً في حال عدم وجود ملف تعريفي."
          },
          "wallet_address": {
            "type": "string"
          },
          "chain": {
            "type": "string",
            "description": "السلسلة التي تم صك الجلسة بها، كما أرسلتها."
          },
          "chain_family": {
            "type": "string",
            "nullable": true,
            "enum": [
              "EVM",
              "BTC",
              "SOL",
              "TRON",
              null
            ],
            "description": "عائلة المفاتيح المرتبطة بالسلسلة: EVM (سلاسل Ethereum وBNB Chain وPolygon وArbitrum وBase وOptimism وAvalanche وLinea وسلاسل EVM الأخرى)، أو BTC، أو SOL، أو TRON. يتحكم مفتاح EVM واحد في العنوان نفسه عبر كل سلسلة EVM. تكون القيمة فارغة (Null) عندما يتعذر التحقق من أي توقيع على السلسلة."
          },
          "holder_name": {
            "type": "string"
          },
          "allowed_methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "MESSAGE_SIGNING",
                "SCREENSHOT",
                "SATOSHI_TEST",
                "SELF_DECLARATION"
              ]
            },
            "description": "طرق الإثبات المتاحة لهذه الجلسة. يتطلب MESSAGE_SIGNING سلسلة تحتوي على chain_family، ويتطلب SATOSHI_TEST وجود satoshi_deposit_address في الجلسة وسلسلة يمكن لـ Didit قراءة إيداعاتها، ويتطلب SCREENSHOT الإعداد allow_screenshot_proof، ويتطلب SELF_DECLARATION الإعداد allow_self_declaration."
          },
          "transfer_status": {
            "type": "string",
            "nullable": true,
            "description": "حالة تحويل Travel Rule المرتبط. تكون Null عندما تم إنشاء الجلسة بدون transaction_id."
          },
          "callback_url": {
            "type": "string",
            "description": "المكان الذي تعيد أداة الواجهة العميل إليه بعد الإكمال. فارغ عندما لا يكون معيناً."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "غير فارغة بمجرد التحقق من الإثبات."
          },
          "proofs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TravelRuleWidgetProofSummary"
            }
          },
          "max_attempts": {
            "type": "integer",
            "description": "إثباتات المحفظة المرفوضة التي تسمح بها هذه الجلسة."
          },
          "attempts_used": {
            "type": "integer",
            "description": "الإثباتات المرفوضة حتى الآن."
          },
          "attempts_remaining": {
            "type": "integer",
            "description": "عندما تكون القيمة 0، فإن بدء إثبات آخر يُرجع الرمز 409 وتُنشئ جلسة جديدة لعنصر واجهة المستخدم."
          },
          "customization": {
            "type": "object",
            "nullable": true,
            "description": "تخصيص العلامة البيضاء للتطبيق (الألوان، الشعار، عائلة الخط) عند تفعيل العلامة البيضاء - تظهر أداة الواجهة بنفس الهوية البصرية لمسار التحقق. يكون Null في خلاف ذلك."
          }
        }
      },
      "TravelRuleWidgetProofSummary": {
        "type": "object",
        "properties": {
          "proof_id": {
            "type": "string",
            "format": "uuid"
          },
          "method": {
            "type": "string",
            "enum": [
              "MESSAGE_SIGNING",
              "SATOSHI_TEST",
              "SCREENSHOT",
              "SELF_DECLARATION"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "VERIFIED",
              "REJECTED",
              "EXPIRED"
            ],
            "description": "PENDING: اختار المستخدم النهائي هذه الطريقة ولم يُبت في الإثبات بعد. يؤدي التوقيع الفاشل أو الإيداع التجريبي غير القابل للقراءة أو غير المؤكد بعد إلى إبقاء الإثبات PENDING مع وجود failure_reason، حتى يتمكن المستخدم النهائي من المحاولة مجددًا؛ ويُعاد فحص إيداع SATOSHI_TEST المُرسل تلقائيًا حتى تُغلق نافذته الزمنية، بينما تنتظر لقطة شاشة SCREENSHOT المُرسلة مراجعتك. VERIFIED: تم إثبات الملكية. REJECTED: الإيداع التجريبي غير صحيح فعليًا (مُرسِل آخر، أو ليس المبلغ المتوقع إلى عنوان الإيداع، أو أقدم من التحدي، أو معاملة أثبتت بالفعل محفظة أخرى) أو قام المراجِع برفض لقطة الشاشة؛ ويوضح failure_reason السبب بدقة. الإثبات المرفوض نهائي ويستهلك إحدى محاولات الجلسة. EXPIRED: لم يعد بالإمكان البت في الإثبات (أُغلقت نافذته الزمنية، أو غيّر المستخدم النهائي الطريقة، أو انتهت جلسة الأداة، أو تغيّر حامل المحفظة)؛ ويوضح failure_reason السبب بدقة."
          },
          "wallet_address": {
            "type": "string"
          },
          "chain": {
            "type": "string",
            "description": "معرّف السلسلة القياسي لإدخال دفتر العناوين الذي يخصه الإثبات، على سبيل المثال ETH، BTC، SOL، TRX."
          },
          "deposit_address": {
            "type": "string",
            "nullable": true,
            "description": "عنوان الإيداع الذي يجب على العميل إرسال مبلغ اختبار Satoshi إليه. يتوفر فقط في إثبات SATOSHI_TEST."
          },
          "expected_amount": {
            "type": "string",
            "nullable": true,
            "description": "المبلغ الدقيق على السلسلة، بالعملة الأصلية للإيداع، الذي يجب أن يتطابق معه إيداع اختبار Satoshi. موجود فقط في إثبات SATOSHI_TEST."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "الموعد النهائي للنافذة الزمنية لاختبار ساتوشي الخاص بهذا الإثبات. يظهر فقط في إثبات من نوع SATOSHI_TEST؛ ويتم تمديد expires_at الخاص بجلسة عنصر الواجهة لتغطيته عند تقديم SATOSHI_TEST."
          },
          "challenge": {
            "type": "string",
            "nullable": true,
            "description": "رسالة صادرة عن Didit يوقّعها العميل بمحفظته. تتوفر فقط في إثبات MESSAGE_SIGNING."
          },
          "rejection_reason": {
            "type": "string",
            "description": "سبب رفض الإثبات، كجملة باللغة الإنجليزية للمستخدم النهائي. يظهر فقط عندما تكون `status` هي REJECTED؛ ويكون فارغاً عندما يرفض المراجِع لقطة شاشة (تبقى ملاحظتك لديك)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "attempts": {
            "type": "integer",
            "description": "عدد المرات التي تم فيها تقديم أدلة لهذا الإثبات (التوقيعات، معرّفات المعاملات، عمليات الرفع)."
          },
          "failure_reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason"
              }
            ],
            "description": "سبب عدم نجاح المحاولة الأخيرة، أو سبب إغلاق الإثبات. يكون فارغاً إذا لم يفشل أي شيء."
          }
        }
      },
      "CaseSubject": {
        "type": "object",
        "nullable": true,
        "description": "المستخدم الوحيد أو الشركة الوحيدة التي ترتبط بها الحالة.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "user",
              "business"
            ]
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "external_id": {
            "type": "string",
            "nullable": true,
            "description": "vendor_data الخاصة بالشخص المعني."
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "رمز الدولة المكون من ثلاثة أحرف للجهة المعنية (ISO 3166-1 alpha-3)، أو null عندما لا يكون معروفاً. بالنسبة للشركة، دولة التأسيس. وبالنسبة للشخص، دولة الإصدار لمستند الهوية من عمليات التحقق الخاصة به؛ والشخص الذي يملك مستندات من عدة دول يُعرض له أحدها، ويمكن أن تظهر رموز مستندات ICAO مثل `XXA`.",
            "example": "ESP"
          },
          "portrait": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط URL موقّع قصير الأجل للصورة الشخصية للشخص. دائماً null لشركة، وnull لشخص بدون صورة شخصية. تنتهي صلاحية رابط URL، لذا نزّل الصورة عند قراءة الحالة بدلاً من تخزين رابط URL."
          }
        }
      },
      "CaseAssignee": {
        "type": "object",
        "nullable": true,
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "full_name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "CaseBlueprintSummary": {
        "type": "object",
        "nullable": true,
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 24
          }
        }
      },
      "CaseContentConfig": {
        "type": "object",
        "description": "الأقسام الستة القابلة للتبديل التي تحدد علامات التبويب والحقول التي تظهر في صفحة الحالة. يتم رفض الأقسام أو المفاتيح غير المعروفة.",
        "properties": {
          "checklist": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "optional": {
                "type": "boolean",
                "description": "عند التعيين على true، يمكن حل الحالة مع وجود عناصر غير مكتملة في قائمة التحقق."
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "order": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "aml_control": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "financial": {
                "type": "boolean"
              },
              "identity": {
                "type": "boolean"
              }
            }
          },
          "identity": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "personal_information": {
                "type": "boolean"
              },
              "applicant_tags": {
                "type": "boolean"
              },
              "contact_information": {
                "type": "boolean"
              },
              "risk_overview": {
                "type": "boolean"
              },
              "poi_documents": {
                "type": "boolean"
              },
              "poa_documents": {
                "type": "boolean"
              }
            }
          },
          "verifications": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "summary": {
                "type": "boolean"
              }
            }
          },
          "reporting": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "fiu_reports": {
                "type": "boolean"
              }
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "payment_methods": {
                "type": "boolean"
              },
              "transactions": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "CaseNote": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "comment": {
            "type": "string"
          },
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true
          },
          "actor_name": {
            "type": "string",
            "nullable": true
          },
          "mentioned_emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "is_internal": {
            "type": "boolean"
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "s3_key": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "file_size": {
                  "type": "integer"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CaseEvent": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "CREATED",
              "STATUS_CHANGED",
              "ASSIGNED",
              "UNASSIGNED",
              "RESOLVED",
              "REOPENED",
              "LINK_ADDED",
              "LINK_REMOVED",
              "NOTE_ADDED",
              "NOTE_PINNED",
              "NOTE_UNPINNED",
              "PRIORITY_CHANGED",
              "DUE_DATE_CHANGED",
              "TAG_ADDED",
              "TAG_REMOVED",
              "ESCALATED",
              "TRANSFERRED",
              "CHECKLIST_COMPLETED",
              "REPORT_CREATED",
              "REPORT_FINALIZED",
              "SUBMITTED_FOR_APPROVAL",
              "APPROVAL_GRANTED",
              "APPROVAL_REJECTED",
              "ENTITY_ACTION",
              "APPROVAL_INVALIDATED",
              "CUSTOMER_REQUEST",
              "STAGE_CHANGED",
              "TEAM_CHANGED",
              "CHECKER_ASSIGNED",
              "CHECKER_UNASSIGNED"
            ]
          },
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true
          },
          "actor_name": {
            "type": "string",
            "nullable": true
          },
          "previous_status": {
            "type": "string",
            "enum": [
              "OPEN",
              "AWAITING_USER",
              "RESOLVED"
            ],
            "nullable": true
          },
          "new_status": {
            "type": "string",
            "enum": [
              "OPEN",
              "AWAITING_USER",
              "RESOLVED"
            ],
            "nullable": true
          },
          "metadata": {
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CaseLink": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "linked_entity_type": {
            "type": "string",
            "enum": [
              "session",
              "business_session",
              "transaction"
            ],
            "nullable": true
          },
          "linked_entity_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "linked_entity_summary": {
            "type": "object",
            "nullable": true,
            "description": "session_id/session_number/status لروابط session وbusiness_session؛ وuuid/txn_id/status لروابط transaction."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CaseChecklistItem": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "maxLength": 255
          },
          "is_completed": {
            "type": "boolean"
          },
          "completed_by": {
            "type": "string",
            "format": "email",
            "nullable": true
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "order": {
            "type": "integer"
          }
        }
      },
      "CaseBlueprintListItem": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 24
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "assignment_method": {
            "type": "string",
            "enum": [
              "MANUAL",
              "AUTOMATIC"
            ]
          },
          "assignee_pool": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "max_active_cases": {
            "type": "integer",
            "nullable": true
          },
          "escalation_enabled": {
            "type": "boolean"
          },
          "transfer_enabled": {
            "type": "boolean"
          },
          "require_resolution_note": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "preset_key": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "readOnly": true
          },
          "default_deadline_hours": {
            "type": "integer",
            "nullable": true,
            "minimum": 1,
            "maximum": 8760
          }
        }
      },
      "CaseBlueprintDetail": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 24
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "assignment_method": {
            "type": "string",
            "enum": [
              "MANUAL",
              "AUTOMATIC"
            ]
          },
          "assignee_pool": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "max_active_cases": {
            "type": "integer",
            "nullable": true
          },
          "escalation_enabled": {
            "type": "boolean"
          },
          "transfer_enabled": {
            "type": "boolean"
          },
          "require_resolution_note": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "preset_key": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "escalation_blueprint": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "escalation_blueprint_name": {
            "type": "string",
            "nullable": true
          },
          "four_eyes_checker_blueprint": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "four_eyes_checker_blueprint_name": {
            "type": "string",
            "nullable": true
          },
          "content_config": {
            "type": "object",
            "description": "الأقسام الستة القابلة للتبديل التي تحدد علامات التبويب والحقول التي تظهر في صفحة الحالة. يتم رفض الأقسام أو المفاتيح غير المعروفة.",
            "properties": {
              "checklist": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "optional": {
                    "type": "boolean",
                    "description": "عند التعيين على true، يمكن حل الحالة مع وجود عناصر غير مكتملة في قائمة التحقق."
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "order": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              },
              "aml_control": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "financial": {
                    "type": "boolean"
                  },
                  "identity": {
                    "type": "boolean"
                  }
                }
              },
              "identity": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "personal_information": {
                    "type": "boolean"
                  },
                  "applicant_tags": {
                    "type": "boolean"
                  },
                  "contact_information": {
                    "type": "boolean"
                  },
                  "risk_overview": {
                    "type": "boolean"
                  },
                  "poi_documents": {
                    "type": "boolean"
                  },
                  "poa_documents": {
                    "type": "boolean"
                  }
                }
              },
              "verifications": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "summary": {
                    "type": "boolean"
                  }
                }
              },
              "reporting": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "fiu_reports": {
                    "type": "boolean"
                  }
                }
              },
              "financial": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "payment_methods": {
                    "type": "boolean"
                  },
                  "transactions": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "creation_sources": {
            "type": "array",
            "description": "الموصلات التي توجّه حالياً حالات جديدة إلى هذا المخطط.",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "aml",
                    "rule",
                    "workflow"
                  ]
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "receives_escalation_from": {
            "type": "array",
            "description": "المخططات الأخرى التي يشير هدف التصعيد الخاص بها إلى هذا المخطط.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "readOnly": true
          },
          "default_deadline_hours": {
            "type": "integer",
            "nullable": true,
            "minimum": 1,
            "maximum": 8760
          }
        }
      },
      "CaseListItem": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "case_number": {
            "type": "string",
            "nullable": true,
            "description": "معيّن تلقائياً، مثل CS-0001."
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "AWAITING_USER",
              "RESOLVED"
            ]
          },
          "resolution": {
            "type": "string",
            "enum": [
              "FALSE_POSITIVE",
              "VALID_THREAT",
              "INCONCLUSIVE",
              "REQUIREMENTS_NOT_MET",
              "REQUIREMENTS_SATISFIED"
            ],
            "nullable": true
          },
          "pending_resolution": {
            "type": "object",
            "nullable": true,
            "description": "يُعيَّن فقط أثناء تجهيز قرار الموافقة الثنائية (4-eyes) على مخطط المدقق، في انتظار الموافقة أو رفض الموافقة.",
            "properties": {
              "resolution": {
                "type": "string",
                "enum": [
                  "FALSE_POSITIVE",
                  "VALID_THREAT",
                  "INCONCLUSIVE",
                  "REQUIREMENTS_NOT_MET",
                  "REQUIREMENTS_SATISFIED"
                ]
              },
              "resolution_notes": {
                "type": "string",
                "nullable": true
              },
              "maker_email": {
                "type": "string",
                "format": "email",
                "nullable": true,
                "description": "البريد الإلكتروني للمسؤول الذي أرسل القرار. يكون Null عندما يرسله مفتاح API: لا يوجد مُصدِر مسجل لهذا القرار، لذا يُرجع كل من approve وreject-approval الرمز 403 لأي مستدعٍ."
              },
              "maker_name": {
                "type": "string",
                "nullable": true
              },
              "maker_user_id": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "معرّف uuid لمستخدم العضو الخاص بالمسؤول الذي أرسل القرار. يكون null عندما يتم إرساله عبر مفتاح API. لا يمكن تعيين هذا العضو كـ `checker`."
              },
              "maker_blueprint_id": {
                "type": "string",
                "format": "uuid"
              },
              "staged_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "checker": {
            "$ref": "#/components/schemas/CaseChecker"
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "MANUAL",
              "AML_SCREENING",
              "TRANSACTION_RULE",
              "WORKFLOW_BUILDER"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "subject": {
            "$ref": "#/components/schemas/CaseSubject"
          },
          "assigned_to": {
            "$ref": "#/components/schemas/CaseAssignee"
          },
          "assigned_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "team": {
            "$ref": "#/components/schemas/CaseTeamSummary"
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_by_email": {
            "type": "string",
            "nullable": true
          },
          "created_by_name": {
            "type": "string",
            "nullable": true
          },
          "blueprint": {
            "$ref": "#/components/schemas/CaseBlueprintSummary"
          },
          "links_count": {
            "type": "integer"
          },
          "notes_count": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "application_id": {
            "type": "string",
            "format": "uuid"
          },
          "application_name": {
            "type": "string"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_name": {
            "type": "string"
          }
        }
      },
      "CaseDetail": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "case_number": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "AWAITING_USER",
              "RESOLVED"
            ]
          },
          "resolution": {
            "type": "string",
            "enum": [
              "FALSE_POSITIVE",
              "VALID_THREAT",
              "INCONCLUSIVE",
              "REQUIREMENTS_NOT_MET",
              "REQUIREMENTS_SATISFIED"
            ],
            "nullable": true
          },
          "resolution_notes": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "MANUAL",
              "AML_SCREENING",
              "TRANSACTION_RULE",
              "WORKFLOW_BUILDER"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "subject": {
            "$ref": "#/components/schemas/CaseSubject"
          },
          "assigned_to": {
            "$ref": "#/components/schemas/CaseAssignee"
          },
          "assigned_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "team": {
            "$ref": "#/components/schemas/CaseTeamSummary"
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "resolved_by_email": {
            "type": "string",
            "nullable": true
          },
          "pending_resolution": {
            "type": "object",
            "nullable": true,
            "description": "يُعيَّن فقط أثناء تجهيز قرار الموافقة الثنائية (4-eyes) على مخطط المدقق، في انتظار الموافقة أو رفض الموافقة.",
            "properties": {
              "resolution": {
                "type": "string",
                "enum": [
                  "FALSE_POSITIVE",
                  "VALID_THREAT",
                  "INCONCLUSIVE",
                  "REQUIREMENTS_NOT_MET",
                  "REQUIREMENTS_SATISFIED"
                ]
              },
              "resolution_notes": {
                "type": "string",
                "nullable": true
              },
              "maker_email": {
                "type": "string",
                "format": "email",
                "nullable": true,
                "description": "البريد الإلكتروني للمسؤول الذي أرسل القرار. يكون Null عندما يرسله مفتاح API: لا يوجد مُصدِر مسجل لهذا القرار، لذا يُرجع كل من approve وreject-approval الرمز 403 لأي مستدعٍ."
              },
              "maker_name": {
                "type": "string",
                "nullable": true
              },
              "maker_user_id": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "معرّف uuid لمستخدم العضو الخاص بالمسؤول الذي أرسل القرار. يكون null عندما يتم إرساله عبر مفتاح API. لا يمكن تعيين هذا العضو كـ `checker`."
              },
              "maker_blueprint_id": {
                "type": "string",
                "format": "uuid"
              },
              "staged_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "checker": {
            "$ref": "#/components/schemas/CaseChecker"
          },
          "metadata": {
            "type": "object"
          },
          "blueprint": {
            "$ref": "#/components/schemas/CaseBlueprintDetail"
          },
          "notes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseNote"
            },
            "description": "أحدث 50 ملاحظة."
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseEvent"
            },
            "description": "أحدث 100 حدث."
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseLink"
            }
          },
          "links_count": {
            "type": "integer"
          },
          "notes_count": {
            "type": "integer"
          },
          "checklist_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseChecklistItem"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ReportTemplateDetail": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "jurisdiction": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2."
          },
          "report_type": {
            "type": "string",
            "enum": [
              "SAR",
              "STR",
              "CTR",
              "TTR",
              "UTR",
              "IFT",
              "CBR",
              "TFR"
            ]
          },
          "report_type_display": {
            "type": "string"
          },
          "field_config": {
            "type": "object",
            "description": "القيم الافتراضية القابلة لإعادة الاستخدام لرأس goAML. الحقول الإلزامية على مستوى القالب: rentity_id، وsubmission_code، وcurrency_code_local (من 3 أحرف). الحقول الاختيارية: enabled_fields (أقسام التقرير الاختيارية المطلوب تضمينها) بالإضافة إلى القيم الافتراضية لكل من reporting_person، وlocation، وreason، وaction. يتم فرض حقول الرأس الخاصة بكل ملف تقديم (action، وsubmission_date، وtransactions، وjurisdiction) عند التحقق من صحة التقرير أو إتمامه نهائياً، وليس على مستوى القالب."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RegulatoryReportDetail": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "case_uuid": {
            "type": "string",
            "format": "uuid"
          },
          "case_number": {
            "type": "string",
            "nullable": true
          },
          "report_type": {
            "type": "string",
            "enum": [
              "SAR",
              "STR",
              "CTR",
              "TTR",
              "UTR",
              "IFT",
              "CBR",
              "TFR"
            ]
          },
          "report_type_display": {
            "type": "string"
          },
          "report_code": {
            "type": "string",
            "description": "رمز تقرير goAML المشتق من report_type، مثل STR، وCTR، وBCR."
          },
          "report_number": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "VALIDATED",
              "FINALIZED"
            ]
          },
          "status_display": {
            "type": "string"
          },
          "jurisdiction": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "rentity_id": {
            "type": "string",
            "nullable": true,
            "description": "معرّف الجهة المُبلِغة الصادر عن وحدة الاستخبارات المالية (FIU)."
          },
          "rentity_branch": {
            "type": "string",
            "nullable": true
          },
          "submission_code": {
            "type": "string",
            "enum": [
              "E",
              "M"
            ]
          },
          "entity_reference": {
            "type": "string",
            "nullable": true
          },
          "fiu_ref_number": {
            "type": "string",
            "nullable": true
          },
          "currency_code_local": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "nullable": true
          },
          "submission_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reporting_person": {
            "type": "object"
          },
          "location": {
            "type": "object"
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "type": "string",
            "nullable": true
          },
          "activity": {
            "type": "string",
            "nullable": true
          },
          "narrative": {
            "type": "object",
            "description": "أقسام السرد للأسئلة الخمسة (Five Ws).",
            "properties": {
              "who": {
                "type": "string"
              },
              "what": {
                "type": "string"
              },
              "when": {
                "type": "string"
              },
              "where": {
                "type": "string"
              },
              "why": {
                "type": "string"
              },
              "how": {
                "type": "string"
              }
            }
          },
          "report_indicators": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "included_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "transactions": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "validation_errors": {
            "type": "array",
            "description": "نتيجة آخر عملية تحقق من الصحة؛ كل إدخال هو كائن {field, message}.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "validated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finalized_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_by_email": {
            "type": "string",
            "nullable": true
          },
          "created_by_name": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TransactionRuleCondition": {
        "type": "object",
        "required": [
          "field",
          "operator"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "مسار حقل المعاملة للتقييم. الحقول الأساسية: amount، currency، direction، action_type، score، severity، transaction_type، payment_details، preferred_currency_amount (يرجع كبديل إلى amount_in_default_currency)، default_currency_code، subject_country، counterparty_country، subject_vendor_data، counterparty_vendor_data، subject_device_fingerprint، counterparty_device_fingerprint، subject_browser_family، subject_browser_version، subject_platform، subject_accept_language، subject_session_age_ms، subject_ip_country، counterparty_ip_country، subject_ip_address، counterparty_ip_address، subject_payment_method_type، subject_payment_method_country، subject_payment_method_fingerprint، subject_payment_method_account_id (وما يعادلها من counterparty_payment_method_*)، travel_rule_status، travel_rule_required، travel_rule_obligations_count، counterparty_dd_status (قرارك بشأن الطرف المقابل لـ Travel Rule: APPROVED أو RESTRICTED أو BLOCKED، وهو كيان يتبع علامته التجارية)، counterparty_risk_level (LOW أو MEDIUM أو HIGH؛ ويكون HIGH طالما كان فحص الطرف المقابل الخاص بك مُعلَّماً)، counterparty_jurisdiction (دولة VASP للطرف المقابل)، counterparty_responsiveness (RESPONSIVE أو UNRESPONSIVE أو UNKNOWN)، subject_days_since_previous_transaction، tags، و custom_values.<key> لأي مفتاح تم إرساله في custom_properties عند إنشاء المعاملة. تقبل حقول رموز الدول كلاً من ISO-2 أو ISO-3؛ وتتم تسوية كلا الجانبين إلى ISO-3 قبل المقارنة."
          },
          "operator": {
            "type": "string",
            "enum": [
              "eq",
              "ne",
              "gt",
              "gte",
              "lt",
              "lte",
              "in",
              "not_in",
              "contains",
              "not_contains",
              "contains_any",
              "regex",
              "fuzzy_match",
              "exists",
              "is_not_empty",
              "is_not_null",
              "not_exists",
              "is_empty",
              "is_null"
            ],
            "description": "معامل المقارنة. يختبر in/not_in الانتماء (قد تكون القيمة قائمة أو قيمة فردية واحدة). يُعد contains/not_contains فحصاً لسلسلة فرعية غير حساس لحالة الأحرف مقابل قيمة نصية. يقبل contains_any قائمة من النصوص ويتطابق عندما يكون أي منها سلسلة فرعية غير حساسة لحالة الأحرف من قيمة الحقل. يطابق regex نمط القيمة مع الحقل. يقارن fuzzy_match مع سلسلة القيمة وفقاً لحد `score` المطلوب (0-100). لا تتطابق gt/gte/lt/lte أبداً عند فقدان أي من الطرفين. تُعد exists/is_not_empty/is_not_null (أسماء مستعارة) وnot_exists/is_empty/is_null (أسماء مستعارة) فحوصات وجود تتجاهل `value`."
          },
          "value": {
            "description": "قيمة المقارنة. يعتمد شكلها على المعامل وvalue_type؛ احذفها لمعاملات فحص الوجود. يحتاج كل معامل آخر إلى قيمة ليست `null` أو قائمة فارغة، وإلا فسيتم رفض القاعدة بالرمز `400`. يحتاج `contains_any` إلى قائمة نصوص، بينما يحتاج كل من `contains` و`not_contains` و`regex` إلى نص فردي."
          },
          "value_type": {
            "type": "string",
            "enum": [
              "list",
              "field",
              "relative_date"
            ],
            "description": "تفسير اختياري للقيمة. `list`: القيمة هي UUID لقائمة وتصبح مدخلات القائمة هي قيمة المقارنة. `field`: القيمة هي مسار حقل آخر، وتتم المقارنة حقلاً بحقل. `relative_date`: القيمة هي كائن تاريخ نسبي، مثل {\"direction\": \"past\", \"unit\": \"days\", \"amount\": 30}."
          },
          "score": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "مطلوب عندما يكون المشغّل هو fuzzy_match: حد التشابه بين 0 و100."
          },
          "group_index": {
            "type": "integer",
            "description": "منطق مجمّع اختياري. عندما يحمل أي شرط group_index، فإن الشروط التي تشترك في نفس الفهرس تشكّل مجموعة، ويحل التقييم المجمّع محل evaluation_mode."
          },
          "group_logic": {
            "type": "string",
            "enum": [
              "AND",
              "OR"
            ],
            "default": "AND",
            "description": "كيفية دمج الشروط داخل المجموعة الواحدة."
          },
          "groups_logic": {
            "type": "string",
            "enum": [
              "AND",
              "OR"
            ],
            "default": "OR",
            "description": "كيفية دمج نتائج المجموعات عبر المجموعات المختلفة. تُقرأ من الشرط الأول."
          }
        },
        "description": "يقرأ الشرط فقط المعاملة التي تخضع للتقييم - ولا يصفّي أبداً نافذة التجميع."
      },
      "TransactionRuleAggregation": {
        "type": "object",
        "required": [
          "value"
        ],
        "properties": {
          "metric": {
            "type": "string",
            "enum": [
              "count",
              "sum",
              "max",
              "min",
              "avg",
              "distinct_count"
            ],
            "default": "count",
            "description": "كيفية تجميع المعاملات السابقة المتطابقة. يتم قبول unique_count كاسم بديل لـ distinct_count."
          },
          "field": {
            "type": "string",
            "default": "amount",
            "description": "الحقل المجمّع حسب sum/max/min/avg/distinct_count. يُتجاهل بالنسبة لـ count."
          },
          "operator": {
            "type": "string",
            "enum": [
              "eq",
              "ne",
              "gt",
              "gte",
              "lt",
              "lte"
            ],
            "default": "eq",
            "description": "المقارنة المطبقة على المقياس المحسوب."
          },
          "value": {
            "type": "number",
            "description": "الحد الذي تتم مقارنة المقياس المحسوب به."
          },
          "window": {
            "type": "string",
            "pattern": "^\\d+(m|h|d)$",
            "default": "1d",
            "description": "نافذة الرجوع التي تنتهي عند txn_date الخاص بالمعاملة: <N>m (دقائق، وليس شهوراً)، أو <N>h (ساعات)، أو <N>d (أيام)، مثل 30m، أو 24h، أو 7d، أو 30d."
          },
          "filters": {
            "type": "object",
            "additionalProperties": true,
            "description": "يُضيّق نطاق المعاملات السابقة التي يتم تجميعها. المفاتيح هي مسارات الحقول من كتالوج حقول الشروط؛ تشير القيمة \"__current__\" إلى قيمة الحقل نفسه في المعاملة الجاري تقييمها (على سبيل المثال، يحدد {\"subject_vendor_data\": \"__current__\"} نطاق النافذة لنفس الموضوع)، وتشير قيمة القائمة إلى الانتماء. لا يتم تجميع السجلات التي لا تحتوي على القيمة المجمعة معًا أبدًا: عندما لا تحتوي المعاملة الجاري تقييمها على قيمة لحقل \"__current__\" (لا يوجد طرف مقابل، ولا توجد بصمة للجهاز)، فإن التجميع لا يتطابق، أياً كان معامله. تقارن عوامل التصفية بالمساواة أو الانتماء فقط - لا توجد تصفية lt/gte، لذا لا يمكن التعبير عن نطاق مثل \"المعاملات السابقة الأقل من 10,000\" هنا. ضع النطاق في المقياس بدلاً من ذلك (المقياس max مع المعامل lt يحتفظ بكل معاملة في النافذة أقل من الحد)."
          }
        },
        "description": "فحص معدل التكرار (velocity check) عبر المعاملات التاريخية للتطبيق داخل النافذة الزمنية. يجب أن يتطابق كل إدخال تجميعي حتى تتطابق القاعدة، بغض النظر عن evaluation_mode. يقيد التجميع النافذة الزمنية فقط؛ أما المعاملة قيد التقييم فتُقيّد بواسطة النطاق والشروط، لذا كرر direction أو currency أو transaction_type في كلا النصفين عندما تقتضي القاعدة ذلك."
      },
      "TransactionRuleScope": {
        "type": "object",
        "properties": {
          "transaction_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "التقييد بأنواع المعاملات، مثل finance أو kyc أو travel_rule أو user_event. فارغ أو مفقود = لا يوجد تقييد."
          },
          "directions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "INBOUND",
                "OUTBOUND"
              ]
            },
            "description": "التقييد باتجاهات المعاملات (غير حساس لحالة الأحرف عند الكتابة)."
          },
          "action_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "التقييد بقيم action_type الخاصة بك، مثل withdrawal أو deposit."
          }
        },
        "description": "أي معاملات تنطبق عليها القاعدة. يتم قبول هذه المفاتيح الثلاثة فقط."
      },
      "TransactionRuleAction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/TransactionRuleActionAddScore"
          },
          {
            "$ref": "#/components/schemas/TransactionRuleActionChangeStatus"
          },
          {
            "$ref": "#/components/schemas/TransactionRuleActionAddTags"
          },
          {
            "$ref": "#/components/schemas/TransactionRuleActionAddNote"
          },
          {
            "$ref": "#/components/schemas/TransactionRuleActionAddToList"
          },
          {
            "$ref": "#/components/schemas/TransactionRuleActionOpenCase"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "add_score": "#/components/schemas/TransactionRuleActionAddScore",
            "change_status": "#/components/schemas/TransactionRuleActionChangeStatus",
            "add_tags": "#/components/schemas/TransactionRuleActionAddTags",
            "add_note": "#/components/schemas/TransactionRuleActionAddNote",
            "add_to_list": "#/components/schemas/TransactionRuleActionAddToList",
            "open_case": "#/components/schemas/TransactionRuleActionOpenCase"
          }
        },
        "description": "إجراء قاعدة واحد. يمكن أن تحمل القاعدة عدة إجراءات؛ وتُطبّق جميعها معاً عند تطابقها. تسجل القواعد في وضع TEST ما كانت ستفعله دون تطبيق أي إجراء."
      },
      "TransactionRuleCreateRequest": {
        "type": "object",
        "required": [
          "title",
          "category",
          "mode"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "اسم القاعدة. فريد لكل تطبيق بين القواعد غير المحذوفة؛ وترجع الأسماء المكررة الرمز 400."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "موضوع المخاطر المستخدم للتجميع وإعداد التقارير، مثل finance، وaml_ctf، وanomaly_detection، وfatf، وdevice_intelligence، وcrypto_monitoring، وtravel_rule، وresponsible_gaming، وe_commerce."
          },
          "mode": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "DISABLED",
              "TEST"
            ],
            "description": "يقوم ACTIVE بالتقييم المباشر. يقوم TEST بالتقييم وتسجيل عمليات تشغيل القواعد ولكنه لا يؤثر أبدًا في الدرجة أو الحالة - وهو وضع البدء الموصى به. يتم تخطي DISABLED."
          },
          "evaluation_mode": {
            "type": "string",
            "enum": [
              "ALL",
              "ANY"
            ],
            "default": "ALL",
            "description": "ما إذا كان يجب أن يتطابق كل شرط (ALL) أو شرط واحد على الأقل (ANY). يتم تجاهله عندما تستخدم الشروط group_index."
          },
          "scope": {
            "$ref": "#/components/schemas/TransactionRuleScope"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleCondition"
            }
          },
          "aggregation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAggregation"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAction"
            }
          },
          "metadata": {
            "type": "object",
            "description": "بيانات وصفية بصيغة حرة مخزنة في القاعدة."
          }
        },
        "description": "ينشئ قاعدة مخصصة (CUSTOM). تسري القواعد في وضع ACTIVE فوراً على المعاملات الجديدة - أنشئها في وضع TEST وأجرِ اختباراً رجعياً أولاً."
      },
      "TransactionRuleUpdateRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "اسم القاعدة. فريد لكل تطبيق بين القواعد غير المحذوفة؛ وترجع الأسماء المكررة الرمز 400."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "موضوع المخاطر المستخدم للتجميع وإعداد التقارير، مثل finance، وaml_ctf، وanomaly_detection، وfatf، وdevice_intelligence، وcrypto_monitoring، وtravel_rule، وresponsible_gaming، وe_commerce."
          },
          "mode": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "DISABLED",
              "TEST"
            ],
            "description": "يقوم ACTIVE بالتقييم المباشر. يقوم TEST بالتقييم وتسجيل عمليات تشغيل القواعد ولكنه لا يؤثر أبدًا في الدرجة أو الحالة - وهو وضع البدء الموصى به. يتم تخطي DISABLED."
          },
          "evaluation_mode": {
            "type": "string",
            "enum": [
              "ALL",
              "ANY"
            ],
            "default": "ALL",
            "description": "ما إذا كان يجب أن يتطابق كل شرط (ALL) أو شرط واحد على الأقل (ANY). يتم تجاهله عندما تستخدم الشروط group_index."
          },
          "scope": {
            "$ref": "#/components/schemas/TransactionRuleScope"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleCondition"
            }
          },
          "aggregation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAggregation"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAction"
            }
          },
          "metadata": {
            "type": "object",
            "description": "بيانات وصفية بصيغة حرة مخزنة في القاعدة."
          }
        },
        "description": "تحديث جزئي. تقبل القواعد المخصصة كل حقل؛ بينما تقبل قواعد المكتبة (PRESET) الحقل mode فقط - وأي شيء آخر يعيد 400."
      },
      "TransactionRuleDetail": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "description": "اسم القاعدة. فريد لكل تطبيق بين القواعد غير المحذوفة؛ وترجع الأسماء المكررة الرمز 400."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "موضوع المخاطر المستخدم للتجميع وإعداد التقارير، مثل finance، وaml_ctf، وanomaly_detection، وfatf، وdevice_intelligence، وcrypto_monitoring، وtravel_rule، وresponsible_gaming، وe_commerce."
          },
          "mode": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "DISABLED",
              "TEST"
            ],
            "description": "يقوم ACTIVE بالتقييم المباشر. يقوم TEST بالتقييم وتسجيل عمليات تشغيل القواعد ولكنه لا يؤثر أبدًا في الدرجة أو الحالة - وهو وضع البدء الموصى به. يتم تخطي DISABLED."
          },
          "evaluation_mode": {
            "type": "string",
            "enum": [
              "ALL",
              "ANY"
            ],
            "default": "ALL",
            "description": "ما إذا كان يجب أن يتطابق كل شرط (ALL) أو شرط واحد على الأقل (ANY). يتم تجاهله عندما تستخدم الشروط group_index."
          },
          "scope": {
            "$ref": "#/components/schemas/TransactionRuleScope"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleCondition"
            }
          },
          "aggregation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAggregation"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAction"
            }
          },
          "metadata": {
            "type": "object",
            "description": "بيانات وصفية بصيغة حرة مخزنة في القاعدة."
          },
          "severity": {
            "type": "string",
            "enum": [
              "UNKNOWN",
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL"
            ],
            "nullable": true,
            "description": "مستوى خطورة معلوماتي تحمله قواعد المكتبة؛ لا يمكن تعيينه في القواعد المخصصة."
          },
          "source": {
            "type": "string",
            "enum": [
              "PRESET",
              "CUSTOM"
            ],
            "description": "تأتي قواعد PRESET من المكتبة (تثبيت/إلغاء تثبيت، تعديلات على الوضع فقط)؛ أما قواعد CUSTOM فهي ملكك بالكامل."
          },
          "library_key": {
            "type": "string",
            "nullable": true,
            "description": "معرّف مكتبة ثابت؛ تكون القيمة null للقواعد المخصصة."
          },
          "latest_triggered_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "run_count": {
            "type": "integer",
            "description": "عدد المعاملات التي تطابقت مع هذه القاعدة."
          },
          "approved_count": {
            "type": "integer"
          },
          "reviewed_count": {
            "type": "integer"
          },
          "declined_count": {
            "type": "integer"
          },
          "awaiting_user_count": {
            "type": "integer"
          },
          "approved_pct": {
            "type": "number"
          },
          "reviewed_pct": {
            "type": "number"
          },
          "declined_pct": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TransactionRuleBacktestRequest": {
        "type": "object",
        "properties": {
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleCondition"
            },
            "default": []
          },
          "aggregation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAggregation"
            },
            "default": []
          },
          "evaluation_mode": {
            "type": "string",
            "enum": [
              "ALL",
              "ANY"
            ],
            "default": "ALL"
          },
          "scope": {
            "$ref": "#/components/schemas/TransactionRuleScope"
          },
          "period_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "default": 90
          }
        },
        "description": "تكوين قاعدة افتراضية لتقييمها مقابل المعاملات الأخيرة. للقراءة فقط ومجاني: لا يتم إنشاء أو تعديل أي شيء. أرسل نفس الشروط، والتجميع (aggregation)، وevaluation_mode والنطاق (scope) الخاص بالقاعدة التي تنوي تفعيلها. الشروط والتجميع والنطاق المحذوفة لا تضيف أي قيود خاصة بها؛ وحذف النطاق قد يتضمن اتجاهات أو أنواع معاملات تتخطاها القاعدة المحفوظة. القيمة الافتراضية لـ evaluation_mode المحذوفة هي ALL (مما قد يقلل من التطابقات لقاعدة ANY)، والقيمة الافتراضية لـ period_days المحذوفة هي 90 يوماً، وليس تاريخاً غير محدود."
      },
      "TransactionRuleBacktestResult": {
        "type": "object",
        "properties": {
          "evaluated": {
            "type": "integer",
            "description": "المعاملات التي تم تقييمها (الأحدث أولاً، مع حد أقصى)."
          },
          "matched": {
            "type": "integer",
            "description": "المعاملات التي كان التكوين سيتطابق معها."
          },
          "affected_entities": {
            "type": "integer",
            "description": "كيانات مميزة (حسب vendor_data) من بين التطابقات."
          },
          "period_days": {
            "type": "integer"
          }
        }
      },
      "TransactionRuleLibraryEntry": {
        "type": "object",
        "properties": {
          "library_key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string"
          },
          "evaluation_mode": {
            "type": "string",
            "enum": [
              "ALL",
              "ANY"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/TransactionRuleScope"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleCondition"
            }
          },
          "aggregation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAggregation"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionRuleAction"
            }
          },
          "metadata": {
            "type": "object"
          },
          "bundle": {
            "type": "string",
            "nullable": true,
            "description": "العائلة الوظيفية، مثل finance، وaml_ctf، وcrypto_monitoring، وtravel_rule، وresponsible_gaming."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "industries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string"
          },
          "is_installed": {
            "type": "boolean",
            "description": "ما إذا كان هذا الإعداد المسبق مثبتاً حالياً على التطبيق."
          }
        }
      },
      "TransactionRuleInstallRequest": {
        "type": "object",
        "properties": {
          "library_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "إعدادات مسبقة محددة للتثبيت أو إلغاء التثبيت."
          },
          "bundle": {
            "type": "string",
            "description": "تثبيت أو إلغاء تثبيت كل إعداد مسبق في هذه الحزمة بدلاً من ذلك."
          }
        },
        "description": "قدّم library_keys أو bundle."
      },
      "TransactionRuleInstallResult": {
        "type": "object",
        "properties": {
          "installed_library_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "لـ POST (التثبيت) فقط: الإعدادات المسبقة المثبتة بواسطة هذا الاستدعاء."
          },
          "installed_count": {
            "type": "integer",
            "description": "لـ POST (التثبيت) فقط."
          },
          "uninstalled_count": {
            "type": "integer",
            "description": "DELETE (إلغاء التثبيت) فقط: الإعدادات المسبقة التي تمت إزالتها بواسطة هذا الاستدعاء."
          }
        }
      },
      "WalletScreeningResult": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "description": "المزود الذي أجرى الفحص (مثل `merklescience`، `crystal`)."
          },
          "screening_type": {
            "type": "string",
            "enum": [
              "WALLET_SCREENING"
            ],
            "description": "دائماً `WALLET_SCREENING` لهذا الـ endpoint."
          },
          "risk_score": {
            "type": "integer",
            "description": "درجة مخاطر معيارية من 0 إلى 100. تعني القيمة الأعلى تعرضاً أكبر للجهات عالية المخاطر. تقيّم Merkle Science العنوان من 0 إلى 5، وهو ما يقابل 0 أو 15 أو 35 أو 55 أو 75 أو 95."
          },
          "severity": {
            "type": "string",
            "enum": [
              "UNKNOWN",
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL"
            ],
            "description": "فئة المخاطر المشتقة من `risk_score`: النطاق `0-9` هو UNKNOWN، و`10-39` هو LOW، و`40-69` هو MEDIUM، و`70-89` هو HIGH، و`90-100` هو CRITICAL. النطاق `UNKNOWN` هو أدنى فئة، وليس حالة مستقلة لعدم توفر البيانات: تعني قيمة `risk_score` البالغة 0 (الحالة الشائعة لعنوان سليم) عدم وجود تقييم سلبي، بينما تُعد الدرجة غير الصفرية في النطاق 1-9 إشارة حقيقية ولكنها أقل من مستوى LOW - اقرأ `risk_score`، وليس الفئة فقط. لا تعامل `UNKNOWN` أبداً على أنها تصنيف مؤكد لمخاطر منخفضة أو حالة خالية من المخاطر؛ ولا تعرضها كحالة اجتياز."
          },
          "status": {
            "type": "string",
            "enum": [
              "SCREENED",
              "PENDING",
              "ERROR"
            ],
            "description": "حالة نتيجة الفحص."
          },
          "summary": {
            "type": "string",
            "description": "ملخص مقروء للبشر لنتيجة الفحص."
          },
          "wallet_address": {
            "type": "string",
            "description": "العنوان الذي تم فحصه، مع إعادته كما هو."
          },
          "transaction_hash": {
            "type": "string",
            "nullable": true,
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون `null` في نتيجة فحص المحافظ."
          },
          "blockchain": {
            "type": "string",
            "description": "البلوكتشين التي تم فحصها."
          },
          "block_timestamp": {
            "type": "string",
            "nullable": true,
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون `null` في نتيجة فحص المحافظ."
          },
          "total_value_usd": {
            "type": "number",
            "nullable": true,
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون `null` في نتيجة فحص المحافظ."
          },
          "fee_usd": {
            "type": "number",
            "nullable": true,
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون `null` في نتيجة فحص المحافظ."
          },
          "sender_rows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون فارغاً في نتيجة فحص المحافظ."
          },
          "receiver_rows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون فارغاً في نتيجة فحص المحافظ."
          },
          "transaction_flows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون فارغاً في نتيجة فحص المحافظ."
          },
          "transaction_flows_status": {
            "type": "string",
            "nullable": true,
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون `null` في نتيجة فحص المحافظ."
          },
          "transaction_flows_error": {
            "type": "string",
            "nullable": true,
            "description": "حقل فحص المعاملات، مشترك مع هيكل النتيجة. دائماً ما يكون `null` في نتيجة فحص المحافظ."
          },
          "source_of_funds": {
            "type": "array",
            "description": "الجهة التي استلم منها العنوان الأموال، منسوبة بحسب الكيان. كل إدخال يمثل تفصيلاً للتعرّض.",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "description": "فئة مخاطر معيارية، مثل `exchange_licensed` أو `dex` أو `defi` أو `payment_processor` أو `mixer` أو `darknet_market` أو `sanctioned` أو `stolen_funds` أو `high_risk_exchange`."
                },
                "percentage": {
                  "type": "number",
                  "description": "حصة التعرض الإجمالي للاتجاه، 0-100."
                },
                "amount_usd": {
                  "type": "number",
                  "nullable": true,
                  "description": "القيمة بالدولار الأمريكي المنسوبة إلى هذا الكيان."
                },
                "entity_name": {
                  "type": "string",
                  "nullable": true,
                  "description": "اسم الكيان المنسوب، على سبيل المثال منصة تداول أو خدمة خلط معاملات (mixer) أو مجموعة خاضعة للعقوبات."
                },
                "entity_type": {
                  "type": "string",
                  "nullable": true,
                  "description": "نوع كيان المزود (مثل `Exchange`، `DeFi`، `Sanctions`، `Theft`)."
                },
                "entity_subtype": {
                  "type": "string",
                  "nullable": true,
                  "description": "نوع فرعي أكثر تفصيلاً (مثل `Mandatory KYC and AML` و `OFAC` و `Yield Aggregator`)."
                },
                "hops": {
                  "type": "integer",
                  "nullable": true,
                  "description": "عدد القفزات إلى الكيان (1 للطرف المقابل المباشر)، عندما يبلغ المزود عنها. دائماً `null` لـ Merkle Science، التي تبلغ فقط عما إذا كان التعرض مباشراً أو غير مباشر: استخدم `exposure_type`."
                },
                "description": {
                  "type": "string",
                  "nullable": true,
                  "description": "`entity_type / entity_subtype`، كما يسمّي المزود الكيان."
                },
                "is_direct": {
                  "type": "boolean",
                  "description": "تكون القيمة True عندما يكون `exposure_type` هو `direct`."
                },
                "exposure_direction": {
                  "type": "string",
                  "enum": [
                    "incoming",
                    "outgoing",
                    "connected"
                  ],
                  "description": "ما إذا كانت الأموال واردة من (`incoming`) هذا الكيان أو صادرة إليه (`outgoing`)."
                },
                "exposure_type": {
                  "type": "string",
                  "enum": [
                    "direct",
                    "indirect"
                  ],
                  "description": "التعرّض `direct` (وثبة واحدة) أو `indirect` (متعدد الوثبات)."
                },
                "provider_entity_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بالمزود للكيان."
                },
                "provider_entity_type_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بالمزود لـ `entity_type`."
                },
                "provider_entity_subtype_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بالمزود لـ `entity_subtype`."
                },
                "country": {
                  "type": "string",
                  "nullable": true,
                  "description": "الدولة الأساسية للكيان وفقاً لرمز ISO 3166-1 alpha-2. تكون فارغة أو `null` عندما لا يعرفها المزود."
                },
                "raw_amount": {
                  "type": "number",
                  "nullable": true,
                  "description": "المبلغ بالوحدة الخاصة بالأصل، عندما يبلغ المزود عنه."
                },
                "raw_currency": {
                  "type": "string",
                  "nullable": true,
                  "description": "وحدة `raw_amount`، عندما يبلغ عنها المزود."
                }
              }
            }
          },
          "destination_of_funds": {
            "type": "array",
            "description": "الجهة التي أرسل إليها العنوان الأموال، منسوبة بحسب الكيان. نفس هيكل عناصر `source_of_funds` مع `exposure_direction` = `outgoing`.",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "description": "فئة مخاطر معيارية، مثل `exchange_licensed` أو `dex` أو `defi` أو `payment_processor` أو `mixer` أو `darknet_market` أو `sanctioned` أو `stolen_funds` أو `high_risk_exchange`."
                },
                "percentage": {
                  "type": "number",
                  "description": "حصة التعرض الإجمالي للاتجاه، 0-100."
                },
                "amount_usd": {
                  "type": "number",
                  "nullable": true,
                  "description": "القيمة بالدولار الأمريكي المنسوبة إلى هذا الكيان."
                },
                "entity_name": {
                  "type": "string",
                  "nullable": true,
                  "description": "اسم الكيان المنسوب، على سبيل المثال منصة تداول أو خدمة خلط معاملات (mixer) أو مجموعة خاضعة للعقوبات."
                },
                "entity_type": {
                  "type": "string",
                  "nullable": true,
                  "description": "نوع كيان المزود (مثل `Exchange`، `DeFi`، `Sanctions`، `Theft`)."
                },
                "entity_subtype": {
                  "type": "string",
                  "nullable": true,
                  "description": "نوع فرعي أكثر تفصيلاً (مثل `Mandatory KYC and AML` و `OFAC` و `Yield Aggregator`)."
                },
                "hops": {
                  "type": "integer",
                  "nullable": true,
                  "description": "عدد القفزات إلى الكيان (1 للطرف المقابل المباشر)، عندما يبلغ المزود عنها. دائماً `null` لـ Merkle Science، التي تبلغ فقط عما إذا كان التعرض مباشراً أو غير مباشر: استخدم `exposure_type`."
                },
                "description": {
                  "type": "string",
                  "nullable": true,
                  "description": "`entity_type / entity_subtype`، كما يسمّي المزود الكيان."
                },
                "is_direct": {
                  "type": "boolean",
                  "description": "تكون القيمة True عندما يكون `exposure_type` هو `direct`."
                },
                "exposure_direction": {
                  "type": "string",
                  "enum": [
                    "incoming",
                    "outgoing",
                    "connected"
                  ],
                  "description": "ما إذا كانت الأموال واردة من (`incoming`) هذا الكيان أو صادرة إليه (`outgoing`)."
                },
                "exposure_type": {
                  "type": "string",
                  "enum": [
                    "direct",
                    "indirect"
                  ],
                  "description": "التعرّض `direct` (وثبة واحدة) أو `indirect` (متعدد الوثبات)."
                },
                "provider_entity_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بالمزود للكيان."
                },
                "provider_entity_type_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بالمزود لـ `entity_type`."
                },
                "provider_entity_subtype_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بالمزود لـ `entity_subtype`."
                },
                "country": {
                  "type": "string",
                  "nullable": true,
                  "description": "الدولة الأساسية للكيان وفقاً لرمز ISO 3166-1 alpha-2. تكون فارغة أو `null` عندما لا يعرفها المزود."
                },
                "raw_amount": {
                  "type": "number",
                  "nullable": true,
                  "description": "المبلغ بالوحدة الخاصة بالأصل، عندما يبلغ المزود عنه."
                },
                "raw_currency": {
                  "type": "string",
                  "nullable": true,
                  "description": "وحدة `raw_amount`، عندما يبلغ عنها المزود."
                }
              }
            }
          },
          "counterparty_connections": {
            "type": "array",
            "description": "الكيانات التي ينسب إليها المزود العنوان المفحوص. بالنسبة لـ Merkle Science، تأتي هذه من علامات المالك والمستخدم الخاصة بالعنوان نفسه، لذا يمكن أن يظهر الكيان نفسه مرتين، ولا تحمل تدفقات أموال: الحقول `received_usd` و`sent_usd` و`received_hops` و`sent_hops` تكون `null` والنسبة `percentage` تكون 0. لا تعتمد في التوجيه على `risk_level` أو `is_direct` هنا: استخدم `sanctions_hit` و`dominant_risk_category` و`risk_factors[].is_high_risk` للقرار، واستخدم `exposure_type` في `source_of_funds`/`destination_of_funds` لمعرفة مدى المباشرة.",
            "items": {
              "type": "object",
              "properties": {
                "entity_name": {
                  "type": "string",
                  "nullable": true,
                  "description": "اسم الكيان المنسوب."
                },
                "entity_type": {
                  "type": "string",
                  "nullable": true,
                  "description": "نوع كيان المزود."
                },
                "entity_subtype": {
                  "type": "string",
                  "nullable": true,
                  "description": "النوع الفرعي لكيان المزود."
                },
                "risk_level": {
                  "type": "string",
                  "description": "بأحرف صغيرة وتعتمد على المزود. بالنسبة لـ Merkle Science، فهي درجة المخاطر الخاصة بالعنوان نفسه من 0 إلى 5 (`no_risk`، `low`، `medium_low`، `medium`، `high`، `critical`)، والتي يتم رفعها إلى `high` عندما تكون فئة الكيان عالية المخاطر؛ وليست درجة منفصلة للكيان."
                },
                "categories": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "فئات المخاطر المعيارية للكيان."
                },
                "received_usd": {
                  "type": "number",
                  "nullable": true,
                  "description": "المبلغ بالدولار الأمريكي المستلم من الكيان، عندما يبلغ المزود عنه."
                },
                "sent_usd": {
                  "type": "number",
                  "nullable": true,
                  "description": "المبلغ بالدولار الأمريكي المرسل إلى الكيان، عندما يبلغ المزود عنه."
                },
                "received_hops": {
                  "type": "integer",
                  "nullable": true,
                  "description": "القفزات إلى الكيان في جانب الاستلام، عندما يبلغ عنها المزود."
                },
                "sent_hops": {
                  "type": "integer",
                  "nullable": true,
                  "description": "القفزات إلى الكيان في جانب الإرسال، عندما يبلغ عنها المزود."
                },
                "percentage": {
                  "type": "number",
                  "description": "حصة تعرض العنوان، عندما يُبلغ عنها المزود؛ وإلا تكون 0."
                },
                "is_direct": {
                  "type": "boolean",
                  "description": "دائماً `true` لـ Merkle Science، التي تُعد روابطها إسنادات وليست أطرافاً مقابلة."
                },
                "country": {
                  "type": "string",
                  "nullable": true,
                  "description": "دولة الكيان، عندما تكون معروفة."
                },
                "provider_entity_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بالمزود للكيان."
                }
              }
            }
          },
          "network_nodes": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "عقد مخطط التعرض لفحص المعاملات. تكون فارغة في نتيجة فحص المحافظ."
          },
          "network_edges": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "حواف مخطط التعرض لفحص المعاملات. تكون فارغة في نتيجة فحص المحافظ."
          },
          "sanctions_hit": {
            "type": "boolean",
            "description": "تكون القيمة True إذا كان العنوان مرتبطاً بتعرّض مباشر أو غير مباشر للعقوبات."
          },
          "pep_counterparty": {
            "type": "boolean",
            "description": "التعرض لشخص معرض سياسياً. تكون `null` عندما لا تتوفر أي نتيجة متعلقة بـ PEP، وهي كل النتائج اليوم لعدم وجود أي مزود يبلغ عن ذلك؛ وتكون `false` فقط عند وجود نتيجة فحص سلبية صريحة. لا تعتبر `null` بمثابة فحص PEP مكتمل.",
            "nullable": true
          },
          "dominant_risk_category": {
            "type": "string",
            "nullable": true,
            "description": "فئة المخاطر العالية ذات الوزن الأعلى، أو `null` عند عدم وجود فئة مهيمنة (مثل `sanctioned` أو `mixer` أو `stolen_funds`)."
          },
          "risk_factors": {
            "type": "array",
            "description": "تفسير مرتب لـ `risk_score`: ما أدى إلى هذا القرار. يقيّم المزودون العنوان بناءً على نموذجهم الخاص ويُرجعون قراراً فقط (تُرجع Merkle Science عدداً صحيحاً من 0 إلى 5)، وبالتالي فإن الدرجة وحدها لا تكفي لاتخاذ إجراء. مرتبة حسب مستوى المخاطر، بدءاً بالمخاطر الأعلى، ثم حسب القيمة المنقولة عبر كل محرك، بحد أقصى أقوى خمسة محركات؛ يحتوي كل من `source_of_funds` و`destination_of_funds` دائماً على التفصيل الكامل. يعني وجود `risk_score` مرتفع دون إدخال `is_high_risk` أن المزود لم يُبلغ عن أي عقوبات أو تطابق مع كيان منسوب، وقام بتقييم العنوان بالكامل بناءً على نموذج التعرض الخاص به - يوضح `summary` ذلك صراحةً.",
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "enum": [
                    "attribution",
                    "exposure"
                  ],
                  "description": "`attribution` هو ما يحدده المزود بشأن ماهية العنوان نفسه (وسمه أو تجمعه الخاص)؛ بينما `exposure` هو المكان الذي تحركت إليه أمواله بالفعل."
                },
                "category": {
                  "type": "string",
                  "description": "فئة مخاطر معيارية، بنفس المفردات المستخدمة في تفصيل التعرض."
                },
                "label": {
                  "type": "string",
                  "description": "الصياغة الخاصة بالمزود للعامل (مثل `Gambling / Crypto only`)، وهي ما ستراه أيضاً في لوحة تحكم المزود."
                },
                "entity_name": {
                  "type": "string",
                  "nullable": true,
                  "description": "الكيان المنسوب الذي يقف وراء العامل الدافع، على سبيل المثال موقع مقامرة أو منصة تداول."
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "incoming",
                    "outgoing",
                    "connected",
                    "unknown",
                    "attribution"
                  ],
                  "description": "اتجاه تدفق الأموال، ويكون `attribution` عندما يكون المحرك هو الوسم الخاص بالعنوان نفسه، أو `unknown` عندما لا يبلغ المزود عن اتجاه."
                },
                "exposure_type": {
                  "type": "string",
                  "enum": [
                    "direct",
                    "indirect",
                    "unknown",
                    "attribution"
                  ],
                  "description": "`direct` (وثبة واحدة) أو `indirect` (متعدد الوثبات)، أو `attribution` للعلامة الخاصة بالعنوان نفسه، أو `unknown` عندما لا يحدد المزود عدد الوثبات التي يبعدها الطرف المقابل. تعامل مع `unknown` على أنها غير مصنفة وليست `direct`."
                },
                "amount_usd": {
                  "type": "number",
                  "format": "float",
                  "nullable": true,
                  "description": "القيمة بالدولار الأمريكي المنسوبة إلى هذا العامل."
                },
                "percentage": {
                  "type": "number",
                  "format": "float",
                  "description": "حصة الحجم الإجمالي المفحوص للعنوان، لكلا الاتجاهين معاً - على عكس `percentage` داخل `source_of_funds`/`destination_of_funds`، والتي يتم توحيد معيارها لكل اتجاه. قابلة للمقارنة والجمع عبر القائمة بأكملها."
                },
                "is_high_risk": {
                  "type": "boolean",
                  "description": "ما إذا كانت الفئة ضمن الفئات التي تعاملها Didit على أنها عالية المخاطر (`sanctioned`، `mixer`، `stolen_funds`، `ransomware`، `scam`، `darknet_market`، `terrorist_financing`، `child_exploitation`، `hacked_exchange`، `high_risk_exchange`، `seized_funds`)."
                },
                "description": {
                  "type": "string",
                  "description": "عرض في سطر واحد للعامل المؤثر، على سبيل المثال `9.01% indirect outgoing exposure to Gambling / Crypto only (Example Gambling)`."
                }
              }
            }
          },
          "raw_response": {
            "type": "object",
            "additionalProperties": true,
            "description": "الـ payload الخاص بالمزود نفسه. بنيته خاصة بالمزود ويمكن أن تتغير دون إشعار مسبق: اقرأ الحقول الموحدة بدلاً من تحليله برمجياً."
          },
          "report_signature": {
            "type": "string",
            "description": "توقيع HMAC-SHA256 مبهم لهذه النتيجة بالذات، ونطاقه محدد لتطبيقك. ليس له معنى بمفرده — أعد إرسال جسم الاستجابة بالكامل، دون تعديل وبما يشمل هذا الحقل، إلى `POST /v3/wallet-screening/pdf/` لعرضه كملف PDF. يرفض الـ endpoint الخاص بـ PDF الطلب برمز `400` إذا كان `report_signature` مفقوداً أو إذا تم تعديل أي حقل موقّع (مثل `risk_score`، `severity`، `sanctions_hit`) قبل إعادة الإرسال."
          }
        },
        "required": [
          "provider",
          "screening_type",
          "risk_score",
          "severity",
          "status",
          "summary",
          "wallet_address",
          "blockchain",
          "sanctions_hit",
          "dominant_risk_category",
          "source_of_funds",
          "destination_of_funds",
          "counterparty_connections",
          "report_signature"
        ]
      },
      "NetworkRiskDisplay": {
        "type": "object",
        "properties": {
          "score": {
            "type": "integer",
            "description": "درجة المخاطر، من 0 إلى 100."
          },
          "band": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "description": "النطاق الذي تظهر فيه الدرجة. high >= 70، وmedium >= 40، وخلاف ذلك low."
          },
          "bar": {
            "type": "number",
            "format": "float",
            "description": "قيمة معيارية من 0 إلى 1 لعرض شريط المخاطر."
          }
        }
      },
      "NetworkNodeTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "nullable": true,
            "description": "Null لعلامات الحماية، إذ يتولى المُصيّر token اللون الخاص بها."
          },
          "source": {
            "type": "string",
            "enum": [
              "subject_tag",
              "session_tag",
              "transaction_tag",
              "signal_guard"
            ],
            "description": "مصدر الوسم: وسم على المستخدم/الشركة، أو وسم على جلسة في هذه الشبكة، أو وسم على معاملة ينتمي إليها أحد الأطراف، أو شرط حماية الإشارة (مثل مركز رئيسي، أو عنوان IP لمركز بيانات)."
          },
          "category": {
            "type": "string",
            "enum": [
              "customer",
              "quality"
            ],
            "nullable": true,
            "description": "customer للوسوم المحددة من قِبل العميل، وquality لوسوم الحماية الخاصة بجودة الإشارة. Null عندما لا ينطبق ذلك."
          }
        }
      },
      "NetworkListItem": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "network_id": {
            "type": "string",
            "description": "معرّف تسلسلي مقروء للبشر لكل مؤسسة، مثل N-0001."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "in_review",
              "resolved",
              "dismissed"
            ],
            "description": "حالة دورة حياة الشبكة. تختلف عن outcome_status لكل مقدم طلب داخل الشبكة (approved/in_review/declined/not_completed)."
          },
          "risk": {
            "$ref": "#/components/schemas/NetworkRiskDisplay"
          },
          "pattern_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "exact_same_device",
                "similar_device",
                "same_ip_address",
                "same_address",
                "similar_selfie_backgrounds",
                "similar_poa_documents",
                "same_document_number",
                "same_phone_number",
                "same_email"
              ]
            },
            "description": "أنماط التجميع المكتشفة في هذه الشبكة."
          },
          "signal_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ip_address",
                "device",
                "face",
                "document_number",
                "phone",
                "email",
                "address"
              ]
            },
            "description": "أنواع الإشارات المميزة الموجودة في هذه الشبكة."
          },
          "member_counts": {
            "type": "object",
            "description": "أعداد الأعضاء حسب الفئة (مثل الإجمالي، ولكل outcome_status)."
          },
          "member_status": {
            "type": "object",
            "description": "تفصيل الأعضاء حسب outcome_status."
          },
          "signal_coverage": {
            "type": "object",
            "description": "تغطية أعضاء هذه الشبكة لكل signal_type."
          },
          "first_activity_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "NetworkDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NetworkListItem"
          },
          {
            "type": "object",
            "properties": {
              "stats": {
                "type": "object",
                "description": "إحصائيات مجمعة للشبكة (مثل إجمالي الأعضاء)."
              },
              "fraud_tags": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "وسوم أنماط الاحتيال التي ظهرت على الشبكة."
              },
              "risk_signals": {
                "type": "object",
                "description": "ملخصات إشارات المخاطر: residential_proxy_reuse، وemail_intelligence، وphone_intelligence."
              },
              "reviewed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "reviewed_by": {
                "type": "string",
                "nullable": true
              },
              "review_reason": {
                "type": "string",
                "nullable": true
              }
            }
          }
        ],
        "properties": {
          "notes_count": {
            "type": "integer",
            "minimum": 0,
            "readOnly": true,
            "description": "عدد ملاحظات المحلل الخاصة في هذا التحقيق."
          }
        }
      },
      "NetworkGraphNode": {
        "type": "object",
        "description": "عقدة موضوع أو عقدة إشارة، تتميز حسب النوع. عقد الموضوع (النوع: vendor_user | vendor_business | transaction_party) تحمل id و kind و subject و node_status (approved | in_review | declined | not_completed) والوسوم. عقد الإشارة (النوع: signal) تحمل id و kind و uuid و signal_type و subject_count و coverage و is_hub و is_datacenter_ip و is_high_collision_device و node_status (signal_active | signal_guarded) والوسوم و risk_evidence و first_seen_at و last_seen_at.",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "vendor_user",
              "vendor_business",
              "transaction_party",
              "signal"
            ]
          }
        }
      },
      "NetworkGraphEdge": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string",
            "description": "معرّف العقدة للموضوع."
          },
          "target": {
            "type": "string",
            "description": "معرّف عقدة الإشارة."
          },
          "subject_kind": {
            "type": "string",
            "enum": [
              "vendor_user",
              "vendor_business",
              "transaction_party"
            ]
          },
          "signal_type": {
            "type": "string",
            "enum": [
              "ip_address",
              "device",
              "face",
              "document_number",
              "phone",
              "email",
              "address"
            ]
          },
          "confidence": {
            "type": "number",
            "format": "float",
            "description": "1.0 للتطابق التام."
          },
          "observation_count": {
            "type": "integer"
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "NetworkGraph": {
        "type": "object",
        "properties": {
          "network": {
            "$ref": "#/components/schemas/NetworkDetail"
          },
          "depth": {
            "type": "integer",
            "nullable": true,
            "description": "العمق الفعلي المطبق، أو null عندما يكون غير مقيد (depth=all)."
          },
          "truncated": {
            "type": "boolean",
            "description": "تكون القيمة True إذا تم اقتطاع الجوار بناءً على العمق."
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkGraphNode"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkGraphEdge"
            }
          },
          "metrics": {
            "type": "object",
            "properties": {
              "node_count": {
                "type": "integer"
              },
              "edge_count": {
                "type": "integer"
              },
              "hub_signal_count": {
                "type": "integer"
              }
            }
          }
        }
      },
      "NetworkMember": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "object",
            "description": "vendor_user أو vendor_business أو transaction_party الذي يمثله هذا العضو."
          },
          "outcome_status": {
            "type": "string",
            "description": "نتيجة التحقق/القرار الخاصة بالشخص المعني."
          },
          "node_status": {
            "type": "string",
            "enum": [
              "approved",
              "in_review",
              "declined",
              "not_completed",
              "signal_active",
              "signal_guarded"
            ],
            "description": "بالنسبة لصف العضو، يكون هذا دائماً إحدى قيم نتيجة الشخص: approved أو in_review أو declined أو not_completed."
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkNodeTag"
            }
          },
          "risk": {
            "$ref": "#/components/schemas/NetworkRiskDisplay"
          },
          "signal_coverage": {
            "type": "object"
          },
          "shared_infrastructure": {
            "type": "object"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "provenance": {
            "type": "object",
            "properties": {
              "session_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "business_session_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "transaction_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "NetworkSignal": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "signal_type": {
            "type": "string",
            "enum": [
              "ip_address",
              "device",
              "face",
              "document_number",
              "phone",
              "email",
              "address"
            ]
          },
          "subject_count": {
            "type": "integer"
          },
          "coverage": {
            "type": "number",
            "format": "float"
          },
          "is_hub": {
            "type": "boolean",
            "description": "تكون صحيحة عندما تربط هذه الإشارة عدداً كبيراً غير معتاد من الأطراف."
          },
          "is_datacenter_ip": {
            "type": "boolean"
          },
          "is_high_collision_device": {
            "type": "boolean"
          },
          "node_status": {
            "type": "string",
            "enum": [
              "signal_active",
              "signal_guarded"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkNodeTag"
            }
          },
          "risk_evidence": {
            "type": "object"
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "NetworkTimelineEvent": {
        "type": "object",
        "properties": {
          "event_type": {
            "type": "string",
            "description": "على سبيل المثال network_detected، وsignal_observed، وnetwork_in_review، وnetwork_resolved، وnetwork_dismissed."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "label": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          }
        }
      },
      "NetworkMap": {
        "type": "object",
        "properties": {
          "network": {
            "$ref": "#/components/schemas/NetworkDetail"
          },
          "convergence_count": {
            "type": "integer",
            "description": "عدد نقاط العناوين/المواقع المتميزة التي يلتقي عندها الأعضاء."
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "points": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "country": {
                  "type": "string",
                  "nullable": true
                },
                "country_code": {
                  "type": "string",
                  "nullable": true
                },
                "city": {
                  "type": "string",
                  "nullable": true
                },
                "latitude": {
                  "type": "number",
                  "format": "float",
                  "nullable": true
                },
                "longitude": {
                  "type": "number",
                  "format": "float",
                  "nullable": true
                },
                "observed_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "EntityNetworkMembership": {
        "type": "object",
        "properties": {
          "network": {
            "$ref": "#/components/schemas/NetworkListItem"
          },
          "subject": {
            "type": "object"
          },
          "signal_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ip_address",
                "device",
                "face",
                "document_number",
                "phone",
                "email",
                "address"
              ]
            }
          },
          "signal_count": {
            "type": "integer"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "RiskSignals": {
        "type": "object",
        "description": "سياق اختياري للجهاز والشبكة يرصده تطبيقك. جميع الحقول اختيارية. يغذي تمريرها ميزة كشف التطابق عبر الجلسات في Networks.",
        "properties": {
          "ip": {
            "type": "string",
            "format": "ip",
            "description": "عنوان IPv4 أو IPv6 الذي تم رصده للمستخدم النهائي.",
            "example": "192.0.2.1"
          },
          "device_id": {
            "type": "string",
            "maxLength": 255,
            "description": "معرّف جهاز ثابت يجمعه تطبيقك (Android `ANDROID_ID`، وiOS `identifierForVendor`)."
          },
          "device_platform": {
            "type": "string",
            "enum": [
              "android",
              "ios",
              "ipados",
              "tvos",
              "web"
            ],
            "description": "منصة جهاز المستخدم النهائي."
          },
          "device_model": {
            "type": "string",
            "maxLength": 255,
            "description": "طراز الجهاز الذي أبلغ عنه تطبيقك."
          },
          "os_version": {
            "type": "string",
            "maxLength": 64,
            "description": "إصدار نظام التشغيل."
          },
          "app_version": {
            "type": "string",
            "maxLength": 64,
            "description": "إصدار تطبيقك."
          },
          "user_agent": {
            "type": "string",
            "maxLength": 512,
            "description": "وكيل المستخدم (user agent) للمتصفح أو التطبيق."
          }
        }
      },
      "PhoneRiskRequest": {
        "type": "object",
        "required": [
          "phone_number"
        ],
        "properties": {
          "phone_number": {
            "type": "string",
            "maxLength": 20,
            "description": "رقم الهاتف المراد احتساب درجة مخاطره. يتم التحقق من صحته وضبطه بتنسيق E.164.",
            "example": "+14155552671"
          },
          "country_code": {
            "type": "string",
            "maxLength": 3,
            "description": "تلميح دولة اختياري وفق معيار ISO 3166-1 alpha-2 أو alpha-3 لتغطية البيانات الاستخباراتية.",
            "example": "US"
          },
          "signals": {
            "$ref": "#/components/schemas/RiskSignals"
          },
          "vendor_data": {
            "type": "string",
            "description": "مرجعك الثابت لهذا الطلب. يتم تخزينه في جلسة API وإعادته في الاستجابة."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "البيانات الوصفية بتنسيق JSON غير الحساسة الخاصة بك. يتم تخزينها في جلسة API وإعادتها في الاستجابة."
          },
          "enable_social": {
            "type": "boolean",
            "default": false,
            "description": "عند التعيين على true، يتم أيضاً البحث عن الأثر الرقمي الاجتماعي للرقم - منصات المراسلة والمنصات الاجتماعية والتجارة الإلكترونية والمهنية المسجل عليها. يُفوتر كوحدة `phone_social` واحدة لكل طلب بالإضافة إلى سعر هذا الـ endpoint نفسه.",
            "example": true
          }
        }
      },
      "EmailRiskRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "عنوان البريد الإلكتروني المراد احتساب درجة له.",
            "example": "alice@example.com"
          },
          "country_code": {
            "type": "string",
            "maxLength": 3,
            "description": "تلميح دولة اختياري وفق معيار ISO 3166-1 alpha-2 أو alpha-3 لتغطية البيانات الاستخباراتية.",
            "example": "US"
          },
          "signals": {
            "$ref": "#/components/schemas/RiskSignals"
          },
          "vendor_data": {
            "type": "string",
            "description": "مرجعك الثابت لهذا الطلب. يتم تخزينه في جلسة API وإعادته في الاستجابة."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "البيانات الوصفية بتنسيق JSON غير الحساسة الخاصة بك. يتم تخزينها في جلسة API وإعادتها في الاستجابة."
          },
          "enable_social": {
            "type": "boolean",
            "default": false,
            "description": "عند التعيين على true، يتم أيضاً البحث عن الأثر الرقمي الاجتماعي للعنوان - منصات البريد الإلكتروني والمنصات الاجتماعية والمهنية والتجارة الإلكترونية والترفيه المسجل عليها. يُفوتر كوحدة `email_social` واحدة لكل طلب بالإضافة إلى سعر هذا الـ endpoint نفسه.",
            "example": true
          }
        }
      },
      "IPRiskRequest": {
        "type": "object",
        "required": [
          "ip_address"
        ],
        "properties": {
          "ip_address": {
            "type": "string",
            "format": "ip",
            "description": "عنوان IPv4 أو IPv6 لاحتساب درجته.",
            "example": "8.8.8.8"
          },
          "claimed_country": {
            "type": "string",
            "maxLength": 3,
            "description": "دولة اختيارية وفق معيار ISO 3166-1 alpha-2 أو alpha-3 يدّعيها المستخدم أو الجلسة. تُستخدم لحساب `country_mismatch`.",
            "example": "ESP"
          },
          "user_agent": {
            "type": "string",
            "maxLength": 512,
            "description": "وكيل المستخدم الذي رصدته الواجهة الخلفية لديك. يتم تخزينه كسياق للطلب؛ ولا يوفر بصمة للجهاز."
          },
          "vendor_data": {
            "type": "string",
            "description": "مرجعك الثابت لهذا الطلب. يتم تخزينه في جلسة API وإعادته في الاستجابة."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "البيانات الوصفية بتنسيق JSON غير الحساسة الخاصة بك. يتم تخزينها في جلسة API وإعادتها في الاستجابة."
          }
        }
      },
      "RiskWarning": {
        "type": "object",
        "required": [
          "feature",
          "risk",
          "log_type",
          "short_description",
          "long_description"
        ],
        "properties": {
          "feature": {
            "type": "string",
            "description": "الميزة التي أطلقت التحذير."
          },
          "risk": {
            "type": "string",
            "description": "رمز مخاطر مقروء آلياً. يمكن إضافة قيم جديدة بمرور الوقت."
          },
          "additional_data": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "السياق الخاص بالمخاطر، أو `null`."
          },
          "log_type": {
            "type": "string",
            "enum": [
              "error",
              "warning",
              "information"
            ],
            "description": "مستوى الخطورة المستخدم في قواعد اتخاذ القرار."
          },
          "short_description": {
            "type": "string",
            "description": "ملخص في سطر واحد مقروء للبشر."
          },
          "long_description": {
            "type": "string",
            "description": "تفسير سهل القراءة."
          }
        }
      },
      "RiskLifecycleEvent": {
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "details",
          "fee"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "نوع الحدث المقروء آلياً. يمكن إضافة قيم جديدة بمرور الوقت."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "وقت وقوع الحدث."
          },
          "details": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "الـ payload الخاص بالحدث، أو `null`."
          },
          "fee": {
            "type": "number",
            "description": "المبلغ بالدولار الأمريكي المفوتر لهذا الحدث."
          }
        }
      },
      "PhoneMatchItem": {
        "type": "object",
        "description": "جلسة أخرى لتطبيقك استخدمت نفس رقم الهاتف مع `vendor_data` مختلف.",
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الجلسة لعملية التحقق الأخرى التي استخدمت رقم الهاتف هذا."
          },
          "session_number": {
            "type": "integer",
            "description": "رقم تسلسلي سهل القراءة لتلك الجلسة."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "`vendor_data` لتلك الجلسة."
          },
          "verification_date": {
            "type": "string",
            "description": "وقت إنشاء تلك الجلسة (`YYYY-MM-DDTHH:MM:SSZ`)."
          },
          "phone_number": {
            "type": "string",
            "description": "رقم الهاتف المتطابق."
          },
          "status": {
            "type": "string",
            "description": "حالة تلك الجلسة (مثل `Approved`، `Declined`، `In Progress`)."
          },
          "is_blocklisted": {
            "type": "boolean",
            "description": "ما إذا كان رقم الهاتف موجوداً في قائمة الحظر الخاصة بتطبيقك."
          },
          "api_service": {
            "type": "string",
            "nullable": true,
            "description": "بالنسبة للجلسات من نوع API، واجهة API المستقلة التي أنشأتها؛ و `null` لجلسات التحقق العادية."
          },
          "source": {
            "type": "string",
            "description": "مكان العثور على التطابق. عادةً ما يكون `session`؛ ويستخدم التطابق مع قائمة الحظر عبر إدخال في قائمة تابعة للمؤسسة القيمة `list_entry`."
          }
        }
      },
      "EmailMatchItem": {
        "type": "object",
        "description": "جلسة أخرى لتطبيقك استخدمت نفس عنوان البريد الإلكتروني مع `vendor_data` مختلف.",
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الجلسة لعملية التحقق الأخرى التي استخدمت عنوان البريد الإلكتروني هذا."
          },
          "session_number": {
            "type": "integer",
            "description": "رقم تسلسلي سهل القراءة لتلك الجلسة."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "`vendor_data` لتلك الجلسة."
          },
          "verification_date": {
            "type": "string",
            "description": "وقت إنشاء تلك الجلسة (`YYYY-MM-DDTHH:MM:SSZ`)."
          },
          "email": {
            "type": "string",
            "description": "عنوان البريد الإلكتروني المتطابق."
          },
          "status": {
            "type": "string",
            "description": "حالة تلك الجلسة (مثل `Approved`، `Declined`، `In Progress`)."
          },
          "is_blocklisted": {
            "type": "boolean",
            "description": "ما إذا كان عنوان البريد الإلكتروني موجوداً في قائمة الحظر الخاصة بتطبيقك."
          },
          "api_service": {
            "type": "string",
            "nullable": true,
            "description": "بالنسبة للجلسات من نوع API، واجهة API المستقلة التي أنشأتها؛ و `null` لجلسات التحقق العادية."
          },
          "source": {
            "type": "string",
            "description": "مكان العثور على التطابق. عادةً ما يكون `session`؛ ويستخدم التطابق مع قائمة الحظر عبر إدخال في قائمة تابعة للمؤسسة القيمة `list_entry`."
          }
        }
      },
      "PhoneIntelligence": {
        "type": "object",
        "description": "كتلة معلومات الهاتف المعيارية. تظهر فقط عند تشغيل الوظيفة الإضافية للمعلومات لعملية البحث هذه؛ وعند ظهورها يتم عرضها أيضاً تحت الاسم المستعار `enrichment` بنفس القيم.",
        "properties": {
          "score": {
            "type": "number",
            "nullable": true,
            "description": "درجة مخاطر معيارية من 0 إلى 100. تشير القيمة الأعلى إلى مخاطر أكبر."
          },
          "phone_type_risk": {
            "type": "string",
            "nullable": true,
            "description": "`Low` أو `Medium` أو `High`، مشتقة من الدرجة."
          },
          "phone_trust_index": {
            "type": "number",
            "nullable": true,
            "description": "معكوس الدرجة، للوحات التحكم التي تفضل أن تكون القيمة الأعلى هي الأفضل."
          },
          "network_stability_index": {
            "type": "number",
            "nullable": true,
            "description": "استقرار شبكة الخط."
          },
          "is_disposable": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون `true` عندما يبدو الرقم مخصصاً للاستخدام لمرة واحدة أو افتراضياً."
          },
          "is_ported": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون `true` عندما يكون الرقم قد غيّر مشغّل شبكة الجوال."
          },
          "is_recently_ported": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون `true` عندما تكون عملية نقل الرقم قد تمت مؤخراً."
          },
          "carrier_type": {
            "type": "string",
            "nullable": true,
            "description": "تصنيف الخط الوارد من البحث (مثل `mobile`)."
          },
          "reason_codes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "معرّف Didit الثابت للإشارة، على سبيل المثال `IR-5AC67A32`. غير قابل للتفسير: قم بالتجميع والتصفية بناءً عليه، ولا تقم بتحليله برمجياً."
                },
                "value": {
                  "nullable": true,
                  "description": "لعلامة المخاطر (على سبيل المثال `voip`، `leaked`، `disposable`، `spam_trap`)، قيمتها: قيمة منطقية أو مستوى أو تاريخ. Null لرمز سبب تم احتساب درجاته."
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "risk",
                    "trust"
                  ],
                  "description": "ما إذا كانت الإشارة قد رفعت مستوى المخاطر أو زادت من درجة الثقة."
                },
                "message": {
                  "type": "string",
                  "description": "تفسير سهل القراءة للإشارة، باللغة الإنجليزية."
                },
                "impact_level": {
                  "type": "string",
                  "nullable": true,
                  "description": "مدى تأثير الإشارة في تغيير الدرجة، على سبيل المثال `low` أو `medium` أو `high`."
                }
              }
            },
            "description": "الإشارات التي تفسر الدرجة، لكل منها رمز Didit ثابت، واتجاه، ورسالة، ومستوى تأثير. يمكن أن تظهر رموز جديدة بمرور الوقت، لذا لا ترفض الرموز غير المعروفة."
          }
        }
      },
      "EmailIntelligence": {
        "type": "object",
        "description": "كتلة معلومات البريد الإلكتروني المعيارية. تظهر فقط عند تشغيل الوظيفة الإضافية للمعلومات لهذا البريد الإلكتروني؛ وعند ظهورها يتم عرضها أيضاً بالاسم المستعار `enrichment` بنفس القيم.",
        "properties": {
          "score": {
            "type": "number",
            "nullable": true,
            "description": "درجة مخاطر معيارية من 0 إلى 100. تشير القيمة الأعلى إلى مخاطر أكبر."
          },
          "deliverable": {
            "type": "string",
            "nullable": true,
            "description": "نطاق قابلية التسليم (مثل `high`)."
          },
          "breach_risk_level": {
            "type": "string",
            "nullable": true,
            "description": "`Low` أو `Medium` أو `High`."
          },
          "breach_risk_index": {
            "type": "number",
            "nullable": true,
            "description": "مؤشر رقمي لمخاطر الاختراق."
          },
          "is_recent_breach": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة `true` عندما يظهر العنوان في اختراق أمني حديث."
          },
          "is_frequent_breached": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة `true` عندما يظهر العنوان في العديد من الاختراقات الأمنية."
          },
          "is_disposable": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون `true` عندما يكون النطاق مزود بريد للاستخدام مرة واحدة."
          },
          "is_free_domain": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون `true` عندما يكون النطاق مزود بريد إلكتروني مجاني."
          },
          "is_breached": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة `true` عندما يظهر العنوان في اختراقات أمنية معروفة."
          },
          "no_of_breaches": {
            "type": "number",
            "nullable": true,
            "description": "عدد الاختراقات المعروفة التي تحتوي على العنوان."
          },
          "reason_codes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "معرّف Didit الثابت للإشارة، على سبيل المثال `IR-5AC67A32`. غير قابل للتفسير: قم بالتجميع والتصفية بناءً عليه، ولا تقم بتحليله برمجياً."
                },
                "value": {
                  "nullable": true,
                  "description": "لعلامة المخاطر (على سبيل المثال `voip`، `leaked`، `disposable`، `spam_trap`)، قيمتها: قيمة منطقية أو مستوى أو تاريخ. Null لرمز سبب تم احتساب درجاته."
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "risk",
                    "trust"
                  ],
                  "description": "ما إذا كانت الإشارة قد رفعت مستوى المخاطر أو زادت من درجة الثقة."
                },
                "message": {
                  "type": "string",
                  "description": "تفسير سهل القراءة للإشارة، باللغة الإنجليزية."
                },
                "impact_level": {
                  "type": "string",
                  "nullable": true,
                  "description": "مدى تأثير الإشارة في تغيير الدرجة، على سبيل المثال `low` أو `medium` أو `high`."
                }
              }
            },
            "description": "الإشارات التي تفسر الدرجة، لكل منها رمز Didit ثابت، واتجاه، ورسالة، ومستوى تأثير. يمكن أن تظهر رموز جديدة بمرور الوقت، لذا لا ترفض الرموز غير المعروفة."
          }
        }
      },
      "IPRiskResult": {
        "type": "object",
        "description": "نتيجة مخاطر عنوان IP. قد تكون حقول الإثراء الفردية `null` عندما لا يُرجع البحث أي بيانات قابلة للاستخدام.",
        "required": [
          "status",
          "threat"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "Approved",
              "In Review"
            ],
            "description": "`In Review` عندما تتعارض الدولة المحددة مع `claimed_country`، أو عندما يرتبط العنوان ببنية تحتية لـ VPN أو Tor أو مراكز البيانات. وخلاف ذلك `Approved`."
          },
          "ip_address": {
            "type": "string",
            "nullable": true,
            "description": "العنوان الذي تم احتساب درجاته. `null` عندما لا يُرجع أي مصدر إثراء بيانات قابلة للاستخدام."
          },
          "ip_country": {
            "type": "string",
            "nullable": true,
            "description": "اسم الدولة المحدد."
          },
          "ip_country_code": {
            "type": "string",
            "nullable": true,
            "description": "رمز الدولة المحدد. قارن الدول من خلال `country_mismatch` بدلاً من مقارنة نصوص الدول الخام بنفسك."
          },
          "ip_state": {
            "type": "string",
            "nullable": true,
            "description": "الولاية أو المنطقة المحددة."
          },
          "ip_city": {
            "type": "string",
            "nullable": true,
            "description": "المدينة المحددة."
          },
          "latitude": {
            "type": "number",
            "nullable": true,
            "description": "موقع جغرافي تقريبي للشبكة، وليس موقعاً دقيقاً للجهاز."
          },
          "longitude": {
            "type": "number",
            "nullable": true,
            "description": "موقع جغرافي تقريبي للشبكة، وليس موقعاً دقيقاً للجهاز."
          },
          "isp": {
            "type": "string",
            "nullable": true,
            "description": "مزود خدمة الإنترنت الذي يخدم العنوان."
          },
          "organization": {
            "type": "string",
            "nullable": true,
            "description": "المؤسسة المالكة لنطاق العناوين."
          },
          "is_vpn_or_tor": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة `true` عندما يكون العنوان مرتبطاً ببنية تحتية لـ VPN أو Tor."
          },
          "is_data_center": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة `true` عندما ينتمي العنوان إلى شبكة استضافة أو مركز بيانات."
          },
          "time_zone": {
            "type": "string",
            "nullable": true,
            "description": "المنطقة الزمنية للموقع الجغرافي المحدد."
          },
          "time_zone_offset": {
            "type": "string",
            "nullable": true,
            "description": "إزاحة UTC للموقع المحدد."
          },
          "asn_number": {
            "type": "number",
            "nullable": true,
            "description": "رقم النظام المستقل."
          },
          "asn_organization": {
            "type": "string",
            "nullable": true,
            "description": "المؤسسة التي تشغّل النظام المستقل."
          },
          "connection_type": {
            "type": "string",
            "nullable": true,
            "description": "تصنيف الاتصال (مثل `cellular`، `hosting`)."
          },
          "carrier": {
            "type": "string",
            "nullable": true,
            "description": "مشغل شبكة الجوال عندما يكون العنوان على شبكة جوال."
          },
          "proxy_type": {
            "type": "string",
            "nullable": true,
            "description": "تصنيف البروكسي عندما يكون العنوان خلف بروكسي."
          },
          "claimed_country": {
            "type": "string",
            "nullable": true,
            "description": "نسخة مطابقة من `claimed_country` التي أرسلتها."
          },
          "country_mismatch": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون `true` عندما تختلف الدولة المحددة عن `claimed_country`. وتكون `null` عند عدم توفر بيانات إثراء أو عدم وجود دولة معلنة."
          },
          "threat": {
            "type": "object",
            "additionalProperties": true,
            "description": "أدلة تهديدات الشبكة بصيغة حرة من مصدر الإثراء (مثل `is_proxy` أو `is_tor`). يكون كائناً فارغاً عند عدم توفر بيانات إثراء. تعامل معها كتفاصيل تشخيصية وليست عقداً ثابتاً."
          }
        }
      },
      "PhoneRiskResponse": {
        "type": "object",
        "required": [
          "request_id",
          "status",
          "created_at"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف جلسة API التي تم إنشاؤها لهذا الطلب. احفظه مع `vendor_data` إذا كنت بحاجة إلى ربط النتيجة بـ webhooks اللاحقة أو نشاط لوحة التحكم."
          },
          "status": {
            "type": "string",
            "enum": [
              "Approved",
              "In Review",
              "Declined"
            ],
            "description": "القرار النهائي لجلسة API هذه. عادةً ما يكون `Approved`؛ يمكن أن ينتج عن تقييم المخاطر `In Review` أو `Declined`."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، وتكون `null` عند عدم إرسال أي منها."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "نسخة مطابقة من `metadata` التي أرسلتها، وتكون `null` عند عدم إرسال أي منها."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "الطابع الزمني لهذه الاستجابة."
          },
          "phone": {
            "type": "object",
            "description": "تقرير الهاتف المعياري، وهو نفس الكتلة المستخدمة في استجابات التحقق من رقم الهاتف.",
            "required": [
              "status"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "Approved",
                  "In Review",
                  "Declined"
                ],
                "description": "القرار لرقم الهاتف هذا. يعكس قيمة `status` في المستوى الأعلى."
              },
              "phone_number_prefix": {
                "type": "string",
                "description": "رمز الاتصال بالدولة مسبوقاً بـ `+` (مثل `+1`).",
                "example": "+1"
              },
              "phone_number": {
                "type": "string",
                "description": "الرقم الوطني بدون رمز الاتصال الدولي للدولة.",
                "example": "4155552671"
              },
              "full_number": {
                "type": "string",
                "description": "الرقم الكامل بتنسيق E.164.",
                "example": "+14155552671"
              },
              "country_code": {
                "type": "string",
                "nullable": true,
                "description": "دولة الرقم وفق المعيار ISO 3166-1 alpha-2.",
                "example": "US"
              },
              "country_name": {
                "type": "string",
                "description": "اسم الدولة الكامل المشتق من `country_code`.",
                "example": "United States"
              },
              "carrier": {
                "type": "object",
                "nullable": true,
                "description": "الشبكة الحالية التي تخدم الرقم. تكون `null` عندما يتعذر على البحث تحديد شركة الاتصالات.",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "اسم شركة الاتصالات. سلسلة نصية فارغة إذا لم يتمكن البحث من تحديدها."
                  },
                  "type": {
                    "type": "string",
                    "description": "نوع الخط الوارد من البحث: `mobile`، أو `fixed_line`، أو `voip`، أو `isp`، أو `vpn`، أو `toll_free`، أو `premium_rate`، وما شابه ذلك."
                  }
                }
              },
              "is_disposable": {
                "type": "boolean",
                "description": "تكون `true` عندما ينتمي الرقم إلى خدمة أرقام مؤقتة أو مخصصة للاستخدام لمرة واحدة."
              },
              "is_virtual": {
                "type": "boolean",
                "description": "تكون `true` عندما يكون نوع الخط افتراضيًا (`voip` أو `isp` أو `vpn`)."
              },
              "verification_method": {
                "type": "string",
                "nullable": true,
                "description": "قناة OTP لعملية التحقق الأساسية. تكون `null` لعمليات البحث عن المخاطر، والتي لا ترسل رمزاً أبداً."
              },
              "verification_attempts": {
                "type": "integer",
                "description": "عمليات إرسال رمز لمرة واحدة لهذا الرقم. `0` لعمليات البحث عن المخاطر."
              },
              "verified_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "متى تم التحقق من الرقم آخر مرة بواسطة OTP. وتكون `null` لعمليات البحث عن المخاطر."
              },
              "warnings": {
                "type": "array",
                "description": "تحذيرات المخاطر المسجلة لهذا الطلب. مصفوفة فارغة في حال عدم وجود أي منها.",
                "items": {
                  "$ref": "#/components/schemas/RiskWarning"
                }
              },
              "lifecycle": {
                "type": "array",
                "description": "سجل تدقيق زمني للطلب. مصفوفة فارغة لعمليات البحث عن المخاطر دون أحداث إرسال.",
                "items": {
                  "$ref": "#/components/schemas/RiskLifecycleEvent"
                }
              },
              "matches": {
                "type": "array",
                "description": "جلسات أخرى لتطبيقك حيث تم استخدام رقم الهاتف نفسه بواسطة مستخدم مختلف (`vendor_data` مختلفة). حتى 5 مدخلات. مصفوفة فارغة عند عدم وجود أي تطابقات.",
                "items": {
                  "$ref": "#/components/schemas/PhoneMatchItem"
                }
              },
              "phone_intelligence": {
                "$ref": "#/components/schemas/PhoneIntelligence"
              },
              "enrichment": {
                "$ref": "#/components/schemas/PhoneIntelligence"
              },
              "phone_social": {
                "$ref": "#/components/schemas/PhoneSocialFootprint"
              }
            }
          }
        }
      },
      "EmailRiskResponse": {
        "type": "object",
        "required": [
          "request_id",
          "status",
          "created_at"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف جلسة API التي تم إنشاؤها لهذا الطلب. احفظه مع `vendor_data` إذا كنت بحاجة إلى ربط النتيجة بـ webhooks اللاحقة أو نشاط لوحة التحكم."
          },
          "status": {
            "type": "string",
            "enum": [
              "Approved",
              "In Review",
              "Declined"
            ],
            "description": "القرار النهائي لجلسة API هذه. عادةً ما يكون `Approved`؛ يمكن أن ينتج عن تقييم المخاطر `In Review` أو `Declined`."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، وتكون `null` عند عدم إرسال أي منها."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "نسخة مطابقة من `metadata` التي أرسلتها، وتكون `null` عند عدم إرسال أي منها."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "الطابع الزمني لهذه الاستجابة."
          },
          "email": {
            "type": "object",
            "description": "تقرير البريد الإلكتروني المعياري، وهو نفس الكتلة المستخدمة في استجابات التحقق من البريد الإلكتروني.",
            "required": [
              "status",
              "email",
              "is_breached",
              "breaches",
              "is_disposable",
              "is_undeliverable"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "Approved",
                  "In Review",
                  "Declined"
                ],
                "description": "القرار لعنوان البريد الإلكتروني هذا. يعكس قيمة `status` في المستوى الأعلى."
              },
              "email": {
                "type": "string",
                "description": "العنوان الذي تم احتساب درجاته.",
                "example": "alice@example.com"
              },
              "is_breached": {
                "type": "boolean",
                "description": "ما إذا كان العنوان يظهر في اختراق معروف لبيانات الاعتماد."
              },
              "breaches": {
                "type": "array",
                "description": "ما يصل إلى أحدث 5 اختراقات معروفة تتضمن هذا العنوان. مصفوفة فارغة عندما تكون قيمة `is_breached` هي `false`.",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "معرّف الاختراق."
                    },
                    "domain": {
                      "type": "string",
                      "description": "نطاق الخدمة المخترقة."
                    },
                    "breach_date": {
                      "type": "string",
                      "format": "date",
                      "description": "تاريخ حدوث الانتهاك."
                    },
                    "breach_emails_count": {
                      "type": "integer",
                      "description": "العدد الإجمالي للحسابات التي كُشفت في الاختراق."
                    },
                    "description": {
                      "type": "string",
                      "description": "وصف سهل القراءة للخرق (قد يحتوي على ترميز HTML)."
                    },
                    "logo_path": {
                      "type": "string",
                      "description": "رابط URL لشعار الخدمة المخترقة."
                    },
                    "data_classes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "فئات البيانات المكشوفة، بتنسيق snake_case (مثل `email_addresses` و`passwords`)."
                    },
                    "is_verified": {
                      "type": "boolean",
                      "description": "ما إذا كان قد تم التحقق من صحة الاختراق."
                    }
                  }
                }
              },
              "is_disposable": {
                "type": "boolean",
                "description": "ما إذا كان النطاق ينتمي إلى مزود مؤقت."
              },
              "is_undeliverable": {
                "type": "boolean",
                "description": "ما إذا تبيّن تعذّر تسليم العنوان."
              },
              "verification_attempts": {
                "type": "integer",
                "description": "عمليات إرسال رمز لمرة واحدة لهذا العنوان. `0` لعمليات البحث عن المخاطر."
              },
              "verified_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت آخر تحقق من العنوان عبر رمز لمرة واحدة (OTP). تكون القيمة `null` لعمليات البحث عن المخاطر."
              },
              "warnings": {
                "type": "array",
                "description": "تحذيرات المخاطر المسجلة لهذا الطلب. مصفوفة فارغة في حال عدم وجود أي منها.",
                "items": {
                  "$ref": "#/components/schemas/RiskWarning"
                }
              },
              "lifecycle": {
                "type": "array",
                "description": "سجل تدقيق زمني للطلب. مصفوفة فارغة لعمليات البحث عن المخاطر دون عمليات إرسال.",
                "items": {
                  "$ref": "#/components/schemas/RiskLifecycleEvent"
                }
              },
              "matches": {
                "type": "array",
                "description": "جلسات أخرى لتطبيقك حيث تم استخدام عنوان البريد الإلكتروني نفسه بواسطة مستخدم مختلف (`vendor_data` مختلفة). حتى 5 مدخلات. مصفوفة فارغة عند عدم وجود أي تطابقات.",
                "items": {
                  "$ref": "#/components/schemas/EmailMatchItem"
                }
              },
              "email_intelligence": {
                "$ref": "#/components/schemas/EmailIntelligence"
              },
              "enrichment": {
                "$ref": "#/components/schemas/EmailIntelligence"
              },
              "email_social": {
                "$ref": "#/components/schemas/EmailSocialFootprint"
              }
            }
          }
        }
      },
      "IPRiskResponse": {
        "type": "object",
        "required": [
          "request_id",
          "status",
          "created_at"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف جلسة API التي تم إنشاؤها لهذا الطلب. احفظه مع `vendor_data` إذا كنت بحاجة إلى ربط النتيجة بـ webhooks اللاحقة أو نشاط لوحة التحكم."
          },
          "status": {
            "type": "string",
            "enum": [
              "Approved",
              "In Review"
            ],
            "description": "القرار لجلسة API هذه: `In Review` عند وجود مخاطر تتعلق بالشبكة أو عدم تطابق الدولة، وإلا فـ `Approved`."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "نسخة مطابقة من `vendor_data` التي أرسلتها، وتكون `null` عند عدم إرسال أي منها."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "نسخة مطابقة من `metadata` التي أرسلتها، وتكون `null` عند عدم إرسال أي منها."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "الطابع الزمني لهذه الاستجابة."
          },
          "ip": {
            "type": "object",
            "description": "نتيجة مخاطر عنوان IP. قد تكون حقول الإثراء الفردية `null` عندما لا يُرجع البحث أي بيانات قابلة للاستخدام.",
            "required": [
              "status",
              "threat"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "Approved",
                  "In Review"
                ],
                "description": "`In Review` عندما تتعارض الدولة المحددة مع `claimed_country`، أو عندما يرتبط العنوان ببنية تحتية لـ VPN أو Tor أو مراكز البيانات. وخلاف ذلك `Approved`."
              },
              "ip_address": {
                "type": "string",
                "nullable": true,
                "description": "العنوان الذي تم احتساب درجاته. `null` عندما لا يُرجع أي مصدر إثراء بيانات قابلة للاستخدام."
              },
              "ip_country": {
                "type": "string",
                "nullable": true,
                "description": "اسم الدولة المحدد."
              },
              "ip_country_code": {
                "type": "string",
                "nullable": true,
                "description": "رمز الدولة المحدد. قارن الدول من خلال `country_mismatch` بدلاً من مقارنة نصوص الدول الخام بنفسك."
              },
              "ip_state": {
                "type": "string",
                "nullable": true,
                "description": "الولاية أو المنطقة المحددة."
              },
              "ip_city": {
                "type": "string",
                "nullable": true,
                "description": "المدينة المحددة."
              },
              "latitude": {
                "type": "number",
                "nullable": true,
                "description": "موقع جغرافي تقريبي للشبكة، وليس موقعاً دقيقاً للجهاز."
              },
              "longitude": {
                "type": "number",
                "nullable": true,
                "description": "موقع جغرافي تقريبي للشبكة، وليس موقعاً دقيقاً للجهاز."
              },
              "isp": {
                "type": "string",
                "nullable": true,
                "description": "مزود خدمة الإنترنت الذي يخدم العنوان."
              },
              "organization": {
                "type": "string",
                "nullable": true,
                "description": "المؤسسة المالكة لنطاق العناوين."
              },
              "is_vpn_or_tor": {
                "type": "boolean",
                "nullable": true,
                "description": "تكون القيمة `true` عندما يكون العنوان مرتبطاً ببنية تحتية لـ VPN أو Tor."
              },
              "is_data_center": {
                "type": "boolean",
                "nullable": true,
                "description": "تكون القيمة `true` عندما ينتمي العنوان إلى شبكة استضافة أو مركز بيانات."
              },
              "time_zone": {
                "type": "string",
                "nullable": true,
                "description": "المنطقة الزمنية للموقع الجغرافي المحدد."
              },
              "time_zone_offset": {
                "type": "string",
                "nullable": true,
                "description": "إزاحة UTC للموقع المحدد."
              },
              "asn_number": {
                "type": "number",
                "nullable": true,
                "description": "رقم النظام المستقل."
              },
              "asn_organization": {
                "type": "string",
                "nullable": true,
                "description": "المؤسسة التي تشغّل النظام المستقل."
              },
              "connection_type": {
                "type": "string",
                "nullable": true,
                "description": "تصنيف الاتصال (مثل `cellular`، `hosting`)."
              },
              "carrier": {
                "type": "string",
                "nullable": true,
                "description": "مشغل شبكة الجوال عندما يكون العنوان على شبكة جوال."
              },
              "proxy_type": {
                "type": "string",
                "nullable": true,
                "description": "تصنيف البروكسي عندما يكون العنوان خلف بروكسي."
              },
              "claimed_country": {
                "type": "string",
                "nullable": true,
                "description": "نسخة مطابقة من `claimed_country` التي أرسلتها."
              },
              "country_mismatch": {
                "type": "boolean",
                "nullable": true,
                "description": "تكون `true` عندما تختلف الدولة المحددة عن `claimed_country`. وتكون `null` عند عدم توفر بيانات إثراء أو عدم وجود دولة معلنة."
              },
              "threat": {
                "type": "object",
                "additionalProperties": true,
                "description": "أدلة تهديدات الشبكة بصيغة حرة من مصدر الإثراء (مثل `is_proxy` أو `is_tor`). يكون كائناً فارغاً عند عدم توفر بيانات إثراء. تعامل معها كتفاصيل تشخيصية وليست عقداً ثابتاً."
              }
            }
          }
        }
      },
      "SocialFootprintPlatform": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "description": "معرّف المنصة.",
            "example": "whatsapp"
          },
          "category": {
            "type": "string",
            "description": "فئة المنصة، مثل MESSAGING أو SOCIAL_MEDIA أو ECOMMERCE أو PROFESSIONAL أو EMAIL_PROVIDER.",
            "example": "MESSAGING"
          },
          "scope": {
            "type": "string",
            "enum": [
              "global",
              "local"
            ],
            "description": "`global` للمنصات العالمية، و`local` للمنصات الخاصة بمنطقة معينة.",
            "example": "global"
          }
        }
      },
      "SocialFootprintCategorySummary": {
        "type": "object",
        "properties": {
          "registered": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات في هذه الفئة التي تم تأكيد التسجيل فيها.",
            "example": 2
          },
          "ratio": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "حصة المنصات المفحوصة في الفئة التي تحتوي على تسجيل، 0.0-1.0.",
            "example": 0.6667
          }
        }
      },
      "SocialFootprintProfile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "description": "اسم الملف التعريفي، إذا وفرته المنصة."
          },
          "photo": {
            "type": "string",
            "nullable": true,
            "description": "رابط الصورة الشخصية للملف التعريفي، إذا وفرته المنصة."
          },
          "about": {
            "type": "string",
            "nullable": true,
            "description": "نص النبذة التعريفية للملف التعريفي، إذا وفرته المنصة."
          },
          "privacy_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "PUBLIC",
              "PRIVATE",
              null
            ],
            "description": "مستوى رؤية الملف التعريفي، إذا وفرته المنصة."
          },
          "business_account": {
            "type": "boolean",
            "nullable": true,
            "description": "ما إذا كان الملف الشخصي حساب شركة، عندما تكشفه المنصة."
          }
        }
      },
      "PhoneSocialFootprint": {
        "type": "object",
        "nullable": true,
        "description": "البصمة الاجتماعية لرقم الهاتف: المنصات الإلكترونية المسجل عليها. تظهر فقط عند تعيين `enable_social` واكتمال الفحص. قد يكون كل عدد null عندما لا يتم إرجاع أي بيانات له. تعني `profiles_registered: 0` أنه تم فحص المنصات ولم يتم العثور على رقم الهاتف في أي منها - وهي إجابة صالحة وخاضعة للفوترة وإشارة شائعة للهوية الاصطناعية.",
        "properties": {
          "profiles_registered": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات التي تم تأكيد تسجيل رقم الهاتف فيها.",
            "example": 5
          },
          "profiles_checked": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات التي تم تقييمها للتسجيل.",
            "example": 14
          },
          "names_found": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات التي أرجعت اسماً مرتبطاً.",
            "example": 0
          },
          "photos_found": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات التي أرجعت صورة للملف الشخصي.",
            "example": 0
          },
          "communication_breadth": {
            "type": "integer",
            "nullable": true,
            "description": "منصات التواصل التي تم اكتشاف وجود المستخدم فيها.",
            "example": 2
          },
          "digital_footprint_diversity": {
            "type": "integer",
            "nullable": true,
            "description": "فئات منصات مميزة مع تواجد تم اكتشافه.",
            "example": 5
          },
          "digital_sophistication_index": {
            "type": "integer",
            "nullable": true,
            "description": "مؤشر النضج الرقمي المركب، من 0 إلى 10.",
            "example": 5
          },
          "engagement_depth_index": {
            "type": "integer",
            "nullable": true,
            "description": "مؤشر ثراء الملف التعريفي، من 0 إلى 10.",
            "example": 3
          },
          "subscription_affordability_index": {
            "type": "integer",
            "nullable": true,
            "description": "مزيج المنصات المجانية مقابل المدفوعة، من 0 إلى 10.",
            "example": 2
          },
          "free_platforms": {
            "type": "integer",
            "nullable": true,
            "description": "التسجيلات على المنصات المجانية.",
            "example": 4
          },
          "full_paid_platforms": {
            "type": "integer",
            "nullable": true,
            "description": "التسجيلات على المنصات المدفوعة بالكامل.",
            "example": 0
          },
          "partial_paid_platforms": {
            "type": "integer",
            "nullable": true,
            "description": "التسجيلات على المنصات المجانية جزئيًا.",
            "example": 1
          },
          "whatsapp_profile_completeness": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Basic",
              "Partial",
              "Complete",
              "Not Present",
              null
            ],
            "description": "مدى اكتمال الملف التعريفي على WhatsApp. للهاتف فقط؛ وتكون القيمة فارغة (null) للبريد الإلكتروني.",
            "example": "Partial"
          },
          "registered_platforms": {
            "type": "array",
            "description": "المنصات التي تم تأكيد التسجيل فيها.",
            "items": {
              "$ref": "#/components/schemas/SocialFootprintPlatform"
            }
          },
          "not_registered_platforms": {
            "type": "array",
            "description": "المنصات التي تم فحصها وكانت النتيجة سلبية.",
            "items": {
              "$ref": "#/components/schemas/SocialFootprintPlatform"
            }
          },
          "categories": {
            "type": "object",
            "description": "عدد التسجيلات ونسبتها حسب فئة المنصة.",
            "additionalProperties": {
              "$ref": "#/components/schemas/SocialFootprintCategorySummary"
            }
          },
          "profiles": {
            "type": "object",
            "description": "تفاصيل الملف التعريفي لكل منصة، مفهرسة بحسب المنصة، عندما توفرها المنصة.",
            "additionalProperties": {
              "$ref": "#/components/schemas/SocialFootprintProfile"
            }
          }
        }
      },
      "EmailSocialFootprint": {
        "type": "object",
        "nullable": true,
        "description": "البصمة الاجتماعية لعنوان البريد الإلكتروني: المنصات الإلكترونية المسجل عليها. تظهر فقط عند تعيين `enable_social` واكتمال الفحص. قد يكون كل عدد null عندما لا يتم إرجاع أي بيانات له. تعني `profiles_registered: 0` أنه تم فحص المنصات ولم يتم العثور على عنوان البريد الإلكتروني في أي منها - وهي إجابة صالحة وخاضعة للفوترة وإشارة شائعة للهوية الاصطناعية.",
        "properties": {
          "profiles_registered": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات التي تم تأكيد تسجيل عنوان البريد الإلكتروني فيها.",
            "example": 5
          },
          "profiles_checked": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات التي تم تقييمها للتسجيل.",
            "example": 14
          },
          "names_found": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات التي أرجعت اسماً مرتبطاً.",
            "example": 0
          },
          "photos_found": {
            "type": "integer",
            "nullable": true,
            "description": "المنصات التي أرجعت صورة للملف الشخصي.",
            "example": 0
          },
          "communication_breadth": {
            "type": "integer",
            "nullable": true,
            "description": "منصات التواصل التي تم اكتشاف وجود المستخدم فيها.",
            "example": 2
          },
          "digital_footprint_diversity": {
            "type": "integer",
            "nullable": true,
            "description": "فئات منصات مميزة مع تواجد تم اكتشافه.",
            "example": 5
          },
          "digital_sophistication_index": {
            "type": "integer",
            "nullable": true,
            "description": "مؤشر النضج الرقمي المركب، من 0 إلى 10.",
            "example": 5
          },
          "engagement_depth_index": {
            "type": "integer",
            "nullable": true,
            "description": "مؤشر ثراء الملف التعريفي، من 0 إلى 10.",
            "example": 3
          },
          "subscription_affordability_index": {
            "type": "integer",
            "nullable": true,
            "description": "مزيج المنصات المجانية مقابل المدفوعة، من 0 إلى 10.",
            "example": 2
          },
          "free_platforms": {
            "type": "integer",
            "nullable": true,
            "description": "التسجيلات على المنصات المجانية.",
            "example": 4
          },
          "full_paid_platforms": {
            "type": "integer",
            "nullable": true,
            "description": "التسجيلات على المنصات المدفوعة بالكامل.",
            "example": 0
          },
          "partial_paid_platforms": {
            "type": "integer",
            "nullable": true,
            "description": "التسجيلات على المنصات المجانية جزئيًا.",
            "example": 1
          },
          "whatsapp_profile_completeness": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Basic",
              "Partial",
              "Complete",
              "Not Present",
              null
            ],
            "description": "مدى اكتمال الملف التعريفي على WhatsApp. للهاتف فقط؛ وتكون القيمة فارغة (null) للبريد الإلكتروني.",
            "example": "Partial"
          },
          "registered_platforms": {
            "type": "array",
            "description": "المنصات التي تم تأكيد التسجيل فيها.",
            "items": {
              "$ref": "#/components/schemas/SocialFootprintPlatform"
            }
          },
          "not_registered_platforms": {
            "type": "array",
            "description": "المنصات التي تم فحصها وكانت النتيجة سلبية.",
            "items": {
              "$ref": "#/components/schemas/SocialFootprintPlatform"
            }
          },
          "categories": {
            "type": "object",
            "description": "عدد التسجيلات ونسبتها حسب فئة المنصة.",
            "additionalProperties": {
              "$ref": "#/components/schemas/SocialFootprintCategorySummary"
            }
          },
          "profiles": {
            "type": "object",
            "description": "تفاصيل الملف التعريفي لكل منصة، مفهرسة بحسب المنصة، عندما توفرها المنصة.",
            "additionalProperties": {
              "$ref": "#/components/schemas/SocialFootprintProfile"
            }
          }
        }
      },
      "KYBRegistryAddress": {
        "type": "object",
        "description": "عنوان يحدده السجل، بنفس الهيكل لكل دولة ومصدر سجل. كل مفتاح موجود دائماً؛ وأي جزء لا ينشره السجل يكون null.",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true,
            "description": "نوع العنوان بأحرف صغيرة: `registered` للمقر المسجل؛ وأنواع أخرى كما يسميها السجل (على سبيل المثال `postal`، `office`). يكون `null` عندما لا يحدد السجل ماهية العنوان."
          },
          "address": {
            "type": "string",
            "description": "العنوان الكامل في سطر واحد. موجود دائماً في كل عنوان."
          },
          "street": {
            "type": "string",
            "nullable": true,
            "description": "الشارع والرقم."
          },
          "city": {
            "type": "string",
            "nullable": true,
            "description": "المدينة أو المنطقة."
          },
          "postal_code": {
            "type": "string",
            "nullable": true,
            "description": "الرمز البريدي."
          },
          "region": {
            "type": "string",
            "nullable": true,
            "description": "المنطقة أو الولاية أو المقاطعة."
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "التسمية الخاصة بسجل الشركات للعنوان، إن وُجدت."
          }
        },
        "required": [
          "type",
          "address",
          "street",
          "city",
          "postal_code",
          "region",
          "country_code",
          "description"
        ]
      },
      "KYBRegistryIndustry": {
        "type": "object",
        "description": "نشاط تُصنّف الجهة المسؤولة عن السجل الشركة ضمنه، بنفس الهيكل لكل دولة ومصدر سجل.",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true,
            "description": "رمز النشاط كما يطبعه السجل (على سبيل المثال `73110`)."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "تسمية النشاط، عندما ينشرها السجل."
          },
          "scheme": {
            "type": "string",
            "nullable": true,
            "description": "نظام التصنيف، اسم واحد لكل نظام بغض النظر عن المصدر الذي أبلغ عنه: `UK SIC 2007`، و`US SIC`، و`NACE Rev. 2`، و`NACE Rev. 2.1`، و`NAF Rev. 2`، و`CNAE`، و`SBI`، و`NOGA 2008`، و`CAE Rev. 4`، و`Canada SIC 1977`؛ تحتفظ الأنظمة الوطنية الأخرى باسم السجل نفسه. تكون القيمة فارغة Null عندما لا يحدد السجل اسم النظام."
          },
          "is_primary": {
            "type": "boolean",
            "description": "تكون القيمة True للنشاط الرئيسي للشركة. هناك مدخل أساسي واحد بالضبط عندما لا تكون القائمة فارغة."
          }
        },
        "required": [
          "code",
          "description",
          "scheme",
          "is_primary"
        ]
      },
      "KYBRegistryShareholding": {
        "type": "object",
        "nullable": true,
        "description": "ما يمتلكه المالك، بنفس الهيكل لكل دولة ومصدر سجل. يكون null عندما لا يذكر السجل أي حصة. النطاق (على سبيل المثال 25-50% لـ UK PSC) لا يُعد حصة: يكون `percentage` بقيمة null ويظل النطاق في `ownership_min_shares` / `ownership_max_shares`.",
        "properties": {
          "share_class": {
            "type": "string",
            "nullable": true,
            "description": "فئة السهم أو نوعه كما يسميه السجل."
          },
          "number_of_shares": {
            "type": "number",
            "nullable": true,
            "description": "عدد الأسهم المملوكة."
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "عملة القيم الموضحة أدناه حسب معيار ISO 4217."
          },
          "nominal_value": {
            "type": "number",
            "nullable": true,
            "description": "القيمة الاسمية لكل سهم."
          },
          "total_value": {
            "type": "number",
            "nullable": true,
            "description": "القيمة الإجمالية للحيازة."
          },
          "percentage": {
            "type": "number",
            "nullable": true,
            "description": "الحصة الدقيقة بالنسبة المئوية، حتى أربع منازل عشرية."
          }
        },
        "required": [
          "share_class",
          "number_of_shares",
          "currency",
          "nominal_value",
          "total_value",
          "percentage"
        ]
      },
      "KYBRegistryOwnership": {
        "type": "object",
        "description": "نتيجة مستوى الملكية (المساهمون / UBO)، بالهيكل نفسه لكل دولة ومصدر سجل.",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "not_requested",
              "pending",
              "delivered",
              "not_held",
              "unavailable",
              null
            ],
            "description": "`delivered` عندما ينشر السجل بيانات الملكية؛ و`not_held` عندما يستجيب سجل الملكية ولا يدرج الشركة على الإطلاق (راجع `unavailable_reason`)؛ و`unavailable` عندما لا يقدّم بيانات الملكية لأي سبب آخر (راجع `unavailable_reason`)؛ و`pending` بينما لا يزال السجل يجلبها؛ و`not_requested` للمستوى Basic."
          },
          "tier_requested": {
            "type": "string",
            "nullable": true,
            "enum": [
              "basic",
              "shareholders",
              "ubo",
              null
            ],
            "description": "المستوى الذي طلبه سير العمل."
          },
          "tier_delivered": {
            "type": "string",
            "nullable": true,
            "enum": [
              "basic",
              "shareholders",
              "ubo",
              null
            ],
            "description": "المستوى الذي سلّمه السجل (والذي تتم فوترته). طلب UBO الذي يُجاب عنه بالمساهمين المباشرين فقط يكون `shareholders`."
          },
          "unavailable_reason": {
            "type": "string",
            "nullable": true,
            "enum": [
              "no_owners_on_record",
              "no_natural_person_owner",
              "ownership_section_unavailable",
              "company_not_found",
              "ambiguous_company_match",
              "missing_registration_number",
              "entity_type_not_covered",
              "provider_unavailable",
              "other",
              null
            ],
            "description": "سبب عدم تسليم مستوى الملكية المطلوب. يكون فارغاً ما لم تكن `status` هي `unavailable` أو `pending`."
          },
          "direct_ownership_complete": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة True عندما يصل مجموع الحصص المعلنة للمساهمين المباشرين إلى 100% (مع فارق نقطة مئوية واحدة للتقريب)؛ وتكون False إذا لم يكن كذلك؛ وتكون null إذا لم يتم تقديم بيانات الملكية أو لم يتم تحديد الحصة."
          },
          "unresolved": {
            "type": "array",
            "description": "أجزاء سلسلة الملكية التي تعذر على سجل الشركات تسويتها، مثل عدم وجود هيكل مجموعة مسجل فوق المالكين المباشرين.",
            "items": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string"
                },
                "section": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          }
        },
        "required": [
          "status",
          "tier_requested",
          "tier_delivered",
          "unavailable_reason",
          "direct_ownership_complete",
          "unresolved"
        ]
      },
      "KYBRegistryData": {
        "type": "object",
        "nullable": true,
        "description": "تفاصيل السجل الموحدة معيارياً من Didit للشركة: نتيجة الملكية (`ownership_error` و`section_errors` و`ubo_resolution` و`lite_enrichment`)، والتصحيحات التي أُجريت باستخدام update-data، وحقائق السجل التي ليس لها حقل خاص بها. لا يحمل أبداً السجل الخاص بمصدر السجل نفسه. كل مفتاح اختياري ولا يظهر إلا عندما يكون للشركة قيمة له؛ قد تُضاف مفاتيح جديدة. اقرأ الحقول القياسية (`addresses` و`industries` و`ownership` و`beneficial_owners[].shareholding`) لأي شيء تغطيه.",
        "properties": {
          "company_name": {
            "type": "string",
            "description": "اسم الشركة كما تم تصحيحه في لوحة التحكم."
          },
          "registration_number": {
            "type": "string",
            "description": "رقم التسجيل كما يذكره السجل أو تصحيح لوحة التحكم."
          },
          "country_code": {
            "type": "string",
            "description": "دولة التسجيل كما يوضحها سجل الشركات أو تصحيح من لوحة التحكم."
          },
          "region": {
            "type": "string",
            "description": "منطقة أو ولاية التسجيل."
          },
          "incorporation_date": {
            "type": "string",
            "description": "تاريخ التأسيس (ISO 8601)."
          },
          "registration_date": {
            "type": "string",
            "description": "تاريخ التسجيل (ISO 8601) عندما يذكر السجل تاريخاً منفصلاً عن تاريخ التأسيس."
          },
          "dissolution_date": {
            "type": "string",
            "description": "تاريخ الحل (ISO 8601) عندما ينص عليه السجل."
          },
          "tax_number": {
            "type": "string",
            "description": "الرقم الضريبي."
          },
          "vat_number": {
            "type": "string",
            "description": "رقم ضريبة القيمة المضافة (VAT)."
          },
          "legal_address": {
            "type": "string",
            "description": "العنوان القانوني كما تم تصحيحه في لوحة التحكم."
          },
          "registered_address": {
            "type": "string",
            "description": "العنوان المسجل كما هو مذكور في السجل."
          },
          "company_type": {
            "type": "string",
            "description": "الشكل القانوني."
          },
          "registry_status": {
            "type": "string",
            "description": "حالة الشركة في السجل."
          },
          "verification_status": {
            "type": "string",
            "description": "حالة التحقق."
          },
          "alternative_names": {
            "type": "string",
            "description": "الأسماء الأخرى التي تتداول أو تداولت الشركة تحتها."
          },
          "nature_of_business": {
            "type": "string",
            "description": "وصف النشاط."
          },
          "registered_capital": {
            "type": "string",
            "description": "رأس المال المسجل كما هو مطبوع."
          },
          "registered_capital_amount": {
            "type": "string",
            "description": "مبلغ رأس المال المسجل، كسلسلة عشرية."
          },
          "registered_capital_currency": {
            "type": "string",
            "description": "عملة رأس المال المسجل (ISO 4217)."
          },
          "website": {
            "type": "string",
            "description": "الموقع الإلكتروني."
          },
          "email": {
            "type": "string",
            "description": "البريد الإلكتروني لجهة الاتصال."
          },
          "phone": {
            "type": "string",
            "description": "هاتف التواصل."
          },
          "legal_entity_identifier": {
            "type": "string",
            "description": "معرّف الكيان القانوني (LEI)."
          },
          "location_of_registration": {
            "type": "string",
            "description": "مكان التسجيل."
          },
          "control_scheme": {
            "type": "string",
            "description": "نظام الحوكمة عندما يوفره سجل الشركات."
          },
          "ownership_error": {
            "type": "string",
            "enum": [
              "no_owners_on_record",
              "no_natural_person_owner",
              "ownership_section_unavailable",
              "company_not_found",
              "ambiguous_company_match",
              "missing_registration_number",
              "entity_type_not_covered",
              "provider_unavailable",
              "other"
            ],
            "description": "سبب عدم تسليم مستوى الملكية المطلوب، بنفس رموز `ownership.unavailable_reason`. يُعد `no_owners_on_record` (أجاب السجل ولم يُسمِّ أي مالك) و`ownership_section_unavailable` (لم يُرجع السجل قسم الملكية) نتيجتين مختلفتين."
          },
          "section_errors": {
            "type": "object",
            "description": "الأقسام التي لم يُرجعها السجل، مفهرسة حسب القسم (`officers` و`shareholders` و`group_structure`). أي قسم مدرج هنا لم يتم تسليمه أبداً: ولا تعني القائمة الفارغة بجانبه أي شيء عن الشركة.",
            "additionalProperties": {
              "$ref": "#/components/schemas/KYBRegistrySectionError"
            }
          },
          "ubo_resolution": {
            "$ref": "#/components/schemas/KYBRegistryUboResolution"
          },
          "lite_enrichment": {
            "$ref": "#/components/schemas/KYBRegistryLiteEnrichment"
          },
          "registry_metadata": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "description": "حقول السجل الخاصة بالشركة، مفهرسة حسب تسميات السجل لها، كقيم بسيطة (سجلات قديمة). لا يتم تضمين سوى الحقول التي تمت مراجعتها كحقائق من السجل."
          },
          "registry_sources": {
            "type": "array",
            "description": "السجلات الرسمية التي تمت قراءة السجل منها (السجلات القديمة). لا يتم ذكر المصادر الأخرى بالاسم.",
            "items": {
              "$ref": "#/components/schemas/KYBRegistrySource"
            }
          },
          "previous_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "الأسماء التي كانت الشركة مسجلة بها سابقاً (السجلات السابقة)."
          },
          "parent_companies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "الشركات الأم التي يسميها السجل (السجلات السابقة)."
          },
          "documents_available": {
            "type": "integer",
            "description": "عدد الإيداعات التي يقدمها السجل للشركة (السجلات القديمة)."
          }
        }
      },
      "KYBRegistryGroupCompany": {
        "type": "object",
        "description": "شركة ضمن مجموعة الشركات، وفقاً لهويتها في السجل.",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "description": "اسم الشركة."
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "description": "دولة التسجيل."
          },
          "registration_number": {
            "type": "string",
            "nullable": true,
            "description": "رقم التسجيل."
          }
        },
        "required": [
          "name",
          "country_code",
          "registration_number"
        ]
      },
      "KYBRegistryUboResolution": {
        "type": "object",
        "description": "كيفية تتبع مستوى UBO لسلسلة الملكية فوق الشركة.",
        "properties": {
          "parent_chain": {
            "type": "array",
            "description": "الشركات الأم للشركة بدءاً من الشركة الأم النهائية ووصولاً إلى الشركة.",
            "items": {
              "$ref": "#/components/schemas/KYBRegistryGroupCompany"
            }
          },
          "subsidiaries": {
            "type": "array",
            "description": "الشركات التابعة مباشرة للشركة ضمن مجموعتها المؤسسية.",
            "items": {
              "$ref": "#/components/schemas/KYBRegistryGroupCompany"
            }
          },
          "unresolved": {
            "type": "array",
            "description": "أجزاء السلسلة التي تعذر على سجل الشركات تسويتها (نفس مدخلات `ownership.unresolved`).",
            "items": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string",
                  "description": "السبب، على سبيل المثال `no_group_structure_on_record` أو `selected_company_not_in_group_structure` أو `section_error`."
                },
                "section": {
                  "type": "string",
                  "nullable": true,
                  "description": "القسم المعني، على سبيل المثال `group_structure`."
                }
              },
              "required": [
                "reason",
                "section"
              ]
            }
          }
        },
        "required": [
          "parent_chain",
          "subsidiaries",
          "unresolved"
        ]
      },
      "KYBRegistrySectionError": {
        "type": "object",
        "description": "قسم لم يُرجعه السجل.",
        "properties": {
          "status_code": {
            "type": "integer",
            "nullable": true,
            "description": "الحالة التي رد بها السجل للقسم."
          }
        },
        "required": [
          "status_code"
        ]
      },
      "KYBRegistryLiteEnrichment": {
        "type": "object",
        "description": "حقول الملف الشخصي Lite الفارغة التي ملأها مصدر آخر من مصادر سجلات الدولة. لا يُذكر اسم المصدر.",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "حقول الشركة التي تمت تعبئتها."
          },
          "people_added": {
            "type": "integer",
            "description": "عدد المسؤولين أو المالكين الذين تمت إضافتهم."
          }
        },
        "required": [
          "fields",
          "people_added"
        ]
      },
      "KYBRegistrySource": {
        "type": "object",
        "description": "سجل رسمي قُرئت منه البيانات. لا يتم ذكر سوى السجلات الحكومية الرسمية والجهات التنظيمية ونظام المعرّفات الرسمي؛ ويتم استبعاد أي مصدر آخر.",
        "properties": {
          "name": {
            "type": "string",
            "description": "اسم السجل، على سبيل المثال `UK Companies House`."
          },
          "source_type": {
            "type": "string",
            "enum": [
              "official"
            ],
            "description": "دائماً `official`."
          }
        },
        "required": [
          "name",
          "source_type"
        ]
      },
      "KYBOwnershipStructure": {
        "type": "object",
        "nullable": true,
        "description": "جدول رأس المال الذي أثبته السجل، كما كان عند تسليم مستوى الملكية: `shareholders` و`beneficial_owners` المباشرون. يكون فارغاً عندما لا يثبت السجل أي ملكية. ولا يتضمن أبداً صفوف مصدر السجل نفسه؛ اقرأ `company.beneficial_owners` و`company.ownership` للاطلاع على السجل الحالي.",
        "properties": {
          "shareholders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KYBOwnershipStructureOwner"
            }
          },
          "beneficial_owners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KYBOwnershipStructureOwner"
            }
          }
        },
        "required": [
          "shareholders",
          "beneficial_owners"
        ]
      },
      "KYBOwnershipStructureOwner": {
        "type": "object",
        "description": "مالك واحد في لقطة الملكية: نفس هوية السجل والحصة كما في `company.beneficial_owners[]`، وحصته الأساسية `shareholding`.",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "description": "اسم المالك كما هو مذكور في السجل."
          },
          "first_name": {
            "type": "string",
            "nullable": true,
            "description": "الاسم الشخصي، للشخص الطبيعي، عندما يذكره سجل الشركات."
          },
          "last_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم العائلة للشخص الطبيعي، عندما يذكره السجل."
          },
          "date_of_birth": {
            "type": "string",
            "nullable": true,
            "description": "تاريخ الميلاد (ISO 8601) عندما ينشره السجل."
          },
          "country_of_birth": {
            "type": "string",
            "nullable": true,
            "description": "دولة الميلاد عندما ينشرها سجل الشركات."
          },
          "company_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم الشركة، لمالك مؤسسي."
          },
          "registration_number": {
            "type": "string",
            "nullable": true,
            "description": "رقم التسجيل، للمالك الاعتباري (الشركة)."
          },
          "entity_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "person",
              "company",
              null
            ],
            "description": "ما إذا كان المالك شخصاً طبيعياً أو شركة."
          },
          "nationality": {
            "type": "string",
            "nullable": true,
            "description": "الجنسية عندما يذكرها سجل الشركات."
          },
          "designation": {
            "type": "string",
            "nullable": true,
            "description": "المسمى الوظيفي أو الدور الخاص بالمالك كما هو مطبوع في السجل."
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`shareholder` للمساهم المباشر، و`ubo` للمستفيد الحقيقي."
          },
          "ownership_min_shares": {
            "type": "string",
            "nullable": true,
            "description": "الحد الأدنى للحصة، كنسبة مئوية (يساوي الحد الأعلى لحصة محددة بدقة)."
          },
          "ownership_max_shares": {
            "type": "string",
            "nullable": true,
            "description": "الحد الأعلى للحصة، بالنسبة المئوية."
          },
          "voting_min_shares": {
            "type": "string",
            "nullable": true,
            "description": "الحد الأدنى لحقوق التصويت، كنسبة مئوية."
          },
          "voting_max_shares": {
            "type": "string",
            "nullable": true,
            "description": "الحد الأعلى لحقوق التصويت، بالنسبة المئوية."
          },
          "appointment_date": {
            "type": "string",
            "nullable": true,
            "description": "تاريخ بدء الملكية أو التعيين (ISO 8601)."
          },
          "is_active": {
            "type": "boolean",
            "nullable": true,
            "description": "القيمة False لمالك سابق."
          },
          "shareholding": {
            "$ref": "#/components/schemas/KYBRegistryShareholding"
          }
        },
        "required": [
          "name",
          "first_name",
          "last_name",
          "date_of_birth",
          "country_of_birth",
          "company_name",
          "registration_number",
          "entity_type",
          "nationality",
          "designation",
          "roles",
          "ownership_min_shares",
          "ownership_max_shares",
          "voting_min_shares",
          "voting_max_shares",
          "appointment_date",
          "is_active",
          "shareholding"
        ]
      },
      "DigitalIdWalletApiWalletVerificationError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "رمز ثابت قابل للقراءة آلياً، مثل wallet_unavailable."
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail",
          "error"
        ]
      },
      "DigitalIdWalletApiWalletVerificationStartForbidden": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage"
          },
          {
            "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
          }
        ]
      },
      "DigitalIdWalletApiClientCredentialsForbiddenErrorMessage": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "default": "Forbidden - User doesn't have permission"
          }
        }
      },
      "DigitalIdWalletApiWalletVerificationStartBadRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError"
          },
          {
            "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationFieldErrors"
          }
        ]
      },
      "DigitalIdWalletApiWalletVerificationFieldErrors": {
        "type": "object",
        "description": "أخطاء التحقق من صحة الطلب: كل حقل مرفوض مع رسائله.",
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "DigitalIdWalletApiWalletVerificationResponse": {
        "type": "object",
        "description": "عملية تحقق مستقلة واحدة من المحفظة، كما تُجيب عنها كل endpoint للمحفظة.",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "wallet_verification": {
            "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResult"
          },
          "vendor_data": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن البيانات الوصفية المرسل في البداية، أو null."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "created_at",
          "metadata",
          "request_id",
          "vendor_data",
          "wallet_verification"
        ]
      },
      "DigitalIdWalletApiWalletVerificationResult": {
        "type": "object",
        "properties": {
          "wallet": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiWallet"
              }
            ],
            "readOnly": true
          },
          "country": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "غير منتهية أثناء الانتظار، ثم تصبح مقبولة (تم التحقق منها) أو مرفوضة."
          },
          "outcome": {
            "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResultOutcomeEnum"
          },
          "error": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "interaction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiInteractionEnum"
              }
            ],
            "readOnly": true
          },
          "simulated": {
            "type": "boolean",
            "readOnly": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "next_action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiWalletNextAction"
              }
            ],
            "nullable": true,
            "readOnly": true
          },
          "identity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiWalletIdentity"
              }
            ],
            "nullable": true,
            "readOnly": true
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "readOnly": true
          },
          "level_of_assurance": {
            "type": "string",
            "nullable": true
          },
          "verified_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "signature_valid": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة True بمجرد التحقق من توقيع بيانات الاعتماد؛ وتكون null لبيانات الاعتماد المحاكاة."
          },
          "credential_type": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "attributes",
          "country",
          "credential_type",
          "error",
          "expires_at",
          "identity",
          "interaction",
          "level_of_assurance",
          "next_action",
          "outcome",
          "signature_valid",
          "simulated",
          "status",
          "verified_at",
          "wallet"
        ]
      },
      "DigitalIdWalletApiWalletIdentity": {
        "type": "object",
        "properties": {
          "full_name": {
            "type": "string",
            "nullable": true
          },
          "first_name": {
            "type": "string",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "nullable": true
          },
          "date_of_birth": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nationality": {
            "type": "string",
            "nullable": true,
            "description": "الجنسية بتنسيق ISO3، فقط عندما تؤكدها المحفظة (لا يتم استنتاجها أبداً)."
          },
          "issuing_state": {
            "type": "string",
            "description": "الدولة بتنسيق ISO3 التي أصدر مخططها الهوية."
          }
        },
        "required": [
          "date_of_birth",
          "first_name",
          "full_name",
          "issuing_state",
          "last_name",
          "nationality"
        ]
      },
      "DigitalIdWalletApiWalletNextAction": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiWalletNextActionTypeEnum"
              }
            ],
            "description": "redirect: إرسال متصفح المستخدم إلى url. confirm_in_app: إظهار verification_code للمستخدم، ليتحقق من مطابقته للرمز في تطبيق محفظته ويؤكد من هناك؛ ثم إجراء استقصاء دوري. request_digital_credential: عبر إجراء من المستخدم على المصدر (origin) الذي بدأت منه، اطلب من المحفظة باستخدام digital_credentials.request، ثم أرسل النتيجة المستلمة إلى POST .../verifications/{request_id}/response/.\n\n* `redirect` - redirect\n* `confirm_in_app` - confirm_in_app\n* `request_digital_credential` - request_digital_credential"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "لحالة redirect فقط: حيث يسجل المستخدم الدخول باستخدام المحفظة."
          },
          "digital_credentials": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiWalletDigitalCredentialsRequest"
              }
            ],
            "description": "لحالة request_digital_credential فقط: الطلب الذي يتم تسليمه إلى المحفظة."
          },
          "verification_code": {
            "type": "string",
            "description": "لـ confirm_in_app فقط: رمز المقارنة المكون من 4 أرقام والذي يعرضه تطبيق المحفظة أيضاً."
          },
          "poll_interval_seconds": {
            "type": "integer",
            "description": "لـ confirm_in_app فقط: معدل استدعاء POST .../verifications/{request_id}/poll/ للحصول على استجابة فورية. تُجري Didit أيضاً استطلاعاً لعمليات تسجيل الدخول المعلقة في الخلفية، لذلك يبلّغ الـ webhook عن النتيجة حتى لو لم تقم بالاستطلاع."
          }
        },
        "required": [
          "type"
        ]
      },
      "DigitalIdWalletApiWalletNextActionTypeEnum": {
        "enum": [
          "redirect",
          "confirm_in_app",
          "request_digital_credential"
        ],
        "type": "string",
        "description": "* `redirect` - redirect\n* `confirm_in_app` - confirm_in_app\n* `request_digital_credential` - request_digital_credential"
      },
      "DigitalIdWalletApiInteractionEnum": {
        "enum": [
          "redirect",
          "in_app",
          "digital_credentials"
        ],
        "type": "string",
        "description": "* `redirect` - redirect\n* `in_app` - in_app\n* `digital_credentials` - digital_credentials"
      },
      "DigitalIdWalletApiWalletVerificationResultOutcomeEnum": {
        "enum": [
          "pending",
          "verified",
          "cancelled",
          "timeout",
          "failed"
        ],
        "type": "string",
        "description": "* `pending` - قيد الانتظار\n* `verified` - تم التحقق\n* `cancelled` - ألغاها المستخدم\n* `timeout` - انتهت المهلة\n* `failed` - فشلت"
      },
      "DigitalIdWalletApiWallet": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "معرّف الدليل للمحفظة، مثل bankid_se."
          },
          "name": {
            "type": "string"
          },
          "issuing_authority": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "issuing_authority",
          "name"
        ]
      },
      "DigitalIdWalletApiEudiWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر EUDI Wallet (AUT, BEL, BGR, HRV, CYP, CZE, DNK, EST, FIN, FRA, DEU, GRC, HUN, IRL, ITA, LVA, LTU, LUX, MLT, NLD, POL, PRT, ROU, SVK, SVN, ESP, SWE, ISL, LIE, NOR).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiEudiWalletVerificationStartCountryEnum"
              }
            ],
            "description": "دولة هوية EUDI Wallet وفق المعيار ISO 3166-1 alpha-3.\n\n* `AUT` - AUT\n* `BEL` - BEL\n* `BGR` - BGR\n* `HRV` - HRV\n* `CYP` - CYP\n* `CZE` - CZE\n* `DNK` - DNK\n* `EST` - EST\n* `FIN` - FIN\n* `FRA` - FRA\n* `DEU` - DEU\n* `GRC` - GRC\n* `HUN` - HUN\n* `IRL` - IRL\n* `ITA` - ITA\n* `LVA` - LVA\n* `LTU` - LTU\n* `LUX` - LUX\n* `MLT` - MLT\n* `NLD` - NLD\n* `POL` - POL\n* `PRT` - PRT\n* `ROU` - ROU\n* `SVK` - SVK\n* `SVN` - SVN\n* `ESP` - ESP\n* `SWE` - SWE\n* `ISL` - ISL\n* `LIE` - LIE\n* `NOR` - NOR"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "country",
          "return_url"
        ]
      },
      "DigitalIdWalletApiDeviceEnum": {
        "enum": [
          "same_device",
          "cross_device"
        ],
        "type": "string",
        "description": "* `same_device` - same_device\n* `cross_device` - cross_device"
      },
      "DigitalIdWalletApiEudiWalletVerificationStartCountryEnum": {
        "enum": [
          "AUT",
          "BEL",
          "BGR",
          "HRV",
          "CYP",
          "CZE",
          "DNK",
          "EST",
          "FIN",
          "FRA",
          "DEU",
          "GRC",
          "HUN",
          "IRL",
          "ITA",
          "LVA",
          "LTU",
          "LUX",
          "MLT",
          "NLD",
          "POL",
          "PRT",
          "ROU",
          "SVK",
          "SVN",
          "ESP",
          "SWE",
          "ISL",
          "LIE",
          "NOR"
        ],
        "type": "string",
        "description": "* `AUT` - AUT\n* `BEL` - BEL\n* `BGR` - BGR\n* `HRV` - HRV\n* `CYP` - CYP\n* `CZE` - CZE\n* `DNK` - DNK\n* `EST` - EST\n* `FIN` - FIN\n* `FRA` - FRA\n* `DEU` - DEU\n* `GRC` - GRC\n* `HUN` - HUN\n* `IRL` - IRL\n* `ITA` - ITA\n* `LVA` - LVA\n* `LTU` - LTU\n* `LUX` - LUX\n* `MLT` - MLT\n* `NLD` - NLD\n* `POL` - POL\n* `PRT` - PRT\n* `ROU` - ROU\n* `SVK` - SVK\n* `SVN` - SVN\n* `ESP` - ESP\n* `SWE` - SWE\n* `ISL` - ISL\n* `LIE` - LIE\n* `NOR` - NOR"
      },
      "DigitalIdWalletApiConnectidWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر ConnectID (AUS).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiConnectidWalletVerificationStartCountryEnum"
              }
            ],
            "default": "AUS",
            "description": "دولة هوية ConnectID وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي AUS، وهي الدولة الوحيدة التي تخدمها.\n\n* `AUS` - AUS"
          },
          "authorisation_server_id": {
            "type": "string",
            "minLength": 1,
            "description": "معرّف خادم التفويض المحدد باستخدام أداة اختيار البنك الخاصة بـ ConnectID. يتم التعيين افتراضياً في البيئة التجريبية إلى Mock Bank A.",
            "maxLength": 36
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiConnectidWalletVerificationStartCountryEnum": {
        "enum": [
          "AUS"
        ],
        "type": "string",
        "description": "* `AUS` - AUS"
      },
      "DigitalIdWalletApiAudkenniWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء التحقق عبر Auðkenni (ISL).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiAudkenniWalletVerificationStartCountryEnum"
              }
            ],
            "default": "ISL",
            "description": "دولة هوية Auðkenni وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي ISL، وهي الدولة الوحيدة التي تخدمها.\n\n* `ISL` - ISL"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiAudkenniWalletVerificationStartCountryEnum": {
        "enum": [
          "ISL"
        ],
        "type": "string",
        "description": "* `ISL` - ISL"
      },
      "DigitalIdWalletApiFranceconnectWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر FranceConnect (FRA).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiFranceconnectWalletVerificationStartCountryEnum"
              }
            ],
            "default": "FRA",
            "description": "دولة هوية FranceConnect وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي FRA، وهي الدولة الوحيدة التي تخدمها.\n\n* `FRA` - FRA"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiFranceconnectWalletVerificationStartCountryEnum": {
        "enum": [
          "FRA"
        ],
        "type": "string",
        "description": "* `FRA` - FRA"
      },
      "DigitalIdWalletApiDiiaWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر Diia (UKR).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDiiaWalletVerificationStartCountryEnum"
              }
            ],
            "default": "UKR",
            "description": "دولة هوية Diia وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي UKR، وهي الدولة الوحيدة التي تخدمها.\n\n* `UKR` - UKR"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiDiiaWalletVerificationStartCountryEnum": {
        "enum": [
          "UKR"
        ],
        "type": "string",
        "description": "* `UKR` - UKR"
      },
      "DigitalIdWalletApiMojeidWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء التحقق عبر MojeID (CZE).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountryE2dEnum"
              }
            ],
            "default": "CZE",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية MojeID. القيمة الافتراضية هي CZE، وهي الدولة الوحيدة التي تخدمها.\n\n* `CZE` - CZE"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiCountryE2dEnum": {
        "enum": [
          "CZE"
        ],
        "type": "string",
        "description": "* `CZE` - CZE"
      },
      "DigitalIdWalletApiBankidCzWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر Bank iD (CZE).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountryE2dEnum"
              }
            ],
            "default": "CZE",
            "description": "دولة هوية Bank iD وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي CZE، وهي الدولة الوحيدة التي تخدمها.\n\n* `CZE` - CZE"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء التحقق عبر eParaksts mobile (LVA).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiEparakstsMobileWalletVerificationStartCountryEnum"
              }
            ],
            "default": "LVA",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية eParaksts mobile. القيمة الافتراضية هي LVA، وهي الدولة الوحيدة التي تخدمها.\n\n* `LVA` - LVA"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiEparakstsMobileWalletVerificationStartCountryEnum": {
        "enum": [
          "LVA"
        ],
        "type": "string",
        "description": "* `LVA` - LVA"
      },
      "DigitalIdWalletApiIdcardEeWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر Estonian ID-card (EST).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiIdcardEeWalletVerificationStartCountryEnum"
              }
            ],
            "default": "EST",
            "description": "دولة هوية Estonian ID-card وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي EST، وهي الدولة الوحيدة التي تخدمها.\n\n* `EST` - EST"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiIdcardEeWalletVerificationStartCountryEnum": {
        "enum": [
          "EST"
        ],
        "type": "string",
        "description": "* `EST` - EST"
      },
      "DigitalIdWalletApiMobileIdWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر Mobile-ID (EST، LTU).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiMobileIdWalletVerificationStartCountryEnum"
              }
            ],
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية Mobile-ID.\n\n* `EST` - EST\n* `LTU` - LTU"
          },
          "personal_code": {
            "type": "string",
            "minLength": 1,
            "description": "رمز التعريف الشخصي الوطني للمستخدم. يُوجَّه إلى تطبيق Mobile-ID الخاص بالمستخدم؛ ويؤكد المستخدم رمز المقارنة ويدخل رمز PIN الخاص به في التطبيق. لا تقم بجمع رمز PIN على الإطلاق.",
            "pattern": "^[0-9-]{6,20}$"
          },
          "phone_number": {
            "type": "string",
            "minLength": 1,
            "description": "رقم هاتف Mobile-ID بتنسيق E.164 (+372... أو +370...).",
            "maxLength": 16
          }
        },
        "required": [
          "country",
          "personal_code",
          "phone_number"
        ]
      },
      "DigitalIdWalletApiMobileIdWalletVerificationStartCountryEnum": {
        "enum": [
          "EST",
          "LTU"
        ],
        "type": "string",
        "description": "* `EST` - EST\n* `LTU` - LTU"
      },
      "DigitalIdWalletApiSmartIdWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء التحقق عبر Smart-ID (EST، LVA، LTU، BEL).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiSmartIdWalletVerificationStartCountryEnum"
              }
            ],
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية Smart-ID.\n\n* `EST` - EST\n* `LVA` - LVA\n* `LTU` - LTU\n* `BEL` - BEL"
          },
          "personal_code": {
            "type": "string",
            "minLength": 1,
            "description": "رمز التعريف الشخصي الوطني للمستخدم. يُوجَّه إلى تطبيق Smart-ID الخاص بالمستخدم؛ ويؤكد المستخدم رمز المقارنة ويدخل رمز PIN الخاص به في التطبيق. لا تقم بجمع رمز PIN على الإطلاق.",
            "pattern": "^[0-9-]{6,20}$"
          }
        },
        "required": [
          "country",
          "personal_code"
        ]
      },
      "DigitalIdWalletApiSmartIdWalletVerificationStartCountryEnum": {
        "enum": [
          "EST",
          "LVA",
          "LTU",
          "BEL"
        ],
        "type": "string",
        "description": "* `EST` - EST\n* `LVA` - LVA\n* `LTU` - LTU\n* `BEL` - BEL"
      },
      "DigitalIdWalletApiGovukWalletWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر GOV.UK Wallet (GBR).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountry520Enum"
              }
            ],
            "default": "GBR",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية GOV.UK Wallet. القيمة الافتراضية هي GBR، وهي الدولة الوحيدة التي تخدمها.\n\n* `GBR` - GBR"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiCountry520Enum": {
        "enum": [
          "GBR"
        ],
        "type": "string",
        "description": "* `GBR` - GBR"
      },
      "DigitalIdWalletApiOneidWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء التحقق عبر OneID (GBR).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountry520Enum"
              }
            ],
            "default": "GBR",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية OneID. القيمة الافتراضية هي GBR، وهي الدولة الوحيدة التي تخدمها.\n\n* `GBR` - GBR"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiGovbrWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر gov.br (BRA).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum"
              }
            ],
            "default": "BRA",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية gov.br. القيمة الافتراضية هي BRA، وهي الدولة الوحيدة التي تخدمها.\n\n* `BRA` - BRA"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum": {
        "enum": [
          "BRA"
        ],
        "type": "string",
        "description": "* `BRA` - BRA"
      },
      "DigitalIdWalletApiUaePassWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء التحقق عبر UAE PASS (ARE).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum"
              }
            ],
            "default": "ARE",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية UAE PASS. القيمة الافتراضية هي ARE، وهي الدولة الوحيدة التي تخدمها.\n\n* `ARE` - ARE"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum": {
        "enum": [
          "ARE"
        ],
        "type": "string",
        "description": "* `ARE` - ARE"
      },
      "DigitalIdWalletApiFrejaidWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر Freja eID (SWE).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountryEe9Enum"
              }
            ],
            "default": "SWE",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية Freja eID. القيمة الافتراضية هي SWE، وهي الدولة الوحيدة التي تخدمها.\n\n* `SWE` - SWE"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiCountryEe9Enum": {
        "enum": [
          "SWE"
        ],
        "type": "string",
        "description": "* `SWE` - SWE"
      },
      "DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء التحقق عبر Personalausweis (DEU).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiPersonalausweisWalletVerificationStartCountryEnum"
              }
            ],
            "default": "DEU",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية Personalausweis. القيمة الافتراضية هي DEU، وهي الدولة الوحيدة التي تخدمها.\n\n* `DEU` - DEU"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiPersonalausweisWalletVerificationStartCountryEnum": {
        "enum": [
          "DEU"
        ],
        "type": "string",
        "description": "* `DEU` - DEU"
      },
      "DigitalIdWalletApiFtnWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر Finnish Trust Network (FIN).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiFtnWalletVerificationStartCountryEnum"
              }
            ],
            "default": "FIN",
            "description": "دولة هوية Finnish Trust Network وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي FIN، وهي الدولة الوحيدة التي تخدمها.\n\n* `FIN` - FIN"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiFtnWalletVerificationStartCountryEnum": {
        "enum": [
          "FIN"
        ],
        "type": "string",
        "description": "* `FIN` - FIN"
      },
      "DigitalIdWalletApiIdinWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر iDIN (NLD).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiIdinWalletVerificationStartCountryEnum"
              }
            ],
            "default": "NLD",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية iDIN. القيمة الافتراضية هي NLD، وهي الدولة الوحيدة التي تخدمها.\n\n* `NLD` - NLD"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiIdinWalletVerificationStartCountryEnum": {
        "enum": [
          "NLD"
        ],
        "type": "string",
        "description": "* `NLD` - NLD"
      },
      "DigitalIdWalletApiItsmeWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر itsme (BEL، LUX، NLD).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiItsmeWalletVerificationStartCountryEnum"
              }
            ],
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية itsme.\n\n* `BEL` - BEL\n* `LUX` - LUX\n* `NLD` - NLD"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "country",
          "return_url"
        ]
      },
      "DigitalIdWalletApiItsmeWalletVerificationStartCountryEnum": {
        "enum": [
          "BEL",
          "LUX",
          "NLD"
        ],
        "type": "string",
        "description": "* `BEL` - BEL\n* `LUX` - LUX\n* `NLD` - NLD"
      },
      "DigitalIdWalletApiBuypassWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر Buypass ID (NOR).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountryAfcEnum"
              }
            ],
            "default": "NOR",
            "description": "دولة هوية Buypass ID وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي NOR، وهي الدولة الوحيدة التي تخدمها.\n\n* `NOR` - NOR"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiCountryAfcEnum": {
        "enum": [
          "NOR"
        ],
        "type": "string",
        "description": "* `NOR` - NOR"
      },
      "DigitalIdWalletApiVippsWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء التحقق عبر Vipps (NOR).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountryAfcEnum"
              }
            ],
            "default": "NOR",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية Vipps. القيمة الافتراضية هي NOR، وهي الدولة الوحيدة التي تخدمها.\n\n* `NOR` - NOR"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiBankidNoWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر BankID (NOR).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountryAfcEnum"
              }
            ],
            "default": "NOR",
            "description": "دولة هوية BankID وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي NOR، وهي الدولة الوحيدة التي تخدمها.\n\n* `NOR` - NOR"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiBankidSeWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر BankID (SWE).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiCountryEe9Enum"
              }
            ],
            "default": "SWE",
            "description": "دولة هوية BankID وفق المعيار ISO 3166-1 alpha-3. القيمة الافتراضية هي SWE، وهي الدولة الوحيدة التي تخدمها.\n\n* `SWE` - SWE"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiMitidWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر MitID (DNK).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiMitidWalletVerificationStartCountryEnum"
              }
            ],
            "default": "DNK",
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية MitID. القيمة الافتراضية هي DNK، وهي الدولة الوحيدة التي تخدمها.\n\n* `DNK` - DNK"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "description": "عنوان URL بصيغة https يعود إليه متصفح المستخدم بعد المحفظة، مع إلحاق request_id وresult. يجب أن يكون المضيف مسجلاً في allowed_return_hosts للتطبيق (أو يكون نطاق العلامة البيضاء الخاص به). لا تعتمد أبداً على result بمفردها: اقرأ النتيجة عبر GET .../verifications/{request_id}/ أو webhook.",
            "maxLength": 2048
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiDeviceEnum"
              }
            ],
            "default": "same_device",
            "description": "القيمة same_device عندما يسجل المستخدم الدخول على الجهاز الذي يعرض صفحتك، وcross_device عندما يستخدم جهازاً آخر (مثل رمز QR الخاص بـ BankID).\n\n* `same_device` - same_device\n* `cross_device` - cross_device"
          }
        },
        "required": [
          "return_url"
        ]
      },
      "DigitalIdWalletApiMitidWalletVerificationStartCountryEnum": {
        "enum": [
          "DNK"
        ],
        "type": "string",
        "description": "* `DNK` - DNK"
      },
      "DigitalIdWalletApiWalletCatalogResponse": {
        "type": "object",
        "properties": {
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DigitalIdWalletApiWalletCatalogEntry"
            }
          }
        },
        "required": [
          "wallets"
        ]
      },
      "DigitalIdWalletApiWalletCatalogEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string",
            "description": "endpoint البدء الخاص بالمحفظة نفسها."
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "issuing_authority": {
            "type": "string"
          },
          "level_of_assurance": {
            "type": "string",
            "nullable": true
          },
          "interaction": {
            "$ref": "#/components/schemas/DigitalIdWalletApiInteractionEnum"
          },
          "required_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "available": {
            "type": "boolean",
            "description": "ما إذا كان بإمكان هذا التطبيق بدء تشغيله في هذه البيئة الآن. كونه مدرجاً لا يعني أنه في بيئة الإنتاج."
          }
        },
        "required": [
          "available",
          "countries",
          "id",
          "interaction",
          "issuing_authority",
          "level_of_assurance",
          "name",
          "path",
          "required_fields"
        ]
      },
      "CaseDuplicateCaseDuplicate": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "case_number": {
            "type": "string",
            "nullable": true,
            "maxLength": 32
          },
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "status": {
            "$ref": "#/components/schemas/CaseDuplicateStatusEnum"
          },
          "priority": {
            "$ref": "#/components/schemas/CaseDuplicatePriorityEnum"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_at",
          "title",
          "uuid"
        ]
      },
      "CaseDuplicateCaseDuplicatePage": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "next_offset": {
            "type": "integer",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseDuplicateCaseDuplicate"
            }
          }
        },
        "required": [
          "count",
          "next_offset",
          "results"
        ]
      },
      "RoutingPublicationPolicyDraftResponse": {
        "type": "object",
        "properties": {
          "draft": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RoutingPublicationPolicyDraft"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "draft"
        ]
      },
      "RoutingPublicationPolicyDraftWriteRequest": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "expected_revision": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "changes": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "changes",
          "expected_revision",
          "expected_version"
        ]
      },
      "CasePublicationPolicyDraft": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "string",
            "format": "uuid"
          },
          "base_version": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "changes": {},
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "maxLength": 254
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "base_version",
          "updated_at"
        ]
      },
      "CasePublicationPolicyDraftPreconditionRequest": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "expected_revision": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "required": [
          "expected_revision",
          "expected_version"
        ]
      },
      "CaseCollaborationCaseNote": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "comment": {
            "type": "string"
          },
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "maxLength": 255
          },
          "actor_name": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "mentioned_emails": {},
          "is_internal": {
            "type": "boolean"
          },
          "attachments": {},
          "tags": {},
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "reply_to": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseCollaborationCaseNoteReply"
              }
            ],
            "nullable": true,
            "readOnly": true
          },
          "is_pinned": {
            "type": "boolean"
          },
          "client_reference": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "required": [
          "comment",
          "created_at",
          "reply_to",
          "uuid"
        ]
      },
      "CustomerMessagingPaginatedCaseRequestList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerMessagingCaseRequest"
            }
          }
        }
      },
      "FraudCheckResponse": {
        "type": "object",
        "properties": {
          "check_id": {
            "type": "string",
            "format": "uuid"
          },
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "جلسة تحقق أصلية تم إنشاؤها لهذا الفحص."
          },
          "client_reference": {
            "type": "string",
            "nullable": true
          },
          "processing_status": {
            "$ref": "#/components/schemas/FraudProcessingStatusEnum"
          },
          "profile_id": {
            "type": "string"
          },
          "profile_version": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FraudCheckInput"
            }
          },
          "modules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FraudCheckModuleReport"
            }
          },
          "attribute_evidence": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "compound_evidence": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "risk": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FraudCheckRisk"
            }
          },
          "network": {
            "type": "object",
            "additionalProperties": {}
          },
          "enrichment": {
            "type": "object",
            "additionalProperties": {}
          },
          "identity_relationship": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FraudCheckIdentityRelationship"
              }
            ],
            "nullable": true
          },
          "recommendation": {
            "$ref": "#/components/schemas/FraudRecommendationEnum"
          },
          "next_action": {
            "$ref": "#/components/schemas/FraudNextActionEnum"
          },
          "decision_reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coverage": {
            "type": "object",
            "additionalProperties": {}
          },
          "usage": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "vendor_data": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "nullable": true
          }
        },
        "required": [
          "attribute_evidence",
          "check_id",
          "client_reference",
          "completed_at",
          "compound_evidence",
          "coverage",
          "created_at",
          "decision_reasons",
          "inputs",
          "modules",
          "network",
          "next_action",
          "processing_status",
          "profile_id",
          "profile_version",
          "recommendation",
          "risk",
          "usage"
        ]
      },
      "CaseReviewTeam": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseReviewTeamMember"
            },
            "maxItems": 250
          },
          "is_active": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "CaseActionCaseEntityActionRequest": {
        "type": "object",
        "properties": {
          "client_reference": {
            "type": "string",
            "format": "uuid"
          },
          "retry": {
            "type": "boolean",
            "default": false
          },
          "action": {
            "$ref": "#/components/schemas/CaseActionActionEnum"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "action"
        ]
      },
      "RoutingPublicationPaginatedPolicyRevisionList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutingPublicationPolicyRevision"
            }
          }
        }
      },
      "FraudRecommendationEnum": {
        "enum": [
          "approve",
          "review",
          "reject"
        ],
        "type": "string",
        "description": "* `approve` - موافقة\n* `review` - مراجعة\n* `reject` - رفض"
      },
      "CustomerMessagingCaseRequestPreviewResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "recipient": {
            "type": "string",
            "format": "email"
          },
          "sender": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "html": {
            "type": "string"
          },
          "requires_user_action": {
            "type": "boolean"
          },
          "preview_token": {
            "type": "string"
          }
        },
        "required": [
          "expires_at",
          "html",
          "preview_token",
          "recipient",
          "request_id",
          "requires_user_action",
          "sender",
          "subject"
        ]
      },
      "CustomerMessagingCaseCustomerResponseRequest": {
        "type": "object",
        "properties": {
          "full_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "date_of_birth": {
            "type": "string",
            "format": "date"
          },
          "file": {
            "type": "string",
            "format": "binary",
            "writeOnly": true
          }
        }
      },
      "CaseCollaborationCaseNoteReply": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "actor_name": {
            "type": "string",
            "nullable": true
          },
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "maxLength": 300
          }
        },
        "required": [
          "actor_email",
          "actor_name",
          "comment",
          "uuid"
        ]
      },
      "FraudCheckModuleReport": {
        "type": "object",
        "properties": {
          "module": {
            "$ref": "#/components/schemas/FraudExcludeEnum"
          },
          "status": {
            "$ref": "#/components/schemas/FraudStatusEnum"
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "latency_ms": {
            "type": "integer"
          },
          "freshness": {
            "type": "string",
            "nullable": true
          },
          "billable_units": {
            "type": "integer"
          }
        },
        "required": [
          "billable_units",
          "freshness",
          "latency_ms",
          "module",
          "reason",
          "status"
        ]
      },
      "CaseDuplicateEntityTypeEnum": {
        "enum": [
          "session",
          "business_session",
          "transaction"
        ],
        "type": "string",
        "description": "* `session` - الجلسة\n* `business_session` - جلسة الشركة\n* `transaction` - المعاملة"
      },
      "FraudClientCredentialsErrorMessage": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "default": "Authentication failed: Invalid client access token."
          }
        }
      },
      "FraudAvailabilityEnum": {
        "enum": [
          "available",
          "not_requested",
          "no_reference",
          "insufficient_history",
          "unsupported_region",
          "source_unavailable"
        ],
        "type": "string",
        "description": "* `available` - متاح\n* `not_requested` - لم يُطلب\n* `no_reference` - لا يوجد مرجع\n* `insufficient_history` - سجل غير كافٍ\n* `unsupported_region` - منطقة غير مدعومة\n* `source_unavailable` - المصدر غير متاح"
      },
      "CasePublicationPolicyDraftResponse": {
        "type": "object",
        "properties": {
          "draft": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CasePublicationPolicyDraft"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "draft"
        ]
      },
      "FraudCheckAttributesRequest": {
        "type": "object",
        "description": "سمات مؤيدة. جميعها اختيارية؛ وهي تزيد من نطاق تغطية الوحدة.",
        "properties": {
          "first_name": {
            "type": "string",
            "maxLength": 128
          },
          "last_name": {
            "type": "string",
            "maxLength": 128
          },
          "full_name": {
            "type": "string",
            "maxLength": 256
          },
          "date_of_birth": {
            "type": "string",
            "format": "date"
          },
          "nationality": {
            "type": "string",
            "maxLength": 3
          },
          "gender": {
            "type": "string",
            "maxLength": 16
          },
          "address": {
            "type": "string",
            "maxLength": 512
          },
          "city": {
            "type": "string",
            "maxLength": 128
          },
          "state": {
            "type": "string",
            "maxLength": 128
          },
          "postal_code": {
            "type": "string",
            "maxLength": 32
          }
        }
      },
      "NetworkNote": {
        "type": "object",
        "required": [
          "uuid",
          "actor_email",
          "comment",
          "client_reference",
          "created_at"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "actor_email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "description": "الكاتب المُصادق عليه، يُعيّنه الخادم."
          },
          "comment": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "client_reference": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "CaseActionEntityTypeEnum": {
        "enum": [
          "user",
          "business"
        ],
        "type": "string",
        "description": "* `user` - user\n* `business` - business"
      },
      "CaseRoutingCondition": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "enum": [
              "source",
              "priority",
              "tags"
            ]
          },
          "operator": {
            "type": "string",
            "enum": [
              "equals",
              "in",
              "contains"
            ]
          },
          "value": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          }
        },
        "required": [
          "field",
          "operator",
          "value"
        ],
        "description": "يدعم المصدر والأولوية equals أو in بالقيم المدعومة. تدعم العلامات contains بعلامة واحدة غير فارغة."
      },
      "RoutingPublicationPolicyRevision": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "snapshot": {},
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "maxLength": 254
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "published_at",
          "snapshot",
          "version"
        ]
      },
      "CasePublicationPolicyRevision": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "snapshot": {},
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "maxLength": 254
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "published_at",
          "snapshot",
          "version"
        ]
      },
      "FraudCheckIdentityRelationship": {
        "type": "object",
        "properties": {
          "result": {
            "$ref": "#/components/schemas/FraudResultEnum"
          },
          "reference_type": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "availability": {
            "$ref": "#/components/schemas/FraudAvailabilityEnum"
          },
          "reason_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "availability",
          "country",
          "reason_codes",
          "reference_type",
          "result"
        ]
      },
      "CasePublicationPaginatedPolicyRevisionList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CasePublicationPolicyRevision"
            }
          }
        }
      },
      "CaseDuplicateBlankEnum": {
        "enum": [
          ""
        ]
      },
      "FraudCheckPlan": {
        "type": "object",
        "properties": {
          "profile_id": {
            "type": "string"
          },
          "profile_version": {
            "type": "string"
          },
          "modules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FraudCheckPlannedModule"
            }
          },
          "estimated_price": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "is_sandbox": {
            "type": "boolean"
          },
          "can_afford": {
            "type": "boolean"
          }
        },
        "required": [
          "can_afford",
          "currency",
          "estimated_price",
          "is_sandbox",
          "modules",
          "profile_id",
          "profile_version"
        ]
      },
      "CaseReviewTeamUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseReviewTeamMember"
            },
            "maxItems": 250
          },
          "is_active": {
            "type": "boolean"
          }
        }
      },
      "RoutingPublicationPolicyDraft": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "string",
            "format": "uuid"
          },
          "base_version": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "changes": {},
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "maxLength": 254
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "base_version",
          "updated_at"
        ]
      },
      "FraudCheckRequestRequest": {
        "type": "object",
        "properties": {
          "client_reference": {
            "type": "string",
            "minLength": 1,
            "description": "المرجع الخاص بك لعملية الفحص هذه. يعمل أيضاً كمفتاح idempotency: إعادة استخدامه مع نفس الطلب يعيد الفحص الأصلي دون تشغيل الوحدات أو فوترتها مرة أخرى؛ وإعادة استخدامه مع طلب مختلف يعيد 409.",
            "maxLength": 255
          },
          "profile": {
            "type": "string",
            "minLength": 1,
            "default": "standard",
            "description": "معرّف ملف التنسيق. يتم تعيينه افتراضياً على ملف Didit `standard`.",
            "maxLength": 64
          },
          "profile_version": {
            "type": "string",
            "minLength": 1,
            "description": "تثبيت نسخة مجمدة من الملف التعريفي. القيمة الافتراضية هي النسخة الحالية للملف التعريفي.",
            "maxLength": 32
          },
          "subject": {
            "$ref": "#/components/schemas/FraudCheckSubjectRequest"
          },
          "context": {
            "$ref": "#/components/schemas/FraudCheckContextRequest"
          },
          "checks": {
            "$ref": "#/components/schemas/FraudCheckModuleSelectionRequest"
          },
          "vendor_data": {
            "type": "string",
            "maxLength": 1000
          },
          "metadata": {}
        },
        "required": [
          "subject"
        ]
      },
      "CaseDuplicateCaseSubjectInputRequest": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/CaseDuplicateTypeEnum"
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "type",
          "uuid"
        ]
      },
      "CaseReviewTeamMember": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "availability": {
            "type": "string",
            "enum": [
              "available",
              "unavailable"
            ],
            "default": "available"
          },
          "capacity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "default": 10
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxItems": 25
          },
          "available_from": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "available_until": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "user_id"
        ]
      },
      "CaseRoutingPreviewRequest": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "MANUAL",
              "AML_SCREENING",
              "TRANSACTION_RULE",
              "WORKFLOW_BUILDER"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH"
            ],
            "default": "MEDIUM"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxItems": 50
          },
          "rule_uuid": {
            "type": "string",
            "format": "uuid"
          },
          "draft": {
            "$ref": "#/components/schemas/CaseRoutingRuleCreate"
          }
        },
        "required": [
          "source"
        ]
      },
      "FraudExcludeEnum": {
        "enum": [
          "normalization",
          "email_risk",
          "email_social",
          "phone_social",
          "phone_risk",
          "ip_risk",
          "database_validation",
          "networks_same_org",
          "networks_cross_org",
          "biometric_identity"
        ],
        "type": "string",
        "description": "* `normalization` - التطبيع\n* `email_risk` - مخاطر البريد الإلكتروني\n* `email_social` - الحسابات الاجتماعية للبريد الإلكتروني\n* `phone_social` - الحسابات الاجتماعية لرقم الهاتف\n* `phone_risk` - مخاطر رقم الهاتف\n* `ip_risk` - مخاطر عنوان IP\n* `database_validation` - التحقق من قواعد البيانات\n* `networks_same_org` - شبكات المؤسسة نفسها\n* `networks_cross_org` - شبكات عبر المؤسسات\n* `biometric_identity` - الهوية البيومترية"
      },
      "CaseDuplicateCaseLinkCreateRequest": {
        "type": "object",
        "properties": {
          "entity_type": {
            "$ref": "#/components/schemas/CaseDuplicateEntityTypeEnum"
          },
          "entity_uuid": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "entity_type",
          "entity_uuid"
        ]
      },
      "CaseDuplicateStatusEnum": {
        "enum": [
          "OPEN",
          "AWAITING_USER",
          "RESOLVED"
        ],
        "type": "string",
        "description": "* `OPEN` - مفتوحة\n* `AWAITING_USER` - بانتظار المستخدم\n* `RESOLVED` - محلولة"
      },
      "FraudBandEnum": {
        "enum": [
          "low",
          "medium",
          "high",
          "unknown"
        ],
        "type": "string",
        "description": "* `low` - منخفض\n* `medium` - متوسط\n* `high` - مرتفع\n* `unknown` - غير معروف"
      },
      "CaseDuplicatePriorityEnum": {
        "enum": [
          "LOW",
          "MEDIUM",
          "HIGH"
        ],
        "type": "string",
        "description": "* `LOW` - منخفض\n* `MEDIUM` - متوسط\n* `HIGH` - مرتفع"
      },
      "FraudStatusEnum": {
        "enum": [
          "planned",
          "completed",
          "skipped",
          "failed"
        ],
        "type": "string",
        "description": "* `planned` - مخطط لها\n* `completed` - مكتملة\n* `skipped` - تم تخطيها\n* `failed` - فشلت"
      },
      "FraudCheckInput": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "مُعرّف مُنقّح للمُعرّف المُرسل."
          },
          "type": {
            "$ref": "#/components/schemas/FraudTypeEnum"
          },
          "namespace": {
            "type": "object",
            "additionalProperties": {}
          },
          "quality": {
            "type": "string"
          },
          "normalization": {
            "type": "object",
            "additionalProperties": {}
          },
          "availability": {
            "$ref": "#/components/schemas/FraudAvailabilityEnum"
          }
        },
        "required": [
          "availability",
          "namespace",
          "normalization",
          "quality",
          "reference",
          "type"
        ]
      },
      "CustomerMessagingPurposesEnum": {
        "enum": [
          "identity_document",
          "proof_of_address",
          "business_document",
          "confirm_details",
          "review_in_progress"
        ],
        "type": "string",
        "description": "* `identity_document` - identity_document\n* `proof_of_address` - proof_of_address\n* `business_document` - business_document\n* `confirm_details` - confirm_details\n* `review_in_progress` - review_in_progress"
      },
      "FraudTypeEnum": {
        "enum": [
          "email",
          "phone",
          "national_id",
          "tax_number",
          "passport_number",
          "driving_licence_number",
          "residence_permit_number",
          "voter_id",
          "external_id"
        ],
        "type": "string",
        "description": "* `email` - البريد الإلكتروني\n* `phone` - الهاتف\n* `national_id` - الهوية الوطنية\n* `tax_number` - الرقم الضريبي\n* `passport_number` - رقم جواز السفر\n* `driving_licence_number` - رقم رخصة القيادة\n* `residence_permit_number` - رقم تصريح الإقامة\n* `voter_id` - معرّف الناخب\n* `external_id` - المعرّف الخارجي"
      },
      "CaseDuplicateCaseSubjectInput": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/CaseDuplicateTypeEnum"
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "type",
          "uuid"
        ]
      },
      "CaseReviewTeamCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseReviewTeamMember"
            },
            "maxItems": 250
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "members"
        ]
      },
      "CaseDuplicateCaseDuplicateQueryRequest": {
        "type": "object",
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/CaseDuplicateCaseSubjectInputRequest"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseDuplicateCaseLinkCreateRequest"
            }
          },
          "offset": {
            "type": "integer",
            "maximum": 1000000,
            "minimum": 0,
            "default": 0
          }
        }
      },
      "CaseDuplicateResolutionEnum": {
        "enum": [
          "FALSE_POSITIVE",
          "VALID_THREAT"
        ],
        "type": "string",
        "description": "* `FALSE_POSITIVE` - إيجابي كاذب\n* `VALID_THREAT` - تهديد حقيقي"
      },
      "CasePublicationPolicyDraftWriteRequest": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "expected_revision": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "changes": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "changes",
          "expected_revision",
          "expected_version"
        ]
      },
      "FraudCheckSubjectRequest": {
        "type": "object",
        "properties": {
          "selfie": {
            "type": "string",
            "minLength": 1,
            "description": "صورة سيلفي بتنسيق JPEG أو PNG أو WebP بترميز Base64، حتى 6 MB. بدون صورة مرجعية أو عنوان URL.",
            "maxLength": 8388672
          },
          "identifiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FraudCheckIdentifierRequest"
            },
            "description": "معرّف واحد أو أكثر بنوع محدد. معرّف واحد يكفي.",
            "maxItems": 10,
            "minItems": 1
          },
          "attributes": {
            "$ref": "#/components/schemas/FraudCheckAttributesRequest"
          }
        },
        "required": [
          "identifiers"
        ]
      },
      "RoutingPublicationRoutingCondition": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/RoutingPublicationFieldEnum"
          },
          "operator": {
            "$ref": "#/components/schemas/RoutingPublicationOperatorEnum"
          },
          "value": {}
        },
        "required": [
          "field",
          "operator",
          "value"
        ]
      },
      "CaseActionCaseActionReceipt": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "client_reference": {
            "type": "string",
            "format": "uuid"
          },
          "action": {
            "type": "string",
            "maxLength": 32
          },
          "status": {
            "$ref": "#/components/schemas/CaseActionStatusEnum"
          },
          "result": {},
          "error": {
            "type": "string",
            "maxLength": 255
          },
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "maxLength": 254
          },
          "attempts": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "action",
          "client_reference",
          "created_at",
          "status",
          "updated_at",
          "uuid"
        ]
      },
      "FraudCheckContextRequest": {
        "type": "object",
        "properties": {
          "ip_address": {
            "type": "string",
            "minLength": 1
          },
          "user_agent": {
            "type": "string",
            "maxLength": 512
          },
          "country": {
            "type": "string",
            "description": "الدولة التي يدّعي الشخص وجوده فيها. للسياق فقط - لا تعد أبدًا دليلاً على إثبات ملكية الهوية.",
            "maxLength": 3
          },
          "purpose": {
            "type": "string",
            "maxLength": 128
          },
          "consent_obtained": {
            "type": "boolean"
          }
        }
      },
      "CustomerMessagingCaseCustomerResponseResult": {
        "type": "object",
        "properties": {
          "responded_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "responded_at"
        ]
      },
      "CustomerMessagingCaseRequestContact": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "verified_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "email",
          "uuid",
          "verified_at"
        ]
      },
      "FraudClientCredentialsForbiddenErrorMessage": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "default": "Forbidden - User doesn't have permission"
          }
        }
      },
      "CasePublicationAssignmentMethodEnum": {
        "enum": [
          "MANUAL",
          "AUTOMATIC"
        ],
        "type": "string",
        "description": "* `MANUAL` - يدوي\n* `AUTOMATIC` - تلقائي"
      },
      "CaseDuplicateNullEnum": {
        "enum": [
          null
        ]
      },
      "CustomerMessagingLanguageEnum": {
        "enum": [
          "en",
          "es",
          "pt"
        ],
        "type": "string",
        "description": "* `en` - en\n* `es` - es\n* `pt` - pt"
      },
      "CaseDuplicateCaseFraudSourceContextRequest": {
        "type": "object",
        "properties": {
          "check_id": {
            "type": "string",
            "format": "uuid"
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_section": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[A-Z][A-Z0-9_:-]{0,63}$"
          }
        },
        "required": [
          "check_id",
          "request_id",
          "source_section"
        ]
      },
      "FraudCheckPlannedModule": {
        "type": "object",
        "properties": {
          "module": {
            "$ref": "#/components/schemas/FraudExcludeEnum"
          },
          "available": {
            "type": "boolean"
          },
          "availability_reason": {
            "type": "string",
            "nullable": true
          },
          "will_run": {
            "type": "boolean"
          },
          "selection_reason": {
            "type": "string",
            "nullable": true
          },
          "estimated_price": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "availability_reason",
          "available",
          "estimated_price",
          "module",
          "selection_reason",
          "will_run"
        ]
      },
      "CustomerMessagingCaseRequestOptions": {
        "type": "object",
        "properties": {
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerMessagingCaseRequestContact"
            }
          },
          "purposes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerMessagingPurposesEnum"
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerMessagingLanguagesEnum"
            }
          }
        },
        "required": [
          "contacts",
          "languages",
          "purposes"
        ]
      },
      "CaseCollaborationPaginatedCaseNoteList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseCollaborationCaseNote"
            }
          }
        }
      },
      "FraudProcessingStatusEnum": {
        "enum": [
          "pending",
          "running",
          "completed",
          "failed"
        ],
        "type": "string",
        "description": "* `pending` - معلق\n* `running` - قيد التشغيل\n* `completed` - مكتمل\n* `failed` - فشل"
      },
      "CasePublicationCaseBlueprint": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 24
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "assignment_method": {
            "$ref": "#/components/schemas/CasePublicationAssignmentMethodEnum"
          },
          "assignee_pool": {},
          "max_active_cases": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "nullable": true
          },
          "escalation_enabled": {
            "type": "boolean"
          },
          "escalation_blueprint": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "escalation_blueprint_name": {
            "type": "string",
            "readOnly": true
          },
          "transfer_enabled": {
            "type": "boolean"
          },
          "four_eyes_checker_blueprint": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "four_eyes_checker_blueprint_name": {
            "type": "string",
            "readOnly": true
          },
          "require_resolution_note": {
            "type": "boolean"
          },
          "content_config": {},
          "version": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "default_deadline_hours": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "nullable": true
          },
          "is_active": {
            "type": "boolean"
          },
          "preset_key": {
            "type": "string",
            "nullable": true,
            "maxLength": 64
          },
          "creation_sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "readOnly": true
          },
          "receives_escalation_from": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_at",
          "creation_sources",
          "escalation_blueprint_name",
          "four_eyes_checker_blueprint_name",
          "name",
          "receives_escalation_from",
          "updated_at",
          "uuid"
        ]
      },
      "CaseRoutingRuleUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "priority": {
            "type": "integer",
            "minimum": 0
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseRoutingCondition"
            },
            "maxItems": 20
          },
          "required_skills": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxItems": 25
          },
          "blueprint": {
            "type": "string",
            "format": "uuid"
          },
          "team": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "is_active": {
            "type": "boolean"
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1,
            "writeOnly": true,
            "description": "الإصدار الذي فتحه المحرِّر. عند تقديمه، تُرجع عمليات الكتابة المستندة إلى إصدار قديم 409 دون تغيير القاعدة."
          }
        }
      },
      "CustomerMessagingCaseRequestPreviewRequest": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "$ref": "#/components/schemas/CustomerMessagingPurposeEnum"
          },
          "language": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerMessagingLanguageEnum"
              }
            ],
            "default": "en"
          }
        },
        "required": [
          "contact_id",
          "purpose"
        ]
      },
      "CaseDuplicateCaseFraudSourceContext": {
        "type": "object",
        "properties": {
          "check_id": {
            "type": "string",
            "format": "uuid"
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_section": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9_:-]{0,63}$"
          }
        },
        "required": [
          "check_id",
          "request_id",
          "source_section"
        ]
      },
      "RoutingPublicationOperatorEnum": {
        "enum": [
          "equals",
          "in",
          "contains"
        ],
        "type": "string",
        "description": "* `equals` - equals\n* `in` - in\n* `contains` - contains"
      },
      "CaseRoutingPreview": {
        "type": "object",
        "properties": {
          "rule_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "rule_name": {
            "type": "string",
            "nullable": true
          },
          "rule_version": {
            "type": "integer",
            "nullable": true
          },
          "blueprint_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "team_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "assignee_user_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "reason": {
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "eligible": {
                  "type": "boolean"
                },
                "active_cases": {
                  "type": "integer",
                  "nullable": true
                },
                "reason": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "matched_rules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "priority": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "FraudDimensionEnum": {
        "enum": [
          "identity",
          "contact",
          "device_network",
          "behavioral",
          "fraud_network"
        ],
        "type": "string",
        "description": "* `identity` - الهوية\n* `contact` - جهة الاتصال\n* `device_network` - شبكة الجهاز\n* `behavioral` - السلوك\n* `fraud_network` - شبكة الاحتيال"
      },
      "FraudBadRequestErrorMessage": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "default": "Bad Request - Invalid request data"
          }
        }
      },
      "FraudNextActionEnum": {
        "enum": [
          "none",
          "manual_review",
          "step_up",
          "resubmit_capture"
        ],
        "type": "string",
        "description": "* `none` - لا شيء\n* `manual_review` - مراجعة يدوية\n* `step_up` - تصعيد\n* `resubmit_capture` - إعادة إرسال الالتقاط"
      },
      "RoutingPublicationPolicyDraftPreconditionRequest": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "expected_revision": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "required": [
          "expected_revision",
          "expected_version"
        ]
      },
      "FraudCheckRisk": {
        "type": "object",
        "properties": {
          "dimension": {
            "$ref": "#/components/schemas/FraudDimensionEnum"
          },
          "score": {
            "type": "integer",
            "nullable": true
          },
          "band": {
            "$ref": "#/components/schemas/FraudBandEnum"
          },
          "availability": {
            "$ref": "#/components/schemas/FraudAvailabilityEnum"
          },
          "requested_but_unavailable": {
            "type": "boolean",
            "description": "تكون القيمة True عندما يقدّم الطلب كل ما يحتاجه هذا البُعد ولكن المنصة لم تتمكن رغم ذلك من الاستجابة له. لا يُوصى أبداً بالموافقة على مثل هذا الفحص بالاعتماد فقط على الأبعاد التي تمت الاستجابة لها."
          },
          "reason_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "evidence_indexes": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "required": [
          "availability",
          "band",
          "dimension",
          "evidence_indexes",
          "reason_codes",
          "requested_but_unavailable",
          "score"
        ]
      },
      "CaseDuplicateSourceEnum": {
        "enum": [
          "MANUAL",
          "AML_SCREENING",
          "TRANSACTION_RULE",
          "WORKFLOW_BUILDER"
        ],
        "type": "string",
        "description": "* `MANUAL` - يدوي\n* `AML_SCREENING` - فحص AML\n* `TRANSACTION_RULE` - قاعدة المعاملة\n* `WORKFLOW_BUILDER` - أداة إنشاء سير العمل"
      },
      "CaseCollaborationPatchedCaseNoteUpdateRequest": {
        "type": "object",
        "properties": {
          "is_pinned": {
            "type": "boolean"
          }
        }
      },
      "CustomerMessagingPurposeEnum": {
        "enum": [
          "identity_document",
          "proof_of_address",
          "business_document",
          "confirm_details",
          "review_in_progress"
        ],
        "type": "string",
        "description": "* `identity_document` - identity_document\n* `proof_of_address` - proof_of_address\n* `business_document` - business_document\n* `confirm_details` - confirm_details\n* `review_in_progress` - review_in_progress"
      },
      "CaseDuplicateTypeEnum": {
        "enum": [
          "user",
          "business"
        ],
        "type": "string",
        "description": "* `user` - user\n* `business` - business"
      },
      "CaseCollaborationCaseNoteCreateRequest": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "reply_to": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "client_reference": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "mentioned_emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email",
              "minLength": 1
            }
          },
          "is_internal": {
            "type": "boolean",
            "default": false
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "comment"
        ]
      },
      "CustomerMessagingLanguagesEnum": {
        "enum": [
          "en",
          "es",
          "pt"
        ],
        "type": "string",
        "description": "* `en` - en\n* `es` - es\n* `pt` - pt"
      },
      "CustomerMessagingCaseRequestConfirmRequest": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "$ref": "#/components/schemas/CustomerMessagingPurposeEnum"
          },
          "language": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerMessagingLanguageEnum"
              }
            ],
            "default": "en"
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "preview_token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "required": [
          "contact_id",
          "expires_at",
          "preview_token",
          "purpose",
          "request_id"
        ]
      },
      "CaseRoutingRule": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "priority": {
            "type": "integer",
            "minimum": 0
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseRoutingCondition"
            },
            "maxItems": 20
          },
          "required_skills": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxItems": 25
          },
          "blueprint": {
            "type": "string",
            "format": "uuid"
          },
          "team": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "is_active": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "version": {
            "type": "integer",
            "readOnly": true
          },
          "blueprint_name": {
            "type": "string",
            "readOnly": true
          },
          "team_name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        }
      },
      "FraudResultEnum": {
        "enum": [
          "match",
          "mismatch",
          "inconclusive",
          "no_reference"
        ],
        "type": "string",
        "description": "* `match` - مطابقة\n* `mismatch` - عدم تطابق\n* `inconclusive` - غير حاسم\n* `no_reference` - لا يوجد مرجع"
      },
      "CaseRoutingRuleCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "priority": {
            "type": "integer",
            "minimum": 0
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseRoutingCondition"
            },
            "maxItems": 20
          },
          "required_skills": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxItems": 25
          },
          "blueprint": {
            "type": "string",
            "format": "uuid"
          },
          "team": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "is_active": {
            "type": "boolean"
          },
          "publish": {
            "type": "boolean",
            "writeOnly": true,
            "description": "عَيِّن القيمة إلى false لحفظ مسودة لم تُنشر من قبل. يظل السجل غير نشط في الإصدار 0 حتى يتم نشر المسودة صراحةً. يؤدي إغفال هذا الحقل إلى الحفاظ على الإنشاء الفوري لعمليات التكامل الحالية."
          }
        },
        "required": [
          "name",
          "conditions",
          "blueprint"
        ]
      },
      "FraudCheckIdentifierRequest": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FraudTypeEnum"
              }
            ],
            "description": "نوع المعرّف. يحدد حقول مساحة الاسم المطلوبة.\n\n* `email` - البريد الإلكتروني\n* `phone` - الهاتف\n* `national_id` - الهوية الوطنية\n* `tax_number` - الرقم الضريبي\n* `passport_number` - رقم جواز السفر\n* `driving_licence_number` - رقم رخصة القيادة\n* `residence_permit_number` - رقم تصريح الإقامة\n* `voter_id` - معرّف الناخب\n* `external_id` - المعرّف الخارجي"
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "description": "قيمة المعرّف، بأي تنسيق معتاد.",
            "maxLength": 255
          },
          "country": {
            "type": "string",
            "description": "دولة الإصدار بتنسيق ISO-3166 alpha-2 أو alpha-3. مطلوب لأنواع المعرّفات الحكومية: تشير الأرقام المتطابقة إلى أشخاص مختلفين في بلدان مختلفة.",
            "maxLength": 3
          },
          "issuer": {
            "type": "string",
            "description": "جهة إصدار اختيارية أو جهة إصدار دون وطنية، عندما لا تكون الدولة وحدها مميزة بشكل فريد.",
            "maxLength": 128
          }
        },
        "required": [
          "type",
          "value"
        ]
      },
      "CaseActionActionEnum": {
        "enum": [
          "set_status",
          "add_tags",
          "add_note",
          "add_to_blocklist"
        ],
        "type": "string",
        "description": "* `set_status` - set_status\n* `add_tags` - add_tags\n* `add_note` - add_note\n* `add_to_blocklist` - add_to_blocklist"
      },
      "CaseActionCaseActionReceiptPage": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "next_offset": {
            "type": "integer",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseActionCaseActionReceipt"
            }
          }
        },
        "required": [
          "count",
          "next_offset",
          "results"
        ]
      },
      "CaseActionCaseEntityActionResult": {
        "type": "object",
        "properties": {
          "receipt": {
            "$ref": "#/components/schemas/CaseActionCaseActionReceipt"
          },
          "entity_type": {
            "$ref": "#/components/schemas/CaseActionEntityTypeEnum"
          },
          "entity_uuid": {
            "type": "string",
            "format": "uuid"
          },
          "action": {
            "type": "string"
          },
          "previous_status": {
            "type": "string"
          },
          "new_status": {
            "type": "string"
          },
          "tags_added": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "comment_uuid": {
            "type": "string",
            "format": "uuid"
          },
          "blocklisted": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CustomerMessagingCaseRequest": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "purpose": {
            "type": "string",
            "readOnly": true
          },
          "language": {
            "type": "string",
            "readOnly": true
          },
          "recipient": {
            "type": "string",
            "format": "email",
            "readOnly": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "actor_email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "nullable": true
          },
          "delivery_status": {
            "type": "string",
            "readOnly": true
          },
          "delivered_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "nullable": true
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "nullable": true
          },
          "responded_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "nullable": true
          },
          "response": {
            "readOnly": true,
            "nullable": true
          },
          "has_attachment": {
            "type": "boolean",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "actor_email",
          "cancelled_at",
          "created_at",
          "delivered_at",
          "delivery_status",
          "expires_at",
          "has_attachment",
          "language",
          "purpose",
          "recipient",
          "responded_at",
          "response",
          "uuid"
        ]
      },
      "CustomerMessagingCaseRequestPublic": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "$ref": "#/components/schemas/CustomerMessagingPurposeEnum"
          },
          "language": {
            "$ref": "#/components/schemas/CustomerMessagingLanguageEnum"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "responded_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "copy": {
            "type": "object",
            "additionalProperties": {}
          },
          "organization_name": {
            "type": "string"
          },
          "is_white_label": {
            "type": "boolean"
          },
          "customization": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "required": [
          "copy",
          "customization",
          "expires_at",
          "is_white_label",
          "language",
          "organization_name",
          "purpose",
          "request_id",
          "responded_at"
        ]
      },
      "RoutingPublicationFieldEnum": {
        "enum": [
          "source",
          "priority",
          "tags"
        ],
        "type": "string",
        "description": "* `source` - source\n* `priority` - priority\n* `tags` - tags"
      },
      "RoutingPublicationCaseRoutingRule": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "priority": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutingPublicationRoutingCondition"
            }
          },
          "required_skills": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxItems": 25
          },
          "blueprint": {
            "type": "string",
            "format": "uuid"
          },
          "blueprint_name": {
            "type": "string",
            "readOnly": true
          },
          "team": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "team_name": {
            "type": "string",
            "readOnly": true
          },
          "is_active": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "blueprint",
          "blueprint_name",
          "conditions",
          "created_at",
          "name",
          "team_name",
          "updated_at",
          "uuid",
          "version"
        ]
      },
      "CaseActionStatusEnum": {
        "enum": [
          "APPLIED",
          "FAILED"
        ],
        "type": "string",
        "description": "* `APPLIED` - تم التطبيق\n* `FAILED` - فشل"
      },
      "FraudCheckModuleSelectionRequest": {
        "type": "object",
        "properties": {
          "include": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FraudExcludeEnum"
            }
          },
          "exclude": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FraudExcludeEnum"
            }
          }
        }
      },
      "SignatureField": {
        "type": "object",
        "description": "حقل يُوضع على مستند الجلسة: يحدد الموقّع الذي يملؤه، وكيفية ملئه، ومكانه. حدد إما موضعاً (`page` و `x` و `y` و `width` و `height`) أو `anchor`. المواضع هي أجزاء كسرية من الصفحة كما تُعرض، بدءاً من الزاوية العلوية اليسرى، ومقربة إلى 4 منازل عشرية، ويجب أن يكون الحقل ملائماً لداخل الصفحة. يستوعب المستند ما يصل إلى 200 حقل والموقّع الواحد ما يصل إلى 500، ويتطلب كل دور له حقول على المستند حقل `signature` أو `initials` هناك. راجع [الحقول الموجودة على المستند](/ar/core-technology/electronic-signature/overview#الحقول-على-المستند).",
        "required": [
          "key",
          "type"
        ],
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "description": "يُسمّي الحقل في النتائج وفي `sign.field_values`. فريد داخل المستند."
          },
          "type": {
            "type": "string",
            "enum": [
              "signature",
              "initials",
              "full_name",
              "date_signed",
              "text",
              "checkbox",
              "email",
              "data"
            ],
            "description": "ما يحتويه الحقل. يُطبّق الموقّع توقيعه والأحرف الأولى التي اعتمدها `signature` و `initials`، ويكتب نصاً في `text`، ويحدد خانة اختيار في `checkbox`، ويكتب بريداً إلكترونياً في `email` عندما لا تحتوي الجلسة على بريد إلكتروني تم التحقق منه. تملأ Didit حقل `full_name` (الاسم الذي تم التحقق منه)، و `date_signed` (تاريخ التوقيع، وفق المنطقة الزمنية للموقّع)، و `data` (من `prefill`)، وبريداً إلكترونياً تم التحقق منه `email`، وتعرضها للقراءة فقط. لا يوجد نوع لمنتقي التاريخ: استخدم `text`."
          },
          "role": {
            "type": "string",
            "enum": [
              "verified_person",
              "legal_representative",
              "key_people"
            ],
            "description": "من يملأ الحقل، بقيم `signature_signer`. تملأ الخطوة وتختم فقط حقول الموقّع الخاص بها. القيمة الافتراضية هي موقّع الخطوة."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "رقم الصفحة، من 1 إلى إجمالي عدد صفحات المستند. بالنسبة لمستند Word، تكون صفحة من ملف PDF المُحوَّل."
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "الحافة اليسرى، ككسر من عرض الصفحة."
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "الحافة العلوية، كنسبة من ارتفاع الصفحة."
          },
          "width": {
            "type": "number",
            "minimum": 0.02,
            "maximum": 1,
            "description": "العرض، كنسبة من عرض الصفحة. يبلغ عرض التوقيع `0.12` على الأقل."
          },
          "height": {
            "type": "number",
            "minimum": 0.012,
            "maximum": 1,
            "description": "الارتفاع، كنسبة من ارتفاع الصفحة. يبلغ ارتفاع التوقيع `0.035` على الأقل."
          },
          "anchor": {
            "$ref": "#/components/schemas/SignatureFieldAnchor"
          },
          "required": {
            "type": "boolean",
            "description": "`signature` and `initials` are required unless you set `false`. `full_name`, `date_signed` and `data` are always required. The signer can't finish a document until its required fields have a value, and a required checkbox must be ticked."
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "description": "يظهر للموقّع وفي النتائج. القيمة الافتراضية تؤخذ من النوع."
          },
          "placeholder": {
            "type": "string",
            "nullable": true,
            "maxLength": 80,
            "description": "`text` و`email` فقط."
          },
          "validation": {
            "$ref": "#/components/schemas/SignatureFieldValidation"
          },
          "prefill": {
            "type": "string",
            "nullable": true,
            "description": "مصدر القيمة: `identity.full_name`، أو `identity.first_name`، أو `identity.last_name`، أو `identity.date_of_birth` (`DD/MM/YYYY`)، أو `identity.nationality`، أو `identity.document_number`، أو `identity.document_type`، أو `identity.issuing_country`، أو `identity.address`، أو `contact.email`، أو `contact.phone`، أو `company.name`، أو `company.registration_number`، أو `company.address`، أو `company.country` (KYB)، أو `session.vendor_data`، أو `metadata.<key>` (مفتاح من `metadata` الخاصة بالجلسة) أو `api.<key>` (مفتاح من `sign.field_values`). مطلوب لـ `data`. يستخدم `full_name` دائماً `identity.full_name` ويستخدم `email` القيمة `contact.email`. يتم تثبيت قيم حقول `data` و`full_name` و`email` التي تم التحقق منها بمجرد أن يبدأ الموقّع عملية التوقيع."
          },
          "editable_when_prefilled": {
            "type": "boolean",
            "default": false,
            "description": "`text` و`email` فقط: يمكن للموقّع تغيير القيمة المملوءة مسبقاً."
          },
          "checked_by_default": {
            "type": "boolean",
            "default": false,
            "description": "لـ `checkbox` فقط: يبدأ المربع محددًا."
          },
          "date_format": {
            "type": "string",
            "enum": [
              "DD/MM/YYYY",
              "MM/DD/YYYY",
              "YYYY-MM-DD",
              "D MMMM YYYY"
            ],
            "default": "DD/MM/YYYY",
            "description": "`date_signed` فقط."
          }
        }
      },
      "SessionSignDocument": {
        "type": "object",
        "required": [
          "file_name",
          "content_base64"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "العنوان المعروض للموقّع. القيمة الافتراضية هي `file_name`."
          },
          "file_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "اسم الملف، ينتهي بـ `.pdf` أو `.docx`."
          },
          "content_base64": {
            "type": "string",
            "format": "byte",
            "description": "الملف، بترميز base64. يمكن أن يصل حجم ملف PDF إلى 20 MB و100 صفحة، دون كلمة مرور أو نصوص برمجية (scripts) أو ملفات مرفقة. يمكن أن يصل حجم ملف Word (`.docx`) إلى 20 MB ويتم تحويله إلى PDF أثناء تشغيل الطلب، في غضون 25 ثانية على الأكثر؛ ويخضع ملف PDF حينئذٍ لنفس الحدود. بحد أقصى 5 ملفات Word لكل جلسة. يتم رفض ملف Word الذي يحتوي على وحدات ماكرو (macros) أو تعقب التغييرات أو روابط لمحتوى خارجي أو كائنات مضمنة مع الخطأ `signature_document_not_supported`، والملف الذي يتعذر تحويله يُرجع `signature_document_conversion_failed`، مع تحديد `reason` في كل حالة."
          },
          "fields": {
            "type": "array",
            "description": "حقول اختيارية لوضعها على هذا المستند، حتى 200 حقل. تشير الصفحات والمواضع إلى ملف PDF، أو إلى ملف PDF المحول لملف Word. بدون حقول، يقرأ الموقّع المستند ويوافق عليه.",
            "items": {
              "$ref": "#/components/schemas/SignatureField"
            },
            "maxItems": 200
          }
        }
      },
      "SignatureResult": {
        "type": "object",
        "description": "نتيجة موقّع واحد لخطوة واحدة من التوقيع الإلكتروني. راجع [تقرير التوقيع الإلكتروني](/ar/core-technology/electronic-signature/report-electronic-signature).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "مرّره كـ `signature_id` لتنزيل أدلة هذا الموقّع أو التحقق من توقيعه."
          },
          "node_id": {
            "type": "string",
            "description": "خطوة سير العمل التي أنتجتها."
          },
          "status": {
            "type": "string",
            "enum": [
              "intro",
              "review",
              "code",
              "signing",
              "signed",
              "declined"
            ],
            "description": "موضع الموقّع ضمن الخطوة. القيمة `signed` فقط هي التي تعني أن المستندات قد تم توقيعها."
          },
          "verdict": {
            "type": "string",
            "enum": [
              "Not Finished",
              "Approved",
              "In Review",
              "Declined"
            ],
            "description": "نتيجة الخطوة. يُعيّنها التحذير من خلال قاعدته؛ وتُطبّق قواعد الحالة المخصصة بعد ذلك."
          },
          "level": {
            "type": "string",
            "enum": [
              "simple",
              "aes",
              "qes"
            ],
            "description": "`simple` (افتراضي) أو `aes`. التوقيع `qes` (التوقيع الإلكتروني المؤهل، QES) هو إضافة غير متوفرة بعد."
          },
          "format": {
            "type": "string",
            "enum": [
              "pdf",
              "pades"
            ],
            "description": "`pdf` للتوقيع من النوع Simple، و`pades` للنوع Advanced (AES)."
          },
          "profile": {
            "type": "string",
            "nullable": true,
            "description": "`PAdES-B-LT` بمجرد إتمام توقيع متقدم (AES)، وخلاف ذلك null."
          },
          "signer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "nullable": true,
                "description": "اسم الموقّع. يتم التحقق منه (من التحقق من الهوية المقبول أو الجلسة) باستثناء المستوى Simple دون اسم جلسة تم التحقق منه، حيث يكون الاسم هو ما كتبه الموقّع ولا يتم التحقق منه."
              },
              "capacity": {
                "type": "string",
                "enum": [
                  "self",
                  "company"
                ]
              },
              "company": {
                "type": "string",
                "nullable": true
              },
              "role": {
                "type": "string",
                "nullable": true,
                "description": "المسمى الوظيفي للشخص الرئيسي، كما تم التصريح به."
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "الأدوار المنظمة للشخص الرئيسي، كما تم التصريح بها للشركة."
              },
              "identity_session_id": {
                "type": "string",
                "format": "uuid",
                "description": "جلسة KYC التي تحققت من الموقّع."
              }
            }
          },
          "identity_used": {
            "type": "object",
            "description": "الهوية التي تم التحقق منها والتي يعتمد عليها التوقيع. فارغة بالنسبة للتوقيع البسيط (Simple) بدون هوية تم التحقق منها.",
            "properties": {
              "session_id": {
                "type": "string",
                "format": "uuid"
              },
              "kyc_id": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "verified": {
                "type": "boolean"
              },
              "expected_name": {
                "type": "string",
                "nullable": true,
                "description": "الاسم الذي كان على الموقّع مطابقته."
              }
            }
          },
          "certificate": {
            "type": "object",
            "nullable": true,
            "description": "الشهادة التي تم توقيع المستندات بها. تكون `null` حتى يتم التوقيع، وتكون دائماً `null` للتوقيع البسيط (Simple signature).",
            "properties": {
              "issuer": {
                "type": "string"
              },
              "issued_to": {
                "type": "string"
              },
              "serial": {
                "type": "string",
                "description": "الرقم التسلسلي، بنظام السداسي عشر."
              },
              "valid_from": {
                "type": "string",
                "format": "date-time"
              },
              "valid_until": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "confirmation": {
            "type": "object",
            "properties": {
              "channel": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "email",
                  "sms"
                ],
                "description": "`null` للتوقيع من النوع Simple، والذي لا يحتوي على رمز."
              },
              "destination": {
                "type": "string",
                "nullable": true,
                "description": "جهة الاتصال المقنّعة التي أُرسل الرمز إليها."
              },
              "confirmed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "attempts": {
                "type": "integer",
                "description": "الرموز المُدخلة، بما في ذلك الرمز الصحيح."
              }
            }
          },
          "timestamp": {
            "type": "object",
            "nullable": true,
            "description": "الختم الزمني RFC 3161 في التوقيع، الصادر عن Didit. تكون القيمة `null` حتى يتم التوقيع، ودائماً `null` للتوقيع البسيط (Simple).",
            "properties": {
              "time": {
                "type": "string",
                "format": "date-time"
              },
              "qualified": {
                "type": "boolean",
                "description": "دائماً `false` لـ AES."
              },
              "valid": {
                "type": "boolean"
              }
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "المستند الموجود في نسخة هذا الموقّع. استخدمه لتنزيل الملف الموقّع."
                },
                "uuid": {
                  "type": "string",
                  "format": "uuid",
                  "description": "مطابق لـ `id`."
                },
                "title": {
                  "type": "string"
                },
                "file_name": {
                  "type": "string"
                },
                "pages": {
                  "type": "integer",
                  "description": "صفحات المستند الموقعة. بالنسبة لـ Word، صفحات ملف PDF المُحوَّل."
                },
                "size_bytes": {
                  "type": "integer"
                },
                "sha256_original": {
                  "type": "string",
                  "description": "تشفير SHA-256 للمستند كما عُرض على الموقّع."
                },
                "sha256_signed": {
                  "type": "string",
                  "nullable": true,
                  "description": "تشفير SHA-256 لملف PDF الموقّع، بمجرد توقيعه."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "signed",
                    "declined",
                    "not_signed",
                    "not_reached"
                  ],
                  "description": "`not_signed`: تم فتحها ولكن لم يتم توقيعها. `not_reached`: لم يتم فتحها أبداً."
                },
                "opened_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "read_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true,
                  "description": "متى وصل الموقّع إلى نهاية مستند بدون حقول، عندما تتطلب الخطوة ذلك."
                },
                "read_to_end": {
                  "type": "boolean"
                },
                "consented_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true,
                  "description": "متى وافق الموقّع على مستند بدون حقول، أو أكمل تعبئة حقول مستند يحتوي على حقول."
                },
                "consent": {
                  "type": "boolean"
                },
                "signed_file": {
                  "type": "string",
                  "nullable": true,
                  "description": "مسار ملف PDF الموقّع بمجرد توقيعه. راجع [تنزيل مستند موقّع](/ar/sessions-api/electronic-signature/download-signed-document)."
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "fields",
                    "read_and_agree"
                  ],
                  "description": "`fields` لمستند يحتوي على حقول، و`read_and_agree` لمستند لا يحتوي عليها."
                },
                "source_format": {
                  "type": "string",
                  "enum": [
                    "pdf",
                    "docx"
                  ],
                  "description": "`pdf`، أو `docx` لمستند Word قامت Didit بتحويله إلى PDF."
                },
                "conversion": {
                  "type": "object",
                  "nullable": true,
                  "description": "`null` لملف PDF. بالنسبة لمستند Word، الملف الأصلي والملف المحوَّل.",
                  "properties": {
                    "from": {
                      "type": "string",
                      "enum": [
                        "docx"
                      ]
                    },
                    "file_name": {
                      "type": "string",
                      "description": "اسم ملف Word الأصلي الخاص بك."
                    },
                    "sha256": {
                      "type": "string",
                      "description": "تشفير SHA-256 لملف Word الأصلي الخاص بك."
                    },
                    "size_bytes": {
                      "type": "integer",
                      "description": "حجم ملف Word الأصلي الخاص بك."
                    },
                    "converter": {
                      "type": "string",
                      "description": "إصدار المحوِّل الذي أنتج ملف PDF."
                    }
                  }
                },
                "fields": {
                  "type": "array",
                  "description": "الحقول الموجودة في المستند، مع قيمها. فارغة لأي مستند بدون حقول.",
                  "items": {
                    "$ref": "#/components/schemas/SignatureFieldResult"
                  }
                }
              }
            }
          },
          "adopted_signature": {
            "type": "object",
            "nullable": true,
            "description": "التوقيع والأحرف الأولى التي اعتمدها الموقّع لحقول التوقيع والأحرف الأولى. تكون قيمتهما `null` حتى يعتمد الموقّع أحدهما.",
            "properties": {
              "method": {
                "type": "string",
                "enum": [
                  "typed",
                  "drawn"
                ],
                "description": "`typed`: الاسم المتحقق منه بأسلوب خط اليد. `drawn`: مرسوم بإصبع أو بفأرة."
              },
              "font": {
                "type": "string",
                "nullable": true,
                "description": "نمط خط اليد للتوقيع المكتوب. `null` عندما يكون مرسوماً."
              },
              "adopted_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "electronic_signature_consent_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى وافق الموقّع، في شاشة المراجعة، على توقيع المستندات إلكترونياً. يتم تعيينها عندما يحتوي أي مستند على حقول."
          },
          "evidence_file": {
            "type": "string",
            "nullable": true,
            "description": "مسار ملف PDF للأدلة، بمجرد توقيعه. راجع [تنزيل أدلة التوقيع](/ar/sessions-api/electronic-signature/download-evidence)."
          },
          "warnings": {
            "type": "array",
            "description": "التحذيرات الصادرة لهذا الموقّع. راجع [تحذيرات التوقيع الإلكتروني](/ar/core-technology/electronic-signature/warnings-electronic-signature).",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "SIGNATURE_DECLINED",
                    "SIGNATURE_OTP_FAILED",
                    "SIGNATURE_NAME_MISMATCH",
                    "SIGNATURE_IDENTITY_NOT_VERIFIED",
                    "SIGNATURE_DOCUMENT_CHANGED",
                    "SIGNATURE_FIELD_DATA_MISSING"
                  ]
                },
                "node_id": {
                  "type": "string"
                }
              }
            }
          },
          "validation": {
            "type": "object",
            "nullable": true,
            "description": "آخر فحص تشفيري للمستندات الموقعة. تكون القيمة `null` حتى يتم توقيع المستندات. إذا لم تتمكن Didit من تأكيد نتيجة التوقيع، فستكون القيمة `{\"valid\": null, \"reason\": \"signature_provider_outcome_unknown\", \"checked_at\": ...}` وتظل `status` بالحالة `signing`: عاملها كأنها غير موقعة.",
            "properties": {
              "valid": {
                "type": "boolean",
                "nullable": true,
                "description": "تكون القيمة `true` عندما تكون جميع المستندات صالحة. وتكون `null` عندما يتعذر تأكيد نتيجة التوقيع."
              },
              "reason": {
                "type": "string",
                "description": "يتم تعيينه عندما تكون قيمة `valid` هي `null`: `signature_provider_outcome_unknown`."
              },
              "checked_at": {
                "type": "string",
                "format": "date-time"
              },
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "checked_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "valid": {
                      "type": "boolean",
                      "description": "تكون `true` عندما يكون كل من التوقيع والطابع الزمني صالحين وموثوقين."
                    },
                    "integrity": {
                      "type": "boolean",
                      "description": "تكون `true` عندما يكون المستند غير معدّل منذ التوقيع."
                    },
                    "trusted": {
                      "type": "boolean",
                      "description": "تكون `true` عندما تتسلسل شهادة التوقيع إلى جذر موثوق."
                    },
                    "revoked": {
                      "type": "boolean"
                    },
                    "trusted_list": {
                      "type": "object",
                      "description": "فحص القائمة الموثوقة للاتحاد الأوروبي (EU Trusted List). بالنسبة لـ AES: `{\"status\": \"not_applicable\", \"reason\": \"aes_not_qualified\"}`.",
                      "properties": {
                        "status": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        }
                      }
                    },
                    "certificate": {
                      "type": "object",
                      "nullable": true,
                      "description": "الشهادة التي تم توقيع المستندات بها. تكون `null` حتى يتم التوقيع، وتكون دائماً `null` للتوقيع البسيط (Simple signature).",
                      "properties": {
                        "issuer": {
                          "type": "string"
                        },
                        "issued_to": {
                          "type": "string"
                        },
                        "serial": {
                          "type": "string",
                          "description": "الرقم التسلسلي، بنظام السداسي عشر."
                        },
                        "valid_from": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "valid_until": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "object",
                      "nullable": true,
                      "description": "الختم الزمني RFC 3161 في التوقيع، الصادر عن Didit. تكون القيمة `null` حتى يتم التوقيع، ودائماً `null` للتوقيع البسيط (Simple).",
                      "properties": {
                        "time": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "qualified": {
                          "type": "boolean",
                          "description": "دائماً `false` لـ AES."
                        },
                        "valid": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "declined_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "declined_action": {
            "type": "string",
            "enum": [
              "DECLINE",
              "REVIEW",
              "NO_ACTION"
            ]
          },
          "signed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى يتوقف رابط التوقيع عن العمل."
          },
          "email_sent_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "email_unavailable_reason": {
            "type": "string",
            "nullable": true
          },
          "ip_address": {
            "type": "string",
            "nullable": true,
            "description": "عنوان IP الخاص بالموقّع عندما طلب رمزه."
          },
          "place": {
            "type": "string",
            "nullable": true,
            "description": "لم يتم جمعها: تكون دائماً `null`."
          },
          "place_unavailable_reason": {
            "type": "string",
            "nullable": true,
            "enum": [
              "not_collected"
            ]
          }
        }
      },
      "SignatureFieldValidation": {
        "type": "object",
        "nullable": true,
        "description": "قواعد لقيمة الحقل `text`. تطبق معاينة لوحة التحكم وسير عمل التوقيع وAPI نفس القواعد.",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "any",
              "letters",
              "number",
              "email",
              "pattern"
            ],
            "description": "`letters`: أحرف بأي نظام كتابة، ومسافات، وشرطات، وفواصل عليا. `number`: أرقام مع فاصل عشري اختياري. `pattern`: يجب أن تطابق القيمة `pattern`."
          },
          "min_length": {
            "type": "integer",
            "minimum": 0,
            "maximum": 500,
            "description": "من `0` حتى `max_length`."
          },
          "max_length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "default": 120
          },
          "pattern": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "maxLength": 200,
            "description": "مطلوب مع `kind: \"pattern\"`. تعبير نمطي يجب أن تطابقه القيمة بالكامل. التوكيدات (lookarounds) والمراجع الخلفية (backreferences) غير مدعومة."
          },
          "message": {
            "type": "string",
            "nullable": true,
            "maxLength": 120,
            "description": "يظهر للموقّع بدلاً من الخطأ الافتراضي."
          }
        }
      },
      "SignatureFieldAnchor": {
        "type": "object",
        "description": "يضع حقلاً بالاستناد إلى نص داخل المستند بدلاً من الموضع. لا تحذف Didit النص من ملف PDF، لذا اكتبه بنفس لون خلفية الصفحة. عندما لا يتم العثور على النص، يُرجع الاستدعاء رمز `400` مع `field_anchor_not_found`. راجع [وضع الحقول حسب النص المرجعي](/ar/sessions-api/create-session#وضع-الحقول-بحسب-نص-anchor).",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "النص الذي تم البحث عنه في المستند. بالنسبة لملف Word، يتم البحث في ملف PDF المحول."
          },
          "occurrence": {
            "type": "string",
            "enum": [
              "first",
              "all"
            ],
            "default": "first",
            "description": "يضع `all` حقلاً واحدًا لكل تطابق؛ وتحصل المفاتيح بعد الأول على `_2` و`_3` وهكذا."
          },
          "offset_x": {
            "type": "number",
            "description": "مُضافة إلى الحافة اليسرى للنص، كنسبة من عرض الصفحة."
          },
          "offset_y": {
            "type": "number",
            "description": "مُضافة إلى الحافة العلوية للنص، كنسبة من ارتفاع الصفحة."
          },
          "width": {
            "type": "number",
            "minimum": 0.02,
            "maximum": 1,
            "description": "عرض الحقل، كنسبة من عرض الصفحة."
          },
          "height": {
            "type": "number",
            "minimum": 0.012,
            "maximum": 1,
            "description": "ارتفاع الحقل، كنسبة من ارتفاع الصفحة."
          }
        }
      },
      "SignatureFieldResult": {
        "type": "object",
        "description": "حقل في مستند موقّع، مع قيمته في نسخة هذا الموقّع. راجع [الحقول](/ar/core-technology/electronic-signature/report-electronic-signature#الحقول).",
        "properties": {
          "key": {
            "type": "string",
            "description": "مفتاح الحقل، كما هو مستخدم في `sign.field_values`."
          },
          "type": {
            "type": "string",
            "enum": [
              "signature",
              "initials",
              "full_name",
              "date_signed",
              "text",
              "checkbox",
              "email",
              "data"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "verified_person",
              "legal_representative",
              "key_people"
            ]
          },
          "label": {
            "type": "string"
          },
          "page": {
            "type": "integer",
            "description": "رقم الصفحة، يبدأ من 1. بالنسبة لمستند Word، تكون صفحة من ملف PDF المُحوَّل."
          },
          "x": {
            "type": "number",
            "description": "الحافة اليسرى، ككسر من عرض الصفحة."
          },
          "y": {
            "type": "number",
            "description": "الحافة العلوية، كنسبة من ارتفاع الصفحة."
          },
          "width": {
            "type": "number",
            "description": "العرض، كنسبة من عرض الصفحة."
          },
          "height": {
            "type": "number",
            "description": "الارتفاع، كنسبة من ارتفاع الصفحة."
          },
          "required": {
            "type": "boolean"
          },
          "value": {
            "nullable": true,
            "description": "سلسلة نصية لـ `text` و `email` و `full_name` و `date_signed` و `data`، وقيمة منطقية لـ `checkbox`، و `true` لتوقيع أو أحرف أولى مُضافة. `null` عندما تكون فارغة."
          },
          "display_value": {
            "type": "string",
            "nullable": true,
            "description": "القيمة كما تم ختمها على الصفحة: التواريخ وفق `date_format` الخاص بالحقل، أو `Yes` أو `No` لخانات الاختيار، أو `Signed` للتوقيع أو الأحرف الأولى."
          },
          "value_source": {
            "type": "string",
            "nullable": true,
            "enum": [
              "signer",
              "identity",
              "contact",
              "company",
              "session",
              "metadata",
              "api",
              "signing_time",
              null
            ],
            "description": "مصدر القيمة: `signer` (مكتوبة، أو محددة، أو مطبقة بواسطة الموقّع)، أو `identity` (الهوية التي تم التحقق منها)، أو `contact` (البريد الإلكتروني أو الهاتف الذي تم التحقق منه)، أو `company` (الشركة التي تم التحقق منها)، أو `session` (`vendor_data`)، أو `metadata`، أو `api` (`sign.field_values`)، أو `signing_time` (تاريخ التوقيع)."
          },
          "filled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "image_url": {
            "type": "string",
            "nullable": true,
            "description": "التوقيع والأحرف الأولى فقط: مسار الصورة المطبقة. راجع [تنزيل صورة التوقيع](/ar/sessions-api/electronic-signature/download-field-image)."
          },
          "value_unavailable_reason": {
            "type": "string",
            "nullable": true,
            "enum": [
              "source_empty",
              null
            ],
            "description": "`source_empty` عندما لا يحتوي حقل مملوء مسبقاً على أي قيمة في الجلسة وسمح `signature_field_data_missing_action` للموقّع بالتوقيع على أي حال."
          }
        }
      },
      "VaspDirectoryWidgetEntry": {
        "type": "object",
        "description": "ما يظهره منتقي VASP للمستخدم النهائي: هوية VASP وما إذا كان يمكن الوصول إليه.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الإدخال، لـ GET /v3/travel-rule/vasps/{vasp_id}/."
          },
          "kind": {
            "type": "string",
            "enum": [
              "directory",
              "didit"
            ],
            "description": "directory لمُدخل في الدليل المشترك؛ didit لعضو في شبكة Didit."
          },
          "name": {
            "type": "string"
          },
          "lei": {
            "type": "string"
          },
          "jurisdiction": {
            "type": "string",
            "description": "رمز الدولة وفقاً لـ ISO 3166، كما يوفره المصدر."
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "نطاقات الويب الخاصة بـ VASP. تكون فارغة دائماً لأعضاء شبكة Didit."
          },
          "reachable": {
            "type": "boolean",
            "description": "ما إذا كان تطبيقك يحتوي على مسار متاح إلى هذا VASP، أو إلى أحد كياناته لعلامة تجارية معينة. تكون القيمة دائماً true لعضو شبكة Didit."
          }
        }
      },
      "TravelRuleDataSharingFields": {
        "type": "object",
        "description": "الحقول التي ترسلها Didit إلى VASP للطرف المقابل حول المستخدمين لديك، لكل نوع كيان. يتم إرسال `name` و`wallet_address` دائماً بغض النظر عما تحدده القائمة. نوع الكيان الذي لم تختَره مطلقاً يشارك كل الحقول. كما أن القائمة الفارغة تُعد خياراً أيضاً: حيث تشارك الاسم والمحفظة فقط.",
        "properties": {
          "individual": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "name",
                "wallet_address",
                "address",
                "national_id",
                "customer_identification",
                "date_of_birth",
                "place_of_birth"
              ]
            },
            "description": "الحقول التي تمت مشاركتها حول شخص طبيعي."
          },
          "company": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "name",
                "wallet_address",
                "address",
                "national_id",
                "customer_identification"
              ]
            },
            "description": "الحقول التي تمت مشاركتها حول شخص اعتباري."
          }
        }
      },
      "TravelRuleMatchingRules": {
        "type": "object",
        "description": "مدى دقة مقارنة كل حقل من بيانات الطرف المقابل مع ما تحتفظ به، لكل نوع جهة. يحتفظ الحقل الذي تتركه بقيمته الافتراضية. تتخطى `NONE` المقارنة، وتتطلب `STRICT` نفس الكلمات تماماً، وتقبل `CONTAINS` قيمة واحدة تظهر جميع كلماتها في القيمة الأخرى، وتعتمد `DEFAULT` المطابقة الجزئية القياسية، بينما تقبل `FUZZY` التهجئات المتقاربة (ولتواريخ الميلاد، تبديل اليوم والشهر).",
        "properties": {
          "individual": {
            "type": "object",
            "description": "قواعد لشخص طبيعي.",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "NONE",
                  "STRICT",
                  "CONTAINS",
                  "DEFAULT",
                  "FUZZY"
                ],
                "description": "افتراضي: يتبع `name_matching_strictness`."
              },
              "date_of_birth": {
                "type": "string",
                "enum": [
                  "NONE",
                  "STRICT",
                  "CONTAINS",
                  "DEFAULT",
                  "FUZZY"
                ],
                "description": "القيمة الافتراضية `NONE`."
              },
              "address": {
                "type": "string",
                "enum": [
                  "NONE",
                  "STRICT",
                  "CONTAINS",
                  "DEFAULT",
                  "FUZZY"
                ],
                "description": "القيمة الافتراضية `NONE`."
              },
              "account": {
                "type": "string",
                "enum": [
                  "NONE",
                  "STRICT",
                  "CONTAINS",
                  "DEFAULT",
                  "FUZZY"
                ],
                "description": "المحفظة التي تم توجيه التبادل من خلالها. القيمة الافتراضية `STRICT`."
              }
            }
          },
          "company": {
            "type": "object",
            "description": "قواعد لشخص اعتباري.",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "NONE",
                  "STRICT",
                  "CONTAINS",
                  "DEFAULT",
                  "FUZZY"
                ],
                "description": "افتراضي: يتبع `name_matching_strictness`."
              },
              "address": {
                "type": "string",
                "enum": [
                  "NONE",
                  "STRICT",
                  "CONTAINS",
                  "DEFAULT",
                  "FUZZY"
                ],
                "description": "القيمة الافتراضية `NONE`."
              },
              "account": {
                "type": "string",
                "enum": [
                  "NONE",
                  "STRICT",
                  "CONTAINS",
                  "DEFAULT",
                  "FUZZY"
                ],
                "description": "المحفظة التي تم توجيه التبادل من خلالها. القيمة الافتراضية `STRICT`."
              }
            }
          }
        }
      },
      "TravelRuleDataMatch": {
        "type": "object",
        "nullable": true,
        "description": "مقارنة حقلاً بحقل لبيانات طرف التحويل مع ما يعرفه الطرف الآخر عن صاحب المحفظة. تذكر أسماء الحقول والنتائج، ولا تذكر القيم مطلقاً، بحيث تظل قابلة للقراءة مع حجب بيانات الطرف المقابل. تكون Null حتى يتم إجراء المقارنة.",
        "properties": {
          "matched": {
            "type": "boolean",
            "description": "تكون القيمة True عندما لا يختلف أي حقل تمت مقارنته."
          },
          "mismatched_fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "name",
                "date_of_birth",
                "address",
                "account"
              ]
            },
            "description": "الحقول التي تختلف."
          },
          "fields": {
            "type": "object",
            "description": "إدخال واحد لكل حقل خضع للمقارنة لنوع كيان الطرف (`name`، أو `date_of_birth`، أو `address`، أو `account`؛ لا تمتلك الشركة حقل `date_of_birth`).",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "result": {
                  "type": "string",
                  "enum": [
                    "matched",
                    "mismatched",
                    "not_compared"
                  ],
                  "description": "`not_compared` عندما تكون القاعدة `NONE` أو لا يمتلك أي من الطرفين قيمة للحقل."
                },
                "strictness": {
                  "type": "string",
                  "enum": [
                    "NONE",
                    "STRICT",
                    "CONTAINS",
                    "DEFAULT",
                    "FUZZY"
                  ]
                }
              }
            }
          }
        }
      },
      "TravelRuleDataUnmasked": {
        "type": "object",
        "nullable": true,
        "description": "سجل تدقيق للحظة التي تم فيها كشف بيانات الطرف المقابل. تكون القيمة فارغة (Null) طالما بقيت البيانات محجوبة، وكذلك للتحويلات الصادرة.",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string",
            "enum": [
              "ownership_confirmed",
              "wallet_proof",
              "address_book_match",
              "own_verified_wallet",
              "inquiry_approved",
              "known_payment_method",
              "travel_address"
            ],
            "description": "ما أكّد الملكية: ownership_confirmed (تأكيدك من خلال لوحة التحكم أو API)، أو wallet_proof (إثبات المحفظة في الأداة، أو تحويل وارد داخلي INTERNAL، يُعيّن عند إنشائه)، أو address_book_match (محفظة تم التحقق منها في دفتر العناوين)، أو own_verified_wallet (المحفظة الخاصة بمستخدمك والتي تم التحقق منها)، أو inquiry_approved (موافقتك على استفسار TRP وارد أو رسالة GTR أو Sygna)، أو known_payment_method (محفظة دفع بها مستخدمك بالفعل)، أو travel_address (عنوان Travel Address الخاص بكل محفظة الذي يحمل اسم المحفظة)."
          },
          "actor": {
            "type": "string",
            "description": "من أكده: البريد الإلكتروني لمستخدم لوحة التحكم أو تسمية مفتاح API. فارغ في حالة القرار التلقائي."
          }
        }
      },
      "TravelRuleMessageAttachment": {
        "type": "object",
        "nullable": true,
        "description": "المستند المرفق بالرسالة، والمخزن مثل أي مستند معاملة آخر.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "uploaded_by": {
            "type": "string",
            "nullable": true,
            "description": "من أرفقه. في بوابة الاستلام، يُظهر الملف الذي أرسلته اسم VASP الخاص بك، ولا يُظهر مطلقاً الشخص أو مفتاح API الذي يقف وراءه."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "file_url": {
                  "type": "string",
                  "nullable": true,
                  "description": "رابط URL محدد الصلاحية زمنيًا للتنزيل."
                },
                "original_filename": {
                  "type": "string"
                },
                "file_size": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "TravelRuleMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "MESSAGE",
              "DOCUMENT_REQUEST"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "INBOUND",
              "OUTBOUND"
            ],
            "description": "`OUTBOUND` هو ما أرسله طرف القارئ نفسه. في بوابة الاستلام، يكون الاتجاه من جانب الطرف المقابل."
          },
          "author": {
            "type": "string",
            "description": "من كتبه من جانبه: البريد الإلكتروني لمستخدم لوحة التحكم أو تسمية مفتاح API، أو اسم VASP الآخر."
          },
          "body": {
            "type": "string"
          },
          "requested_documents": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "ما يطلبه DOCUMENT_REQUEST، بكلمات صاحب الطلب."
          },
          "reply_to": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "fulfilled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "يُعيَّن على DOCUMENT_REQUEST بمجرد أن يتضمن الرد عليه مستنداً."
          },
          "attachment": {
            "$ref": "#/components/schemas/TravelRuleMessageAttachment"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TravelRuleMessageCreateRequest": {
        "type": "object",
        "description": "أرسل كـ JSON، أو كـ multipart/form-data مع وضع المرفقات في `files`.",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "MESSAGE",
              "DOCUMENT_REQUEST"
            ],
            "default": "MESSAGE"
          },
          "body": {
            "type": "string",
            "maxLength": 5000,
            "description": "مطلوب لـ MESSAGE ما لم يتم إرفاق ملف."
          },
          "requested_documents": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 255
            },
            "maxItems": 10,
            "description": "مطلوب (واحد على الأقل) لـ DOCUMENT_REQUEST، ومسموح به هناك فقط."
          },
          "reply_to": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "رسالة خاصة بالتحويل نفسه. الرد الذي يتضمن مستنداً يلبي طلب المستند الذي يجيب عليه."
          },
          "files": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "binary"
            },
            "maxItems": 5,
            "description": "للطلبات متعددة الأجزاء فقط. ما يصل إلى 5 ملفات بحجم 10 ميغابايت لكل منها."
          }
        }
      },
      "SessionDeletionJob": {
        "type": "object",
        "description": "عملية حذف مجمع للجلسات قيد التشغيل في الخلفية: التقدم والأعداد لكل نتيجة، دون تحديد الجلسات التي حُذفت على الإطلاق.",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "استعلم دورياً عن `GET /v3/sessions/delete/{job_id}/` باستخدام هذا المعرّف."
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "COMPLETED",
              "FAILED"
            ],
            "description": "`PENDING`: مقبولة، لم تبدأ بعد. `PROCESSING`: جارٍ الحذف؛ يجري تحديث `processed` و`outcomes`. `COMPLETED`: تمت معالجة جميع الجلسات المحددة. `FAILED`: توقفت المهمة مبكراً؛ راجع `error`."
          },
          "total": {
            "type": "integer",
            "description": "الجلسات المحددة عند طلب الحذف."
          },
          "processed": {
            "type": "integer",
            "description": "الجلسات التي انتهت المهمة من معالجتها حتى الآن."
          },
          "outcomes": {
            "type": "object",
            "description": "عدد الجلسات التي انتهت بكل نتيجة. كل مفتاح موجود دائماً.",
            "properties": {
              "deleted": {
                "type": "integer",
                "description": "الجلسات المحذوفة مع تضمين الوجه الخاص بها."
              },
              "none": {
                "type": "integer",
                "description": "الجلسات المحذوفة التي لم تكن تحتوي على تضمين الوجه."
              },
              "retained_with_user": {
                "type": "integer",
                "description": "الجلسات المحذوفة مع الاحتفاظ بقالب بيومتري واحد خالٍ من الصور لمستخدمها، وفقًا لما طلبه الطلب أو أوجبته سياسة التطبيق."
              },
              "ineligible_no_vendor_user": {
                "type": "integer",
                "description": "الجلسات المحذوفة، مع تضمين الوجه الخاص بها، لأنه طُلب الاحتفاظ بها ولكن لم يكن لديها مستخدم مرتبط."
              },
              "failed_retryable": {
                "type": "integer",
                "description": "الجلسات التي تم الإبلاغ عن عدم حذفها. تعيد المهمة محاولة معالجة مجموعة لم تتمكن من حذفها بنفسها بدلاً من احتسابها هنا."
              },
              "already_deleted": {
                "type": "integer",
                "description": "الجلسات المحددة التي كانت محذوفة بالفعل، على سبيل المثال بواسطة طلب آخر، عندما وصلت المهمة إليها."
              }
            }
          },
          "deleted_child_verifications": {
            "type": "integer",
            "description": "عمليات التحقق التي أنشأتها عمليات التحقق من الشركات المحذوفة، والتي حُذفت معها. دائماً `0` للمهمة التي بدأت بواسطة `POST /v3/sessions/delete/`، والتي تحذف جلسات KYC فقط."
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "`null` ما لم تكن `status` هي `FAILED`؛ وحينها يبيّن سبب توقف الحذف. الجلسات التي لم تصل إليها المهمة تظل في مكانها: كرر الطلب لحذفها."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت طلب الحذف."
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى انتهت المهمة؛ `null` أثناء تشغيلها."
          }
        }
      },
      "EntityStatusUpdateRequest": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "FLAGGED",
              "BLOCKED"
            ],
            "description": "حالة دورة الحياة الجديدة. يؤدي استخدام `BLOCKED` أيضاً إلى إضافة `vendor_data` إلى قائمة الحظر الخاصة بالنظام."
          }
        }
      },
      "AMLMonitoringToggleResult": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "users_total",
              "already_enabled",
              "with_existing_aml",
              "needing_screening",
              "skipped_no_identity_data",
              "skipped_blocked",
              "estimated_screening_cost_usd",
              "estimated_annual_monitoring_cost_usd",
              "balance_sufficient",
              "unmatched"
            ],
            "description": "معاينة التكلفة. يتم إرجاعها مباشرة عندما يكون estimate_only صحيحاً (لا يتم كتابة أي شيء).",
            "properties": {
              "users_total": {
                "type": "integer",
                "description": "الملفات الشخصية المطابقة للتحديد."
              },
              "already_enabled": {
                "type": "integer",
                "description": "الملفات الشخصية الخاضعة للمراقبة بالفعل (لا يلزم اتخاذ أي إجراء عند التفعيل؛ هذه هي الملفات التي يتم إيقافها عند التعطيل)."
              },
              "with_existing_aml": {
                "type": "integer",
                "description": "الملفات الشخصية التي سيتم تحويل فحص AML الحالي الخاص بها إلى قيد المراقبة (دون إجراء فحص جديد)."
              },
              "needing_screening": {
                "type": "integer",
                "description": "الملفات الشخصية التي لا تخضع لأي فحص AML وسيُجرى فحصها أولاً (تتم فوترتها كفحص AML عادي)."
              },
              "skipped_no_identity_data": {
                "type": "integer",
                "description": "الملفات الشخصية التي لا يمكن فحصها بسبب نقص بيانات الهوية."
              },
              "skipped_blocked": {
                "type": "integer",
                "description": "المستخدمون المحظورون الذين سيتم تخطيهم (تكون دائماً 0 للشركات)."
              },
              "estimated_screening_cost_usd": {
                "type": "number",
                "example": 0.2,
                "description": "التكلفة لمرة واحدة لعمليات الفحص الجديدة."
              },
              "estimated_annual_monitoring_cost_usd": {
                "type": "number",
                "example": 0.07,
                "description": "تكلفة المراقبة السنوية للملفات الشخصية التي ستصبح خاضعة للمراقبة."
              },
              "balance_sufficient": {
                "type": "boolean",
                "description": "ما إذا كان رصيد المؤسسة يغطي الفحص بالإضافة إلى السنة الأولى من المراقبة."
              },
              "unmatched": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "معرّفات الطلب التي لم تطابق أي ملف تعريف في هذا التطبيق، تماماً كما أُرسلت."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "job_id",
              "status",
              "is_enabled",
              "target_type",
              "total",
              "processed",
              "outcomes",
              "results",
              "error",
              "created_at",
              "completed_at",
              "estimate",
              "unmatched"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "enum": [
                  "PENDING",
                  "PROCESSING",
                  "COMPLETED",
                  "FAILED"
                ]
              },
              "is_enabled": {
                "type": "boolean",
                "description": "true عندما تفعّل المهمة المراقبة، وfalse عندما تعطلها."
              },
              "target_type": {
                "type": "string",
                "enum": [
                  "user",
                  "business"
                ],
                "description": "أي عائلة ملفات تعريف تبدّلها المهمة."
              },
              "total": {
                "type": "integer",
                "description": "الملفات الشخصية التي تعالجها المهمة."
              },
              "processed": {
                "type": "integer",
                "description": "الملفات الشخصية التي تمت معالجتها حتى الآن."
              },
              "outcomes": {
                "type": "object",
                "description": "عدادات النتائج لكل سجل. يُحل كل ملف تعريفي محدد إلى عداد واحد بالضبط؛ لا يتم تخطي أي شيء بصمت.",
                "properties": {
                  "enabled": {
                    "type": "integer",
                    "description": "تم تمكين المراقبة على فحص AML حالي."
                  },
                  "screened_and_enabled": {
                    "type": "integer",
                    "description": "تم إنشاء فحص AML جديد (تمت فوترته) وتم تفعيل المراقبة عليه."
                  },
                  "already_enabled": {
                    "type": "integer",
                    "description": "كانت المراقبة نشطة بالفعل؛ لم يتغير شيء ولم تتم فوترة أي شيء."
                  },
                  "disabled": {
                    "type": "integer",
                    "description": "تم إيقاف تشغيل المراقبة في جميع فحوصات AML للملف التعريفي."
                  },
                  "skipped_no_identity_data": {
                    "type": "integer",
                    "description": "تم التخطي: يفتقر الملف التعريفي إلى الاسم الكامل وتاريخ الميلاد والدولة (للمستخدمين) أو الاسم (للشركات) المطلوبة لإجراء الفحص."
                  },
                  "skipped_blocked": {
                    "type": "integer",
                    "description": "تم التخطي: تم حظر المستخدم."
                  },
                  "skipped_sandbox": {
                    "type": "integer",
                    "description": "تم التخطي: تطبيق في البيئة التجريبية، لم يتم إنشاء أي فحص."
                  },
                  "failed_provider": {
                    "type": "integer",
                    "description": "تعذر إكمال الفحص؛ أعد المحاولة لاحقاً."
                  },
                  "failed_insufficient_balance": {
                    "type": "integer",
                    "description": "نفد الرصيد أثناء تشغيل المهمة."
                  }
                }
              },
              "results": {
                "type": "array",
                "description": "إدخال واحد لكل ملف شخصي تمت معالجته، وفق ترتيب المعالجة. تتزايد الإدخالات أثناء تشغيل المهمة؛ وتكتمل بمجرد أن تصبح الحالة COMPLETED. يُسجل للوظائف التي بدأت عبر API.",
                "items": {
                  "type": "object",
                  "properties": {
                    "didit_internal_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "المعرّف الداخلي لـ Didit للملف التعريفي."
                    },
                    "vendor_data": {
                      "type": "string",
                      "nullable": true,
                      "description": "المعرّف الخاص بك للملف الشخصي."
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "enabled",
                        "screened_and_enabled",
                        "already_enabled",
                        "disabled",
                        "skipped_no_identity_data",
                        "skipped_blocked",
                        "skipped_sandbox",
                        "failed_provider",
                        "failed_insufficient_balance"
                      ]
                    }
                  }
                }
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "رسالة فشل عامة عندما تكون الحالة FAILED؛ يتم الاحتفاظ بالسبب التفصيلي من جهة المنصة."
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "completed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "estimate": {
                "type": "object",
                "description": "معاينة التكلفة. يتم إرجاعها مباشرة عندما يكون estimate_only صحيحاً (لا يتم كتابة أي شيء).",
                "properties": {
                  "users_total": {
                    "type": "integer",
                    "description": "الملفات الشخصية المطابقة للتحديد."
                  },
                  "already_enabled": {
                    "type": "integer",
                    "description": "الملفات الشخصية الخاضعة للمراقبة بالفعل (لا يلزم اتخاذ أي إجراء عند التفعيل؛ هذه هي الملفات التي يتم إيقافها عند التعطيل)."
                  },
                  "with_existing_aml": {
                    "type": "integer",
                    "description": "الملفات الشخصية التي سيتم تحويل فحص AML الحالي الخاص بها إلى قيد المراقبة (دون إجراء فحص جديد)."
                  },
                  "needing_screening": {
                    "type": "integer",
                    "description": "الملفات الشخصية التي لا تخضع لأي فحص AML وسيُجرى فحصها أولاً (تتم فوترتها كفحص AML عادي)."
                  },
                  "skipped_no_identity_data": {
                    "type": "integer",
                    "description": "الملفات الشخصية التي لا يمكن فحصها بسبب نقص بيانات الهوية."
                  },
                  "skipped_blocked": {
                    "type": "integer",
                    "description": "المستخدمون المحظورون الذين سيتم تخطيهم (تكون دائماً 0 للشركات)."
                  },
                  "estimated_screening_cost_usd": {
                    "type": "number",
                    "example": 0.2,
                    "description": "التكلفة لمرة واحدة لعمليات الفحص الجديدة."
                  },
                  "estimated_annual_monitoring_cost_usd": {
                    "type": "number",
                    "example": 0.07,
                    "description": "تكلفة المراقبة السنوية للملفات الشخصية التي ستصبح خاضعة للمراقبة."
                  },
                  "balance_sufficient": {
                    "type": "boolean",
                    "description": "ما إذا كان رصيد المؤسسة يغطي الفحص بالإضافة إلى السنة الأولى من المراقبة."
                  }
                }
              },
              "unmatched": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "معرّفات الطلب التي لم تطابق أي ملف تعريف في هذا التطبيق، تماماً كما أُرسلت. وهي ليست جزءاً من المهمة."
              }
            }
          }
        ]
      },
      "AMLMonitoringJob": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "COMPLETED",
              "FAILED"
            ]
          },
          "is_enabled": {
            "type": "boolean",
            "description": "true عندما تفعّل المهمة المراقبة، وfalse عندما تعطلها."
          },
          "target_type": {
            "type": "string",
            "enum": [
              "user",
              "business"
            ],
            "description": "أي عائلة ملفات تعريف تبدّلها المهمة."
          },
          "total": {
            "type": "integer",
            "description": "الملفات الشخصية التي تعالجها المهمة."
          },
          "processed": {
            "type": "integer",
            "description": "الملفات الشخصية التي تمت معالجتها حتى الآن."
          },
          "outcomes": {
            "type": "object",
            "description": "عدادات النتائج لكل سجل. يُحل كل ملف تعريفي محدد إلى عداد واحد بالضبط؛ لا يتم تخطي أي شيء بصمت.",
            "properties": {
              "enabled": {
                "type": "integer",
                "description": "تم تمكين المراقبة على فحص AML حالي."
              },
              "screened_and_enabled": {
                "type": "integer",
                "description": "تم إنشاء فحص AML جديد (تمت فوترته) وتم تفعيل المراقبة عليه."
              },
              "already_enabled": {
                "type": "integer",
                "description": "كانت المراقبة نشطة بالفعل؛ لم يتغير شيء ولم تتم فوترة أي شيء."
              },
              "disabled": {
                "type": "integer",
                "description": "تم إيقاف تشغيل المراقبة في جميع فحوصات AML للملف التعريفي."
              },
              "skipped_no_identity_data": {
                "type": "integer",
                "description": "تم التخطي: يفتقر الملف التعريفي إلى الاسم الكامل وتاريخ الميلاد والدولة (للمستخدمين) أو الاسم (للشركات) المطلوبة لإجراء الفحص."
              },
              "skipped_blocked": {
                "type": "integer",
                "description": "تم التخطي: تم حظر المستخدم."
              },
              "skipped_sandbox": {
                "type": "integer",
                "description": "تم التخطي: تطبيق في البيئة التجريبية، لم يتم إنشاء أي فحص."
              },
              "failed_provider": {
                "type": "integer",
                "description": "تعذر إكمال الفحص؛ أعد المحاولة لاحقاً."
              },
              "failed_insufficient_balance": {
                "type": "integer",
                "description": "نفد الرصيد أثناء تشغيل المهمة."
              }
            }
          },
          "results": {
            "type": "array",
            "description": "إدخال واحد لكل ملف شخصي تمت معالجته، وفق ترتيب المعالجة. تتزايد الإدخالات أثناء تشغيل المهمة؛ وتكتمل بمجرد أن تصبح الحالة COMPLETED. يُسجل للوظائف التي بدأت عبر API.",
            "items": {
              "type": "object",
              "properties": {
                "didit_internal_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "المعرّف الداخلي لـ Didit للملف التعريفي."
                },
                "vendor_data": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الخاص بك للملف الشخصي."
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "enabled",
                    "screened_and_enabled",
                    "already_enabled",
                    "disabled",
                    "skipped_no_identity_data",
                    "skipped_blocked",
                    "skipped_sandbox",
                    "failed_provider",
                    "failed_insufficient_balance"
                  ]
                }
              }
            }
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "رسالة فشل عامة عندما تكون الحالة FAILED؛ يتم الاحتفاظ بالسبب التفصيلي من جهة المنصة."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "estimate": {
            "type": "object",
            "description": "معاينة التكلفة. يتم إرجاعها مباشرة عندما يكون estimate_only صحيحاً (لا يتم كتابة أي شيء).",
            "properties": {
              "users_total": {
                "type": "integer",
                "description": "الملفات الشخصية المطابقة للتحديد."
              },
              "already_enabled": {
                "type": "integer",
                "description": "الملفات الشخصية الخاضعة للمراقبة بالفعل (لا يلزم اتخاذ أي إجراء عند التفعيل؛ هذه هي الملفات التي يتم إيقافها عند التعطيل)."
              },
              "with_existing_aml": {
                "type": "integer",
                "description": "الملفات الشخصية التي سيتم تحويل فحص AML الحالي الخاص بها إلى قيد المراقبة (دون إجراء فحص جديد)."
              },
              "needing_screening": {
                "type": "integer",
                "description": "الملفات الشخصية التي لا تخضع لأي فحص AML وسيُجرى فحصها أولاً (تتم فوترتها كفحص AML عادي)."
              },
              "skipped_no_identity_data": {
                "type": "integer",
                "description": "الملفات الشخصية التي لا يمكن فحصها بسبب نقص بيانات الهوية."
              },
              "skipped_blocked": {
                "type": "integer",
                "description": "المستخدمون المحظورون الذين سيتم تخطيهم (تكون دائماً 0 للشركات)."
              },
              "estimated_screening_cost_usd": {
                "type": "number",
                "example": 0.2,
                "description": "التكلفة لمرة واحدة لعمليات الفحص الجديدة."
              },
              "estimated_annual_monitoring_cost_usd": {
                "type": "number",
                "example": 0.07,
                "description": "تكلفة المراقبة السنوية للملفات الشخصية التي ستصبح خاضعة للمراقبة."
              },
              "balance_sufficient": {
                "type": "boolean",
                "description": "ما إذا كان رصيد المؤسسة يغطي الفحص بالإضافة إلى السنة الأولى من المراقبة."
              }
            }
          },
          "unmatched": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "معرّفات الطلب التي لم تطابق أي ملف تعريف في هذا التطبيق، تماماً كما أُرسلت. وهي ليست جزءاً من المهمة."
          }
        }
      },
      "OngoingMonitoringToggleRequest": {
        "type": "object",
        "required": [
          "is_enabled"
        ],
        "properties": {
          "is_enabled": {
            "type": "boolean",
            "description": "true لتفعيل المراقبة، وfalse لتعطيلها."
          },
          "estimate_only": {
            "type": "boolean",
            "default": false,
            "description": "عند التعيين على true، يُرجع تقدير التكلفة ولا ينفذ أي عمليات كتابة."
          },
          "update_all": {
            "type": "boolean",
            "default": false,
            "description": "التطبيق على كل كيان في التطبيق (ضمن نطاق معاملات filter_* عند وجودها)."
          },
          "filter_search": {
            "type": "string"
          },
          "filter_status": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "filter_country": {
            "type": "string"
          },
          "filter_date_from": {
            "type": "string",
            "format": "date"
          },
          "filter_date_to": {
            "type": "string",
            "format": "date"
          },
          "didit_internal_id_list": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "الكيانات المراد تبديل حالتها. مطلوب ما لم تكن قيمة update_all هي true."
          }
        }
      },
      "OngoingMonitoringJob": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "COMPLETED",
              "FAILED"
            ]
          },
          "is_enabled": {
            "type": "boolean"
          },
          "total": {
            "type": "integer"
          },
          "processed": {
            "type": "integer"
          },
          "outcomes": {
            "type": "object",
            "description": "عدادات النتائج لكل كيان. لا يتم تخطي أي شيء بصمت: يتم حل كل كيان مطلوب إلى عداد واحد بالضبط.",
            "properties": {
              "enabled": {
                "type": "integer",
                "description": "تم تمكين المراقبة على فحص AML حالي."
              },
              "screened_and_enabled": {
                "type": "integer",
                "description": "تم إنشاء فحص AML جديد (تمت فوترته) وتم تفعيل المراقبة."
              },
              "already_enabled": {
                "type": "integer",
                "description": "كانت المراقبة نشطة بالفعل (تم دمج الصفوف المكررة القديمة)."
              },
              "disabled": {
                "type": "integer",
                "description": "تم تعطيل المراقبة في كل صف AML للكيان."
              },
              "skipped_no_identity_data": {
                "type": "integer",
                "description": "تم التخطي: لا يتوفر الاسم الكامل + تاريخ الميلاد + الدولة لإجراء الفحص."
              },
              "skipped_blocked": {
                "type": "integer",
                "description": "تم التخطي: تم حظر المستخدم."
              },
              "skipped_sandbox": {
                "type": "integer",
                "description": "تم التخطي: تطبيق في البيئة التجريبية."
              },
              "failed_provider": {
                "type": "integer",
                "description": "فشل استدعاء مزود الفحص."
              },
              "failed_insufficient_balance": {
                "type": "integer",
                "description": "نفد الرصيد في منتصف المهمة."
              }
            }
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "estimate": {
            "type": "object",
            "description": "معاينة التكلفة. يتم إرجاعها مباشرة عندما يكون estimate_only صحيحاً (لا يتم إجراء أي عمليات كتابة).",
            "properties": {
              "users_total": {
                "type": "integer",
                "description": "الكيانات الموجودة في التحديد."
              },
              "already_enabled": {
                "type": "integer"
              },
              "with_existing_aml": {
                "type": "integer",
                "description": "الكيانات التي سيتم تحويل فحص AML الحالي الخاص بها إلى حالة المراقبة."
              },
              "needing_screening": {
                "type": "integer",
                "description": "الكيانات التي ليس لها أي فحص AML والتي سيتم فحصها أولاً (تتم فوترتها)."
              },
              "skipped_no_identity_data": {
                "type": "integer"
              },
              "skipped_blocked": {
                "type": "integer"
              },
              "estimated_screening_cost_usd": {
                "type": "number",
                "example": 0.2
              },
              "estimated_annual_monitoring_cost_usd": {
                "type": "number",
                "example": 0.07
              },
              "balance_sufficient": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "OngoingMonitoringToggleResult": {
        "oneOf": [
          {
            "type": "object",
            "description": "معاينة التكلفة. يتم إرجاعها مباشرة عندما يكون estimate_only صحيحاً (لا يتم إجراء أي عمليات كتابة).",
            "properties": {
              "users_total": {
                "type": "integer",
                "description": "الكيانات الموجودة في التحديد."
              },
              "already_enabled": {
                "type": "integer"
              },
              "with_existing_aml": {
                "type": "integer",
                "description": "الكيانات التي سيتم تحويل فحص AML الحالي الخاص بها إلى حالة المراقبة."
              },
              "needing_screening": {
                "type": "integer",
                "description": "الكيانات التي ليس لها أي فحص AML والتي سيتم فحصها أولاً (تتم فوترتها)."
              },
              "skipped_no_identity_data": {
                "type": "integer"
              },
              "skipped_blocked": {
                "type": "integer"
              },
              "estimated_screening_cost_usd": {
                "type": "number",
                "example": 0.2
              },
              "estimated_annual_monitoring_cost_usd": {
                "type": "number",
                "example": 0.07
              },
              "balance_sufficient": {
                "type": "boolean"
              }
            }
          },
          {
            "$ref": "#/components/schemas/OngoingMonitoringJob"
          }
        ]
      },
      "CaseBlueprintPresetInstallResult": {
        "type": "object",
        "properties": {
          "created": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CaseBulkUpdateResult": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "integer"
          },
          "failures": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "case_uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "detail": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "RegulatoryReportList": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "عدد الصفوف المتطابقة، بحد أقصى 100 لتحسين الأداء."
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegulatoryReportDetail"
            }
          }
        }
      },
      "EntityNetworkMembershipList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntityNetworkMembership"
            }
          }
        }
      },
      "SessionDecision": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "المعرّف الفريد للجلسة."
          },
          "session_kind": {
            "type": "string",
            "enum": [
              "user",
              "business"
            ],
            "description": "معرّف تمييز يوضح ما إذا كانت هذه جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB). عندما تكون `user`، تنطبق مصفوفات ميزات KYC (`id_verifications`، `nfc_verifications`، `liveness_checks`، `face_matches`، `poa_verifications`، `document_ai_documents`، `database_validations`، ...) وتغيب مصفوفات الشركات. وعندما تكون `business`، يحتوي الـ payload بدلاً من ذلك على `registry_checks`، و`document_verifications`، و`key_people_checks` بالإضافة إلى المصفوفات المشتركة (`aml_screenings`، `phone_verifications`، `email_verifications`، `ip_analyses`، `questionnaire_responses`). **يتم حذفه عند تمرير `include=events`** — فشكل الأحداث موجود فقط لجلسات المستخدمين، لذلك يُستبعد معرّف التمييز من هذا الشكل."
          },
          "shared_from_session": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "للجلسة المستنسخة باستخدام `POST /v3/session/import-shared/`: قيمة `session_id` للجلسة الأصلية في التطبيق المصدر. وتكون `null` لكل جلسة أخرى. لا يتم تضمينها عند تمرير `include=events`."
          },
          "shared_from_session_number": {
            "type": "integer",
            "nullable": true,
            "description": "`session_number` للجلسة المصدر عند استيراد هذه الجلسة من تطبيق آخر تابع لمؤسستك. `null` خلاف ذلك."
          },
          "session_number": {
            "type": "integer",
            "description": "رقم الجلسة.",
            "nullable": true
          },
          "session_url": {
            "type": "string",
            "format": "uri",
            "description": "رابط URL الخاص بالجلسة.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "Not Started",
              "In Progress",
              "Awaiting User",
              "In Review",
              "Approved",
              "Declined",
              "Resubmitted",
              "Expired",
              "Kyc Expired",
              "Abandoned"
            ],
            "description": "حالة دورة الحياة الإجمالية للجلسة — النتيجة التراكمية لسير العمل. القيم النهائية هي `Approved` و`Declined` و`In Review` و`Expired` و`Kyc Expired` و`Abandoned`؛ بينما تشير `Not Started` و`In Progress` و`Awaiting User` و`Resubmitted` إلى أن الجلسة لا تزال تتقدم في سير العمل."
          },
          "status_override": {
            "type": "object",
            "nullable": true,
            "description": "موجود عندما يحدد المراجِع `status` يدوياً. يكون `null` عندما تكون الحالة تلقائية. استخدمه للتمييز بين الموافقة اليدوية والتلقائية.",
            "properties": {
              "overridden_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "automatic_status": {
                "type": "string",
                "nullable": true,
                "description": "الحالة التي تخلص إليها الفحوصات الخاصة بالمنصة."
              }
            }
          },
          "decision_trace": {
            "type": "object",
            "description": "كيفية الوصول إلى الحالة: من قام بتعيينها وأي التحذيرات تسببت في ذلك.",
            "properties": {
              "status": {
                "type": "string",
                "description": "حالة الجلسة."
              },
              "decided_by": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "manual",
                  "automatic",
                  "investigator",
                  null
                ],
                "description": "من قام بتعيين الحالة. `null` طالما لم يتم اتخاذ القرار بشأن الجلسة."
              },
              "decided_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "automatic_status": {
                "type": "string",
                "nullable": true,
                "description": "ما تخلص إليه فحوصات المنصة نفسها، وهو ما يختلف عن `status` بعد اتخاذ قرار يدوي."
              },
              "terminal_node_id": {
                "type": "string",
                "nullable": true,
                "description": "عقدة حالة سير العمل التي أنهت الجلسة، في حال قامت إحداها بذلك."
              },
              "actor": {
                "type": "object",
                "nullable": true,
                "description": "المراجِع المسؤول عن القرار اليدوي.",
                "properties": {
                  "user": {
                    "type": "string",
                    "nullable": true
                  },
                  "actor_type": {
                    "type": "string",
                    "nullable": true
                  }
                }
              },
              "warning_counts": {
                "type": "object",
                "description": "التحذيرات حسب `log_type` (`error`، `warning`، `information`) والإجمالي `total`.",
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "status_warnings": {
                "type": "array",
                "description": "التحذيرات التي تحدد حالة `Declined` أو `In Review`.",
                "items": {
                  "type": "object",
                  "properties": {
                    "risk": {
                      "type": "string"
                    },
                    "feature": {
                      "type": "string",
                      "nullable": true
                    },
                    "node_id": {
                      "type": "string",
                      "nullable": true
                    },
                    "log_type": {
                      "type": "string",
                      "nullable": true
                    },
                    "check_status": {
                      "type": "string",
                      "nullable": true
                    },
                    "source": {
                      "type": "string",
                      "description": "قائمة payload التي ورد منها التحذير، على سبيل المثال `id_verifications`."
                    },
                    "short_description": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "linked_records": {
            "type": "object",
            "nullable": true,
            "description": "ملخص لسجلات أخرى مرتبطة بالجلسة. يكون `null` عندما لا يوجد شيء لعرضه، ولسير العمل التي تعلن عن معيار لضمان العمر.",
            "properties": {
              "same_face": {
                "type": "object",
                "nullable": true,
                "description": "أشخاص آخرون تطابق وجههم مع إحدى عمليات البحث بالوجه في هذه الجلسة.",
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "best_match": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "session_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                      },
                      "session_number": {
                        "type": "integer",
                        "nullable": true
                      },
                      "vendor_user_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                      },
                      "similarity_percentage": {
                        "type": "number",
                        "nullable": true
                      }
                    }
                  }
                }
              },
              "earlier_verifications": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "vendor_user_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  }
                }
              },
              "networks": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "open": {
                    "type": "integer"
                  },
                  "dismissed": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "network_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_number": {
                          "type": "integer",
                          "nullable": true
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "risk_score": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "workflow_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف ثابت لمجموعة سير العمل التي أنتجت هذه الجلسة. لمسارات العمل إصدارات — وتحدد هذه القيمة سير العمل نفسه، وليس إصداراً معيناً.",
            "nullable": true
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "ميزة الجلسة."
            },
            "description": "قائمة بميزات التحقق التي تم تكوينها لهذه الجلسة، كأسماء عرض: `ID_VERIFICATION`، و `NFC`، و `LIVENESS`، و `FACE_MATCH`، و `POA`، و `PHONE`، و `EMAIL_VERIFICATION`، و `AML`، و `IP_ANALYSIS`، و `DATABASE_VALIDATION`، و `QUESTIONNAIRE`، و `AGE_ESTIMATION`، و `FACE_SEARCH`، و `GEOLOCATION` (التحقق من الموقع) (تستخدم جلسات التحقق من الشركات (KYB) مجموعة ميزات KYB: `KYB_REGISTRY`، و `KYB_DOCUMENTS`، و `KYB_KEY_PEOPLE`، و `AML`، و `PHONE`، و `EMAIL_VERIFICATION`، و `IP_ANALYSIS`، و `QUESTIONNAIRE`). عند استخدام `include=events`، يصبح كل إدخال كائناً `{feature, node_id}` بدلاً من سلسلة نصية بسيطة، وتتم إعادة تسمية ميزة البريد الإلكتروني: تظهر كـ `EMAIL` في وضع الأحداث بدلاً من `EMAIL_VERIFICATION` المستخدمة هنا."
          },
          "vendor_data": {
            "type": "string",
            "description": "بيانات المزود (vendor data) الخاصة بالجلسة.",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "description": "البيانات الوصفية للجلسة.",
            "nullable": true
          },
          "expected_details": {
            "type": "object",
            "description": "التفاصيل المتوقعة المقدمة عند إنشاء الجلسة — تُستخدم للتحقق المتبادل مقابل البيانات المستخرجة (KYC) أو للملء المسبق لعملية البحث في سجل الشركات (KYB). تُعيد تماماً المفاتيح التي تم تقديمها؛ وتكون `null` عندما لا يتم تقديم أي منها. تحمل جلسات KYC حقول الشخص؛ بينما تحمل جلسات الشركات (KYB) الحقول `company_name` و`registry_country` و`registration_number`.",
            "properties": {
              "first_name": {
                "type": "string",
                "description": "الاسم الأول للمستخدم. على سبيل المثال، `John`."
              },
              "last_name": {
                "type": "string",
                "description": "اسم عائلة المستخدم. على سبيل المثال، `Doe`."
              },
              "date_of_birth": {
                "type": "string",
                "format": "date",
                "description": "تاريخ ميلاد المستخدم بالتنسيق: YYYY-MM-DD. على سبيل المثال، `1990-05-15`."
              },
              "gender": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "M",
                  "F"
                ],
                "default": null,
                "description": "جنس المستخدم. يجب أن يكون 'M' أو 'F' أو null."
              },
              "nationality": {
                "type": "string",
                "description": "رمز الدولة وفق المعيار ISO 3166-1 alpha-3 الذي يمثل بلد المنشأ لمقدم الطلب. على سبيل المثال، `USA`."
              },
              "country": {
                "type": "string",
                "description": "رمز الدولة وفق المعيار ISO 3166-1 alpha-3 الذي يمثل دولة مستند إثبات العنوان، أو دولة مستند هوية مقدم الطلب، والتي قد تختلف عن الجنسية. على سبيل المثال، `GBR`."
              },
              "address": {
                "type": "string",
                "description": "العنوان بتنسيق مقروء للبشر، متضمناً أكبر قدر ممكن من المعلومات. على سبيل المثال، `123 Main St, San Francisco, CA 94105, USA`."
              },
              "identification_number": {
                "type": "string",
                "description": "رقم مستند المستخدم، أو الرقم الشخصي، أو الرقم الضريبي. على سبيل المثال، `123456789`."
              },
              "ip_address": {
                "type": "string",
                "format": "ipv4",
                "description": "عنوان IP المتوقع للجلسة. إذا اختلف عنوان IP الفعلي عن هذه القيمة، فسيتم تسجيل تحذير. على سبيل المثال، `192.168.1.100`."
              },
              "expected_document_types": {
                "type": "array",
                "description": "أنواع المستندات التي تم تقييد خطوة التحقق من الهوية بها عند إنشاء الجلسة. الحقل الفارغ/غير المضبوط يعني عدم وجود قيود. الرموز: `P` (جواز سفر)، و`ID` (بطاقة هوية وطنية)، و`DL` (رخصة قيادة)، و`RP` (تصريح إقامة)، و`HIC` (بطاقة تأمين صحي)، و`TC` (بطاقة ضريبية)، و`SSC` (بطاقة ضمان اجتماعي).",
                "items": {
                  "type": "string",
                  "enum": [
                    "P",
                    "ID",
                    "DL",
                    "RP",
                    "HIC",
                    "TC",
                    "SSC"
                  ]
                }
              },
              "id_country": {
                "type": "string",
                "nullable": true,
                "description": "دولة الإصدار المتوقعة لمستند الهوية (ISO 3166-1 alpha-3)، عند تقييدها في وقت الإنشاء.",
                "example": "ESP"
              },
              "poa_country": {
                "type": "string",
                "nullable": true,
                "description": "دولة مستند إثبات العنوان المتوقعة (ISO 3166-1 alpha-3)، عند تقييدها في وقت الإنشاء.",
                "example": "ESP"
              },
              "company_name": {
                "type": "string",
                "description": "الاسم القانوني المتوقع للشركة. لجلسات الشركات (KYB) فقط."
              },
              "registry_country": {
                "type": "string",
                "description": "دولة السجل المتوقعة بصيغة `XX` أو `XX-YY` (رمز ISO 3166-1 alpha-2، اختيارياً مع تقسيم فرعي ISO 3166-2 للسجلات على مستوى الولاية، مثل `US-CA`). لجلسات الشركات (KYB) فقط."
              },
              "registration_number": {
                "type": "string",
                "description": "رقم تسجيل الشركة المتوقع. جلسات التحقق من الشركات (KYB) فقط."
              }
            },
            "nullable": true
          },
          "contact_details": {
            "type": "object",
            "description": "تفاصيل الاتصال المقدمة عند إنشاء الجلسة (تُستخدم لرسائل البريد الإلكتروني للإشعارات، والتحقق من الهاتف/البريد الإلكتروني المعبأ مسبقاً، ولغة التواصل). تكون القيمة `null` عند عدم تقديم بريد إلكتروني أو رقم هاتف.",
            "properties": {
              "email": {
                "type": "string",
                "description": "عنوان البريد الإلكتروني للمستخدم (مثل \"john.doe@example.com\") الذي سيتم استخدامه أثناء خطوة التحقق من البريد الإلكتروني. إذا لم يتم توفيره، يجب على المستخدم تقديمه أثناء مسار التحقق."
              },
              "email_lang": {
                "type": "string",
                "description": "رمز اللغة (ISO 639-1) لإشعارات البريد الإلكتروني. يتحكم في لغة جميع اتصالات البريد الإلكتروني (مثل \"en\" و\"es\" و\"fr\")."
              },
              "send_notification_emails": {
                "type": "boolean",
                "default": false,
                "description": "إذا كانت القيمة true وتم توفير بريد إلكتروني، ترسل Didit رسالة البريد الإلكتروني الأولية \"Verify your identity\" بشكل غير متزامن عند إنشاء جلسة التحقق من المستخدمين (KYC) أو التحقق من الشركات (KYB). ترسل Didit أيضاً إشعارات بحالة التحقق للجلسات التي تتطلب مراجعة يدوية إلى عنوان البريد الإلكتروني المقدَّم."
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "رقم هاتف المستخدم بتنسيق E.164 إذا كان متاحاً (على سبيل المثال، +14155552671). يكون `null` إذا تم تقديم بريد إلكتروني فقط عند إنشاء الجلسة. ملاحظة: يعيد هذا الحقل رقم الهاتف الأصلي المقدم أثناء إنشاء الجلسة. إذا كان الرقم غير صالح، فقد لا يكون بتنسيق E.164."
              }
            },
            "nullable": true
          },
          "callback": {
            "type": "string",
            "format": "uri",
            "description": "رابط الاستدعاء الخاص بالجلسة.",
            "nullable": true
          },
          "id_verifications": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير التحقق من الهوية (OCR)** التي تم إنشاؤها بواسطة خطوات مستند الهوية في مخطط سير العمل. دائماً ما تكون مصفوفة JSON — اقرأ `id_verifications[0]` وكرّر القراءة إذا كان بإمكان سير العمل لديك تشغيل أكثر من فحص هوية واحد (على سبيل المثال، فحص أساسي بالإضافة إلى فحص إضافي). تكون `null` حتى تُنتج خطوة هوية واحدة على الأقل بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، وحقول المستند المستخرجة، وعناوين URL للصور، ودرجات الجودة، وMRZ، وتحليل العنوان، والتطابقات عبر الجلسات، و`warnings[]`.",
            "items": {
              "type": "object",
              "description": "تقرير واحد للتحقق من الهوية - التقرير الكامل لخطوة واحدة من التحقق من الهوية. يوضح `verification_method` أي من الطرق الثلاث أنتجته (التقاط المستند، أو البحث دون مستند، أو تسجيل الدخول بالمحفظة) ويتم ملء كتلة الأدلة الخاصة بالطريقة وفقاً لذلك.",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "معرّف عقدة مخطط سير العمل لخطوة OCR التي أنتجت هذا التقرير."
                },
                "verification_method": {
                  "type": "string",
                  "enum": [
                    "document",
                    "id_lookup",
                    "wallet"
                  ],
                  "description": "أي طريقة من طرق التحقق من الهوية أنتجت هذا التقرير. `document` - قام المستخدم بتصوير هوية فعلية (الافتراضية، والقيمة في كل جلسة تم إنشاؤها قبل وجود الطرق الأخرى). `id_lookup` - قام المستخدم بكتابة رقم هويته الوطنية وتم التحقق منه مقابل سجل حكومي أو مصدر موثوق آخر لتلك الدولة (يحدد `id_lookup.source` أي مصدر). `wallet` - قام المستخدم بتسجيل الدخول باستخدام هوية رقمية حكومية أو مصرفية."
                },
                "assurance": {
                  "type": "string",
                  "enum": [
                    "documentary",
                    "data_match",
                    "cryptographic"
                  ],
                  "description": "مستوى الضمان المشتق من `verification_method`: `documentary` لمستند تم التقاطه والتحقق منه، `data_match` للتفاصيل التي تطابقت مع سجل يحتفظ به المصدر الذي تم الاستعلام عنه، `cryptographic` للسمات التي صادق عليها موفر الهوية ووقّعها."
                },
                "wallet_provider": {
                  "type": "string",
                  "nullable": true,
                  "description": "معرّف المحفظة من الدليل عندما يكون `verification_method` هو `wallet` (`mitid`، `bankid_se`، `itsme`، ...). يكون `null` بخلاف ذلك."
                },
                "fallback_from": {
                  "type": "object",
                  "nullable": true,
                  "description": "سبب عدم إنهاء الطريقة غير المعتمدة على المستندات لخطوة التحقق من الهوية. يتم تعيينه عند فشل البحث أو تسجيل الدخول بالمحفظة: في التحقق من المستند الذي واصل المستخدم عبره عندما كان خيار الرجوع الاحتياطي للدولة هو `fallback_to_document` (حيث `action` هو `fallback_to_document`)، أو في التقرير المرفوض عندما كان `decline`. ويكون `null` في الحالات الأخرى.",
                  "properties": {
                    "method": {
                      "type": "string",
                      "enum": [
                        "id_lookup",
                        "wallet"
                      ],
                      "description": "الطريقة التي فشلت."
                    },
                    "reason": {
                      "type": "string",
                      "description": "النتيجة التي أنهته، مثل `no_match` أو `provider_error` أو `cancelled` أو `timeout`."
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "fallback_to_document",
                        "decline"
                      ],
                      "description": "الإجراء المُعَدّ الذي تم اتخاذه: `fallback_to_document` أو `decline`."
                    }
                  }
                },
                "id_lookup": {
                  "type": "object",
                  "nullable": true,
                  "description": "دليل السجل. يتوفر فقط عندما تكون `verification_method` بقيمة `id_lookup`؛ ويكون `null` فيما عدا ذلك.",
                  "properties": {
                    "source": {
                      "type": "string",
                      "description": "اسم المصدر الذي تم الاستعلام عنه كما يظهر للعميل، مثل `Department of Home Affairs` (سجل حكومي) أو `UK credit bureau and financial services records` (ليس سجلاً حكومياً). هذا هو البيان الوحيد لمصدر البحث؛ لا تفترض أنه مصدر حكومي."
                    },
                    "checked_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "متى استجاب السجل."
                    },
                    "attempts": {
                      "type": "integer",
                      "description": "رقم المحاولة (بدءاً من 1) التي ورد منها هذا التقرير."
                    },
                    "max_attempts": {
                      "type": "integer",
                      "description": "عدد المحاولات المسموح به والمُهيأ للدولة (من 1 إلى 5، القيمة الافتراضية 1)."
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "match",
                        "partial_match",
                        "no_match",
                        "provider_error",
                        "format_rejected"
                      ],
                      "nullable": true,
                      "description": "ما أجاب به السجل. يُحسب فقط `match` و`partial_match` و`no_match` ضمن ميزانية المحاولات والفاتورة."
                    },
                    "comparison": {
                      "type": "array",
                      "description": "صف واحد لكل حقل قابل للمقارنة أجاب عنه المصدر، بالإضافة إلى صف واحد لكل خطأ في المصدر. تستخدم صفوف المقارنة أسماء الحقول المعيارية أدناه بدلاً من مفاتيح حقول طلب الدولة، لأن عدة حقول طلب (الاسم الأول واسم العائلة، أو أي من الأسماء المستعارة للمعرّف) تندمج في مقارنة واحدة. المصدر الذي فشل يلحق صفاً يحتوي على `field: \"provider\"` و `result: \"error\"`، لذا اقرأ `result` قبل التعامل مع الصف كقرار للحقل.",
                      "items": {
                        "type": "object",
                        "required": [
                          "field",
                          "label",
                          "provided",
                          "record",
                          "result"
                        ],
                        "properties": {
                          "field": {
                            "type": "string",
                            "enum": [
                              "identification_number",
                              "full_name",
                              "date_of_birth",
                              "address",
                              "provider"
                            ],
                            "description": "حقل مقارنة معياري. `provider` ليس حقلاً للمستخدم: بل يشير إلى صف خطأ في المصدر."
                          },
                          "label": {
                            "type": "string",
                            "description": "تسمية العرض للصف، مثل `ID number`، `Full name`، `Provider`."
                          },
                          "provided": {
                            "type": "string",
                            "nullable": true,
                            "description": "ما كتبه المستخدم. يكون `null` في صف خطأ `provider`."
                          },
                          "record": {
                            "type": "string",
                            "nullable": true,
                            "description": "ما احتفظ به المصدر. في صف خطأ `provider`، يحمل هذا الحقل رسالة الخطأ بدلاً من ذلك."
                          },
                          "result": {
                            "type": "string",
                            "enum": [
                              "match",
                              "partial",
                              "no_match",
                              "error"
                            ],
                            "description": "نتيجة المقارنة لكل حقل. تظهر القيمة `error` فقط في صف `provider` وتفيد بأن ذلك المصدر لم يستجب؛ تعامل معها كدليل حول الاستعلام، ولا تعتبرها أبداً دليلاً على عدم تطابق في الحقول."
                          }
                        }
                      }
                    },
                    "registry_portrait": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL موقع مسبقاً قصير الأجل للصورة الشخصية التي أرجعها المصدر. فقط لسجلات الحكومات الأربعة التي تُرجع صورة (جنوب إفريقيا، ونيجيريا، والأرجنتين، وبنما)."
                    },
                    "face_match_score": {
                      "type": "number",
                      "nullable": true,
                      "description": "صورة سيلفي مقابل الصورة الشخصية في السجل، 0-100. فقط عندما يُرجع السجل صورة شخصية."
                    }
                  }
                },
                "wallet_verification": {
                  "type": "object",
                  "nullable": true,
                  "description": "دليل بيانات الاعتماد. يظهر فقط عندما تكون قيمة `verification_method` هي `wallet`؛ ويكون `null` في الحالات الأخرى.",
                  "properties": {
                    "provider": {
                      "type": "string",
                      "description": "معرّف المحفظة من الدليل، مثل `mitid`."
                    },
                    "provider_name": {
                      "type": "string",
                      "nullable": true,
                      "description": "اسم المحفظة كما يعرفه المستخدم النهائي، على سبيل المثال `MitID`."
                    },
                    "issuing_authority": {
                      "type": "string",
                      "nullable": true,
                      "description": "الجهة المسؤولة عن المحفظة، مثل `Danish Agency for Digital Government`."
                    },
                    "issuing_country": {
                      "type": "string",
                      "description": "الدولة بتنسيق ISO 3166-1 alpha-3 التي تم تقديم المحفظة فيها."
                    },
                    "credential_type": {
                      "type": "string",
                      "nullable": true,
                      "description": "بيانات الاعتماد التي قدمتها المحفظة، مثل `person_identification`."
                    },
                    "level_of_assurance": {
                      "type": "string",
                      "enum": [
                        "low",
                        "substantial",
                        "high"
                      ],
                      "nullable": true,
                      "description": "مستوى التأكيد الذي أكدته المحفظة. يفشل تسجيل الدخول الذي يؤكد مستوى أقل من المستوى المطلوب بدلاً من خفض المستوى."
                    },
                    "verified_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "لحظة مصادقة المحفظة."
                    },
                    "signature_valid": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "ما إذا كان قد تم التحقق من صحة الإقرار الموقّع الذي أرجعته المحفظة."
                    },
                    "attributes": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "السمات التي شاركتها المحفظة، مفهرسة كما يسردها إدخال دليل المحفظة."
                    },
                    "portrait": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "رابط URL موقع مسبقاً قصير الأجل للصورة الشخصية التي شاركتها المحفظة، حيث تشارك واحدة."
                    },
                    "face_match_score": {
                      "type": "number",
                      "nullable": true,
                      "description": "صورة سيلفي مقابل الصورة الشخصية للمحفظة، 0-100، عندما تشارك المحفظة واحدة."
                    }
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Expired"
                  ],
                  "description": "حالة مستوى الميزة لخطوة التحقق من الهوية هذه. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`."
                },
                "document_type": {
                  "type": "string",
                  "description": "نوع مستند التحقق من الهوية"
                },
                "document_subtype": {
                  "type": "string",
                  "nullable": true,
                  "description": "رمز النوع الفرعي للمستند المقبول من إعدادات مستند سير العمل، بما في ذلك منطقة المستند عند الاقتضاء. أمثلة: `ID_CARD_GENERIC`، `QUEENSLAND_DRIVER_LICENSE_GENERIC`."
                },
                "document_number": {
                  "type": "string",
                  "description": "رقم تعريف المستند"
                },
                "personal_number": {
                  "type": "string",
                  "description": "رقم التعريف الشخصي"
                },
                "portrait_image": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL للصورة الشخصية"
                },
                "front_image": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لصورة وجه المستند"
                },
                "front_video": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لفيديو وجه المستند"
                },
                "back_image": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لصورة الوجه الخلفي للمستند"
                },
                "back_video": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لفيديو ظهر المستند"
                },
                "full_front_image": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لصورة وجه المستند الكاملة"
                },
                "full_back_image": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لصورة ظهر المستند الكاملة"
                },
                "front_image_camera_front": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لصورة وجه المستند الملتقطة من الكاميرا الأمامية"
                },
                "back_image_camera_front": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لصورة ظهر المستند الملتقطة من الكاميرا الأمامية"
                },
                "date_of_birth": {
                  "type": "string",
                  "format": "date",
                  "description": "تاريخ الميلاد من المستند"
                },
                "age": {
                  "type": "integer",
                  "description": "العمر المحسوب من تاريخ الميلاد"
                },
                "expiration_date": {
                  "type": "string",
                  "format": "date",
                  "description": "تاريخ انتهاء المستند"
                },
                "date_of_issue": {
                  "type": "string",
                  "format": "date",
                  "description": "تاريخ إصدار المستند"
                },
                "issuing_state": {
                  "type": "string",
                  "description": "رمز ISO للولاية المُصدِرة"
                },
                "issuing_state_name": {
                  "type": "string",
                  "description": "الاسم الكامل للولاية المُصدِرة"
                },
                "first_name": {
                  "type": "string",
                  "description": "الاسم الأول من المستند"
                },
                "last_name": {
                  "type": "string",
                  "description": "اسم العائلة من المستند"
                },
                "full_name": {
                  "type": "string",
                  "description": "الاسم الكامل من المستند"
                },
                "gender": {
                  "type": "string",
                  "description": "الجنس من المستند"
                },
                "address": {
                  "type": "string",
                  "description": "العنوان الخام من المستند"
                },
                "formatted_address": {
                  "type": "string",
                  "description": "العنوان الكامل المنسق"
                },
                "place_of_birth": {
                  "type": "string",
                  "description": "مكان الميلاد من المستند"
                },
                "marital_status": {
                  "type": "string",
                  "description": "الحالة الاجتماعية من المستند"
                },
                "nationality": {
                  "type": "string",
                  "description": "رمز الجنسية حسب معيار ISO"
                },
                "extra_fields": {
                  "type": "object",
                  "description": "حقول المستند الإضافية. تتضمن سمات خاصة بالمستند (مثل `dl_categories` و`blood_group` و`sponsor` و`employer` و`dl_class_code_b_from` و`dl_class_code_b_to`). تُعاد تواريخ صلاحية فئة رخصة القيادة بتنسيق `dl_class_code_<class>_from` و`dl_class_code_<class>_to`، ورموز القيود/المعلومات لكل فئة (مثل العمود 12 في رخص المملكة المتحدة) بتنسيق `dl_class_code_<class>_notes`. عندما يحتوي المستند على أسماء أو عنوان أو مكان الميلاد بأنظمة كتابة متعددة، يتضمن هذا الكائن أيضاً إصدارات بنظام الكتابة البديل لتلك الحقول. يتحكم إعداد سير العمل `preferred_characters` (`latin` أو `non_latin`) في نظام الكتابة الذي يملأ الحقول من المستوى الأعلى (`first_name` و`last_name` و`full_name` و`address` و`place_of_birth`)؛ بينما يظهر نظام الكتابة المعاكس هنا باسم `first_name_non_latin` / `last_name_non_latin` / `full_name_non_latin` / `middle_name_non_latin` / `address_non_latin` / `place_of_birth_non_latin` (عندما تكون `preferred_characters` هي `latin`) أو مع لاحقة `_latin` (عندما تكون `preferred_characters` هي `non_latin`). تظهر المفاتيح فقط عندما يستخرج OCR بالفعل قيمة حقيقية بنظام كتابة بديل، ويتم تخطي أي حقل تكون قيمته البديلة بنفس نظام كتابة المجموعة المفضلة (على سبيل المثال، حقل مصنف بالسيريلية وتكون قيمة OCR الخاصة به قد عادت بأحرف لاتينية متشابهة الشكل). عندما تكون `preferred_characters` هي `latin` لكن المستند يحتوي فقط على نص غير لاتيني، تقوم Didit بنقل الحروف صوتياً للقيم المستخرجة وتوفر `first_name_latin` / `last_name_latin` / إلخ كخيار احتياطي.",
                  "additionalProperties": true,
                  "properties": {
                    "dl_categories": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "blood_group": {
                      "type": "string",
                      "nullable": true
                    },
                    "first_name_non_latin": {
                      "type": "string",
                      "description": "الاسم الأول بنظام كتابة غير لاتيني عندما تكون `preferred_characters=latin` وتتوفر نسخة غير لاتينية في المستند (مثل `Айна` لبطاقة هوية قيرغيزية)."
                    },
                    "last_name_non_latin": {
                      "type": "string",
                      "description": "اسم العائلة بنظام الكتابة غير اللاتيني عندما تكون قيمة `preferred_characters=latin` وتتوفر نسخة غير لاتينية في المستند."
                    },
                    "middle_name_non_latin": {
                      "type": "string",
                      "description": "الاسم الأوسط / اسم الأب بنظام الكتابة غير اللاتيني عندما يكون `preferred_characters=latin` وتتوفر نسخة غير لاتينية في المستند."
                    },
                    "full_name_non_latin": {
                      "type": "string",
                      "description": "الاسم الكامل المركب بنظام الكتابة غير اللاتيني. يُعاد تركيبه من المكونات الفردية عندما يتوفر كل من الاسم الأول واسم العائلة."
                    },
                    "address_non_latin": {
                      "type": "string",
                      "description": "العنوان بنظام الكتابة غير اللاتيني عندما يكون `preferred_characters=latin` ويتوفر إصدار غير لاتيني في المستند."
                    },
                    "place_of_birth_non_latin": {
                      "type": "string",
                      "description": "مكان الميلاد بنظام الكتابة غير اللاتيني عندما تكون القيمة `preferred_characters=latin` وتتوفر نسخة غير لاتينية على المستند."
                    },
                    "first_name_latin": {
                      "type": "string",
                      "description": "الاسم الأول بالأحرف اللاتينية. يتم ملؤه عندما تكون `preferred_characters=non_latin` وتتوفر نسخة لاتينية في المستند، أو — كخيار احتياطي للنقل الحرفي — عندما تكون `preferred_characters=latin` ولكن المستند لا يحتوي إلا على نص غير لاتيني."
                    },
                    "last_name_latin": {
                      "type": "string",
                      "description": "اسم العائلة بنظام الكتابة اللاتيني. تنطبق نفس قواعد `first_name_latin`."
                    },
                    "middle_name_latin": {
                      "type": "string",
                      "description": "الاسم الأوسط / اسم الأب بالحروف اللاتينية. نفس قواعد `first_name_latin`."
                    },
                    "full_name_latin": {
                      "type": "string",
                      "description": "الاسم الكامل المركب بنظام الكتابة اللاتيني. يُعاد تركيبه دائماً من المكونات الفردية عندما يتوفر كل من الاسم الأول واسم العائلة."
                    },
                    "address_latin": {
                      "type": "string",
                      "description": "العنوان بنظام الكتابة اللاتيني. نفس قواعد `first_name_latin`."
                    },
                    "place_of_birth_latin": {
                      "type": "string",
                      "description": "مكان الميلاد بنظام الكتابة اللاتيني. تنطبق نفس قواعد `first_name_latin`."
                    }
                  }
                },
                "mrz": {
                  "type": "object",
                  "nullable": true,
                  "description": "حقول منطقة القراءة الآلية (MRZ) المحللة والمستخرجة من المستند. القيمة `null` في حال عدم اكتشاف أي MRZ.",
                  "properties": {
                    "surname": {
                      "type": "string",
                      "example": "MARTINEZ<SANCHEZ"
                    },
                    "name": {
                      "type": "string",
                      "example": "ELENA"
                    },
                    "country": {
                      "type": "string",
                      "example": "ESP"
                    },
                    "nationality": {
                      "type": "string",
                      "example": "ESP"
                    },
                    "birth_date": {
                      "type": "string",
                      "example": "850315"
                    },
                    "expiry_date": {
                      "type": "string",
                      "example": "220821"
                    },
                    "sex": {
                      "type": "string",
                      "example": "F"
                    },
                    "document_type": {
                      "type": "string",
                      "example": "ID"
                    },
                    "document_number": {
                      "type": "string",
                      "example": "YZA123456"
                    },
                    "optional_data": {
                      "type": "string",
                      "example": "X9876543L"
                    },
                    "optional_data_2": {
                      "type": "string",
                      "example": ""
                    },
                    "birth_date_hash": {
                      "type": "string",
                      "example": "7"
                    },
                    "expiry_date_hash": {
                      "type": "string",
                      "example": "4"
                    },
                    "document_number_hash": {
                      "type": "string",
                      "example": "9"
                    },
                    "final_hash": {
                      "type": "string",
                      "example": "2"
                    },
                    "personal_number": {
                      "type": "string",
                      "example": "X9876543L"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "mrz_type": {
                      "type": "string",
                      "example": "TD1"
                    },
                    "mrz_string": {
                      "type": "string",
                      "example": "IDESPMARTINEZ<SANCHEZ<<<<<<<<<<\nYZA123456<9ESP8503157F3208214<X9876543L<<<<<<<2\nMARTINEZ<SANCHEZ<<ELENA<<<<<<<<<<"
                    },
                    "mrz_key": {
                      "type": "string",
                      "example": "YZA123456985031573208214"
                    }
                  }
                },
                "parsed_address": {
                  "type": "object",
                  "description": "تفاصيل العنوان المهيكل",
                  "properties": {
                    "city": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string",
                      "description": "رمز الدولة المكون من حرفين"
                    },
                    "category": {
                      "type": "string",
                      "description": "فئة العنوان (مثل Residential، Commercial)"
                    },
                    "street_1": {
                      "type": "string"
                    },
                    "street_2": {
                      "type": "string",
                      "nullable": true
                    },
                    "is_verified": {
                      "type": "boolean",
                      "description": "ما إذا كان قد تم التحقق من العنوان"
                    },
                    "postal_code": {
                      "type": "string"
                    },
                    "raw_results": {
                      "type": "object",
                      "properties": {
                        "types": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "geometry": {
                          "type": "object",
                          "properties": {
                            "location": {
                              "type": "object",
                              "properties": {
                                "lat": {
                                  "type": "number"
                                },
                                "lng": {
                                  "type": "number"
                                }
                              }
                            },
                            "viewport": {
                              "type": "object",
                              "properties": {
                                "northeast": {
                                  "type": "object",
                                  "properties": {
                                    "lat": {
                                      "type": "number"
                                    },
                                    "lng": {
                                      "type": "number"
                                    }
                                  }
                                },
                                "southwest": {
                                  "type": "object",
                                  "properties": {
                                    "lat": {
                                      "type": "number"
                                    },
                                    "lng": {
                                      "type": "number"
                                    }
                                  }
                                }
                              }
                            },
                            "location_type": {
                              "type": "string"
                            }
                          }
                        },
                        "place_id": {
                          "type": "string"
                        },
                        "formatted_address": {
                          "type": "string"
                        },
                        "navigation_points": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "location": {
                                "type": "object",
                                "properties": {
                                  "latitude": {
                                    "type": "number"
                                  },
                                  "longitude": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "address_components": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "types": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "long_name": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "address_type": {
                      "type": "string"
                    },
                    "document_location": {
                      "type": "object",
                      "properties": {
                        "latitude": {
                          "type": "number"
                        },
                        "longitude": {
                          "type": "number"
                        }
                      }
                    },
                    "formatted_address": {
                      "type": "string"
                    }
                  }
                },
                "extra_files": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uri"
                  },
                  "description": "ملفات إضافية للتحقق من المستند"
                },
                "front_image_camera_front_face_match_score": {
                  "type": "number",
                  "nullable": true,
                  "description": "درجة مطابقة الوجه بين الصورة الشخصية المستخرجة من الصورة الأمامية للمستند وصورة الكاميرا الأمامية"
                },
                "back_image_camera_front_face_match_score": {
                  "type": "number",
                  "nullable": true,
                  "description": "درجة مطابقة الوجه بين الصورة الشخصية المستخرجة من الصورة الخلفية للمستند وصورة الكاميرا الأمامية"
                },
                "document_selfie_face_matches": {
                  "type": "array",
                  "description": "الجلسات السابقة أو إدخالات قائمة حظر الوجوه التي تطابق وجهها مع صورة السيلفي التي التقطتها الكاميرا الأمامية أثناء التقاط المستند (البحث بالوجه عبر الالتقاط الصامت). نفس تنسيق الإدخال مثل `liveness_checks[].matches`. تكون القيمة `null` للجلسات التي تم إنشاؤها قبل وجود هذا الحقل أو عند عدم تشغيل البحث؛ ومصفوفة فارغة عند تشغيله وعدم العثور على أي تطابق. `match_image_url` هو رابط موقع مسبقاً تنتهي صلاحيته.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "session_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "معرّف الجلسة للوجه المتطابق. يكون `null` عندما يكون `source` هو `imported` أو `list_entry` أو `retained_template`."
                      },
                      "session_number": {
                        "type": "integer",
                        "nullable": true
                      },
                      "similarity_percentage": {
                        "type": "number",
                        "description": "درجة تشابه الوجه بين الصورتين، محصورة بين 0 و100."
                      },
                      "vendor_data": {
                        "type": "string",
                        "nullable": true,
                        "description": "`vendor_data` للجلسة المطابقة أو المستخدم المرتبط للوجوه المستوردة والوجوه ذات القوالب المحتفظ بها."
                      },
                      "vendor_user_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "معرّف المستخدم المرتبط لتطابقات `imported` و`retained_template` ولتطابقات الجلسات المرتبطة بمستخدم. يكون `null` لمدخلات القوائم والجلسات غير المرتبطة بمستخدم."
                      },
                      "biometric_template_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "معرّف القالب البيومتري المحتفظ به. يتم تعيينه فقط عندما يكون `source` هو `retained_template`؛ و`null` بخلاف ذلك."
                      },
                      "verification_date": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "متى تم التقاط الوجه المطابق، أو متى تم إنشاء قالب محتفظ به. وتكون `null` لمدخلات القائمة."
                      },
                      "user_details": {
                        "type": "object",
                        "nullable": true,
                        "description": "بيانات الهوية من الجلسة المتطابقة أو ملف تعريف المستخدم المستورد. تكون دائماً `null` للتطابقات من نوع `retained_template` و`list_entry`.",
                        "properties": {
                          "full_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "document_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "document_number": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "match_image_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "صورة مرجعية لعمليات المطابقة المستندة إلى الصور. تكون دائماً `null` لمطابقات `retained_template` لأن القوالب المحتفظ بها لا تحتوي على صورة."
                      },
                      "status": {
                        "type": "string",
                        "nullable": true,
                        "description": "حالة دورة حياة الجلسة المتطابقة. تكون `null` للمصادر التي ليست جلسات."
                      },
                      "is_blocklisted": {
                        "type": "boolean",
                        "description": "ما إذا كان الوجه المطابق موجوداً في قائمة الحظر."
                      },
                      "is_allowlisted": {
                        "type": "boolean",
                        "description": "ما إذا كان الوجه المطابق موجوداً في قائمة السماح."
                      },
                      "api_service": {
                        "type": "string",
                        "nullable": true,
                        "description": "خدمة API المستقلة للجلسة المطابقة (مثل `PASSIVE_LIVENESS`، و`FACE_MATCH`)؛ وتكون القيمة `null` لجلسات سير العمل والمصادر غير المرتبطة بجلسة."
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "session",
                          "imported",
                          "list_entry",
                          "retained_template"
                        ],
                        "description": "أصل الوجه المطابق: `session`، أو `imported` (تحميل وجه المستخدم User)، أو `list_entry` (قائمة السماح/الحظر)، أو `retained_template` (قالب بيومتري خالٍ من الصور محفوظ لدى User، مدرج تحت `/v3/biometric-templates/`)."
                      }
                    }
                  },
                  "nullable": true
                },
                "front_image_quality_score": {
                  "type": "object",
                  "nullable": true,
                  "description": "مقاييس جودة صورة الوجه الأمامي للمستند. تتراوح كل درجة فرعية بين 0 و100.",
                  "properties": {
                    "focus_score": {
                      "type": "number",
                      "description": "وضوح الصورة مقاساً عبر تباين Laplacian المحلي لأعلى 10%. متين في مواجهة المستندات ذات الخلفيات الموحدة الكبيرة. تشير القيم الأعلى إلى صورة أكثر وضوحاً وأقل ضبابية."
                    },
                    "brightness_score": {
                      "type": "number",
                      "description": "مدى جودة إضاءة الصورة. تُفرَض عقوبة على الصور شديدة الإعتام أو المفرطة في التعرض للضوء، وتكون درجة السطوع المثالية حول النطاق المتوسط."
                    },
                    "brightness_issue": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "too_dark",
                        "too_bright"
                      ],
                      "description": "يشير إلى اتجاه مشكلة السطوع عندما تكون brightness_score منخفضة. تعني 'ok' أن السطوع مقبول، وتعني 'too_dark' أن الصورة غير معرّضة للضوء بشكل كافٍ، وتعني 'too_bright' أن الصورة معرّضة للضوء بشكل مفرط."
                    },
                    "is_document_fully_visible": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "true إذا كانت جميع الزوايا الأربع للمستند مرئية بالكامل داخل إطار الصورة، وfalse إذا كانت أي زاوية مقتطعة. وتكون Null عند عدم توفر إحداثيات الزوايا."
                    },
                    "resolution_score": {
                      "type": "number",
                      "description": "الدقة الفعلية للصورة بناءً على إجمالي عدد وحدات البكسل."
                    },
                    "overall_score": {
                      "type": "number",
                      "description": "مركّب موزون من الدرجات الفرعية (التركيز 45%، السطوع 30%، الدقة 25%)."
                    }
                  }
                },
                "back_image_quality_score": {
                  "type": "object",
                  "nullable": true,
                  "description": "مقاييس جودة صورة الوجه الخلفي للمستند. نفس بنية front_image_quality_score.",
                  "properties": {
                    "focus_score": {
                      "type": "number",
                      "description": "وضوح الصورة مقاساً عبر تباين Laplacian المحلي لأعلى 10%. متين في مواجهة المستندات ذات الخلفيات الموحدة الكبيرة. تشير القيم الأعلى إلى صورة أكثر وضوحاً وأقل ضبابية."
                    },
                    "brightness_score": {
                      "type": "number",
                      "description": "مدى جودة إضاءة الصورة. تُفرَض عقوبة على الصور شديدة الإعتام أو المفرطة في التعرض للضوء، وتكون درجة السطوع المثالية حول النطاق المتوسط."
                    },
                    "brightness_issue": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "too_dark",
                        "too_bright"
                      ],
                      "description": "يشير إلى اتجاه مشكلة السطوع عندما تكون brightness_score منخفضة. تعني 'ok' أن السطوع مقبول، وتعني 'too_dark' أن الصورة غير معرّضة للضوء بشكل كافٍ، وتعني 'too_bright' أن الصورة معرّضة للضوء بشكل مفرط."
                    },
                    "is_document_fully_visible": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "true إذا كانت جميع الزوايا الأربع للمستند مرئية بالكامل داخل إطار الصورة، وfalse إذا كانت أي زاوية مقتطعة. وتكون Null عند عدم توفر إحداثيات الزوايا."
                    },
                    "resolution_score": {
                      "type": "number",
                      "description": "الدقة الفعلية للصورة بناءً على إجمالي عدد وحدات البكسل."
                    },
                    "overall_score": {
                      "type": "number",
                      "description": "مركّب موزون من الدرجات الفرعية (التركيز 45%، السطوع 30%، الدقة 25%)."
                    }
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير (مثل `ID_VERIFICATION`، و`NFC`، و`LIVENESS`). تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true,
                        "description": "بيانات سياقية إضافية حول التحذير"
                      },
                      "log_type": {
                        "type": "string",
                        "description": "نوع السجل: معلومات، أو تحذير، أو خطأ"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير (لسير العمل المعتمد على المخططات)"
                      }
                    }
                  },
                  "description": "تحذيرات التحقق من المستند"
                },
                "matches": {
                  "type": "array",
                  "description": "المستندات المطابقة التي تم العثور عليها أثناء كشف التكرار/قائمة الحظر (ما يصل إلى 5 تطابقات)",
                  "items": {
                    "type": "object",
                    "properties": {
                      "session_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "معرّف الجلسة للمستند المتطابق"
                      },
                      "session_number": {
                        "type": "integer",
                        "description": "رقم الجلسة للمستند المطابق"
                      },
                      "vendor_data": {
                        "type": "string",
                        "nullable": true,
                        "description": "بيانات المزود المرتبطة بجلسة المطابقة"
                      },
                      "verification_date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "تاريخ التحقق من جلسة المطابقة"
                      },
                      "user_details": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "الاسم الكامل من المستند المطابق"
                          },
                          "document_type": {
                            "type": "string",
                            "description": "نوع المستند المطابق"
                          },
                          "document_number": {
                            "type": "string",
                            "description": "رقم المستند الخاص بالمستند المطابق"
                          }
                        }
                      },
                      "status": {
                        "type": "string",
                        "description": "حالة الجلسة المتطابقة"
                      },
                      "is_blocklisted": {
                        "type": "boolean",
                        "description": "ما إذا كان المستند المطابق مدرجاً في قائمة الحظر"
                      },
                      "api_service": {
                        "type": "string",
                        "nullable": true,
                        "description": "نوع خدمة API للجلسة المتطابقة"
                      },
                      "front_image_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "رابط URL لصورة وجه المستند من المستند المطابق"
                      }
                    }
                  }
                },
                "document_liveness": {
                  "type": "object",
                  "nullable": true,
                  "description": "درجات كشف الحيوية الخاصة بالمستند لكل نوع من أنواع الاحتيال، ويتم الإبلاغ عنها سواء أُطلق تحذير أم لا، حتى يمكن تدقيق المستند المقبول. وتكون `null` عندما لا يتم تشغيل الفحص.",
                  "properties": {
                    "portrait_replace": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "score": {
                          "type": "number",
                          "nullable": true,
                          "description": "احتمالية أن يكون المستند أصلياً لنوع الاحتيال هذا، من 0 إلى 100 (كلما زادت القيمة = زاد احتمال كونه أصلياً). أدنى قيمة بين الجانبين - وهي القيمة التي استند إليها القرار. تكون `null` إذا لم ينتج عن أي من الجانبين درجة قابلة للاستخدام."
                        },
                        "front": {
                          "type": "number",
                          "nullable": true,
                          "description": "درجة الوجه الأمامي؛ وتكون `null` عندما لا يتم التقاطه أو عند إسقاط الدرجة."
                        },
                        "back": {
                          "type": "number",
                          "nullable": true,
                          "description": "درجة الوجه الخلفي؛ وتكون `null` عندما لا يتم التقاطه أو عند إسقاط الدرجة."
                        },
                        "decline_threshold": {
                          "type": "number",
                          "nullable": true,
                          "description": "حد الرفض المحفوظ عند تقييم هذا المستند. لا تؤدي تعديلات سير العمل اللاحقة إلى تغييره. القيمة Null عند عدم توفر أدلة التقييم التاريخية."
                        },
                        "review_threshold": {
                          "type": "number",
                          "nullable": true,
                          "description": "حد المراجعة المحفوظ عند تقييم هذا المستند. التعديلات اللاحقة على سير العمل لا تغيره. يكون Null عندما لا تتوفر أدلة التقييم التاريخية."
                        },
                        "bucket": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "approve",
                            "review",
                            "decline",
                            null
                          ],
                          "description": "فئة نوع الاحتيال المحفوظة وقت التقييم. تكون Null عندما لا تتوفر درجة قابلة للاستخدام، أو لم يتم تطبيق الفحص، أو لا تتوفر أدلة تقييم تاريخية. التعديلات اللاحقة على سير العمل لا تغيّرها."
                        }
                      }
                    },
                    "printed_copy": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "score": {
                          "type": "number",
                          "nullable": true,
                          "description": "احتمالية أن يكون المستند أصلياً لنوع الاحتيال هذا، من 0 إلى 100 (كلما زادت القيمة = زاد احتمال كونه أصلياً). أدنى قيمة بين الجانبين - وهي القيمة التي استند إليها القرار. تكون `null` إذا لم ينتج عن أي من الجانبين درجة قابلة للاستخدام."
                        },
                        "front": {
                          "type": "number",
                          "nullable": true,
                          "description": "درجة الوجه الأمامي؛ وتكون `null` عندما لا يتم التقاطه أو عند إسقاط الدرجة."
                        },
                        "back": {
                          "type": "number",
                          "nullable": true,
                          "description": "درجة الوجه الخلفي؛ وتكون `null` عندما لا يتم التقاطه أو عند إسقاط الدرجة."
                        },
                        "decline_threshold": {
                          "type": "number",
                          "nullable": true,
                          "description": "حد الرفض المحفوظ عند تقييم هذا المستند. لا تؤدي تعديلات سير العمل اللاحقة إلى تغييره. القيمة Null عند عدم توفر أدلة التقييم التاريخية."
                        },
                        "review_threshold": {
                          "type": "number",
                          "nullable": true,
                          "description": "حد المراجعة المحفوظ عند تقييم هذا المستند. التعديلات اللاحقة على سير العمل لا تغيره. يكون Null عندما لا تتوفر أدلة التقييم التاريخية."
                        },
                        "bucket": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "approve",
                            "review",
                            "decline",
                            null
                          ],
                          "description": "فئة نوع الاحتيال المحفوظة وقت التقييم. تكون Null عندما لا تتوفر درجة قابلة للاستخدام، أو لم يتم تطبيق الفحص، أو لا تتوفر أدلة تقييم تاريخية. التعديلات اللاحقة على سير العمل لا تغيّرها."
                        }
                      }
                    },
                    "screen_replay": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "score": {
                          "type": "number",
                          "nullable": true,
                          "description": "احتمالية أن يكون المستند أصلياً لنوع الاحتيال هذا، من 0 إلى 100 (كلما زادت القيمة = زاد احتمال كونه أصلياً). أدنى قيمة بين الجانبين - وهي القيمة التي استند إليها القرار. تكون `null` إذا لم ينتج عن أي من الجانبين درجة قابلة للاستخدام."
                        },
                        "front": {
                          "type": "number",
                          "nullable": true,
                          "description": "درجة الوجه الأمامي؛ وتكون `null` عندما لا يتم التقاطه أو عند إسقاط الدرجة."
                        },
                        "back": {
                          "type": "number",
                          "nullable": true,
                          "description": "درجة الوجه الخلفي؛ وتكون `null` عندما لا يتم التقاطه أو عند إسقاط الدرجة."
                        },
                        "decline_threshold": {
                          "type": "number",
                          "nullable": true,
                          "description": "حد الرفض المحفوظ عند تقييم هذا المستند. لا تؤدي تعديلات سير العمل اللاحقة إلى تغييره. القيمة Null عند عدم توفر أدلة التقييم التاريخية."
                        },
                        "review_threshold": {
                          "type": "number",
                          "nullable": true,
                          "description": "حد المراجعة المحفوظ عند تقييم هذا المستند. التعديلات اللاحقة على سير العمل لا تغيره. يكون Null عندما لا تتوفر أدلة التقييم التاريخية."
                        },
                        "bucket": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "approve",
                            "review",
                            "decline",
                            null
                          ],
                          "description": "فئة نوع الاحتيال المحفوظة وقت التقييم. تكون Null عندما لا تتوفر درجة قابلة للاستخدام، أو لم يتم تطبيق الفحص، أو لا تتوفر أدلة تقييم تاريخية. التعديلات اللاحقة على سير العمل لا تغيّرها."
                        }
                      }
                    }
                  }
                },
                "address_validation": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/AddressValidationResult"
                    }
                  ],
                  "nullable": true,
                  "description": "التحقق من صحة العنوان للعنوان المطبوع على هذا المستند: ما إذا كان موجوداً وصيغته الموحدة، كما قرأها المستند (أي تصحيح لاحق لـ `address` لا يعيد تشغيله). يظهر عندما تُفعّل خطوة التحقق من الهوية هذه الميزة الإضافية للتحقق من العنوان؛ ويكون `null` بخلاف ذلك."
                },
                "region": {
                  "type": "string",
                  "nullable": true,
                  "description": "منطقة أو ولاية دولة إصدار المستند عندما يحدد المستند ذلك."
                },
                "extracted_data": {
                  "type": "object",
                  "nullable": true,
                  "additionalProperties": true,
                  "description": "لقطة للبيانات المستخرجة من المستند والتي تم عرضها على الشخص لمراجعتها، محفوظة بجانب القيم المؤكدة حتى تتمكن من مقارنة ما تمت قراءته بما أكده الشخص. تكون `null` عندما لا يُطلب من الشخص المراجعة."
                },
                "barcodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "description": "البيانات المقروءة من الرموز الشريطية (barcodes) للمستند. تكون فارغة عندما لا يحتوي المستند على أي منها أو لم تتم قراءة أي منها."
                }
              }
            }
          },
          "nfc_skip_reason": {
            "type": "string",
            "nullable": true,
            "enum": [
              "USER_SKIPPED",
              "DOCUMENT_WITHOUT_CHIP",
              "CHIP_CERTIFICATE_UNAVAILABLE",
              "DEVICE_WITHOUT_NFC",
              "INTEGRATION_WITHOUT_NFC_ACCESS",
              "MRZ_KEY_UNAVAILABLE",
              "JPKI_UNAVAILABLE"
            ],
            "description": "سبب عدم تشغيل التحقق من شريحة NFC، ويتم ملؤه كلما تضمن سير العمل خطوة NFC. تكون القيمة `null` أثناء انتظار NFC أو عند قراءة الشريحة بالفعل. القيم: `USER_SKIPPED` - اختار المستخدم التخطي على جهاز يدعم NFC (مسموح به عبر `allow_nfc_skip`)؛ `DOCUMENT_WITHOUT_CHIP` - لا يحتوي المستند على شريحة NFC قابلة للقراءة (ليس مستنداً إلكترونياً متوافقاً مع ICAO 9303)؛ `CHIP_CERTIFICATE_UNAVAILABLE` - شهادة التوقيع الخاصة بدولة الإصدار (CSCA) التي تغطي فترة إصدار المستند غير متوفرة، لذا لا يمكن التحقق من توقيع الشريحة؛ `DEVICE_WITHOUT_NFC` - أبلغ الجهاز عن عدم وجود قارئ NFC؛ `INTEGRATION_WITHOUT_NFC_ACCESS` - تم تشغيل التحقق بدون SDK أصلي (على سبيل المثال في متصفح الويب)، والذي لا يملك صلاحية الوصول إلى قارئ NFC بالهاتف؛ `MRZ_KEY_UNAVAILABLE` - تعذر اشتقاق مفتاح الوصول إلى الشريحة من كود MRZ للمستند؛ `JPKI_UNAVAILABLE` - المستند هو بطاقة My Number اليابانية، والتي تُقرأ شريحتها عبر JPKI، ولم يكن JPKI متوفراً لعملية التحقق هذه: فهو غير مُمكّن، أو أن SDK الأصلي للتطبيق لا يمكنه قراءة بطاقات My Number."
          },
          "nfc_verifications": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير التحقق عبر NFC / جواز السفر الإلكتروني** الناتجة عن خطوات NFC في مخطط سير العمل. **هذه دائماً مصفوفة JSON، وليست كائن `nfc` مفرداً أبداً** — اقرأ `nfc_verifications[0]` وكرّر القراءة إذا كان بإمكان سير العمل لديك تشغيل NFC أكثر من مرة. تكون `null` حتى تُنتج خطوة NFC واحدة على الأقل بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، و`chip_protocol`، و`chip_data`، و`authenticity` (سلامة SOD + DG)، و`certificate_summary`، و`warnings[]`. تتم قراءة بطاقة My Number اليابانية عبر JPKI بدلاً من ICAO 9303: يحتوي عنصرها على `chip_protocol: \"jpki\"`، ويحمل أدلته تحت `jpki`، ويترك حقول ICAO بقيمة `null`. عندما يتم تجاوز خطوة NFC قبل أن تُتاح للمستخدم أصلاً (مستند بدون شريحة، أو شهادة مفقودة، أو عدم الإبلاغ عن إمكانية NFC، أو مفتاح MRZ غير قابل للقراءة، أو عدم توفر JPKI لبطاقة My Number)، يظل هذا الحقل `null` ويوضح `nfc_skip_reason` السبب؛ أما التخطي في الخطوة نفسها (نقر المستخدم على تخطٍّ، أو تبيّن عدم توفر القارئ في وقت المسح) فيظل يُنتج تقريراً مع `is_nfc_skipped: true`.",
            "items": {
              "type": "object",
              "description": "تقرير NFC واحد: التقرير الكامل لقراءة شريحة واحدة (شريحة جواز سفر إلكتروني أو بطاقة هوية إلكترونية وفق معيار ICAO 9303، أو بطاقة My Number اليابانية المقروءة عبر JPKI).",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "معرّف عقدة مخطط سير العمل لخطوة NFC التي أنتجت هذا التقرير. استخدمه لربط التقرير بتعريف سير العمل."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Resub Requested"
                  ],
                  "description": "حالة مستوى الميزة لخطوة NFC هذه. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`."
                },
                "is_nfc_skipped": {
                  "type": "boolean",
                  "description": "تكون `true` عندما يتم تخطي خطوة NFC هذه صراحةً بدلاً من قراءتها؛ ويوضح `skip_reason` السبب."
                },
                "skip_reason": {
                  "type": "string",
                  "nullable": true,
                  "enum": [
                    "USER_SKIPPED",
                    "DOCUMENT_WITHOUT_CHIP",
                    "CHIP_CERTIFICATE_UNAVAILABLE",
                    "DEVICE_WITHOUT_NFC",
                    "INTEGRATION_WITHOUT_NFC_ACCESS",
                    "MRZ_KEY_UNAVAILABLE",
                    "JPKI_UNAVAILABLE"
                  ],
                  "description": "سبب تخطي خطوة NFC هذه. يُعيّن فقط عندما تكون `is_nfc_skipped` بقيمة `true`. يتبع نفس تصنيف `nfc_skip_reason` على مستوى الجلسة، والذي يغطي أيضاً الحالات التي لم يُنشئ فيها NFC تقريراً على الإطلاق."
                },
                "chip_protocol": {
                  "type": "string",
                  "enum": [
                    "icao",
                    "jpki"
                  ],
                  "description": "كيفية قراءة شريحة خطوة NFC. `icao`: شريحة جواز السفر الإلكتروني أو بطاقة الهوية الإلكترونية وفق معيار ICAO 9303، والتي تُفتح باستخدام مفتاح الوصول من MRZ. `jpki`: بطاقة My Number اليابانية، حيث تقوم البطاقة بتوقيع تحدٍ يُستخدم لمرة واحدة بعد قيام حاملها بإدخال رقم PIN للبطاقة في SDK أصلي؛ وتكون النتيجة ضمن `jpki`. وتُحدد أيضاً في الخطوات المتخطاة، حتى تتمكن من تمييز قراءة بطاقة My Number المتخطاة."
                },
                "jpki": {
                  "type": "object",
                  "nullable": true,
                  "description": "ما أثبتته قراءة بطاقة My Number اليابانية عبر JPKI. يكون موجوداً عندما يكون `chip_protocol` هو `jpki` وتتم قراءة البطاقة. `null` لرقائق ICAO، وللخطوات التي تم تخطيها، وعند إغلاق خطوة NFC دون قراءة أي بطاقة (تثير هذه الحالة `JPKI_SIGNATURE_INVALID`). لا يحمل مطلقاً الشهادات أو أرقامها التسلسلية أو التوقيعات أو رقم My Number المكون من 12 رقماً.",
                  "properties": {
                    "certificate_types": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "user_authentication",
                          "signature"
                        ]
                      },
                      "description": "شهادات البطاقة المقروءة. تُقرأ `user_authentication` (رمز PIN المكون من 4 أرقام) دائماً؛ وتُقرأ `signature` (رمز PIN الخاص بالتوقيع) عند تفعيل إعداد `jpki_request_attributes` الخاص بعقدة NFC."
                    },
                    "chain_valid": {
                      "type": "boolean",
                      "description": "تكون القيمة `true` عندما تتسلسل كل شهادة مقروءة إلى سلطة تصديق JPKI، وتكون ضمن فترة صلاحيتها، وتكون شهادة My Number Card من نوعها."
                    },
                    "signature_valid": {
                      "type": "boolean",
                      "description": "تكون القيمة `true` عندما يتم التحقق بنجاح من كل توقيع أجرته البطاقة على التحدي المخصص لمرة واحدة. لا توقّع البطاقة إلا بعد إدخال رمز PIN الخاص بها، مما يثبت حيازة البطاقة ومعرفة رمز PIN."
                    },
                    "revocation_status": {
                      "type": "string",
                      "enum": [
                        "good",
                        "revoked",
                        "unchecked"
                      ],
                      "description": "`good` عندما يؤكد فحص الإلغاء أن كل شهادة صالحة، و`revoked` عند إلغاء أي شهادة (على سبيل المثال، بطاقة تم الإبلاغ عن فقدانها)، و`unchecked` عندما لا تتوفر أي إجابة بشأن الإلغاء. لا تتم معاملة `unchecked` على أنها `good` أبداً: يحدد `jpki_revocation_unchecked_action` الخاص بعقدة NFC النتيجة (الافتراضي هو `REVIEW`)."
                    },
                    "ca_generation": {
                      "type": "string",
                      "nullable": true,
                      "description": "جيل جهة إصدار شهادات JPKI التي أصدرت الشهادات، على سبيل المثال `2023`. يكون `null` عندما لا ترتبط أي شهادة بسلسلة تصل إلى جهة إصدار منها."
                    },
                    "certificate_expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "أقرب تاريخ انتهاء صلاحية بين الشهادات المقروءة."
                    },
                    "certificates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "ما أثبتته شهادة واحدة تمت قراءتها من البطاقة. لا يعرض الشهادة نفسها أو رقمها التسلسلي أبداً.",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "user_authentication",
                              "signature"
                            ],
                            "description": "أي شهادة بطاقة يصفها هذا الإدخال."
                          },
                          "chain_valid": {
                            "type": "boolean",
                            "description": "تكون القيمة `true` عندما تتسلسل الشهادة إلى سلطة تصديق JPKI الخاصة بنوعها، وتكون ضمن فترة صلاحيتها، وتكون شهادة My Number Card من ذلك النوع."
                          },
                          "signature_valid": {
                            "type": "boolean",
                            "description": "تكون القيمة `true` عند التحقق بنجاح من توقيع البطاقة على التحدي المخصص لمرة واحدة مقابل هذه الشهادة."
                          },
                          "ca_generation": {
                            "type": "string",
                            "nullable": true,
                            "description": "جيل جهة إصدار شهادات JPKI التي أصدرت الشهادة، على سبيل المثال `2023`. يكون `null` عند عدم العثور على جهة إصدار موثوقة."
                          },
                          "not_valid_before": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "بداية فترة صلاحية الشهادة. يكون `null` عندما يتعذر قراءة الشهادة."
                          },
                          "not_valid_after": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "نهاية فترة صلاحية الشهادة. `null` عندما يتعذر قراءة الشهادة."
                          },
                          "failure": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "unreadable_certificate",
                              "untrusted_issuer",
                              "expired",
                              "not_yet_valid",
                              "wrong_policy",
                              "key_usage",
                              null
                            ],
                            "description": "سبب كون `chain_valid` هو `false`: إما `unreadable_certificate`، أو `untrusted_issuer` (غير صادرة عن جهة اعتماد JPKI من نوعها)، أو `expired`، أو `not_yet_valid`، أو `wrong_policy` (ليست شهادة بطاقة My Number من ذلك النوع) أو `key_usage` (المفتاح لا يجوز له التوقيع). وتكون القيمة `null` عندما تكون السلسلة صالحة."
                          }
                        }
                      },
                      "description": "النتائج لكل شهادة، إدخال واحد لكل شهادة تمت قراءتها."
                    },
                    "attributes": {
                      "type": "object",
                      "nullable": true,
                      "description": "بيانات الحامل من شهادة التوقيع، بمجرد أن تصبح سلسلتها صالحة. `null` عندما لا تُطلب شهادة التوقيع أو لم تتسلسل إلى سلطة التصديق JPKI.",
                      "properties": {
                        "full_name": {
                          "type": "string",
                          "nullable": true,
                          "description": "الاسم كما هو مسجل، عادةً بنظام الكتابة الياباني."
                        },
                        "date_of_birth": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "description": "تاريخ الميلاد، `YYYY-MM-DD`. يكون `null` عندما يكون التاريخ المسجل غير مكتمل."
                        },
                        "gender": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "M",
                            "F",
                            null
                          ],
                          "description": "`M` أو `F` أو `null` عند عدم التسجيل."
                        },
                        "address": {
                          "type": "string",
                          "nullable": true,
                          "description": "العنوان المسجل."
                        },
                        "name_substitute_characters": {
                          "type": "string",
                          "nullable": true,
                          "description": "سلسلة مواضع تشير إلى أحرف `full_name` التي تم استبدالها ببديل لأن الحرف الأصلي خارج مجموعة الأحرف القياسية. تكون `null` في حال لم يتم استبدال أي حرف."
                        },
                        "address_substitute_characters": {
                          "type": "string",
                          "nullable": true,
                          "description": "سلسلة مواضع تشير إلى الأحرف البديلة في `address`، كما هو الحال مع `name_substitute_characters`."
                        }
                      }
                    },
                    "attributes_match_ocr": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "`true` عندما تتطابق السمات مع البيانات المقروءة من صورة البطاقة نفسها، و`false` عندما تختلف أي سمة (`JPKI_AND_OCR_DATA_NOT_SAME`)، و`null` عندما يتعذر مقارنة أي شيء، بما في ذلك عندما تكون قيمة `attributes` هي `null`."
                    },
                    "mismatched_attributes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "full_name",
                          "date_of_birth",
                          "gender",
                          "address"
                        ]
                      },
                      "description": "أسماء السمات التي تختلف عن بيانات الصورة، دون قيمها إطلاقاً. تكون فارغة عندما يتطابق كل ما تمت مقارنته."
                    }
                  }
                },
                "portrait_image": {
                  "type": "string",
                  "format": "uri",
                  "nullable": true,
                  "description": "رابط موقع مسبقاً للصورة الشخصية المقروءة من الشريحة (ICAO DG2). تكون القيمة `null` في حالة قراءة JPKI (`chip_protocol: \"jpki\"`) وللخطوات التي تم تخطيها."
                },
                "signature_image": {
                  "type": "string",
                  "format": "uri",
                  "nullable": true,
                  "description": "رابط موقع مسبقاً لصورة توقيع حامل المستند المقروءة من الشريحة (ICAO DG7)، عندما تحتوي الشريحة على توقيع مخزن. تكون القيمة `null` في حالة قراءة JPKI (`chip_protocol: \"jpki\"`) وللخطوات التي تم تخطيها."
                },
                "chip_data": {
                  "type": "object",
                  "nullable": true,
                  "description": "البيانات الشخصية التي تم تحليلها من مجموعات البيانات (Data Groups) لشريحة ICAO. تكون `null` لقراءة JPKI (`chip_protocol: \"jpki\"`) وللخطوات التي تم تخطيها.",
                  "properties": {
                    "document_type": {
                      "type": "string"
                    },
                    "issuing_country": {
                      "type": "string"
                    },
                    "document_number": {
                      "type": "string"
                    },
                    "expiration_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "first_name": {
                      "type": "string"
                    },
                    "last_name": {
                      "type": "string"
                    },
                    "birth_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "gender": {
                      "type": "string"
                    },
                    "nationality": {
                      "type": "string"
                    },
                    "address": {
                      "type": "string"
                    },
                    "place_of_birth": {
                      "type": "string"
                    }
                  }
                },
                "authenticity": {
                  "type": "object",
                  "nullable": true,
                  "description": "المصادقة السلبية لـ ICAO: توقيع SOD (`sod_integrity`) وتجزئات Data Group (`dg_integrity`). تكون `null` لقراءة JPKI، والتي تبلّغ عن إثباتها ضمن `jpki`.",
                  "properties": {
                    "sod_integrity": {
                      "type": "boolean"
                    },
                    "dg_integrity": {
                      "type": "boolean"
                    }
                  }
                },
                "certificate_summary": {
                  "type": "object",
                  "nullable": true,
                  "description": "ملخص لشهادة موقّع المستندات (Document Signer Certificate) وفق ICAO. تكون القيمة `null` لقراءة JPKI (`chip_protocol: \"jpki\"`) وللخطوات التي تم تخطيها.",
                  "properties": {
                    "issuer": {
                      "type": "string"
                    },
                    "subject": {
                      "type": "string"
                    },
                    "serial_number": {
                      "type": "string"
                    },
                    "not_valid_after": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "not_valid_before": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "log_type": {
                        "type": "string"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                      }
                    }
                  }
                }
              }
            }
          },
          "liveness_checks": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير كشف الحيوية** التي تم إنشاؤها بواسطة خطوات كشف الحيوية في مخطط سير العمل. دائماً ما تكون مصفوفة JSON — وليست كائن `liveness` مفرداً أبداً. تكون `null` حتى تنتج خطوة كشف حيوية واحدة على الأقل بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، و`method`، و`score`، و`reference_image`، و`video_url`، و`age_estimation` الاختياري، و`matches[]` عبر الجلسات، و`warnings[]`.",
            "items": {
              "type": "object",
              "description": "تقرير كشف حيوية واحد — التقرير الكامل لجولة كشف حيوية فردية.",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "معرّف عقدة مخطط سير العمل لخطوة كشف الحيوية التي أنتجت هذا التقرير."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Resub Requested"
                  ],
                  "description": "حالة مستوى الميزة لخطوة كشف الحيوية هذه. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`."
                },
                "method": {
                  "type": "string",
                  "description": "الطريقة المستخدمة لكشف الحيوية"
                },
                "score": {
                  "type": "number",
                  "description": "درجة الثقة لكشف الحيوية"
                },
                "reference_image": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL للصورة المرجعية المستخدمة"
                },
                "video_url": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لفيديو فحص الحيوية"
                },
                "age_estimation": {
                  "type": "number",
                  "description": "العمر التقديري للشخص"
                },
                "matches": {
                  "type": "array",
                  "description": "وجوه مشابهة عُثر عليها بواسطة البحث عن الوجوه المكررة (أعلى التطابقات، وتظهر الإدخالات المدرجة في قائمة الحظر/السماح أولاً). يُبيّن `source` لكل إدخال مصدر الوجه المطابق: `session` (جلسة تحقق أخرى)، أو `imported` (وجه تم رفعه لمستخدم مورّد)، أو `list_entry` (وجه في قائمة سماح/حظر تديرها المؤسسة)، أو `retained_template` (قالب بيومتري بدون صورة مخزّن لدى المستخدم، ومدرج ضمن `/v3/biometric-templates/`). تكون قيم `session_id` و`session_number` و`status` و`api_service` هي `null` للمصادر غير التابعة لجلسة. تظل مطابقات `imported` تملأ `vendor_data` و`verification_date` و—عندما يكون لمستخدم المورّد اسم مسجل—`user_details` (مع `full_name` فقط) من سجل مستخدم المورّد؛ بينما تملأ مطابقات `retained_template` كلاً من `vendor_user_id` و`vendor_data` و`biometric_template_id` و`verification_date`، في حين تكون حقول الصور والهوية الخاصة بها `null`؛ وتُرجع مطابقات `list_entry` كل هذه الحقول بقيمة `null`.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "session_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "معرّف الجلسة للوجه المتطابق. يكون `null` عندما يكون `source` هو `imported` أو `list_entry` أو `retained_template`."
                      },
                      "session_number": {
                        "type": "integer",
                        "nullable": true
                      },
                      "similarity_percentage": {
                        "type": "number",
                        "description": "درجة تشابه الوجه بين الصورتين، محصورة بين 0 و100."
                      },
                      "vendor_data": {
                        "type": "string",
                        "nullable": true,
                        "description": "`vendor_data` للجلسة المطابقة أو المستخدم المرتبط للوجوه المستوردة والوجوه ذات القوالب المحتفظ بها."
                      },
                      "vendor_user_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "معرّف المستخدم المرتبط لتطابقات `imported` و`retained_template` ولتطابقات الجلسات المرتبطة بمستخدم. يكون `null` لمدخلات القوائم والجلسات غير المرتبطة بمستخدم."
                      },
                      "biometric_template_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "معرّف القالب البيومتري المحتفظ به. يتم تعيينه فقط عندما يكون `source` هو `retained_template`؛ و`null` بخلاف ذلك."
                      },
                      "verification_date": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "متى تم التقاط الوجه المطابق، أو متى تم إنشاء قالب محتفظ به. وتكون `null` لمدخلات القائمة."
                      },
                      "user_details": {
                        "type": "object",
                        "nullable": true,
                        "description": "بيانات الهوية من الجلسة المتطابقة أو ملف تعريف المستخدم المستورد. تكون دائماً `null` للتطابقات من نوع `retained_template` و`list_entry`.",
                        "properties": {
                          "full_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "document_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "document_number": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "match_image_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "صورة مرجعية لعمليات المطابقة المستندة إلى الصور. تكون دائماً `null` لمطابقات `retained_template` لأن القوالب المحتفظ بها لا تحتوي على صورة."
                      },
                      "status": {
                        "type": "string",
                        "nullable": true,
                        "description": "حالة دورة حياة الجلسة المتطابقة. تكون `null` للمصادر التي ليست جلسات."
                      },
                      "is_blocklisted": {
                        "type": "boolean",
                        "description": "ما إذا كان الوجه المطابق موجوداً في قائمة الحظر."
                      },
                      "is_allowlisted": {
                        "type": "boolean",
                        "description": "ما إذا كان الوجه المطابق موجوداً في قائمة السماح."
                      },
                      "api_service": {
                        "type": "string",
                        "nullable": true,
                        "description": "خدمة API المستقلة للجلسة المطابقة (مثل `PASSIVE_LIVENESS`، و`FACE_MATCH`)؛ وتكون القيمة `null` لجلسات سير العمل والمصادر غير المرتبطة بجلسة."
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "session",
                          "imported",
                          "list_entry",
                          "retained_template"
                        ],
                        "description": "أصل الوجه المطابق: `session`، أو `imported` (تحميل وجه المستخدم User)، أو `list_entry` (قائمة السماح/الحظر)، أو `retained_template` (قالب بيومتري خالٍ من الصور محفوظ لدى User، مدرج تحت `/v3/biometric-templates/`)."
                      }
                    }
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "log_type": {
                        "type": "string"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                      }
                    }
                  }
                },
                "face_quality": {
                  "type": "number",
                  "nullable": true,
                  "description": "درجة جودة صورة الوجه (0-100%). متاحة فقط لكشف الحيوية السلبي."
                },
                "face_luminance": {
                  "type": "number",
                  "nullable": true,
                  "description": "درجة إضاءة/سطوع الوجه (0-100%). متاحة فقط لكشف الحيوية السلبي."
                }
              }
            }
          },
          "face_matches": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير مطابقة الوجه** التي تم إنشاؤها بواسطة خطوات مطابقة الوجه في مخطط سير العمل. دائماً ما تكون مصفوفة JSON — وليست كائن `face_match` مفرداً أبداً. تكون `null` حتى تنتج خطوة مطابقة وجه واحدة على الأقل بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، و`score` التشابه، و`source_image`، و`target_image`، و`warnings[]`.",
            "items": {
              "type": "object",
              "description": "تقرير مطابقة وجه واحد — التقرير الكامل.",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "معرّف عقدة مخطط سير العمل لخطوة مطابقة الوجه التي أنتجت هذا التقرير."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Resub Requested"
                  ],
                  "description": "حالة مستوى الميزة لخطوة مطابقة الوجه هذه. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`."
                },
                "score": {
                  "type": "number",
                  "description": "درجة الثقة لمطابقة الوجه"
                },
                "source_image_session_id": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "معرّف الجلسة الذي تُخزّن تحته الصورة الشخصية المصدرية (المرجعية). في تدفقات المصادقة البيومترية، يكون هذا هو معرّف الجلسة نفسها (تُخزّن الصورة الشخصية المرسلة تحت الجلسة الجديدة). يكون `null` عندما تكون الصورة المصدر هي الصورة الشخصية للمستند في الجلسة نفسها."
                },
                "source_image": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لصورة المصدر المستخدمة للمقارنة"
                },
                "target_image": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL للصورة المستهدفة المستخدمة للمقارنة"
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "log_type": {
                        "type": "string"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                      }
                    }
                  },
                  "description": "تحذيرات التحقق من مطابقة الوجه"
                },
                "face_coverage": {
                  "type": "object",
                  "nullable": true,
                  "description": "ما إذا كانت مناطق العينين والفم والوجه مغطاة في الصورة الملتقطة. يُعاد بواسطة `GET /v3/session/{sessionId}/decision/` فقط؛ وهو ليس جزءاً من payload الخاصة بـ webhook. وتكون `null` عند عدم وجود قراءة للتغطية.",
                  "properties": {
                    "eyes": {
                      "type": "object",
                      "properties": {
                        "covered": {
                          "type": "boolean",
                          "nullable": true
                        },
                        "calibrated": {
                          "type": "boolean",
                          "nullable": true,
                          "description": "تعني القيمة `false` أن القراءة هي دليل ظلّي فقط ولا يؤدي أي تحذير إلى اتخاذ إجراء بناءً عليها."
                        },
                        "visibility_score": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    },
                    "mouth": {
                      "type": "object",
                      "properties": {
                        "covered": {
                          "type": "boolean",
                          "nullable": true
                        },
                        "calibrated": {
                          "type": "boolean",
                          "nullable": true,
                          "description": "تعني القيمة `false` أن القراءة هي دليل ظلّي فقط ولا يؤدي أي تحذير إلى اتخاذ إجراء بناءً عليها."
                        },
                        "visibility_score": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    },
                    "face": {
                      "type": "object",
                      "properties": {
                        "covered": {
                          "type": "boolean",
                          "nullable": true
                        },
                        "calibrated": {
                          "type": "boolean",
                          "nullable": true,
                          "description": "تعني القيمة `false` أن القراءة هي دليل ظلّي فقط ولا يؤدي أي تحذير إلى اتخاذ إجراء بناءً عليها."
                        },
                        "visibility_score": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "phone_verifications": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير التحقق من رقم الهاتف** — دائماً ما تكون مصفوفة JSON، وليست كائن `phone` مفرداً أبداً. تكون `null` حتى تنتج خطوة هاتف واحدة على الأقل بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، ورقم الهاتف والبيانات الوصفية للدولة، و`lifecycle[]`، و`matches[]`، و`warnings[]`.",
            "items": {
              "type": "object",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "المعرّف الفريد لخطوة الهاتف هذه في مخطط سير العمل."
                },
                "status": {
                  "type": "string",
                  "description": "حالة مستوى الميزة لخطوة التحقق من رقم الهاتف هذه. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`.",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Expired"
                  ]
                },
                "phone_number_prefix": {
                  "type": "string",
                  "description": "بادئة رمز الاتصال بالدولة"
                },
                "phone_number": {
                  "type": "string",
                  "description": "رقم الهاتف بدون رمز الدولة"
                },
                "full_number": {
                  "type": "string",
                  "description": "رقم الهاتف الكامل مع رمز الدولة"
                },
                "country_code": {
                  "type": "string",
                  "description": "رمز الدولة المكون من حرفين (ISO 3166-1 alpha-2)"
                },
                "country_name": {
                  "type": "string",
                  "description": "اسم الدولة الكامل"
                },
                "carrier": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "اسم شركة الاتصالات"
                    },
                    "type": {
                      "type": "string",
                      "description": "نوع خط الهاتف (جوال، خط أرضي، إلخ)"
                    }
                  }
                },
                "is_disposable": {
                  "type": "boolean",
                  "description": "ما إذا كان رقم الهاتف من خدمة أرقام مؤقتة"
                },
                "is_virtual": {
                  "type": "boolean",
                  "description": "ما إذا كان رقم الهاتف افتراضياً"
                },
                "verification_method": {
                  "type": "string",
                  "description": "الطريقة المستخدمة للتحقق من رقم الهاتف"
                },
                "verification_attempts": {
                  "type": "integer",
                  "description": "عدد محاولات التحقق التي تم إجراؤها"
                },
                "verified_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "الطابع الزمني للتحقق من رقم الهاتف"
                },
                "lifecycle": {
                  "type": "array",
                  "description": "قائمة زمنية بالأحداث في دورة حياة التحقق من رقم الهاتف.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "details": {
                        "type": "object",
                        "nullable": true,
                        "description": "الـ payload الخاص بالحدث. تحمل أحداث الإرسال `status` و`reason` و`channel` و`actual_channel`؛ وتحمل أحداث التسليم `channel` و`status`؛ وتحمل أحداث التحقق من الرمز `code_tried` و`status`؛ وتحمل أحداث الحالة النهائية `reason` — أو `null` عندما لا يكون هناك سبب للإبلاغ عنه (مثل `PHONE_VERIFICATION_APPROVED`).",
                        "properties": {
                          "status": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "channel": {
                            "type": "string",
                            "nullable": true
                          },
                          "actual_channel": {
                            "type": "string",
                            "nullable": true
                          },
                          "code_tried": {
                            "type": "string"
                          }
                        }
                      },
                      "fee": {
                        "type": "number"
                      }
                    }
                  }
                },
                "warnings": {
                  "type": "array",
                  "description": "قائمة بالتحذيرات المتعلقة بالتحقق من رقم الهاتف",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "log_type": {
                        "type": "string"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                      }
                    }
                  }
                },
                "matches": {
                  "type": "array",
                  "description": "التطابقات التي تم العثور عليها لرقم الهاتف هذا. كل تطابق له `source`: إما `session` (جلسة تحقق أخرى في تطبيقك تطابقت مع الرقم نفسه، وتُرجع مع `session_id`/`session_number`/`vendor_data`/`verification_date`) أو `list_entry` (الرقم موجود في قائمة سماح/حظر تديرها المؤسسة — راجع `/management-api/lists/overview`). تستخدم التطابقات عبر الجلسات `vendor_data` مختلفة ويبلغ الحد الأقصى لها 5.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "session_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                      },
                      "session_number": {
                        "type": "integer",
                        "nullable": true
                      },
                      "vendor_data": {
                        "type": "string",
                        "nullable": true
                      },
                      "verification_date": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                      },
                      "phone_number": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "nullable": true
                      },
                      "is_blocklisted": {
                        "type": "boolean"
                      },
                      "api_service": {
                        "type": "string",
                        "nullable": true
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "session",
                          "list_entry"
                        ],
                        "description": "مصدر هذا التطابق. تعني `session` أن جلسة تحقق أخرى في تطبيقك تطابقت مع هذه القيمة. تعني `list_entry` أن القيمة طابقت قائمة تديرها المؤسسة (قائمة السماح/قائمة الحظر) — راجع النظرة العامة على قوائم Management API على `/management-api/lists/overview` لمعرفة كيفية إدارة هذه القوائم."
                      }
                    }
                  }
                },
                "phone_intelligence": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PhoneIntelligence"
                    }
                  ],
                  "description": "إشارات معلومات الهاتف. تتوفر فقط عند تشغيل الإضافة الخاصة بمعلومات الهاتف لهذا الرقم."
                },
                "phone_social": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PhoneSocialFootprint"
                    }
                  ],
                  "description": "البصمة الاجتماعية للرقم. تظهر فقط عند تشغيل الميزة الإضافية للبصمة الاجتماعية لهذا الرقم."
                }
              }
            }
          },
          "email_verifications": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير التحقق من البريد الإلكتروني** — دائماً ما تكون مصفوفة JSON، وليست كائن `email` مفرداً أبداً. تكون `null` حتى تنتج خطوة بريد إلكتروني واحدة على الأقل بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، وعنوان البريد الإلكتروني، وبيانات الاختراق، و`lifecycle[]`، و`matches[]`، و`warnings[]`.",
            "items": {
              "type": "object",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "المعرّف الفريد لخطوة البريد الإلكتروني هذه في مخطط سير العمل."
                },
                "status": {
                  "type": "string",
                  "description": "حالة مستوى الميزة لخطوة التحقق من البريد الإلكتروني هذه. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`.",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Expired"
                  ]
                },
                "email": {
                  "type": "string",
                  "description": "عنوان البريد الإلكتروني الجاري التحقق منه"
                },
                "is_breached": {
                  "type": "boolean",
                  "description": "يشير إلى ما إذا كان البريد الإلكتروني قد تم العثور عليه في تسريبات بيانات معروفة"
                },
                "breaches": {
                  "type": "array",
                  "description": "قائمة بالخروقات المعروفة التي تم العثور على هذا البريد الإلكتروني فيها",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "اسم الاختراق"
                      },
                      "domain": {
                        "type": "string",
                        "description": "النطاق المتأثر بالاختراق"
                      },
                      "logo_path": {
                        "type": "string",
                        "description": "رابط URL لشعار الخدمة المخترقة"
                      },
                      "breach_date": {
                        "type": "string",
                        "format": "date",
                        "description": "تاريخ حدوث الانتهاك"
                      },
                      "description": {
                        "type": "string",
                        "description": "وصف المخالفة"
                      },
                      "is_verified": {
                        "type": "boolean",
                        "description": "ما إذا كان قد تم التحقق من الاختراق"
                      },
                      "data_classes": {
                        "type": "array",
                        "description": "أنواع البيانات التي تم كشفها في عملية الاختراق",
                        "items": {
                          "type": "string"
                        }
                      },
                      "breach_emails_count": {
                        "type": "integer",
                        "description": "عدد عناوين البريد الإلكتروني المتأثرة في الاختراق"
                      }
                    }
                  }
                },
                "is_disposable": {
                  "type": "boolean",
                  "description": "يشير إلى ما إذا كان البريد الإلكتروني من مزود بريد مؤقت"
                },
                "is_undeliverable": {
                  "type": "boolean",
                  "description": "يشير إلى ما إذا كان عنوان البريد الإلكتروني غير قابل للتسليم"
                },
                "verification_attempts": {
                  "type": "integer",
                  "description": "عدد محاولات التحقق لهذا البريد الإلكتروني"
                },
                "verified_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "الطابع الزمني للتحقق من البريد الإلكتروني"
                },
                "warnings": {
                  "type": "array",
                  "description": "قائمة بالتحذيرات المتعلقة بالتحقق من البريد الإلكتروني",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "log_type": {
                        "type": "string"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                      }
                    }
                  }
                },
                "lifecycle": {
                  "type": "array",
                  "description": "قائمة زمنية بالأحداث في دورة حياة التحقق من البريد الإلكتروني.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "details": {
                        "type": "object",
                        "nullable": true,
                        "description": "الـ payload الخاص بالحدث. تحمل أحداث الإرسال `status` و`reason`؛ وتحمل أحداث التحقق من الرمز `code_tried` و`status`؛ وتحمل أحداث الحالة النهائية `reason` — أو `null` عندما لا يكون هناك سبب للإبلاغ عنه (مثل `EMAIL_VERIFICATION_APPROVED`).",
                        "properties": {
                          "status": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "code_tried": {
                            "type": "string"
                          }
                        }
                      },
                      "fee": {
                        "type": "number"
                      }
                    }
                  }
                },
                "matches": {
                  "type": "array",
                  "description": "التطابقات التي تم العثور عليها لعنوان البريد الإلكتروني هذا. كل تطابق له `source`: إما `session` (جلسة تحقق أخرى في تطبيقك تطابقت مع البريد الإلكتروني نفسه، وتُرجع مع `session_id`/`session_number`/`vendor_data`/`verification_date`) أو `list_entry` (البريد الإلكتروني موجود في قائمة سماح/حظر تديرها المؤسسة — راجع `/management-api/lists/overview`). تستخدم التطابقات عبر الجلسات `vendor_data` مختلفة ويبلغ الحد الأقصى لها 5.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "session_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                      },
                      "session_number": {
                        "type": "integer",
                        "nullable": true
                      },
                      "vendor_data": {
                        "type": "string",
                        "nullable": true
                      },
                      "verification_date": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                      },
                      "email": {
                        "type": "string",
                        "format": "email"
                      },
                      "status": {
                        "type": "string",
                        "nullable": true
                      },
                      "is_blocklisted": {
                        "type": "boolean"
                      },
                      "api_service": {
                        "type": "string",
                        "nullable": true
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "session",
                          "list_entry"
                        ],
                        "description": "مصدر هذا التطابق. تعني `session` أن جلسة تحقق أخرى في تطبيقك تطابقت مع هذه القيمة. تعني `list_entry` أن القيمة طابقت قائمة تديرها المؤسسة (قائمة السماح/قائمة الحظر) — راجع النظرة العامة على قوائم Management API على `/management-api/lists/overview` لمعرفة كيفية إدارة هذه القوائم."
                      }
                    }
                  }
                },
                "email_intelligence": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/EmailIntelligence"
                    }
                  ],
                  "description": "إشارات معلومات البريد الإلكتروني. متوفرة فقط عند تشغيل الميزة الإضافية لمعلومات البريد الإلكتروني لهذا العنوان."
                },
                "email_social": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/EmailSocialFootprint"
                    }
                  ],
                  "description": "البصمة الاجتماعية للعنوان. تظهر فقط عند تشغيل الميزة الإضافية للبصمة الاجتماعية لهذا العنوان."
                }
              }
            }
          },
          "poa_verifications": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير إثبات العنوان (POA)** — دائماً ما تكون مصفوفة JSON، وليست كائن `poa` مفرداً أبداً. تكون `null` حتى تنتج خطوة إثبات عنوان واحدة على الأقل بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، وعنوان URL لملف المستند، والجهة المصدرة، والتواريخ، والعنوان المحلل، و`warnings[]`.",
            "items": {
              "type": "object",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "معرّف فريد لخطوة إثبات العنوان هذه في مخطط سير العمل."
                },
                "status": {
                  "type": "string",
                  "description": "حالة مستوى الميزة لخطوة إثبات العنوان هذه. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`.",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Resub Requested"
                  ]
                },
                "document_file": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط URL لمستند إثبات العنوان"
                },
                "issuing_state": {
                  "type": "string",
                  "description": "رمز الدولة المكون من حرفين لدولة الإصدار"
                },
                "document_type": {
                  "type": "string",
                  "description": "نوع مستند إثبات العنوان"
                },
                "document_subtype": {
                  "type": "string",
                  "nullable": true,
                  "description": "تصنيف أكثر دقة لمستند POA ضمن `document_type` الخاص به، عند اكتشاف أحدها. ويكون `null` بخلاف ذلك."
                },
                "document_language": {
                  "type": "string",
                  "description": "رمز لغة المستند"
                },
                "document_metadata": {
                  "type": "object",
                  "properties": {
                    "file_size": {
                      "type": "integer",
                      "description": "حجم المستند"
                    },
                    "content_type": {
                      "type": "string",
                      "description": "نوع محتوى المستند"
                    },
                    "creation_date": {
                      "type": "string",
                      "format": "date",
                      "description": "تاريخ إنشاء المستند"
                    },
                    "modified_date": {
                      "type": "string",
                      "format": "date",
                      "description": "تاريخ تعديل المستند"
                    },
                    "overlay_manipulation": {
                      "type": "object",
                      "nullable": true,
                      "description": "التحليل الجنائي لملفات PDF للتلاعب المشتبه به في النص المتراكب. القيمة Null عند عدم العثور على أي دليل تلاعب بالنص المتراكب أو إذا لم يكن المستند بصيغة PDF.",
                      "properties": {
                        "detected": {
                          "type": "boolean",
                          "description": "ما إذا تم اكتشاف دليل على التلاعب بالنص المتراكب."
                        },
                        "analyzed": {
                          "type": "boolean",
                          "description": "ما إذا كان قد أمكن تحليل ملف PDF."
                        },
                        "analysis_incomplete": {
                          "type": "boolean",
                          "description": "يكون الحقل موجودًا وقيمته صحيحة فقط عندما يتعذر فحص الملف بالكامل. يحتفظ الجزء الذي تم فحصه بنتائجه حيثما أمكن، ويُظهر المستند تحذير استبدال النص غير المُثبت."
                        },
                        "signals": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "إشارات الفحص الجنائي التي تم إطلاقها، مثل duplicate_font_subset أو glyph_fragmentation."
                        },
                        "manipulated_regions": {
                          "type": "array",
                          "description": "المناطق المشتبه في التلاعب بها بإحداثيات صفحة PDF.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "page": {
                                "type": "integer"
                              },
                              "x": {
                                "type": "number"
                              },
                              "y": {
                                "type": "number"
                              },
                              "width": {
                                "type": "number"
                              },
                              "height": {
                                "type": "number"
                              },
                              "page_width": {
                                "type": "number"
                              },
                              "page_height": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    },
                    "creator": {
                      "type": "string",
                      "nullable": true,
                      "description": "التطبيق المنشئ المسجل في بيانات المستند الوصفية."
                    },
                    "producer": {
                      "type": "string",
                      "nullable": true,
                      "description": "برنامج الإنشاء المسجل في بيانات التعريف لملف PDF."
                    },
                    "software": {
                      "type": "string",
                      "nullable": true,
                      "description": "برنامج التحرير/المعالجة المسجل في البيانات الوصفية للملف."
                    },
                    "encryption": {
                      "type": "string",
                      "nullable": true,
                      "description": "مخطط تشفير المستند، عندما يكون مشفراً."
                    },
                    "is_signed": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "ما إذا كان ملف PDF يحمل توقيعاً رقمياً."
                    },
                    "is_tampered": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "ما إذا كان التحقق من التوقيع يشير إلى تعديل الملف بعد التوقيع."
                    },
                    "signature_info": {
                      "type": "object",
                      "nullable": true,
                      "description": "تفاصيل التوقيع/التوقيعات الرقمية، إن وُجدت."
                    },
                    "exif_original_date": {
                      "type": "string",
                      "nullable": true,
                      "description": "تاريخ الالتقاط الأصلي في EXIF، لعمليات تحميل الصور."
                    },
                    "exif_digitized_date": {
                      "type": "string",
                      "nullable": true,
                      "description": "تاريخ الرقمنة في EXIF، لعمليات تحميل الصور."
                    },
                    "processed_by_known_editor": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "ما إذا كانت البيانات الوصفية للملف تشير إلى معالجة بواسطة برنامج تعديل مستندات معروف."
                    },
                    "has_different_creation_mod_date": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "ما إذا كان تاريخ الإنشاء وتاريخ التعديل مختلفين — وهي إشارة شائعة على التلاعب."
                    }
                  },
                  "description": "بيانات وصفية للتحليل الجنائي للملفات مستخرجة من مستند POA الذي تم تحميله. تحتوي دائماً على المفاتيح أدناه (القيم تكون `null` عندما لا تكون قابلة للتطبيق، مثل تواريخ EXIF لملفات PDF). تكون `null` عندما يتعذر استخراج أي بيانات وصفية.",
                  "nullable": true
                },
                "issuer": {
                  "type": "string",
                  "description": "اسم جهة إصدار المستند"
                },
                "issue_date": {
                  "type": "string",
                  "format": "date",
                  "description": "تاريخ إصدار المستند"
                },
                "expiration_date": {
                  "type": "string",
                  "format": "date",
                  "nullable": true,
                  "description": "تاريخ انتهاء المستند، إن وجد"
                },
                "poa_address": {
                  "type": "string",
                  "description": "العنوان الخام من مستند إثبات العنوان"
                },
                "poa_formatted_address": {
                  "type": "string",
                  "description": "العنوان المنسق من مستند إثبات العنوان"
                },
                "poa_parsed_address": {
                  "type": "object",
                  "properties": {
                    "address_type": {
                      "type": "string",
                      "description": "نوع العنوان (شارع، جادة، إلخ)"
                    },
                    "street_1": {
                      "type": "string",
                      "description": "عنوان الشارع الأساسي"
                    },
                    "street_2": {
                      "type": "string",
                      "nullable": true,
                      "description": "عنوان الشارع الثانوي"
                    },
                    "city": {
                      "type": "string",
                      "description": "اسم المدينة"
                    },
                    "region": {
                      "type": "string",
                      "description": "اسم المنطقة أو الولاية"
                    },
                    "country": {
                      "type": "string",
                      "description": "رمز الدولة المكون من حرفين"
                    },
                    "postal_code": {
                      "type": "string",
                      "description": "الرمز البريدي"
                    },
                    "document_location": {
                      "type": "object",
                      "properties": {
                        "latitude": {
                          "type": "number",
                          "description": "إحداثي خط العرض"
                        },
                        "longitude": {
                          "type": "number",
                          "description": "إحداثي خط الطول"
                        }
                      }
                    }
                  }
                },
                "name_on_document": {
                  "type": "string",
                  "nullable": true,
                  "description": "اسم صاحب الحساب / المرسل إليه المستخرج من مستند POA، والمستخدم لمطابقة الاسم. يكون `null` عندما يتعذر استخراج أي اسم."
                },
                "name_match_score_expected_details": {
                  "type": "number",
                  "nullable": true,
                  "description": "درجة التشابه (0-100) بين `name_on_document` والاسم المتوقع المقدَّم عند إنشاء الجلسة. تكون `null` عند فقدان أي من الطرفين."
                },
                "name_match_score_id_verification": {
                  "type": "number",
                  "nullable": true,
                  "description": "درجة التشابه (0-100) بين `name_on_document` والاسم المستخرج بواسطة خطوة التحقق من الهوية. تكون `null` عند فقدان أي من الطرفين."
                },
                "expected_details_address": {
                  "type": "string",
                  "nullable": true,
                  "description": "العنوان الخام المتوقع للتحقق"
                },
                "expected_details_formatted_address": {
                  "type": "string",
                  "nullable": true,
                  "description": "العنوان المنسق المتوقع للتحقق"
                },
                "expected_details_parsed_address": {
                  "type": "object",
                  "description": "تفاصيل العنوان المُحلل المتوقعة للتحقق"
                },
                "extra_fields": {
                  "type": "object",
                  "description": "تفاصيل مصرفية وتفاصيل اتصال إضافية تم استخراجها من المستند.",
                  "properties": {
                    "bank_account_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "bank_iban": {
                      "type": "string",
                      "nullable": true
                    },
                    "bank_sort_code": {
                      "type": "string",
                      "nullable": true
                    },
                    "bank_routing_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "bank_swift_bic": {
                      "type": "string",
                      "nullable": true
                    },
                    "bank_branch_name": {
                      "type": "string",
                      "nullable": true
                    },
                    "bank_branch_address": {
                      "type": "string",
                      "nullable": true
                    },
                    "document_phone_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "additional_names": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "extra_files": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uri"
                  },
                  "description": "ملفات إضافية لإثبات العنوان"
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "log_type": {
                        "type": "string"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                      }
                    }
                  }
                },
                "detected_codes": {
                  "type": "array",
                  "description": "رموز QR والرموز الشريطية المكتشفة في كل صفحة تمت معالجتها من المستند. تكون فارغة عند عدم العثور على أي منها. رمز QR الذي تم تحديد مكانه ولكن تعذر فك تشفيره يحتوي على `parsed_payload: null`.",
                  "items": {
                    "$ref": "#/components/schemas/DocumentAIDetectedCode"
                  }
                },
                "address_validation": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/AddressValidationResult"
                    }
                  ],
                  "nullable": true,
                  "description": "التحقق من صحة العنوان للعنوان الوارد في إثبات العنوان هذا: ما إذا كان موجوداً وصيغته الموحدة، كما قرأها المستند (أي تصحيح لاحق لـ `poa_address` لا يعيد تشغيله). يظهر عندما تُفعّل خطوة إثبات العنوان هذه الميزة الإضافية للتحقق من العنوان وتجتاز الملفات المرفوعة فحوصات المستند؛ ويكون `null` بخلاف ذلك."
                }
              }
            }
          },
          "document_ai_documents": {
            "type": "array",
            "nullable": true,
            "description": "**تقارير Document AI مجمّعة حسب عقدة سير العمل** — تكون دائماً مصفوفة JSON، وليست كائناً مفرداً أبداً. وتكون `null` حتى تنتج خطوة Document AI واحدة على الأقل بيانات. تظهر فقط عندما يكون `session_kind = user`. كل عنصر هو مجموعة عقدة مع `status` إجمالي، و`node_id`، ومصفوفة `items[]` لنتائج كل مستند (البيانات المستخرجة مرتبطة بمفتاح الحقل المكوّن)، و`warnings`.",
            "items": {
              "type": "object",
              "description": "نتائج Document AI مجمعة حسب عقدة سير العمل.",
              "properties": {
                "status": {
                  "type": "string",
                  "description": "حالة Document AI المجمعة لهذه العقدة، تم جمعها من `items[]` التابعة لها.",
                  "enum": [
                    "Approved",
                    "Declined",
                    "In Review",
                    "Not Finished"
                  ]
                },
                "node_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "معرّف فريد لخطوة Document AI هذه في مخطط سير العمل."
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "uuid": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "node_id": {
                        "type": "string",
                        "nullable": true,
                        "description": "عقدة مخطط سير العمل التي أنتجت هذا المستند."
                      },
                      "document_key": {
                        "type": "string",
                        "description": "مفتاح مستند Document AI المُعدّ الذي يتوافق معه هذا الملف."
                      },
                      "original_filename": {
                        "type": "string",
                        "nullable": true,
                        "description": "اسم الملف كما رفعه المستخدم."
                      },
                      "file_size": {
                        "type": "integer",
                        "nullable": true,
                        "description": "حجم الملف بالبايت."
                      },
                      "file_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "رابط موقع مسبقاً قصير الأجل للملف المرفوع."
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "Approved",
                          "Declined",
                          "In Review",
                          "Not Finished"
                        ],
                        "description": "حالة Document AI لكل مستند."
                      },
                      "extracted_data": {
                        "type": "object",
                        "additionalProperties": true,
                        "nullable": true,
                        "description": "القيم المستخرجة بواسطة Document AI، مفهرسة بمفتاح الحقل المُهيّأ `key`. كل قيمة هي سلسلة نصية، أو رقم، أو `null`."
                      },
                      "detected_codes": {
                        "type": "array",
                        "description": "رموز QR والرموز الشريطية المكتشفة في كل صفحة تمت معالجتها. تكون فارغة عند عدم العثور على أي منها. رمز QR الذي تم تحديد مكانه ولكن تعذر فك تشفيره يحتوي على `parsed_payload: null`.",
                        "items": {
                          "$ref": "#/components/schemas/DocumentAIDetectedCode"
                        }
                      },
                      "fields": {
                        "type": "array",
                        "description": "حقول الاستخراج المُعدّة لهذا المستند.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "مفتاح حقل ثابت يُستخدم كمفتاح في `extracted_data`."
                            },
                            "name": {
                              "type": "string",
                              "description": "اسم حقل سهل القراءة."
                            },
                            "instruction": {
                              "type": "string",
                              "description": "تعليمات الاستخراج المعروضة على النموذج."
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text",
                                "number",
                                "date"
                              ],
                              "description": "نوع القيمة المتوقع للحقل المستخرج."
                            },
                            "required": {
                              "type": "boolean",
                              "description": "Whether this field is required."
                            }
                          }
                        }
                      },
                      "document_metadata": {
                        "type": "object",
                        "nullable": true,
                        "description": "بيانات وصفية للتحليل الجنائي للملفات مستخرجة من المستند الذي تم تحميله (مثل `is_tampered`). تكون `null` عندما يتعذر استخراج أي شيء."
                      },
                      "cross_check_result": {
                        "type": "object",
                        "nullable": true,
                        "description": "المطابقة المرجعية لحقول المستند المستخرجة مع بيانات الجلسة الأخرى. وتكون القيمة `null` عند عدم إجراء أي مطابقة مرجعية."
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  }
                },
                "warnings": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "object"
                  },
                  "description": "سجلات التحذير الصادرة لعقدة Document AI هذه."
                }
              }
            }
          },
          "questionnaire_responses": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير إجابات الاستبيانات** — دائماً ما تكون مصفوفة JSON، وليست كائن `questionnaire` مفرداً أبداً. تكون `null` حتى تنتج خطوة استبيان واحدة على الأقل بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، والبيانات الوصفية للاستبيان، والأقسام التي تحتوي على عناصر النموذج، وإجابات المستخدم.",
            "items": {
              "type": "object",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "المعرّف الفريد لخطوة الاستبيان هذه في مخطط سير العمل."
                },
                "questionnaire_id": {
                  "type": "string",
                  "description": "معرّف فريد للاستبيان"
                },
                "title": {
                  "type": "string",
                  "description": "عنوان الاستبيان"
                },
                "description": {
                  "type": "string",
                  "description": "وصف الاستبيان"
                },
                "languages": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "اللغات المدعومة"
                },
                "default_language": {
                  "type": "string",
                  "description": "اللغة الافتراضية"
                },
                "is_active": {
                  "type": "boolean",
                  "description": "ما إذا كان الاستبيان نشطاً"
                },
                "is_simple_questionnaire": {
                  "type": "boolean",
                  "description": "ما إذا كان الاستبيان نموذجاً خطياً بسيطاً (بدون مخطط متفرع)."
                },
                "questionnaire_group_id": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "معرّف ثابت لمجموعة الاستبيانات عبر الإصدارات."
                },
                "version": {
                  "type": "integer",
                  "nullable": true,
                  "description": "رقم إصدار الاستبيان الذي تمت الإجابة عليه."
                },
                "published_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true,
                  "description": "الطابع الزمني لنشر هذا الإصدار من الاستبيان."
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "nullable": true,
                        "description": "عنوان القسم"
                      },
                      "description": {
                        "type": "string",
                        "nullable": true,
                        "description": "وصف القسم"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "uuid": {
                              "type": "string",
                              "description": "معرّف فريد للعنصر"
                            },
                            "value": {
                              "type": "string",
                              "nullable": true,
                              "description": "معرّف العقدة الثابت لعنصر النموذج هذا ضمن مخطط الاستبيان."
                            },
                            "element_type": {
                              "type": "string",
                              "description": "نوع عنصر الاستبيان"
                            },
                            "is_required": {
                              "type": "boolean",
                              "description": "ما إذا كان العنصر مطلوباً"
                            },
                            "title": {
                              "type": "string",
                              "description": "عنوان العنصر"
                            },
                            "description": {
                              "type": "string",
                              "nullable": true,
                              "description": "وصف العنصر"
                            },
                            "placeholder": {
                              "type": "string",
                              "nullable": true,
                              "description": "نص العنصر النائب"
                            },
                            "choices": {
                              "type": "array",
                              "nullable": true,
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "string"
                                  },
                                  "requires_text_input": {
                                    "type": "boolean",
                                    "description": "ما إذا كان هذا الخيار يتطلب إدخال نص إضافي",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "label",
                                  "value"
                                ]
                              },
                              "description": "خيارات القائمة المنسدلة أو عناصر الاختيار الفردي"
                            },
                            "max_files": {
                              "type": "integer",
                              "description": "الحد الأقصى لعدد الملفات المسموح بها",
                              "nullable": true
                            },
                            "answer": {
                              "type": "object",
                              "description": "الإجابة المقدمة للعنصر",
                              "properties": {
                                "value": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "text": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "files": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "nullable": true
                                }
                              }
                            },
                            "required_if": {
                              "type": "object",
                              "nullable": true,
                              "description": "قاعدة المتطلبات الشرطية، عندما يكون العنصر مطلوباً فقط لإجابات معينة."
                            },
                            "repeatable_config": {
                              "type": "object",
                              "nullable": true,
                              "description": "تكوين مجموعات العناصر القابلة للتكرار، عند الاقتضاء."
                            }
                          },
                          "required": [
                            "uuid",
                            "value",
                            "element_type",
                            "is_required",
                            "title"
                          ]
                        }
                      }
                    }
                  }
                },
                "status": {
                  "type": "string",
                  "description": "حالة الاستبيان"
                }
              }
            }
          },
          "bank_verifications": {
            "type": "array",
            "nullable": true,
            "description": "نتائج التحقق البنكي، عنصر واحد لكل خطوة تحقق بنكي، للتحقق من المستخدمين والتحقق من الشركات. تكون `null` حتى تُنتج خطوة نتيجة ما. يوضح حقل `method` لكل عنصر كيفية التحقق من الحساب: `open_banking` (تسجيل الدخول إلى البنك) أو `account_lookup` (فحص الحساب)، أو خيار بديل عبر `statement` أو `microdeposits`، و`none` عندما يتابع الشخص دون بنك قبل تقييم أي محاولة (`continued_without_bank`). راجع [طرق التحقق البنكي](/ar/core-technology/bank-verification/verification-methods).",
            "items": {
              "$ref": "#/components/schemas/BankVerificationResult"
            }
          },
          "signatures": {
            "type": "array",
            "description": "نتائج التوقيع الإلكتروني، عنصر واحد لكل موقّع وخطوة توقيع، لكل من التحقق من المستخدمين والتحقق من الشركات (KYB). لا تظهر إلا عندما يتضمن سير العمل خطوة التوقيع الإلكتروني؛ وهي مصفوفة فارغة حتى يصل أحد الموقّعين إليها. راجع [تقرير التوقيع الإلكتروني](/ar/core-technology/electronic-signature/report-electronic-signature).",
            "items": {
              "$ref": "#/components/schemas/SignatureResult"
            }
          },
          "aml_screenings": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة تقارير فحص AML** — دائماً مصفوفة JSON، وليست أبداً كائن `aml` مفرداً. تكون `null` إلى أن تُنتج خطوة AML واحدة على الأقل بيانات. كل عنصر هو التقرير الكامل، بما يشمل `node_id`، و`status` على مستوى الميزة، و`total_hits`، و`entity_type`، و`hits[]`، و`score`، و`screened_data`، و`is_ongoing_monitoring_enabled`، و`warnings[]`.",
            "items": {
              "$ref": "#/components/schemas/AMLScreening"
            }
          },
          "ip_analyses": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من تقارير تحليل الجهاز وعنوان IP** — دائماً ما تكون مصفوفة JSON، وليست كائن `ip_analysis` مفرداً أبداً. تكون `null` حتى تنتج خطوة واحدة على الأقل من خطوات تحليل IP بيانات. يمثل كل عنصر التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، وبيانات IP وتحديد الموقع الجغرافي، وبصمة الجهاز، و`warnings[]`. يتم إزالة التكرار من المدخلات ذات `(node_id, ip_address, device_fingerprint)` المكررة من جانب الخادم.",
            "items": {
              "type": "object",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "معرّف فريد لخطوة تحليل الجهاز وعنوان IP هذه في مخطط سير العمل."
                },
                "status": {
                  "type": "string",
                  "description": "حالة مستوى الميزة لمدخل تحليل الجهاز وعنوان IP هذا. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`.",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Resub Requested"
                  ]
                },
                "device_brand": {
                  "type": "string",
                  "description": "علامة الجهاز المستخدم التجارية"
                },
                "device_model": {
                  "type": "string",
                  "description": "طراز الجهاز المستخدم"
                },
                "browser_family": {
                  "type": "string",
                  "description": "عائلة المتصفح المستخدم"
                },
                "os_family": {
                  "type": "string",
                  "description": "عائلة نظام التشغيل"
                },
                "platform": {
                  "type": "string",
                  "description": "نوع المنصة (mobile، desktop، وما إلى ذلك)"
                },
                "device_fingerprint": {
                  "type": "string",
                  "nullable": true,
                  "description": "المعرّف الفريد لبصمة الجهاز"
                },
                "ip_country": {
                  "type": "string",
                  "description": "الدولة المكتشفة من عنوان IP"
                },
                "ip_country_code": {
                  "type": "string",
                  "description": "رمز الدولة المكون من حرفين المستخرج من عنوان IP"
                },
                "ip_state": {
                  "type": "string",
                  "description": "الولاية/المنطقة المكتشفة من عنوان IP"
                },
                "ip_city": {
                  "type": "string",
                  "description": "المدينة المكتشفة من عنوان IP"
                },
                "latitude": {
                  "type": "number",
                  "description": "إحداثي خط العرض لموقع عنوان IP"
                },
                "longitude": {
                  "type": "number",
                  "description": "إحداثي خط الطول لموقع عنوان IP"
                },
                "ip_address": {
                  "type": "string",
                  "description": "عنوان IP"
                },
                "isp": {
                  "type": "string",
                  "nullable": true,
                  "description": "مزود خدمة الإنترنت"
                },
                "organization": {
                  "type": "string",
                  "nullable": true,
                  "description": "المؤسسة المرتبطة بعنوان IP"
                },
                "is_vpn_or_tor": {
                  "type": "boolean",
                  "description": "ما إذا كان عنوان IP صادراً من VPN أو شبكة Tor"
                },
                "is_data_center": {
                  "type": "boolean",
                  "description": "ما إذا كان عنوان IP صادراً من مركز بيانات"
                },
                "time_zone": {
                  "type": "string",
                  "description": "المنطقة الزمنية المكتشفة من عنوان IP"
                },
                "time_zone_offset": {
                  "type": "string",
                  "description": "فارق التوقيت للمنطقة الزمنية"
                },
                "ip": {
                  "type": "object",
                  "description": "الموقع الجغرافي لعنوان IP لهذا الإدخال بالإضافة إلى مسافات الدائرة العظمى (بالكيلومتر) إلى عنوان مستند التحقق من الهوية وعنوان مستند إثبات العنوان (POA). تكون المسافات `null` عندما يتعذر تحديد الموقع لأي من الجانبين.",
                  "properties": {
                    "location": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "latitude": {
                          "type": "number",
                          "example": 41.2706327
                        },
                        "longitude": {
                          "type": "number",
                          "example": 1.9770097
                        }
                      },
                      "description": "الإحداثيات، أو `null` عند عدم توفرها."
                    },
                    "distance_from_id_document": {
                      "type": "number",
                      "nullable": true,
                      "example": 23.4
                    },
                    "distance_from_poa_document": {
                      "type": "number",
                      "nullable": true,
                      "example": 12.3
                    }
                  }
                },
                "id_document": {
                  "type": "object",
                  "description": "الموقع المستخرج من عنوان مستند الهوية بالإضافة إلى المسافات (كم) إلى الموقع الجغرافي لعنوان IP وعنوان مستند إثبات العنوان (POA). يكون `location` بقيمة `null` عندما يتعذر تحديد الموقع الجغرافي لعنوان المستند.",
                  "properties": {
                    "location": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "latitude": {
                          "type": "number",
                          "example": 41.2706327
                        },
                        "longitude": {
                          "type": "number",
                          "example": 1.9770097
                        }
                      },
                      "description": "الإحداثيات، أو `null` عند عدم توفرها."
                    },
                    "distance_from_ip": {
                      "type": "number",
                      "nullable": true,
                      "example": 23.4
                    },
                    "distance_from_poa_document": {
                      "type": "number",
                      "nullable": true,
                      "example": 18.7
                    }
                  }
                },
                "poa_document": {
                  "type": "object",
                  "description": "الموقع المستخرج من مستند إثبات العنوان بالإضافة إلى المسافات (كم) إلى الموقع الجغرافي لعنوان IP وعنوان مستند الهوية. يكون `location` بقيمة `null` عندما لا تتضمن الجلسة خطوة POA أو يتعذر تحديد الموقع الجغرافي للعنوان.",
                  "properties": {
                    "location": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "latitude": {
                          "type": "number",
                          "example": 41.2706327
                        },
                        "longitude": {
                          "type": "number",
                          "example": 1.9770097
                        }
                      },
                      "description": "الإحداثيات، أو `null` عند عدم توفرها."
                    },
                    "distance_from_ip": {
                      "type": "number",
                      "nullable": true,
                      "example": 12.3
                    },
                    "distance_from_id_document": {
                      "type": "number",
                      "nullable": true,
                      "example": 18.7
                    }
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "log_type": {
                        "type": "string"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                      }
                    }
                  }
                },
                "matches": {
                  "type": "array",
                  "description": "حالات التطابق عبر الجلسات التي تم العثور عليها لعنوان IP أو هوية الجهاز الخاصة بهذه المدخلة. كل تطابق هو جلسة تحقق أخرى في تطبيقك (تكون قيمة `source` دائماً `session`) تشترك في القيمة نفسها، وتنتمي دائماً إلى مستخدم مورّد / `vendor_data` مختلف عن الجلسة الحالية، بحد أقصى 5 لكل أداة جمع (`device_fingerprint` يجمع نتيجتي أداتي جمع مستقلتين لكل منهما حد أقصى، لذا يمكن أن يصل العدد إلى 10 مدخلات). يحمل كل عنصر `match_source` و`confidence` و`match_mode` و`device_info` و`location_info`؛ وتظهر المفاتيح `recovery_similarity` و`tls_ja4_corroborated` و`recovery_gate_reason` فقط عندما تكون قيمة `match_source` هي `recovered_high`.",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "session_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "معرّف الجلسة للجلسة المتطابقة."
                      },
                      "session_number": {
                        "type": "integer",
                        "description": "الرقم التسلسلي للجلسة المتطابقة."
                      },
                      "vendor_data": {
                        "type": "string",
                        "nullable": true,
                        "description": "`vendor_data` للجلسة المطابقة — تختلف دائماً عن مستخدم المورّد للجلسة الحالية."
                      },
                      "verification_date": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "تاريخ إنشاء الجلسة المتطابقة (`YYYY-MM-DDTHH:MM:SSZ`)."
                      },
                      "match_type": {
                        "type": "string",
                        "enum": [
                          "ip_address",
                          "device_fingerprint"
                        ],
                        "description": "ما إذا كان التطابق بناءً على عنوان IP أو بصمة الجهاز"
                      },
                      "match_source": {
                        "type": "string",
                        "enum": [
                          "ip_address",
                          "persistent_id",
                          "legacy_fp",
                          "recovered_high"
                        ],
                        "description": "كيفية الوصول إلى هذا التطابق: `ip_address` (عنوان IP مشترك — وجود مشترك على الشبكة، وليس إقراراً بهوية الجهاز)، أو `persistent_id` (معرّف جهاز دائم مخزّن بشكل مطابق)، أو `legacy_fp` (تجزئة بصمة الجهاز القديمة `didit-fp-*`)، أو `recovered_high` (تطابق استرداد بصمة تقريبي عالي الثقة). تظهر العناصر المرشحة للاسترداد ذات الثقة الأقل كتحذيرات مخاطر فقط، ولا تظهر مطلقاً في هذه المصفوفة."
                      },
                      "matched_value": {
                        "type": "string",
                        "nullable": true,
                        "description": "القيمة المتطابقة: عنوان IP المشترك، أو معرّف الجهاز الدائم أو تجزئة بصمة الجهاز القديمة، أو — بالنسبة لـ `recovered_high` — معرّف UUID للجهاز المسترد."
                      },
                      "status": {
                        "type": "string",
                        "description": "حالة دورة حياة الجلسة المتطابقة."
                      },
                      "is_blocklisted": {
                        "type": "boolean",
                        "description": "ما إذا كانت القيمة المتطابقة موجودة في قائمة الحظر. حالياً تكون دائماً `false` لتطابقات الجهاز/عنوان IP."
                      },
                      "api_service": {
                        "type": "string",
                        "nullable": true,
                        "description": "خدمة API المستقلة للجلسة المطابقة؛ وتكون القيمة `null` لجلسات سير العمل."
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "session"
                        ],
                        "description": "دائماً `session` لمطابقات الجهاز/عنوان IP — كل مطابقة تمثل جلسة تحقق أخرى في تطبيقك."
                      },
                      "device_info": {
                        "type": "object",
                        "description": "تفاصيل الجهاز التي رُصدت في الجلسة المتطابقة.",
                        "properties": {
                          "device_brand": {
                            "type": "string",
                            "nullable": true
                          },
                          "device_model": {
                            "type": "string",
                            "nullable": true
                          },
                          "browser_family": {
                            "type": "string",
                            "nullable": true
                          },
                          "os_family": {
                            "type": "string",
                            "nullable": true
                          },
                          "platform": {
                            "type": "string",
                            "nullable": true
                          },
                          "device_fingerprint": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "location_info": {
                        "type": "object",
                        "description": "تفاصيل الشبكة والموقع الجغرافي التي تمت ملاحظتها في جلسة المطابقة.",
                        "properties": {
                          "ip_address": {
                            "type": "string",
                            "nullable": true
                          },
                          "ip_country": {
                            "type": "string",
                            "nullable": true
                          },
                          "ip_country_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "ip_state": {
                            "type": "string",
                            "nullable": true
                          },
                          "ip_city": {
                            "type": "string",
                            "nullable": true
                          },
                          "is_vpn_or_tor": {
                            "type": "boolean"
                          },
                          "is_data_center": {
                            "type": "boolean"
                          }
                        }
                      },
                      "confidence": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "description": "درجة الثقة في تحديد الهوية من جانب الخادم، وتُحسب كالتالي `1 - P(false positive)`: القيمة `1.0` لحالات التطابق الحتمية (`persistent_id`، أو `recovered_high` المستندة إلى العتاد)، و`0.5` لحالة `legacy_fp`، و`0.0` لحالة `ip_address` (التواجد المشترك فقط)، وقيمة معدّلة حسب التأييد أقل من `1.0` لحالات التطابق الاحتمالية المسترجعة (تكون أعلى عندما تتطابق بصمة TLS JA4 ودولة IP بشكل مستقل)."
                      },
                      "match_mode": {
                        "type": "string",
                        "enum": [
                          "deterministic",
                          "probabilistic",
                          "co_occurrence"
                        ],
                        "description": "فئة أدلة التطابق: `deterministic` (معرّف دقيق مخزن أو متجذر في العتاد لا يمكن أن يتصادم بين الأجهزة الفعلية)، أو `probabilistic` (دليل بصمة تقريبي)، أو `co_occurrence` (شبكة مشتركة فقط، دون ادعاء هوية الجهاز)."
                      },
                      "recovery_similarity": {
                        "type": "number",
                        "description": "تشابه جيب التمام لمطابقة استعادة بصمة الإصبع، مقرّباً إلى 4 منازل عشرية. يتوفر فقط عندما يكون `match_source` هو `recovered_high`."
                      },
                      "tls_ja4_corroborated": {
                        "type": "boolean",
                        "description": "ما إذا كانت بصمات TLS JA4 للملاحظتين متطابقة — وهي إشارة يرصدها الخادم ولا يمكن للمتصفح انتحالها. تكون موجودة فقط عندما تكون قيمة `match_source` هي `recovered_high`."
                      },
                      "recovery_gate_reason": {
                        "type": "string",
                        "description": "سبب اجتياز مطابقة الاسترداد لبوابة الإيجابيات الكاذبة الصارمة: `hardware_root_match` (تطابق تام لمعرّف جهاز متجذر في العتاد) أو، في التكوينات التي تقبل أدلة الفحص فقط، `exact_composite_plus_<n>_families` / `very_high_similarity_plus_<n>_families`. يظهر فقط عندما يكون `match_source` هو `recovered_high`."
                      }
                    }
                  }
                },
                "browser_version": {
                  "type": "string",
                  "nullable": true
                },
                "os_version": {
                  "type": "string",
                  "nullable": true
                },
                "user_agent": {
                  "type": "string",
                  "nullable": true,
                  "description": "سلسلة وكيل المستخدم الخاصة بالمتصفح."
                },
                "accept_language": {
                  "type": "string",
                  "nullable": true,
                  "description": "رأس `Accept-Language` الذي أرسله المتصفح."
                },
                "session_identifier": {
                  "type": "string",
                  "nullable": true,
                  "description": "معرّف جلسة التصفح التي تم تشغيل التحقق فيها."
                },
                "session_age_ms": {
                  "type": "integer",
                  "nullable": true,
                  "description": "عمر جلسة التصفح تلك بالمللي ثانية عند تشغيل الخطوة."
                },
                "coords_accuracy": {
                  "type": "number",
                  "nullable": true,
                  "description": "نصف قطر الدقة، بالأمتار، للإحداثيات التي أبلغ عنها الجهاز."
                },
                "raw_device_data": {
                  "type": "object",
                  "nullable": true,
                  "additionalProperties": true,
                  "description": "إشارات الجهاز الخام التي تم جمعها لهذه الخطوة."
                }
              }
            }
          },
          "geolocation_checks": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة من نتائج التحقق من الموقع**، نتيجة واحدة لكل خطوة تحقق من الموقع: المحاولة المقبولة لتلك الخطوة. تكون `null` حتى تنتج خطوة تحقق من الموقع بيانات. توجد المحاولات السابقة للخطوة نفسها في `geolocation_attempts`.",
            "items": {
              "$ref": "#/components/schemas/GeolocationCheck"
            }
          },
          "geolocation_attempts": {
            "type": "array",
            "nullable": true,
            "description": "كل محاولة لكل خطوة تحقق من الموقع في هذه الجلسة، الأقدم أولاً. يتم استبعاد المحاولات التي استُبدلت بإعادة الإرسال. وسير العمل الذي يحجب `geolocation_checks` من خلال سمات الاستجابة الخاصة به يحجب هذه القائمة أيضاً.",
            "items": {
              "$ref": "#/components/schemas/GeolocationAttempt"
            }
          },
          "database_validations": {
            "type": "array",
            "nullable": true,
            "description": "**مصفوفة تقارير التحقق من قواعد البيانات** — دائماً مصفوفة JSON، وليست أبداً كائن `database_validation` مفرداً. تكون `null` حتى تُنتج خطوة تحقق من قاعدة البيانات واحدة على الأقل بياناتٍ. كل عنصر هو التقرير الكامل، بما في ذلك `node_id`، و`status` على مستوى الميزة، و`screened_data`، ومصفوفة `validations[]` لكل خدمة (يحتوي كل منها على `source_data` الخاص بالسجل)، و`warnings[]`. تختلف حقول `screened_data` و`source_data` بحسب الدولة:\n\n**ARG (الأرجنتين)**: screened_data: {document_number, selfie, gender, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name, date_of_birth, date_of_death, tax_id, tax_id_type, face_match_score, sit_1_since, banks, last_position, highest_position, rejected_checks}. يستخدم التحقق البيومتري لمطابقة الوجه من RENAPER. يُستنتج الجنس تلقائياً من تحليل الوجه أو الاسم الأول عندما لا يكون متوفراً في المستند (مثل رخص القيادة)\n\n**BOL (بوليفيا)**: screened_data: {document_number, date_of_birth, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name, date_of_birth, gender}\n\n**BRA (البرازيل)**: screened_data: {tax_number, first_name, last_name, date_of_birth}. يتضمن source_data دائماً {identification_number, first_name, last_name, date_of_birth, lgpd_minor, minor_under_18, minor_under_16} لعمليات تطابق CPF الناجحة. تُعيّن عمليات البحث الناجحة للبالغين تلك العلامات إلى false. قد تُرجع خدمة Receita Federal Consulta CPF الرمز HTTP 422 (قاصر دون 18 عاماً) أو 451 (دون 16 عاماً) مع حجب البيانات بموجب LGPD؛ في هذه الحالات، يُعيّن source_data علامات القاصرين إلى true بحسب الاقتضاء، ويتضمن حالة HTTP الواردة، ويكون التحقق على مستوى الحقل no_match. راجع قسم البرازيل في مرجع رموز نتائج التحقق من قواعد البيانات للاطلاع على القائمة الكاملة للرموز.\n\n**CHL (تشيلي)**: screened_data: {personal_number, first_name, last_name, date_of_birth}. source_data: {identification_number, first_name, last_name, date_of_birth, gender}\n\n**COL (كولومبيا)**: screened_data: {document_number, document_type, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name, date_of_birth, document_type}\n\n**CRI (كوستاريكا)**: screened_data: {personal_number, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name}\n\n**DOM (جمهورية الدومينيكان)**: screened_data: {personal_number}. source_data: {identification_number} (يُرجع valid/invalid فقط)\n\n**ECU (الإكوادور)**: screened_data: {personal_number, first_name, last_name}. source_data: {identification_number, first_name, last_name, street, formatted_address, gender, nationality, education, marital_status, spouse, mother_name, father_name, profession}\n\n**ESP (إسبانيا)**: screened_data: {personal_number, document_type, expiration_date, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name, document_type, expiration_date}\n\n**GTM (غواتيمالا)**: screened_data: {document_number, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name}\n\n**HND (هندوراس)**: screened_data: {document_number, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name}\n\n**MEX (المكسيك)**: screened_data: {personal_number (CURP), first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name, date_of_birth, gender, nationality, curp_status, state_of_birth, doc_probatorio, registration_year, registration_state, registration_municipality, num_acta, crip, issuing_state_code, foreign_registry_number, folio_carta, folio_certificado}. يستخدم السجل المدني RENAPO. تتوفر أيضاً خدمة منفصلة للتحقق من صلاحية INE لـ MEX كعملية تحقق فردية إضافية.\n\n**PAN (بنما)**: screened_data: {personal_number, selfie}. source_data: {identification_number}. يستخدم التحقق البيومتري من SIB\n\n**PER (بيرو)**: screened_data: {personal_number (DNI), first_name, last_name}. source_data: {identification_number, first_name, last_name, paternal_name, maternal_name, verification_number, verification_letter}\n\n**PRY (باراغواي)**: screened_data: {document_number, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name}\n\n**SLV (السلفادور)**: screened_data: {document_number, date_of_birth, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name}\n\n**URY (أوروغواي)**: screened_data: {personal_number, date_of_birth, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name}\n\n**VEN (فنزويلا)**: screened_data: {document_number, first_name, last_name}. source_data: {identification_number, first_name, last_name, full_name, gender, date_of_birth, document_type}",
            "items": {
              "type": "object",
              "properties": {
                "node_id": {
                  "type": "string",
                  "description": "المعرّف الفريد لخطوة التحقق من قواعد البيانات هذه في مخطط سير العمل."
                },
                "issuing_state": {
                  "type": "string",
                  "description": "رمز ISO 3166-1 alpha-3 للدولة التي تم الاستعلام عن مصادرها الحكومية/سجلاتها (مثل `BRA` و`MEX` و`ESP` و`NGA` و`IDN`). يغطي التحقق من قواعد البيانات 60+ دولة عبر الأمريكتين وأوروبا وإفريقيا والشرق الأوسط وآسيا والمحيط الهادئ، بالإضافة إلى مصادر عالمية متعددة الدول — وتتوسع التغطية بانتظام، لذا تعامل مع القيمة كمجموعة مفتوحة بدلاً من تعداد ثابت."
                },
                "validation_type": {
                  "type": "string",
                  "enum": [
                    "one_by_one",
                    "two_by_two",
                    "not_enabled"
                  ],
                  "description": "كيفية تأكيد النتيجة: `one_by_one` (نتيجة خدمة واحدة)، أو `two_by_two` (خدمتان مستقلتان أو أكثر طابقتا رقم التعريف بالكامل بشكل مستقل)، أو `not_enabled` (يتم الاحتفاظ بها عندما لا تُنتج أي خدمة تطابقاً قابلاً للاستخدام). لا تكون القيمة `null` أبداً. تتوفر أوضاع التحقق البيومتري المخصصة 2x2 حالياً لكل من `ECU` و`PER`."
                },
                "screened_data": {
                  "type": "object",
                  "description": "بيانات الإدخال المستخدمة للتحقق. تختلف الحقول حسب الدولة — راجع وثائق التحقق من قواعد البيانات (`/core-technology/database-validation/overview`) للاطلاع على التنسيقات الخاصة بكل دولة.",
                  "properties": {
                    "last_name": {
                      "type": "string"
                    },
                    "first_name": {
                      "type": "string"
                    },
                    "tax_number": {
                      "type": "string",
                      "description": "البرازيل: CPF (11 رقماً)"
                    },
                    "personal_number": {
                      "type": "string",
                      "description": "تشيلي: RUT، جمهورية الدومينيكان: Cédula (11 رقماً)، الإكوادور: Cédula (10 أرقام)، إسبانيا: DNI/NIE، المكسيك: CURP (18 حرفاً)، بيرو: DNI (8 أرقام)، أوروغواي: CI"
                    },
                    "document_number": {
                      "type": "string",
                      "description": "ARG: DNI، BOL: CI، COL: Cédula، GTM: DPI، HND: DNI، PAN: Cédula، PRY: CI، SLV: DUI، VEN: Cédula"
                    },
                    "date_of_birth": {
                      "type": "string",
                      "format": "date"
                    },
                    "document_type": {
                      "type": "string",
                      "description": "COL: CC/CE/TI/NIT، ESP: ID/PASSPORT"
                    },
                    "expiration_date": {
                      "type": "string",
                      "format": "date",
                      "description": "مطلوب لـ ESP"
                    }
                  }
                },
                "validations": {
                  "type": "array",
                  "description": "إدخال واحد لكل خدمة سجل قدمت payload تحقق. يحدد كل إدخال الخدمة (`service_id` و`service_name`) ويتضمن مقارنة `validation` لكل حقل، والرمز `outcome_code` / التفصيل `outcome_detail` الخاص بالخدمة عند الإبلاغ عنهما، وسجل الشركات المُطبَّع في `source_data`.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "service_id": {
                        "type": "string",
                        "description": "معرّف خدمة السجل التي أنتجت نتيجة التحقق هذه.",
                        "example": "bra_cpf"
                      },
                      "service_name": {
                        "type": "string",
                        "description": "اسم سهل القراءة لخدمة السجل.",
                        "example": "Brazil - CPF status check"
                      },
                      "validation": {
                        "type": "object",
                        "description": "نتائج عمليات التحقق من صحة الحقول.",
                        "properties": {
                          "full_name": {
                            "type": "string",
                            "description": "نتيجة المطابقة للاسم الكامل (مثل: 'full_match'، 'partial_match'، 'no_match')."
                          },
                          "date_of_birth": {
                            "type": "string",
                            "description": "نتيجة المطابقة لتاريخ الميلاد."
                          },
                          "identification_number": {
                            "type": "string",
                            "description": "نتيجة المطابقة لرقم الهوية."
                          }
                        }
                      },
                      "outcome_code": {
                        "type": "string",
                        "nullable": true,
                        "description": "النتيجة المقروءة آلياً للبحث في السجل (مثل `MATCH`، `NO_MATCH`، `PARTIAL_MATCH`، `INCONCLUSIVE`، ورموز خاصة بالمصدر). تكون موجودة عندما يُبلغ عنها النظام."
                      },
                      "outcome_detail": {
                        "type": "string",
                        "nullable": true,
                        "description": "تفسير سهل القراءة لـ `outcome_code`، عند تقديمه من الخدمة."
                      },
                      "source_data": {
                        "type": "object",
                        "description": "البيانات المرجعة من قاعدة البيانات الحكومية. الحقول الشائعة: identification_number، first_name، last_name، full_name، date_of_birth، gender. حقول إضافية حسب الدولة: تتضمن BRA دائمًا lgpd_minor وminor_under_18 وminor_under_16 عند تطابق CPF بنجاح؛ كما تتضمن حالة HTTP المصدرية عند حجب بيانات CPF بموجب LGPD (HTTP 422/451). وتضيف ECU الحقول street وformatted_address وnationality وeducation وmarital_status وspouse وmother_name وfather_name وprofession. وتضيف PER الحقول paternal_name وmaternal_name وverification_number وverification_letter. وتضيف ESP الحقلين document_type وexpiration_date. وتضيف VEN/COL الحقل document_type.",
                        "additionalProperties": true
                      }
                    }
                  }
                },
                "errors": {
                  "type": "array",
                  "description": "الأخطاء التي أرجعتها خدمات السجلات أثناء التحقق، وتكون كل منها موسومة بـ `service_id` الذي أنتجها. **يتم حذف هذا المفتاح بالكامل عند عدم وجود أخطاء.**",
                  "items": {
                    "type": "object",
                    "description": "كائن الخطأ الخاص بالخدمة المصدر مفروداً كما هو — تختلف مفاتيحه حسب الخدمة (عادةً رسالة/رمز وأي تفاصيل خاصة بمزود الخدمة) — بالإضافة إلى `service_id` لتحديد الخدمة التي حدث بها الخطأ.",
                    "properties": {
                      "service_id": {
                        "type": "string",
                        "nullable": true,
                        "description": "معرّف خدمة السجل التي واجهت خطأ."
                      }
                    },
                    "additionalProperties": true
                  }
                },
                "match_type": {
                  "type": "string",
                  "enum": [
                    "no_match",
                    "partial_match",
                    "full_match"
                  ],
                  "nullable": true,
                  "description": "النتيجة الإجمالية للتطابق عبر الخدمات التي تم الاستعلام عنها. تكون `null` حتى يتم تقييم التحقق."
                },
                "status": {
                  "type": "string",
                  "description": "حالة مستوى الميزة لعملية التحقق من قواعد البيانات هذه. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`.",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Resub Requested"
                  ]
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "enum": [
                          "ID_VERIFICATION",
                          "NFC",
                          "LIVENESS",
                          "FACEMATCH",
                          "PROOF_OF_ADDRESS",
                          "PHONE",
                          "EMAIL",
                          "AML",
                          "LOCATION",
                          "DATABASE_VALIDATION",
                          "QUESTIONNAIRE",
                          "DOCUMENT_AI",
                          "KYB_REGISTRY",
                          "KYB_DOCUMENTS",
                          "KYB_KEY_PEOPLE",
                          "GEOLOCATION",
                          "SIGNATURE"
                        ],
                        "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                      },
                      "risk": {
                        "type": "string"
                      },
                      "additional_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "log_type": {
                        "type": "string"
                      },
                      "short_description": {
                        "type": "string"
                      },
                      "long_description": {
                        "type": "string"
                      },
                      "node_id": {
                        "type": "string",
                        "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                      }
                    }
                  },
                  "description": "التحذيرات المتعلقة بالتحقق من قواعد البيانات."
                }
              }
            }
          },
          "database_validation_not_performed_reason": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "سبب عدم إنتاج نتيجة من التحقق من قواعد البيانات المُهيأ، بتنسيق `{code, message}` بالإضافة إلى حقول السياق. يكون موجوداً فقط عندما يكون `database_validations` هو `null` لسير عمل يتضمن هذه الخطوة، حتى تتمكن من التمييز بين \"وافق السجل\" و\"لم يتم تشغيل أي شيء\". ويكون `null` في الحالات الأخرى.",
            "properties": {
              "code": {
                "type": "string",
                "description": "سبب ثابت قابل للقراءة آلياً."
              },
              "message": {
                "type": "string",
                "description": "تفسير سهل القراءة."
              }
            }
          },
          "reviews": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "user": {
                  "type": "string",
                  "description": "من أجرى المراجعة. عادةً ما يكون معرّف المراجِع في لوحة التحكم (بريده الإلكتروني)، ولكن القيمة تكون `\"API Client\"` لتحديثات الحالة التي تتم باستخدام مفتاح API و`\"Unknown\"` عندما يتعذر تحديد الفاعل — لذا لا تقم بمعالجة هذا الحقل كعنوان بريد إلكتروني."
                },
                "new_status": {
                  "type": "string"
                },
                "comment": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "assignee": {
            "type": "object",
            "nullable": true,
            "description": "المراجِع في لوحة التحكم المعين للجلسة، أو `null` عندما لا يحتفظ بها أحد.",
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              },
              "assigned_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            }
          },
          "waiting_since": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى بدأت الجلسة بالانتظار للمراجعة. وتكون `null` ما لم تكن الجلسة في حالة `In Review` ويحدد تطبيقك موعداً نهائياً للمراجعة."
          },
          "sla_due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى يحين موعد المراجعة. وتكون `null` ما لم تكن الجلسة في حالة `In Review` ويحدد تطبيقك موعداً نهائياً للمراجعة."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "الطابع الزمني لإنشاء الجلسة (ISO 8601، UTC)."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "الطابع الزمني المجدول لانتهاء صلاحية هذه الجلسة. يتم تعيينه في جلسات التحقق من المستخدمين (KYC) عندما تتم تهيئة انتهاء الصلاحية وقت الإنشاء (أو بمجرد أن تُشغّل حالة `Approved` احتساب انتهاء صلاحية KYC). يكون `null` للجلسات التي ليس لها انتهاء صلاحية مُهيأ، وللأنواع التي لا تستخدم انتهاء الصلاحية (مثل جلسات التحقق من الشركات (KYB) التي لم تتلقَ مطلقًا `expires_at`)."
          },
          "registry_checks": {
            "type": "array",
            "nullable": true,
            "description": "عمليات التحقق من سجل الشركات. تكون موجودة فقط عندما تكون `session_kind = business`. يغلّف كل عنصر payload سجل الشركات بالكامل.",
            "items": {
              "type": "object",
              "description": "فحص سجل شركات واحد — الـ payload الكامل لسجل الشركات مُعززاً بهيكل الملكية والتحذيرات. يتوفر فقط عندما يكون `session_kind = business`.",
              "properties": {
                "status": {
                  "type": "string",
                  "description": "حالة دورة حياة الميزة."
                },
                "node_id": {
                  "type": "string",
                  "nullable": true
                },
                "data_resolved": {
                  "type": "boolean"
                },
                "company": {
                  "type": "object",
                  "description": "payload الكامل للشركة من السجل (سجل الشركات مدمجاً مع أي بيانات يقدمها المستخدم أو يتم تعديلها عبر لوحة التحكم).",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "node_id": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "string"
                    },
                    "registry_status": {
                      "type": "string",
                      "nullable": true
                    },
                    "data_resolved": {
                      "type": "boolean"
                    },
                    "company_name": {
                      "type": "string"
                    },
                    "registration_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "country_code": {
                      "type": "string",
                      "description": "دولة التأسيس (ISO 3166-1 alpha-2، مثل `GB` أو `DE` أو `US`)."
                    },
                    "region": {
                      "type": "string",
                      "nullable": true,
                      "description": "رمز التقسيم الإداري حسب معيار ISO 3166-2 عند انطباقه (على سبيل المثال `CA`، و`NY` للولايات الأمريكية)."
                    },
                    "company_type": {
                      "type": "string",
                      "nullable": true
                    },
                    "incorporation_date": {
                      "type": "string",
                      "format": "date",
                      "nullable": true
                    },
                    "registered_address": {
                      "type": "string",
                      "nullable": true
                    },
                    "tax_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "risk_level": {
                      "type": "string",
                      "enum": [
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ],
                      "nullable": true
                    },
                    "verification_status": {
                      "type": "string",
                      "nullable": true
                    },
                    "is_from_registry": {
                      "type": "boolean"
                    },
                    "fetch_status": {
                      "type": "string",
                      "nullable": true
                    },
                    "alternative_names": {
                      "type": "string",
                      "nullable": true,
                      "description": "أسماء الشركات البديلة، أو التجارية، أو السابقة، أو باللغة الأصلية كنص، عند الإبلاغ عنها."
                    },
                    "nature_of_business": {
                      "type": "string",
                      "nullable": true
                    },
                    "registered_capital": {
                      "type": "string",
                      "nullable": true
                    },
                    "registered_capital_amount": {
                      "type": "string",
                      "format": "decimal",
                      "nullable": true,
                      "description": "مبلغ رأس المال المسجل/الأسهم كسلسلة نصية عشرية (مثل `\"100.00\"`)، مُستخرجة من ملف السجل. وتكون `null` عند عدم توفرها."
                    },
                    "registered_capital_currency": {
                      "type": "string",
                      "nullable": true,
                      "description": "رمز العملة حسب معيار ISO 4217 لـ `registered_capital_amount` (مثل `\"GBP\"`). تكون القيمة `null` عندما لا تتوفر."
                    },
                    "website": {
                      "type": "string",
                      "nullable": true
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "nullable": true
                    },
                    "phone": {
                      "type": "string",
                      "nullable": true
                    },
                    "legal_entity_identifier": {
                      "type": "string",
                      "nullable": true
                    },
                    "location_of_registration": {
                      "type": "string",
                      "nullable": true
                    },
                    "vat_number": {
                      "type": "string",
                      "nullable": true,
                      "description": "رقم ضريبة القيمة المضافة في الاتحاد الأوروبي (EU VAT)، عند جمعه أثناء خطوة السجل المستضافة أو تعديله لاحقاً."
                    },
                    "vat_validation_status": {
                      "type": "string",
                      "enum": [
                        "valid",
                        "invalid",
                        "format_valid",
                        "invalid_format",
                        "could_not_validate",
                        "not_applicable"
                      ],
                      "description": "نتيجة التحقق من صحة رقم ضريبة القيمة المضافة أو، عند عدم وجوده، `tax_number`، عند الإرسال إلى السجل. `valid` / `invalid`: يتم تحديدها بواسطة السجل الرسمي للدولة (EU VIES، والنرويج، وسويسرا، والبرازيل، وكولومبيا، وكوستاريكا، والإكوادور، وباراغواي؛ وبولندا أيضاً عبر سجل ضريبة القيمة المضافة المحلي الخاص بها). `format_valid` / `invalid_format`: يتم تحديدها بناءً على قواعد التنسيق وأرقام التحقق الخاصة بالدولة عند تعذر الاستعلام من أي سجل. `could_not_validate`: كان السجل غير متاح. `not_applicable`: لا يوجد رقم، أو دولة بدون سجل أو قواعد، أو جلسة في البيئة التجريبية."
                    },
                    "vat_validated_number": {
                      "type": "string",
                      "nullable": true,
                      "description": "الرقم الذي تم التحقق منه، كما يعرفه المصدر (على سبيل المثال، رقم ضريبة القيمة المضافة المشتق من SIREN الفرنسي أو RSIN الهولندي). يكون `null` عند عدم تشغيل أي فحص."
                    },
                    "vat_validation_source": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "eu_vies",
                        "pl_vat_white_list",
                        "no_brreg",
                        "ch_uid_register",
                        "br_receita_federal",
                        "co_rues",
                        "cr_hacienda",
                        "ec_sri",
                        "py_dnit",
                        "format_rules",
                        null
                      ],
                      "description": "المصدر الذي حدد `vat_validation_status`: إما سجل رسمي، أو `format_rules`. تكون قيمته `null` عند عدم تشغيل أي فحص."
                    },
                    "vat_validated_name": {
                      "type": "string",
                      "nullable": true,
                      "description": "الاسم المسجل لدى المصدر الذي تحقق من صحة الرقم، عند إفصاحه عن اسم. يُعيّن فقط عندما تكون الحالة `valid`."
                    },
                    "vat_validated_address": {
                      "type": "string",
                      "nullable": true,
                      "description": "العنوان المسجل لدى المصدر الذي تحقق من الرقم، عندما يكشف عنه. يتم تعيينه فقط عندما تكون الحالة `valid`."
                    },
                    "vat_checked_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "الطابع الزمني للفحص. يكون `null` في حال عدم تشغيل أي فحص."
                    },
                    "financial_summary": {
                      "type": "object",
                      "nullable": true
                    },
                    "officers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "designation": {
                            "type": "string",
                            "nullable": true
                          },
                          "role": {
                            "type": "string",
                            "nullable": true
                          },
                          "nationality": {
                            "type": "string",
                            "nullable": true
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "kyc_status": {
                            "type": "string",
                            "enum": [
                              "Approved",
                              "Declined",
                              "Pending"
                            ],
                            "nullable": true
                          },
                          "kyc_session_url": {
                            "type": "string",
                            "format": "uri",
                            "nullable": true
                          },
                          "first_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "الاسم الشخصي عندما يذكره سجل الشركات صراحةً؛ لا يُستنتج من الاسم الكامل."
                          },
                          "last_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "اسم العائلة عندما يُبلّغ عنه السجل صراحةً."
                          },
                          "address": {
                            "type": "string",
                            "nullable": true,
                            "description": "عنوان المسؤول الوارد من السجل."
                          },
                          "appointment_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ تعيين المسؤول.",
                            "format": "date"
                          },
                          "termination_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ انتهاء التعيين، عند الإبلاغ عنه.",
                            "format": "date"
                          },
                          "date_of_birth": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ الميلاد الكامل المبلغ عنه في السجل. يكون فارغاً (Null) عندما تكون سنة أو شهر الميلاد فقط معروفان.",
                            "format": "date"
                          },
                          "date_of_birth_year": {
                            "type": "integer",
                            "nullable": true,
                            "minimum": 1,
                            "maximum": 9999,
                            "description": "سنة الميلاد كما وردت في السجل، بما في ذلك الحالات التي لا يتوفر فيها التاريخ بالكامل."
                          },
                          "date_of_birth_month": {
                            "type": "integer",
                            "nullable": true,
                            "minimum": 1,
                            "maximum": 12,
                            "description": "شهر الميلاد كما ورد في السجل. يكون Null عندما تكون السنة فقط هي المعروفة."
                          }
                        }
                      }
                    },
                    "beneficial_owners": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "first_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "last_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "entity_type": {
                            "type": "string",
                            "enum": [
                              "person",
                              "company"
                            ]
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "ownership_min_shares": {
                            "type": "string",
                            "nullable": true,
                            "description": "الحد الأدنى لنسبة الملكية كما أبلغ عنها السجل. سلسلة نصية حرة (مثل `\"25.00\"`، `\"50\"`)؛ استخدم `effective_ownership_percent` للحصول على قيمة رقمية محللة."
                          },
                          "ownership_max_shares": {
                            "type": "string",
                            "nullable": true,
                            "description": "الحد الأعلى لنسبة الملكية كما وردت في سجل الشركات. سلسلة نصية حرة؛ استخدم `effective_ownership_percent` للحصول على قيمة عددية معالجة."
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "kyc_status": {
                            "type": "string",
                            "enum": [
                              "Approved",
                              "Declined",
                              "Pending"
                            ],
                            "nullable": true
                          },
                          "kyc_session_url": {
                            "type": "string",
                            "format": "uri",
                            "nullable": true
                          },
                          "effective_ownership_percent": {
                            "type": "number",
                            "nullable": true
                          },
                          "company_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "registration_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "country_of_birth": {
                            "type": "string",
                            "nullable": true
                          },
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "nationality": {
                            "type": "string",
                            "nullable": true
                          },
                          "designation": {
                            "type": "string",
                            "nullable": true
                          },
                          "voting_min_shares": {
                            "type": "string",
                            "nullable": true
                          },
                          "voting_max_shares": {
                            "type": "string",
                            "nullable": true
                          },
                          "date_of_birth": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ الميلاد الكامل عند الإبلاغ عنه.",
                            "format": "date"
                          },
                          "appointment_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ التعيين عند الإبلاغ عنه.",
                            "format": "date"
                          },
                          "shareholding": {
                            "$ref": "#/components/schemas/KYBRegistryShareholding"
                          }
                        }
                      }
                    },
                    "addresses": {
                      "type": "array",
                      "nullable": true,
                      "description": "كل عنوان ينص عليه السجل، بصيغة معيارية واحدة. يكون Null عندما لا ينص على أي عنوان.",
                      "items": {
                        "$ref": "#/components/schemas/KYBRegistryAddress"
                      }
                    },
                    "industries": {
                      "type": "array",
                      "nullable": true,
                      "description": "الأنشطة التي يصنف السجل الشركة تحتها، بصيغة قياسية موحدة. تكون null عند عدم ذكر أي نشاط.",
                      "items": {
                        "$ref": "#/components/schemas/KYBRegistryIndustry"
                      }
                    },
                    "accounts": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": true,
                      "description": "تواريخ إيداعات السجل، عند توفرها. تستخدم الإقرارات السنوية والاجتماعات العامة last_annual_return_date وlast_agm_date؛ وهي تختلف عن الحسابات المالية."
                    },
                    "registry_data": {
                      "$ref": "#/components/schemas/KYBRegistryData"
                    },
                    "user_provided_data": {
                      "type": "object",
                      "description": "البيانات المؤكدة أو المعدلة من قبل المستخدم النهائي."
                    },
                    "confirmed_by_user_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    },
                    "last_console_edit_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "ownership": {
                      "$ref": "#/components/schemas/KYBRegistryOwnership"
                    },
                    "registry_tier": {
                      "type": "string",
                      "nullable": true,
                      "description": "مستوى سجل الشركات الذي طلبه سير العمل: `basic`، أو `shareholders`، أو `ubo`. موجود أيضاً في `ownership.tier_requested`."
                    },
                    "registry_tier_delivered": {
                      "type": "string",
                      "nullable": true,
                      "description": "المستوى الذي سلّمه السجل ويُفوتر. يوجد أيضاً في `ownership.tier_delivered`."
                    },
                    "registry_ownership_status": {
                      "type": "string",
                      "nullable": true,
                      "description": "`not_requested`، أو `pending`، أو `delivered`، أو `not_held`، أو `unavailable`. وأيضاً في `ownership.status`."
                    },
                    "registry_monitoring": {
                      "type": "object",
                      "nullable": true,
                      "description": "أحدث مراقبة لسجل الشركات للشركة، أو `null` في حال عدم وجود أي منها.",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string"
                        },
                        "unavailable_reason": {
                          "type": "string",
                          "nullable": true
                        },
                        "enrolled_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "cancelled_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "last_bill_date": {
                          "type": "string",
                          "format": "date",
                          "nullable": true
                        },
                        "next_bill_date": {
                          "type": "string",
                          "format": "date",
                          "nullable": true
                        },
                        "last_event_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "events_count": {
                          "type": "integer"
                        },
                        "watched_fields": {
                          "description": "حقول الشركة التي تراقبها أداة المراقبة."
                        }
                      }
                    }
                  }
                },
                "ownership_structure": {
                  "$ref": "#/components/schemas/KYBOwnershipStructure"
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "key_people_checks": {
            "type": "array",
            "nullable": true,
            "description": "فحوصات مجمعة للأشخاص الرئيسيين. تظهر فقط عندما يكون `session_kind = business`. يستخدم كل عنصر بنية من قسمين (`registry`، `submitted`، `ubo_kyc_summary`).",
            "items": {
              "type": "object",
              "description": "فحص مجمع لمسؤولي الشركة + المستفيدين الحقيقيين (UBOs). يستخدم بنية `registry` / `submitted`. لا يظهر إلا عندما يكون session_kind = business.",
              "properties": {
                "status": {
                  "type": "string"
                },
                "node_id": {
                  "type": "string",
                  "nullable": true
                },
                "registry": {
                  "type": "object",
                  "description": "الأطراف المكتشفة عبر فحص سجل الشركات.",
                  "properties": {
                    "officers": {
                      "type": "array",
                      "description": "المسؤولون الذين تم اكتشافهم عبر فحص السجل، مع إثراء كل منهم بحالة أي جلسة KYC تابعة وفحص AML تم إنشاؤهما لهم.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "description": "الاسم الكامل للمسؤول كما هو مسجل في السجل."
                          },
                          "designation": {
                            "type": "string",
                            "nullable": true,
                            "description": "المسمى بنص حر من السجل (مثل `Director` أو `Company Secretary`)."
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "director",
                              "non_executive_director",
                              "secretary",
                              "chairman",
                              "ubo",
                              "shareholder",
                              "representative",
                              "founder",
                              "legal_advisor",
                              "authorized_signatory",
                              "trustee",
                              "beneficiary",
                              "settlor",
                              "protector",
                              "company_officer",
                              "investor",
                              "other"
                            ],
                            "description": "الدور المعياري للمسؤول."
                          },
                          "nationality": {
                            "type": "string",
                            "nullable": true
                          },
                          "appointment_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ تعيين المسؤول.",
                            "format": "date"
                          },
                          "termination_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ انتهاء التعيين، عند الإبلاغ عنه.",
                            "format": "date"
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "address": {
                            "type": "string",
                            "nullable": true,
                            "description": "عنوان المسؤول الوارد من السجل."
                          },
                          "aml_status": {
                            "type": "string",
                            "enum": [
                              "Not Finished",
                              "Approved",
                              "Declined",
                              "In Review",
                              "Resub Requested"
                            ],
                            "nullable": true,
                            "description": "حالة فحص AML الذي تم إجراؤه لهذا المسؤول. تكون `null` في حال لم يتم إجراء أي فحص AML."
                          },
                          "kyc_status": {
                            "type": "string",
                            "enum": [
                              "Not Started",
                              "In Progress",
                              "Approved",
                              "Declined",
                              "In Review",
                              "Expired",
                              "Abandoned",
                              "Kyc Expired",
                              "Resubmitted",
                              "Awaiting User"
                            ],
                            "nullable": true,
                            "description": "حالة دورة الحياة الخام لجلسة KYC التابعة التي تم إنشاؤها لهذا المسؤول. هذا هو تعداد حالة الجلسة الكامل (وليس مجموعة مختصرة من مقبولة/مرفوضة/قيد الانتظار). تكون القيمة `null` في حال عدم وجود جلسة KYC تابعة."
                          },
                          "kyc_session_url": {
                            "type": "string",
                            "format": "uri",
                            "nullable": true,
                            "description": "رابط URL قابل للمشاركة لجلسة KYC الفرعية. يكون `null` عندما لا توجد جلسة فرعية."
                          },
                          "kyc_session_id": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "معرّف الجلسة لجلسة KYC الفرعية. مرّره إلى endpoint القرار نفسها لجلب تقرير KYC الكامل للشخص. يكون `null` في حال عدم وجود جلسة فرعية."
                          },
                          "verification_workflow_type": {
                            "type": "string",
                            "nullable": true,
                            "description": "نوع سير العمل الأساسي لسير عمل الجلسة الفرعية (مثل `kyc`). تكون القيمة `null` لمهام سير العمل المستندة إلى المخطط أو في حال عدم وجود جلسة فرعية."
                          },
                          "verification_workflow_id": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "معرّف سير العمل المستخدم بواسطة الجلسة الفرعية. يكون `null` عند عدم وجود جلسة فرعية."
                          },
                          "verification_workflow_label": {
                            "type": "string",
                            "nullable": true,
                            "description": "تسمية سهلة القراءة لسير عمل الجلسة الفرعية. تكون `null` إذا لم تكن محددة."
                          },
                          "verification_workflow_features": {
                            "type": "array",
                            "nullable": true,
                            "description": "التقدم لكل ميزة في جلسة التحقق الفرعية، مثل `[{\"feature\": \"ID_VERIFICATION\", \"status\": \"Approved\"}]`. تكون القيمة `null` عندما لا تحتوي الجلسة الفرعية على قائمة ميزات قابلة للحل.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "feature": {
                                  "type": "string",
                                  "description": "الاسم المعروض للميزة (مثل `ID_VERIFICATION`، أو `LIVENESS`، أو `AML`)."
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "Not Finished",
                                    "Approved",
                                    "Declined",
                                    "In Review",
                                    "Resub Requested"
                                  ],
                                  "description": "حالة مستوى الميزة داخل الجلسة الفرعية."
                                }
                              }
                            }
                          },
                          "didit_internal_id": {
                            "type": "string",
                            "nullable": true,
                            "description": "معرّف داخلي ثابت للفرد المتحقق منه خلف الجلسة الفرعية — مفيد للربط عبر الجلسات. تكون القيمة `null` عند عدم وجود جلسة فرعية أو إذا لم يتم تحديد المستخدم بعد."
                          },
                          "kyc_document_type": {
                            "type": "string",
                            "nullable": true,
                            "description": "نوع المستند المقدّم في جلسة KYC الفرعية (مثل `P` أو `ID` أو `DL`). يكون `null` حتى تتوفر نتيجة التحقق من الهوية للجلسة الفرعية."
                          },
                          "kyc_nationality": {
                            "type": "string",
                            "nullable": true,
                            "description": "الجنسية المستخرجة من المستند في جلسة KYC الفرعية. تكون `null` حتى تصبح متاحة."
                          },
                          "kyc_liveness_passed": {
                            "type": "boolean",
                            "nullable": true,
                            "description": "ما إذا كان فحص الحيوية لجلسة KYC الفرعية قد اجتاز بنجاح. وتكون `null` في حال لم يتم تشغيل أي فحص حيوية."
                          },
                          "kyc_verified_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "وقت وصول جلسة KYC التابعة إلى حالة `Approved`. تكون القيمة `null` طالما أن الجلسة التابعة في أي حالة أخرى."
                          },
                          "kyc_aml_categories": {
                            "type": "object",
                            "nullable": true,
                            "description": "ملخص لكل فئة مشتق من تطابقات AML للشخص. `null` في حال عدم وجود تطابقات.",
                            "properties": {
                              "sanctions": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "clear"
                                ]
                              },
                              "pep": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "clear"
                                ]
                              },
                              "adverse_media": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "clear"
                                ]
                              },
                              "warnings": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "clear"
                                ]
                              }
                            }
                          },
                          "kyc_notification_sent_at": {
                            "type": "string",
                            "nullable": true,
                            "description": "طابع زمني بتنسيق ISO 8601 لآخر إشعار دعوة تحقق تم إرساله للجلسة الفرعية لهذا الشخص. تكون القيمة `null` عند عدم إرسال أي إشعار."
                          },
                          "first_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "الاسم الشخصي عندما يذكره سجل الشركات صراحةً؛ لا يُستنتج من الاسم الكامل."
                          },
                          "last_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "اسم العائلة عندما يُبلّغ عنه السجل صراحةً."
                          },
                          "date_of_birth": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ الميلاد الكامل المبلغ عنه في السجل. يكون فارغاً (Null) عندما تكون سنة أو شهر الميلاد فقط معروفان.",
                            "format": "date"
                          },
                          "date_of_birth_year": {
                            "type": "integer",
                            "nullable": true,
                            "minimum": 1,
                            "maximum": 9999,
                            "description": "سنة الميلاد كما وردت في السجل، بما في ذلك الحالات التي لا يتوفر فيها التاريخ بالكامل."
                          },
                          "date_of_birth_month": {
                            "type": "integer",
                            "nullable": true,
                            "minimum": 1,
                            "maximum": 12,
                            "description": "شهر الميلاد كما ورد في السجل. يكون Null عندما تكون السنة فقط هي المعروفة."
                          }
                        }
                      }
                    },
                    "beneficial_owners": {
                      "type": "array",
                      "description": "المستفيدون الحقيقيون الذين تم اكتشافهم عبر فحص سجل الشركات، مع تزويد كل منهم بحالة أي جلسة KYC فرعية وفحص AML تم إنشاؤهما لهم.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "description": "الاسم الكامل للمستفيد الحقيقي (أو اسم الشركة بالنسبة لكيانات UBO الاعتبارية)."
                          },
                          "first_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "last_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "date_of_birth": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ الميلاد الكامل عند الإبلاغ عنه.",
                            "format": "date"
                          },
                          "country_of_birth": {
                            "type": "string",
                            "nullable": true
                          },
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "company_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "registration_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "entity_type": {
                            "type": "string",
                            "enum": [
                              "person",
                              "company"
                            ]
                          },
                          "nationality": {
                            "type": "string",
                            "nullable": true
                          },
                          "designation": {
                            "type": "string",
                            "nullable": true
                          },
                          "roles": {
                            "type": "array",
                            "description": "أسماء الأدوار التي يشغلها هذا المالك، على سبيل المثال `[\"ubo\", \"shareholder\"]`.",
                            "items": {
                              "type": "string"
                            }
                          },
                          "ownership_min_shares": {
                            "type": "string",
                            "nullable": true,
                            "description": "الحد الأدنى لنسبة الملكية كما أبلغ عنها السجل. سلسلة نصية حرة (مثل `\"25\"`، `\"25-50%\"`)؛ استخدم `effective_ownership_percent` للحصول على قيمة رقمية محللة."
                          },
                          "ownership_max_shares": {
                            "type": "string",
                            "nullable": true,
                            "description": "الحد الأعلى لنسبة الملكية كما وردت في سجل الشركات. سلسلة نصية حرة؛ استخدم `effective_ownership_percent` للحصول على قيمة عددية معالجة."
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "aml_status": {
                            "type": "string",
                            "enum": [
                              "Not Finished",
                              "Approved",
                              "Declined",
                              "In Review",
                              "Resub Requested"
                            ],
                            "nullable": true,
                            "description": "حالة فحص AML الذي تم إجراؤه لهذا المستفيد الحقيقي. تكون `null` في حال لم يتم إجراء أي فحص AML."
                          },
                          "kyc_status": {
                            "type": "string",
                            "enum": [
                              "Not Started",
                              "In Progress",
                              "Approved",
                              "Declined",
                              "In Review",
                              "Expired",
                              "Abandoned",
                              "Kyc Expired",
                              "Resubmitted",
                              "Awaiting User"
                            ],
                            "nullable": true,
                            "description": "حالة دورة الحياة الخام لجلسة KYC التابعة التي تم إنشاؤها لهذا المستفيد الحقيقي. هذا هو تعداد حالة الجلسة الكامل (وليس مجموعة مختصرة من مقبولة/مرفوضة/قيد الانتظار). تكون القيمة `null` في حال عدم وجود جلسة KYC تابعة."
                          },
                          "kyc_session_url": {
                            "type": "string",
                            "format": "uri",
                            "nullable": true,
                            "description": "رابط URL قابل للمشاركة لجلسة KYC الفرعية. يكون `null` عندما لا توجد جلسة فرعية."
                          },
                          "kyc_session_id": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "معرّف الجلسة لجلسة KYC الفرعية. مرّره إلى endpoint القرار نفسها لجلب تقرير KYC الكامل للشخص. يكون `null` في حال عدم وجود جلسة فرعية."
                          },
                          "verification_workflow_type": {
                            "type": "string",
                            "nullable": true,
                            "description": "نوع سير العمل الأساسي لسير عمل الجلسة الفرعية (مثل `kyc`). تكون القيمة `null` لمهام سير العمل المستندة إلى المخطط أو في حال عدم وجود جلسة فرعية."
                          },
                          "verification_workflow_id": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "معرّف سير العمل المستخدم بواسطة الجلسة الفرعية. يكون `null` عند عدم وجود جلسة فرعية."
                          },
                          "verification_workflow_label": {
                            "type": "string",
                            "nullable": true,
                            "description": "تسمية سهلة القراءة لسير عمل الجلسة الفرعية. تكون `null` إذا لم تكن محددة."
                          },
                          "verification_workflow_features": {
                            "type": "array",
                            "nullable": true,
                            "description": "التقدم لكل ميزة في جلسة التحقق الفرعية، مثل `[{\"feature\": \"ID_VERIFICATION\", \"status\": \"Approved\"}]`. تكون القيمة `null` عندما لا تحتوي الجلسة الفرعية على قائمة ميزات قابلة للحل.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "feature": {
                                  "type": "string",
                                  "description": "الاسم المعروض للميزة (مثل `ID_VERIFICATION`، أو `LIVENESS`، أو `AML`)."
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "Not Finished",
                                    "Approved",
                                    "Declined",
                                    "In Review",
                                    "Resub Requested"
                                  ],
                                  "description": "حالة مستوى الميزة داخل الجلسة الفرعية."
                                }
                              }
                            }
                          },
                          "didit_internal_id": {
                            "type": "string",
                            "nullable": true,
                            "description": "معرّف داخلي ثابت للفرد المتحقق منه خلف الجلسة الفرعية — مفيد للربط عبر الجلسات. تكون القيمة `null` عند عدم وجود جلسة فرعية أو إذا لم يتم تحديد المستخدم بعد."
                          },
                          "kyc_document_type": {
                            "type": "string",
                            "nullable": true,
                            "description": "نوع المستند المقدّم في جلسة KYC الفرعية (مثل `P` أو `ID` أو `DL`). يكون `null` حتى تتوفر نتيجة التحقق من الهوية للجلسة الفرعية."
                          },
                          "kyc_nationality": {
                            "type": "string",
                            "nullable": true,
                            "description": "الجنسية المستخرجة من المستند في جلسة KYC الفرعية. تكون `null` حتى تصبح متاحة."
                          },
                          "kyc_liveness_passed": {
                            "type": "boolean",
                            "nullable": true,
                            "description": "ما إذا كان فحص الحيوية لجلسة KYC الفرعية قد اجتاز بنجاح. وتكون `null` في حال لم يتم تشغيل أي فحص حيوية."
                          },
                          "kyc_verified_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "وقت وصول جلسة KYC التابعة إلى حالة `Approved`. تكون القيمة `null` طالما أن الجلسة التابعة في أي حالة أخرى."
                          },
                          "kyc_aml_categories": {
                            "type": "object",
                            "nullable": true,
                            "description": "ملخص لكل فئة مشتق من تطابقات AML للشخص. `null` في حال عدم وجود تطابقات.",
                            "properties": {
                              "sanctions": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "clear"
                                ]
                              },
                              "pep": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "clear"
                                ]
                              },
                              "adverse_media": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "clear"
                                ]
                              },
                              "warnings": {
                                "type": "string",
                                "enum": [
                                  "match",
                                  "clear"
                                ]
                              }
                            }
                          },
                          "kyc_notification_sent_at": {
                            "type": "string",
                            "nullable": true,
                            "description": "طابع زمني بتنسيق ISO 8601 لآخر إشعار دعوة تحقق تم إرساله للجلسة الفرعية لهذا الشخص. تكون القيمة `null` عند عدم إرسال أي إشعار."
                          },
                          "child_beneficial_owners": {
                            "type": "array",
                            "description": "بالنسبة للـ UBOs للشركات: المستفيدون الحقيقيون الخاصون بالكيان المالك، ككائنات خام مستخرجة من السجل. مصفوفة فارغة عندما لا ينطبق ذلك.",
                            "items": {
                              "type": "object"
                            }
                          },
                          "effective_ownership_percent": {
                            "type": "number",
                            "nullable": true,
                            "description": "نسبة الملكية الرقمية المحللة — الحد الأقصى عند توفره، وإلا فالحد الأدنى. القيمة `null` عندما يتعذر تحليل كلا الحدين."
                          },
                          "voting_min_shares": {
                            "type": "string",
                            "nullable": true
                          },
                          "voting_max_shares": {
                            "type": "string",
                            "nullable": true
                          },
                          "appointment_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ التعيين عند الإبلاغ عنه.",
                            "format": "date"
                          }
                        }
                      }
                    }
                  }
                },
                "submitted": {
                  "type": "object",
                  "description": "الأطراف المُرسلة من قِبل مسؤول الشركة أثناء سير عمل الأشخاص الرئيسيين (صفوف BusinessParty حيث source=USER).",
                  "properties": {
                    "parties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "طرف مُرسل من قِبل مسؤول الشركة عبر سير عمل الأشخاص الرئيسيين (source=USER).",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_type": {
                            "type": "string",
                            "enum": [
                              "person",
                              "company"
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "USER"
                            ],
                            "description": "دائماً `USER` هنا — لا تحتوي هذه الفئة إلا على الأطراف التي أدخلها أو أكّدها المستخدم النهائي في مسار الأشخاص الرئيسيون (يظهر الأشخاص المكتشفون عبر السجل ضمن `registry`)."
                          },
                          "name": {
                            "type": "string"
                          },
                          "first_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "last_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "company_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "registration_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "email": {
                            "type": "string",
                            "format": "email",
                            "nullable": true
                          },
                          "nationality": {
                            "type": "string",
                            "nullable": true,
                            "description": "الجنسية للأفراد؛ ودولة التأسيس لأطراف الشركات."
                          },
                          "phone_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "date_of_birth": {
                            "type": "string",
                            "format": "date",
                            "nullable": true
                          },
                          "position": {
                            "type": "string",
                            "nullable": true,
                            "description": "المسمى الوظيفي / المنصب بنص حر (للأشخاص فقط)."
                          },
                          "custom_fields": {
                            "type": "object",
                            "description": "حقول مخصصة محددة في سير العمل تم جمعها لهذا الطرف؛ يتم تحديد المفاتيح بواسطة الواصفات المحددة لحقول الأشخاص الرئيسيين في سير العمل."
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "is_skipped": {
                            "type": "boolean",
                            "description": "تكون القيمة True عندما يتخطى المستخدم النهائي عملية التحقق لهذا الطرف (ممكن فقط عندما يسمح الدور بالتخطي)."
                          },
                          "requires_verification": {
                            "type": "boolean",
                            "description": "تكون القيمة True عندما تكون هناك حاجة إلى جلسة فرعية تابعة لـ KYC / KYB لهذا الطرف بناءً على إعدادات الدور وحدود الملكية."
                          },
                          "roles": {
                            "type": "array",
                            "description": "جميع الأدوار التي يشغلها هذا الطرف، ولكل منها نسب الملكية والتصويت الخاصة به. لا يوجد `role` أو `ownership_percent` مفرد على الطرف نفسه.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "director",
                                    "non_executive_director",
                                    "secretary",
                                    "chairman",
                                    "ubo",
                                    "shareholder",
                                    "representative",
                                    "founder",
                                    "legal_advisor",
                                    "authorized_signatory",
                                    "trustee",
                                    "beneficiary",
                                    "settlor",
                                    "protector",
                                    "company_officer",
                                    "investor",
                                    "other"
                                  ]
                                },
                                "ownership_percent": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "voting_percent": {
                                  "type": "number",
                                  "nullable": true
                                }
                              }
                            }
                          },
                          "kyc_session_id": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "معرّف جلسة KYC الفرعية لأطراف الأفراد التي تتطلب التحقق. `null` بخلاف ذلك."
                          },
                          "kyc_session_status": {
                            "type": "string",
                            "enum": [
                              "Not Started",
                              "In Progress",
                              "Approved",
                              "Declined",
                              "In Review",
                              "Expired",
                              "Abandoned",
                              "Kyc Expired",
                              "Resubmitted",
                              "Awaiting User"
                            ],
                            "nullable": true,
                            "description": "حالة دورة حياة جلسة KYC الفرعية التابعة. تكون `null` في حال عدم وجود جلسة KYC فرعية."
                          },
                          "kyc_session_url": {
                            "type": "string",
                            "format": "uri",
                            "nullable": true
                          },
                          "kyb_sub_session_id": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "معرّف الجلسة الفرعية لـ KYB التابعة لأطراف الشركات التي تتطلب التحقق. `null` بخلاف ذلك."
                          },
                          "kyb_sub_session_status": {
                            "type": "string",
                            "enum": [
                              "Not Started",
                              "In Progress",
                              "Approved",
                              "Declined",
                              "In Review",
                              "Expired",
                              "Abandoned",
                              "Kyc Expired",
                              "Resubmitted",
                              "Awaiting User"
                            ],
                            "nullable": true,
                            "description": "حالة دورة حياة جلسة KYB الفرعية التابعة. تكون `null` في حال عدم وجود جلسة فرعية."
                          },
                          "kyb_sub_session_url": {
                            "type": "string",
                            "format": "uri",
                            "nullable": true,
                            "description": "رابط URL قابل للمشاركة للجلسة الفرعية التابعة لـ KYB. يكون `null` عندما لا توجد جلسة فرعية."
                          },
                          "verification_workflow_type": {
                            "type": "string",
                            "nullable": true,
                            "description": "نوع سير العمل الأساسي لسير عمل الجلسة الفرعية (تُفضل جلسة KYC، مع الرجوع إلى جلسة KYB الفرعية). تكون القيمة `null` لمهام سير العمل المستندة إلى المخطط أو عند عدم وجود جلسة فرعية."
                          },
                          "verification_workflow_id": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "معرّف سير العمل المستخدم بواسطة الجلسة الفرعية. يكون `null` عند عدم وجود جلسة فرعية."
                          },
                          "verification_workflow_label": {
                            "type": "string",
                            "nullable": true,
                            "description": "تسمية سهلة القراءة لسير عمل الجلسة الفرعية. تكون `null` إذا لم تكن محددة."
                          },
                          "verification_workflow_features": {
                            "type": "array",
                            "nullable": true,
                            "description": "التقدم لكل ميزة في جلسة التحقق الفرعية، مثل `[{\"feature\": \"ID_VERIFICATION\", \"status\": \"Approved\"}]`. تكون القيمة `null` عندما لا تحتوي الجلسة الفرعية على قائمة ميزات قابلة للحل.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "feature": {
                                  "type": "string",
                                  "description": "الاسم المعروض للميزة (مثل `ID_VERIFICATION`، أو `LIVENESS`، أو `AML`)."
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "Not Finished",
                                    "Approved",
                                    "Declined",
                                    "In Review",
                                    "Resub Requested"
                                  ],
                                  "description": "حالة مستوى الميزة داخل الجلسة الفرعية."
                                }
                              }
                            }
                          },
                          "didit_internal_id": {
                            "type": "string",
                            "nullable": true,
                            "description": "معرّف داخلي ثابت للفرد المتحقق منه خلف الجلسة الفرعية. تكون القيمة `null` عندما لا يتم تحديده."
                          }
                        }
                      }
                    }
                  }
                },
                "ubo_kyc_summary": {
                  "type": "object",
                  "nullable": true,
                  "description": "تقدم KYC المجمع للمستفيدين الحقيقيين (UBOs)، أو null عندما لا يمتلك أي مستفيد حقيقي جلسات KYC مرتبطة.",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "approved": {
                      "type": "integer"
                    },
                    "flagged": {
                      "type": "integer",
                      "description": "المستفيدون الحقيقيون (UBOs) الذين جاءت نتيجة KYC الخاصة بهم مرفوضة أو قيد المراجعة."
                    },
                    "pending": {
                      "type": "integer"
                    }
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "document_verifications": {
            "type": "array",
            "nullable": true,
            "description": "عمليات التحقق من المستندات مجمّعة حسب عقدة سير العمل. تظهر فقط عندما يكون `session_kind = business`.",
            "items": {
              "type": "object",
              "description": "المستندات مجمّعة حسب عقدة سير العمل. تظهر فقط عندما يكون session_kind = business.",
              "properties": {
                "status": {
                  "type": "string"
                },
                "node_id": {
                  "type": "string",
                  "nullable": true
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "uuid": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "document_type": {
                        "type": "string",
                        "enum": [
                          "LEGAL_PRESENCE",
                          "COMPANY_DETAILS",
                          "OWNERSHIP_STRUCTURE",
                          "REPRESENTATIVES_AUTHORIZATION",
                          "OTHER"
                        ],
                        "nullable": true,
                        "description": "مجموعة مستندات KYB عالية المستوى التي تم تصنيف الملف ضمنها. `null` طالما لم يتم تصنيفه."
                      },
                      "document_subtype": {
                        "type": "string",
                        "nullable": true,
                        "description": "النوع الفرعي المحدد المكتشف بواسطة OCR (مثل `CERTIFICATE_OF_INCORPORATION` أو `SHAREHOLDER_REGISTRY`)؛ وتكون `UNKNOWN` عندما يتعذر على OCR تصنيف المستند بثقة."
                      },
                      "document_group": {
                        "type": "string",
                        "enum": [
                          "LEGAL_PRESENCE",
                          "COMPANY_DETAILS",
                          "OWNERSHIP_STRUCTURE",
                          "REPRESENTATIVES_AUTHORIZATION",
                          "OTHER"
                        ],
                        "nullable": true,
                        "description": "اسم بديل لـ `document_type` — اسم المجموعة المستخدم بواسطة `groups` و`required_groups`."
                      },
                      "file_url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "رابط موقع مسبقاً قصير الأجل للملف المرفوع. يكون `null` للعناصر النائبة لطلبات المستندات التي أنشأها المحلل (`is_requested = true`) والتي لم يتم استيفاؤها بعد."
                      },
                      "original_filename": {
                        "type": "string",
                        "nullable": true,
                        "description": "اسم الملف كما رفعه المستخدم أو المحلل."
                      },
                      "file_size": {
                        "type": "integer",
                        "nullable": true,
                        "description": "حجم الملف بالبايت."
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "Not Finished",
                          "Approved",
                          "Declined",
                          "In Review",
                          "Resub Requested"
                        ],
                        "description": "حالة التحقق لكل مستند."
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "cross_check_result": {
                        "type": "object",
                        "nullable": true,
                        "description": "المطابقة المرجعية لحقول المستند المستخرجة عبر OCR مع الملف التعريفي للشركة في السجل. كائن يحتوي على أقسام `critical` و`non_critical` و`people`، حيث يربط كل منها اسم حقل (مثل `company_name` و`registration_number` و`incorporation_date` و`registered_address`) بسجل مقارنة مثل `{\"document\": \"...\", \"registry\": \"...\", \"match\": true, \"score\": 0.97}`. وتكون القيمة `null` عندما لا يحتوي المستند على بيانات OCR أو لم تكن هناك شركة في السجل للمقارنة معها."
                      },
                      "document_metadata": {
                        "type": "object",
                        "nullable": true,
                        "description": "البيانات الوصفية المستخرجة من مستند الشركة المرفوع. عند نجاح استخراج البيانات الوصفية، تكون جميع المفاتيح الـ 16 موجودة دائمًا (تكون القيم الفردية `null` عندما لا تنطبق على نوع الملف)؛ ويكون الكائن بالكامل `null` عندما يتعذر استخراج أي شيء. بالنسبة لملفات PDF، يحمل `overlay_manipulation` تحليلًا جنائيًا للنص المتراكب.",
                        "properties": {
                          "file_size": {
                            "type": "integer",
                            "nullable": true,
                            "description": "حجم المستند."
                          },
                          "content_type": {
                            "type": "string",
                            "nullable": true,
                            "description": "نوع محتوى المستند."
                          },
                          "creation_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ إنشاء المستند."
                          },
                          "modified_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ تعديل المستند."
                          },
                          "creator": {
                            "type": "string",
                            "nullable": true,
                            "description": "أداة التأليف/المستخدم المسجل في البيانات الوصفية للملف (`Creator` في ملف PDF)."
                          },
                          "producer": {
                            "type": "string",
                            "nullable": true,
                            "description": "البرنامج الذي أنتج الملف (`Producer` الخاص بـ PDF)."
                          },
                          "software": {
                            "type": "string",
                            "nullable": true,
                            "description": "برنامج التحرير المسجل في البيانات الوصفية للملف."
                          },
                          "encryption": {
                            "type": "string",
                            "nullable": true,
                            "description": "مخطط تشفير الملف، عندما يكون مشفراً."
                          },
                          "is_signed": {
                            "type": "boolean",
                            "nullable": true,
                            "description": "ما إذا كان المستند يحمل توقيعاً رقمياً."
                          },
                          "is_tampered": {
                            "type": "boolean",
                            "nullable": true,
                            "description": "ما إذا كان التوقيع الرقمي قد فشل في التحقق من صحته (تعديل بعد التوقيع)."
                          },
                          "signature_info": {
                            "type": "object",
                            "nullable": true,
                            "description": "تفاصيل التوقيع/التوقيعات الرقمية، إن وُجدت."
                          },
                          "exif_original_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ الالتقاط الأصلي في EXIF، لعمليات تحميل الصور."
                          },
                          "exif_digitized_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "تاريخ الرقمنة في EXIF، لعمليات تحميل الصور."
                          },
                          "processed_by_known_editor": {
                            "type": "boolean",
                            "nullable": true,
                            "description": "ما إذا كانت البيانات الوصفية تشير إلى أن الملف قد مر عبر محرر صور/PDF معروف."
                          },
                          "has_different_creation_mod_date": {
                            "type": "boolean",
                            "nullable": true,
                            "description": "ما إذا كانت تواريخ الإنشاء والتعديل تختلف — وهي إشارة تعديل محتملة (لكنها ليست حاسمة)."
                          },
                          "overlay_manipulation": {
                            "type": "object",
                            "nullable": true,
                            "description": "التحليل الجنائي لملفات PDF للتلاعب المشتبه به في النص المتراكب. القيمة Null عند عدم العثور على أي دليل تلاعب بالنص المتراكب أو إذا لم يكن المستند بصيغة PDF.",
                            "properties": {
                              "detected": {
                                "type": "boolean",
                                "description": "ما إذا تم اكتشاف دليل على التلاعب بالنص المتراكب."
                              },
                              "analyzed": {
                                "type": "boolean",
                                "description": "ما إذا كان قد أمكن تحليل ملف PDF."
                              },
                              "analysis_incomplete": {
                                "type": "boolean",
                                "description": "يكون الحقل موجودًا وقيمته صحيحة فقط عندما يتعذر فحص الملف بالكامل. يحتفظ الجزء الذي تم فحصه بنتائجه حيثما أمكن، ويُظهر المستند تحذير استبدال النص غير المُثبت."
                              },
                              "signals": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "إشارات الفحص الجنائي التي تم إطلاقها، مثل duplicate_font_subset أو glyph_fragmentation."
                              },
                              "manipulated_regions": {
                                "type": "array",
                                "description": "المناطق المشتبه في التلاعب بها بإحداثيات صفحة PDF.",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "page": {
                                      "type": "integer"
                                    },
                                    "x": {
                                      "type": "number"
                                    },
                                    "y": {
                                      "type": "number"
                                    },
                                    "width": {
                                      "type": "number"
                                    },
                                    "height": {
                                      "type": "number"
                                    },
                                    "page_width": {
                                      "type": "number"
                                    },
                                    "page_height": {
                                      "type": "number"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "description": {
                        "type": "string",
                        "nullable": true,
                        "description": "تصنيف أو سبب مقدّم من المحلل لطلب المستند. `null` لعمليات الرفع العادية."
                      },
                      "is_requested": {
                        "type": "boolean",
                        "description": "تكون القيمة True لعناصر نائبة لطلبات المستندات التي أنشأها المحلل وتنتظر الرفع."
                      },
                      "ocr_data": {
                        "type": "object",
                        "nullable": true
                      },
                      "is_console_upload": {
                        "type": "boolean",
                        "description": "تكون القيمة True للمستندات المرفوعة من لوحة التحكم بدلاً من مسار المستخدم النهائي. لا تؤدي عمليات الرفع من لوحة التحكم أبداً إلى تغيير الحالة التراكمية على مستوى الميزة."
                      },
                      "is_confirmed": {
                        "type": "boolean",
                        "description": "تبدأ عمليات الرفع في Console بالقيمة `false` وتتحول إلى `true` بمجرد تأكيدها من قبل المسؤول؛ وتكون عمليات الرفع من المستخدم النهائي دائماً `true`."
                      }
                    }
                  }
                },
                "groups": {
                  "type": "object",
                  "description": "عدادات التقدم لكل مجموعة مفهرسة باسم المجموعة (مثل legal_presence، ownership_structure).",
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "total": {
                        "type": "integer"
                      },
                      "approved": {
                        "type": "integer"
                      },
                      "pending": {
                        "type": "integer"
                      },
                      "declined": {
                        "type": "integer"
                      },
                      "in_review": {
                        "type": "integer"
                      },
                      "other": {
                        "type": "integer"
                      },
                      "missing": {
                        "type": "integer",
                        "description": "العناصر النائبة المطلوبة التي لم يتم تحميل أي ملف لها بعد."
                      }
                    }
                  }
                },
                "required_groups": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "environment": {
            "type": "string",
            "enum": [
              "live",
              "sandbox"
            ],
            "description": "ما إذا كانت الجلسة قد أُنشئت بواسطة تطبيق إنتاج (`live`) أو تطبيق في البيئة التجريبية (`sandbox`). جلسات البيئة التجريبية مجانية ومحاكاة بالكامل ولا تخصم أرصدة أبداً."
          },
          "sandbox_scenario": {
            "type": "string",
            "nullable": true,
            "description": "سيناريو البيئة التجريبية الذي تم إنشاء الجلسة باستخدامه. `null` للجلسات المباشرة ولجلسات البيئة التجريبية التي تم إنشاؤها بدونه."
          },
          "resubmissions": {
            "type": "array",
            "description": "يتم إرجاعها فقط مع `include=resubmissions`، لجلسات المستخدمين والشركات. مدخل واحد لكل طلب إعادة تقديم، من الأقدم إلى الأحدث. يحمل كل مدخل النتائج التي أرجعتها الخطوات المعاد تقديمها قبل الطلب، بحيث تظل عمليات الإرسال السابقة قابلة للقراءة. يؤدي حذف الجلسة إلى حذف كل عملية إرسال.",
            "items": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "integer",
                  "description": "1 لأول إعادة إرسال للجلسة، و2 للثانية، وهكذا."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "متى طُلبت إعادة التقديم."
                },
                "previous_status": {
                  "type": "string",
                  "description": "حالة الجلسة مباشرة قبل الطلب."
                },
                "nodes": {
                  "type": "array",
                  "description": "خطوات سير العمل المُعادة إلى المستخدم.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "node_id": {
                        "type": "string"
                      },
                      "feature": {
                        "type": "string"
                      }
                    }
                  }
                },
                "reasons": {
                  "type": "object",
                  "nullable": true,
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "السبب المقدم لكل خطوة، مفهرساً بواسطة `node_id`."
                },
                "requested_by": {
                  "type": "object",
                  "nullable": true,
                  "description": "من طلب إعادة التقديم.",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                },
                "results": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "ما أرجعته الخطوات المُعاد إرسالها قبل الطلب، تحت نفس المفاتيح وبنفس هيئة النتائج الحالية لهذه الاستجابة (`id_verifications`، و`nfc_verifications`، و`liveness_checks`، و`face_matches`، و`poa_verifications`، و`phone_verifications`، و`email_verifications`، و`aml_screenings`، و`ip_analyses`، و`database_validations`، و`questionnaire_responses`، و`document_ai_documents`، و`geolocation_checks`؛ ولجلسات الشركات أيضاً `document_verifications`). تظهر فقط مفاتيح الخطوات التي تم إرسالها مجدداً."
                }
              }
            }
          },
          "biometric_consent": {
            "type": "object",
            "nullable": true,
            "description": "ما إذا كانت الجلسة تتطلب موافقة بيومترية صريحة قبل التقاط الوجه، والسبب، والدليل على الإجابة. جلسات التحقق من المستخدمين (KYC) فقط؛ يتوفر الكائن نفسه في `decision` لـ webhook الخاصة بالجلسة. يكون `null` عندما لا تخضع الجلسة للتقييم على الإطلاق، على سبيل المثال في سير عمل بدون التقاط للوجه. الحقول التي ليس لها قيمة مسجلة تكون `null`. لا يمكن لـ SDK أصيل بإصدار أقدم من 4.10.0، أو الذي لا يُبلّغ عن إصداره، إظهار خطوة الموافقة: وتعمل عمليات التقاط الوجه كما كانت من قبل، وتبلغ الجلسة التي تطلبت الموافقة حينها عن `status: \"pending\"` مع `reason: \"BIOMETRIC_CONSENT_UNSUPPORTED_SDK\"`. راجع [الموافقة البيومترية](/ar/getting-started/biometric-consent).",
            "properties": {
              "required": {
                "type": "boolean",
                "description": "Whether the session must collect explicit biometric consent. Never goes back to `false`."
              },
              "trigger": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "declared_state",
                  "ip_state",
                  "ip_unknown",
                  "document_issuer",
                  "forced",
                  "customer_collected"
                ],
                "description": "سبب طلب الموافقة، أو كيف تم استيفاؤها. `declared_state`: صرّحت بولاية مشمولة (`user_state`، أو عنوان أمريكي في `expected_details`). `ip_state`: عنوان IP الخاص بالشخص يقع في ولاية مشمولة (إلينوي، تكساس، كولورادو). `ip_unknown`: تشير الأدلة إلى وجود الشخص في الولايات المتحدة ولكن يتعذر تحديد الولاية (عنوان IP في الولايات المتحدة دون تحديد الولاية، أو يتعذر تحديد موقعه بينما تشير تفاصيلك أو المستند إلى وجود الشخص في الولايات المتحدة). `document_issuer`: تم إصدار مستند الهوية من قِبل ولاية مشمولة. `forced`: وضع التطبيق هو Always. `customer_collected`: أرسلت `biometric_consent` عند إنشاء الجلسة. تكون `null` عندما لا تكون مطلوبة."
              },
              "status": {
                "type": "string",
                "enum": [
                  "not_required",
                  "pending",
                  "given",
                  "declined"
                ],
                "description": "`not_required`؛ و`pending` (مطلوبة ولم تُقدَّم: لم يُجب الشخص بعد، أو يوضح `reason` سبب عدم جمعها)؛ و`given`؛ و`declined` (تم تسجيل رفض وانتهت الجلسة كـ `Declined`؛ لا توفر أي شاشة في Didit خيار الرفض حالياً)."
              },
              "given_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت تقديم الموافقة. بالنسبة إلى `customer_collected`، قيمة `given_at` التي أرسلتها."
              },
              "declined_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "عند تسجيل الرفض."
              },
              "text_version": {
                "type": "string",
                "nullable": true,
                "description": "معرّف إصدار نص الموافقة الذي أجاب عليه الشخص، أو النص الذي أرسلته."
              },
              "text_hash": {
                "type": "string",
                "nullable": true,
                "description": "تشفير SHA-256 (hex) لنص الموافقة المعروض بدقة، باللغة التي عُرض بها."
              },
              "locale": {
                "type": "string",
                "nullable": true,
                "description": "اللغة التي عُرض بها نص الموافقة."
              },
              "policy_url": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "سياسة البيانات البيومترية التي ربطت بها خطوة الموافقة."
              },
              "step": {
                "type": "string",
                "nullable": true,
                "description": "خطوة سير العمل التي كانت الجلسة عندها عندما أجاب الشخص، على سبيل المثال `LIVENESS`."
              },
              "node_id": {
                "type": "string",
                "nullable": true,
                "description": "عقدة مخطط سير العمل التي كانت الجلسة عندها عندما أجاب الشخص."
              },
              "ip_address": {
                "type": "string",
                "nullable": true,
                "description": "عنوان IP الذي وردت منه الإجابة."
              },
              "ip_country_code": {
                "type": "string",
                "nullable": true,
                "description": "دولة عنوان IP للإجابة وفق المعيار ISO 3166-1 alpha-2."
              },
              "ip_state": {
                "type": "string",
                "nullable": true,
                "description": "التقسيم الإداري حسب معيار ISO 3166-2 لعنوان IP الخاص بالإجابة، على سبيل المثال `US-IL`."
              },
              "ip_city": {
                "type": "string",
                "nullable": true,
                "description": "مدينة عنوان IP الخاص بالإجابة."
              },
              "user_agent": {
                "type": "string",
                "nullable": true,
                "description": "وكيل المستخدم لطلب الإجابة."
              },
              "detected_ip_address": {
                "type": "string",
                "nullable": true,
                "description": "عنوان IP الخاص بالشخص الذي جرى تقييم المتطلب منه آخر مرة. قد يختلف عن `ip_address` إذا أجاب الشخص من جهاز آخر."
              },
              "detected_country_code": {
                "type": "string",
                "nullable": true,
                "description": "دولة عنوان IP المكتشف وفق المعيار ISO 3166-1 alpha-2."
              },
              "detected_state": {
                "type": "string",
                "nullable": true,
                "description": "التقسيم الإداري حسب معيار ISO 3166-2 لعنوان IP المكتشف."
              },
              "detected_city": {
                "type": "string",
                "nullable": true,
                "description": "مدينة عنوان IP المكتشف."
              },
              "declared_state": {
                "type": "string",
                "nullable": true,
                "description": "التقسيم الإداري حسب معيار ISO 3166-2 الذي صرحت به: `user_state`، أو الولاية لعنوان في الولايات المتحدة في `expected_details`."
              },
              "document_state": {
                "type": "string",
                "nullable": true,
                "description": "التقسيم الإداري حسب معيار ISO 3166-2 الذي أصدر مستند الهوية، وتتم قراءته عند التقاط الهوية."
              },
              "jurisdictions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "الولايات الأمريكية (رموز USPS، على سبيل المثال `IL`) التي ينطبق قانونها البيومتري على الشخص. تكون القيمة `US` عندما تشير الأدلة إلى وجود الشخص في الولايات المتحدة دون معرفة ولاية محددة. يكون فارغاً عند عدم انطباق أي منها."
              },
              "retention_months": {
                "type": "integer",
                "nullable": true,
                "description": "أقصر حد للاحتفاظ بالبيانات البيومترية، بالأشهر، من بين `jurisdictions`. تكون قيمته `null` في حال عدم تطبيق أي منها."
              },
              "reason": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "BIOMETRIC_CONSENT_UNSUPPORTED_SDK",
                  "BIOMETRIC_CONSENT_DECLINED"
                ],
                "description": "`BIOMETRIC_CONSENT_UNSUPPORTED_SDK`: كانت الموافقة مطلوبة والتقط SDK أصلي بإصدار أقدم من 4.10.0، أو SDK لم يُبلغ عن إصداره، وجهاً دون خطوة الموافقة؛ تظل `status` كـ `pending`، أو تصبح `given` إذا وافق الشخص لاحقاً في المسار المستضاف. `BIOMETRIC_CONSENT_DECLINED`: تم تسجيل رفض (يحل محل سبب SDK). و`null` خلاف ذلك، وتكون دائماً `null` عندما لا تتطلب الجلسة موافقة."
              },
              "decline_reason": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "BIOMETRIC_CONSENT_DECLINED"
                ],
                "description": "`BIOMETRIC_CONSENT_DECLINED` عندما يؤدي رفض مسجل إلى إنهاء الجلسة، وخلاف ذلك `null`."
              },
              "face_data_deleted_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت حذف صور وجه الجلسة ومقاطع الفيديو وقوالب الوجه الخاصة بها بسبب الرفض. تكون القيمة `null` ما لم يتم تسجيل رفض."
              }
            }
          },
          "investigator": {
            "$ref": "#/components/schemas/InvestigatorBlock"
          },
          "biometric_retention": {
            "$ref": "#/components/schemas/BiometricRetention"
          },
          "fraud_check": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "نتيجة استدعاء Fraud Check API. تكون `null` لجميع الجلسات الأخرى."
          },
          "full_session_video": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط URL قابل لانتهاء الصلاحية لتسجيل الجلسة الكاملة. يُعاد فقط عندما تقوم مؤسستك بتسجيل فيديو الجلسة الكاملة."
          },
          "full_session_video_recorded_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت إجراء تسجيل الجلسة الكاملة. يُعاد فقط عندما تقوم مؤسستك بتسجيل فيديو الجلسة الكاملة."
          }
        }
      },
      "WorkflowDetail": {
        "type": "object",
        "description": "الحقول أدناه ذات أنواع محددة (typed)؛ ويحمل الكائن أيضاً كل عمود آخر من تكوين سير العمل (مفاتيح تبديل الميزات، والحدود، وإجراءات التحذير، والمستندات المسموح بها، وعمليات الاستدعاء) كخصائص إضافية. الحقول التي لا تنطبق على `workflow_type` تكون `null`.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف لكل إصدار (`settings_uuid`). لكل إصدار من سير العمل معرّف خاص به."
          },
          "workflow_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف ثابت تشترك فيه جميع إصدارات سير العمل. تستخدم الجلسات التي يتم إنشاؤها باستخدامه أحدث إصدار منشور."
          },
          "workflow_label": {
            "type": "string",
            "description": "اسم العرض لسير العمل."
          },
          "workflow_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "kyc",
              "kyb",
              "adaptive_age_verification",
              "biometric_authentication",
              "address_verification",
              "questionnaire_verification",
              "email_verification",
              "phone_verification",
              null
            ],
            "description": "قالب سير العمل. يكون `null` لمخططات سير العمل التي تم إنشاؤها بدون قالب."
          },
          "is_default": {
            "type": "boolean",
            "description": "ما إذا كان هذا هو سير العمل الافتراضي للتطبيق."
          },
          "is_archived": {
            "type": "boolean",
            "description": "لا يمكن لمهام سير العمل المؤرشفة بدء جلسات جديدة."
          },
          "version": {
            "type": "integer",
            "description": "رقم الإصدار ضمن سير العمل."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ],
            "description": "إصدارات المسودة قابلة للتعديل؛ أما الإصدارات المنشورة فغير قابلة للتغيير وتُستخدم للجلسات الجديدة."
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت نشر هذا الإصدار. القيمة `null` للمسودات."
          },
          "is_simple_workflow": {
            "type": "boolean",
            "description": "تكون `true` عندما لا يحتوي سير العمل على `workflow_graph` مخصص."
          },
          "is_editable": {
            "type": "boolean",
            "description": "تكون القيمة `true` فقط لإصدارات `draft`."
          },
          "workflow_url": {
            "type": "string",
            "format": "uri",
            "description": "رابط URL عام يبدأ جلسة باستخدام سير العمل هذا."
          },
          "workflow_graph": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "هيكل المخطط لسير العمل (العقد والحواف). `null` لسير العمل البسيط."
          },
          "features": {
            "type": "string",
            "description": "الميزات المُمكّنة مفصولة بـ `\" + \"`، على سبيل المثال `\"OCR + LIVENESS\"`."
          },
          "total_price": {
            "type": "number",
            "nullable": true,
            "description": "السعر لكل جلسة؛ بالنسبة لمسارات سير العمل القائمة على المخطط، يمثل المسار الأكثر تكلفة."
          },
          "min_price": {
            "type": "number",
            "nullable": true,
            "description": "سعر المسار الأقل تكلفة عبر سير العمل."
          },
          "max_price": {
            "type": "number",
            "nullable": true,
            "description": "سعر المسار الأكثر تكلفة عبر سير العمل."
          },
          "special_add_on_prices": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "أسعار الإضافات الخاصة بالمؤسسة، أو `null` عند عدم تعيين أي منها."
          },
          "max_retry_attempts": {
            "type": "integer",
            "description": "عمليات إعادة المحاولة المسموح بها بعد عملية تحقق مرفوضة."
          },
          "retry_window_days": {
            "type": "integer",
            "nullable": true,
            "description": "الأيام التي يُسمح خلالها بإعادة المحاولة."
          },
          "session_expiration_time": {
            "type": "integer",
            "description": "عدد الثواني قبل انتهاء صلاحية الجلسة غير المكتملة."
          },
          "questionnaire": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "الاستبيان المرفق بسير العمل، أو `null`."
          },
          "kyb_role_settings": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "إعدادات التحقق لكل دور للأشخاص الرئيسيين في KYB."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "signature_availability": {
            "type": "object",
            "description": "أي مستويات التوقيع الإلكتروني يمكنها التوقيع الآن. تحقق منها قبل تعيين `signature_level`. يتم إرجاعها في مسارات عمل `kyc` و`kyb` والمخطط.",
            "properties": {
              "simple": {
                "type": "boolean",
                "description": "Simple متاح دائماً."
              },
              "aes": {
                "type": "boolean",
                "description": "ما إذا كان المتقدم (AES) قادراً على التوقيع الآن. بينما تكون قيمته `false`، يُرفض حفظ خطوة جديدة عند `signature_level: \"aes\"` مع الخطأ `aes_not_available`."
              },
              "qes": {
                "type": "boolean",
                "description": "ما إذا كان المؤهل (QES) قادراً على التوقيع الآن. تظل قيمته `false` حتى يتم ربط مزوّد مؤهل."
              }
            }
          },
          "is_bank_verification_enabled": {
            "type": "boolean",
            "description": "ما إذا كان سير عمل KYC أو KYB البسيط يشغّل التحقق المصرفي. يعمل بعد خطوات التواصل (والتحقق من الموقع) وقبل التحقق من قواعد البيانات وفحص AML وتحليل IP. التحقق المصرفي غير متاح بشكل عام بعد: يتم رفض تفعيله أينما لم يكن مُمكّناً."
          },
          "bank_verification_config": {
            "type": "object",
            "additionalProperties": true,
            "description": "إعدادات التحقق البنكي لسير عمل بسيط، مع نفس المفاتيح التي تقبلها عقدة `BANK_VERIFICATION` (على سبيل المثال `bank_countries` و`bank_method_order`). يتم تجاهل المفاتيح غير المعروفة. كل مفتاح اختياري والمفتاح الغائب يحتفظ بقيمته الافتراضية، لذا يعني `{}` تطبيق جميع القيم الافتراضية. راجع [إعدادات التحقق البنكي](/ar/management-api/workflows/feature-configs#التحقق-من-الحساب-البنكي).",
            "example": {}
          },
          "is_geolocation_enabled": {
            "type": "boolean",
            "description": "ما إذا كان سير عمل KYC البسيط يشغّل التحقق من الموقع. يعمل بعد خطوات التواصل وقبل التحقق المصرفي والتحقق من قواعد البيانات. لا يمكن لسير عمل الشركات (KYB) تشغيله."
          },
          "geolocation_config": {
            "type": "object",
            "additionalProperties": true,
            "description": "إعدادات التحقق من الموقع لسير عمل بسيط، مع نفس المفاتيح التي تأخذها عقدة `GEOLOCATION` (على سبيل المثال `is_geolocation_geofencing_enabled` و `geolocation_max_attempts`). يتم تجاهل المفاتيح غير المعروفة. كل مفتاح اختياري ويحتفظ المفتاح الغائب بقيمته الافتراضية، لذا فإن `{}` تعني جميع القيم الافتراضية.",
            "example": {}
          }
        },
        "additionalProperties": true
      },
      "UserSessionListItem": {
        "title": "KYC session row (session_kind: user)",
        "type": "object",
        "description": "صف ملخص لجلسة التحقق من المستخدمين (KYC). تتم تعبئة حقول الهوية (`full_name`، `country`، `document_type`، `portrait_image`، وحقول الاتصال) تدريجياً مع إكمال المستخدم لخطوات التحقق، وتكون قيمتها `null` حتى تنتهي الخطوة ذات الصلة. الحقول المقيدة بإعدادات سمات الاستجابة لسير العمل تُعاد أيضاً كـ `null`.",
        "required": [
          "session_id",
          "session_kind",
          "session_number",
          "session_url",
          "portrait_image",
          "document_type",
          "full_name",
          "country",
          "status",
          "vendor_data",
          "didit_internal_id",
          "created_at",
          "features",
          "phone_number",
          "email_address",
          "additional_details"
        ],
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "المعرّف الفريد لجلسة التحقق. يُستخدم مع `GET /v3/session/{sessionId}/decision/` لجلب payload القرار الكامل.",
            "example": "5b3720ed-d429-42ef-b67f-37ea805f48ee"
          },
          "session_kind": {
            "type": "string",
            "enum": [
              "user"
            ],
            "description": "مميز الصف. دائماً `\"user\"` لصفوف KYC؛ بينما تحتوي صفوف التحقق من الشركات (KYB) على `\"business\"` وببنية مختلفة.",
            "example": "user"
          },
          "session_number": {
            "type": "integer",
            "description": "رقم تسلسلي سهل القراءة للجلسة داخل تطبيقك. يتطابق أيضاً مع المعامل `search`.",
            "example": 720
          },
          "session_url": {
            "type": "string",
            "nullable": true,
            "description": "رابط التحقق المستضاف الذي يفتحه المستخدم النهائي لإكمال سير العمل. يكون `null` عندما لا تحتوي الجلسة على رابط مستضاف.",
            "example": "https://verify.didit.me/session/CuXoBYCYVO5Y"
          },
          "portrait_image": {
            "type": "string",
            "nullable": true,
            "description": "رابط URL قابل لانتهاء الصلاحية (موقّع مسبقاً) لأفضل صورة شخصية متاحة: صورة شريحة NFC عند توفرها، وإلا فصورة الوجه في مستند الهوية، وإلا فالصورة المرجعية لكشف الحيوية. يكون `null` حتى يتوفر أحدها. سارع بالتنزيل؛ فستنتهي صلاحية الرابط.",
            "example": "https://<media-host>/portraits/5b3720ed.jpg?X-Amz-Expires=3600&X-Amz-Signature=..."
          },
          "document_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Passport",
              "Identity Card",
              "Driver's License",
              "Residence Permit",
              "Health Insurance Card",
              "Tax Card"
            ],
            "description": "نوع مستند التحقق من الهوية بصيغة مقروءة للبشر. يكون `null` قبل اكتمال التحقق من المستند، وأيضاً `null` بعد الاكتمال عندما لا يكون للرمز الذي تم التحقق منه تمثيل للعرض (`SSC`، `WP`، `VISA`، `PSC`، `BC`، `OTHER`). ملاحظة: معامل الاستعلام `document_type` يقوم بالتصفية حسب الرموز القصيرة (`P`، `ID`، `DL`، `RP`، ...)، وليس حسب قيم العرض هذه.",
            "example": "Passport"
          },
          "full_name": {
            "type": "string",
            "nullable": true,
            "description": "أفضل اسم كامل متاح للجلسة، وفقاً لترتيب الأولوية التالي: OCR لمستند الهوية، والبيانات المفحوصة في فحص AML، والبيانات المفحوصة في التحقق من قواعد البيانات، ومستند إثبات العنوان، ثم التفاصيل المتوقعة المقدمة عند إنشاء الجلسة. تكون القيمة `null` عندما لا يتوفر أي منها بعد.",
            "example": "Jane Marie Doe"
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "دولة الجلسة وفق المعيار ISO 3166-1 alpha-3، والتي يتم تحديدها بالترتيب التالي: دولة إصدار مستند الهوية، دولة إصدار التحقق من قواعد البيانات، دولة إصدار إثبات العنوان، التفاصيل المتوقعة، ثم دولة الهاتف المتحقق منه. قد تختلف عن الجنسية.",
            "example": "ESP"
          },
          "status": {
            "type": "string",
            "enum": [
              "Not Started",
              "In Progress",
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned",
              "Kyc Expired",
              "Resubmitted",
              "Awaiting User"
            ],
            "description": "حالة الجلسة الإجمالية. راجع صفحة [حالات التحقق](/ar/integration/verification-statuses) لمعرفة دورة الحياة.",
            "example": "Approved"
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المعرّف الخاص بك للمستخدم النهائي، وتتم إعادته تماماً كما تم إرساله عند إنشاء الجلسة.",
            "example": "your-user-id-123"
          },
          "didit_internal_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "المعرّف الداخلي لـ Didit للملف التعريفي للمستخدم الذي تم التحقق منه وراء هذه الجلسة. ثابت عبر جلسات متعددة لنفس المستخدم؛ قابل للتصفية عبر معامِل الاستعلام `didit_internal_id`.",
            "example": "d9e78474-6c8d-4f2a-bb90-6f5c2f3a1147"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "طابع زمني بتوقيت UTC لوقت إنشاء الجلسة.",
            "example": "2026-06-09T12:26:54.328364Z"
          },
          "features": {
            "type": "array",
            "description": "الحالة لكل ميزة لكل خطوة تحقق تم تكوينها في سير عمل الجلسة، وفقاً لترتيب سير العمل.",
            "items": {
              "type": "object",
              "required": [
                "feature",
                "status"
              ],
              "properties": {
                "feature": {
                  "type": "string",
                  "enum": [
                    "ID_VERIFICATION",
                    "NFC",
                    "LIVENESS",
                    "FACE_MATCH",
                    "POA",
                    "QUESTIONNAIRE",
                    "EMAIL_VERIFICATION",
                    "PHONE",
                    "AML",
                    "IP_ANALYSIS",
                    "AGE_ESTIMATION",
                    "DATABASE_VALIDATION",
                    "GEOLOCATION"
                  ],
                  "description": "معرّف ميزة التحقق.",
                  "example": "ID_VERIFICATION"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "Not Finished",
                    "Approved",
                    "Declined",
                    "In Review",
                    "Resub Requested"
                  ],
                  "description": "حالة هذه الميزة. تكون `Not Finished` حتى تكتمل الخطوة.",
                  "example": "Approved"
                }
              }
            }
          },
          "phone_number": {
            "type": "object",
            "nullable": true,
            "description": "الهاتف المقترن بالجلسة: الهاتف المتحقق منه عند تشغيل التحقق من رقم الهاتف، وإلا فهو هاتف الاتصال المقدم عند إنشاء الجلسة. يكون `null` عندما لا يتوفر أي منهما.",
            "required": [
              "number",
              "is_verified"
            ],
            "properties": {
              "number": {
                "type": "string",
                "description": "رقم الهاتف بتنسيق E.164.",
                "example": "+14155552671"
              },
              "is_verified": {
                "type": "boolean",
                "description": "تكون القيمة `true` فقط عندما توافق ميزة التحقق من رقم الهاتف على هذا الرقم.",
                "example": true
              }
            }
          },
          "email_address": {
            "type": "object",
            "nullable": true,
            "description": "البريد الإلكتروني المرتبط بالجلسة: البريد الإلكتروني الذي تم التحقق منه عند تشغيل التحقق من البريد الإلكتروني، أو بريد الاتصال المقدم عند إنشاء الجلسة في الحالات الأخرى. يكون `null` عندما لا يتوفر أي منهما.",
            "required": [
              "email",
              "is_verified"
            ],
            "properties": {
              "email": {
                "type": "string",
                "format": "email",
                "example": "jane@example.com"
              },
              "is_verified": {
                "type": "boolean",
                "description": "تكون القيمة `true` فقط عندما توافق ميزة التحقق من البريد الإلكتروني على هذا العنوان.",
                "example": true
              }
            }
          },
          "additional_details": {
            "type": "object",
            "nullable": true,
            "description": "بيانات إضافية مدمجة لكل ميزة. تظهر الميزات التي أنتجت بيانات فقط كمفاتيح؛ وتكون `null` عندما لا تنتج أي ميزة بيانات إضافية. يتم حذف الحقول المستبعدة بواسطة تكوين سمات الاستجابة لسير العمل.",
            "properties": {
              "aml": {
                "type": "object",
                "description": "موجود عند تشغيل فحص AML.",
                "properties": {
                  "total_hits": {
                    "type": "integer",
                    "description": "عدد نتائج فحص AML.",
                    "example": 0
                  },
                  "entity_type": {
                    "type": "string",
                    "description": "نوع الكيان الذي تم فحصه.",
                    "example": "person"
                  },
                  "is_adverse_media_fetched": {
                    "type": "boolean",
                    "example": false
                  },
                  "screened_data": {
                    "type": "object",
                    "description": "مجموعة فرعية من البيانات التي تم فحصها. يتم تضمين المفاتيح غير الفارغة فقط.",
                    "properties": {
                      "nationality": {
                        "type": "string",
                        "example": "ESP"
                      },
                      "document_number": {
                        "type": "string",
                        "example": "XX1234567"
                      },
                      "date_of_birth": {
                        "type": "string",
                        "example": "1990-05-21"
                      }
                    }
                  }
                }
              },
              "database_validation": {
                "type": "object",
                "description": "موجود عند تشغيل التحقق من قواعد البيانات.",
                "properties": {
                  "validation_type": {
                    "type": "string",
                    "example": "DOCUMENT_VALIDATION"
                  },
                  "match_type": {
                    "type": "string",
                    "example": "FULL_MATCH"
                  },
                  "identification_number": {
                    "type": "string",
                    "description": "الرقم الضريبي، أو الشخصي، أو رقم المستند الذي تم التحقق منه (أول رقم متاح).",
                    "example": "12345678Z"
                  }
                }
              },
              "poa": {
                "type": "object",
                "description": "موجود عند تشغيل إثبات العنوان.",
                "properties": {
                  "document_type": {
                    "type": "string",
                    "example": "UTILITY_BILL"
                  },
                  "issuer": {
                    "type": "string",
                    "example": "Energy Co"
                  },
                  "address": {
                    "type": "string",
                    "example": "Calle Mayor 1, 28013 Madrid"
                  },
                  "name_on_document": {
                    "type": "string",
                    "example": "Jane Marie Doe"
                  }
                }
              },
              "liveness": {
                "type": "object",
                "description": "موجود عند تشغيل كشف الحيوية.",
                "properties": {
                  "method": {
                    "type": "string",
                    "example": "PASSIVE"
                  },
                  "score": {
                    "type": "number",
                    "description": "درجة الثقة في كشف الحيوية، مقربة إلى منزلتين عشريتين.",
                    "example": 0.98
                  }
                }
              },
              "face_match": {
                "type": "object",
                "description": "موجود عند تشغيل مطابقة الوجه.",
                "properties": {
                  "score": {
                    "type": "number",
                    "description": "درجة تشابه مطابقة الوجه، مقرّبة إلى منزلتين عشريتين.",
                    "example": 0.95
                  },
                  "source_image": {
                    "type": "string",
                    "description": "رابط URL قابل لانتهاء الصلاحية (موقّع مسبقاً) لصورة الوجه المصدر.",
                    "example": "https://<media-host>/faces/source.jpg?X-Amz-Expires=3600&..."
                  },
                  "target_image": {
                    "type": "string",
                    "description": "رابط URL قابل لانتهاء الصلاحية (موقّع مسبقاً) لصورة الوجه الهدف.",
                    "example": "https://<media-host>/faces/target.jpg?X-Amz-Expires=3600&..."
                  }
                }
              },
              "phone_verification": {
                "type": "object",
                "description": "موجود عند تشغيل التحقق من رقم الهاتف.",
                "properties": {
                  "country_code": {
                    "type": "string",
                    "description": "دولة رقم الهاتف وفق المعيار ISO 3166-1 alpha-2.",
                    "example": "US"
                  },
                  "is_temporary": {
                    "type": "boolean",
                    "example": false
                  },
                  "is_ported": {
                    "type": "boolean",
                    "example": false
                  },
                  "is_blocked": {
                    "type": "boolean",
                    "example": false
                  }
                }
              },
              "email_verification": {
                "type": "object",
                "description": "موجود عند تشغيل التحقق من البريد الإلكتروني.",
                "properties": {
                  "is_breached": {
                    "type": "boolean",
                    "example": false
                  },
                  "is_disposable": {
                    "type": "boolean",
                    "example": false
                  },
                  "is_undeliverable": {
                    "type": "boolean",
                    "example": false
                  },
                  "is_blocklisted": {
                    "type": "boolean",
                    "example": false
                  }
                }
              }
            }
          },
          "assignee": {
            "type": "object",
            "nullable": true,
            "description": "المراجِع في لوحة التحكم المعين للجلسة، أو `null` عندما لا يحتفظ بها أحد.",
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              },
              "assigned_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            }
          },
          "waiting_since": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى بدأت الجلسة بالانتظار للمراجعة. وتكون `null` ما لم تكن الجلسة في حالة `In Review`."
          },
          "sla_due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى يحين موعد المراجعة، بناءً على الموعد النهائي للمراجعة المحدد لتطبيقك في Console. وتكون `null` ما لم تكن الجلسة في حالة `In Review` وكان الموعد النهائي محدداً."
          },
          "top_warnings": {
            "type": "array",
            "description": "ما يصل إلى عدد قليل من أهم تحذيرات الجلسة، لعرض سريع للتقييم الأولي. القائمة الكاملة موجودة في القرار.",
            "items": {
              "type": "object",
              "properties": {
                "risk": {
                  "type": "string",
                  "description": "رمز التحذير، على سبيل المثال `FACE_MATCH_LOW_SIMILARITY`."
                },
                "feature": {
                  "type": "string",
                  "description": "الميزة التي أطلقته."
                },
                "log_type": {
                  "type": "string",
                  "nullable": true,
                  "description": "`error` أو `warning`؛ و`null` لإدخال قديم."
                },
                "short_description": {
                  "type": "string"
                }
              }
            }
          },
          "warnings_count": {
            "type": "integer",
            "description": "عدد التحذيرات في الجلسة."
          }
        }
      },
      "BusinessSessionListItem": {
        "title": "KYB session row (session_kind: business)",
        "type": "object",
        "description": "صف ملخص لجلسة التحقق من الشركات (KYB). يُعاد فقط عندما تكون قيمة `session_kind` هي `business` أو `all`.",
        "required": [
          "session_id",
          "session_kind",
          "session_number",
          "status",
          "vendor_data",
          "created_at",
          "workflow_id",
          "workflow_type",
          "workflow_label",
          "company_name",
          "registration_number",
          "country"
        ],
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "المعرّف الفريد لجلسة التحقق من الشركات.",
            "example": "8a1f63c2-1b9e-4f3a-9c41-2f6a1f0b7d52"
          },
          "session_kind": {
            "type": "string",
            "enum": [
              "business"
            ],
            "description": "مميز الصف. دائماً `\"business\"` لصفوف KYB.",
            "example": "business"
          },
          "session_number": {
            "type": "integer",
            "description": "رقم تسلسلي سهل القراءة لجلسة الشركة داخل تطبيقك. يتم ترقيمه بشكل مستقل عن جلسات KYC.",
            "example": 42
          },
          "status": {
            "type": "string",
            "enum": [
              "Not Started",
              "In Progress",
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned",
              "Kyc Expired",
              "Resubmitted",
              "Awaiting User"
            ],
            "description": "حالة الجلسة الإجمالية. راجع صفحة [حالات التحقق](/ar/integration/verification-statuses).",
            "example": "Approved"
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المعرّف الخاص بك للشركة، وتتم إعادته تماماً كما تم إرساله عند إنشاء الجلسة.",
            "example": "your-company-id-77"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "طابع زمني بتوقيت UTC لوقت إنشاء الجلسة.",
            "example": "2026-06-08T09:14:02.118450Z"
          },
          "workflow_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "معرّف سير العمل الذي أُنشئت به هذه الجلسة.",
            "example": "9f9b1234-aaaa-bbbb-cccc-1234567890ab"
          },
          "workflow_type": {
            "type": "string",
            "nullable": true,
            "description": "نوع سير العمل. `kyb` لمهام سير عمل الشركات.",
            "example": "kyb"
          },
          "workflow_label": {
            "type": "string",
            "nullable": true,
            "description": "اسم العرض لسير العمل.",
            "example": "Standard KYB"
          },
          "company_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم الشركة التي يتم التحقق منها، من شركة سجل الشركات المرتبطة بالجلسة. `null` حتى يتم تحديد شركة.",
            "example": "Acme Holdings S.L."
          },
          "registration_number": {
            "type": "string",
            "nullable": true,
            "description": "رقم تسجيل الشركة من سجل الشركات المرتبط بالجلسة.",
            "example": "B12345678"
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "رمز الدولة لشركة سجل الشركات المرتبطة بالجلسة.",
            "example": "ES"
          }
        }
      },
      "TransactionVerificationSessionAction": {
        "title": "Verification session",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "verification_session"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "رابط التحقق المستضاف لفتحه للمستخدم النهائي."
          },
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف جلسة التحقق."
          },
          "session_token": {
            "type": "string",
            "description": "token الجلسة، يُستخدم بواسطة حزم SDK للأجهزة المحمولة لتشغيل سير العمل محليًا."
          },
          "status": {
            "type": "string",
            "description": "حالة جلسة التحقق."
          }
        },
        "required": [
          "type",
          "url"
        ]
      },
      "TransactionWalletOwnershipAction": {
        "title": "Wallet ownership",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "wallet_ownership"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "رابط أداة إثبات ملكية المحفظة المستضافة. افتحه في متصفح حقيقي - على الأجهزة المحمولة استخدم SFSafariViewController أو Chrome Custom Tab، ولا تستخدم أبداً عرض ويب مضمّناً."
          },
          "widget_session_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف جلسة أداة إثبات ملكية المحفظة."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت انتهاء صلاحية جلسة الأداة."
          }
        },
        "required": [
          "type",
          "url"
        ]
      },
      "TransactionRuleActionAddScore": {
        "type": "object",
        "required": [
          "type",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "add_score"
            ]
          },
          "value": {
            "type": "integer",
            "description": "النقاط المضافة إلى درجة المخاطر للمعاملة. قد تكون سالبة."
          }
        },
        "description": "أضف نقاطاً إلى درجة المخاطر التراكمية للمعاملة؛ يحدد الإجمالي الحالة عبر حدود المراجعة/الرفض الخاصة بالتطبيق."
      },
      "TransactionRuleActionChangeStatus": {
        "type": "object",
        "required": [
          "type",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "change_status"
            ]
          },
          "value": {
            "type": "string",
            "enum": [
              "APPROVED",
              "IN_REVIEW",
              "DECLINED",
              "AWAITING_USER"
            ],
            "description": "الحالة المطلوب تعيينها على الفور، بغض النظر عن النتيجة. المفتاح البديل: status."
          },
          "workflow_id": {
            "type": "string",
            "format": "uuid",
            "description": "مطلوب عندما تكون القيمة AWAITING_USER: سير عمل التحقق الذي يُطلب من المعني إكماله. مفتاح الاسم المستعار: remediation_workflow_id. تُنشئ Didit جلسة تصحيح مستضافة للمعني عند تفعيل القاعدة."
          }
        },
        "description": "تعيين حالة المعاملة مباشرةً. تحظى DECLINED دائماً بالأولوية عبر القواعد المطابقة."
      },
      "TransactionRuleActionAddTags": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "add_tags"
            ]
          },
          "tag_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "علامة تطبيق موجودة لإرفاقها."
          },
          "tag_name": {
            "type": "string",
            "description": "اسم العلامة المراد إرفاقها؛ يتم إنشاؤها عند الاستخدام الأول (وتُخزّن بأحرف كبيرة). قدّم tag_uuid أو tag_name."
          },
          "tag_color": {
            "type": "string",
            "description": "لون سداسي عشري يُستخدم عندما ينشئ tag_name وسماً جديداً، مثل #007AFE."
          }
        },
        "description": "إرفاق علامة تطبيق بالمعاملة المتطابقة."
      },
      "TransactionRuleActionAddNote": {
        "type": "object",
        "required": [
          "type",
          "note"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "add_note"
            ]
          },
          "note": {
            "type": "string",
            "description": "نص الملاحظة المرفق بالمعاملة (المؤلف: محرك القواعد). المفتاح البديل: القيمة."
          }
        },
        "description": "إرفاق ملاحظة محلل مؤتمتة بالمعاملة المتطابقة."
      },
      "TransactionRuleActionAddToList": {
        "type": "object",
        "required": [
          "type",
          "list_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "add_to_list"
            ]
          },
          "list_id": {
            "type": "string",
            "format": "uuid",
            "description": "القائمة المراد إضافة vendor_data الخاص بالشخص المستهدف إليها."
          }
        },
        "description": "أضف vendor_data الخاصة بالشخص الخاضع للفحص إلى قائمة الحظر، أو قائمة السماح، أو قائمة مخصصة."
      },
      "TransactionRuleActionOpenCase": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "open_case"
            ]
          },
          "blueprint": {
            "type": "string",
            "format": "uuid",
            "description": "UUID لمخطط الحالة؛ يُعيّن افتراضياً إلى المخطط الافتراضي للتطبيق."
          },
          "grouping": {
            "type": "string",
            "enum": [
              "by_applicant",
              "by_rule_and_applicant"
            ],
            "description": "ما إذا كانت التطابقات المتكررة تنضم إلى حالة واحدة لكل متقدم أو حالة واحدة لكل قاعدة + متقدم."
          },
          "attach_matched_transaction": {
            "type": "boolean",
            "description": "إرفاق المعاملة المتطابقة بالحالة."
          }
        },
        "description": "فتح حالة تحقيق (أو الإضافة إليها). يتم تطبيق أول إجراء open_case فقط على القاعدة."
      },
      "KYBRegistrySearchResults": {
        "type": "object",
        "properties": {
          "companies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kyb_response_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "معرّف لهذا المرشح — مرره إلى `POST /v3/kyb/select/` لاسترداد الملف التعريفي الكامل. مؤقت ومقتصر على هذا البحث: لا تقم بتخزينه على المدى الطويل؛ أعد البحث للحصول على معرّف جديد.",
                  "example": "69aeeb95febb0f1704042259"
                },
                "name": {
                  "type": "string",
                  "nullable": true,
                  "description": "اسم الشركة المسجل.",
                  "example": "Tesco PLC"
                },
                "registration_number": {
                  "type": "string",
                  "nullable": true,
                  "description": "رقم تسجيل السجل.",
                  "example": "00445790"
                },
                "status": {
                  "type": "string",
                  "nullable": true,
                  "description": "حالة السجل المعيارية للشركة (مثل `active` أو `dissolved` أو `inactive` أو `struck off`).",
                  "example": "active"
                },
                "type": {
                  "type": "string",
                  "nullable": true,
                  "description": "الشكل القانوني كما هو مسجل في السجل التجاري.",
                  "example": "Public Limited Company"
                },
                "registered_address": {
                  "type": "string",
                  "nullable": true,
                  "description": "العنوان المسجل للمرشح، عندما يرجعه السجل. استخدمه، مع رقم التسجيل، للتمييز بين الشركات التي تحمل نفس الاسم: في الولايات المتحدة يمكن إدراج المرشح تحت الولاية التي تعمل فيها الشركة بدلاً من الولاية التي بحثت عنها.",
                  "example": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, AL7 1GA"
                },
                "risk_level": {
                  "type": "string",
                  "nullable": true,
                  "description": "مستوى المخاطر كما ورد في السجل، عند توفره. عادةً ما يكون `null` وقت البحث."
                },
                "fetch_status": {
                  "type": "string",
                  "nullable": true,
                  "description": "دائماً `pending` للمرشحين في البحث — لا يتم جلب ملف الشركة الكامل (وفرض الرسوم عليه) إلا عند اختيارك للمرشح.",
                  "example": "pending"
                }
              }
            },
            "description": "قائمة المرشحين بعد إزالة التكرار. فارغة طالما كانت `search_resolved=false` (وضع webhook) أو عندما لا يتطابق أي شيء."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "عدد المرشحين المُرجَعين."
              },
              "page": {
                "type": "integer"
              },
              "per_page": {
                "type": "integer",
                "example": 25
              }
            }
          },
          "search_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "pending",
              "resolved"
            ],
            "description": "حالة دورة حياة البحث في السجل."
          },
          "search_resolved": {
            "type": "boolean",
            "description": "تكون القيمة `true` بمجرد أن تصبح قائمة المرشحين نهائية."
          }
        }
      },
      "KYBRegistryCandidateRequest": {
        "type": "object",
        "required": [
          "kyb_response_id"
        ],
        "properties": {
          "kyb_response_id": {
            "type": "string",
            "maxLength": 1024,
            "description": "معرّف المرشح من `POST /v3/kyb/search/` (`kyb_registry.companies[].kyb_response_id`). سريع الزوال: استخدمه بعد وقت قصير من البحث الذي أنتجه. يمكن أن تكون المعرّفات طويلة، لذا خزّن القيمة وأرسلها تماماً كما تم إرجاعها، دون اقتطاع أو افتراض طول معين.",
            "example": "69aeeb95febb0f1704042259"
          },
          "vendor_data": {
            "type": "string",
            "description": "المعرّف الخاص بك لهذه الشركة؛ تتم إعادته وتخزينه مع جلسة الشركة."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "كائن JSON بصيغة حرة يُخزن مع جلسة الشركة وتتم إعادته في الاستجابة."
          },
          "save_api_request": {
            "type": "boolean",
            "default": true,
            "description": "يجب أن تكون `true` (القيمة الافتراضية). يتم دائماً حفظ اختيارات سجل KYB بحيث يمكن تتبع الفوترة والاسترجاع؛ تعيد `false` الرمز `400`."
          }
        }
      },
      "WebhookEventEnvelope": {
        "type": "object",
        "description": "الحقول التي تضيفها Didit إلى كل تسليم webhook موقّع، أياً كان نوع الحدث. اقرأ `webhook_type` لمعرفة الـ payload الذي تلقيته.",
        "required": [
          "event_id",
          "webhook_type",
          "timestamp",
          "created_at",
          "application_id",
          "environment"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الحدث. تتلقى كل وجهة القيمة نفسها وتحتفظ بها أي عملية إعادة تسليم، لذا استخدمه لإزالة التكرار."
          },
          "webhook_type": {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          "timestamp": {
            "type": "integer",
            "description": "توقيت Unix بالثواني الذي تم فيه توقيع هذا التسليم. يساوي رأس `X-Timestamp`؛ تحمل عملية إعادة التسليم قيمة جديدة."
          },
          "created_at": {
            "type": "integer",
            "description": "توقيت Unix بالثواني للتغيير الذي أنتج الحدث."
          },
          "application_id": {
            "type": "string",
            "format": "uuid",
            "description": "التطبيق الذي ينتمي إليه الحدث."
          },
          "environment": {
            "type": "string",
            "enum": [
              "live",
              "sandbox"
            ],
            "description": "`sandbox` لجلسات البيئة التجريبية وتطبيقات البيئة التجريبية، وإلا فستكون `live`."
          }
        }
      },
      "SessionWebhookEventData": {
        "type": "object",
        "description": "حقول الجلسة الخاصة بـ `status.updated` و`data.updated`. تُغفل الحقول الاختيارية ولا تُرسل مطلقاً كـ `null` عندما لا تنطبق. تضيف جلسات الشركات (KYB) الحقول `business_session_id` و`session_kind` و`vendor_business_id`.",
        "required": [
          "session_id",
          "status",
          "sandbox_scenario"
        ],
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "جلسة التحقق."
          },
          "business_session_id": {
            "type": "string",
            "format": "uuid",
            "description": "جلسات التحقق من الشركات (KYB) فقط: نفس قيمة `session_id`."
          },
          "session_kind": {
            "type": "string",
            "enum": [
              "business"
            ],
            "description": "جلسات التحقق من الشركات (KYB) فقط. لا تتضمن أحداث جلسات التحقق من المستخدمين (KYC) حقل `session_kind` على المستوى الأعلى؛ اقرأ `decision.session_kind` بدلاً من ذلك."
          },
          "status": {
            "type": "string",
            "enum": [
              "Not Started",
              "In Progress",
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned",
              "Kyc Expired",
              "Resubmitted",
              "Awaiting User"
            ],
            "description": "حالة الجلسة بعد التغيير."
          },
          "trigger": {
            "type": "string",
            "description": "موجود عندما لا ينتج الحدث عن سير عمل التحقق نفسه، على سبيل المثال `manual_review`، أو `manual_step_update`، أو `ongoing_monitoring`، أو `webhook_reconciliation` (إعادة إرسال `status.updated` لأن أول webhook نهائي لم يتم إنشاؤه مطلقاً، لذا قد تتلقى حدثاً ثانياً لقرار حصلت عليه بالفعل: تخلص من التكرار بناءً على `session_id` و `status`)، أو `manual_webhook_recovery`، أو `kyb_registry_change`، أو `biometric_retention` (إرسال `data.updated` عند حذف البيانات البيومترية الحية للجلسة وفقاً للجدول الزمني) أو تعديل `console_*` مثل `console_registry_edit`، أو `console_key_people_skip`، أو `console_key_people_regenerate`."
          },
          "workflow_id": {
            "type": "string",
            "format": "uuid",
            "description": "سير عمل الجلسة. يُحذف عندما لا تحتوي الجلسة على أي سير عمل."
          },
          "workflow_version": {
            "type": "integer",
            "description": "إصدار سير العمل الذي نفذته الجلسة. يُرسل جنباً إلى جنب مع `workflow_id`."
          },
          "vendor_data": {
            "type": "string",
            "description": "حقل `vendor_data` الخاص بك للجلسة. يُغفل عندما يكون فارغاً."
          },
          "vendor_business_id": {
            "type": "string",
            "description": "جلسات التحقق من الشركات (KYB) فقط: الشركة التي تنتمي إليها الجلسة. يُحذف في حال عدم وجودها."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "بيانات `metadata` الخاصة بجلستك. لا تُدرج عندما تكون فارغة."
          },
          "decision": {
            "$ref": "#/components/schemas/SessionDecision"
          },
          "resubmit_info": {
            "type": "object",
            "description": "فقط عندما تكون `status` هي `Resubmitted`: الخطوات التي يجب على المستخدم إعادتها والسبب.",
            "required": [
              "nodes_to_resubmit",
              "reasons"
            ],
            "properties": {
              "nodes_to_resubmit": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "node_id",
                    "feature"
                  ],
                  "properties": {
                    "node_id": {
                      "type": "string",
                      "description": "معرّف العقدة كما يظهر في تعريف سير عمل الجلسة (على سبيل المثال `feature_ocr`، `feature_liveness`).",
                      "example": "feature_poa"
                    },
                    "feature": {
                      "type": "string",
                      "description": "نوع الميزة للعقدة، على سبيل المثال `OCR` أو `LIVENESS` أو `PROOF_OF_ADDRESS`.",
                      "example": "PROOF_OF_ADDRESS"
                    }
                  }
                },
                "description": "خطوات سير العمل التي يجب على المستخدم إعادتها. نفس مدخلات `{node_id, feature}` مثل `nodes_to_resubmit` في [Update Status](#patch-/v3/session/-sessionId-/update-status/)."
              },
              "reasons": {
                "type": "object",
                "additionalProperties": true,
                "description": "السبب لكل `node_id` في `nodes_to_resubmit`."
              }
            }
          },
          "sandbox_scenario": {
            "type": "string",
            "nullable": true,
            "description": "النتيجة التي تمت محاكاتها والمجهزة في جلسة البيئة التجريبية، أو `null`. تكون دائماً `null` لجلسات الإنتاج."
          }
        }
      },
      "SessionStatusUpdatedEvent": {
        "description": "غيّرت جلسة تحقق حالتها. يتم إرسال `decision` فقط للحالات `Approved` و`Declined` و`In Review` و`Abandoned`؛ وله نفس شكل `GET /v3/session/{sessionId}/decision/` للوجهات التي تستخدم الإصدار 3 من webhook (الافتراضي)، والشكل الأقدم المصغر للوجهات التي تستخدم الإصدارين 1 أو 2. تتلقى جلسات الشركات دائمًا قرار الشركات من الإصدار 3.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "$ref": "#/components/schemas/SessionWebhookEventData"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "status.updated"
                ],
                "description": "دائماً `status.updated`."
              }
            },
            "required": [
              "webhook_type"
            ]
          }
        ]
      },
      "SessionDataUpdatedEvent": {
        "description": "بيانات جلسة التحقق تغيرت دون تغيير في الحالة، على سبيل المثال بعد تعديل مراجعة يدوية، أو تجاوز خطوة، أو إعادة فحص للمراقبة المستمرة. يُرسل `decision` فقط للحالات `Approved` و`Declined` و`In Review` و`Abandoned`؛ وله شكل `GET /v3/session/{sessionId}/decision/` للوجهات التي تستخدم الإصدار 3 من webhook (الافتراضي)، والشكل المختصر الأقدم لوجهات الإصدار 1 أو 2. تتلقى جلسات الشركات دائماً قرار الشركات للإصدار 3.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "$ref": "#/components/schemas/SessionWebhookEventData"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "data.updated"
                ],
                "description": "دائماً `data.updated`."
              }
            },
            "required": [
              "webhook_type"
            ]
          }
        ]
      },
      "UserStatusUpdatedEvent": {
        "description": "تغيّرت حالة مستخدم. لا يُرسل عند إنشاء المستخدم.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "user.status.updated"
                ],
                "description": "دائماً `user.status.updated`."
              },
              "vendor_user_id": {
                "type": "string",
                "format": "uuid",
                "description": "المستخدم المعني بالحدث."
              },
              "vendor_data": {
                "type": "string",
                "nullable": true,
                "description": "حقل `vendor_data` الخاص بك للمستخدم، أو `null`."
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "IN_REVIEW",
                  "FLAGGED",
                  "BLOCKED"
                ],
                "description": "حالة المستخدم بعد التغيير."
              },
              "previous_status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "IN_REVIEW",
                  "FLAGGED",
                  "BLOCKED"
                ],
                "description": "الحالة قبل التغيير."
              }
            },
            "required": [
              "webhook_type",
              "vendor_user_id",
              "vendor_data",
              "status",
              "previous_status"
            ]
          }
        ]
      },
      "UserDataUpdatedEvent": {
        "description": "تغيرت حقول مستخدم. لا يُرسل عند إنشاء المستخدم. يمكن لعملية حفظ واحدة إنتاج حدث حالة وحدث بيانات معاً.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "user.data.updated"
                ],
                "description": "دائماً `user.data.updated`."
              },
              "vendor_user_id": {
                "type": "string",
                "format": "uuid",
                "description": "المستخدم المعني بالحدث."
              },
              "vendor_data": {
                "type": "string",
                "nullable": true,
                "description": "حقل `vendor_data` الخاص بك للمستخدم، أو `null`."
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "IN_REVIEW",
                  "FLAGGED",
                  "BLOCKED"
                ],
                "description": "حالة المستخدم بعد التغيير."
              },
              "changed_fields": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "vendor_data",
                    "display_name",
                    "full_name",
                    "date_of_birth",
                    "metadata",
                    "portrait_image",
                    "issuing_states",
                    "approved_emails",
                    "approved_phones",
                    "features",
                    "session_count",
                    "approved_count",
                    "declined_count",
                    "in_review_count",
                    "first_session_at",
                    "last_session_at"
                  ]
                },
                "description": "أسماء الحقول التي تغيرت."
              },
              "changes": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "previous": {
                      "nullable": true,
                      "description": "القيمة قبل التغيير. التواريخ هي سلاسل بتنسيق ISO 8601."
                    },
                    "current": {
                      "nullable": true,
                      "description": "القيمة بعد التغيير. التواريخ هي سلاسل بتنسيق ISO 8601."
                    }
                  }
                },
                "description": "القيمة السابقة والحالية لكل حقل تم تغييره، مفهرسة حسب اسم الحقل. يمكن أن تكون القيم بيانات شخصية (الأسماء، تواريخ الميلاد، روابط الصور الشخصية، عناوين البريد الإلكتروني، أرقام الهواتف)؛ تعامل معها وفقاً لذلك."
              }
            },
            "required": [
              "webhook_type",
              "vendor_user_id",
              "vendor_data",
              "status",
              "changed_fields",
              "changes"
            ]
          }
        ]
      },
      "BusinessStatusUpdatedEvent": {
        "description": "تغيرت حالة الشركة. لا يتم الإرسال عند إنشاء الشركة.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "business.status.updated"
                ],
                "description": "دائماً `business.status.updated`."
              },
              "vendor_business_id": {
                "type": "string",
                "format": "uuid",
                "description": "الشركة التي يدور الحدث حولها."
              },
              "vendor_data": {
                "type": "string",
                "nullable": true,
                "description": "حقل `vendor_data` الخاص بك للشركة، أو `null`."
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "IN_REVIEW",
                  "FLAGGED",
                  "BLOCKED"
                ],
                "description": "حالة الشركة بعد التغيير."
              },
              "previous_status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "IN_REVIEW",
                  "FLAGGED",
                  "BLOCKED"
                ],
                "description": "الحالة قبل التغيير."
              }
            },
            "required": [
              "webhook_type",
              "vendor_business_id",
              "vendor_data",
              "status",
              "previous_status"
            ]
          }
        ]
      },
      "BusinessDataUpdatedEvent": {
        "description": "تغيرت حقول شركة. لا يُرسل عند إنشاء الشركة. يمكن لعملية حفظ واحدة إنتاج حدث حالة وحدث بيانات معاً.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "business.data.updated"
                ],
                "description": "دائماً `business.data.updated`."
              },
              "vendor_business_id": {
                "type": "string",
                "format": "uuid",
                "description": "الشركة التي يدور الحدث حولها."
              },
              "vendor_data": {
                "type": "string",
                "nullable": true,
                "description": "حقل `vendor_data` الخاص بك للشركة، أو `null`."
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "IN_REVIEW",
                  "FLAGGED",
                  "BLOCKED"
                ],
                "description": "حالة الشركة بعد التغيير."
              },
              "changed_fields": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "vendor_data",
                    "display_name",
                    "metadata",
                    "legal_name",
                    "registration_number",
                    "country_code",
                    "session_count",
                    "approved_count",
                    "declined_count",
                    "in_review_count",
                    "features",
                    "first_session_at",
                    "last_session_at"
                  ]
                },
                "description": "أسماء الحقول التي تغيرت."
              },
              "changes": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "previous": {
                      "nullable": true,
                      "description": "القيمة قبل التغيير. التواريخ هي سلاسل بتنسيق ISO 8601."
                    },
                    "current": {
                      "nullable": true,
                      "description": "القيمة بعد التغيير. التواريخ هي سلاسل بتنسيق ISO 8601."
                    }
                  }
                },
                "description": "القيمة السابقة والحالية لكل حقل تم تغييره، مفهرسة حسب اسم الحقل."
              }
            },
            "required": [
              "webhook_type",
              "vendor_business_id",
              "vendor_data",
              "status",
              "changed_fields",
              "changes"
            ]
          }
        ]
      },
      "TransactionCreatedEvent": {
        "description": "تم إنشاء معاملة وفحصها. تُرسل لتطبيقات بيئة الإنتاج فقط.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "transaction.created"
                ],
                "description": "دائماً `transaction.created`."
              },
              "transaction_id": {
                "type": "string",
                "format": "uuid",
                "description": "معرّف Didit للمعاملة."
              },
              "txn_id": {
                "type": "string",
                "nullable": true,
                "description": "معرّف `transaction_id` الذي أدخلته وقت الإنشاء، أو `null`."
              },
              "status": {
                "type": "string",
                "enum": [
                  "APPROVED",
                  "IN_REVIEW",
                  "DECLINED",
                  "AWAITING_USER"
                ],
                "description": "حالة المراقبة بعد التغيير."
              },
              "score": {
                "type": "integer",
                "description": "درجة المخاطر التراكمية الناتجة عن القواعد."
              },
              "severity": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "UNKNOWN",
                  "LOW",
                  "MEDIUM",
                  "HIGH",
                  "CRITICAL",
                  null
                ],
                "description": "شدة المخاطر، أو `null` حتى تحددها قاعدة أو مزود خدمة."
              },
              "amount": {
                "type": "string",
                "description": "مبلغ المعاملة كسلسلة عشرية. على عكس الـ API، لا تتم تسويته، لذا يمكنه حمل أصفار لاحقة (حتى 18 منزلة عشرية)."
              },
              "currency": {
                "type": "string",
                "description": "رمز العملة أو رمز أصل العملة المشفرة الخاص بـ `amount`."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "INBOUND",
                  "OUTBOUND"
                ],
                "description": "الاتجاه بالنسبة إلى الشخص المعني."
              },
              "action_required": {
                "type": "object",
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TransactionVerificationSessionAction"
                  },
                  {
                    "$ref": "#/components/schemas/TransactionWalletOwnershipAction"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "verification_session": "#/components/schemas/TransactionVerificationSessionAction",
                    "wallet_ownership": "#/components/schemas/TransactionWalletOwnershipAction"
                  }
                },
                "description": "إجراء المستخدم النهائي المعلق، أو `null`. نفس الكائن مثل `action_required` في المعاملة؛ `session_token` عبارة عن بيانات اعتماد، لذا لا تسجله في السجلات أبداً."
              }
            },
            "required": [
              "webhook_type",
              "transaction_id",
              "txn_id",
              "status",
              "score",
              "severity",
              "amount",
              "currency",
              "direction",
              "action_required"
            ]
          }
        ]
      },
      "TransactionStatusUpdatedEvent": {
        "description": "تغيرت حالة معاملة، بناءً على قاعدة أو مراجعة أو إجراء من المستخدم النهائي. تُرسل لتطبيقات بيئة الإنتاج فقط.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "transaction.status.updated"
                ],
                "description": "دائماً `transaction.status.updated`."
              },
              "transaction_id": {
                "type": "string",
                "format": "uuid",
                "description": "معرّف Didit للمعاملة."
              },
              "txn_id": {
                "type": "string",
                "nullable": true,
                "description": "معرّف `transaction_id` الذي أدخلته وقت الإنشاء، أو `null`."
              },
              "status": {
                "type": "string",
                "enum": [
                  "APPROVED",
                  "IN_REVIEW",
                  "DECLINED",
                  "AWAITING_USER"
                ],
                "description": "حالة المراقبة بعد التغيير."
              },
              "score": {
                "type": "integer",
                "description": "درجة المخاطر التراكمية الناتجة عن القواعد."
              },
              "severity": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "UNKNOWN",
                  "LOW",
                  "MEDIUM",
                  "HIGH",
                  "CRITICAL",
                  null
                ],
                "description": "شدة المخاطر، أو `null` حتى تحددها قاعدة أو مزود خدمة."
              },
              "amount": {
                "type": "string",
                "description": "مبلغ المعاملة كسلسلة عشرية. على عكس الـ API، لا تتم تسويته، لذا يمكنه حمل أصفار لاحقة (حتى 18 منزلة عشرية)."
              },
              "currency": {
                "type": "string",
                "description": "رمز العملة أو رمز أصل العملة المشفرة الخاص بـ `amount`."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "INBOUND",
                  "OUTBOUND"
                ],
                "description": "الاتجاه بالنسبة إلى الشخص المعني."
              },
              "action_required": {
                "type": "object",
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TransactionVerificationSessionAction"
                  },
                  {
                    "$ref": "#/components/schemas/TransactionWalletOwnershipAction"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "verification_session": "#/components/schemas/TransactionVerificationSessionAction",
                    "wallet_ownership": "#/components/schemas/TransactionWalletOwnershipAction"
                  }
                },
                "description": "إجراء المستخدم النهائي المعلق، أو `null`. نفس الكائن مثل `action_required` في المعاملة؛ `session_token` عبارة عن بيانات اعتماد، لذا لا تسجله في السجلات أبداً."
              }
            },
            "required": [
              "webhook_type",
              "transaction_id",
              "txn_id",
              "status",
              "score",
              "severity",
              "amount",
              "currency",
              "direction",
              "action_required"
            ]
          }
        ]
      },
      "TravelRuleStatusUpdatedEvent": {
        "description": "تغيرت حالة تبادل Travel Rule. يُرسل عند كل انتقال حتى `FINISHED` أو `CANCELLED` أو `EXPIRED` وبما يشملها، ولا يُرسل بعدها أبداً. يُرسل لتطبيقات بيئة الإنتاج، وكذلك، بالنسبة لتبادلات Travel Rule، لتطبيقات البيئة التجريبية أيضاً (`environment: sandbox`). لا توجد `status` على المستوى الأعلى.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "travel_rule.status.updated"
                ],
                "description": "دائماً `travel_rule.status.updated`."
              },
              "transaction_id": {
                "type": "string",
                "format": "uuid",
                "description": "المعاملة التي تنتمي إليها عملية التبادل."
              },
              "txn_id": {
                "type": "string",
                "nullable": true,
                "description": "معرّف `transaction_id` الذي أدخلته وقت الإنشاء، أو `null`."
              },
              "travel_rule_status": {
                "type": "string",
                "enum": [
                  "AWAITING_COUNTERPARTY",
                  "ON_HOLD",
                  "COMPLETED",
                  "FINISHED",
                  "CANCELLED",
                  "EXPIRED",
                  "COUNTERPARTY_MISMATCHED_DATA",
                  "COUNTERPARTY_VASP_NOT_FOUND",
                  "COUNTERPARTY_VASP_NOT_REACHABLE",
                  "UNCONFIRMED_OWNERSHIP",
                  "COUNTERPARTY_VASP_GENERAL_DECLINE",
                  "NOT_ENOUGH_COUNTERPARTY_DATA",
                  "NOT_APPLICABLE"
                ],
                "description": "حالة التبادل بعد التغيير."
              },
              "rail": {
                "type": "string",
                "enum": [
                  "",
                  "INTERNAL",
                  "TRP",
                  "GTR",
                  "TRUST",
                  "VERIFYVASP",
                  "SYGNA",
                  "EMAIL",
                  "TEST_VASP"
                ],
                "description": "الشبكة التي تعمل عليها منصة التبادل، أو سلسلة نصية فارغة في حال تعذر تحديدها. `TEST_VASP` هو تحويل في البيئة التجريبية استجاب له Didit Test VASP."
              },
              "test_vasp": {
                "type": "boolean",
                "description": "موجود وقيمته `true` فقط في تحويلات البيئة التجريبية التي رد عليها Didit Test VASP."
              },
              "test_vasp_scenario": {
                "type": "string",
                "description": "موجود فقط مع `test_vasp`: سيناريو البيئة التجريبية الذي حدد النتيجة، أو سلسلة نصية فارغة."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "INBOUND",
                  "OUTBOUND"
                ],
                "description": "اتجاه التحويل."
              }
            },
            "required": [
              "webhook_type",
              "transaction_id",
              "txn_id",
              "travel_rule_status",
              "rail",
              "direction"
            ]
          }
        ]
      },
      "WorkflowComplianceChangedEvent": {
        "description": "تغيّرت حالة الامتثال لسير عمل منشور بعد إعادة التقييم. حدث واحد لكل سير عمل. لا يوجد `status` على المستوى الأعلى.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "workflow.compliance_changed"
                ],
                "description": "دائماً `workflow.compliance_changed`."
              },
              "workflow_id": {
                "type": "string",
                "format": "uuid",
                "description": "سير العمل الذي تم تغييره."
              },
              "workflow_version": {
                "type": "integer",
                "description": "الإصدار الذي جرى تقييمه."
              },
              "workflow_label": {
                "type": "string",
                "nullable": true,
                "description": "اسم العرض لسير العمل."
              },
              "transition": {
                "type": "object",
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "enum": [
                      "compliant",
                      "gaps_detected",
                      "pending_change",
                      "unknown_coverage",
                      "not_evaluated"
                    ],
                    "description": "الحالة قبل إعادة التقييم."
                  },
                  "to": {
                    "type": "string",
                    "enum": [
                      "compliant",
                      "gaps_detected",
                      "pending_change",
                      "unknown_coverage",
                      "not_evaluated"
                    ],
                    "description": "الحالة بعد إعادة التقييم."
                  }
                }
              },
              "severity": {
                "type": "string",
                "enum": [
                  "actionable",
                  "indicative",
                  "informative"
                ],
                "description": "`actionable` عند اكتشاف فجوات، و`indicative` لتغيير معلق، و`informative` عند حل الفجوات."
              },
              "kb_version": {
                "type": "string",
                "description": "إصدار قاعدة المعرفة التنظيمية المستخدمة."
              }
            },
            "required": [
              "webhook_type",
              "workflow_id",
              "workflow_version",
              "workflow_label",
              "transition",
              "severity",
              "kb_version"
            ]
          }
        ]
      },
      "WebhookEventPayload": {
        "description": "نص تسليم webhook موقّع، يتم تمييزه بواسطة `webhook_type`. يمكن الاشتراك في `activity.created` ولكن لا يتم إرساله اليوم. تعامل مع أي `webhook_type` آخر كنوع حدث جديد واحتفظ بالنص الأصلي الخام.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/SessionStatusUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/SessionDataUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/UserStatusUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/UserDataUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/BusinessStatusUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/BusinessDataUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/TransactionCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/TransactionStatusUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/TravelRuleStatusUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/WorkflowComplianceChangedEvent"
          },
          {
            "$ref": "#/components/schemas/TransactionRuleSuggestionsCreatedEvent"
          }
        ],
        "discriminator": {
          "propertyName": "webhook_type",
          "mapping": {
            "status.updated": "#/components/schemas/SessionStatusUpdatedEvent",
            "data.updated": "#/components/schemas/SessionDataUpdatedEvent",
            "user.status.updated": "#/components/schemas/UserStatusUpdatedEvent",
            "user.data.updated": "#/components/schemas/UserDataUpdatedEvent",
            "business.status.updated": "#/components/schemas/BusinessStatusUpdatedEvent",
            "business.data.updated": "#/components/schemas/BusinessDataUpdatedEvent",
            "transaction.created": "#/components/schemas/TransactionCreatedEvent",
            "transaction.status.updated": "#/components/schemas/TransactionStatusUpdatedEvent",
            "travel_rule.status.updated": "#/components/schemas/TravelRuleStatusUpdatedEvent",
            "workflow.compliance_changed": "#/components/schemas/WorkflowComplianceChangedEvent",
            "transaction_rule_suggestions.created": "#/components/schemas/TransactionRuleSuggestionsCreatedEvent"
          }
        }
      },
      "KYBRegistrySearchResolvedCallback": {
        "type": "object",
        "description": "نص الاستدعاء المُرسل إلى `webhook_url` الخاص بـ `POST /v3/kyb/search/` بمجرد اكتمال البحث في السجل. هذا النص غير موقّع: يتضمن الطلب الرأس `X-Didit-Unsigned-Callback: true` ولا يحتوي على أي من رؤوس التوقيع، لذا تحقق منه بمطابقة `request_id` مع عملية بحث بدأتها أنت. يستخدم `event_type`، وليس `webhook_type`.",
        "required": [
          "event_id",
          "event_type",
          "request_id",
          "vendor_data",
          "metadata",
          "search_status",
          "search_resolved",
          "kyb_registry",
          "timestamp",
          "created_at"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الاستدعاء."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "kyb.registry_search.resolved"
            ],
            "description": "دائماً `kyb.registry_search.resolved`."
          },
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف `request_id` الذي تم إرجاعه بواسطة `POST /v3/kyb/search/`."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "تكرار لقيمة `vendor_data` التي أرسلتها."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "نسخة مطابقة من `metadata` التي أرسلتها."
          },
          "search_status": {
            "type": "string",
            "description": "دائماً `resolved` اليوم."
          },
          "search_resolved": {
            "type": "boolean",
            "description": "تكون القيمة `true` عندما تكون قيمة `search_status` هي `resolved`."
          },
          "kyb_registry": {
            "$ref": "#/components/schemas/KYBRegistrySearchResults"
          },
          "timestamp": {
            "type": "integer",
            "description": "توقيت Unix بالثواني الذي تم فيه إدراج الاستدعاء في قائمة الانتظار."
          },
          "created_at": {
            "type": "integer",
            "description": "توقيت Unix بالثواني الذي تم فيه إدراج الاستدعاء في قائمة الانتظار."
          }
        }
      },
      "AMLScreening": {
        "type": "object",
        "properties": {
          "node_id": {
            "type": "string",
            "description": "معرّف فريد لخطوة فحص AML هذه في مخطط سير العمل."
          },
          "status": {
            "type": "string",
            "description": "حالة مستوى الميزة لفحص AML هذا. مستقلة عن `status` الجلسة من المستوى الأعلى — يمكن أن تصل الجلسة إلى قرارها العام بينما تظل الميزة الفردية `In Review`.",
            "enum": [
              "Not Finished",
              "Approved",
              "Declined",
              "In Review",
              "Resub Requested"
            ]
          },
          "total_hits": {
            "type": "integer",
            "description": "العدد الإجمالي للتطابقات التي تم العثور عليها"
          },
          "entity_type": {
            "type": "string",
            "description": "نوع الكيان المفحوص: شخص أو شركة"
          },
          "hits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "معرّف Didit الثابت لنتيجة المطابقة: `hit_` متبوعاً بـ 24 حرفاً سداسياً عشرياً. يحتفظ الكيان المطابق نفسه بنفس `id` عند فحص الشخص المعني مرة أخرى. مرّره كـ `hit_id` إلى endpoints مراجعة نتائج مطابقة AML."
                },
                "url": {
                  "type": "string",
                  "format": "uri",
                  "description": "رابط المصدر للمطابقة"
                },
                "match": {
                  "type": "boolean",
                  "description": "ما إذا كان هذا تطابقاً مؤكداً"
                },
                "score": {
                  "type": "number",
                  "format": "float",
                  "nullable": true,
                  "minimum": 0,
                  "maximum": 1,
                  "description": "درجة التطابق المرجحة القديمة في النطاق 0-1 (مثل `0.73`). استخدم `match_score` (0-100) بدلاً منها.",
                  "deprecated": true
                },
                "target": {
                  "type": "boolean",
                  "nullable": true,
                  "description": "ما إذا كان الكيان المتطابق هو الهدف المباشر للإدراج (على عكس كونه طرفاً ذا صلة). وتكون `null` عندما لا يحدد المصدر ذلك."
                },
                "caption": {
                  "type": "string",
                  "description": "تسمية توضيحية أو عنوان للتطابق"
                },
                "datasets": {
                  "type": "array",
                  "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 (مع تحديد المستوى)، أو قواعد بيانات العقوبات، أو الأخبار السلبية، أو التحذيرات/إنفاذ القوانين التنظيمية، أو مجموعات بيانات الامتثال الأخرى. وتكون `Other Lists` عندما لا يحدد مصدر الكيان أيًا من هذه الفئات."
                },
                "features": {
                  "type": "object",
                  "nullable": true,
                  "description": "سمات إضافية للتطابق"
                },
                "rca_name": {
                  "type": "string",
                  "description": "اسم RCA إن وُجد"
                },
                "last_seen": {
                  "type": "string",
                  "format": "date-time",
                  "description": "تاريخ آخر ظهور للتطابق"
                },
                "risk_view": {
                  "type": "object",
                  "properties": {
                    "crimes": {
                      "type": "object",
                      "properties": {
                        "score": {
                          "type": "integer"
                        },
                        "weightage": {
                          "type": "integer"
                        },
                        "risk_level": {
                          "type": "string"
                        },
                        "risk_scores": {
                          "type": "object"
                        }
                      }
                    },
                    "countries": {
                      "type": "object",
                      "properties": {
                        "score": {
                          "type": "integer"
                        },
                        "weightage": {
                          "type": "integer"
                        },
                        "risk_level": {
                          "type": "string"
                        },
                        "risk_scores": {
                          "type": "object"
                        }
                      }
                    },
                    "categories": {
                      "type": "object",
                      "properties": {
                        "score": {
                          "type": "integer"
                        },
                        "weightage": {
                          "type": "integer"
                        },
                        "risk_level": {
                          "type": "string"
                        },
                        "risk_scores": {
                          "type": "object"
                        }
                      }
                    },
                    "custom_list": {
                      "type": "object"
                    }
                  }
                },
                "first_seen": {
                  "type": "string",
                  "format": "date-time",
                  "description": "تاريخ أول ظهور للتطابق"
                },
                "properties": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "alias": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "gender": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "height": {
                      "type": "string",
                      "nullable": true
                    },
                    "topics": {
                      "type": "string",
                      "nullable": true
                    },
                    "weight": {
                      "type": "string",
                      "nullable": true
                    },
                    "address": {
                      "type": "string",
                      "nullable": true
                    },
                    "country": {
                      "type": "string",
                      "nullable": true
                    },
                    "website": {
                      "type": "string",
                      "nullable": true
                    },
                    "eyeColor": {
                      "type": "string",
                      "nullable": true
                    },
                    "keywords": {
                      "type": "string",
                      "nullable": true
                    },
                    "lastName": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "position": {
                      "type": "string",
                      "nullable": true
                    },
                    "religion": {
                      "type": "string",
                      "nullable": true
                    },
                    "birthDate": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "education": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "ethnicity": {
                      "type": "string",
                      "nullable": true
                    },
                    "firstName": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "hairColor": {
                      "type": "string",
                      "nullable": true
                    },
                    "weakAlias": {
                      "type": "string",
                      "nullable": true
                    },
                    "birthPlace": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "modifiedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "wikidataId": {
                      "type": "string",
                      "nullable": true
                    },
                    "citizenship": {
                      "type": "string",
                      "nullable": true
                    },
                    "nationality": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "match_score": {
                  "type": "number",
                  "description": "درجة الثقة الموزونة بالهوية (0-100) المحسوبة من تشابه الأسماء وتاريخ الميلاد وتطابق الدولة. تُستخدم لتحديد ما إذا كان التطابق إيجابياً كاذباً أو تطابقاً محتملاً.",
                  "format": "float",
                  "nullable": true
                },
                "risk_score": {
                  "type": "number",
                  "description": "درجة مخاطر الكيان (0-100). تُستخدم لتحديد حالة AML النهائية (مقبولة/قيد المراجعة/مرفوضة) بناءً على أعلى risk_score بين التطابقات التي ليست إيجابية كاذبة."
                },
                "review_status": {
                  "type": "string",
                  "description": "حالة المراجعة لهذه النتيجة. يمكن أن تكون 'Unreviewed'، أو 'Confirmed Match'، أو 'False Positive'، أو 'Inconclusive'.",
                  "enum": [
                    "Unreviewed",
                    "Confirmed Match",
                    "False Positive",
                    "Inconclusive"
                  ]
                },
                "score_breakdown": {
                  "type": "object",
                  "description": "تفصيل دقيق لكيفية احتساب match_score.",
                  "properties": {
                    "name_score": {
                      "type": "integer",
                      "description": "النسبة المئوية الخام لتشابه الأسماء (0-100)."
                    },
                    "name_weight": {
                      "type": "integer",
                      "description": "الوزن الأصلي للاسم من التكوين (0-100)."
                    },
                    "name_weight_normalized": {
                      "type": "number",
                      "description": "الوزن المعياري للاسم بعد إعادة الترجيح بسبب البيانات المفقودة (0-100)."
                    },
                    "name_contribution": {
                      "type": "number",
                      "description": "النقاط التي ساهم بها الاسم في النتيجة الإجمالية."
                    },
                    "dob_score": {
                      "type": "integer",
                      "description": "درجة تطابق تاريخ الميلاد (-100 إلى 100)."
                    },
                    "dob_weight": {
                      "type": "integer",
                      "description": "الوزن الأصلي لتاريخ الميلاد من التكوين (0-100)."
                    },
                    "dob_weight_normalized": {
                      "type": "number",
                      "description": "الوزن المعياري لتاريخ الميلاد بعد إعادة الترجيح بسبب البيانات المفقودة (0-100)."
                    },
                    "dob_contribution": {
                      "type": "number",
                      "description": "النقاط التي ساهم بها تاريخ الميلاد في النتيجة الإجمالية."
                    },
                    "country_score": {
                      "type": "integer",
                      "description": "درجة تطابق الدولة (-100 إلى 100)."
                    },
                    "country_weight": {
                      "type": "integer",
                      "description": "الوزن الأصلي للدولة من التكوين (0-100)."
                    },
                    "country_weight_normalized": {
                      "type": "number",
                      "description": "الوزن المعياري للدولة بعد إعادة الترجيح بسبب البيانات المفقودة (0-100)."
                    },
                    "country_contribution": {
                      "type": "number",
                      "description": "النقاط التي ساهمت بها الدولة في النتيجة الإجمالية."
                    },
                    "document_number_match_type": {
                      "type": "string",
                      "description": "نتيجة تقييم \"Golden Key\" لرقم المستند.",
                      "enum": [
                        "MATCH",
                        "NEUTRAL",
                        "HARD_MISMATCH"
                      ]
                    },
                    "document_number_effect": {
                      "type": "string",
                      "description": "وصف سهل القراءة لتأثير رقم المستند على النتيجة."
                    },
                    "total_score": {
                      "type": "integer",
                      "description": "درجة التطابق المرجحة النهائية (0-100)."
                    }
                  }
                },
                "pep_matches": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "education": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "list_name": {
                        "type": "string"
                      },
                      "publisher": {
                        "type": "string"
                      },
                      "source_url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "description": {
                        "type": "string"
                      },
                      "matched_name": {
                        "type": "string"
                      },
                      "pep_position": {
                        "type": "string"
                      },
                      "date_of_birth": {
                        "type": "string"
                      },
                      "other_sources": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "place_of_birth": {
                        "type": "string"
                      }
                    }
                  }
                },
                "linked_entities": {
                  "type": "array",
                  "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"
                        }
                      }
                    }
                  }
                },
                "warning_matches": {
                  "type": "array",
                  "description": "قائمة بتطابقات التحذيرات وإنفاذ القوانين التنظيمية. تتضمن مدخلات من الفئات: Warning، و SIP، و Warnings and Regulatory Enforcement، و Fitness and Probity، و SIE، و Insolvency.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "list_name": {
                        "type": "string",
                        "description": "اسم جهة نشر قائمة التحذير"
                      },
                      "matched_name": {
                        "type": "string",
                        "description": "الاسم المتطابق في قائمة التحذير"
                      },
                      "description": {
                        "type": "string",
                        "description": "وصف قيد التحذير"
                      },
                      "publisher": {
                        "type": "string",
                        "description": "الناشر أو مصدر التحذير"
                      },
                      "source_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "رابط URL لمصدر التحذير"
                      },
                      "other_sources": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "عناوين URL إضافية للمصدر"
                      },
                      "countries": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "nullable": true,
                        "description": "الدول المرتبطة بالتحذير"
                      },
                      "created_at": {
                        "type": "string",
                        "nullable": true,
                        "description": "تاريخ إنشاء قيد التحذير"
                      },
                      "updated_at": {
                        "type": "string",
                        "nullable": true,
                        "description": "تاريخ آخر تحديث لقيد التحذير"
                      },
                      "additional_data": {
                        "type": "object",
                        "description": "بيانات إضافية من مصدر التحذير. قد تحتوي على كائن `data` مع مصفوفة `case_details`.",
                        "properties": {
                          "data": {
                            "type": "object",
                            "properties": {
                              "case_details": {
                                "type": "array",
                                "description": "تفاصيل حالات التحذير المرتبطة بهذا التطابق",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "case_type": {
                                      "type": "string",
                                      "description": "نوع حالة التحذير",
                                      "enum": [
                                        "Accusation",
                                        "Arrest",
                                        "Bribery",
                                        "Criminal",
                                        "Fraud",
                                        "Illegal Fundraising",
                                        "Non-conviction Terror",
                                        "Proclaimed Offender",
                                        "Regulatory Enforcement",
                                        "Terrorism",
                                        "Terrorism-related",
                                        "Terrorism-related listing"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "sanction_matches": {
                  "type": "array",
                  "description": "قائمة بتطابقات قوائم العقوبات التي تم العثور عليها لهذا الكيان.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "list_name": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "nullable": true,
                        "description": "اسم (أو أسماء) قائمة (أو قوائم) العقوبات"
                      },
                      "matched_name": {
                        "type": "string",
                        "description": "الاسم المتطابق في قائمة العقوبات"
                      },
                      "description": {
                        "type": "string",
                        "description": "وصف قيد العقوبات"
                      },
                      "reason": {
                        "type": "string",
                        "nullable": true,
                        "description": "سبب فرض العقوبات على الكيان بنص حر. مجمّع من إدخالات الأسباب في قائمة العقوبات. أمثلة: 'Executive Order 13224 (Terrorism)'، و'Support for actions undermining Ukraine's sovereignty'، و'Listed due to national security concerns.'"
                      },
                      "source_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "رابط URL لمصدر العقوبة"
                      },
                      "other_sources": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "عناوين URL إضافية للمصدر"
                      },
                      "details": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "تفاصيل إضافية حول العقوبة"
                      },
                      "legal_basis": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "الأساس القانوني للعقوبة"
                      },
                      "listed_on": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "nullable": true,
                        "description": "تاريخ (تواريخ) إدراج الكيان"
                      },
                      "sanction_list": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "nullable": true,
                        "description": "معرّف (معرّفات) قائمة العقوبات"
                      },
                      "sanction_program": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "برنامج (برامج) العقوبات التي أُدرج الكيان ضمنها"
                      },
                      "sanctioning_authority": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "الجهة/الجهات التي فرضت العقوبة"
                      },
                      "updated_on": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "تاريخ (أو تواريخ) آخر تحديث لبيانات قيد العقوبات"
                      },
                      "additional_data": {
                        "type": "object",
                        "description": "بيانات إضافية من مصدر العقوبات لم يتم التقاطها في الحقول الرئيسية"
                      }
                    }
                  }
                },
                "adverse_media_details": {
                  "type": "object",
                  "properties": {
                    "sentiment": {
                      "type": "string"
                    },
                    "entity_type": {
                      "type": "string"
                    },
                    "sentiment_score": {
                      "type": "integer"
                    },
                    "adverse_keywords": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      }
                    }
                  }
                },
                "adverse_media_matches": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "country": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "headline": {
                        "type": "string"
                      },
                      "sentiment": {
                        "type": "string"
                      },
                      "thumbnail": {
                        "type": "string",
                        "format": "uri"
                      },
                      "source_url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "author_name": {
                        "type": "string",
                        "nullable": true
                      },
                      "other_sources": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "adverse_keywords": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "sentiment_score": {
                        "type": "integer"
                      },
                      "publication_date": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  }
                },
                "additional_information": {
                  "type": "object"
                }
              }
            }
          },
          "score": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "درجة فحص AML الإجمالية — أعلى درجة مخاطر عبر جميع النتائج المتطابقة (عدد عشري float، 0-100). تكون `null` حتى يتم حسابها."
          },
          "screened_data": {
            "type": "object",
            "properties": {
              "full_name": {
                "type": "string"
              },
              "nationality": {
                "type": "string"
              },
              "date_of_birth": {
                "type": "string",
                "format": "date"
              },
              "document_number": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "is_ongoing_monitoring_enabled": {
            "type": "boolean",
            "description": "ما إذا كانت مراقبة AML المستمرة مُمكّنة لهذا الفحص. عندما تكون `true`، يُعاد فحص الكيان دورياً وتُحدّث أي نتائج مطابقة جديدة التقرير."
          },
          "next_ongoing_monitoring_bill_date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "التاريخ (YYYY-MM-DD) الذي ستتم فيه فوترة اشتراك المراقبة المستمرة هذا في المرة القادمة. يُحسب كتاريخ آخر فوترة للمراقبة المستمرة بالإضافة إلى 365 يوماً عندما يكون `is_ongoing_monitoring_enabled = true`؛ وخلاف ذلك `null`. هذا تاريخ فوترة، وليس تاريخ فحص - استخدم `last_ongoing_screening_at` لذلك."
          },
          "last_ongoing_screening_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت آخر اكتمال لإعادة فحص هذا السجل بواسطة المراقبة المستمرة، سواء تغيرت النتيجة أم لا. تكون القيمة `null` إذا لم تتم إعادة فحص السجل مطلقاً؛ ولا يتم ملؤها بأثر رجعي من تاريخ التفعيل أو تاريخ الفوترة."
          },
          "last_ongoing_screening_datasets_updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "أحدث تاريخ لتحديث مجموعة بيانات AML أبلغ عنه المزود في وقت ذلك الفحص. تكون القيمة `null` عندما لم يُبلغ المزود عن أي تواريخ لمجموعات البيانات؛ ولا يتم تقديرها نهائياً."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "feature": {
                  "type": "string",
                  "enum": [
                    "ID_VERIFICATION",
                    "NFC",
                    "LIVENESS",
                    "FACEMATCH",
                    "PROOF_OF_ADDRESS",
                    "PHONE",
                    "EMAIL",
                    "AML",
                    "LOCATION",
                    "DATABASE_VALIDATION",
                    "QUESTIONNAIRE",
                    "DOCUMENT_AI",
                    "KYB_REGISTRY",
                    "KYB_DOCUMENTS",
                    "KYB_KEY_PEOPLE",
                    "GEOLOCATION",
                    "SIGNATURE"
                  ],
                  "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. في فحص AML يكون هذا عادةً `AML`، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                },
                "risk": {
                  "type": "string"
                },
                "additional_data": {
                  "type": "object",
                  "nullable": true
                },
                "log_type": {
                  "type": "string"
                },
                "short_description": {
                  "type": "string"
                },
                "long_description": {
                  "type": "string"
                },
                "node_id": {
                  "type": "string",
                  "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                }
              }
            }
          }
        }
      },
      "MonitoringEvent": {
        "type": "object",
        "description": "حدث مراقبة مخزّن واحد كما تُرجعه endpoints الخاصة بالقائمة والجدول الزمني للشخص المعني. لا تُرجع الأدلة المقيدة (payload، وسياق الجهاز، وأدلة القاعدة) إلا عبر `GET /v3/events/{event_uuid}/`.",
        "required": [
          "event_uuid",
          "event_id",
          "event_category",
          "action_type",
          "occurred_at",
          "received_at",
          "status",
          "score",
          "subject_vendor_data",
          "subject_entity_type",
          "subject_uuid",
          "counterparty_vendor_data",
          "session_id",
          "device_fingerprint",
          "ip_address",
          "ip_country",
          "amount",
          "currency",
          "game_id",
          "round_id",
          "bonus_id",
          "affiliate_code",
          "payment_reference_id",
          "retention_class",
          "rules_matched_count",
          "correlation_pending",
          "is_droppable"
        ],
        "properties": {
          "event_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف Didit للحدث. استخدمه كـ `{event_uuid}` في استدعاءات الجلب والحذف."
          },
          "event_id": {
            "type": "string",
            "maxLength": 128,
            "description": "المعرّف الخاص بك، وهو مفتاح الـ idempotency الذي أرسلته."
          },
          "event_category": {
            "type": "string",
            "enum": [
              "auth",
              "session",
              "gameplay",
              "bonus",
              "affiliate",
              "payment",
              "dispute",
              "security",
              "responsible_gambling",
              "custom"
            ],
            "description": "فئة الحدث."
          },
          "action_type": {
            "type": "string",
            "maxLength": 128,
            "description": "ما حدث ضمن الفئة، كما أرسلته."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت وقوع الحدث من جانبك."
          },
          "received_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت قبول Didit للحدث."
          },
          "status": {
            "type": "string",
            "enum": [
              "ACCEPTED",
              "APPROVED",
              "IN_REVIEW",
              "DECLINED"
            ],
            "description": "`ACCEPTED`: تم التخزين، ولم تُغير أي قاعدة مطابقة وضعه (وهي الاستجابة العادية لمعظم الأحداث، ودائماً ما تكون الاستجابة في تطبيق البيئة التجريبية، حيث لا يتم تشغيل أي قواعد). `APPROVED`: تطابقت قاعدة وبقيت الدرجة أقل من حد المراجعة الخاص بك. `IN_REVIEW`: رفعت قاعدةٌ الدرجةَ فوق حد المراجعة أو قامت بتعيين الحالة. `DECLINED`: رفضته قاعدةٌ أو تجاوزت الدرجةُ حد الرفض الخاص بك."
          },
          "score": {
            "type": "integer",
            "description": "درجة القاعدة المتراكمة. تبدأ من 0؛ وتغيرها إجراءات `add_score` للقاعدة (يُسمح بفروق سالبة)."
          },
          "subject_vendor_data": {
            "type": "string",
            "maxLength": 255,
            "description": "`subject.vendor_data` للحدث: معرّفك الخاص بالمستخدم أو الشركة."
          },
          "subject_entity_type": {
            "type": "string",
            "description": "`individual` أو `company`: نوع الكيان الذي يحدده `subject_vendor_data`.",
            "example": "individual"
          },
          "subject_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "معرّف UUID للمستخدم (الفرد) أو الشركة التي انتهى إليها الحدث، أو null إذا لم يعد هذا السجل موجودًا."
          },
          "counterparty_vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "الطرف الآخر في حدث P2P (تمت ترقيته من `payload.counterparty_vendor_data`).",
            "maxLength": 255
          },
          "session_id": {
            "type": "string",
            "nullable": true,
            "description": "`session.session_id` المُرسل مع الحدث.",
            "maxLength": 255
          },
          "device_fingerprint": {
            "type": "string",
            "nullable": true,
            "description": "`device_context.fingerprint` المُرسلة مع الحدث.",
            "maxLength": 255
          },
          "ip_address": {
            "type": "string",
            "nullable": true,
            "description": "عنوان IP للحدث. في مسار الخادم يكون هذا `device_context.network_context.ip_address` كما أرسلته؛ وفي مسار الجهاز يكون هو عنوان IP الخاص بالطلب.",
            "maxLength": 64
          },
          "ip_country": {
            "type": "string",
            "nullable": true,
            "description": "رمز الدولة لـ `ip_address` من إثراء عنوان IP، أو null إذا لم يتم إثراء العنوان (لأنه مفقود أو خاص، أو لأن بيانات القياس عن بُعد منخفضة القيمة ولم يكن العنوان معروفاً مسبقاً).",
            "example": "ES"
          },
          "amount": {
            "type": "string",
            "nullable": true,
            "description": "المبلغ كسلسلة عشرية تتضمن 18 خانة عشرية، من `transaction_context.amount` أو `payload.amount` أو `payload.stake_amount`، بهذا الترتيب.",
            "example": "250.000000000000000000"
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "العملة من `transaction_context.currency` أو `payload.currency`.",
            "maxLength": 10
          },
          "game_id": {
            "type": "string",
            "nullable": true,
            "description": "تمت ترقيته من `payload.game_id`.",
            "maxLength": 128
          },
          "round_id": {
            "type": "string",
            "nullable": true,
            "description": "تمت ترقيته من `payload.round_id`.",
            "maxLength": 128
          },
          "bonus_id": {
            "type": "string",
            "nullable": true,
            "description": "تمت ترقيته من `payload.bonus_id`.",
            "maxLength": 128
          },
          "affiliate_code": {
            "type": "string",
            "nullable": true,
            "description": "تمت ترقيته من `payload.affiliate_code`.",
            "maxLength": 128
          },
          "payment_reference_id": {
            "type": "string",
            "nullable": true,
            "description": "مرجع الدفع من `transaction_context.payment_reference_id` أو `payload.payment_reference_id`.",
            "maxLength": 255
          },
          "retention_class": {
            "type": "string",
            "enum": [
              "low_value",
              "standard",
              "risk_relevant",
              "monetary_or_compliance"
            ],
            "description": "فئة الاحتفاظ. أحداث الدفع والنزاعات هي `monetary_or_compliance`؛ وأحداث الأمان والمقامرة المسؤولة هي `risk_relevant`؛ وأحداث `session.page_view` و`session.sdk_heartbeat` و`session.sdk_loaded` و`session.device_seen` و`session.bot_signal_observed` و`bonus.promotion_viewed` و`affiliate.referral_clicked` هي `low_value`؛ وكل ما عدا ذلك هو `standard`. تتم ترقية الحدث الذي تطابق مع قاعدة نشطة إلى `risk_relevant` (ولا يتم خفضه أبداً)."
          },
          "rules_matched_count": {
            "type": "integer",
            "minimum": 0,
            "description": "عدد القواعد التي طابقت الحدث، بما في ذلك القواعد في وضع `TEST` (التي تسجل الأدلة ولكن لا تطبق أي إجراءات)."
          },
          "correlation_pending": {
            "type": "boolean",
            "description": "تكون `true` طالما أن هناك قاعدة غير متزامنة (ربط بين الكيانات، أو تسلسل أطول من 24 ساعة) لا يزال يتعين تشغيلها لهذا الحدث. يتم حسمها في غضون دقائق ويتم تحديث `status` و`score` و`rules_matched_count` في مكانها."
          },
          "is_droppable": {
            "type": "boolean",
            "description": "ما إذا كان بإمكان SDK تحت الضغط العكسي إسقاط أحداث من هذا النوع. تكون `false` لكل حدث من أحداث `security` و`payment` و`dispute` و`responsible_gambling` ولأحداث `gameplay.bet_placed` و`gameplay.bet_settled` و`gameplay.p2p_settlement`."
          }
        }
      },
      "MonitoringEventDetail": {
        "description": "حدث مراقبة واحد مع الغلاف الكامل الخاص به، وبيانات الإثراء وأدلة القواعد. يحتوي على كل حقول `MonitoringEvent` بالإضافة إلى الحقول أدناه.",
        "allOf": [
          {
            "$ref": "#/components/schemas/MonitoringEvent"
          },
          {
            "type": "object",
            "required": [
              "payload",
              "custom_values",
              "device_context",
              "field_sources",
              "session_sequence",
              "table_id",
              "hand_id",
              "match_id",
              "market_id",
              "side",
              "role",
              "net_result_amount",
              "payment_fingerprint",
              "instrument_reference_hash",
              "withdrawal_address_hash",
              "dispute_id",
              "chargeback_id",
              "changed_field",
              "identity_match_ref",
              "schema_version",
              "expires_at",
              "rules_evaluated_count",
              "rule_runs",
              "ip_enrichment",
              "subject_profile",
              "tags"
            ],
            "properties": {
              "payload": {
                "type": "object",
                "additionalProperties": true,
                "description": "حقول الفئة التي أرسلتها في `payload`."
              },
              "custom_values": {
                "type": "object",
                "additionalProperties": true,
                "description": "قيم `custom_values` المفردة التي أرسلتها. يضيف Didit القيمة `vpn_or_proxy_detected: true` أو `is_data_center: true` عندما يضع إثراء عنوان IP علامة تنبيه على العنوان ولم تقم بتعيين أيٍّ منهما."
              },
              "device_context": {
                "type": "object",
                "additionalProperties": true,
                "description": "سياق الجهاز كما تم تخزينه: `device_context` الخاص بك (بما في ذلك `fingerprint` و`persistent_device_id` و`bot_score` عند إرسالها) مع إكمال `network_context` عبر إثراء عنوان IP (`ip_country` و`ip_country_code` و`ip_city` و`asn_number` و`asn_organization` و`is_vpn_or_tor` و`is_data_center` و`proxy_type` و`connection_type`) للمفاتيح التي تركتها فارغة."
              },
              "field_sources": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "enum": [
                    "customer",
                    "sdk",
                    "server"
                  ]
                },
                "description": "مسار الحقل الخاص بمصدره: `customer` (أرسله خادمك الخلفي)، أو `sdk` (أُرسل عبر مسار الجهاز)، أو `server` (مشتق بواسطة Didit، مثل `received_at` وحقول الشبكة المعززة). تحقق منه قبل اتخاذ إجراء بناءً على التطابق."
              },
              "session_sequence": {
                "type": "integer",
                "format": "int64",
                "nullable": true,
                "description": "`session.sequence` المُرسل مع الحدث."
              },
              "table_id": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.table_id`.",
                "maxLength": 128
              },
              "hand_id": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.hand_id`.",
                "maxLength": 128
              },
              "match_id": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.match_id`.",
                "maxLength": 128
              },
              "market_id": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.market_id`.",
                "maxLength": 128
              },
              "side": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.side`.",
                "maxLength": 64
              },
              "role": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.role`.",
                "maxLength": 64
              },
              "net_result_amount": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.net_result_amount`، كسلسلة عشرية بـ 18 منزلة عشرية.",
                "example": "-120.000000000000000000"
              },
              "payment_fingerprint": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.payment_fingerprint`.",
                "maxLength": 255
              },
              "instrument_reference_hash": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.instrument_reference_hash`.",
                "maxLength": 255
              },
              "withdrawal_address_hash": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.withdrawal_address_hash` (أو `payload.destination_reference_hash`).",
                "maxLength": 255
              },
              "dispute_id": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.dispute_id`.",
                "maxLength": 255
              },
              "chargeback_id": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.chargeback_id`.",
                "maxLength": 255
              },
              "changed_field": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.changed_field` (أحداث التغيير الأمني).",
                "maxLength": 128
              },
              "identity_match_ref": {
                "type": "string",
                "nullable": true,
                "description": "تمت ترقيته من `payload.identity_match_ref` (تطابقات سجل المقامرة المسؤولة).",
                "maxLength": 255
              },
              "schema_version": {
                "type": "integer",
                "description": "إصدار مخطط غلاف الحدث. حالياً `1`.",
                "example": 1
              },
              "expires_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت انتهاء صلاحية الحدث بموجب فئة الاحتفاظ به وحذفه: `occurred_at` مضافاً إليه مدة الفئة (14 أو 30 أو 90 يوماً بشكل افتراضي، قابلة للتعديل لكل تطبيق). القيمة Null لأحداث `monetary_or_compliance`، والتي تتبع سياسة الاحتفاظ بالمعاملات."
              },
              "rules_evaluated_count": {
                "type": "integer",
                "minimum": 0,
                "description": "عدد قواعد الأحداث التي تم تقييمها لهذا الحدث."
              },
              "rule_runs": {
                "type": "array",
                "description": "كل قاعدة تطابقت مع الحدث، الأحدث أولاً.",
                "items": {
                  "$ref": "#/components/schemas/MonitoringEventRuleRun"
                }
              },
              "ip_enrichment": {
                "type": "object",
                "nullable": true,
                "description": "إثراء عنوان IP الخاص بالحدث، أو null عندما لا يتم إثراء العنوان. راجع [إثراء IP](https://docs.didit.me/ar/transaction-monitoring/ip-enrichment).",
                "properties": {
                  "ip_country_code": {
                    "type": "string",
                    "nullable": true,
                    "description": "رمز الدولة للعنوان."
                  },
                  "ip_city": {
                    "type": "string",
                    "nullable": true,
                    "description": "مدينة العنوان."
                  },
                  "asn_number": {
                    "type": "integer",
                    "nullable": true,
                    "description": "رقم النظام المستقل."
                  },
                  "asn_organization": {
                    "type": "string",
                    "nullable": true,
                    "description": "المؤسسة التي تشغّل النظام المستقل."
                  },
                  "is_vpn_or_tor": {
                    "type": "boolean",
                    "description": "ما إذا كان العنوان عقدة خروج VPN أو Tor معروفة."
                  },
                  "is_data_center": {
                    "type": "boolean",
                    "description": "ما إذا كان العنوان ينتمي إلى شبكة استضافة أو مركز بيانات."
                  },
                  "proxy_type": {
                    "type": "string",
                    "nullable": true,
                    "description": "تصنيف البروكسي للعنوان كسلسلة مبهمة، أو null."
                  },
                  "last_enriched_at": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "description": "وقت آخر إثراء للعنوان."
                  }
                },
                "required": [
                  "ip_country_code",
                  "ip_city",
                  "asn_number",
                  "asn_organization",
                  "is_vpn_or_tor",
                  "is_data_center",
                  "proxy_type",
                  "last_enriched_at"
                ]
              },
              "subject_profile": {
                "type": "object",
                "nullable": true,
                "description": "إشارات مخاطر البريد الإلكتروني والهاتف المخزنة مؤقتاً للهدف، أو null في حال عدم وجود ملف تعريف للهدف.",
                "properties": {
                  "email_risk_score": {
                    "type": "integer",
                    "nullable": true,
                    "description": "درجة مخاطر البريد الإلكتروني."
                  },
                  "email_deliverability": {
                    "type": "string",
                    "nullable": true,
                    "description": "قرار قابلية تسليم البريد الإلكتروني."
                  },
                  "email_is_disposable": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "ما إذا كان عنوان البريد الإلكتروني مؤقتاً."
                  },
                  "email_is_breached": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "ما إذا كان عنوان البريد الإلكتروني يظهر في اختراقات بيانات معروفة."
                  },
                  "email_social_count": {
                    "type": "integer",
                    "nullable": true,
                    "description": "عدد الحسابات عبر الإنترنت المرتبطة بعنوان البريد الإلكتروني."
                  },
                  "email_social_providers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "أسماء الخدمات عبر الإنترنت التي عُثر فيها على حساب مرتبط بعنوان البريد الإلكتروني."
                  },
                  "phone_risk_score": {
                    "type": "integer",
                    "nullable": true,
                    "description": "درجة مخاطر الهاتف."
                  },
                  "phone_line_type": {
                    "type": "string",
                    "nullable": true,
                    "description": "نوع خط الهاتف."
                  },
                  "phone_carrier": {
                    "type": "string",
                    "nullable": true,
                    "description": "اسم شركة الاتصالات المشغلة للهاتف."
                  },
                  "phone_social_count": {
                    "type": "integer",
                    "nullable": true,
                    "description": "عدد الحسابات عبر الإنترنت المرتبطة برقم الهاتف."
                  },
                  "phone_social_providers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "أسماء الخدمات عبر الإنترنت التي عُثر فيها على حساب مرتبط برقم الهاتف."
                  },
                  "source_provider": {
                    "type": "string",
                    "nullable": true,
                    "description": "معرّف مبهم لمصدر الملف التعريفي."
                  },
                  "last_enriched_at": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "description": "متى تم تحديث الملف التعريفي آخر مرة."
                  }
                },
                "required": [
                  "email_risk_score",
                  "email_deliverability",
                  "email_is_disposable",
                  "email_is_breached",
                  "email_social_count",
                  "email_social_providers",
                  "phone_risk_score",
                  "phone_line_type",
                  "phone_carrier",
                  "phone_social_count",
                  "phone_social_providers",
                  "source_provider",
                  "last_enriched_at"
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "أسماء الوسوم المرفقة بالحدث (إجراءات `add_tags` للقاعدة)."
              }
            }
          }
        ]
      },
      "MonitoringEventRuleRun": {
        "type": "object",
        "properties": {
          "rule_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID لقاعدة مراقبة المعاملات."
          },
          "rule_title": {
            "type": "string",
            "description": "عنوان القاعدة."
          },
          "library_key": {
            "type": "string",
            "nullable": true,
            "description": "مفتاح المكتبة عندما يتم تثبيت القاعدة من مكتبة القواعد، وإلا يكون null."
          },
          "matched": {
            "type": "boolean",
            "description": "دائماً `true`: يتم تسجيل عمليات التشغيل المتطابقة فقط."
          },
          "mode": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "TEST"
            ],
            "description": "وضع القاعدة عند تشغيلها. يسجل التشغيل في وضع `TEST` الأدلة ولكنه لا يطبق أي إجراءات."
          },
          "is_async": {
            "type": "boolean",
            "description": "تكون `true` عندما يأتي التشغيل من مرحلة الربط غير المتزامنة بدلاً من طلب إدخال البيانات."
          },
          "severity": {
            "type": "string",
            "nullable": true,
            "enum": [
              "UNKNOWN",
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL",
              null
            ],
            "description": "مستوى خطورة القاعدة. يكون Null لعمليات التشغيل `TEST` وللقواعد التي لا تملك مستوى خطورة."
          },
          "score_delta": {
            "type": "integer",
            "description": "مقدار التغيير الذي أحدثه هذا التشغيل في درجة الحدث (0 لعمليات التشغيل من نوع `TEST`)."
          },
          "action_summary": {
            "type": "string",
            "nullable": true,
            "description": "ملخص قصير للإجراءات المطبقة، على سبيل المثال `score +40; add_tag:VPN_LOGIN`. يكون null عندما لا يتم تطبيق أي شيء."
          },
          "matched_payload": {
            "type": "array",
            "description": "الشروط والتجميعات المتطابقة. تحمل مدخلات الشروط `field` و`operator` و`expected_value` و`current_value` و`matched` و`group_index` و`group_logic` و`field_source` (`server` أو `sdk` أو `customer`)؛ وتحمل مدخلات التجميع `metric` و`field` و`operator` و`expected_value` و`computed_value` و`window` و`filters` و`matched` و`sample_references`.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى تم تسجيل تشغيل القاعدة."
          }
        },
        "required": [
          "rule_uuid",
          "rule_title",
          "library_key",
          "matched",
          "mode",
          "is_async",
          "severity",
          "score_delta",
          "action_summary",
          "matched_payload",
          "created_at"
        ]
      },
      "MonitoringEventPage": {
        "type": "object",
        "description": "صفحة واحدة من أحداث المراقبة، الأحدث في `occurred_at` أولاً.",
        "required": [
          "count",
          "next",
          "previous",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "عدد الأحداث المتطابقة، دقيق حتى 100 ويقتصر على 100 كحد أقصى بعد ذلك. لا تحسب عدد الصفحات بناءً عليه؛ اتبع `next` حتى تصبح null."
          },
          "next": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط URL للصفحة التالية، أو null في الصفحة الأخيرة."
          },
          "previous": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط URL للصفحة السابقة، أو null في الصفحة الأولى."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringEvent"
            }
          }
        }
      },
      "MonitoringEventCreateRequest": {
        "type": "object",
        "description": "غلاف الحدث (envelope)، وهو متطابق لكل فئة. تُقبل الأسماء البديلة بصيغة camelCase: `eventId`، و`eventCategory` (أو `category`)، و`actionType`، و`occurredAt`، و`timeZone` (أو `zoneId`)، و`deviceContext` (أو `device`)، و`transactionContext`، و`customValues` (أو `props`)؛ وداخل `subject`: `vendorData`، و`entityType`، و`fullName`؛ وداخل `session`: `sessionId`، و`pageUrl`؛ وداخل `transaction_context`: `paymentReferenceId`.",
        "required": [
          "event_id",
          "event_category",
          "action_type",
          "occurred_at",
          "subject"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "maxLength": 128,
            "description": "المعرّف الخاص بك للحدث، ويكون فريداً لكل تطبيق. إنه مفتاح idempotency: إعادة إرسال نفس `event_category` و`action_type` و`occurred_at` و`subject.vendor_data` و`payload` تحته تُعد إعادة تشغيل، وأي اختلاف يُعد تعارضاً.",
            "example": "login-2026-10-17-000001"
          },
          "event_category": {
            "type": "string",
            "enum": [
              "auth",
              "session",
              "gameplay",
              "bonus",
              "affiliate",
              "payment",
              "dispute",
              "security",
              "responsible_gambling",
              "custom"
            ],
            "description": "فئة الحدث.",
            "example": "auth"
          },
          "action_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "ما حدث ضمن الفئة. مفردات مفتوحة؛ تتيح الإجراءات المُدارة المدرجة في [استيعاب الأحداث](https://docs.didit.me/ar/transaction-monitoring/events) (على سبيل المثال `login` و`deposit_completed` و`chargeback_opened`) التحقق من النوع وحقول القواعد المُدارة. يتم اقتطاع المسافات البيضاء في البداية والنهاية.",
            "example": "login"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت وقوع الحدث من جانبك، بتنسيق ISO 8601 (أي قيمة بدون فارق زمني تُقرأ على أنها UTC). يجب ألا يزيد عمره على 7 أيام في الماضي وألا يتجاوز 5 دقائق في المستقبل.",
            "example": "2026-10-17T09:15:02.481Z"
          },
          "time_zone": {
            "type": "string",
            "nullable": true,
            "maxLength": 64,
            "description": "المنطقة الزمنية لحدوث الواقعة من جانبك، على سبيل المثال `Europe/Madrid`. يتم تخزينها مع الحدث؛ ولا تُرجعها endpoint الخاصة بالقراءة."
          },
          "subject": {
            "type": "object",
            "description": "المستخدم أو الشركة التي ينتمي إليها الحدث. ويُحدَّد بالمستخدم (أو الشركة) التي تملك `vendor_data` هذه في تطبيقك؛ ويتم إنشاء واحد عند عدم وجوده.",
            "required": [
              "vendor_data"
            ],
            "properties": {
              "vendor_data": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "المعرّف الخاص بك للكيان.",
                "example": "user-42"
              },
              "entity_type": {
                "type": "string",
                "maxLength": 32,
                "default": "individual",
                "description": "يحلّ `company` الموضوع إلى شركة؛ وأي قيمة أخرى (الافتراضية `individual`) تحلّه إلى فرد. يمكن لنفس `vendor_data` تسمية واحد من كل منهما.",
                "example": "individual"
              },
              "full_name": {
                "type": "string",
                "nullable": true,
                "maxLength": 512,
                "description": "اسم العرض، يُستخدم فقط عندما يُنشئ هذا الحدث المستخدم أو الشركة."
              },
              "email": {
                "type": "string",
                "format": "email",
                "nullable": true,
                "description": "تم التحقق من صحته كعنوان بريد إلكتروني؛ ولا يتم تخزينه في الحدث."
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "maxLength": 32,
                "description": "تم التحقق من صحته؛ ولا يتم تخزينه في الحدث."
              },
              "country": {
                "type": "string",
                "nullable": true,
                "maxLength": 3,
                "description": "تم التحقق من صحته؛ ولا يتم تخزينه في الحدث."
              }
            }
          },
          "business": {
            "type": "object",
            "description": "الشركة التي ينتمي إليها الحدث، عندما تختلف عن الكيان المعني. تُقرأ `vendor_data` فقط.",
            "additionalProperties": true,
            "properties": {
              "vendor_data": {
                "type": "string",
                "maxLength": 255,
                "description": "المعرّف الخاص بك للشركة. يمكن تصفيته كـ `business_vendor_data`.",
                "example": "merchant-7"
              }
            }
          },
          "session": {
            "type": "object",
            "description": "سياق الجلسة الخاص بك للحدث.",
            "properties": {
              "session_id": {
                "type": "string",
                "nullable": true,
                "maxLength": 255,
                "description": "معرّف الجلسة الخاص بك. قابل للتصفية ويُعاد كـ `session_id`."
              },
              "sequence": {
                "type": "integer",
                "nullable": true,
                "description": "موضع الحدث داخل الجلسة. يُرجع كـ `session_sequence`."
              },
              "page_url": {
                "type": "string",
                "nullable": true,
                "maxLength": 2048,
                "description": "تم التحقق من صحته؛ ولا يتم تخزينه في الحدث."
              },
              "referrer": {
                "type": "string",
                "nullable": true,
                "maxLength": 2048,
                "description": "تم التحقق من صحته؛ ولا يتم تخزينه في الحدث."
              }
            }
          },
          "device_context": {
            "type": "object",
            "additionalProperties": true,
            "description": "سياق الجهاز والشبكة، يُخزن كما تم إرساله ويُرجع بواسطة `GET /v3/events/{event_uuid}/`. في مسار الخادم هذا، لا ترى Didit اتصال المستخدم النهائي، لذا فإن عنوان IP المُثرى والمُستخدم بواسطة القواعد هو `network_context.ip_address` كما ترسله أنت.",
            "properties": {
              "fingerprint": {
                "type": "string",
                "maxLength": 255,
                "description": "بصمة الجهاز. قابلة للتصفية كـ `device_fingerprint`."
              },
              "persistent_device_id": {
                "type": "string",
                "maxLength": 255,
                "description": "معرّف جهازك الدائم."
              },
              "bot_score": {
                "type": "integer",
                "description": "درجة البوت من نظام الكشف الخاص بك، كعدد صحيح."
              },
              "network_context": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "ip_address": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "عنوان IP الخاص بالمستخدم النهائي. يتم إثراء العناوين العامة مرة واحدة لكل عنوان فريد.",
                    "example": "203.0.113.42"
                  }
                }
              }
            }
          },
          "transaction_context": {
            "type": "object",
            "description": "سياق الأموال. تلبي القيم غير الفارغة هنا أيضاً مفاتيح payload المطلوبة للإجراء.",
            "properties": {
              "amount": {
                "type": "string",
                "nullable": true,
                "description": "المبلغ كسلسلة عشرية (يُقبل أيضاً كرقم).",
                "example": "1000.00"
              },
              "currency": {
                "type": "string",
                "nullable": true,
                "maxLength": 10,
                "description": "رمز العملة."
              },
              "direction": {
                "type": "string",
                "nullable": true,
                "maxLength": 16,
                "description": "اتجاه حركة الأموال، على سبيل المثال `inbound` أو `outbound`."
              },
              "payment_reference_id": {
                "type": "string",
                "nullable": true,
                "maxLength": 255,
                "description": "مرجع الدفع الخاص بك. يمكن تصفيته كـ `payment_reference_id`."
              }
            }
          },
          "payload": {
            "type": "object",
            "additionalProperties": true,
            "description": "حقول النطاق الخاصة بالفئة، بحد أقصى 16384 بايت بمجرد ترميزها بتنسيق JSON. تتطلب بعض الإجراءات مفاتيح (في `payload` أو `transaction_context`): يتطلب `gameplay.p2p_settlement` كلاً من `game_id` و`counterparty_vendor_data` و`stake_amount` و`net_result_amount` و`role` وواحداً من `hand_id` أو `round_id` أو `match_id`؛ ويتطلب `gameplay.bet_placed` و`gameplay.bet_settled` المعرّف `game_id`؛ ويتطلب `payment.deposit_initiated` و`payment.deposit_completed` و`payment.withdrawal_requested` و`payment.withdrawal_completed` كلاً من `payment_reference_id` و`amount` و`currency` و`payment_method` و`status`؛ ويتطلب `payment.withdrawal_address_changed` المعرّف `withdrawal_address_hash`؛ ويتطلب `dispute.chargeback_opened` و`dispute.chargeback_won` و`dispute.chargeback_lost` الحقل `payment_reference_id` وواحداً من `dispute_id` أو `chargeback_id`؛ ويتطلب `session.bot_signal_observed` الحقل `telemetry_schema_version` وواحداً من `bot_score` أو `actions_per_minute` أو `timing_variance_ms` أو `pointer_entropy` أو `keystroke_entropy` أو `reaction_time_ms_p50`؛ ويتطلب `responsible_gambling.self_exclusion_match` كلاً من `registry_source` و`exclusion_status` و`identity_match_ref`. يتطلب كل إجراء `security` ينتهي بـ `_changed` الحقل `changed_field`، بالإضافة إلى `previous_reference_hash` أو `new_reference_hash` عندما يكون الحقل هو `password` أو `mfa_method` أو `mfa` أو `email` أو `phone` أو `withdrawal_address` أو `payout_method` أو `api_key`. أرسل التجزئات والمراجع، ولا ترسل أبداً رقم بطاقة أو عنوان سحب كاملاً أو تجزئة كلمة مرور أو سر MFA."
          },
          "custom_values": {
            "type": "object",
            "description": "ما يصل إلى 100 مفتاح خاص بك، يمكن الرجوع إليها من القواعد بصيغة `custom_values.<key>`. يجب أن تكون القيم عددية أو نصية بسيطة (string أو number أو boolean أو null)؛ ويتم رفض الكائنات والمصفوفات المتداخلة.",
            "additionalProperties": {
              "nullable": true,
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          }
        },
        "example": {
          "event_id": "login-2026-10-17-000001",
          "event_category": "auth",
          "action_type": "login",
          "occurred_at": "2026-10-17T09:15:02.481Z",
          "time_zone": "Europe/Madrid",
          "subject": {
            "vendor_data": "user-42",
            "entity_type": "individual"
          },
          "session": {
            "session_id": "web-session-abc",
            "sequence": 142
          },
          "device_context": {
            "fingerprint": "fp-a8c1",
            "network_context": {
              "ip_address": "203.0.113.42"
            }
          },
          "payload": {
            "method": "password"
          },
          "custom_values": {
            "vip_tier": "gold"
          }
        }
      },
      "MonitoringEventIngestResult": {
        "type": "object",
        "description": "نتيجة استيعاب حدث واحد. يُعاد الشكل نفسه لحدث جديد ولإعادة تشغيل idempotent.",
        "required": [
          "event_uuid",
          "event_id",
          "status",
          "score",
          "rules_evaluated_count",
          "rules_matched_count",
          "correlation_pending",
          "retention_class",
          "expires_at",
          "idempotent_replay",
          "rule_matches"
        ],
        "properties": {
          "event_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف Didit للحدث المخزن."
          },
          "event_id": {
            "type": "string",
            "description": "حقل `event_id` الخاص بك."
          },
          "status": {
            "type": "string",
            "enum": [
              "ACCEPTED",
              "APPROVED",
              "IN_REVIEW",
              "DECLINED"
            ],
            "description": "الحالة بعد تشغيل القواعد في الوقت الفعلي. انظر `MonitoringEvent.status`."
          },
          "score": {
            "type": "integer",
            "description": "الدرجة بعد تشغيل القواعد في الوقت الفعلي."
          },
          "rules_evaluated_count": {
            "type": "integer",
            "minimum": 0,
            "description": "عدد قواعد الأحداث التي تم تقييمها في الطلب. 0 في تطبيق البيئة التجريبية، حيث لا يتم تشغيل أي قواعد."
          },
          "rules_matched_count": {
            "type": "integer",
            "minimum": 0,
            "description": "عدد القواعد التي تطابقت، بما في ذلك قواعد وضع `TEST`."
          },
          "correlation_pending": {
            "type": "boolean",
            "description": "تكون القيمة `true` عندما لا يزال يتعين تشغيل قاعدة غير متزامنة. اقرأ `GET /v3/events/{event_uuid}/` بعد بضع دقائق للحصول على `status` و`score` النهائيين."
          },
          "retention_class": {
            "type": "string",
            "enum": [
              "low_value",
              "standard",
              "risk_relevant",
              "monetary_or_compliance"
            ],
            "description": "فئة الاحتفاظ، بعد أي ترقية بواسطة قاعدة مطابقة."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت انتهاء صلاحية الحدث بموجب فئة الاحتفاظ به وحذفه. القيمة Null لأحداث `monetary_or_compliance` (المدفوعات والنزاعات)."
          },
          "idempotent_replay": {
            "type": "boolean",
            "description": "تكون القيمة `true` عندما يكون هناك حدث بهذا الـ `event_id` وبالمحتوى نفسه مخزناً بالفعل؛ وتكون القيم هي قيم الحدث المخزن ولم يتم تشغيل أي قاعدة مرة أخرى."
          },
          "rule_matches": {
            "type": "array",
            "description": "القواعد التي تطابقت مع الحدث.",
            "items": {
              "type": "object",
              "required": [
                "rule_id",
                "library_key",
                "mode",
                "is_async"
              ],
              "properties": {
                "rule_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "معرّف UUID للقاعدة."
                },
                "library_key": {
                  "type": "string",
                  "nullable": true,
                  "description": "مفتاح المكتبة عندما يتم تثبيت القاعدة من مكتبة القواعد، وإلا يكون null."
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "TEST"
                  ],
                  "description": "تسجل قواعد `TEST` التطابق ولكنها لا تطبق أي إجراءات."
                },
                "is_async": {
                  "type": "boolean",
                  "description": "تكون `true` عندما تكون المطابقة ناتجة عن المعالجة غير المتزامنة."
                }
              }
            }
          }
        }
      },
      "ComplianceList": {
        "type": "object",
        "description": "قائمة حظر، أو قائمة سماح، أو قائمة مخصصة لتطبيق واحد.",
        "required": [
          "uuid",
          "name",
          "description",
          "list_type",
          "entry_type",
          "is_system",
          "entry_count",
          "last_entry_added_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف القائمة. استخدمه كـ `list_uuid` في endpoints الخاصة بالقوائم والمدخلات، وكقيمة لشرط قاعدة سير عمل أو قاعدة معاملة مع `value_type: \"list\"`."
          },
          "name": {
            "type": "string",
            "maxLength": 255,
            "description": "اسم القائمة، وهو فريد بين قوائم التطبيق."
          },
          "description": {
            "type": "string",
            "description": "وصف بنص حر. سلسلة فارغة عند عدم التعيين."
          },
          "list_type": {
            "type": "string",
            "enum": [
              "blocklist",
              "allowlist",
              "custom"
            ],
            "description": "`blocklist`: يؤدي التطابق إلى رفض الجلسة أو المعاملة (قوائم النظام فقط، واحدة لكل نوع إدخال). `allowlist`: العناصر المتطابقة تكون موثوقة، على سبيل المثال تتخطى قائمة السماح للوجوه إجراء الوجه المكرر؛ ولا تتجاوز أبدًا تطابق قائمة الحظر. `custom`: تُستخدم في شروط قواعد سير العمل والمعاملات (`value_type: \"list\"`)."
          },
          "entry_type": {
            "type": "string",
            "enum": [
              "face",
              "document",
              "phone",
              "email",
              "ip_address",
              "device_fingerprint",
              "wallet_address",
              "bank_account",
              "country",
              "user",
              "business",
              "key"
            ],
            "description": "ما تحتويه القائمة: `face`، أو `document` (رقم المستند)، أو `phone`، أو `email`، أو `ip_address` (عنوان IP أو نطاق CIDR)، أو `device_fingerprint`، أو `wallet_address`، أو `bank_account`، أو `country` (وفق معيار ISO 3166-1 alpha-3)، أو `user` أو `business` (الخاص بـ `vendor_data` لديك)، أو `key` (أي سلسلة نصية). وتحدد هذه القيمة كيفية التحقق من صحة قيم الإدخال ومطابقتها."
          },
          "is_system": {
            "type": "boolean",
            "description": "تكون القيمة `true` للقوائم التي توفرها Didit: قائمة حظر واحدة لكل نوع إدخال (`face`، و`document`، و`phone`، و`email`، و`ip_address`، و`device_fingerprint`، و`wallet_address`، و`bank_account`، و`user`، و`business`)، والقائمة المخصصة **High Risk Countries**، وقوائم السماح الخاصة بالنظام. لا يمكن إعادة تسمية قوائم النظام أو تعديلها أو حذفها؛ ولكن يمكنك إضافة مدخلاتها وحذفها."
          },
          "entry_count": {
            "type": "integer",
            "minimum": 0,
            "description": "عدد الإدخالات الموجودة حالياً في القائمة."
          },
          "last_entry_added_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى أُضيف أحدث مدخل حالي. وتكون `null` للقائمة الفارغة."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى تم إنشاء القائمة."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى تم تحديث القائمة آخر مرة."
          }
        }
      },
      "ComplianceListEntry": {
        "type": "object",
        "description": "قيمة واحدة في قائمة.",
        "required": [
          "uuid",
          "value",
          "display_label",
          "comment",
          "added_by",
          "reference_session_id",
          "reference_session_number",
          "reference_session_type",
          "reference_object_uuid",
          "metadata",
          "created_at"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف المُدخل. استخدمه كـ `entry_uuid` في حذف مُدخل من قائمة."
          },
          "value": {
            "type": "string",
            "description": "القيمة المدرجة: رقم هاتف بصيغة E.164، أو عنوان بريد إلكتروني، أو رقم مستند، أو عنوان IP أو نطاق CIDR، أو بصمة جهاز، أو عنوان محفظة، أو حساب مصرفي، أو رمز دولة وفق معيار ISO 3166-1 alpha-3، أو `vendor_data`، أو أي سلسلة نصية في قائمة `key`، أو UUID للوجه المخزن في قائمة الوجوه. تُخزن القيم التي ترسلها بأحرف صغيرة، باستثناء أرقام الهواتف ورموز الدول. مطابقة النصوص غير حساسة لحالة الأحرف."
          },
          "display_label": {
            "type": "string",
            "nullable": true,
            "maxLength": 512,
            "description": "تسمية سهلة القراءة. تملؤها Didit للإدخالات المأخوذة من جلسة (على سبيل المثال اسم حامل المستند ورقمه) إذا لم ترسل أياً منها."
          },
          "comment": {
            "type": "string",
            "description": "ملاحظة بنص حر. سلسلة فارغة عند عدم التعيين."
          },
          "added_by": {
            "type": "string",
            "nullable": true,
            "description": "من أضاف الإدخال: `api` (مفتاح API)، أو عنوان البريد الإلكتروني لمستخدم لوحة التحكم أو `console`، أو `system` أو `migration` (إدخالات أنشأتها Didit)، أو `rule` (إجراء قاعدة معاملات أو قاعدة مراقبة)."
          },
          "reference_session_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "جلسة التحقق التي تم أخذ الإدخال منها. `null` عندما تتم إضافة الإدخال حسب القيمة."
          },
          "reference_session_number": {
            "type": "integer",
            "nullable": true,
            "description": "رقم لتلك الجلسة بنطاق التطبيق، كما يظهر في وحدة التحكم."
          },
          "reference_session_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "kyc",
              "kyb",
              null
            ],
            "description": "`kyc` لجلسة التحقق من شخص، و`kyb` لجلسة التحقق من شركة، و`null` عندما لا توجد جلسة."
          },
          "reference_object_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "السجل الذي يمثله الإدخال: سجل الوجه، أو المستند، أو الهاتف، أو البريد الإلكتروني المقروء من الجلسة، أو الوجه الذي تم إنشاؤه عبر تحميل وجه إلى قائمة، أو UUID الذي أرسلته (على سبيل المثال UUID لمعاملة أو `didit_internal_id` الخاص بالمستخدم)."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "سياق إضافي. يحتوي على المفاتيح التي تعينها Didit (المدرجة هنا) مدمجة مع أي `metadata` أرسلتها عند إنشاء الإدخال، وتُعاد كما تم تخزينها. ويكون `null` عند عدم وجود أي منها.",
            "properties": {
              "reference_image_url": {
                "type": "string",
                "description": "مدخلات الوجه: عنوان URL قصير الأجل وموقّع، يُصدَر مجددًا مع كل استدعاء؛ ويكون `null` لمفتاح API ذي نطاق محدد بدون `media: read`. غير موجود عندما لا تنتمي أي صورة إلى المدخل."
              },
              "front_image_url": {
                "type": "string",
                "description": "مدخلات المستند التي تتضمن صورة أمامية للمستند: رابط URL موقّع قصير الأجل، يُصدر مجدداً عند كل استدعاء؛ `null` لمفتاح API ذي نطاق محدد دون صلاحية `media: read`."
              },
              "full_name": {
                "type": "string",
                "description": "مدخلات المستند المأخوذة من الجلسة: الاسم الكامل لحامل المستند."
              },
              "issuing_state": {
                "type": "string",
                "description": "مدخلات المستند المأخوذة من الجلسة: دولة الإصدار بتنسيق ISO 3166-1 alpha-3."
              },
              "document_type": {
                "type": "string",
                "description": "مدخلات المستند المأخوذة من الجلسة: رمز نوع المستند، على سبيل المثال `P` أو `ID` أو `DL`."
              },
              "region": {
                "type": "string",
                "description": "مدخلات المستند المأخوذة من الجلسة: الولاية أو المقاطعة المصدرة لمستند صادر إقليمياً، وتكون فارغة عندما لا تنطبق. لا يتم ضبطها بواسطة إضافة عناصر الجلسة إلى قائمة الحظر."
              },
              "document_number": {
                "type": "string",
                "description": "مدخلات المستند المأخوذة من الجلسة: رقم المستند."
              },
              "face_image_source": {
                "type": "string",
                "enum": [
                  "front_image_camera_front",
                  "back_image_camera_front"
                ],
                "description": "مدخلات الوجه المأخوذة من صورة سيلفي ملتقطة مع المستند: أي صورة سيلفي. غير موجودة لوجوه كشف الحيوية."
              },
              "reference_node_id": {
                "type": "string",
                "nullable": true,
                "description": "مدخلات الوجه المأخوذة من صورة سيلفي ملتقطة مع المستند: عقدة التحقق من الهوية التي وردت منها صورة السيلفي."
              },
              "fingerprint_tier": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "persistent_id",
                  "composite_hash",
                  "legacy_fp",
                  "unknown",
                  null
                ],
                "description": "مدخلات بصمة الجهاز المأخوذة من جلسة: كيفية استخلاص البصمة. يحدد `persistent_id` جهازاً واحداً؛ بينما يمكن مشاركة `composite_hash` و`legacy_fp` بين أجهزة من نفس الطراز."
              },
              "sandbox": {
                "type": "boolean",
                "description": "تكون القيمة `true` لمدخل وجه تم رفعه في تطبيق في البيئة التجريبية؛ ولا يطابق هذا المدخل أي شيء."
              },
              "reference_type": {
                "type": "string",
                "enum": [
                  "transaction",
                  "vendor_user",
                  "vendor_business"
                ],
                "description": "مُعيَّن بواسطتك: ما يشير إليه `reference_object_uuid`، لتربط لوحة التحكم به مجدداً."
              },
              "reference_id": {
                "type": "string",
                "description": "مُعيَّن بواسطتك: معرّف السجل المصدر."
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت إضافة المُدخل."
          }
        }
      },
      "BlocklistedItem": {
        "type": "object",
        "description": "وجه، أو مستند هوية، أو رقم هاتف، أو عنوان بريد إلكتروني مدرج في قائمة الحظر من جلسة تحقق واحدة. وتكون الحقول التي لا تنطبق على `type` الخاص بالعنصر بقيمة `null`.",
        "required": [
          "type",
          "session_id",
          "session_number",
          "blocklisted_at",
          "face_image",
          "document_type",
          "document_number",
          "front_image",
          "phone_number",
          "country_code",
          "email"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "face",
              "document",
              "phone",
              "email"
            ],
            "description": "ما تم إدراجه في قائمة الحظر."
          },
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "جلسة التحقق التي ينتمي إليها العنصر."
          },
          "session_number": {
            "type": "integer",
            "nullable": true,
            "description": "رقم لتلك الجلسة بنطاق التطبيق، كما يظهر في وحدة التحكم."
          },
          "blocklisted_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى أُضيف العنصر إلى قائمة الحظر آخر مرة."
          },
          "face_image": {
            "type": "string",
            "nullable": true,
            "description": "عناصر الوجه: عنوان URL موقّع قصير الأجل، يُصدَر مجددًا مع كل استدعاء؛ ويكون `null` لمفتاح API ذي نطاق محدد بدون `media: read`. ويكون أيضًا `null` عند عدم تخزين أي صورة مرجعية."
          },
          "document_type": {
            "type": "string",
            "nullable": true,
            "description": "عناصر المستند: رمز نوع المستند، على سبيل المثال `P` (جواز سفر)، أو `ID` (بطاقة هوية وطنية)، أو `DL` (رخصة قيادة)، أو `RP` (تصريح إقامة)."
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "عناصر المستند: رقم المستند، أو الرقم الشخصي عندما لا يحتوي المستند على رقم."
          },
          "front_image": {
            "type": "string",
            "nullable": true,
            "description": "عناصر المستند: الصورة الأمامية للمستند، رابط URL موقّع قصير الأجل، يُصدر مجدداً عند كل استدعاء؛ `null` لمفتاح API ذي نطاق محدد دون صلاحية `media: read`."
          },
          "phone_number": {
            "type": "string",
            "nullable": true,
            "description": "عناصر الهاتف: رقم الهاتف بتنسيق E.164."
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "description": "عناصر الهاتف: دولة الرقم وفقاً للمعيار ISO 3166-1 alpha-2."
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "عناصر البريد الإلكتروني: عنوان البريد الإلكتروني."
          }
        }
      },
      "TransactionNote": {
        "type": "object",
        "description": "ملاحظة واحدة في الجدول الزمني لمراجعة المعاملة الخاضعة للمراقبة.",
        "required": [
          "uuid",
          "note",
          "actor_email",
          "actor_name",
          "metadata",
          "created_at"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الملاحظة."
          },
          "note": {
            "type": "string",
            "description": "متن الملاحظة النصية العادية."
          },
          "actor_email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "description": "البريد الإلكتروني لمستخدم Console الذي كتب الملاحظة أو غيّر الحالة. يكون `null` للملاحظات التي تم إنشاؤها باستخدام مفتاح API والملاحظات التي يضيفها Didit تلقائياً."
          },
          "actor_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم العرض لمستخدم Console (بريده الإلكتروني إذا لم يكن لديه اسم). ويكون `Rule Engine` في الملاحظات التي تضيفها Didit تلقائياً. و`null` للملاحظات التي تم إنشاؤها باستخدام مفتاح API."
          },
          "metadata": {
            "type": "object",
            "description": "يميّز بين أنواع الملاحظات. تتضمن الملاحظات المكتوبة عبر API أو لوحة التحكم الحقل `mentioned_emails`. ويتضمن تغيير الحالة الذي يتم في لوحة التحكم الحقل `type: status_change` مع `previous_status` و`new_status` و`reason_code` و`reason_label`. أما الملاحظات التي تضيفها Didit فتتضمن `source`: القيمة `rule_action` (مع `rule_uuid`) لإجراء `add_note` الخاص بقاعدة، أو `remediation_session` لمشكلة حدثت أثناء إنشاء جلسة تحقق من إجراء المستخدم.",
            "properties": {
              "mentioned_emails": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "email"
                },
                "description": "أعضاء المؤسسة المشار إليهم، بأحرف صغيرة ودون تكرار. فارغ في حال عدم الإشارة إلى أي شخص."
              },
              "type": {
                "type": "string",
                "enum": [
                  "status_change"
                ],
                "description": "موجود في الملاحظات التي تسجل تغييراً في الحالة تم إجراؤه في لوحة التحكم."
              },
              "previous_status": {
                "type": "string",
                "enum": [
                  "APPROVED",
                  "IN_REVIEW",
                  "DECLINED",
                  "AWAITING_USER"
                ],
                "description": "الحالة قبل التغيير."
              },
              "new_status": {
                "type": "string",
                "enum": [
                  "APPROVED",
                  "IN_REVIEW",
                  "DECLINED",
                  "AWAITING_USER"
                ],
                "description": "الحالة بعد التغيير."
              },
              "reason_code": {
                "type": "string",
                "nullable": true,
                "description": "رمز السبب المقدم مع التغيير."
              },
              "reason_label": {
                "type": "string",
                "nullable": true,
                "description": "تسمية السبب المقدمة مع التغيير."
              },
              "source": {
                "type": "string",
                "enum": [
                  "rule_action",
                  "remediation_session"
                ],
                "description": "موجود في الملاحظات التي يضيفها Didit تلقائياً."
              },
              "rule_uuid": {
                "type": "string",
                "format": "uuid",
                "description": "القاعدة التي كتب الإجراء `add_note` التابع لها الملاحظة (مع `source: rule_action`)."
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى تم تخزين الملاحظة."
          }
        }
      },
      "TransactionSummary": {
        "type": "object",
        "description": "ملخص لمعاملة خاضعة للمراقبة، بالهيكل الذي يسرده `GET /v3/transactions/`. استدعِ `GET /v3/transactions/{transaction_id}/` باستخدام `uuid` للحصول على الأطراف، والتنبيهات، وعمليات تشغيل القواعد.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID لمعاملة Didit. استخدمه كـ `{transaction_id}` في endpoints الخاصة بالمعاملات."
          },
          "transaction_number": {
            "type": "integer",
            "nullable": true,
            "description": "رقم تسلسلي بنطاق التطبيق يظهر في وحدة التحكم."
          },
          "txn_id": {
            "type": "string",
            "nullable": true,
            "description": "المعرّف الخاص بك من استدعاء الإنشاء. فريد لكل تطبيق."
          },
          "transaction_type": {
            "type": "string",
            "description": "الفئة كما هي مخزنة: `finance`، `kyc`، `travelRule`، `userPlatformEvent`، `gamblingBet`، `gamblingLimitChange`، `gamblingBonusChange`، أو `auditTrailEvent`."
          },
          "action_type": {
            "type": "string",
            "description": "النوع الفرعي ضمن الفئة، على سبيل المثال `withdrawal`."
          },
          "status": {
            "type": "string",
            "enum": [
              "APPROVED",
              "IN_REVIEW",
              "DECLINED",
              "AWAITING_USER"
            ],
            "description": "قرار المراقبة الحالي."
          },
          "source": {
            "type": "string",
            "enum": [
              "LIVE",
              "IMPORTED"
            ],
            "description": "`LIVE` للمعاملات المرسلة للمراقبة، و`IMPORTED` لعمليات الاستيراد السابقة."
          },
          "direction": {
            "type": "string",
            "enum": [
              "INBOUND",
              "OUTBOUND"
            ],
            "description": "الاتجاه بالنسبة إلى الشخص المعني."
          },
          "amount": {
            "type": "string",
            "description": "المبلغ كسلسلة عشرية مع إزالة الأصفار اللاحقة (حتى 18 خانة عشرية)."
          },
          "currency": {
            "type": "string",
            "description": "رمز العملة أو رمز أصل العملة المشفرة الخاص بـ `amount`."
          },
          "currency_type": {
            "type": "string",
            "nullable": true,
            "description": "`fiat` أو `crypto` عندما تكون معروفة."
          },
          "preferred_currency_amount": {
            "type": "string",
            "nullable": true,
            "description": "`amount` محولاً إلى العملة المفضلة للتطبيق، عندما كان سعر الصرف متاحًا."
          },
          "preferred_currency_code": {
            "type": "string",
            "nullable": true,
            "description": "عملة `preferred_currency_amount`."
          },
          "payment_details": {
            "type": "string",
            "nullable": true,
            "description": "مرجع الدفع بنص حر."
          },
          "txn_date": {
            "type": "string",
            "format": "date-time",
            "description": "وقت حدوث المعاملة."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت تسجيل Didit له."
          },
          "score": {
            "type": "integer",
            "description": "درجة المخاطر. القيمة الأعلى تعني مخاطر أكبر."
          },
          "severity": {
            "type": "string",
            "nullable": true,
            "enum": [
              "UNKNOWN",
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL",
              null
            ],
            "description": "شدة المخاطر، وتكون `null` حتى يتم تعيينها."
          },
          "decision_reason_code": {
            "type": "string",
            "nullable": true,
            "description": "السبب المقروء آلياً للحالة الحالية `status`."
          },
          "decision_reason_label": {
            "type": "string",
            "nullable": true,
            "description": "تسمية سهلة القراءة لـ `decision_reason_code`."
          },
          "tags": {
            "type": "array",
            "description": "العلامات على المعاملة.",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "color": {
                  "type": "string",
                  "description": "لون سداسي عشري، على سبيل المثال `#F59E0B`."
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "didit",
                    "custom"
                  ],
                  "description": "وسم Didit مسبق الضبط أو مخصص."
                }
              }
            }
          },
          "subject_name": {
            "type": "string",
            "nullable": true,
            "description": "الاسم الكامل للطرف `APPLICANT`."
          },
          "subject_vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "حقل `vendor_data` الخاص بك لمقدّم الطلب."
          },
          "subject_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "user",
              "business",
              null
            ],
            "description": "ما إذا كان مقدم الطلب مرتبطاً بمستخدم أو شركة في Didit؛ وتكون `null` عندما لا يكون مرتبطاً بأي منهما."
          },
          "subject_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "معرّف UUID لمستخدم أو شركة Didit المرتبط بها مقدم الطلب."
          },
          "subject_country": {
            "type": "string",
            "nullable": true,
            "description": "رمز الدولة لمقدم الطلب."
          },
          "counterparty_name": {
            "type": "string",
            "nullable": true,
            "description": "الاسم الكامل للطرف `COUNTERPARTY`، إن وجد."
          },
          "counterparty_vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "حقل `vendor_data` الخاص بك للطرف المقابل."
          },
          "counterparty_country": {
            "type": "string",
            "nullable": true,
            "description": "رمز الدولة للطرف المقابل."
          },
          "assigned_to_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم مراجع Console المعيّن للمعاملة."
          },
          "travel_rule_status": {
            "type": "string",
            "nullable": true,
            "description": "حالة تحويل Travel Rule الخاص بالمعاملة، أو `null` إذا لم يكن هناك أي تحويل."
          },
          "application_id": {
            "type": "string",
            "format": "uuid",
            "description": "التطبيق الذي يمتلك المعاملة."
          },
          "application_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم ذلك التطبيق."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "description": "المؤسسة التي تملك التطبيق."
          },
          "organization_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم تلك المؤسسة."
          }
        }
      },
      "ApplicationAnalyticsDataPoint": {
        "type": "object",
        "description": "أعداد الجلسات ليوم واحد، حسب تاريخ الإنشاء (UTC). يعكس كل عدد الحالة الحالية للجلسة. تحمل نقاط الفترة السابقة الحقول المطلوبة على الأقل.",
        "required": [
          "rounded_date",
          "total",
          "approved",
          "declined",
          "canceled",
          "pending"
        ],
        "properties": {
          "rounded_date": {
            "type": "string",
            "format": "date",
            "description": "اليوم، `YYYY-MM-DD`."
          },
          "total": {
            "type": "integer",
            "description": "الجلسات التي تم إنشاؤها في ذلك اليوم."
          },
          "approved": {
            "type": "integer",
            "description": "من بين تلك، الجلسات `Approved` أو `Kyc Expired`."
          },
          "declined": {
            "type": "integer",
            "description": "الجلسات بحالة `Declined`."
          },
          "canceled": {
            "type": "integer",
            "description": "الجلسات بحالة `Expired` أو `Abandoned`."
          },
          "pending": {
            "type": "integer",
            "description": "الجلسات بحالة `Not Started` أو `In Progress` أو `In Review`."
          },
          "in_review": {
            "type": "integer",
            "description": "الجلسات بحالة `In Review`."
          },
          "expired": {
            "type": "integer",
            "description": "الجلسات بحالة `Expired`."
          },
          "abandoned": {
            "type": "integer",
            "description": "الجلسات بحالة `Abandoned`."
          },
          "in_progress": {
            "type": "integer",
            "description": "الجلسات بحالة `In Progress`."
          },
          "not_started": {
            "type": "integer",
            "description": "الجلسات بحالة `Not Started`."
          },
          "manually_approved": {
            "type": "integer",
            "description": "الجلسات التي وافق عليها مراجِع بعد أن أصدر سير العمل حكماً آخر."
          },
          "manually_declined": {
            "type": "integer",
            "description": "الجلسات التي رفضها مراجِع بعد أن أصدر سير العمل حكماً آخر."
          }
        }
      },
      "ApplicationAnalyticsRequestBreakdown": {
        "type": "object",
        "description": "إجماليات الحالة للنطاق المحدد. يحتوي تفصيل الفترة السابقة على الحقول المطلوبة على الأقل.",
        "required": [
          "total_approved",
          "total_in_review",
          "total_declined",
          "total_canceled",
          "total_pending"
        ],
        "properties": {
          "total_approved": {
            "type": "integer",
            "description": "الجلسات بحالة `Approved` أو `Kyc Expired`."
          },
          "total_in_review": {
            "type": "integer",
            "description": "الجلسات بحالة `In Review`."
          },
          "total_declined": {
            "type": "integer",
            "description": "الجلسات بحالة `Declined`."
          },
          "total_canceled": {
            "type": "integer",
            "description": "الجلسات بحالة `Expired` أو `Abandoned`."
          },
          "total_pending": {
            "type": "integer",
            "description": "الجلسات بحالة `Not Started` أو `In Progress` أو `In Review` (يشمل `total_in_review`)."
          },
          "total_expired": {
            "type": "integer",
            "description": "الجلسات بحالة `Expired`."
          },
          "total_abandoned": {
            "type": "integer",
            "description": "الجلسات بحالة `Abandoned`."
          },
          "total_in_progress": {
            "type": "integer",
            "description": "الجلسات بحالة `In Progress`."
          },
          "total_not_started": {
            "type": "integer",
            "description": "الجلسات بحالة `Not Started`."
          },
          "total_manually_approved": {
            "type": "integer",
            "description": "مقبولة من قِبل مراجِع."
          },
          "total_manually_declined": {
            "type": "integer",
            "description": "مرفوضة من قبل مراجِع."
          }
        }
      },
      "ApplicationAnalyticsCountryCount": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "description": "اسم الدولة."
          },
          "country_code": {
            "type": "string",
            "description": "رمز الدولة المكون من حرفين."
          },
          "session_count": {
            "type": "integer",
            "description": "الجلسات من تلك الدولة."
          }
        }
      },
      "ApplicationAnalyticsLocationStats": {
        "type": "object",
        "properties": {
          "ip_countries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount"
            },
            "description": "دول عناوين IP للمستخدمين، مرتبة تنازلياً حسب عدد الجلسات."
          },
          "countries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount"
            },
            "description": "القائمة نفسها مثل `ip_countries`."
          },
          "id_countries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount"
            },
            "description": "دول الإصدار لمستندات الهوية التي تم التحقق منها، مع عرض الدول التي تضم أكبر عدد من الجلسات أولاً."
          },
          "conversion_by_country": {
            "type": "array",
            "description": "حسب دولة إصدار المستند: الجلسات المنتهية (مقبولة، مرفوضة أو قيد المراجعة) وعدد الجلسات المقبولة. تُعرض الدول ذات أكبر عدد من الجلسات المنتهية أولاً.",
            "items": {
              "type": "object",
              "properties": {
                "country": {
                  "type": "string"
                },
                "country_code": {
                  "type": "string"
                },
                "finished": {
                  "type": "integer"
                },
                "approved": {
                  "type": "integer"
                }
              }
            }
          },
          "cities": {
            "type": "array",
            "description": "ما يصل إلى 100 مدينة لعناوين IP، مرتبة بحسب الجلسات الأكثر أولاً.",
            "items": {
              "type": "object",
              "properties": {
                "location": {
                  "type": "string",
                  "description": "`City, Country`."
                },
                "session_count": {
                  "type": "integer"
                },
                "latitude": {
                  "type": "number",
                  "nullable": true
                },
                "longitude": {
                  "type": "number",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "ApplicationAnalyticsDemographicStats": {
        "type": "object",
        "properties": {
          "age_distribution": {
            "type": "object",
            "description": "الجلسات حسب الفئة العمرية من مستند الهوية. فارغ عند عدم وجود بيانات.",
            "properties": {
              "under_18": {
                "type": "integer"
              },
              "18_24": {
                "type": "integer"
              },
              "25_34": {
                "type": "integer"
              },
              "35_44": {
                "type": "integer"
              },
              "45_64": {
                "type": "integer"
              },
              "65_plus": {
                "type": "integer"
              }
            },
            "additionalProperties": {
              "type": "integer"
            }
          },
          "gender_distribution": {
            "type": "object",
            "description": "الجلسات حسب رمز الجنس في المستند: `M` أو `F` أو `U` (غير معروف).",
            "additionalProperties": {
              "type": "integer"
            }
          }
        }
      },
      "ApplicationAnalyticsDeviceDetails": {
        "type": "object",
        "description": "أعلى خمسة من كل منها، مع بدء الجلسات الأكثر أولاً.",
        "properties": {
          "device_models": {
            "type": "array",
            "description": "العلامات التجارية للأجهزة: `Apple`، أو `Android`، أو `LG`، مع تجميع كل ما عدا ذلك كـ `Other`.",
            "items": {
              "type": "object",
              "properties": {
                "device": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              }
            }
          },
          "browsers": {
            "type": "array",
            "description": "المتصفحات: `Chrome`، و`Safari`، و`Didit App`، و`Firefox`، مع تجميع كل ما عدا ذلك تحت `Other`.",
            "items": {
              "type": "object",
              "properties": {
                "browser": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              }
            }
          },
          "operating_systems": {
            "type": "array",
            "description": "أنظمة التشغيل.",
            "items": {
              "type": "object",
              "properties": {
                "os": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "ApplicationAnalyticsWorkflowFunnel": {
        "type": "object",
        "description": "مفهرس حسب معرّف سير العمل. يمثل `total` الجلسات التي بدأت في سير العمل هذا؛ بينما يحسب `steps` الجلسات التي وصلت إلى كل خطوة (`OCR` و`LIVENESS` و`FACE_MATCH` و`AML` و`POA` و`PHONE` و`EMAIL` و`NFC` و`DATABASE_VALIDATION` و`QUESTIONNAIRE` و`IP_ANALYSIS` و`AGE_ESTIMATION` و`KYB_REGISTRY` و`KYB_DOCUMENTS` و`KYB_KEY_PEOPLE`). الوصول إلى الخطوة لا يعني اجتيازها.",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer"
            },
            "steps": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "reached": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        }
      },
      "ApplicationAnalyticsVerificationTimeStats": {
        "type": "object",
        "description": "الوقت الفعلي الذي قضاه المستخدمون في التحقق، مع تجاهل فترات الخمول. كائن فارغ في حال عدم وجود بيانات.",
        "properties": {
          "overall_avg_seconds": {
            "type": "number",
            "description": "المتوسط لكل جلسة، بمنزلة عشرية واحدة."
          },
          "overall_count": {
            "type": "integer",
            "description": "الجلسات المقاسة."
          },
          "per_feature": {
            "type": "object",
            "description": "مفهرس حسب الميزة، على سبيل المثال `OCR` أو `LIVENESS`.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "avg_seconds": {
                  "type": "number"
                },
                "total_seconds": {
                  "type": "number"
                },
                "count": {
                  "type": "integer"
                }
              }
            }
          },
          "per_sub_step": {
            "type": "object",
            "description": "مفهرس حسب الميزة، ثم حسب الخطوة الفرعية، على سبيل المثال `front_id_photo`.",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "avg_seconds": {
                    "type": "number"
                  },
                  "total_seconds": {
                    "type": "number"
                  },
                  "count": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        }
      },
      "ApplicationAnalyticsResubmissionStats": {
        "type": "object",
        "properties": {
          "first_pass": {
            "type": "integer",
            "description": "الجلسات المنتهية دون أي إعادة إرسال."
          },
          "second": {
            "type": "integer",
            "description": "الجلسات المنتهية التي تمت إعادة إرسالها مرة واحدة."
          },
          "third_plus": {
            "type": "integer",
            "description": "الجلسات المنتهية التي تمت إعادة إرسالها مرتين أو أكثر."
          },
          "abandoned": {
            "type": "integer",
            "description": "الجلسات المتروكة."
          }
        }
      },
      "ApplicationAnalyticsOriginalStatusStats": {
        "type": "object",
        "description": "القرار التلقائي لسير العمل، قبل أن يغيّره أي مراجِع.",
        "properties": {
          "approved": {
            "type": "integer"
          },
          "in_review": {
            "type": "integer"
          },
          "declined": {
            "type": "integer"
          }
        }
      },
      "ApplicationAnalyticsWarningStats": {
        "type": "object",
        "description": "مفهرس حسب الميزة (`ID_VERIFICATION` و`LIVENESS` و`FACEMATCH` و`AML` و`PROOF_OF_ADDRESS` و`PHONE` و`EMAIL` و`NFC` و`LOCATION` و`DATABASE_VALIDATION` و`QUESTIONNAIRE` وميزات KYB). يمثل `total` الجلسات التي وصلت إلى الميزة؛ بينما يحسب `risks` الجلسات لكل رمز تحذير ومستوى.",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer"
            },
            "risks": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "integer"
                  },
                  "warning": {
                    "type": "integer"
                  },
                  "information": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        }
      },
      "ApplicationAnalyticsDemographicPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "مفتاح الفترة الزمنية: `YYYY-MM-DD` لليوم، أو يوم الإثنين من الأسبوع، أو `YYYY-MM` للشهر، وذلك وفقاً لـ `grouping_mode`."
          },
          "age_distribution": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "gender_distribution": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        }
      },
      "ApplicationAnalyticsDevicePoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "مفتاح الفترة الزمنية: `YYYY-MM-DD` لليوم، أو يوم الإثنين من الأسبوع، أو `YYYY-MM` للشهر، وذلك وفقاً لـ `grouping_mode`."
          },
          "devices": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "browsers": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "operating_systems": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        }
      },
      "ApplicationAnalyticsVerificationTimePoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "مفتاح الفترة الزمنية: `YYYY-MM-DD` لليوم، أو يوم الإثنين من الأسبوع، أو `YYYY-MM` للشهر، وذلك وفقاً لـ `grouping_mode`."
          },
          "overall_avg": {
            "type": "number",
            "description": "متوسط الثواني النشطة لكل جلسة."
          },
          "per_feature": {
            "type": "object",
            "description": "متوسط الثواني النشطة لكل ميزة.",
            "additionalProperties": {
              "type": "number"
            }
          }
        }
      },
      "ApplicationAnalyticsResubmissionPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "مفتاح الفترة الزمنية: `YYYY-MM-DD` لليوم، أو يوم الإثنين من الأسبوع، أو `YYYY-MM` للشهر، وذلك وفقاً لـ `grouping_mode`."
          },
          "first_pass": {
            "type": "integer"
          },
          "second": {
            "type": "integer"
          },
          "third_plus": {
            "type": "integer"
          },
          "abandoned": {
            "type": "integer"
          }
        }
      },
      "ApplicationAnalyticsOriginalStatusPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "مفتاح الفترة الزمنية: `YYYY-MM-DD` لليوم، أو يوم الإثنين من الأسبوع، أو `YYYY-MM` للشهر، وذلك وفقاً لـ `grouping_mode`."
          },
          "approved": {
            "type": "integer"
          },
          "in_review": {
            "type": "integer"
          },
          "declined": {
            "type": "integer"
          }
        }
      },
      "ApplicationAnalyticsSummary": {
        "type": "object",
        "description": "ملخص التحقق من المستخدمين (KYC)، يتم إرجاعه عندما لا يتم إرسال `scope` ولا `widget_keys`.",
        "required": [
          "data_points",
          "request_breakdown",
          "previous_data_points",
          "previous_request_breakdown",
          "conversion_rate",
          "location_stats",
          "demographic_stats",
          "device_details",
          "workflow_funnel_stats",
          "verification_time_stats",
          "resubmission_stats",
          "warning_stats",
          "original_status_stats",
          "grouping_mode",
          "demographic_time_series",
          "device_time_series",
          "verification_time_time_series",
          "resubmission_time_series",
          "original_status_time_series"
        ],
        "properties": {
          "data_points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint"
            },
            "description": "نقطة واحدة لكل يوم، من اليوم الأول الذي يتضمن جلسات ضمن النطاق حتى `end_date`. تكون يومية دائماً، بصرف النظر عن قيمة `grouping_mode`."
          },
          "request_breakdown": {
            "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown"
          },
          "previous_data_points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint"
            },
            "description": "النقاط اليومية للفترة ذات الطول نفسه السابقة مباشرة لـ `start_date`."
          },
          "previous_request_breakdown": {
            "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown"
          },
          "conversion_rate": {
            "type": "number",
            "nullable": true,
            "description": "`total_approved / (total_approved + total_declined + total_in_review) x 100`، بمنزلة عشرية واحدة. `null` عند عدم اكتمال أي شيء."
          },
          "location_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsLocationStats"
          },
          "demographic_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsDemographicStats"
          },
          "device_details": {
            "$ref": "#/components/schemas/ApplicationAnalyticsDeviceDetails"
          },
          "workflow_funnel_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsWorkflowFunnel"
          },
          "verification_time_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimeStats"
          },
          "resubmission_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionStats"
          },
          "warning_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsWarningStats"
          },
          "original_status_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusStats"
          },
          "grouping_mode": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month"
            ],
            "description": "كيفية تجميع قوائم `*_time_series`: `day` لما يصل إلى 14 يوماً، و`week` لما يصل إلى 90 يوماً، و`month` لما يزيد عن ذلك. تُقاس بدءاً من اليوم الأول الذي يحتوي على جلسات ضمن النطاق."
          },
          "demographic_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsDemographicPoint"
            }
          },
          "device_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsDevicePoint"
            }
          },
          "verification_time_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimePoint"
            }
          },
          "resubmission_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionPoint"
            }
          },
          "original_status_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusPoint"
            }
          }
        }
      },
      "ApplicationAnalyticsWidget": {
        "type": "object",
        "description": "عنصر واجهة مستخدم (ودجت) واحد للوحة التحكم. يحتوي كل عنصر واجهة مستخدم على `kind` و`title`؛ بينما تعتمد الحقول الأخرى على `kind`. تعيد عناصر واجهة مستخدم الجلسات استخدام كائنات الملخص (`data_points` و`request_breakdown` و`workflow_funnel_stats` وما إلى ذلك)؛ وتضع عناصر واجهة مستخدم القوائم مدخلاتها في `items`؛ وتستخدم مقاييس المعاملات `value`.",
        "required": [
          "kind",
          "title"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "sessions_volume",
              "workflow_funnel",
              "average_verification_time",
              "country_distribution",
              "warning_insights",
              "conversion_rate",
              "conversion_by_country",
              "resubmission_insights",
              "original_status_distribution",
              "database_validation_coverage",
              "database_validation_latency",
              "demographics",
              "device_details",
              "horizontal_bar",
              "kyb_registry_coverage",
              "kyb_registry_data_completeness",
              "metric",
              "time_series",
              "breakdown",
              "status_time_series",
              "leaderboard",
              "histogram"
            ],
            "description": "نوع عنصر الواجهة (Widget)."
          },
          "title": {
            "type": "string",
            "description": "عنوان العرض، على سبيل المثال `Verification volume`."
          },
          "grouping_mode": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month"
            ],
            "description": "كيفية تجميع قوائم `*_time_series`: `day` لما يصل إلى 14 يوماً، و`week` لما يصل إلى 90 يوماً، و`month` لما يزيد عن ذلك. تُقاس بدءاً من اليوم الأول الذي يحتوي على جلسات ضمن النطاق."
          },
          "data_points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint"
            }
          },
          "request_breakdown": {
            "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown"
          },
          "previous_data_points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint"
            }
          },
          "previous_request_breakdown": {
            "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown"
          },
          "conversion_rate": {
            "type": "number",
            "nullable": true
          },
          "workflow_funnel_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsWorkflowFunnel"
          },
          "verification_time_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimeStats"
          },
          "verification_time_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimePoint"
            }
          },
          "warning_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsWarningStats"
          },
          "resubmission_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionStats"
          },
          "resubmission_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionPoint"
            }
          },
          "original_status_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusStats"
          },
          "original_status_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusPoint"
            }
          },
          "demographic_stats": {
            "$ref": "#/components/schemas/ApplicationAnalyticsDemographicStats"
          },
          "demographic_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsDemographicPoint"
            }
          },
          "device_details": {
            "$ref": "#/components/schemas/ApplicationAnalyticsDeviceDetails"
          },
          "device_time_series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAnalyticsDevicePoint"
            }
          },
          "items": {
            "type": "array",
            "description": "مُدخلات أداة القائمة. `country_distribution` (KYC): `country`، و`country_code`، و`session_count`. و`conversion_by_country`: `country`، و`country_code`، و`finished`، و`approved`. و`time_series`: `date`، و`value`. و`status_time_series`: `date`، و`approved`، و`declined`، و`flagged`. و`breakdown`: `transaction_type` أو `action_type` مع `count` و`volume`، أو `tag_id`، و`tag_name`، و`count`. و`leaderboard`: `rule_title`، و`trigger_count` أو `assignee`، و`handled_count`، و`average_processing_seconds`، وكل منها يتضمن `approved_percentage`، و`declined_percentage`، و`flagged_percentage`. و`histogram`: `score`، و`count`.",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "previous_items": {
            "type": "array",
            "description": "السلسلة الزمنية للمعاملات للفترة ذات المدة نفسها التي تسبق `start_date` مباشرة.",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "value": {
            "type": "number",
            "description": "أدوات `metric`: الرقم الخاص بالنطاق."
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "عناصر واجهة حجم المعاملات والمبلغ: عملة المعاملات الافتراضية للتطبيق."
          },
          "thresholds": {
            "type": "object",
            "description": "أداة `histogram`: حدود درجات المراجعة والرفض الخاصة بالتطبيق.",
            "properties": {
              "review": {
                "type": "integer"
              },
              "decline": {
                "type": "integer"
              }
            }
          },
          "search": {
            "type": "object",
            "description": "أداة `kyb_registry_coverage`: إجماليات البحث في السجل.",
            "properties": {
              "searches_total": {
                "type": "integer"
              },
              "searches_with_no_candidates": {
                "type": "integer"
              }
            }
          }
        }
      },
      "ApplicationAnalyticsWidgetResponse": {
        "type": "object",
        "description": "تطبيقات مصغرة للوحة التحكم، تُرجع عند إرسال `scope` أو `widget_keys`.",
        "required": [
          "scope",
          "available_widget_keys",
          "requested_widget_keys",
          "widgets"
        ],
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "home",
              "kyc",
              "kyb",
              "transactions"
            ],
            "description": "علامة تبويب لوحة التحكم."
          },
          "available_widget_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "كل مفتاح أداة يقبله هذا النطاق."
          },
          "requested_widget_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "مفاتيح الأداة التي تمت الإجابة عليها، بالترتيب: قيم `widget_keys` الصالحة الخاصة بك، أو القيم الافتراضية للنطاق."
          },
          "widgets": {
            "type": "object",
            "description": "مفهرس حسب مفتاح أداة واجهة المستخدم، بترتيب `requested_widget_keys`.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ApplicationAnalyticsWidget"
            }
          }
        }
      },
      "ApplicationAnalyticsToday": {
        "type": "object",
        "description": "عمليات التحقق لليوم حسب الساعة المحلية مقارنة بنفس اليوم من الأسبوع الماضي.",
        "required": [
          "time_zone",
          "date",
          "current_hour",
          "previous_date",
          "hours",
          "previous_hours",
          "total",
          "previous_total_so_far",
          "outcomes"
        ],
        "properties": {
          "time_zone": {
            "type": "string",
            "description": "المنطقة الزمنية لـ IANA التي يقع فيها اليوم وساعاته.",
            "example": "Europe/Madrid"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "اليوم في تلك المنطقة الزمنية.",
            "example": "2026-10-30"
          },
          "current_hour": {
            "type": "integer",
            "minimum": 0,
            "maximum": 23,
            "description": "الساعة المحلية الآن.",
            "example": 14
          },
          "previous_date": {
            "type": "string",
            "format": "date",
            "description": "يوم المقارنة: نفس اليوم من الأسبوع قبل أسبوع واحد.",
            "example": "2026-10-23"
          },
          "hours": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "minItems": 24,
            "maxItems": 24,
            "description": "عمليات التحقق التي تم إنشاؤها اليوم، لكل ساعة محلية بدءاً من 00:00. الساعات القادمة تكون قيمتها 0."
          },
          "previous_hours": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "minItems": 24,
            "maxItems": 24,
            "description": "عمليات التحقق التي تم إنشاؤها في يوم المقارنة، لكل ساعة محلية بدءاً من 00:00."
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "عمليات التحقق التي تم إنشاؤها اليوم حتى الآن.",
            "example": 165
          },
          "previous_total_so_far": {
            "type": "integer",
            "minimum": 0,
            "description": "عمليات التحقق التي تم إنشاؤها في يوم المقارنة حتى نفس الوقت المحلي.",
            "example": 151
          },
          "outcomes": {
            "type": "object",
            "description": "من بين عمليات التحقق اليوم، كم عدد العمليات المقبولة، والتي تنتظر المراجعة، والمرفوضة حالياً. الباقي لم يكتمل بعد.",
            "required": [
              "approved",
              "in_review",
              "declined"
            ],
            "properties": {
              "approved": {
                "type": "integer",
                "minimum": 0
              },
              "in_review": {
                "type": "integer",
                "minimum": 0
              },
              "declined": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      },
      "WebhookConfigDestination": {
        "type": "object",
        "description": "وجهة webhook كما هي مدرجة في إعدادات webhook، بدون مقاييس التسليم. يضيف `GET /v3/webhook/destinations/{destination_uuid}/` ملخص التسليم الخاص بها.",
        "required": [
          "uuid",
          "label",
          "url",
          "enabled",
          "webhook_version",
          "secret_shared_key",
          "subscribed_events",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الوجهة."
          },
          "label": {
            "type": "string",
            "maxLength": 255,
            "description": "اسم مقروء للبشر."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000,
            "description": "HTTPS endpoint ترسل Didit الأحداث إليه."
          },
          "enabled": {
            "type": "boolean",
            "description": "تؤدي القيمة `false` إلى إيقاف عمليات التسليم مؤقتاً إلى هذه الوجهة."
          },
          "webhook_version": {
            "type": "string",
            "enum": [
              "v1",
              "v2",
              "v3"
            ],
            "description": "إصدار payload المرسل إلى هذه الوجهة."
          },
          "secret_shared_key": {
            "type": "string",
            "description": "سر توقيع هذه الوجهة (token آمن للاستخدام في عناوين URL بطول 43 حرفاً). تحقق من كل webhook باستخدام سر الوجهة التي أُرسل إليها. يتلقاه المستدعون باستخدام مفتاح API دائماً بالكامل؛ بينما يتلقى مستخدمو Console غير الحاصلين على إذن `read:webhooks` سلسلة فارغة."
          },
          "subscribed_events": {
            "type": "array",
            "uniqueItems": true,
            "description": "أنواع الأحداث المُسلّمة إلى هذه الوجهة. تكون فارغة عندما تم إنشاء الوجهة بدون أحداث، وفي هذه الحالة لا تتلقى أي شيء.",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WebhookConfig": {
        "type": "object",
        "description": "تكوين webhook على مستوى التطبيق، وسياسة الاحتفاظ بالبيانات، ومضيفو إرجاع محفظة الهوية الرقمية، مع كل وجهة webhook.",
        "required": [
          "webhook_url",
          "webhook_version",
          "secret_shared_key",
          "capture_method",
          "data_retention_months",
          "face_retention_policy",
          "face_retention_days",
          "available_events",
          "allowed_return_hosts",
          "endpoints"
        ],
        "properties": {
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط webhook على مستوى التطبيق (القديم). يرسل Didit إليه فقط في حال عدم وجود وجهة مفعّلة للتطبيق، وحينها يرسل `status.updated` و`data.updated` فقط. كل عملية إنشاء أو تحديث أو حذف لوجهة تضبطه على عنوان URL لأقدم وجهة مفعّلة، أو `null` عند عدم وجود أي وجهة مفعّلة."
          },
          "webhook_version": {
            "type": "string",
            "enum": [
              "v1",
              "v2",
              "v3"
            ],
            "description": "إصدار payload لـ `webhook_url` القديم. لكل وجهة `webhook_version` خاص بها."
          },
          "secret_shared_key": {
            "type": "string",
            "description": "سر التوقيع على مستوى التطبيق (token آمن لعناوين URL مكوّن من 43 حرفاً). يقوم بتوقيع عمليات التسليم المرسلة إلى `webhook_url` القديم فقط؛ بينما توقّع كل وجهة باستخدام `secret_shared_key` الخاص بها. يستلمه مستدعو مفتاح API دائماً بالكامل؛ بينما يتلقى مستخدمو Console الذين لا يملكون إذن `read:webhooks` سلسلة فارغة."
          },
          "capture_method": {
            "type": "string",
            "enum": [
              "MOBILE",
              "MOBILE_AND_DESKTOP"
            ],
            "description": "إعداد تطبيق قديم. لا يقرأه سير التحقق: خيارات الالتقاط يتم تكوينها لكل سير عمل."
          },
          "data_retention_months": {
            "type": "integer",
            "nullable": true,
            "minimum": 1,
            "maximum": 120,
            "description": "نافذة الحذف التلقائي. تُحذف جلسات التحقق من المستخدمين التي تم إنشاؤها قبل أكثر من هذا العدد من الأشهر (الشهر يُحسب كـ 30 يومًا) تلقائيًا، وهذا الحذف لا يمكن التراجع عنه. تعني القيمة `null` أنه لا يتم حذف الجلسات تلقائيًا أبدًا. راجع [الاحتفاظ بالبيانات](https://docs.didit.me/ar/console/data-retention)."
          },
          "face_retention_policy": {
            "type": "string",
            "enum": [
              "delete_with_session",
              "retain_until_user_deleted"
            ],
            "description": "ما يحدث لتضمين الوجه الخاص بالجلسة عند حذف الجلسة. `delete_with_session` (افتراضي) يحذفه مع الجلسة. `retain_until_user_deleted` هو خيار الاشتراك في [الاحتفاظ بالقالب البيومتري](https://docs.didit.me/ar/console/data-retention#الاحتفاظ-بالقالب-البيومتري): تتم إدارة قالب بيومتري خالٍ من الصور مرتبط بالمستخدم (User) بشكل منفصل حتى تنتهي فترة الاحتفاظ به، أو يُحذف المستخدم، أو تقوم بمسحه."
          },
          "face_retention_days": {
            "type": "integer",
            "nullable": true,
            "minimum": 1,
            "maximum": 3650,
            "description": "فترة الاحتفاظ، بالأيام، بالقوالب البيومترية بموجب `retain_until_user_deleted`. مطلوبة عند تعيين تلك السياسة."
          },
          "biometric_consent_mode": {
            "type": "string",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "description": "متى يطلب التدفق المستضاف وحزم SDK الأصلية من الشخص الموافقة البيومترية الصريحة قبل التقاط الوجه. يطلب `auto` (الافتراضي) فقط عند انطباق مُشغِّل: ولاية مُعلنة، أو عنوان IP الخاص بالشخص، أو جهة إصدار مستند الهوية في إلينوي أو تكساس أو كولورادو، أو يبدو أن الشخص في الولايات المتحدة دون ولاية معروفة. يطلب `always` من كل شخص يلتقط سير العمل الخاص به وجهاً. لا يعرض `never` الخطوة أبداً، وتقوم بجمع الموافقة بنفسك قبل التقاط صورة سيلفي. يتم تسجيل كل تغيير في سجل التدقيق. راجع [الموافقة البيومترية](https://docs.didit.me/ar/getting-started/biometric-consent)."
          },
          "available_events": {
            "type": "array",
            "description": "كل نوع حدث يمكن للوجهة الاشتراك فيه، مع تسمية للعرض.",
            "items": {
              "type": "object",
              "required": [
                "value",
                "label"
              ],
              "properties": {
                "value": {
                  "$ref": "#/components/schemas/WebhookEvent"
                },
                "label": {
                  "type": "string",
                  "description": "تسمية العرض، على سبيل المثال `Session status updated`."
                }
              }
            }
          },
          "allowed_return_hosts": {
            "type": "array",
            "maxItems": 20,
            "description": "أسماء المضيفين (تطابق تام، عبر HTTPS فقط) التي يجوز لعملية تحقق مستقلة من محفظة الهوية الرقمية إعادة المستخدم إليها عبر `return_url`. يُسمح دائماً بنطاق العلامة البيضاء الخاص بك أيضاً. راجع [تسجيل وجهة الإرجاع الخاصة بك](https://docs.didit.me/ar/standalone-apis/digital-id-wallets#سجّل-وجهة-العودة-الخاصة-بك).",
            "items": {
              "type": "string",
              "maxLength": 253
            }
          },
          "endpoints": {
            "type": "array",
            "description": "كل وجهة webhook للتطبيق، الأقدم أولاً، مع سر التوقيع الخاص بكل منها. للقراءة فقط هنا: يمكنك إدارة الوجهات باستخدام endpoints الخاصة بـ `/v3/webhook/destinations/`.",
            "items": {
              "$ref": "#/components/schemas/WebhookConfigDestination"
            }
          },
          "allowed_domains": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string",
              "maxLength": 300
            },
            "description": "الأصول (على سبيل المثال `https://app.example.com`؛ و`http` لـ `localhost` فقط) التي قد يتم تضمين سير عمل التحقق المستضاف فيها، وقد يُعاد إرسال المستخدم إليها عبر استدعاء رجوعي للجلسة. لا تتأثر الاستدعاءات بين الخوادم. تعني القائمة الفارغة عدم وجود أي قيود. يخزن Didit كل أصل بأحرف صغيرة دون منفذ افتراضي. أي إدخال غير صالح يفشل بخطأ `400` في `allowed_domains`.",
            "example": [
              "https://app.example.com"
            ]
          }
        }
      },
      "WebhookDestinationDelivery": {
        "type": "object",
        "description": "محاولة تسليم واحدة إلى وجهة webhook. يعتبر الإرسال الأول للحدث، وكل إعادة محاولة تلقائية، وكل إعادة إرسال عمليات تسليم منفصلة.",
        "required": [
          "uuid",
          "session_id",
          "request_url",
          "response_status",
          "response_time_ms",
          "status",
          "webhook_type",
          "created_at"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف التسليم، لطلبات التفاصيل وإعادة الإرسال."
          },
          "session_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "جلسة التحقق من المستخدمين التي يتعلق بها الحدث. `null` لأحداث جلسة الشركة، والمستخدم، والشركة، والمعاملة، وTravel Rule، وسير العمل."
          },
          "request_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط URL الذي أُرسل إليه التسليم: رابط URL الخاص بالوجهة عند إنشاء الحدث."
          },
          "response_status": {
            "type": "integer",
            "nullable": true,
            "description": "حالة HTTP التي أرجعها الـ endpoint الخاص بك. `null` طالما أن التسليم في قائمة الانتظار ولم تتم محاولته بعد. عندما لا يتم تلقي أي استجابة HTTP، تسجل Didit حالة خاصة بها: `504` عندما لم يُجب الـ endpoint الخاص بك في غضون 5 ثوانٍ، و`503` لفشل الاتصال، و`400` عندما تم رفض عنوان URL لعدم أمانه (على سبيل المثال عنوان خاص أو داخلي)، و`404` لأي خطأ آخر في الطلب. يُعتبر الرمز `400` أو أعلى تسليمًا فاشلاً."
          },
          "response_time_ms": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "description": "الوقت الذي استغرقته المحاولة بالمللي ثانية. يكون `null` عندما يكون التسليم في قائمة الانتظار."
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "الحالة التي أبلغ عنها الحدث عند إنشائه: حالة الجلسة لأحداث الجلسة (على سبيل المثال `Approved` أو `In Review`)، وحالة الشخص أو الشركة لأحداث المستخدم والشركة، وحالة المعاملة لأحداث المعاملات. وتكون `null` للأحداث التي لا تحمل أي حالة."
          },
          "webhook_type": {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت إنشاء التسليم."
          }
        }
      },
      "WebhookDestinationDeliveryDetail": {
        "type": "object",
        "description": "محاولة تسليم واحدة إلى وجهة webhook، مع رؤوس وجسم الطلب الفعليين اللذين أرسلتهما Didit تماماً.",
        "required": [
          "uuid",
          "session_id",
          "request_url",
          "response_status",
          "response_time_ms",
          "status",
          "webhook_type",
          "created_at",
          "request_header",
          "request_body"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف التسليم، لطلبات التفاصيل وإعادة الإرسال."
          },
          "session_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "جلسة التحقق من المستخدمين التي يتعلق بها الحدث. `null` لأحداث جلسة الشركة، والمستخدم، والشركة، والمعاملة، وTravel Rule، وسير العمل."
          },
          "request_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط URL الذي أُرسل إليه التسليم: رابط URL الخاص بالوجهة عند إنشاء الحدث."
          },
          "response_status": {
            "type": "integer",
            "nullable": true,
            "description": "حالة HTTP التي أرجعها الـ endpoint الخاص بك. `null` طالما أن التسليم في قائمة الانتظار ولم تتم محاولته بعد. عندما لا يتم تلقي أي استجابة HTTP، تسجل Didit حالة خاصة بها: `504` عندما لم يُجب الـ endpoint الخاص بك في غضون 5 ثوانٍ، و`503` لفشل الاتصال، و`400` عندما تم رفض عنوان URL لعدم أمانه (على سبيل المثال عنوان خاص أو داخلي)، و`404` لأي خطأ آخر في الطلب. يُعتبر الرمز `400` أو أعلى تسليمًا فاشلاً."
          },
          "response_time_ms": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "description": "الوقت الذي استغرقته المحاولة بالمللي ثانية. يكون `null` عندما يكون التسليم في قائمة الانتظار."
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "الحالة التي أبلغ عنها الحدث عند إنشائه: حالة الجلسة لأحداث الجلسة (على سبيل المثال `Approved` أو `In Review`)، وحالة الشخص أو الشركة لأحداث المستخدم والشركة، وحالة المعاملة لأحداث المعاملات. وتكون `null` للأحداث التي لا تحمل أي حالة."
          },
          "webhook_type": {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت إنشاء التسليم."
          },
          "request_header": {
            "type": "string",
            "description": "نص JSON (سلسلة نصية) لرؤوس الطلب التي أرسلتها Didit: وهي `Content-Type` و`X-Signature` و`X-Signature-V2` و`X-Signature-Simple` و`X-Timestamp` و`User-Agent`. قم بتحليله باستخدام محلل JSON. يحتوي على التوقيعات، ولا يحتوي أبداً على سر التوقيع."
          },
          "request_body": {
            "type": "string",
            "description": "نص JSON (سلسلة نصية) للـ payload الدقيق الذي أرسلته Didit، مع فرز المفاتيح، بما في ذلك `event_id` و`timestamp`. قم بتحليله باستخدام محلل JSON؛ راجع [شكل الـ Payload](https://docs.didit.me/ar/integration/webhooks#بنية-الحمولة). بالنسبة لمفتاح محدد النطاق بدون `media: read`، تكون عناوين URL للوسائط بداخله `null`؛ وبدون `sessions: write`، تكون رموز الجلسات وروابط التحقق المستضافة `null`. محتوى الطلب الذي تم تغييره بهذه الطريقة لا يعود مطابقاً لتوقيعاته. لا تسجل Didit محتوى الاستجابة الذي أرجعه الـ endpoint الخاص بك."
          }
        }
      },
      "SessionWebhookDelivery": {
        "type": "object",
        "description": "محاولة تسليم webhook واحدة مسجلة لجلسة تحقق، مع رؤوس الطلب ومتنه الدقيقة التي أرسلتها Didit.",
        "required": [
          "uuid",
          "session_id",
          "request_url",
          "response_status",
          "status",
          "webhook_type",
          "request_header",
          "request_body",
          "created_at"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف التسليم. استخدمه كـ `{webhook_uuid}` للحصول على عملية التسليم هذه أو إعادة إرسالها."
          },
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "الجلسة التي تنتمي إليها عملية التسليم (الجلسة الموجودة في المسار)."
          },
          "request_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط URL الذي أُرسل إليه التسليم."
          },
          "response_status": {
            "type": "integer",
            "nullable": true,
            "description": "حالة HTTP التي أرجعها الـ endpoint الخاص بك. `null` طالما أن التسليم في قائمة الانتظار ولم تتم محاولته بعد. عندما لا يتم تلقي أي استجابة HTTP، تسجل Didit حالة خاصة بها: `504` عندما لم يُجب الـ endpoint الخاص بك في غضون 5 ثوانٍ، و`503` لفشل الاتصال، و`400` عندما تم رفض عنوان URL لعدم أمانه (على سبيل المثال عنوان خاص أو داخلي)، و`404` لأي خطأ آخر في الطلب. يُعتبر الرمز `400` أو أعلى تسليمًا فاشلاً."
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "حالة الجلسة عند إنشاء الحدث، على سبيل المثال `In Progress` أو `Approved` أو `Declined`."
          },
          "webhook_type": {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          "request_header": {
            "type": "string",
            "description": "نص JSON (سلسلة نصية) لرؤوس الطلب التي أرسلتها Didit: وهي `Content-Type` و`X-Signature` و`X-Signature-V2` و`X-Signature-Simple` و`X-Timestamp` و`User-Agent`. قم بتحليله باستخدام محلل JSON. يحتوي على التوقيعات، ولا يحتوي أبداً على سر التوقيع."
          },
          "request_body": {
            "type": "string",
            "description": "نص JSON (سلسلة نصية) للـ payload الدقيق الذي أرسلته Didit، مع فرز المفاتيح، بما في ذلك `event_id` و`timestamp`. قم بتحليله باستخدام محلل JSON؛ راجع [شكل الـ Payload](https://docs.didit.me/ar/integration/webhooks#بنية-الحمولة). بالنسبة لمفتاح محدد النطاق بدون `media: read`، تكون عناوين URL للوسائط بداخله `null`؛ وبدون `sessions: write`، تكون رموز الجلسات وروابط التحقق المستضافة `null`. محتوى الطلب الذي تم تغييره بهذه الطريقة لا يعود مطابقاً لتوقيعاته. لا تسجل Didit محتوى الاستجابة الذي أرجعه الـ endpoint الخاص بك."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت إنشاء التسليم."
          }
        }
      },
      "SessionEvent": {
        "type": "object",
        "description": "إدخال واحد في الجدول الزمني لأحداث جلسة التحقق.",
        "required": [
          "uuid",
          "event_type",
          "created_at",
          "component",
          "feature_step",
          "step",
          "details",
          "ip_address",
          "user_agent",
          "device_info",
          "file_url",
          "sent_at"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الحدث."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "SESSION_CREATED",
              "SESSION_COMPLETED",
              "SESSION_STATUS_CHANGED",
              "LINK_OPENED",
              "FORM_SUBMITTED",
              "BUTTON_CLICKED",
              "FILE_UPLOADED",
              "ATTEMPT_FAILED",
              "FEATURE_STEP_CHANGED",
              "STEP_RENDERED",
              "NOTE_ADDED",
              "MANUAL_REVIEW_STARTED",
              "WORKFLOW_BRANCH_EVALUATED",
              "WORKFLOW_STATUS_NODE_REACHED",
              "LOG"
            ],
            "description": "ما حدث. يُبلِغ عنه الجهاز أثناء سير العمل المستضاف أو SDK: `LINK_OPENED` و`STEP_RENDERED` و`BUTTON_CLICKED` و`FORM_SUBMITTED` و`FILE_UPLOADED` و`ATTEMPT_FAILED` و`LOG` (تصحيح الأخطاء). يُسجَّل بواسطة الخادم: `SESSION_CREATED` و`SESSION_STATUS_CHANGED` (`details.old_status`، و`details.current_status`) و`FEATURE_STEP_CHANGED` (`details.old_feature_step`، و`details.current_feature_step`) و`WORKFLOW_BRANCH_EVALUATED` و`WORKFLOW_STATUS_NODE_REACHED` (تتبع توجيه سير العمل). يمكن أن تظهر `SESSION_COMPLETED` و`NOTE_ADDED` و`MANUAL_REVIEW_STARTED` في الجلسات القديمة."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت تخزين Didit للحدث. يتم تخزين الأحداث بشكل غير متزامن، بعد ثوانٍ قليلة من `sent_at`."
          },
          "component": {
            "type": "string",
            "nullable": true,
            "description": "مكوّن واجهة المستخدم الذي أبلغ عن الحدث (أحداث الجهاز فقط)."
          },
          "feature_step": {
            "type": "string",
            "nullable": true,
            "enum": [
              "OCR",
              "OCR_BACK",
              "NFC",
              "AML",
              "FACE",
              "LIVENESS",
              "FACE_MATCH",
              "IP_ANALYSIS",
              "AGE_ESTIMATION",
              "PROOF_OF_ADDRESS",
              "PHONE_VERIFICATION",
              "EMAIL_VERIFICATION",
              "FACE_SEARCH",
              "DATABASE_VALIDATION",
              "QUESTIONNAIRE",
              "KYB_REGISTRY",
              "KYB_DOCUMENTS",
              "KYB_KEY_PEOPLE",
              "DOCUMENT_AI",
              "GEOLOCATION",
              null
            ],
            "description": "ميزة التحقق التي كانت الجلسة تستخدمها عند وقوع الحدث."
          },
          "step": {
            "type": "string",
            "nullable": true,
            "description": "الشاشة ضمن الميزة، على سبيل المثال `DOCUMENT_CAPTURE_FRONT` أو `FACE_PASSIVE_LIVENESS`."
          },
          "details": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "بيانات خاصة بالحدث. تعتمد المفاتيح على `event_type`."
          },
          "ip_address": {
            "type": "string",
            "nullable": true,
            "description": "عنوان IP الذي أبلغ الجهاز عن الحدث منه. يكون `null` للأحداث المسجلة على الخادم."
          },
          "user_agent": {
            "type": "string",
            "nullable": true,
            "description": "وكيل المستخدم للجهاز. `null` للأحداث المسجلة عبر الخادم."
          },
          "device_info": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true,
            "description": "تفاصيل الجهاز التي أبلغ عنها الـ SDK أو المتصفح."
          },
          "file_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط موقع مسبقاً قصير الأجل لملف مرفق بالحدث (على سبيل المثال صورة ملتقطة). يكون `null` عندما لا يوجد ملف، ودائماً `null` لمفتاح API ذي نطاق محدد بدون إذن `media: read`."
          },
          "sent_at": {
            "type": "integer",
            "format": "int64",
            "description": "وقت وقوع الحدث، كطابع زمني Unix بالمللي ثانية. يتم ترتيب النتائج بناءً عليه."
          }
        }
      },
      "AMLDatasetSourceFreshness": {
        "type": "object",
        "description": "حداثة عائلة واحدة من مجموعات بيانات AML.",
        "required": [
          "last_updated_at",
          "oldest_updated_at",
          "dataset_count",
          "dated_dataset_count"
        ],
        "properties": {
          "last_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "أحدث تحديث لأي مجموعة بيانات في العائلة."
          },
          "oldest_updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "حد حداثة البيانات: كل مجموعة بيانات في العائلة محدثة على الأقل حتى هذا التاريخ. تكون القيمة `null` عندما لا تُبلّغ مجموعة بيانات واحدة على الأقل في العائلة عن تاريخ تحديث، لأن الحد يصبح حينئذٍ غير معروف."
          },
          "dataset_count": {
            "type": "integer",
            "description": "عدد مجموعات البيانات في العائلة."
          },
          "dated_dataset_count": {
            "type": "integer",
            "description": "عدد مجموعات البيانات تلك التي أبلغت عن تاريخ تحديث."
          }
        }
      },
      "AMLDatasetFreshness": {
        "type": "object",
        "description": "مدى حداثة مجموعات بيانات AML عند تشغيل الفحص. لا يتم تقدير التواريخ أبداً.",
        "required": [
          "captured_at",
          "provider",
          "catalog_version",
          "sources"
        ],
        "properties": {
          "captured_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت قراءة Didit لفهرس مجموعة البيانات الذي استُمدت منه حداثة هذه البيانات."
          },
          "provider": {
            "type": "string",
            "description": "معرّف مبهم لمصدر بيانات AML. تعامل معه كسلسلة نصية مبهمة؛ ولا تتفرع بناءً عليه.",
            "example": "aml_data_source"
          },
          "catalog_version": {
            "type": "string",
            "nullable": true,
            "description": "معرّف إصدار دليل مجموعات البيانات، عندما يُبلغ المصدر عن وجوده."
          },
          "sources": {
            "type": "object",
            "description": "الحداثة لكل عائلة من مجموعات البيانات. العائلة التي لم تبلغ مجموعات بياناتها عن تاريخ تحديث تكون غير موجودة بدلاً من ملئها بـ `null`.",
            "properties": {
              "sanctions": {
                "$ref": "#/components/schemas/AMLDatasetSourceFreshness"
              },
              "pep": {
                "$ref": "#/components/schemas/AMLDatasetSourceFreshness"
              },
              "warnings": {
                "$ref": "#/components/schemas/AMLDatasetSourceFreshness"
              },
              "adverse_media": {
                "$ref": "#/components/schemas/AMLDatasetSourceFreshness"
              }
            }
          }
        }
      },
      "AMLScreeningRun": {
        "type": "object",
        "description": "إعادة فحص مكتملة واحدة للمراقبة المستمرة ضمن فحص AML.",
        "required": [
          "uuid",
          "run_id",
          "completed_at",
          "started_at",
          "outcome",
          "trigger",
          "provider",
          "status",
          "score",
          "total_hits",
          "new_hits",
          "entities_screened",
          "dataset_freshness"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف تشغيل الفحص هذا."
          },
          "run_id": {
            "type": "string",
            "format": "uuid",
            "description": "تشغيل المراقبة الذي ينتمي إليه هذا الفحص. تشترك فيه جميع عمليات التحقق التي فُحصت في نفس التشغيل."
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت انتهاء إعادة فحص هذا الشخص المعني. تُرتّب النتائج بناءً عليه، من الأحدث إلى الأقدم."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى بدأت دفعة المراقبة التي تنتمي إليها إعادة الفحص هذه."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "NO_CHANGE",
              "CHANGED",
              "FAILED"
            ],
            "description": "`NO_CHANGE`: اكتمل ولم تتغير النتيجة. `CHANGED`: اكتمل وتغيرت الدرجة أو الحالة أو عدد التطابقات أو التطابقات نفسها. `FAILED`: لا توجد إجابة قابلة للاستخدام لهذا الموضوع، لذا تُرِك الفحص كما كان."
          },
          "trigger": {
            "type": "string",
            "enum": [
              "ONGOING_MONITORING"
            ],
            "description": "ما بدأ الفحص. دائماً `ONGOING_MONITORING` حالياً."
          },
          "provider": {
            "type": "string",
            "description": "معرّف مبهم لمصدر بيانات AML الذي استجاب. تعامل معه كسلسلة نصية مبهمة؛ ولا تتفرع بناءً عليه.",
            "example": "aml_data_source"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Not Finished",
              "Approved",
              "Declined",
              "In Review",
              "Resub Requested",
              null
            ],
            "description": "حالة فحص AML التي انتهى إليها الفحص في هذا التشغيل."
          },
          "score": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "درجة فحص AML التي انتهى إليها الفحص في هذا التشغيل."
          },
          "total_hits": {
            "type": "integer",
            "nullable": true,
            "description": "عدد النتائج التي ترك هذا التشغيل الفحص عليها."
          },
          "new_hits": {
            "type": "integer",
            "nullable": true,
            "description": "عدد النتائج التي وجدها هذا التشغيل والتي لم تكن موجودة في الفحص من قبل. `0` عندما لم يتم العثور على أي جديد؛ و`null` عندما يفشل التشغيل أو تم تسجيله قبل وجود هذا الإحصاء."
          },
          "entities_screened": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1,
            "description": "عدد الكيانات التي فحصها هذا التشغيل لعملية التحقق: `1` عند فحص الكيان محل الفحص، و`0` عند فشل التشغيل."
          },
          "dataset_freshness": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AMLDatasetFreshness"
              }
            ],
            "nullable": true,
            "description": "مدى حداثة مجموعة البيانات التي يستند إليها هذا التشغيل، أو `null` عند عدم توفر أي تواريخ."
          }
        }
      },
      "KYBKeyPeopleParty": {
        "type": "object",
        "description": "طرف من الأشخاص الرئيسيين (Key People) في جلسة التحقق من الشركات (KYB)، مع التحقق الفرعي التابع له. يظهر الطرف نفسه في `key_people_checks[].submitted.parties[]` لقرار جلسة الشركة.",
        "required": [
          "uuid",
          "entity_type",
          "source",
          "name",
          "is_active",
          "is_skipped",
          "requires_verification",
          "roles",
          "kyc_session_deleted",
          "kyb_sub_session_deleted"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الطرف."
          },
          "entity_type": {
            "type": "string",
            "enum": [
              "person",
              "company"
            ],
            "description": "ما إذا كان الطرف فرداً أو شركة."
          },
          "source": {
            "type": "string",
            "enum": [
              "REGISTRY",
              "USER"
            ],
            "description": "`REGISTRY`: مأخوذ من سجل الشركات. `USER`: مُدخل في شاشة Key People."
          },
          "name": {
            "type": "string",
            "description": "اسم العرض للطرف."
          },
          "first_name": {
            "type": "string",
            "nullable": true,
            "description": "الاسم الأول (للأشخاص)."
          },
          "last_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم العائلة (للأشخاص)."
          },
          "company_name": {
            "type": "string",
            "nullable": true,
            "description": "اسم الشركة (أطراف الشركات)."
          },
          "registration_number": {
            "type": "string",
            "nullable": true,
            "description": "رقم تسجيل الشركة (أطراف الشركات)."
          },
          "email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "description": "البريد الإلكتروني الذي يتم إرسال رابط التحقق إليه."
          },
          "nationality": {
            "type": "string",
            "nullable": true,
            "description": "الجنسية للأفراد، ودولة التأسيس للشركات."
          },
          "phone_number": {
            "type": "string",
            "nullable": true,
            "description": "رقم الهاتف الذي تم جمعه للطرف المعني."
          },
          "date_of_birth": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "تاريخ الميلاد (للأشخاص)."
          },
          "position": {
            "type": "string",
            "nullable": true,
            "description": "المسمى الوظيفي بنص حر (للأشخاص)."
          },
          "custom_fields": {
            "type": "object",
            "additionalProperties": true,
            "description": "حقول مخصصة محددة في سير العمل تم جمعها للطرف، ومفهرسة بمفتاح الحقل."
          },
          "is_active": {
            "type": "boolean",
            "description": "ما إذا كان الطرف نشطاً."
          },
          "is_skipped": {
            "type": "boolean",
            "description": "ما إذا كان الطرف معفياً من التحقق. تؤدي إعادة الإنشاء إلى مسحها."
          },
          "requires_verification": {
            "type": "boolean",
            "description": "ما إذا كانت قواعد الدور والملكية تتطلب عملية تحقق لهذا الطرف."
          },
          "roles": {
            "type": "array",
            "description": "الأدوار التي يشغلها الطرف في الشركة.",
            "items": {
              "type": "object",
              "required": [
                "role",
                "ownership_percent",
                "voting_percent"
              ],
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "director",
                    "non_executive_director",
                    "secretary",
                    "chairman",
                    "ubo",
                    "shareholder",
                    "representative",
                    "founder",
                    "legal_advisor",
                    "authorized_signatory",
                    "trustee",
                    "beneficiary",
                    "settlor",
                    "protector",
                    "company_officer",
                    "investor",
                    "other"
                  ],
                  "description": "رمز الدور."
                },
                "ownership_percent": {
                  "type": "number",
                  "nullable": true,
                  "description": "نسبة الملكية لهذا الدور، عندما تكون معروفة."
                },
                "voting_percent": {
                  "type": "number",
                  "nullable": true,
                  "description": "نسبة حقوق التصويت لهذا الدور، عند معرفتها."
                }
              }
            }
          },
          "kyc_session_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "جلسة KYC فردية فرعية (الأفراد)."
          },
          "kyc_session_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Not Started",
              "In Progress",
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned",
              "Kyc Expired",
              "Resubmitted",
              "Awaiting User",
              null
            ],
            "description": "حالة جلسة KYC الفرعية. تحتفظ الجلسة المحذوفة بالحالة التي كانت عليها عند حذفها."
          },
          "kyc_session_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "الرابط المستضاف لجلسة KYC الفرعية. يكون `null` عند عدم وجود جلسة أو إذا تم حذفها، وكذلك لمفتاح API ذي نطاق محدد دون صلاحية `sessions: write`."
          },
          "kyc_session_deleted": {
            "type": "boolean",
            "description": "تم حذف جلسة KYC الفرعية، لذا لا يمكن تسويتها أبداً."
          },
          "kyb_sub_session_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "جلسة KYB فرعية (أطراف الشركات)."
          },
          "kyb_sub_session_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Not Started",
              "In Progress",
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned",
              "Kyc Expired",
              "Resubmitted",
              "Awaiting User",
              null
            ],
            "description": "حالة جلسة KYB الفرعية."
          },
          "kyb_sub_session_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "الرابط المستضاف لجلسة KYB الفرعية، مع تطبيق نفس قواعد `null` الخاصة بـ `kyc_session_url`."
          },
          "kyb_sub_session_deleted": {
            "type": "boolean",
            "description": "المقابل الخاص بطرف الشركة لـ `kyc_session_deleted`."
          },
          "verification_workflow_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "kyc",
              "kyb",
              "adaptive_age_verification",
              "biometric_authentication",
              "address_verification",
              "questionnaire_verification",
              "email_verification",
              "phone_verification",
              null
            ],
            "description": "نوع سير العمل الذي تشغله الجلسة الفرعية."
          },
          "verification_workflow_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "سير العمل الذي تشغّله الجلسة الفرعية."
          },
          "verification_workflow_label": {
            "type": "string",
            "nullable": true,
            "description": "تسمية سير العمل هذا."
          },
          "verification_workflow_features": {
            "type": "array",
            "nullable": true,
            "description": "ميزات سير عمل الجلسة الفرعية مع حالتها الحالية.",
            "items": {
              "type": "object",
              "required": [
                "feature",
                "status"
              ],
              "properties": {
                "feature": {
                  "type": "string",
                  "description": "رمز الميزة، على سبيل المثال `ID_VERIFICATION` أو `LIVENESS`."
                },
                "status": {
                  "type": "string",
                  "description": "حالة الميزة، وتكون `Not Finished` حتى يتم تشغيلها."
                }
              }
            }
          },
          "didit_internal_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "معرّف Didit للشخص الذي تم التحقق منه، بمجرد معرفته."
          }
        }
      },
      "TravelRuleDelivery": {
        "type": "object",
        "description": "حالة آخر رسالة يتعين على التحويل إرسالها إلى الطرف المقابل. تتواصل Didit مع الطرف المقابل بعد عودة استجابة الطلب الذي أنشأ التحويل أو عدّله، لذا يوضح هذا الكائن ما إذا كانت تلك الرسالة قد وصلت: في قائمة الانتظار (queued)، أو قيد الإرسال (being sent)، أو في انتظار إعادة المحاولة بعد حدوث خطأ (waiting to be retried after an error)، أو تم تسليمها (delivered)، أو فشلت (failed). عند حدوث فشل قد تتعافى منه الشبكة لاحقاً (عدم وجود رد في الوقت المحدد، أو فشل الاتصال، أو رموز HTTP `408` أو `429` أو `5xx`)، تتم إعادة المحاولة بعد 30 ثانية، ودقيقتين، و10 دقائق، و30 دقيقة، وساعة واحدة. عندما تفشل الرسالة الأولى (`kind: SEND`) نهائياً، إما لأن الشبكة رفضتها أو لأن المحاولة السادسة فشلت أيضاً، ينتقل التحويل إلى `COUNTERPARTY_VASP_NOT_REACHABLE` مع تسجيل `last_error` في `timeline` الخاص به؛ وأي رسالة أخرى تفشل نهائياً يتم تدوينها في `timeline`. وتظل `status` الخاصة بالتحويل هي المصدر الموثوق للمعلومة بخصوص عملية التبادل نفسها.",
        "required": [
          "kind",
          "status",
          "rail",
          "attempts",
          "last_error",
          "next_attempt_at",
          "delivered_at"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "SEND",
              "ANSWER",
              "TXID",
              "CANCEL",
              "POLL"
            ],
            "description": "ما تحمله الرسالة. `SEND`: أول رسالة للتحويل تُرسل إلى الطرف المقابل (صادرة؛ يتم اختيار المسار عند إرسالها). `ANSWER`: قبولك أو رفضك، المرسل إلى الشبكة التي قدمت الطلب (واردة). `TXID`: تجزئة المعاملة على السلسلة، بعد إنهاء التحويل. `CANCEL`: الإلغاء، بعد إلغائه. `POLL`: استعلام عن الحالة إلى شبكة تتيح ذلك، ويتكرر كل 5 دقائق أثناء انتظار التحويل للطرف المقابل."
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED",
              "SENDING",
              "RETRYING",
              "DELIVERED",
              "FAILED"
            ],
            "description": "`QUEUED`: في انتظار الإرسال. `SENDING`: هناك محاولة قيد التشغيل. `RETRYING`: فشلت محاولة وستعمل المحاولة التالية في `next_attempt_at`. `DELIVERED`: استلم الطرف الآخر الرسالة. `FAILED`: رفضها الطرف الآخر، أو فشلت المحاولة الأخيرة."
          },
          "rail": {
            "type": "string",
            "enum": [
              "INTERNAL",
              "TRP",
              "GTR",
              "TRUST",
              "VERIFYVASP",
              "SYGNA",
              "EMAIL",
              ""
            ],
            "description": "المسار الذي ينقل الرسالة. يكون فارغاً حتى تختار Didit مساراً للرسالة الأولى."
          },
          "attempts": {
            "type": "integer",
            "minimum": 0,
            "description": "المحاولات التي تمت حتى الآن لهذه الرسالة. تتم محاولة إرسال الرسالة التي لا تُعد استطلاعاً للحالة 6 مرات على الأكثر."
          },
          "last_error": {
            "type": "string",
            "description": "نوع الفشل الذي واجهته المحاولة الأخيرة، أو `\"\"` في حال عدم وجود فشل: على سبيل المثال `email undeliverable` أو `trp identity endpoint unreachable` أو `trp transfer inquiry delivery failed`. ولا يحمل أبداً إجابة الطرف المقابل نفسها، والتي تبقى في `timeline` الخاص بالتحويل.\nعندما يستجيب GTR بخطأ، يتم تضمين رمز الحالة ورسالته الخاصة. لا يتم تضمين أجسام الاستجابة أبداً.",
            "example": "email undeliverable"
          },
          "next_attempt_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى يتم تشغيل المحاولة التالية بينما تكون الرسالة بحالة `QUEUED` أو `RETRYING`."
          },
          "delivered_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى استلم الطرف الآخر الرسالة."
          }
        }
      },
      "TravelRuleDiscoveryStep": {
        "type": "object",
        "description": "خطوة واحدة من عملية اكتشاف الطرف المقابل التي أجراها Didit لتحويل صادر، بالترتيب الذي تم تنفيذها به. تنتهي السلسلة بأول خطوة تحدد VASP له مسار.",
        "properties": {
          "step": {
            "type": "string",
            "enum": [
              "internal_address_book",
              "wallet_attribution",
              "network_lookup",
              "customer_hint",
              "end_user"
            ],
            "description": "`internal_address_book`: عميل آخر لـ Didit أثبت تحكمه في محفظة الوجهة. `wallet_attribution`: إسناد تحليلات البلوكتشين إلى المحفظة. `network_lookup`: شبكة يمكنها تحديد أي VASP يحتفظ بالعنوان. `customer_hint`: اسم VASP أو معرّف الكيان القانوني (LEI) أو الولاية القضائية التي أرسلتها في `beneficiary_data`. `end_user`: الطرف المقابل الذي اختاره المستخدم النهائي (أو أنت)، أو طلب اختياره."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "match",
              "miss",
              "skipped"
            ],
            "description": "`match`: حددت الخطوة طرفاً مقابلاً. `miss`: تم تشغيلها ولم تعثر على أي طرف. `skipped`: تعذر تشغيلها، ويوضح `reason` السبب."
          },
          "reason": {
            "type": "string",
            "description": "سبب مقروء آلياً، ويكون `\"\"` عند وجود تطابق: `no_proven_internal_wallet`، أو `attribution_disabled`، أو `already_attributed`، أو `no_attributed_entity`، أو `directory_match_no_route`، أو `gtr_address_lookup_runs_on_dispatch`، أو `no_membership`، أو `network_switched_off`، أو `no_network_address_lookup`، أو `no_directory_match`، أو `awaiting_end_user`، أو `picked_member_without_proven_wallet`."
          },
          "vasp": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "الـ VASP الموجود في الدليل الذي حددته الخطوة، إذا حددت واحداً."
          },
          "rail": {
            "type": "string",
            "nullable": true,
            "description": "المسار الذي يصل إلى ذلك الطرف المقابل، عندما تعثر الخطوة على مسار."
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TravelRuleNextAction": {
        "type": "object",
        "description": "إجراء واحد ينقل تحويلاً بحالة `COUNTERPARTY_VASP_NOT_FOUND` أو `COUNTERPARTY_VASP_NOT_REACHABLE` إلى المرحلة التالية. راجع [أسباب تعثر التحويل](/ar/transaction-monitoring/travel-rule#لماذا-يتوقف-التحويل).",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "select_counterparty_vasp",
              "declare_self_hosted",
              "add_vasp_hint",
              "update_compliance_email",
              "resend"
            ],
            "description": "`select_counterparty_vasp`: يختار المستخدم النهائي VASP الوجهة في أداة إثبات ملكية المحفظة، أو تقوم بتنفيذ PATCH مع `action=beneficiary_vasp`. `declare_self_hosted`: يصرّح المستخدم النهائي بأن المحفظة ذاتية الاستضافة في الأداة. `add_vasp_hint`: أبلغ Didit بهوية الطرف المقابل، باستخدام اسم VASP، أو LEI، أو Travel Address (على سبيل المثال `travel_address` في إدخال دفتر العناوين الخاص بمحفظة الوجهة)، ثم أعد الإرسال. `update_compliance_email` و`resend` هما قيمتان للمعامل `action` في `PATCH /v3/transactions/{transaction_id}/travel-rule/`: أرسل البريد الإلكتروني للامتثال الخاص بالطرف المقابل مجدداً، وأعد تشغيل التوجيه."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "رابط أداة ملكية المحفظة، في `select_counterparty_vasp` و`declare_self_hosted` أثناء وجود جلسة أداة مفتوحة للتحويل."
          }
        },
        "required": [
          "action"
        ]
      },
      "TransactionTravelRule": {
        "type": "object",
        "description": "تحويل Travel Rule الخاص بالمعاملة، كما تُرجعه `GET /v3/transactions/{transaction_id}/`، والرمز `201` لـ `POST /v3/transactions/` وكل صف في `GET /v3/transactions/`. تتخذ الحقول `direction` و `rail` و `counterparty_vasp` و `delivery` و `discovery` و `reason` و `next_actions` الهيكل نفسه الموجود في `PATCH /v3/transactions/{transaction_id}/travel-rule/`، لذا فإن قراءة واحدة للمعاملة توضح سبب تعثر تحويلها وما الذي يدفعه للمضي قدماً.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "protocol": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "obligations_count": {
            "type": "integer"
          },
          "originator_data": {
            "type": "object",
            "description": "جهة المُرسِل. بالنسبة للتحويلات الواردة، يتم حجب قيم الطرف المقابل حتى يتم تأكيد الملكية."
          },
          "beneficiary_data": {
            "type": "object",
            "description": "طرف المستفيد. بالنسبة للتحويلات الواردة، يتم حجب قيم الطرف المقابل حتى يتم تأكيد الملكية."
          },
          "name_match": {
            "type": "object",
            "nullable": true,
            "description": "مقارنة الاسم التي حسمت التحويل (الدرجة والصرامة). تظل Null حتى يتم تشغيل مقارنة واحدة. يتم إخفاء الأسماء المقارنة مع الأطراف."
          },
          "data_match": {
            "$ref": "#/components/schemas/TravelRuleDataMatch"
          },
          "mismatched_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "اختصار لـ `data_match.mismatched_fields`. يكون فارغاً عندما لا يختلف أي شيء."
          },
          "data_unmasked": {
            "$ref": "#/components/schemas/TravelRuleDataUnmasked"
          },
          "data_masked": {
            "type": "boolean",
            "description": "صحيح طالما أن البيانات الشخصية للطرف المقابل محجوبة في هذه الاستجابة."
          },
          "metadata": {
            "type": "object"
          },
          "direction": {
            "type": "string",
            "enum": [
              "INBOUND",
              "OUTBOUND"
            ],
            "description": "أي طرف في التبادل يمثله هذا التحويل."
          },
          "rail": {
            "type": "string",
            "nullable": true,
            "description": "المسار الذي تم التحويل عبره: `INTERNAL`، أو `TRP`، أو `GTR`، أو `TRUST`، أو `VERIFYVASP`، أو `SYGNA`، أو `EMAIL` (`TEST_VASP` في تطبيق يعمل في البيئة التجريبية، عندما يجيب Didit Test VASP)، أو `null` حتى يتم اختيار مسار."
          },
          "counterparty_vasp": {
            "type": "object",
            "nullable": true,
            "properties": {
              "name": {
                "type": "string"
              },
              "lei": {
                "type": "string"
              },
              "dd_score": {
                "type": "integer",
                "description": "درجة العناية الواجبة من 0 إلى 100، حيث تكون القيمة الأعلى أفضل. نفس المقياس المعتمد في دليل VASP."
              },
              "dd_score_breakdown": {
                "type": "object",
                "description": "مساهمات كل مكون في dd_score، كائن واحد لكل مكون كما هو موضح في دليل VASP (الاختصاص القضائي، التحقق، البروتوكول، معرّف الكيان القانوني LEI، السجل، الأساسيات، الاستجابة)، كل منها يحتوي على {points, max, reason, detail}. تكون القيمة {} حتى يتم تقييم الطرف المقابل.",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "points": {
                      "type": "number",
                      "description": "النقاط الممنوحة لهذا المكوّن."
                    },
                    "max": {
                      "type": "integer",
                      "description": "الحد الأقصى للنقاط التي يمكن لهذا المكوّن منحها."
                    },
                    "reason": {
                      "type": "string",
                      "description": "رمز مقروء آلياً لقرار المكوّن."
                    },
                    "detail": {
                      "type": "string",
                      "description": "سبب مقروء للبشر للنقاط الممنوحة."
                    }
                  }
                }
              },
              "dd_assessed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت آخر تشغيل لتقييم العناية الواجبة. القيمة Null حتى يتم تقييم الطرف المقابل."
              }
            },
            "description": "إدخال الدليل للطرف المقابل، أو `null` إذا لم يربط التحويل أي إدخال."
          },
          "delivery": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleDelivery"
              }
            ],
            "description": "أحدث رسالة تدين بها عملية التحويل لطرف آخر. تكون `null` عندما لا تدين بأي رسالة، على سبيل المثال عند كون القيمة أقل من `threshold_amount` أو في حالة محفظة ذاتية الاستضافة مصرّح بها."
          },
          "discovery": {
            "type": "array",
            "description": "كيف بحثت Didit عن الطرف المقابل، إدخال واحد لكل خطوة تم تشغيلها. يكون فارغاً عند عدم تشغيل أي عملية اكتشاف، على سبيل المثال في المعاملات الواردة.",
            "items": {
              "$ref": "#/components/schemas/TravelRuleDiscoveryStep"
            }
          },
          "reason": {
            "type": "string",
            "description": "سبب تعثر معاملة بحالة `COUNTERPARTY_VASP_NOT_FOUND` أو `COUNTERPARTY_VASP_NOT_REACHABLE`؛ وتكون `\"\"` لأي حالة أخرى. يُحدد فشل التسليم ذلك أولاً، في حالة `COUNTERPARTY_VASP_NOT_REACHABLE` فقط: `email_undeliverable` (رفض مزود البريد رسالة الامتثال الإلكترونية ولم يتبق أي عنوان لتجربته: عند إرسالها، أو في رسالة تذكير، أو كارتداد دائم تم الإبلاغ عنه لاحقاً) أو `delivery_failed` (فشل مسار التسليم نهائياً: رفض مسار الشبكة الرسالة أو استنفد محاولات إعادة المحاولة، أو لم يستجب مضيف هوية `TRP`، أو لم يقبل مضيف `TRP` الخاص بالطرف المقابل الاستعلام). وإلا فإن تتبع `discovery` يحدد ذلك: `awaiting_end_user` (لم تُحدد أي خطوة طرفاً مقابلاً يمكن لـ Didit الوصول إليه)، أو `directory_match_no_route` (حددت إحدى الخطوات VASP في الدليل ليس لديه مسار)، أو `picked_member_without_proven_wallet` (اختار المستخدم النهائي أحد عملاء Didit الذي لم يثبت سيطرته على المحفظة)، أو `no_directory_match` عندما لا يُقدم التتبع أي سبب آخر. تؤدي إعادة الإرسال إلى تحريك المعاملة، وبالتالي يتم مسح السبب. راجع [سبب تعثر المعاملة](/ar/transaction-monitoring/travel-rule#لماذا-يتوقف-التحويل)."
          },
          "next_actions": {
            "type": "array",
            "description": "ما يتيح متابعة التحويل؛ `[]` لأي حالة باستثناء `COUNTERPARTY_VASP_NOT_FOUND` أو `COUNTERPARTY_VASP_NOT_REACHABLE`. يتيح `email_undeliverable` خيار `update_compliance_email`، ثم `resend`. ويتيح `delivery_failed` خيار `resend`. ويتيح سبب الاكتشاف `select_counterparty_vasp` و `declare_self_hosted` و `add_vasp_hint` و `resend`.",
            "items": {
              "$ref": "#/components/schemas/TravelRuleNextAction"
            }
          },
          "chain_details": {
            "$ref": "#/components/schemas/TravelRuleChainDetails"
          }
        }
      },
      "NetworkListCounts": {
        "type": "object",
        "description": "أعداد الشبكات لطرق عرض القائمة وخيارات التصفية، مع احتساب كل شبكة مرة واحدة فقط. يتم إرجاعها فقط عندما لا تكون قيمة `summary` هي `false`. تحسب `scopes` كل شبكة مرئية للتطبيق. وتحسب `views` الشبكات المرئية داخل `scope` المحدد. بينما تحسب `facets` الشبكات في `scope` المحدد وعرض `status` (تُستبعد الشبكات المتجاهلة ما لم يتضمنها `status`). لا تغيّر عوامل تصفية القائمة الأخرى هذه الأعداد.",
        "properties": {
          "scopes": {
            "type": "object",
            "description": "الشبكات المرئية حسب المنتج.",
            "properties": {
              "all": {
                "type": "integer"
              },
              "identity": {
                "type": "integer",
                "description": "كل شبكة أخرى."
              },
              "transactions": {
                "type": "integer",
                "description": "الشبكات التي يكون جميع أعضائها أطرافاً في المعاملة."
              }
            }
          },
          "views": {
            "type": "object",
            "description": "الشبكات المرئية داخل `scope` المحدّد، حسب الحالة، بالإضافة إلى عرضين محفوظين.",
            "properties": {
              "all": {
                "type": "integer"
              },
              "active": {
                "type": "integer"
              },
              "in_review": {
                "type": "integer"
              },
              "resolved": {
                "type": "integer"
              },
              "dismissed": {
                "type": "integer"
              },
              "mine": {
                "type": "integer",
                "description": "الشبكات المعيّنة لعضو لوحة التحكم الذي يجري الاستدعاء. تكون القيمة دائماً 0 لمفتاح API."
              },
              "high_risk": {
                "type": "integer",
                "description": "الشبكات التي تبلغ درجة مخاطرها 80 أو أكثر ولم يتم تجاهلها."
              }
            }
          },
          "facets": {
            "type": "object",
            "description": "أعداد كل خيار تصفية، داخل `scope` المحدد وعرض الحالة.",
            "properties": {
              "total": {
                "type": "integer",
                "description": "الشبكات في `scope` المحدد وعرض الحالة."
              },
              "last_activity_days": {
                "type": "object",
                "description": "الشبكات التي شهدت نشاطاً خلال آخر 7 و30 و90 يوماً، مفهرسة بحسب عدد الأيام.",
                "properties": {
                  "7": {
                    "type": "integer"
                  },
                  "30": {
                    "type": "integer"
                  },
                  "90": {
                    "type": "integer"
                  }
                }
              },
              "risk_min": {
                "type": "object",
                "description": "الشبكات التي تبلغ درجة المخاطر لها 50 على الأقل و80 على الأقل، مفهرسة بحسب الحد.",
                "properties": {
                  "50": {
                    "type": "integer"
                  },
                  "80": {
                    "type": "integer"
                  }
                }
              },
              "signal_types": {
                "type": "object",
                "description": "الشبكات التي تحتوي على إشارة واحدة على الأقل من كل نوع.",
                "properties": {
                  "ip_address": {
                    "type": "integer"
                  },
                  "device": {
                    "type": "integer"
                  },
                  "face": {
                    "type": "integer"
                  },
                  "document_number": {
                    "type": "integer"
                  },
                  "phone": {
                    "type": "integer"
                  },
                  "email": {
                    "type": "integer"
                  },
                  "address": {
                    "type": "integer"
                  }
                }
              },
              "priority": {
                "type": "object",
                "description": "الشبكات حسب الأولوية. تحسب `none` الشبكات التي ليس لها أولوية.",
                "properties": {
                  "low": {
                    "type": "integer"
                  },
                  "medium": {
                    "type": "integer"
                  },
                  "high": {
                    "type": "integer"
                  },
                  "none": {
                    "type": "integer"
                  }
                }
              },
              "assignee": {
                "type": "object",
                "description": "الشبكات حسب الشخص المعيّن.",
                "properties": {
                  "me": {
                    "type": "integer",
                    "description": "معيّنة لعضو لوحة التحكم المُستدعي. دائماً 0 لمفتاح API."
                  },
                  "unassigned": {
                    "type": "integer",
                    "description": "غير معيّنة لأي شخص."
                  },
                  "users": {
                    "type": "array",
                    "description": "إدخال واحد لكل مكلَّف، مع تقديم المكلَّفين المرتبطين بأكبر عدد من الشبكات أولاً.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "full_name": {
                          "type": "string",
                          "description": "اسم الشخص المعيّن، أو بريده الإلكتروني في حال عدم تعيين اسم."
                        },
                        "email": {
                          "type": "string"
                        },
                        "count": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              },
              "has_case": {
                "type": "integer",
                "description": "الشبكات التي فتح هذا التطبيق حالة لها."
              },
              "min_size": {
                "type": "object",
                "description": "الشبكات التي تضم 10 أعضاء على الأقل، مفهرسة بحسب الحد الأدنى للحجم.",
                "properties": {
                  "10": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        }
      },
      "NetworkTag": {
        "type": "object",
        "description": "إحدى علامات تطبيقك على الشبكة.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID الخاص بالوسم، وهو نفس القيمة التي تمررها كـ `tag_uuid`."
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "description": "لون سداسي عشري، على سبيل المثال `#6366F1`."
          },
          "source": {
            "type": "string",
            "enum": [
              "didit",
              "custom"
            ],
            "description": "`didit` لعلامة مسبقة الضبط من Didit، و`custom` لعلامة أنشأها فريقك."
          },
          "added_by": {
            "type": "string",
            "nullable": true,
            "description": "البريد الإلكتروني لعضو وحدة التحكم الذي أضاف الوسم. يكون Null عندما يضيفه مفتاح API."
          },
          "added_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "NetworkOutcomes": {
        "type": "object",
        "description": "حالة الأفراد والشركات في الشبكة. يُحسب كل عضو مسموح لك برؤيته مرة واحدة، استناداً إلى حالة أحدث عملية تحقق له انتهت باتخاذ قرار. ولا يتم احتساب أطراف المعاملات.",
        "properties": {
          "approved": {
            "type": "integer",
            "description": "الأعضاء الذين كانت آخر عملية تحقق تم البت فيها خاصة بهم مقبولة."
          },
          "declined": {
            "type": "integer",
            "description": "الأعضاء الذين كانت آخر عملية تحقق تم البت فيها خاصة بهم مرفوضة."
          },
          "in_review": {
            "type": "integer",
            "description": "الأعضاء الذين تكون آخر عملية تحقق تم البت فيها خاصة بهم قيد المراجعة."
          },
          "total": {
            "type": "integer",
            "description": "الأعضاء الذين لديهم عملية تحقق واحدة على الأقل، سواء تم البت فيها أم لا. العضو الذي تكون جميع عمليات التحقق الخاصة به غير محسومة (لم تبدأ، أو قيد التنفيذ، أو منتهية الصلاحية، أو متروكة) يُحسب هنا ولا يُحسب في أي مفتاح آخر."
          }
        }
      },
      "NetworkPatternScore": {
        "type": "object",
        "description": "مدى تشابه أحد أنواع بيانات الأعضاء عبر الشبكة بأكملها. النمط ليس إشارة: لا توجد قيمة مشتركة تربط الأعضاء.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "background"
            ],
            "description": "`background`: متوسط التشابه لكل زوج من خلفيات صور السيلفي للأعضاء، مع حجب الشخص. يقرأ أحدث صورة سيلفي لكل شخص، بحد أقصى أحدث 50 صورة، ويستبعد جلسات تأكيد العمر. يغطي الشبكة بالكامل، وليس فقط أعضاء تطبيقاتك."
          },
          "score": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 1,
            "description": "من 0 إلى 1، مقرباً إلى 4 منازل عشرية. يكون Null عند تعيين `reason`."
          },
          "members": {
            "type": "integer",
            "nullable": true,
            "description": "عدد صور السيلفي للأعضاء التي قارنتها الدرجة. لا تتم مقارنة صورة السيلفي التي لا يمكن قراءتها، أو التي تظهر خلفية غير كافية. تكون القيمة فارغة Null أثناء حالة `computing`؛ و0 أو 1 مع `not_enough_selfies`."
          },
          "reason": {
            "type": "string",
            "enum": [
              "computing",
              "not_enough_selfies"
            ],
            "nullable": true,
            "description": "سبب عدم وجود درجة. `computing`: يجري احتساب الدرجة للأعضاء الحاليين؛ أعد قراءة الشبكة لاحقاً. `not_enough_selfies`: أقل من عضوين لديهما صورة سيلفي قابلة للاستخدام. تكون القيمة Null عند توفر درجة."
          },
          "computed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى تم احتساب الدرجة. وتكون Null أثناء `computing`."
          }
        }
      },
      "NetworkDetailResponse": {
        "description": "تفاصيل الشبكة، بالإضافة إلى وضع المشاركة الخاص بالمؤسسة، وما إذا كانت الإشارات المشتركة بين المؤسسات تنطبق عليها، وعلامات تطبيقك على الشبكة، ونتائج الأعضاء، ودرجات الأنماط.",
        "allOf": [
          {
            "$ref": "#/components/schemas/NetworkDetail"
          },
          {
            "type": "object",
            "properties": {
              "sharing_mode": {
                "type": "string",
                "enum": [
                  "off",
                  "private",
                  "global"
                ],
                "description": "وضع المشاركة بين المؤسسات الخاص بالمؤسسة. تقارن القيمة `global` فقط الشبكات عبر المؤسسات؛ بينما تقصر القيمتان `private` و`off` المقارنة على سجل المؤسسة الخاص فقط.",
                "example": "global"
              },
              "cross_org_available": {
                "type": "boolean",
                "description": "ما إذا كانت الإشارات المشتركة بين المؤسسات تسري على هذه المؤسسة. تتطلب كلاً من خطة Enterprise ووضع المشاركة `global`.",
                "example": true
              },
              "cross_org_unavailable_reason": {
                "type": "string",
                "enum": [
                  "plan",
                  "sharing_mode"
                ],
                "nullable": true,
                "description": "سبب عدم تطبيق الإشارات المشتركة بين المؤسسات، ويتم التحقق منها بهذا الترتيب. `plan`: خطة المؤسسة لا تتضمن شبكة مكافحة الاحتيال المشتركة بين المؤسسات (تتطلب خطة Enterprise)، أياً كان وضع المشاركة. `sharing_mode`: تتضمن الخطة الميزة، لكن وضع المشاركة هو `private` أو `off`. تكون Null عندما تكون قيمة `cross_org_available` هي `true`.",
                "example": null
              },
              "tags": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NetworkTag"
                },
                "description": "علامات تطبيقك على الشبكة، الأقدم أولاً. يرى كل تطبيق علاماته الخاصة فقط. `fraud_tags` منفصلة ولم تتغير: العلامات التي يحملها أعضاء الشبكة."
              },
              "outcomes": {
                "$ref": "#/components/schemas/NetworkOutcomes"
              },
              "patterns": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NetworkPatternScore"
                },
                "description": "درجات الأنماط عبر الشبكة بأكملها. عنصر واحد اليوم، `background`."
              }
            }
          }
        ]
      },
      "NetworkTagRequest": {
        "type": "object",
        "required": [
          "tag_uuid"
        ],
        "properties": {
          "tag_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID لإحدى علامات تطبيقك."
          }
        },
        "example": {
          "tag_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
        }
      },
      "NetworkTimeline": {
        "title": "Default timeline (no contract)",
        "type": "object",
        "description": "بدون `contract`: أحداث الشبكة الخاصة، من الأقدم إلى الأحدث، غير مقسمة إلى صفحات.",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkTimelineEvent"
            }
          }
        }
      },
      "NetworkTimelinePage": {
        "title": "Typed timeline page (contract=2)",
        "type": "object",
        "description": "مع `contract=2`: صفحة واحدة من الأحداث المصنفة حسب النوع، الأحدث أولاً.",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkTypedTimelineEvent"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "مرّره كـ `cursor` لقراءة الصفحة التالية. يكون فارغاً (null) في الصفحة الأخيرة."
          }
        }
      },
      "NetworkTypedTimelineEvent": {
        "type": "object",
        "description": "حدث واحد من نوع محدد في الجدول الزمني: الحقول الأربعة الافتراضية، بالإضافة إلى معرّفه id، ووقت تخزينه بواسطة Didit، وحساب العضو والسجل الذي ينتمي إليه، وكتلة التفاصيل الخاصة بنوع الحدث. كتل التفاصيل الأخرى تكون null.",
        "properties": {
          "id": {
            "type": "string",
            "description": "`<source>:<uuid>`، فريد داخل الجدول الزمني.",
            "example": "session:3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "network_detected",
              "signal_observed",
              "network_active",
              "network_in_review",
              "network_resolved",
              "network_dismissed",
              "verification_attempt",
              "transaction",
              "login",
              "rule_hit",
              "case_linked",
              "note_added"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت حدوث ذلك."
          },
          "ingested_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت تخزين Didit له."
          },
          "label": {
            "type": "string",
            "description": "تسمية إنجليزية قصيرة، على سبيل المثال `Verification attempt 2 of 3`."
          },
          "metadata": {
            "type": "object",
            "description": "بالنسبة للأحداث الخاصة بالشبكة، نفس البيانات الوصفية كالجدول الزمني الافتراضي. وفارغة بخلاف ذلك."
          },
          "account": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineAccount"
              }
            ],
            "nullable": true,
            "description": "حساب العضو. يكون Null لأحداث الشبكة نفسها، و`case_linked`، و`note_added`."
          },
          "source_ref": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineSourceRef"
              }
            ],
            "nullable": true,
            "description": "سجل المصدر. يكون Null للأحداث الخاصة بالشبكة و`note_added`."
          },
          "verification_attempt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineAttempt"
              }
            ],
            "nullable": true,
            "description": "يُعيَّن في أحداث `verification_attempt`."
          },
          "transaction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineTransaction"
              }
            ],
            "nullable": true,
            "description": "يُعيَّن في أحداث `transaction`."
          },
          "login": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineLogin"
              }
            ],
            "nullable": true,
            "description": "يُعيَّن في أحداث `login`."
          },
          "rule_hit": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineRuleHit"
              }
            ],
            "nullable": true,
            "description": "يُعيَّن في أحداث `rule_hit`."
          },
          "case_linked": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineCaseLinked"
              }
            ],
            "nullable": true,
            "description": "يُعيَّن في أحداث `case_linked`."
          },
          "note_added": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineNoteAdded"
              }
            ],
            "nullable": true,
            "description": "يُعيَّن في أحداث `note_added`. لا يُعاد أبداً إلى مفتاح API."
          }
        }
      },
      "NetworkTimelineAccount": {
        "type": "object",
        "description": "حساب العضو الذي ينتمي إليه الحدث.",
        "properties": {
          "node_id": {
            "type": "string",
            "description": "`<kind>:<uuid>`، حيث يكون kind هو `vendor_user` أو `vendor_business` أو `transaction_party`.",
            "example": "vendor_user:3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "node_type": {
            "type": "string",
            "enum": [
              "account",
              "business_account",
              "transaction_party"
            ]
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "vendor_data": {
            "type": "string",
            "nullable": true
          },
          "display_name": {
            "type": "string",
            "nullable": true
          },
          "ownership": {
            "type": "string",
            "enum": [
              "owned",
              "organization"
            ],
            "description": "`owned` عندما ينتمي السجل إلى التطبيق الذي استدعيته (بالنسبة لعضو في لوحة التحكم، إلى تطبيق مُنح الإذن بالوصول إليه). `organization` عندما ينتمي إلى تطبيق آخر تابع لمؤسستك."
          },
          "route": {
            "$ref": "#/components/schemas/NetworkTimelineRoute"
          }
        }
      },
      "NetworkTimelineSourceRef": {
        "type": "object",
        "description": "السجل الذي تمت قراءة الحدث منه.",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "session",
              "business_session",
              "transaction",
              "monitoring_event",
              "case"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownership": {
            "type": "string",
            "enum": [
              "owned",
              "organization"
            ],
            "description": "`owned` عندما ينتمي السجل إلى التطبيق الذي استدعيته (بالنسبة لعضو في لوحة التحكم، إلى تطبيق مُنح الإذن بالوصول إليه). `organization` عندما ينتمي إلى تطبيق آخر تابع لمؤسستك."
          },
          "route": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineRoute"
              }
            ],
            "description": "غير متوفر لكل من `monitoring_event` و`case`."
          }
        }
      },
      "NetworkTimelineRoute": {
        "type": "object",
        "description": "مكان فتح السجل: نوعه، ومعرّف UUID الخاص به، والتطبيق الذي ينتمي إليه.",
        "properties": {
          "kind": {
            "type": "string",
            "description": "`user` أو `business` أو `transaction_party` للحساب؛ `session` أو `business_session` أو `transaction` لسجل المصدر."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "application_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "NetworkTimelineAttempt": {
        "type": "object",
        "description": "جلسة تحقق واحدة للحساب.",
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID للجلسة، أو معرّف UUID لجلسة الشركة بالنسبة للشركات."
          },
          "session_number": {
            "type": "integer",
            "nullable": true
          },
          "attempt": {
            "type": "integer",
            "description": "ترتيب هذه الجلسة بين جلسات الحساب، حسب ترتيب الإنشاء."
          },
          "attempt_count": {
            "type": "integer",
            "description": "عدد الجلسات التي يمتلكها الحساب."
          },
          "status": {
            "type": "string",
            "description": "حالة الجلسة، على سبيل المثال `Approved` أو `Declined`."
          },
          "status_changed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "decline_reasons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkTimelineDeclineReason"
            },
            "description": "للجلسة المرفوضة فقط: تحذيراتها، الأقدم أولاً، مرة واحدة لكل تحذير. وتكون فارغة بخلاف ذلك."
          }
        }
      },
      "NetworkTimelineDeclineReason": {
        "type": "object",
        "properties": {
          "risk": {
            "type": "string",
            "description": "رمز التحذير."
          },
          "feature": {
            "type": "string",
            "description": "الميزة التي أطلقت التحذير."
          },
          "short_description": {
            "type": "string"
          }
        }
      },
      "NetworkTimelineTransaction": {
        "type": "object",
        "description": "معاملة شارك فيها حساب عضو، مؤرخة بتاريخ معاملتها.",
        "properties": {
          "transaction_id": {
            "type": "string",
            "format": "uuid"
          },
          "transaction_number": {
            "type": "integer",
            "nullable": true
          },
          "transaction_type": {
            "type": "string"
          },
          "action_type": {
            "type": "string"
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineAmount"
              }
            ],
            "nullable": true,
            "description": "Null عندما لا تحتوي المعاملة على مبلغ."
          },
          "status": {
            "type": "string"
          },
          "decision_reason_code": {
            "type": "string",
            "nullable": true
          },
          "decision_reason_label": {
            "type": "string",
            "nullable": true
          },
          "party_role": {
            "type": "string",
            "description": "دور الحساب في المعاملة: `APPLICANT` أو `REMITTER` أو `BENEFICIARY` أو `COUNTERPARTY`."
          }
        }
      },
      "NetworkTimelineAmount": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "المبلغ العشري كسلسلة نصية."
          },
          "currency": {
            "type": "string"
          },
          "direction": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "NetworkTimelineLogin": {
        "type": "object",
        "description": "حدث تسجيل دخول قمت بنشره لشخص ما عبر API الأحداث.",
        "properties": {
          "action": {
            "type": "string",
            "description": "`<event_category>.<action_type>`: تكون `auth.login` أو `security.login_succeeded` لتسجيل الدخول، و`auth.login_failed` أو `security.login_failed` في حالة الفشل."
          },
          "succeeded": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "description": "حالة الحدث."
          },
          "ip": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineIP"
              }
            ],
            "nullable": true,
            "description": "Null عندما لا يحتوي الحدث على عنوان IP."
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NetworkTimelineDevice"
              }
            ],
            "nullable": true,
            "description": "Null عندما لا يحتوي الحدث على بصمة جهاز أو سياق."
          },
          "is_first_login": {
            "type": "boolean",
            "description": "أول تسجيل دخول ناجح مسجل للحساب."
          },
          "is_new_device": {
            "type": "boolean",
            "description": "تسجيل دخول ناجح من جهاز لم تصدر منه أي من عمليات تسجيل الدخول الناجحة السابقة للحساب. لا تكون كذلك أبداً عند أول تسجيل دخول."
          }
        }
      },
      "NetworkTimelineIP": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "connection_type": {
            "type": "string",
            "nullable": true,
            "description": "تسمية نوع الاتصال للعنوان، كنص حر."
          },
          "is_vpn_or_tor": {
            "type": "boolean"
          },
          "is_data_center": {
            "type": "boolean"
          }
        }
      },
      "NetworkTimelineDevice": {
        "type": "object",
        "properties": {
          "fingerprint": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true,
            "description": "تسمية جهاز قابلة للقراءة تم إنشاؤها من سياق جهاز الحدث."
          }
        }
      },
      "NetworkTimelineRuleHit": {
        "type": "object",
        "description": "قاعدة نشطة تطابقت مع معاملة أو حدث خاص بعضو. لا يتم تضمين تطابقات وضع الاختبار.",
        "properties": {
          "rule_id": {
            "type": "string",
            "format": "uuid"
          },
          "rule_title": {
            "type": "string"
          },
          "rule_category": {
            "type": "string"
          },
          "rule_source": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "nullable": true
          },
          "score_delta": {
            "type": "integer"
          },
          "status_target": {
            "type": "string",
            "nullable": true
          },
          "action_summary": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "NetworkTimelineCaseLinked": {
        "type": "object",
        "description": "حالة تم فتحها للشبكة في مؤسستك. يحدد `source_ref.ownership` ما إذا كانت تابعة للتطبيق الذي استدعيته.",
        "properties": {
          "case_id": {
            "type": "string",
            "format": "uuid"
          },
          "case_number": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "author_email": {
            "type": "string",
            "nullable": true
          },
          "author_name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "NetworkTimelineNoteAdded": {
        "type": "object",
        "description": "ملاحظة تُرِكت على الشبكة. نص الملاحظة غير مضمن.",
        "properties": {
          "note_id": {
            "type": "string",
            "format": "uuid"
          },
          "author_email": {
            "type": "string"
          }
        }
      },
      "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
          }
        }
      },
      "SandboxSimulateRequest": {
        "type": "object",
        "description": "فرض حالة جلسة في البيئة التجريبية. كل حقل اختياري، ولكن يلزم توفير واحد على الأقل من `new_status` أو `scenario` أو `risk`.",
        "properties": {
          "new_status": {
            "type": "string",
            "enum": [
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned"
            ],
            "description": "الحالة المراد تعيينها. عند عدم إدراجها، يتم تعيينها افتراضياً إلى الحالة الافتراضية لحالة المخاطر (`risk`، أو أول خطر تحمله القيم السحرية للسيناريو)، وإلا يتم تعيينها إلى الحالة الافتراضية للسيناريو.",
            "example": "Declined"
          },
          "comment": {
            "type": "string",
            "maxLength": 500,
            "description": "ملاحظة أُضيفت إلى إدخال النشاط الذي يسجل تغيير الحالة.",
            "example": "Testing the decline path"
          },
          "scenario": {
            "type": "string",
            "maxLength": 100,
            "description": "معرّف slug لسيناريو من الكتالوج (`GET /v1/sandbox/scenarios/`). يوفّر الحالة الافتراضية، وفي حال عدم وجود `risk`، يوفّر التحذير الذي تحمله قيمه السحرية. يُرجع معرّف slug غير معروف `400`.",
            "example": "decline_aml_hit"
          },
          "risk": {
            "type": "string",
            "maxLength": 128,
            "description": "حالة مخاطر من الكتالوج. يُضاف تحذيرها إلى الجلسة، مع نوع سجل يتبع `new_status`. تُرجع القيمة غير المعروفة `400`.",
            "example": "POSSIBLE_MATCH_FOUND"
          },
          "node_id": {
            "type": "string",
            "maxLength": 128,
            "description": "عقدة سير العمل المرفق بها تحذير المخاطر. القيمة الافتراضية هي العقدة الحالية للجلسة.",
            "example": "feature_aml_1"
          },
          "send_webhooks": {
            "type": "boolean",
            "default": true,
            "description": "تُرسل القيمة `true` رسائل webhook المطابقة تماماً لما يرسله أي تغيير حقيقي في الحالة إلى وجهات التطبيق في البيئة التجريبية: `status.updated`، بالإضافة إلى الأحداث `user.status.updated` / `user.data.updated` (أو `business.status.updated` / `business.data.updated`) الناتجة عن هذا التغيير، وذلك للوجهات المشتركة فيها. وتُغير القيمة `false` الحالة دون تسجيل أو إرسال أي webhook: ولا تعيد ميزة استرداد الـ webhooks الفائتة إرسال ذلك القرار أبداً، مع استمرار تحديث لوحة التحكم مباشرة، كما يُرسل التغيير التالي لحالة الجلسة رسائل webhook كالمعتاد.",
            "example": true
          }
        }
      },
      "SandboxSimulateResponse": {
        "type": "object",
        "required": [
          "session_id",
          "previous_status",
          "status",
          "scenario",
          "risk",
          "send_webhooks"
        ],
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "previous_status": {
            "type": "string",
            "enum": [
              "Not Started",
              "In Progress",
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned",
              "Kyc Expired",
              "Resubmitted",
              "Awaiting User"
            ],
            "description": "حالة الجلسة قبل المحاكاة.",
            "example": "In Progress"
          },
          "status": {
            "type": "string",
            "enum": [
              "Approved",
              "Declined",
              "In Review",
              "Expired",
              "Abandoned"
            ],
            "description": "الحالة التي حددتها المحاكاة.",
            "example": "Declined"
          },
          "scenario": {
            "type": "string",
            "nullable": true,
            "description": "المعرّف المختصر (slug) للسيناريو الذي مررته، أو `null`.",
            "example": "decline_aml_hit"
          },
          "risk": {
            "type": "string",
            "nullable": true,
            "description": "حالة المخاطر المطبقة (`risk`، أو الحالة المأخوذة من السيناريو)، أو `null` عند عدم وجود أي منها.",
            "example": "POSSIBLE_MATCH_FOUND"
          },
          "send_webhooks": {
            "type": "boolean",
            "description": "قيمة `send_webhooks` التي طبقتها المحاكاة.",
            "example": false
          }
        }
      },
      "CaseTeamSummary": {
        "type": "object",
        "nullable": true,
        "description": "فريق المراجعة المالك للحالة، أو null في حال عدم وجود فريق يملكها. يقوم التوجيه بتعيينه عندما تضع قاعدة توجيه الحالة لدى أحد فِرَقها. يمكنك تغييره أو مسحه باستخدام `PATCH .../cases/{case_uuid}/` (`team`).",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CaseChecker": {
        "type": "object",
        "nullable": true,
        "description": "العضو المعيّن للموافقة على الحل المعلق أو رفضه. يتم تعيينه فقط أثناء انتظار حل بمبدأ الرقابة الرباعية لمُدقّق معيّن. ويكون Null عندما لا يكون هناك شيء معلق، وأثناء انتظار الحل المعلق في قائمة انتظار المُدقّق، وبمجرد الموافقة على الحل أو رفضه أو إعادته لمراجعة جديدة بسبب تغيّر الأدلة.",
        "properties": {
          "member_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف uuid لمستخدم العضو: القيمة التي تمررها كـ `checker` عند حل الحالة."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "الاسم الكامل للعضو، أو null عندما يكون غير معروف."
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "ServiceStatusFeed": {
        "type": "object",
        "description": "حالة الخدمة العامة: حالة كل خدمة من خدمات Didit، والحالة العامة، والحوادث الجارية أو التي تم حلها خلال آخر 7 أيام.",
        "required": [
          "status",
          "updated_at",
          "services",
          "incidents"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "down"
            ],
            "description": "أسوأ حالة لأي خدمة في الوقت الحالي، وتُحدد بناءً على الحوادث الجارية فقط.",
            "example": "degraded"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت إنشاء Didit لهذه الاستجابة (ISO 8601، بتوقيت UTC). يتم تخزين الاستجابات مؤقتاً لمدة 30 ثانية، لذا قد يصل عمرها إلى 30 ثانية.",
            "example": "2026-10-13T09:41:07.512345Z"
          },
          "services": {
            "type": "array",
            "description": "إدخال واحد لكل خدمة، مع إدراج كل خدمة دائماً.",
            "items": {
              "$ref": "#/components/schemas/ServiceStatusService"
            }
          },
          "incidents": {
            "type": "array",
            "description": "الأحدث بحسب `started_at` أولاً. كل حادث مستمر، بالإضافة إلى الحوادث التي تم حلها خلال آخر 7 أيام (بحد أقصى 50 حادثاً تم حله). فارغ إذا لم يحدث شيء خلال تلك الفترة.",
            "items": {
              "$ref": "#/components/schemas/ServiceStatusIncident"
            }
          }
        }
      },
      "ServiceStatusService": {
        "type": "object",
        "required": [
          "key",
          "name",
          "status"
        ],
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "service_id_verification",
              "service_liveness_face_match",
              "service_aml_screening",
              "service_kyb_registries",
              "service_database_validation",
              "service_phone_delivery",
              "service_email_delivery",
              "service_transaction_monitoring"
            ],
            "description": "مفتاح خدمة ثابت. طابق بناءً على هذا المفتاح، ولا تطابق أبداً بناءً على الاسم المعروض. `service_id_verification`: التحقق من الهوية، `service_liveness_face_match`: كشف الحيوية ومطابقة الوجه، `service_aml_screening`: فحص AML، `service_kyb_registries`: سجلات KYB، `service_database_validation`: التحقق من قواعد البيانات، `service_phone_delivery`: تسليم التحقق من رقم الهاتف، `service_email_delivery`: تسليم التحقق من البريد الإلكتروني، `service_transaction_monitoring`: مراقبة المعاملات.",
            "example": "service_database_validation"
          },
          "name": {
            "type": "string",
            "description": "اسم العرض باللغة الإنجليزية للخدمة.",
            "example": "Database validation"
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "down"
            ],
            "description": "`operational` عندما لا تكون هناك أي حادثة جارية للخدمة، وإلا فستكون أسوأ حالة بين حوادثها الجارية.",
            "example": "degraded"
          }
        }
      },
      "ServiceStatusIncident": {
        "type": "object",
        "required": [
          "id",
          "service",
          "service_name",
          "state",
          "status",
          "title",
          "body",
          "affected",
          "country_name",
          "started_at",
          "resolved_at",
          "duration_minutes"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف الحادثة.",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "service": {
            "type": "string",
            "enum": [
              "service_id_verification",
              "service_liveness_face_match",
              "service_aml_screening",
              "service_kyb_registries",
              "service_database_validation",
              "service_phone_delivery",
              "service_email_delivery",
              "service_transaction_monitoring"
            ],
            "description": "مفتاح الخدمة المتأثرة (راجع `services[].key`).",
            "example": "service_database_validation"
          },
          "service_name": {
            "type": "string",
            "description": "اسم العرض باللغة الإنجليزية للخدمة المتأثرة.",
            "example": "Database validation"
          },
          "state": {
            "type": "string",
            "enum": [
              "degraded",
              "down"
            ],
            "description": "كيفية تأثر الخدمة. يحتفظ الحادث الذي تم حله بآخر حالة كانت له.",
            "example": "degraded"
          },
          "status": {
            "type": "string",
            "enum": [
              "ongoing",
              "resolved"
            ],
            "description": "`ongoing` حتى تتعافى الخدمة، ثم `resolved`.",
            "example": "ongoing"
          },
          "title": {
            "type": "string",
            "description": "العنوان الرئيسي باللغة الإنجليزية. لترجمته، أنشئ نصك الخاص من `service` و`state` و`country_name`.",
            "example": "Database validation is degraded in Brazil."
          },
          "body": {
            "type": "string",
            "description": "سطر التفاصيل باللغة الإنجليزية: منذ متى قد تكون عمليات الفحص بطيئة أو تفشل، أو متى تعافت الخدمة.",
            "example": "Checks against Brazil (CPF) may be slow or fail since 08:55 UTC."
          },
          "affected": {
            "type": "string",
            "description": "الدول أو السجلات المتأثرة، على سبيل المثال `Brazil (CPF)`. تكون فارغة عندما لا تكون الحادثة مرتبطة بدولة أو سجل.",
            "example": "Brazil (CPF)"
          },
          "country_name": {
            "type": "string",
            "description": "الدولة المتأثرة، باللغة الإنجليزية. تكون فارغة عندما لا تكون الحادثة مرتبطة بدولة.",
            "example": "Brazil"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "متى بدأ الحادث (ISO 8601، UTC).",
            "example": "2026-10-13T08:55:00Z"
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "متى تعافت الخدمة (ISO 8601، UTC). وتكون `null` طالما أن الحادث مستمر."
          },
          "duration_minutes": {
            "type": "integer",
            "nullable": true,
            "description": "الدقائق الكاملة من `started_at` إلى `resolved_at`. تكون القيمة `null` طالما أن الحادث مستمر."
          }
        }
      },
      "TravelRuleJoinInvitation": {
        "type": "object",
        "description": "ما تعرضه صفحة الانضمام قبل كتابة أي شيء.",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "العنوان الذي أُرسلت الدعوة إليه."
          },
          "vasp_name": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "description": "مصدر الدعوة، على سبيل المثال `pickup`."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "prefill": {
            "type": "object",
            "properties": {
              "vasp_id": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "legal_name": {
                "type": "string"
              },
              "lei": {
                "type": "string"
              },
              "jurisdiction": {
                "type": "string"
              },
              "domains": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "TravelRuleJoinRegisterRequest": {
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "description": "يجب أن يكون العنوان الذي تم إرسال الدعوة إليه."
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          }
        }
      },
      "TravelRuleJoinVerifyRequest": {
        "type": "object",
        "required": [
          "email",
          "code"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "description": "الرمز المكوّن من 6 محارف المرسل عبر البريد الإلكتروني بعد التسجيل."
          }
        }
      },
      "TravelRuleJoinCredentials": {
        "type": "object",
        "description": "المؤسسة المجانية الجديدة وبيانات الاعتماد التي يستخدمها تطبيقها لاستدعاء API.",
        "properties": {
          "organization": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "application": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "client_id": {
            "type": "string"
          },
          "api_key": {
            "type": "string",
            "description": "أرسل كرأس `x-api-key` على endpoint الخاصة بمساحة العمل."
          }
        }
      },
      "TravelRuleWorkspaceClaimRequest": {
        "type": "object",
        "required": [
          "vasp_id"
        ],
        "properties": {
          "vasp_id": {
            "type": "string",
            "format": "uuid",
            "description": "إدخال الدليل الذي تمثله مساحة العمل هذه. اقرأ المعرّفات من `GET /v3/travel-rule/vasps/`."
          }
        }
      },
      "TravelRuleWorkspaceDomainConfirmRequest": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6
          }
        }
      },
      "TravelRuleWorkspaceBillingRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": true,
            "description": "يُقبل `true` فقط: لا يمكن إعادة إيقاف تشغيل الفوترة الصادرة عبر API."
          }
        }
      },
      "TravelRuleWorkspaceDomainCodeResponse": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "unverified",
              "code_sent",
              "verified"
            ]
          },
          "txt": {
            "$ref": "#/components/schemas/TravelRuleWorkspaceTxtRecord"
          }
        }
      },
      "TravelRuleWorkspaceTxtRecord": {
        "type": "object",
        "description": "سجل TXT للنشر من أجل إثبات DNS. يكون فارغاً حتى يبدأ الإثبات.",
        "properties": {
          "host": {
            "type": "string",
            "example": "didit-tr-verify.example.com"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "TravelRuleWorkspace": {
        "type": "object",
        "description": "مساحة عمل Travel Rule المجانية لتطبيق انضم مجاناً.",
        "properties": {
          "joined_free": {
            "type": "boolean"
          },
          "work_email": {
            "type": "string",
            "format": "email"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "claim": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "unclaimed",
                  "pending_review",
                  "claimed",
                  "rejected"
                ]
              },
              "proved_by_domain": {
                "type": "boolean"
              },
              "claimed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "reviewed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "review_note": {
                "type": "string"
              },
              "vasp_id": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "vasp_name": {
                "type": "string"
              }
            }
          },
          "prefill": {
            "type": "object",
            "description": "قيم الملف التعريفي المأخوذة من إدخال الدليل: `vasp_id`، `legal_name`، `lei`، `jurisdiction`، `compliance_email`، `domains`. لا يُكتب أي شيء حتى تتم المطالبة."
          },
          "domain": {
            "type": "object",
            "properties": {
              "domain": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "unverified",
                  "code_sent",
                  "verified"
                ]
              },
              "verified_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "txt": {
                "$ref": "#/components/schemas/TravelRuleWorkspaceTxtRecord"
              }
            }
          },
          "billing_enabled": {
            "type": "boolean",
            "description": "استلام بيانات Travel Rule مجاني. تتم فوترة الإرسال فقط بعد تمكين الفوترة."
          },
          "billing_enabled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "didit_network": {
            "type": "object",
            "description": "ما إذا كانت شبكة Didit تدرج VASP هذا، وفي حال عدم إدراجه، كل شرط لا يزال ينقصه."
          },
          "settings": {
            "$ref": "#/components/schemas/TravelRuleSettingsDetail"
          }
        }
      },
      "InvestigatorDecision": {
        "type": "object",
        "description": "كيفية خروج العنصر من قائمة انتظار Investigator. يتم إرجاع `decided_by` و`original_outcome` و`overrides` بواسطة endpoint الخاصة بالقبول والتجاوز والتقرير؛ وتحتوي كتلة `investigator` الخاصة بقرار الجلسة على الحقول الأخرى.",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "accepted",
              "edited",
              "overridden",
              "decided_elsewhere",
              "automated"
            ],
            "description": "اعتمدت `accepted` أو `edited` التوصية (`edited` مع سرد معاد كتابته)، واتخذت `overridden` إجراءً آخر، و`decided_elsewhere` هو قرار تم اتخاذه خارج Investigator أثناء فتح التقرير، و`automated` هو قرار اتخذه Investigator تلقائيًا بمفرده."
          },
          "action": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "escalate",
              "request"
            ]
          },
          "actor_email": {
            "type": "string",
            "nullable": true
          },
          "actor_name": {
            "type": "string",
            "nullable": true
          },
          "override_category": {
            "type": "string",
            "enum": [
              "missing_context",
              "needs_information",
              "policy_differs",
              "evidence_misread",
              "other",
              ""
            ],
            "nullable": true
          },
          "override_reason": {
            "type": "string",
            "nullable": true
          },
          "final_status": {
            "type": "string",
            "description": "حالة العنصر بعد اتخاذ القرار."
          },
          "agreed": {
            "type": "boolean",
            "description": "ما إذا كان القرار متطابقاً مع التوصية.",
            "nullable": true
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          },
          "billed": {
            "type": "boolean",
            "description": "فُرضت رسوم على المراجعة."
          },
          "decided_by": {
            "type": "string",
            "enum": [
              "investigator",
              "member"
            ]
          },
          "original_outcome": {
            "type": "object",
            "description": "القرار الذي اتخذه المحقّق بمفرده، دون تغيير عبر التجاوزات اللاحقة. وتكون القيمة Null للقرار الذي اتخذه الفريق.",
            "properties": {
              "action": {
                "type": "string"
              },
              "final_status": {
                "type": "string"
              },
              "decided_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "nullable": true
          },
          "overrides": {
            "type": "array",
            "description": "كل تجاوز لقرار اتخذه Investigator من تلقاء نفسه، الأقدم أولاً.",
            "items": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string"
                },
                "actor_email": {
                  "type": "string",
                  "nullable": true
                },
                "actor_name": {
                  "type": "string",
                  "nullable": true
                },
                "override_category": {
                  "type": "string"
                },
                "override_reason": {
                  "type": "string"
                },
                "previous_status": {
                  "type": "string"
                },
                "final_status": {
                  "type": "string"
                },
                "agreed": {
                  "type": "boolean",
                  "nullable": true
                },
                "overridden_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "InvestigatorBlock": {
        "type": "object",
        "nullable": true,
        "description": "أحدث مراجعة من Investigator للعنصر، أو null في حال لم يحصل عليها من قبل. يتم تضمينها في قرار جلسة V3 وقرار جلسة الشركة (وبالتالي في webhook لحدث `status.updated`).",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "failed"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "shadow",
              "live"
            ]
          },
          "queue": {
            "type": "string",
            "enum": [
              "kyc",
              "kyb",
              "aml",
              "transactions",
              "cases"
            ]
          },
          "is_open": {
            "type": "boolean"
          },
          "recommendation": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "escalate",
              "request"
            ],
            "nullable": true
          },
          "recommendation_detail": {
            "type": "string",
            "nullable": true
          },
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "moderate",
              "low"
            ],
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          },
          "ready_to_accept": {
            "type": "boolean"
          },
          "prepared_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "automated": {
            "type": "boolean",
            "description": "اتخذ المحقق قراره بشكل مستقل، حتى لو تم تجاوز القرار لاحقاً."
          },
          "decided_by": {
            "type": "string",
            "enum": [
              "investigator",
              "member"
            ],
            "nullable": true
          },
          "decision": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/InvestigatorDecision"
              }
            ],
            "type": "object"
          }
        }
      },
      "InvestigatorQueueRow": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "session",
              "business_session",
              "transaction",
              "case"
            ]
          },
          "queue": {
            "type": "string",
            "enum": [
              "kyc",
              "kyb",
              "aml",
              "transactions",
              "cases"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "shadow",
              "live"
            ]
          },
          "subject": {
            "type": "object",
            "description": "العنصر قيد المراجعة: `id`، و`number`، و`status`، و`name`، وحسب النوع: `country`، أو `workflow`، أو `vendor_data`، أو `txn_id`، أو `amount`، أو `currency`، أو `direction`، أو `title`، أو `priority`.",
            "additionalProperties": true
          },
          "recommendation": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "escalate",
              "request"
            ]
          },
          "recommendation_detail": {
            "type": "string"
          },
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "moderate",
              "low"
            ]
          },
          "summary": {
            "type": "string"
          },
          "sources_count": {
            "type": "integer"
          },
          "ready_to_accept": {
            "type": "boolean"
          },
          "guardrails": {
            "description": "ضوابط الحماية المقفلة المطبقة على هذا العنصر، إن وجدت."
          },
          "waiting_since": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "prepared_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "InvestigatorRunDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InvestigatorQueueRow"
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "is_open": {
                "type": "boolean"
              },
              "lookups": {
                "type": "integer",
                "description": "عدد الأقسام والسجلات المرتبطة التي تمت قراءتها."
              },
              "duration_ms": {
                "type": "integer",
                "nullable": true
              },
              "agent_version": {
                "type": "string"
              },
              "prepared_before_opened": {
                "type": "boolean",
                "nullable": true
              },
              "report": {
                "type": "object",
                "additionalProperties": true,
                "description": "التقرير: التحليل المنطقي، ونقاط الأدلة مع حكمها (`ok`، أو `risk`، أو `look`، أو `explained`، أو `context`) والمصادر المستشهد بها، وأحكام نتائج الفحص (`same`، أو `not_same`، أو `unclear`) والخطوات التالية المقترحة."
              },
              "trail": {
                "description": "ما جرى مراجعته: النظرة العامة والأقسام والسجلات التي قرأها، بالترتيب."
              },
              "decision": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/InvestigatorDecision"
                  }
                ],
                "type": "object"
              },
              "autonomy": {
                "type": "object",
                "additionalProperties": true,
                "description": "ما توصلت إليه المعالجة التلقائية بخصوص التقرير (`result`، `reason`، `tier`، `policy_version`، `rule`، `agreement`، `decisions`، `threshold`، `at`). يكون Null عندما لا تكون قائمة الانتظار مؤتمتة.",
                "nullable": true
              }
            }
          }
        ]
      },
      "InvestigatorAcceptRequest": {
        "type": "object",
        "properties": {
          "narrative": {
            "type": "string",
            "maxLength": 4000,
            "description": "سرد معاد صياغته. إرسال سرد واحد يسجل القرار على أنه تم تعديله وقبوله."
          },
          "send_email": {
            "type": "boolean",
            "default": false,
            "description": "إرسال بريد إلكتروني إلى الشخص بشأن القرار."
          },
          "email_address": {
            "type": "string",
            "format": "email",
            "description": "مطلوب عندما تكون قيمة `send_email` هي true."
          },
          "email_language": {
            "type": "string",
            "default": "en",
            "maxLength": 16
          }
        }
      },
      "InvestigatorOverrideRequest": {
        "type": "object",
        "required": [
          "action",
          "category",
          "reason"
        ],
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "escalate",
              "request"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "missing_context",
              "needs_information",
              "policy_differs",
              "evidence_misread",
              "other"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 10,
            "maxLength": 500
          },
          "send_email": {
            "type": "boolean",
            "default": false,
            "description": "إرسال بريد إلكتروني إلى الشخص بشأن القرار."
          },
          "email_address": {
            "type": "string",
            "format": "email",
            "description": "مطلوب عندما تكون قيمة `send_email` هي true."
          },
          "email_language": {
            "type": "string",
            "default": "en",
            "maxLength": 16
          }
        }
      },
      "InvestigatorBatchAcceptRequest": {
        "type": "object",
        "required": [
          "run_ids"
        ],
        "properties": {
          "run_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 50,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "InvestigatorBatchAcceptResponse": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "integer"
          },
          "skipped": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "result": {
                  "type": "string",
                  "enum": [
                    "accepted",
                    "skipped"
                  ]
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "not_found",
                    "forbidden",
                    "already_decided",
                    "not_ready",
                    "guardrail",
                    "invalid"
                  ]
                },
                "detail": {},
                "action": {
                  "type": "string"
                },
                "final_status": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "InvestigatorSettings": {
        "type": "object",
        "properties": {
          "stage": {
            "type": "string",
            "enum": [
              "none",
              "shadow",
              "live"
            ]
          },
          "stage_changed_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "nullable": true
          },
          "stage_changed_by": {
            "type": "string",
            "readOnly": true
          },
          "monthly_spend_limit": {
            "type": "string",
            "format": "decimal",
            "description": "الحد الشهري بعملة الفوترة الخاصة بك، من 0.01 إلى 1,000,000. القيمة Null تعطل الحد.",
            "nullable": true
          },
          "spend_limit": {
            "type": "object",
            "readOnly": true,
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "limit": {
                "type": "string",
                "format": "decimal",
                "nullable": true
              },
              "spent": {
                "type": "string",
                "format": "decimal"
              },
              "reviews": {
                "type": "integer"
              },
              "reserved": {
                "type": "string",
                "format": "decimal",
                "description": "سعر كل تقرير مباشر مفتوح، محتجز لأن قبوله يترتب عليه فرض رسوم."
              },
              "currency": {
                "type": "string"
              },
              "paused": {
                "type": "boolean",
                "description": "عند بلوغ الحد الأقصى: لا تبدأ أي مراجعة جديدة."
              }
            }
          }
        }
      },
      "TravelRuleUtxoEntry": {
        "type": "object",
        "description": "مدخل أو مخرج واحد لمعاملة UTXO، كما سجلتها السلسلة.",
        "required": [
          "address"
        ],
        "properties": {
          "address": {
            "type": "string",
            "maxLength": 128
          },
          "amount": {
            "type": "string",
            "nullable": true,
            "description": "سلسلة نصية عشرية بالوحدة الخاصة بالعملة (BTC وليس بالساتوشي). اختياري.",
            "example": "0.0125"
          },
          "txid": {
            "type": "string",
            "maxLength": 128,
            "description": "اختياري. المعاملة التي ينفقها مدخل ما."
          },
          "vout": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "description": "اختياري. فهرس المخرج الذي ينفقه مدخل ما."
          }
        }
      },
      "TravelRuleUtxo": {
        "type": "object",
        "description": "مدخلات ومخرجات تحويل UTXO (BTC، LTC، BCH، DOGE). تُقبل فقط على تلك السلاسل: يُرجع رمز `400` على أي سلسلة أخرى. يستنتج Didit منها محفظة المُرسِل (المعلنة، وإلا فعنوان المدخلات الأكثر مساهمة) ومخرج المستفيد (المعلن، وإلا فالمخرج الوحيد الذي لا يعيد الدفع إلى عنوان مدخل كفكة، وإلا فالمخرج الفردي الذي يدفع مبلغ التحويل). تظهر النتيجة في `chain_details` الخاصة بالتحويل.",
        "required": [
          "outputs"
        ],
        "properties": {
          "inputs": {
            "type": "array",
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/TravelRuleUtxoEntry"
            },
            "description": "اختياري. بدون مدخلات، لا يتم استنتاج أي مُرسِل ولا يتم التعرف على أي مخرج فكة."
          },
          "outputs": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/TravelRuleUtxoEntry"
            }
          }
        }
      },
      "TravelRuleChainSide": {
        "type": "object",
        "description": "محفظة أحد الطرفين كما حددها Didit من بيانات السلسلة.",
        "properties": {
          "address": {
            "type": "string",
            "description": "المحفظة. في شبكة memo، العنوان الكلاسيكي (يتم تقسيم عنوان XRP X-address إلى عنوانه الكلاسيكي ووسمه)؛ وفي Lightning، معرّف عقدة المدفوع له أو Lightning Address."
          },
          "memo": {
            "type": "string",
            "description": "علامة الوجهة (destination tag) أو المذكرة (memo) التي تشكل جزءًا من المحفظة؛ القيمة `\"\"` في حال عدم وجود أي منها."
          },
          "source": {
            "type": "string",
            "enum": [
              "declared",
              "x_address",
              "largest_input",
              "only_non_change_output",
              "amount_match",
              "invoice_payee",
              "updated"
            ],
            "description": "مصدر المحفظة: `declared` (طلبك)، `x_address` (مفصولة من عنوان XRP X-address)، `largest_input` (عنوان مدخلات UTXO الذي ساهم بأكبر قدر)، `only_non_change_output` (مخرج UTXO الوحيد الذي ليس فكة)، `amount_match` (مخرج UTXO الفردي الذي يدفع مبلغ التحويل)، `invoice_payee` (المستفيد المحدد في طلب دفع Lightning)، `updated` (تُعيّن لاحقاً باستخدام `action: update_originator_wallet`)."
          }
        }
      },
      "TravelRuleChainDetails": {
        "type": "object",
        "description": "كيفية تسمية سلسلة التحويل لمحفظتيه، وذلك عندما يكون هناك أكثر من عنوان يدفع لآخر. يكون فارغاً (`{}`) لتحويلات سلاسل الحسابات (EVM، Solana، Tron)، حيث يكون العنوانان هما المحفظتان. تقرأ المطابقة والتوجيه ودفتر العناوين المحافظ من هنا أولاً.",
        "properties": {
          "chain": {
            "type": "string",
            "description": "السلسلة القياسية، مثل `BTC` أو `XRP` أو `LIGHTNING` لتحويل Lightning."
          },
          "shape": {
            "type": "string",
            "enum": [
              "utxo",
              "memo",
              "lightning"
            ]
          },
          "originator": {
            "$ref": "#/components/schemas/TravelRuleChainSide"
          },
          "beneficiary": {
            "$ref": "#/components/schemas/TravelRuleChainSide"
          },
          "utxo": {
            "type": "object",
            "description": "في تحويل UTXO: المدخلات والمخرجات كما تم تخزينها (المبالغ كنصوص عشرية) وما الذي قرأته Didit في كل مخرج.",
            "properties": {
              "inputs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TravelRuleUtxoEntry"
                }
              },
              "outputs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TravelRuleUtxoEntry"
                }
              },
              "change_output_indexes": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "description": "المخرجات التي تُعيد الدفع إلى عنوان إدخال."
              },
              "beneficiary_output_index": {
                "type": "integer",
                "nullable": true,
                "description": "المُخرج الذي يدفع للمستفيد؛ وتكون null عندما يتعذر تمييز أي منها."
              }
            }
          },
          "lightning": {
            "type": "object",
            "description": "في تحويل Lightning: ما ينص عليه طلب الدفع. دائماً `kind` (`bolt11`، أو `bolt12_offer`، أو `bolt12_invoice`، أو `bolt12_invoice_request`، أو `lnurl`، أو `lightning_address`، أو `node_id`، أو `unknown`)؛ تضيف فاتورة BOLT11 كلاً من `network`، و`payee_node_id`، و`payment_hash`، و`amount_msat`، و`created_at`، و`expires_at`؛ ويضيف نص BOLT12 كلاً من `blinded_paths` و`payee_node_id`؛ ويضيف LNURL أو Lightning Address حقله `domain`. لا يتم حل أي شيء عبر الشبكة: يتم فك ترميز الطلب فقط.",
            "additionalProperties": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "declared_originator_not_an_input",
                "declared_beneficiary_not_an_output",
                "beneficiary_output_ambiguous",
                "beneficiary_output_amount_differs"
              ]
            },
            "description": "تناقضات UTXO التي تستحق المراجعة: المُرسِل المُعلَن ليس مدخلاً، أو المستفيد المُعلَن ليس مخرجاً، أو لم يتم التمكن من تمييز مخرج مستفيد واحد، أو أن مخرج المستفيد يدفع مبلغاً مختلفاً عما تنص عليه المعاملة."
          },
          "not_applicable_reason": {
            "type": "string",
            "enum": [
              "LIGHTNING_NO_PAYEE_IDENTIFIER",
              "LIGHTNING_BOLT12_BLINDED_PAYEE",
              "LIGHTNING_LNURL_NAMES_NO_PAYEE"
            ],
            "description": "في تحويل Lightning الصادر الذي لا يحدد طلب الدفع الخاص به أي مستفيد: سبب كون التحويل `NOT_APPLICABLE`. كود `LIGHTNING_NO_PAYEE_IDENTIFIER` (الطلب لا يحدد عقدة المستفيد، أو تعذر فك تشفيره)، أو `LIGHTNING_BOLT12_BLINDED_PAYEE` (العرض يخفي المستفيد خلف مسارات معماة)، أو `LIGHTNING_LNURL_NAMES_NO_PAYEE` (يحدد LNURL خدمة وليس مستفيداً). يفتح الكود نفسه آخر إدخال `timeline` للتحويل."
          }
        }
      },
      "WalletAddressImportRow": {
        "type": "object",
        "description": "محفظة واحدة للاستيراد: من خلال `address` الخاص بها، أو `address_hash` الخاص بها، أو كليهما. تُقبل أيضًا صيغ camelCase لهذه الحقول، وكذلك `walletAddress` و`walletAddressHash` و`destinationTag` و`externalUserId`.",
        "properties": {
          "address": {
            "type": "string",
            "maxLength": 128,
            "description": "عنوان المحفظة. الاسم المستعار: `walletAddress`."
          },
          "address_hash": {
            "type": "string",
            "description": "تجزئة SHA-256 للعنوان بحروف صغيرة، في صورة 64 حرفاً بنظام hex أو 44 حرفاً بنظام base64. أرسله بمفرده لتسجيل محفظة دون الكشف عن عنوانها؛ وإذا أُرسل مع `address`، فيجب أن يكون تجزئة ذلك العنوان. الاسم البديل: `walletAddressHash`."
          },
          "chain": {
            "type": "string",
            "maxLength": 32
          },
          "memo": {
            "type": "string",
            "maxLength": 256,
            "description": "وسم الوجهة (destination tag) أو المذكرة (memo). في XRP: وسم وجهة، وهو عدد صحيح من 0 إلى 4294967295 (يُقبل رقم JSON). في XLM: مذكرة نصية تصل إلى 28 بايت، أو معرف 64 بت أو تجزئة 32 بايت بصيغة hex. في EOS: حتى 256 بايت. في ATOM: حتى 256 حرفاً. في HBAR: حتى 100 بايت. محافظ Bitcoin وEVM وSolana وTron وLitecoin وBitcoin Cash وDogecoin وLightning لا تقبل أي مذكرة: وجود مذكرة هناك يؤدي إلى الخطأ `400`."
          },
          "holder_name": {
            "type": "string",
            "maxLength": 255
          },
          "holder_vendor_data": {
            "type": "string",
            "maxLength": 255,
            "description": "معرّفك الداخلي للحائز. الاسم المستعار: `externalUserId`."
          },
          "entity_type": {
            "type": "string",
            "enum": [
              "individual",
              "company"
            ],
            "default": "individual"
          },
          "label": {
            "type": "string",
            "maxLength": 255
          },
          "owner_type": {
            "type": "string",
            "enum": [
              "customer",
              "internal",
              "vasp"
            ],
            "default": "customer"
          },
          "travel_address": {
            "type": "string",
            "maxLength": 512
          },
          "self_declared": {
            "type": "boolean",
            "default": false,
            "description": "إنشاء المدخلة بعد التحقق منها بالفعل عبر إقرار ذاتي، عندما تسمح إعداداتك بذلك."
          }
        }
      },
      "WalletAddressImportReport": {
        "type": "object",
        "description": "ما حدث لكل صف من عملية الاستيراد، وفق ترتيب الإرسال.",
        "properties": {
          "total": {
            "type": "integer"
          },
          "created": {
            "type": "integer"
          },
          "existing": {
            "type": "integer"
          },
          "duplicate": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "row": {
                  "type": "integer",
                  "description": "رقم الصف، بدءاً من 1."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "created",
                    "existing",
                    "duplicate",
                    "failed"
                  ],
                  "description": "`created`: تمت إضافتها إلى السجل. `existing`: المحفظة موجودة بالفعل في السجل وتُركت دون تعديل. `duplicate`: تكرار لصف سابق في عملية الاستيراد هذه. `failed`: راجع `errors`."
                },
                "entry_id": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "إدخال دفتر العناوين الذي أنشأه الصف أو عثر عليه."
                },
                "errors": {
                  "type": "object",
                  "description": "أخطاء الحقول لصف بحالة `failed`؛ وفارغة في الحالات الأخرى."
                },
                "duplicate_of_row": {
                  "type": "integer",
                  "nullable": true,
                  "description": "في صف `duplicate`، الصف الذي يكرره."
                }
              }
            }
          }
        }
      },
      "TravelRuleCounterpartyContact": {
        "type": "object",
        "description": "عنوان امتثال تراسله وسيلة EMAIL لإدخال دليل واحد.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "counterparty": {
            "type": "string",
            "format": "uuid",
            "description": "حقل `id` الخاص بإدخال الدليل، كما يعرضه GET /v3/travel-rule/vasps/."
          },
          "counterparty_name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string",
            "description": "تسمية اختيارية، على سبيل المثال اسم الفريق."
          },
          "source": {
            "type": "string",
            "enum": [
              "staff",
              "application",
              "learned"
            ],
            "description": "staff: مُنسَّق من قبل Didit. learned: عنوان في أحد نطاقات VASP الخاصة التي استجابت لطلب عبر رابط الاستجابة الخاص بها. application: تمت إضافته بواسطة تطبيقك."
          },
          "scope": {
            "type": "string",
            "enum": [
              "platform",
              "application"
            ],
            "description": "platform: تنتقيه Didit أو تستخلصه من إجابة تم التحقق منها، ويُستخدم لجميع عملاء Didit، ويكون للقراءة فقط بالنسبة لك. application: خاص بتطبيقك."
          },
          "created_by": {
            "type": "string",
            "description": "فارغ لجهات اتصال المنصة ولجهات الاتصال التي أضافها مفتاح API."
          },
          "verified_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت آخر إجابة لهذا العنوان على طلب عبر رابط الاستجابة الخاص به."
          },
          "is_invalid": {
            "type": "boolean",
            "description": "true بمجرد ارتداد العنوان أو تقديم شكوى بشأنه؛ ويتخطاه مسار EMAIL."
          },
          "invalid_reason": {
            "type": "string",
            "enum": [
              "",
              "hard_bounce",
              "soft_bounce",
              "spam_complaint",
              "suppressed"
            ]
          },
          "invalid_detail": {
            "type": "string",
            "description": "السبب الذي قدمه خادم البريد المستلم، إن وُجد."
          },
          "invalid_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TravelRuleCounterpartyContactCreate": {
        "type": "object",
        "required": [
          "counterparty",
          "email"
        ],
        "properties": {
          "counterparty": {
            "type": "string",
            "format": "uuid",
            "description": "حقل `id` الخاص بإدخال الدليل."
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "name": {
            "type": "string",
            "description": "تسمية اختيارية.",
            "maxLength": 255
          }
        }
      },
      "TravelRuleNameMatch": {
        "type": "object",
        "nullable": true,
        "description": "مقارنة الاسم التي حسمت التحويل، أو null حتى يتم تشغيل مقارنة واحدة. عندما تكون الأطراف مقنّعة، وفي نسخة العميل الآخر من تبادل INTERNAL، يتم إخفاء `transfer_name` و`compared_name` و`matched_names` و`mismatched_names`. قد تختلف قيمة `score` عن `matched`: تتبع `matched` مستوى الصرامة، بينما تمثل `score` مدى التشابه بين الاسمين الكاملين.",
        "properties": {
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "درجة التشابه بين الاسمين الكاملين، من 0 إلى 100. تكون 0 إذا كان أي من الاسمين فارغاً."
          },
          "matched": {
            "type": "boolean",
            "description": "ما إذا كانت الأسماء تستوفي `strictness`. تتبع نتيجة التحويل `data_match`، الذي يقارن كل حقل، لذلك يمكن أن يكون التحويل COUNTERPARTY_MISMATCHED_DATA بينما تكون هذه القيمة true."
          },
          "method": {
            "type": "string",
            "enum": [
              "none",
              "exact_token",
              "token_subset",
              "token_containment",
              "sequence_ratio"
            ],
            "description": "كيفية تحديد `matched`: لا يوجد (`NONE`)، أو exact_token (`STRICT`)، أو token_subset (`DEFAULT`)، أو token_containment (`CONTAINS`)، أو sequence_ratio (`FUZZY`)."
          },
          "strictness": {
            "type": "string",
            "enum": [
              "NONE",
              "STRICT",
              "CONTAINS",
              "DEFAULT",
              "FUZZY"
            ]
          },
          "compared_with": {
            "type": "string",
            "enum": [
              "wallet_holder",
              "counterparty_vasp"
            ],
            "description": "wallet_holder: الحائز المسجل للمحفظة. counterparty_vasp: الاسم الذي أجاب به الطرف المقابل في صفحة الاستجابة عبر البريد الإلكتروني، أو إجابة Didit Test VASP في البيئة التجريبية."
          },
          "transfer_name": {
            "type": "string",
            "description": "الاسم المدوّن على التحويل."
          },
          "compared_name": {
            "type": "string",
            "description": "الاسم الذي تمّت المقارنة معه."
          },
          "matched_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "كلمات `transfer_name` الموجودة في `compared_name`."
          },
          "mismatched_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "كلمات `transfer_name` غير الموجودة في `compared_name`، ثم كلمات `compared_name` غير الموجودة في `transfer_name`."
          }
        }
      },
      "TravelRuleTransferRow": {
        "type": "object",
        "description": "تحويل Travel Rule واحد كما تعرضه قائمة التحويلات: أسماء VASP والمحافظ والملاحظات فقط، دون بيانات المُرسِل أو المستفيد الشخصية على الإطلاق.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف التحويل."
          },
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "description": "معاملة Didit التي تنتمي إليها عملية التحويل."
          },
          "txn_id": {
            "type": "string",
            "nullable": true,
            "description": "المعرّف الخاص بك للمعاملة. التحويلات التي تسجلها Didit نيابة عنك، مثل التحويل الوارد لـ Didit Test VASP، تحمل معرّفاً تم إنشاؤه."
          },
          "txn_date": {
            "type": "string",
            "format": "date-time"
          },
          "kind": {
            "type": "string",
            "enum": [
              "withdrawal",
              "deposit",
              "message"
            ],
            "description": "withdrawal: صادر. message: تحويل وارد أنشأه مسار من رسالة طرف مقابل (استعلام TRP، أو المسار الوارد INTERNAL، أو رسالة من GTR أو VerifyVASP أو Sygna Bridge). deposit: أي تحويل وارد آخر."
          },
          "direction": {
            "type": "string",
            "enum": [
              "INBOUND",
              "OUTBOUND"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "AWAITING_COUNTERPARTY",
              "ON_HOLD",
              "COMPLETED",
              "FINISHED",
              "CANCELLED",
              "EXPIRED",
              "COUNTERPARTY_MISMATCHED_DATA",
              "COUNTERPARTY_VASP_NOT_FOUND",
              "COUNTERPARTY_VASP_NOT_REACHABLE",
              "UNCONFIRMED_OWNERSHIP",
              "COUNTERPARTY_VASP_GENERAL_DECLINE",
              "NOT_ENOUGH_COUNTERPARTY_DATA",
              "NOT_APPLICABLE"
            ]
          },
          "reason": {
            "type": "string",
            "description": "سبب تعثر معاملة بحالة `COUNTERPARTY_VASP_NOT_FOUND` أو `COUNTERPARTY_VASP_NOT_REACHABLE`، وهي نفس قيمة `reason` الخاصة بالمعاملة نفسها، بحيث تُميّز القائمة بين رسالة الامتثال الإلكترونية المرتدة من طرف مقابل ليس لديه مسار دون فتح كل معاملة. وتكون `\"\"` لأي حالة أخرى. راجع [سبب تعثر المعاملة](/ar/transaction-monitoring/travel-rule#لماذا-يتوقف-التحويل)."
          },
          "rail": {
            "type": "string",
            "nullable": true,
            "enum": [
              "INTERNAL",
              "TRP",
              "GTR",
              "TRUST",
              "VERIFYVASP",
              "SYGNA",
              "EMAIL",
              "TEST_VASP",
              null
            ]
          },
          "asset": {
            "type": "string",
            "description": "عملة المعاملة."
          },
          "amount": {
            "type": "string",
            "description": "المبلغ كرقم عشري عادي، على سبيل المثال \"1.25\"."
          },
          "originator_vasp": {
            "type": "string",
            "description": "الصادر: الاسم القانوني لـ VASP الخاص بك. الوارد: اسم الطرف المقابل، من مدخل الدليل الخاص به، أو العضو في شبكة Didit، أو مُرسِل TRP، أو Didit Test VASP، أو الاسم المعلن في التحويل. فارغ عند عدم معرفة أي منها."
          },
          "beneficiary_vasp": {
            "type": "string",
            "description": "الصادر: اسم الطرف المقابل، ومُحدَّد بالطريقة نفسها. الوارد: الاسم القانوني لـ VASP الخاص بك."
          },
          "originator_wallet": {
            "type": "string"
          },
          "beneficiary_wallet": {
            "type": "string"
          },
          "originator_memo": {
            "type": "string",
            "description": "الملاحظة (Memo) أو وسم الوجهة (destination tag)، ويكون فارغاً على سلاسل البلوكتشين التي لا تتضمن ذلك."
          },
          "beneficiary_memo": {
            "type": "string"
          },
          "originator_wallet_type": {
            "type": "string",
            "enum": [
              "vasp",
              "self_hosted",
              "own"
            ],
            "description": "vasp، أو self_hosted (معلن كمحفظة غير مستضافة) أو own (محفظة يسجلها دفتر عناوينك كملكية لك). يكون طرفك دائماً vasp."
          },
          "beneficiary_wallet_type": {
            "type": "string",
            "enum": [
              "vasp",
              "self_hosted",
              "own"
            ]
          },
          "matched_transaction_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "الجانب الآخر من إيداع قمت بمطابقته يدوياً مع تحويل معلن."
          },
          "deadline_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت انتهاء صلاحية التحويل إذا كان لا يزال بانتظار الطرف المقابل. يُعيَّن لكل تحويل تُنشئه عبر `POST /v3/transactions/` يتطلب تبادلاً، سواء كان صادراً أو وارداً. يكون Null إذا كان أقل من الحد، أو في مدفوعات Lightning التي لا تنطبق عليها Travel Rule، وفي التحويلات الواردة التي تنشئها Didit عندما يتواصل معك طرف مقابل (استفسار TRP وارد، أو رسالة شبكة، أو مسار INTERNAL الوارد)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BankAccountCheckHolder": {
        "description": "الاسم الذي يتم التحقق من الحساب بناءً عليه. أرسل قيمة واحدة فقط من `full_name` أو `business_name`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/BankAccountCheckPersonHolder"
          },
          {
            "$ref": "#/components/schemas/BankAccountCheckBusinessHolder"
          }
        ]
      },
      "BankAccountCheckRequest": {
        "type": "object",
        "required": [
          "country",
          "account",
          "holder"
        ],
        "properties": {
          "country": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "description": "دولة الحساب، كرمز ISO 3166-1 alpha-3، على سبيل المثال `NGA`. تُقبل الأحرف الصغيرة.",
            "example": "NGA"
          },
          "account": {
            "type": "object",
            "description": "الحساب بالطريقة التي تكتبه بها دولته: إما `iban`، أو `account_number` مع رمز البنك أو الفرع الذي تتطلبه الدولة (`sort_code` أو `routing_number` أو `transit_institution` أو `bsb` أو `ifsc` أو `bank_code` أو `bic`). تتطلب المكسيك `clabe` وتتطلب الأرجنتين `cbu_cvu`، واللذان يحددان البنك بالفعل. يضيف حساب الشركات `registration_id` عندما تطلب الدولة ذلك. يتم تجاهل المسافات والشرطات والنقاط. يتم تجاهل المفاتيح التي لا يستخدمها فحص الدولة؛ وأي مفتاح تحتاجه ولم تحصل عليه يُرجع الخطأ `400` مع ذكر اسمه.",
            "properties": {
              "iban": {
                "type": "string",
                "maxLength": 64,
                "description": "رقم IBAN، في دولة تستخدم أرقام IBAN. يجب أن ينتمي إلى `country`."
              },
              "account_number": {
                "type": "string",
                "maxLength": 64,
                "description": "رقم الحساب، في دولة يُكتب فيها الحساب مع رمز بنك أو فرع منفصل."
              },
              "sort_code": {
                "type": "string",
                "maxLength": 64,
                "description": "المملكة المتحدة: رمز الفرز المكوّن من 6 أرقام."
              },
              "routing_number": {
                "type": "string",
                "maxLength": 64,
                "description": "الولايات المتحدة: رقم التوجيه المالي ABA المكوّن من 9 أرقام."
              },
              "transit_institution": {
                "type": "string",
                "maxLength": 64,
                "description": "كندا: رقم العبور والمؤسسة المكون من 8 أرقام."
              },
              "bsb": {
                "type": "string",
                "maxLength": 64,
                "description": "أستراليا: رمز BSB المكون من 6 أرقام."
              },
              "ifsc": {
                "type": "string",
                "maxLength": 64,
                "description": "الهند: رمز IFSC المكوّن من 11 حرفاً."
              },
              "bank_code": {
                "type": "string",
                "maxLength": 64,
                "description": "رمز البنك، حيث تحتاج الدولة إلى ذلك، على سبيل المثال في نيجيريا."
              },
              "bic": {
                "type": "string",
                "maxLength": 64,
                "description": "رمز BIC الخاص بالبنك، حيث يتطلب فحص الدولة ذلك."
              },
              "clabe": {
                "type": "string",
                "maxLength": 64,
                "description": "المكسيك: رقم CLABE المكون من 18 رقمًا. وهو يحدد اسم البنك بالفعل."
              },
              "cbu_cvu": {
                "type": "string",
                "maxLength": 64,
                "description": "الأرجنتين: رقم CBU أو CVU المكون من 22 رقماً. وهو يحدد اسم البنك بالفعل."
              },
              "registration_id": {
                "type": "string",
                "maxLength": 64,
                "description": "رقم تسجيل حساب الشركة، حيثما تطلب الدولة ذلك."
              }
            },
            "additionalProperties": {
              "type": "string",
              "maxLength": 64
            },
            "example": {
              "bank_code": "000014",
              "account_number": "0123450001"
            }
          },
          "holder": {
            "$ref": "#/components/schemas/BankAccountCheckHolder"
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية الفحص هذه، ويُعاد دون تغيير.",
            "example": "payout_20481"
          },
          "consent": {
            "type": "boolean",
            "default": false,
            "description": "يُضبط على `true` عندما يوافق صاحب الحساب صراحةً على هذا الفحص. مطلوب في الدول التي تتطلب فيها فحوصات الحسابات هذه الموافقة: بدونه يُرفض الفحص برمز `400` ويكون `field` هو `consent` ويكون `reason` هو `required`، ولا يتم فوترة أي شيء. وهو اختياري في بقية الدول، وتقوم Didit بتسجيله مع تكلفة الفحص عند إرساله.",
            "example": true
          }
        }
      },
      "BankAccountCheckResponse": {
        "type": "object",
        "required": [
          "request_id",
          "result",
          "holder_name",
          "account",
          "vendor_data",
          "created_at"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف هذا الفحص."
          },
          "result": {
            "type": "string",
            "enum": [
              "match",
              "close_match",
              "no_match",
              "cannot_verify"
            ],
            "description": "`match`: يحتفظ البنك بالحساب تحت الاسم الذي أرسلته. `close_match`: تحت اسم مشابه، على سبيل المثال اسم أوسط مفقود أو خطأ إملائي. `no_match`: تحت اسم آخر، أو لا يوجد مثل هذا الحساب. `cannot_verify`: أجاب البنك دون مقارنة الاسم، على سبيل المثال لحساب محظور أو مغلق."
          },
          "holder_name": {
            "type": "string",
            "nullable": true,
            "description": "فقط في حالة `close_match`، وفقط عندما يعيده البنك: الاسم الموجود على الحساب، كما يحتفظ به البنك. يكون `null` بخلاف ذلك."
          },
          "account": {
            "type": "string",
            "description": "الحساب، محجوباً باستثناء آخر 4 أحرف."
          },
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك، كما أرسلته تماماً."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت تشغيل الفحص، بتوقيت UTC."
          }
        }
      },
      "BankAccountCheckError": {
        "type": "object",
        "required": [
          "detail"
        ],
        "properties": {
          "detail": {
            "type": "string",
            "description": "الخطأ الذي حدث، باللغة الإنجليزية."
          },
          "code": {
            "type": "string",
            "description": "رمز ثابت للتفريع البرمجي بناءً عليه. غير موجود في حالتي `401` و `403`."
          },
          "field": {
            "type": "string",
            "description": "في حالة `400` فقط: حقل جسم الطلب المراد تصحيحه، كمسار مفصول بنقاط، على سبيل المثال `account.sort_code`."
          },
          "reason": {
            "type": "string",
            "enum": [
              "required",
              "length",
              "format",
              "checksum",
              "country_mismatch",
              "rejected"
            ],
            "description": "في حالة `400` فقط: سبب رفض الحقل. الفحوصات `required` و`length` و`format` و`checksum` و`country_mismatch` (IBAN لدولة أخرى) هي فحوصات Didit الخاصة؛ بينما تعني `rejected` أن البنك رفض الحساب كما أُرسل."
          }
        }
      },
      "BankVerificationResult": {
        "type": "object",
        "description": "نتيجة خطوة واحدة للتحقق من الحساب البنكي، لكل من التحقق من المستخدمين والتحقق من الشركات (KYB). يوضح `method` كيفية التحقق من الحساب، بينما يشير `none` إلى أن الشخص تابع دون بنك قبل تقييم أي محاولة. يشير `continued_without_bank` إلى أن الشخص تابع دون بنك، أيضاً بعد محاولة تم تقييمها. راجع [طرق التحقق من الحساب البنكي](/ar/core-technology/bank-verification/verification-methods) و[عندما يتعذر على الشخص التحقق من حسابه البنكي](/ar/core-technology/bank-verification/fallbacks).",
        "properties": {
          "schema_version": {
            "type": "integer",
            "description": "إصدار هيكل النتيجة هذا. `1` حالياً."
          },
          "bank_verification_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف هذه النتيجة."
          },
          "node_id": {
            "type": "string",
            "description": "عقدة سير العمل التي تنتمي إليها هذه النتيجة."
          },
          "status": {
            "type": "string",
            "enum": [
              "Not Finished",
              "Approved",
              "Declined",
              "In Review",
              "Expired"
            ],
            "description": "القرار النهائي للخطوة، بعد إجراءاتها وقواعد حالتها."
          },
          "original_status": {
            "type": "string",
            "nullable": true,
            "description": "الحكم الأول الذي توصلت إليه الخطوة، قبل أي تغيير لاحق مثل مراجعة يدوية."
          },
          "method": {
            "type": "string",
            "nullable": true,
            "enum": [
              "open_banking",
              "account_lookup",
              "microdeposits",
              "statement",
              "none"
            ],
            "description": "كيفية التحقق من الحساب: `open_banking` (تسجيل الدخول البنكي: قام الشخص بتسجيل الدخول في بنكه)، أو `account_lookup` (التحقق من الحساب: قام الشخص بكتابة تفاصيل الحساب وأكد البنك الاسم)، أو `microdeposits` أو `statement` (رفع كشف الحساب). تكون `none` عندما يتابع الشخص بدون بنك قبل تقييم أي محاولة، وبالتالي لم يتم التحقق من أي حساب. بعد المحاولة الخاضعة للتقييم، تظل الطريقة المستخدمة في تلك المحاولة. وتكون `null` حتى يتم تقييم الحساب، وعندما يقلص سير العمل البيانات التي يرجعها. تقرأ قواعد سير العمل نفس القيمة كـ `bank.method`."
          },
          "provider": {
            "type": "string",
            "nullable": true,
            "description": "مفتاح المسار الذي أجرى الاتصال. اقرأ `method`، وليس هذا المفتاح، لمعرفة كيفية التحقق من الحساب."
          },
          "credential_source": {
            "type": "string",
            "nullable": true,
            "enum": [
              "native",
              "byok"
            ],
            "description": "`native`: المسار الخاص بـ Didit، ويتم فوترته على رصيد Didit الخاص بك. `byok`: مزود من السوق قمت بربطه باستخدام بيانات الاعتماد الخاصة بك."
          },
          "route": {
            "type": "object",
            "nullable": true,
            "description": "المسار الذي تم اختياره قبل الموافقة. لا يتغير بعد ذلك مطلقاً.",
            "properties": {
              "provider_key": {
                "type": "string",
                "nullable": true,
                "description": "مفتاح المسار."
              },
              "credential_source": {
                "type": "string",
                "enum": [
                  "native",
                  "byok"
                ]
              },
              "is_fallback": {
                "type": "boolean",
                "description": "ما إذا كان مسار Didit الخاص قد حلّ محلّ مزوّد سوق تعذّر عليه الاتصال."
              },
              "provider_connection_id": {
                "type": "string",
                "nullable": true,
                "description": "اتصال السوق المستخدم، لـ `byok`."
              },
              "requested_scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "البيانات التي طلبها الاتصال، على سبيل المثال `ownership` أو `balances`."
              }
            }
          },
          "connection": {
            "type": "object",
            "nullable": true,
            "description": "اتصال المحاولة الأخيرة. تكون القيمة `null` قبل المحاولة الأولى.",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "connected",
                  "cancelled",
                  "timeout",
                  "failed",
                  "unsupported",
                  "revoked",
                  "expired"
                ]
              },
              "institution_id": {
                "type": "string",
                "nullable": true,
                "description": "معرّف البنك. يكون `null` لفحص الحساب، عندما لا يتم اختيار أي بنك."
              },
              "institution_name": {
                "type": "string",
                "nullable": true,
                "description": "اسم البنك. يكون `null` لفحص الحساب."
              },
              "institution_country": {
                "type": "string",
                "nullable": true,
                "description": "دولة الحساب، بصيغة ISO 3166-1 alpha-3."
              },
              "oauth": {
                "type": "boolean",
                "nullable": true,
                "description": "ما إذا كان تسجيل الدخول المصرفي قد تم عبر OAuth أو من تطبيق إلى تطبيق. وتكون `null` لفحص الحساب."
              },
              "connected_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت نجاح الاتصال."
              },
              "consent_expires_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت انتهاء موافقة البنك، بالنسبة لتسجيل الدخول عبر البنك."
              },
              "last_refreshed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت آخر إعادة قراءة للبيانات المالية."
              },
              "attempts": {
                "type": "integer",
                "description": "المحاولات التي أجراها الشخص في هذه الخطوة، مجمعةً لكافة الطرق معاً."
              },
              "reason_code": {
                "type": "string",
                "nullable": true,
                "description": "سبب عدم كون الاتصال في حالة `connected` ببساطة، على سبيل المثال `USER_CANCELLED` أو `INSTITUTION_DOWN` أو `ACCOUNT_NOT_FOUND` أو `REFERENCE_IDENTITY_MISSING` أو `VERIFICATION_COMPLETED`."
              }
            }
          },
          "account": {
            "type": "object",
            "nullable": true,
            "description": "الحساب الخاضع للتقييم. يكون `null` حتى يتم تقييم الحساب.",
            "properties": {
              "account_id_masked": {
                "type": "string",
                "nullable": true,
                "description": "رقم الحساب، محجوباً."
              },
              "iban_masked": {
                "type": "string",
                "nullable": true,
                "description": "رقم IBAN، مقنّع."
              },
              "sort_code": {
                "type": "string",
                "nullable": true,
                "description": "رمز الفرز، في المملكة المتحدة."
              },
              "routing_number_masked": {
                "type": "string",
                "nullable": true,
                "description": "رقم التوجيه، محجوب."
              },
              "type": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "checking",
                  "current",
                  "savings",
                  "business",
                  "other"
                ]
              },
              "subtype": {
                "type": "string",
                "nullable": true,
                "description": "النوع الفرعي للحساب لدى البنك نفسه."
              },
              "currency": {
                "type": "string",
                "nullable": true,
                "description": "عملة الحساب حسب معيار ISO 4217."
              },
              "holder_type": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "person",
                  "business",
                  "unknown"
                ]
              },
              "holders_count": {
                "type": "integer",
                "nullable": true
              },
              "is_joint": {
                "type": "boolean",
                "nullable": true
              },
              "is_business": {
                "type": "boolean",
                "nullable": true
              }
            }
          },
          "ownership": {
            "type": "object",
            "nullable": true,
            "description": "كيفية مقارنة صاحب الحساب بالهوية التي تم التحقق منها. تكون `null` حتى يتم تقييم الحساب.",
            "properties": {
              "result": {
                "type": "string",
                "enum": [
                  "match",
                  "partial_match",
                  "no_match",
                  "unknown",
                  "not_verifiable"
                ],
                "description": "`partial_match` هو تطابق قريب. `not_verifiable`: ردّ البنك دون وجود صاحب حساب للمقارنة. `unknown`: تعذرت قراءة الإثبات، أو لم تكن هناك هوية للمقارنة."
              },
              "reference_identity_source": {
                "type": "string",
                "nullable": true,
                "description": "الخطوة التي تمت مقارنة هوية الحامل معها: `kyc`، أو `database_validation`، أو `expected_details`، أو `questionnaire`، أو `document_ai`، أو `kyb`."
              },
              "name_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "nullable": true,
                "description": "درجة Didit لاسم حامل الحساب."
              },
              "provider_name_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "nullable": true,
                "description": "درجة اسم صاحب الحساب الخاصة بالبنك، في حال إرجاعها."
              },
              "address_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "nullable": true,
                "description": "درجة عنوان حامل الحساب، عند تشغيل مطابقة العنوان."
              },
              "email_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "nullable": true,
                "description": "درجة البريد الإلكتروني لحامل الحساب، عند تشغيل مطابقة البريد الإلكتروني."
              },
              "phone_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "nullable": true,
                "description": "درجة هاتف حامل الحساب، عند تشغيل مطابقة الهاتف."
              },
              "dob_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "nullable": true,
                "description": "درجة تاريخ ميلاد حامل الحساب، عندما يشارك البنك تاريخ الميلاد."
              },
              "close_match": {
                "type": "boolean",
                "nullable": true,
                "description": "ما إذا كان الاسم يقع ضمن نطاق التطابق التقريبي."
              },
              "holder_confirmation": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "pending",
                  "confirmed",
                  "rejected"
                ],
                "description": "إجابة الشخص عند مطالبته بتأكيد اسم متطابق جزئياً. تكون `null` إذا لم يُسأل مطلقاً."
              },
              "method": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "exact",
                  "token_set",
                  "nickname",
                  "transliteration",
                  "fuzzy",
                  "provider_only",
                  "microdeposits"
                ],
                "description": "أي مقارنة للأسماء أنتجت الدرجة. هذه ليست طريقة التحقق: اقرأ `method` من المستوى الأعلى لمعرفة ذلك."
              },
              "matched_holder_index": {
                "type": "integer",
                "nullable": true
              },
              "holders": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "كل صاحب حساب أدرجه البنك، مع درجاته."
              },
              "owner_identity_available": {
                "type": "boolean",
                "nullable": true
              },
              "evidence_freshness": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "live",
                  "cached",
                  "refreshed"
                ]
              },
              "evaluated_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "وقت احتساب القرار."
              }
            }
          },
          "financial_data": {
            "type": "object",
            "description": "البيانات المالية التي قرأتها الخطوة. يقرأها تسجيل الدخول البنكي فقط.",
            "properties": {
              "balances": {
                "type": "object",
                "nullable": true,
                "description": "مع النطاق `balances`."
              },
              "transactions": {
                "type": "object",
                "nullable": true,
                "description": "مع النطاق `transactions`."
              },
              "income": {
                "type": "object",
                "nullable": true,
                "description": "مع النطاق `income`."
              },
              "categorization": {
                "type": "object",
                "nullable": true,
                "description": "تصنيف Didit للمعاملات المقروءة. `null` في حال عدم وجودها."
              },
              "not_collected": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "balances",
                    "income",
                    "transactions"
                  ]
                },
                "description": "البيانات التي طلبتها الخطوة والتي لا تجمعها الطريقة التي تحققت من الحساب. تأتي الأرصدة والمعاملات والدخل من تسجيل الدخول المصرفي فقط، لذلك يسردها هنا الحساب الذي تم التحقق منه عبر فحص الحساب. لا يُعد ذلك فشلًا أبدًا. ويكون فارغًا بخلاف ذلك."
              }
            }
          },
          "billing": {
            "type": "object",
            "nullable": true,
            "properties": {
              "route": {
                "type": "string",
                "enum": [
                  "native",
                  "byok"
                ]
              },
              "billed": {
                "type": "boolean"
              },
              "marketplace_fee": {
                "type": "string",
                "nullable": true,
                "description": "رسوم منصة السوق المفروضة، لـ `byok`."
              },
              "usage_type": {
                "type": "string",
                "nullable": true,
                "description": "بند الاستخدام الذي تم قيد الرسوم عليه: `bank_verification` لتسجيل الدخول البنكي أو فحص الحساب، و`bank_statement_upload` لرفع كشف الحساب دون أي محاولة بنكية مدفوعة قبله، و`bank_byok_fee` لرسوم السوق على مزود الخدمة الخاص بك. تكون `null` عندما لا يتم احتساب أي رسوم."
              }
            }
          },
          "reference_identity": {
            "type": "object",
            "nullable": true,
            "description": "الهوية التي تمت مقارنة الحامل بها، مع مصدرها."
          },
          "signals": {
            "type": "object",
            "nullable": true,
            "description": "إشارات الحساب المقروءة من سجل المعاملات، عندما تقرأ الخطوة أحدها."
          },
          "connection_abandoned": {
            "type": "boolean",
            "nullable": true,
            "description": "ما إذا كانت الخطوة قد انتهت دون تطابق بعد أن غادر الشخص عند بنكه."
          },
          "not_covered": {
            "type": "boolean",
            "nullable": true,
            "description": "ما إذا كان تعذر الوصول إلى بنك الشخص أو دولته في هذه الخطوة. وتكون أيضاً `true` عندما يتابع الشخص دون بنك لعدم توفر طريقة يمكنها التحقق من دولته أو بنكه."
          },
          "continued_without_bank": {
            "type": "boolean",
            "description": "ما إذا كان الشخص قد غادر الخطوة عبر **Continue without your bank**. يشير `continuation` حينها إلى السبب. تكون قيمة `method` هي `none` عند عدم تقييم أي محاولة قبل أن يتابع. بعد إجراء محاولة خضعت للتقييم، مثل عدم تطابق صاحب الحساب، تظل قيمة `method` هي طريقة تلك المحاولة وتظل نتيجة المحاولة ورموز أسبابها قائمة. يتم إرجاعها حتى لو قلص سير العمل البيانات التي يعيدها."
          },
          "continuation": {
            "type": "object",
            "nullable": true,
            "description": "كيفية متابعة الشخص بدون بنك. تكون `null` عندما لا يتابع بذلك. عندما يقلص سير العمل البيانات التي يرجعها، يظل حقل `reason` يُرجع بينما تكون كافة المفاتيح الأخرى `null`.",
            "properties": {
              "reason": {
                "type": "string",
                "enum": [
                  "no_route",
                  "institution_unsupported",
                  "attempts_exhausted",
                  "person_choice"
                ],
                "description": "السبب، وفقاً لما حدده Didit عندما تابع الشخص: `no_route` (لا يوجد تسجيل دخول بنكي أو فحص للحساب يدعم دولته)، أو `institution_unsupported` (البنك الذي اختاره لا يمكن استخدامه في هذه الخطوة)، أو `attempts_exhausted` (استُنفدت جميع المحاولات ولم تكن أي منها قيد التنفيذ)، أو `person_choice` (كانت هناك طريقة للتحقق واختار المتابعة، وينطبق ذلك أيضاً عندما يتعذر الوصول إلى بنكه حالياً). يتبع `no_route` و`institution_unsupported` الإجراء `bank_unsupported_action`، ويتبع `attempts_exhausted` الإجراء `bank_attempts_exhausted_action`، بينما يتبع `person_choice` الإجراء `bank_skipped_action`، ما لم تكن هناك محاولة تم تقييمها قد حسمت الخطوة بالفعل."
              },
              "country": {
                "type": "string",
                "nullable": true,
                "description": "الدولة التي كان الشخص يجري التحقق فيها، وفق ISO 3166-1 alpha-3. تكون القيمة `null` إذا واصل قبل اختيار دولة."
              },
              "offered": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "statement",
                    "microdeposits"
                  ]
                },
                "nullable": true,
                "description": "الطرق الأخرى للتحقق التي قدمتها تلك الدولة للشخص عند متابعته، بالترتيب الذي عُرضت به: `statement` (تحميل كشف حساب)، ثم `microdeposits`. تكون فارغة في حال لم تقدم أي طريقة."
              },
              "institution_id": {
                "type": "string",
                "nullable": true,
                "description": "بالنسبة لـ `institution_unsupported`، معرف البنك الذي لم يتمكن الشخص من استخدامه: البنك الذي اختاره، أو البنك الذي انتهت عنده محاولته الأخيرة. تأخذه Didit من قائمتها الخاصة بالبنوك، ولا تأخذه أبداً من جهاز الشخص، وبالتالي فإن البنك الذي لا تحتويه تلك القائمة يكون `null`. ويكون `null` لكل سبب آخر."
              },
              "institution_name": {
                "type": "string",
                "nullable": true,
                "description": "بالنسبة لـ `institution_unsupported`، اسم ذلك البنك، من نفس القائمة مثل `institution_id`. ويكون `null` عندما لا تحتوي تلك القائمة على البنك، ولكل سبب آخر."
              },
              "continued_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "متى تابع الشخص."
              }
            }
          },
          "evidence_purged_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت حذف الإثبات البنكي بموجب `bank_evidence_retention_days`. وتكون القيمة `null` بخلاف ذلك."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "رموز معلوماتية، على سبيل المثال `holder_declared`. لا يغيّر التحذير الحالة بمفرده أبداً."
          },
          "reason_codes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "سبب صدور القرار بالشكل الذي ظهر به، على سبيل المثال `OWNER_NAME_PARTIAL`. قد ينطبق أكثر من سبب. `NOT_COVERED`: واصل الشخص دون بنك لعدم وجود طريقة يمكنها التحقق من دولته أو بنكه. `SKIPPED`: اختار الشخص المتابعة دون بنك رغم توفر طريقة للتحقق. لا تتم إضافة أي منهما إذا كانت هناك محاولة تم تقييمها قد حسمت الخطوة بالفعل."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BankAccountCheckPersonHolder": {
        "type": "object",
        "description": "الشخص الذي ينبغي أن يمتلك الحساب.",
        "required": [
          "full_name"
        ],
        "properties": {
          "full_name": {
            "type": "string",
            "maxLength": 255,
            "description": "الاسم الكامل للشخص الذي ينبغي أن يمتلك الحساب.",
            "example": "Maria Oliveira"
          }
        }
      },
      "BankAccountCheckBusinessHolder": {
        "type": "object",
        "description": "الشركة التي يجب أن تمتلك الحساب. للتحقق من حساب تجاري.",
        "required": [
          "business_name"
        ],
        "properties": {
          "business_name": {
            "type": "string",
            "maxLength": 255,
            "description": "اسم الشركة التي يُفترض أن تحتفظ بالحساب. يتحقق من حساب شركة."
          }
        }
      },
      "BankVerificationPricing": {
        "type": "object",
        "description": "قائمة أسعار التحقق البنكي العامة: رفع كشف الحساب، ورسوم مفتاح المزود الخاص، وطرق كل دولة.",
        "required": [
          "currency",
          "statement_upload",
          "own_provider_fee_usd",
          "countries"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "USD"
            ],
            "description": "عملة كل سعر في الاستجابة.",
            "example": "USD"
          },
          "statement_upload": {
            "$ref": "#/components/schemas/BankStatementUploadPricing"
          },
          "own_provider_fee_usd": {
            "type": "string",
            "description": "الرسوم المفروضة على كل فحص ملكية خاضع للفوترة على مسار يستخدم عقد المزود الخاص بك بدلاً من Didit، وتُحصّل بغض النظر عن النتيجة. لا يتم فرض رسوم على الاتصال الملغى أو الذي انتهت مهلته أو المتروك. سلسلة عشرية مكونة من 4 منازل عشرية، بالدولار الأمريكي.",
            "example": "0.0200"
          },
          "countries": {
            "type": "object",
            "description": "كل دولة، مصنفة برمز ISO 3166-1 alpha-3.",
            "additionalProperties": {
              "$ref": "#/components/schemas/BankVerificationPricingCountry"
            }
          }
        }
      },
      "BankStatementUploadPricing": {
        "type": "object",
        "description": "كيفية احتساب سعر رفع كشف الحساب البنكي.",
        "required": [
          "price_usd",
          "included_after_charged_bank_attempt",
          "standalone_available"
        ],
        "properties": {
          "price_usd": {
            "type": "string",
            "description": "سعر تحميل كشف الحساب بعد محاولة مصرفية مدفوعة. سلسلة عشرية مكونة من 4 أرقام عشرية، بالدولار الأمريكي.",
            "example": "0.0000"
          },
          "included_after_charged_bank_attempt": {
            "type": "boolean",
            "description": "`true` عندما يتم تضمين الرفع دون أي رسوم إضافية بعد محاولة بنكية خاضعة للرسوم في نفس الجلسة.",
            "example": true
          },
          "standalone_available": {
            "type": "boolean",
            "description": "تكون القيمة `true` عندما يمكن تشغيل رفع كشف الحساب بمفرده، دون محاولة بنكية أولاً. وتكون `false` في بيئة الإنتاج؛ ويمكن لجلسات البيئة التجريبية اختبارها بدون فوترة.",
            "example": false
          }
        }
      },
      "BankVerificationPricingCountry": {
        "type": "object",
        "description": "طرق التحقق البنكي لدولة واحدة وأسعارها المدرجة في القائمة.",
        "required": [
          "name",
          "methods"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "اسم الدولة باللغة الإنجليزية.",
            "example": "United Kingdom"
          },
          "methods": {
            "$ref": "#/components/schemas/BankVerificationPricingMethods"
          }
        }
      },
      "BankVerificationPricingMethods": {
        "type": "object",
        "description": "طريقتا التحقق من الحساب البنكي في دولة ما.",
        "required": [
          "open_banking",
          "account_lookup"
        ],
        "properties": {
          "open_banking": {
            "$ref": "#/components/schemas/BankSignInPricing"
          },
          "account_lookup": {
            "$ref": "#/components/schemas/BankAccountCheckPricing"
          }
        }
      },
      "BankSignInPricing": {
        "type": "object",
        "description": "تسجيل الدخول إلى البنك: يقوم الشخص بتسجيل الدخول إلى بنكه. يُسعّر حسب السوق، وهو متطابق لجميع البنوك فيه.",
        "required": [
          "available",
          "market",
          "price_usd",
          "add_ons"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "تكون القيمة `true` فقط عندما توفر Didit تسجيل الدخول البنكي في هذه الدولة في بيئة الإنتاج.",
            "example": true
          },
          "market": {
            "type": "string",
            "nullable": true,
            "description": "السوق الذي يسري سعره. تكون القيمة `null` عندما لا تتوفر.",
            "example": "UK and EEA"
          },
          "price_usd": {
            "type": "string",
            "nullable": true,
            "description": "سعر القائمة لتسجيل دخول بنكي واحد. `null` عندما لا يكون متاحاً. سلسلة عشرية مكونة من 4 أرقام عشرية، بالدولار الأمريكي.",
            "example": "0.7900"
          },
          "add_ons": {
            "type": "object",
            "description": "الإضافات المسعرة في هذه الدولة، كل منها عبارة عن سلسلة نصية تمثل رقماً عشرياً بأربع منازل عشرية بالدولار الأمريكي (USD)، تُضاف إلى سعر تسجيل الدخول المصرفي. تُسرد الإضافات التي تقدمها الدولة فقط؛ وتكون فارغة عندما لا يكون تسجيل الدخول المصرفي متاحاً.",
            "properties": {
              "balance": {
                "type": "string",
                "description": "إضافة رصيد الحساب.",
                "example": "0.3500"
              },
              "transactions": {
                "type": "string",
                "description": "إضافة المعاملات.",
                "example": "1.3000"
              }
            }
          }
        }
      },
      "BankAccountCheckPricing": {
        "type": "object",
        "description": "فحص الحساب: يقوم الشخص بكتابة رقم حسابه وتقوم Didit بالتحقق منه مع البنك. يُسعر لكل دولة.",
        "required": [
          "available",
          "price_usd"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "تكون القيمة `true` فقط عندما توفر Didit فحص الحساب في هذه الدولة في بيئة الإنتاج.",
            "example": true
          },
          "price_usd": {
            "type": "string",
            "nullable": true,
            "description": "سعر القائمة لفحص حساب واحد يجيب عليه البنك. `null` عندما لا يكون متاحاً. سلسلة عشرية مكونة من 4 أرقام عشرية، بالدولار الأمريكي.",
            "example": "0.4000"
          }
        }
      },
      "ImportProvider": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "sumsub",
              "jumio",
              "veriff",
              "onfido",
              "persona",
              "metamap",
              "socure",
              "idnow",
              "shufti",
              "idenfy",
              "ondato",
              "trulioo",
              "au10tix",
              "complycube",
              "other"
            ]
          },
          "name": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "api_list",
              "api_ids",
              "export_file"
            ],
            "description": "`api_list`: تُدرج Didit السجلات باستخدام المفتاح. `api_ids`: رفع معرّفات السجلات من عملية تصدير. `export_file`: رفع ملف تصدير بتنسيق Didit."
          },
          "record_noun": {
            "type": "string"
          },
          "credential_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "secret": {
                  "type": "boolean"
                }
              }
            }
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "required_permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "docs_url": {
            "type": "string",
            "nullable": true
          },
          "status_mapping": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "Approved",
                "Declined",
                "In Review",
                "Expired",
                "Not Finished",
                "Abandoned"
              ]
            }
          }
        }
      },
      "ImportJobSummary": {
        "type": "object",
        "description": "مهمة استيراد واحدة من أي نوع، بالهيكل الذي يقرأه درج مهام الاستيراد في لوحة التحكم.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "sessions",
              "businesses",
              "users",
              "status_rules",
              "transactions"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "file",
              "api",
              "provider"
            ]
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "provider_name": {
            "type": "string",
            "nullable": true
          },
          "filename": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "enum": [
              "ready",
              "queued",
              "running",
              "paused",
              "completed",
              "errors",
              "failed",
              "cancelled"
            ],
            "description": "حالة المهمة كما تعرضها لوحة التحكم؛ تشير `errors` إلى مهمة مكتملة تحتوي على صفوف مرفوضة."
          },
          "status": {
            "type": "string"
          },
          "is_dry_run": {
            "type": "boolean"
          },
          "credential_hint": {
            "type": "string",
            "nullable": true
          },
          "resumes_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_error": {
            "type": "string",
            "nullable": true
          },
          "started_by": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "nullable": true
              },
              "email": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "progress": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "format": "int64"
              },
              "processed": {
                "type": "integer",
                "format": "int64"
              },
              "imported": {
                "type": "integer",
                "format": "int64"
              },
              "updated": {
                "type": "integer",
                "format": "int64"
              },
              "already_in_didit": {
                "type": "integer",
                "format": "int64"
              },
              "failed": {
                "type": "integer",
                "format": "int64"
              },
              "not_finished": {
                "type": "integer",
                "format": "int64"
              },
              "same_person": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "face_templates": {
            "type": "object",
            "nullable": true,
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "built": {
                "type": "integer",
                "format": "int64"
              },
              "duplicates": {
                "type": "integer",
                "format": "int64"
              },
              "blocklisted": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "eta_seconds": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "FiledRegulatoryReport": {
        "type": "object",
        "description": "تقرير تنظيمي مكتمل يمنع الحذف المطلوب.",
        "required": [
          "uuid",
          "report_number",
          "report_type",
          "case_uuid"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID للتقرير."
          },
          "report_number": {
            "type": "string",
            "description": "رقم التقرير المعروض في Console (على سبيل المثال، SAR-0001)."
          },
          "report_type": {
            "type": "string",
            "enum": [
              "SAR",
              "STR",
              "CTR",
              "TTR",
              "UTR",
              "IFT",
              "CBR",
              "TFR"
            ],
            "description": "نوع التقرير التنظيمي."
          },
          "case_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "الحالة التي ينتمي إليها التقرير."
          }
        }
      },
      "FiledReportTransaction": {
        "type": "object",
        "description": "معاملة لا يمكن حذفها لأن تقريراً تنظيمياً نهائياً يدرجها.",
        "required": [
          "uuid",
          "transaction_id",
          "reports"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف UUID لمعاملة Didit."
          },
          "transaction_id": {
            "type": "string",
            "description": "معرّف المعاملة المقدَّم عند إنشاء المعاملة."
          },
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FiledRegulatoryReport"
            },
            "description": "التقارير المكتملة التي تتضمن هذه المعاملة."
          }
        }
      },
      "InFiledReportError": {
        "type": "object",
        "description": "رُفض الحذف لأن البيانات المحددة مدرجة في تقرير تنظيمي نهائي. لم يُحذف أي شيء. احذف التقرير، ثم كرر الطلب.",
        "required": [
          "detail",
          "code"
        ],
        "properties": {
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "in_filed_report"
            ],
            "description": "رمز خطأ ثابت لعملية حذف محظورة بسبب تقرير تنظيمي نهائي."
          },
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FiledRegulatoryReport"
            },
            "description": "التقارير التي تمنع حذف شخص أو شركة أو حالة أو جلسة."
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FiledReportTransaction"
            },
            "description": "المعاملات التي تمنع حذف المعاملة، مع التقارير التي تدرج كل منها."
          }
        }
      },
      "SubjectDeletionInProgressError": {
        "type": "object",
        "description": "لا يزال هناك طلب آخر يحذف هذا الشخص أو هذه الشركة. لم يحذف هذا الطلب أي شيء ويمكن إعادته بمجرد انتهاء ذلك الحذف؛ وعند تكراره يتم حذف كل ما لا يزال محدداً.",
        "required": [
          "detail",
          "code"
        ],
        "properties": {
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "subject_deletion_in_progress"
            ],
            "description": "رمز خطأ ثابت لشخص أو شركة لا يزال طلب آخر يحذفهما."
          }
        }
      },
      "TravelRuleNetworkParticipantSummary": {
        "type": "object",
        "nullable": true,
        "description": "المشارك الخاص بهذا التطبيق على الشبكة، أو null في حال عدم وجود أي مشارك.",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "platform",
              "own"
            ],
            "description": "platform: يتم النقل عبر عضوية Didit؛ own: تم التسجيل تحت العضوية الخاصة بالتطبيق."
          },
          "status": {
            "type": "string",
            "enum": [
              "not_requested",
              "questionnaire_pending",
              "submitted_to_network",
              "active",
              "suspended",
              "rejected"
            ],
            "description": "not_requested: لم يُطلب قط، أو أن الشبكة رفضت الطلب الأول (راجع last_error)؛ questionnaire_pending: بانتظار الموافقة على استبيان العناية الواجبة؛ submitted_to_network: تم تسليمه لعملية تسجيل الشبكة؛ active: منحت الشبكة هذا التطبيق رمز المشارك الخاص به؛ suspended / rejected: قامت Didit بتعليقه أو رفضه."
          },
          "participant_code": {
            "type": "string",
            "description": "الرمز الذي منحته الشبكة لهذا التطبيق (بالنسبة لـ GTR، رمز VASP الخاص به). تحمل الرسائل الصادرة هذا الرمز، ولا تحمل رمز Didit مطلقاً."
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "activated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_error": {
            "type": "string",
            "description": "رد الشبكة عندما رفضت التسجيل؛ وفارغ بخلاف ذلك."
          }
        }
      },
      "TravelRuleNetworkState": {
        "type": "object",
        "description": "كيف سيتم إرسال رسائل Travel Rule على إحدى الشبكات لهذا التطبيق، وسبب تعذر ذلك. حالة تكوين، وليست فحصاً لحالة التشغيل المباشرة أو التسليم.",
        "properties": {
          "rail": {
            "type": "string",
            "enum": [
              "GTR",
              "TRUST",
              "VERIFYVASP",
              "SYGNA"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "own",
              "didit",
              "off",
              "unavailable"
            ],
            "description": "own: يتم استخدام العضوية المتصلة بالتطبيق؛ didit: تنقل عضوية Didit التطبيق كمشارك نشط خاص بها؛ off: تم تعطيل توجيه المنصة في disabled_networks مع عدم وجود عضوية خاصة؛ unavailable: لا يمكن لأي طرف الإرسال على هذه الشبكة حتى الآن (راجع state وreason)."
          },
          "state": {
            "type": "string",
            "enum": [
              "own_membership",
              "live_through_didit",
              "off",
              "didit_onboarding",
              "questionnaire_needed",
              "questionnaire_in_review",
              "request_access",
              "request_sent",
              "unavailable",
              "error"
            ],
            "description": "own_membership: تُرسل عضويتك المتصلة؛ live_through_didit: يُرسل مشاركك الخاص ضمن عضوية Didit؛ off: قمت بإيقاف تشغيل توجيه المنصة؛ didit_onboarding: عضوية Didit الخاصة بهذه الشبكة ليست في بيئة الإنتاج بعد، لذا لا يمكنها نقل أي طرف؛ questionnaire_needed / questionnaire_in_review: يجب إرسال استبيان العناية الواجبة أو أنه قيد المراجعة لدى Didit؛ request_access: تمت الموافقة على الاستبيان، اطلب الوصول إلى الشبكة؛ request_sent: جارٍ تسجيل مشاركك؛ unavailable: راجع reason؛ error: راجع reason."
          },
          "reason": {
            "type": "string",
            "enum": [
              "own_membership_connected",
              "platform_network_switched_off",
              "own_membership_only",
              "sandbox_application",
              "didit_membership_not_live",
              "participant_suspended",
              "participant_rejected",
              "questionnaire_not_submitted",
              "questionnaire_submitted",
              "questionnaire_changes_requested",
              "questionnaire_rejected",
              "participant_not_requested",
              "participant_active",
              "participant_key_missing",
              "participant_key_unresolved",
              "provisioning_failed",
              "questionnaire_pending",
              "submitted_to_network"
            ],
            "description": "تفاصيل الحالة المقروءة آلياً. own_membership_only: لا تستضيف Didit تطبيقات على هذه الشبكة (TRUST)، قم بربط عضويتك الخاصة؛ sandbox_application: عمليات النقل في البيئة التجريبية لا تصل أبداً إلى الشبكة؛ provisioning_failed: رفضت الشبكة التسجيل، يوضح last_error الخاص بالمشارك السبب وتؤدي إعادة طلب الشبكة إلى إعادة المحاولة."
          },
          "platform_available": {
            "type": "boolean",
            "description": "ما إذا كانت عضوية Didit الخاصة في هذه الشبكة مهيأة؛ ليس فحصاً لحالة التشغيل في الوقت الفعلي."
          },
          "connected": {
            "type": "boolean",
            "description": "ما إذا كانت توجد عضوية عميل متصل. يتم التحقق من بيانات الاعتماد محلياً؛ ويتم التحقق من الشبكة أثناء تبادل مباشر."
          },
          "participant": {
            "$ref": "#/components/schemas/TravelRuleNetworkParticipantSummary"
          },
          "vasps_reachable": {
            "type": "integer",
            "description": "VASP المدرجة في الدليل التي يمكن الوصول إليها على هذه الشبكة."
          },
          "routed_30d": {
            "type": "integer",
            "description": "تحويلات هذا التطبيق التي نُفذت على هذه الشبكة خلال آخر 30 يوماً."
          }
        }
      },
      "TravelRuleNetworkQuestionnaireAnswers": {
        "type": "object",
        "description": "استبيان العناية الواجبة لشبكة Didit. عمليات الحفظ جزئية: يحافظ الحفظ على كل إجابة لا يحددها بالاسم. يتطلب الإرسال ملء كل حقل باستثناء lei وdata_protection_contact_email، وأن تكون الإقرارات الثلاثة مضبوطة على true.",
        "properties": {
          "legal_name": {
            "type": "string",
            "maxLength": 255
          },
          "registration_number": {
            "type": "string",
            "maxLength": 255
          },
          "incorporation_country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2."
          },
          "registered_address": {
            "type": "string",
            "maxLength": 1000
          },
          "website": {
            "type": "string",
            "format": "uri",
            "maxLength": 500
          },
          "lei": {
            "type": "string",
            "maxLength": 20,
            "description": "اختياري. معرّف LEI صالح وفق معيار ISO 17442 عند تقديمه."
          },
          "licences": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "regulator",
                "jurisdiction",
                "licence_type",
                "licence_number"
              ],
              "properties": {
                "regulator": {
                  "type": "string",
                  "maxLength": 255
                },
                "jurisdiction": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 2,
                  "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2."
                },
                "licence_type": {
                  "type": "string",
                  "maxLength": 255
                },
                "licence_number": {
                  "type": "string",
                  "maxLength": 255
                }
              }
            },
            "description": "كل ترخيص أو تسجيل تحمله VASP."
          },
          "operating_jurisdictions": {
            "type": "array",
            "minItems": 1,
            "maxItems": 250,
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2,
              "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2."
            }
          },
          "compliance_officer_name": {
            "type": "string",
            "maxLength": 255
          },
          "compliance_officer_email": {
            "type": "string",
            "format": "email"
          },
          "aml_ctf_policy_attested": {
            "type": "boolean",
            "description": "يجب أن تكون true للإرسال."
          },
          "sanctions_screening_attested": {
            "type": "boolean",
            "description": "يجب أن تكون true للإرسال."
          },
          "data_protection_attested": {
            "type": "boolean",
            "description": "يجب أن تكون true للإرسال."
          },
          "data_protection_contact_email": {
            "type": "string",
            "format": "email",
            "description": "اختياري."
          },
          "expected_monthly_transfers": {
            "type": "integer",
            "minimum": 0
          },
          "expected_monthly_volume_usd": {
            "type": "string",
            "format": "decimal",
            "description": "الحجم الشهري المتوقع بالدولار الأمريكي، حتى منزلتين عشريتين. يتم إرجاعه كسلسلة نصية."
          },
          "assets": {
            "type": "array",
            "minItems": 1,
            "maxItems": 200,
            "items": {
              "type": "string",
              "maxLength": 32
            },
            "description": "رموز تداول الأصول، مخزنة بأحرف كبيرة، ومرتبة، وبدون تكرار."
          }
        }
      },
      "TravelRuleNetworkQuestionnaire": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "changes_requested",
              "approved",
              "rejected"
            ],
            "description": "يمكن حفظ الإجابات أثناء حالتي draft أو changes_requested؛ وتتولى Didit نقل الحالات submitted وapproved وrejected."
          },
          "answers": {
            "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaireAnswers"
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reviewed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "review_note": {
            "type": "string",
            "description": "ملاحظة Didit بشأن قرارها الأخير، على سبيل المثال ما يجب تغييره."
          },
          "history": {
            "type": "array",
            "readOnly": true,
            "description": "كل تغيير في الحالة، الأقدم أولاً.",
            "items": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "from": {
                  "type": "string"
                },
                "to": {
                  "type": "string"
                },
                "note": {
                  "type": "string",
                  "description": "ملاحظة المراجعة أو رد الشبكة، عند توفره."
                }
              }
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "TravelRuleNetworkParticipant": {
        "type": "object",
        "description": "المشارك الخاص بهذا التطبيق على شبكة واحدة.",
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "gtr",
              "trust",
              "verifyvasp",
              "sygna"
            ]
          },
          "rail": {
            "type": "string",
            "enum": [
              "GTR",
              "TRUST",
              "VERIFYVASP",
              "SYGNA"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "platform",
              "own"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "not_requested",
              "questionnaire_pending",
              "submitted_to_network",
              "active",
              "suspended",
              "rejected"
            ],
            "description": "not_requested: لم يُطلب قط، أو أن الشبكة رفضت الطلب الأول (راجع last_error)؛ questionnaire_pending: بانتظار الموافقة على استبيان العناية الواجبة؛ submitted_to_network: تم تسليمه لعملية تسجيل الشبكة؛ active: منحت الشبكة هذا التطبيق رمز المشارك الخاص به؛ suspended / rejected: قامت Didit بتعليقه أو رفضه."
          },
          "participant_code": {
            "type": "string"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "activated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "suspended_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_error": {
            "type": "string",
            "description": "رد الشبكة عندما رفضت التسجيل؛ وفارغ بخلاف ذلك."
          },
          "history": {
            "type": "array",
            "readOnly": true,
            "description": "كل تغيير في الحالة، الأقدم أولاً.",
            "items": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "from": {
                  "type": "string"
                },
                "to": {
                  "type": "string"
                },
                "note": {
                  "type": "string",
                  "description": "ملاحظة المراجعة أو رد الشبكة، عند توفره."
                }
              }
            }
          }
        }
      },
      "TravelRuleNetworksOverview": {
        "type": "object",
        "properties": {
          "platform_networks_enabled": {
            "type": "boolean",
            "description": "ما إذا كان الوصول إلى الشبكة عبر عضوية Didit مفتوحاً. بينما تكون القيمة false، فإن حفظ الاستبيانات وتقديمها وطلبات الشبكة تُرجع الرمز 403."
          },
          "questionnaire": {
            "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaire"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TravelRuleNetworkParticipant"
            }
          },
          "networks": {
            "type": "object",
            "readOnly": true,
            "description": "حسب الشبكة، كيف سيرسل هذا التطبيق ولماذا يتعذر عليه ذلك. لا يتم تضمين أي شبكة، بما في ذلك GTR، افتراضياً: يمكن الوصول إلى الشبكة من خلال عضويتك المتصلة الخاصة، أو من خلال عضوية Didit بمجرد تفعيل عضوية Didit في تلك الشبكة ونشاط مشاركك الخاص عليها. ليس فحصاً مباشراً لحالة التشغيل أو التسليم.",
            "properties": {
              "gtr": {
                "$ref": "#/components/schemas/TravelRuleNetworkState"
              },
              "trust": {
                "$ref": "#/components/schemas/TravelRuleNetworkState"
              },
              "verifyvasp": {
                "$ref": "#/components/schemas/TravelRuleNetworkState"
              },
              "sygna": {
                "$ref": "#/components/schemas/TravelRuleNetworkState"
              }
            }
          }
        }
      },
      "AddressValidationResult": {
        "type": "object",
        "description": "نتيجة عملية تحقق واحدة من العنوان: ما إذا كان العنوان موجوداً، وشكله المعياري. يؤكد العنوان فقط؛ ولا يربط العنوان بشخص على الإطلاق.",
        "required": [
          "status",
          "verification_level",
          "address",
          "formatted_address",
          "latitude",
          "longitude"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "verified",
              "partially_verified",
              "not_verified",
              "unavailable"
            ],
            "description": "`verified`: تم تأكيد العنوان وصولاً إلى المبنى (أو الشقة أو صندوق البريد). `partially_verified`: تم تأكيده فقط حتى مستوى الشارع، أو إلى المستوى الأكثر دقة الذي تحتفظ به البيانات المرجعية البريدية لذلك المكان. `not_verified`: تطابقت المنطقة أو المدينة فقط، أو لم يتطابق أي شيء. `unavailable`: تعذر تشغيل التحقق (على سبيل المثال لم تستجب الخدمة المرجعية)؛ لا يتم احتساب أي رسوم عليه ولا يؤثر أبداً على عملية التحقق."
          },
          "verification_level": {
            "type": "string",
            "nullable": true,
            "enum": [
              "administrative_area",
              "locality",
              "thoroughfare",
              "premise",
              "delivery_point",
              null
            ],
            "description": "المستوى الأكثر دقة الذي طابقه العنوان. يكون `null` عندما لا يتطابق أي شيء أو عندما تكون `status` هي `unavailable`."
          },
          "address": {
            "type": "object",
            "nullable": true,
            "description": "العنوان الموحّد. يكون `null` عندما تكون `status` هي `unavailable`.",
            "properties": {
              "address_line_1": {
                "type": "string",
                "nullable": true,
                "description": "سطر التسليم الأول، مكتوباً بالطريقة التي تكتبها الدولة.",
                "example": "1600 Amphitheatre Pkwy"
              },
              "address_line_2": {
                "type": "string",
                "nullable": true,
                "description": "سطر التسليم الثاني (شقة أو مبنى أو حي)، عندما يتضمن العنوان ذلك."
              },
              "city": {
                "type": "string",
                "nullable": true,
                "example": "Mountain View"
              },
              "region": {
                "type": "string",
                "nullable": true,
                "description": "الولاية أو المقاطعة أو المنطقة.",
                "example": "CA"
              },
              "postal_code": {
                "type": "string",
                "nullable": true,
                "example": "94043-1351"
              },
              "country": {
                "type": "string",
                "nullable": true,
                "description": "رمز الدولة وفقاً لـ ISO 3166-1 alpha-2.",
                "example": "US"
              }
            }
          },
          "formatted_address": {
            "type": "string",
            "nullable": true,
            "description": "العنوان الموحّد في سطر واحد.",
            "example": "1600 Amphitheatre Pkwy, Mountain View CA 94043-1351"
          },
          "latitude": {
            "type": "number",
            "nullable": true,
            "example": 37.422022
          },
          "longitude": {
            "type": "number",
            "nullable": true,
            "example": -122.08429
          }
        }
      },
      "AddressValidationRequest": {
        "type": "object",
        "required": [
          "country"
        ],
        "description": "عنوان واحد: في سطر واحد (`address`) أو كحقول مهيكلة تحتوي على الأقل على `address_line_1`، ولا يمكن استخدام كليهما معاً مطلقاً.",
        "properties": {
          "address": {
            "type": "string",
            "maxLength": 500,
            "description": "العنوان بالكامل في سطر واحد.",
            "example": "Paseo de la Castellana 259, 28046 Madrid"
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 255,
            "description": "الشارع والرقم.",
            "example": "1600 Amphitheatre Pkwy"
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 255,
            "description": "شقة، جناح، طابق أو مبنى."
          },
          "city": {
            "type": "string",
            "maxLength": 128,
            "description": "المدينة أو المنطقة.",
            "example": "Mountain View"
          },
          "region": {
            "type": "string",
            "maxLength": 128,
            "description": "الولاية أو المقاطعة أو المنطقة.",
            "example": "CA"
          },
          "postal_code": {
            "type": "string",
            "maxLength": 32,
            "example": "94043"
          },
          "country": {
            "type": "string",
            "maxLength": 3,
            "description": "رمز دولة العنوان وفق المعيار ISO 3166-1 alpha-2 أو alpha-3.",
            "example": "US"
          }
        }
      },
      "AddressValidationResponse": {
        "type": "object",
        "required": [
          "request_id",
          "address_validation",
          "created_at"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف هذا الطلب؛ اذكره لفريق الدعم. لم يتم إنشاء أي جلسة."
          },
          "address_validation": {
            "$ref": "#/components/schemas/AddressValidationResult"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TravelRuleWalletProofFailureReason": {
        "type": "string",
        "enum": [
          "",
          "SIGNATURE_INVALID",
          "SIGNATURE_UNSUPPORTED_SCHEME",
          "DEPOSIT_NOT_FOUND",
          "DEPOSIT_UNCONFIRMED",
          "DEPOSIT_LOOKUP_FAILED",
          "DEPOSIT_MISMATCH",
          "DEPOSIT_STALE",
          "TXID_REUSED",
          "CHAIN_UNSUPPORTED",
          "WINDOW_EXPIRED",
          "OWNERSHIP_CHANGED",
          "METHOD_SWITCHED",
          "REVIEW_REJECTED",
          "ABANDONED"
        ],
        "description": "سبب عدم وصول إثبات ملكية المحفظة، أو المحاولة الأخيرة له، إلى حالة VERIFIED. يكون فارغاً عند عدم وجود أي إخفاق. يمكن أن يحمل الإثبات ذو الحالة PENDING سبباً: أخفقت المحاولة الأخيرة ويمكن للمستخدم النهائي المحاولة مجدداً. تؤدي الحالات DEPOSIT_MISMATCH وDEPOSIT_STALE وTXID_REUSED وREVIEW_REJECTED إلى إغلاق الإثبات بحالة REJECTED. الحالة SIGNATURE_INVALID: لا يتطابق التوقيع مع المحفظة والتحدي. الحالة SIGNATURE_UNSUPPORTED_SCHEME: وقّعت المحفظة بتنسيق لا تتحقق منه Didit. الحالات DEPOSIT_NOT_FOUND وDEPOSIT_UNCONFIRMED وDEPOSIT_LOOKUP_FAILED: إيداع الاختبار غير قابل للقراءة أو لم يتم تأكيده بعد؛ تواصل Didit فحصه حتى تنتهي نافذة الاختبار. الحالة DEPOSIT_MISMATCH: المعاملة لا ترسل المبلغ المتوقع من المحفظة إلى عنوان الإيداع. الحالة DEPOSIT_STALE: تاريخ المعاملة يسبق التحدي. الحالة TXID_REUSED: أثبتت المعاملة بالفعل ملكية محفظة أخرى. الحالة CHAIN_UNSUPPORTED: الطريقة غير متوفرة على هذه السلسلة. الحالة WINDOW_EXPIRED: أُغلقت نافذة الاختبار. الحالة OWNERSHIP_CHANGED: تغيّر صاحب المحفظة، أو حُذفت المحفظة من دفتر العناوين الخاص بك، بعد إنشاء جلسة عنصر واجهة المستخدم. الحالة METHOD_SWITCHED: اختار المستخدم النهائي طريقة أخرى قبل إنهاء هذه الطريقة. الحالة REVIEW_REJECTED: رفض المراجِع الخاص بك لقطة الشاشة. الحالة ABANDONED: انقضت صلاحية جلسة عنصر واجهة المستخدم قبل أن يُنهي المستخدم النهائي العملية."
      },
      "TravelRuleWidgetProofError": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "description": "رسالة سهلة القراءة باللغة الإنجليزية."
          },
          "code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason"
              }
            ],
            "description": "سبب مقروء آلياً، ليتمكن العميل من عرض رسالته المترجمة الخاصة."
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "VERIFIED",
              "REJECTED",
              "EXPIRED"
            ],
            "description": "موجود عند إغلاق الإثبات: REJECTED بواسطة الإيداع الذي تم إرساله للتو (400)، أو REJECTED أو EXPIRED عند إرسال دليل إلى إثبات مغلق بالفعل (409)."
          },
          "proof_id": {
            "type": "string",
            "format": "uuid",
            "description": "موجود مع الحالة: الإثبات المغلق."
          },
          "method": {
            "type": "string",
            "enum": [
              "MESSAGE_SIGNING",
              "SATOSHI_TEST",
              "SCREENSHOT",
              "SELF_DECLARATION"
            ],
            "description": "موجود مع الحالة: طريقة الإثبات المغلق."
          },
          "max_attempts": {
            "type": "integer",
            "description": "موجود مع الحالة: إثباتات المحفظة المرفوضة التي تسمح بها هذه الجلسة."
          },
          "attempts_used": {
            "type": "integer",
            "description": "موجود مع الحالة: الإثباتات المرفوضة حتى الآن."
          },
          "attempts_remaining": {
            "type": "integer",
            "description": "موجود مع الحالة: عندما تكون القيمة 0، فإن بدء إثبات آخر يُرجع 409 وتقوم بإنشاء جلسة widget جديدة."
          }
        }
      },
      "TravelRuleWidgetProofCreate": {
        "type": "object",
        "required": [
          "method"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "MESSAGE_SIGNING",
              "SATOSHI_TEST",
              "SCREENSHOT",
              "SELF_DECLARATION"
            ],
            "description": "طريقة الإثبات التي اختارها المستخدم النهائي. يجب أن تكون إحدى الطرق المسموح بها في allowed_methods ضمن السياق."
          },
          "wallet_address": {
            "type": "string",
            "maxLength": 128,
            "description": "القيمة الافتراضية هي wallet_address الخاص بالجلسة. يجب أن يطابق محفظة التحويل عندما تكون الجلسة مرتبطة بتحويل."
          },
          "chain": {
            "type": "string",
            "maxLength": 32,
            "description": "القيمة الافتراضية هي سلسلة الكتل الخاصة بالجلسة."
          }
        }
      },
      "TravelRuleWidgetProofVerifyResult": {
        "type": "object",
        "properties": {
          "proof_id": {
            "type": "string",
            "format": "uuid"
          },
          "method": {
            "type": "string",
            "enum": [
              "MESSAGE_SIGNING",
              "SATOSHI_TEST",
              "SCREENSHOT",
              "SELF_DECLARATION"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "VERIFIED",
              "REJECTED",
              "EXPIRED"
            ]
          },
          "is_ownership_verified": {
            "type": "boolean",
            "description": "موجود عندما يكون الإثبات بتصنيف VERIFIED: تم الآن التحقق من ملكية إدخال دفتر العناوين."
          },
          "transfer_status": {
            "type": "string",
            "nullable": true,
            "description": "موجود عندما يكون الإثبات بتصنيف VERIFIED: حالة التحويل المرتبط، وقيمته null إذا لم يوجد تحويل."
          },
          "detail": {
            "type": "string",
            "description": "موجود طالما ظل الإثبات بالحالة PENDING: لقطة شاشة مرسلة قيد المراجعة، أو إيداع تجريبي لم يتم تأكيده بعد."
          },
          "code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason"
              }
            ],
            "description": "موجود في الإيداع التجريبي المعلق: يوضح سبب عدم تأكيده بعد."
          }
        }
      },
      "TravelRuleWalletProofReview": {
        "type": "object",
        "properties": {
          "proof_id": {
            "type": "string",
            "format": "uuid"
          },
          "method": {
            "type": "string",
            "enum": [
              "SCREENSHOT"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "VERIFIED",
              "REJECTED",
              "EXPIRED"
            ]
          },
          "wallet_address": {
            "type": "string"
          },
          "chain": {
            "type": "string",
            "description": "معرّف السلسلة القياسي، على سبيل المثال ETH، BTC، SOL، TRX."
          },
          "holder_name": {
            "type": "string"
          },
          "is_ownership_verified": {
            "type": "boolean",
            "description": "ما إذا كان إدخال دفتر العناوين قد تم التحقق من ملكيته، بواسطة هذا الإثبات أو إثبات آخر."
          },
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "المعاملة التي تم إنشاء جلسة الواجهة من أجل تحويل Travel Rule الخاص بها. Null لجلسة أُنشئت بدون transaction_id."
          },
          "file_name": {
            "type": "string",
            "nullable": true
          },
          "content_type": {
            "type": "string",
            "nullable": true
          },
          "screenshot_url": {
            "type": "string",
            "nullable": true,
            "description": "رابط محدد الصلاحية زمنيًا للقطة الشاشة المرفوعة. اطلب قائمة الانتظار مجددًا للحصول على رابط جديد."
          },
          "attempts": {
            "type": "integer",
            "description": "عدد الملفات التي رفعها المستخدم النهائي لهذا الإثبات."
          },
          "failure_reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason"
              }
            ],
            "description": "REVIEW_REJECTED بعد الرفض، وOWNERSHIP_CHANGED عندما يتغير مالك المحفظة أو تُحذف قبل اتخاذ القرار. فارغ في الحالات الأخرى."
          },
          "method_chosen_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت اختيار المستخدم النهائي لطريقة لقطة الشاشة."
          },
          "decided_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "decided_by": {
            "type": "string",
            "description": "من أغلق الإثبات: review:<user identifier> لمراجع لوحة التحكم، وreview لقرار بمفتاح API، وwidget أو sweeper عندما تغلقه Didit تلقائياً. يكون فارغاً أثناء حالة PENDING."
          },
          "review_note": {
            "type": "string",
            "description": "الملاحظة المُرسلة مع القرار. تكون فارغة في حال عدم وجود أي ملاحظة."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TravelRuleWalletProofDecision": {
        "type": "object",
        "required": [
          "decision"
        ],
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "approve",
              "reject"
            ]
          },
          "note": {
            "type": "string",
            "maxLength": 512,
            "description": "اختياري. يُحتفظ به مع الإثبات ويُعاد كـ review_note."
          }
        }
      },
      "DigitalIdWalletApiWalletDigitalCredentialsRequest": {
        "type": "object",
        "properties": {
          "protocol": {
            "type": "string",
            "description": "openid4vp-v1-signed."
          },
          "request": {
            "type": "object",
            "additionalProperties": {},
            "description": "مرّره كما هو: navigator.credentials.get({digital: request}) في المتصفح، أو JSON.stringify(request) كـ requestJson لـ GetDigitalCredentialOption على Android. موقّع بواسطة Didit لتطبيقك."
          }
        },
        "required": [
          "protocol",
          "request"
        ]
      },
      "DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest": {
        "type": "object",
        "description": "بدء عملية تحقق عبر Google Wallet (USA، GBR، BRA، SGP، TWN).",
        "properties": {
          "vendor_data": {
            "type": "string",
            "nullable": true,
            "description": "المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد في النتائج وwebhook."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook."
          },
          "sandbox_scenario": {
            "type": "string",
            "minLength": 1,
            "description": "لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled' أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/."
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum"
              }
            ],
            "description": "رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية Google Wallet.\n\n* `USA` - USA\n* `GBR` - GBR\n* `BRA` - BRA\n* `SGP` - SGP\n* `TWN` - TWN"
          },
          "origin": {
            "type": "string",
            "minLength": 1,
            "description": "المكان الذي ستطلب فيه صفحتك أو تطبيقك من المحفظة: أصل https الخاص بصفحتك (يجب أن يكون مضيفه ضمن allowed_return_hosts الخاصة بالتطبيق، أو يكون نطاق العلامة البيضاء الخاص به)، مثل https://app.example.com، أو android:apk-key-hash:<base64 SHA-256 لشهادة توقيع تطبيقك، دون حشو>. ترفض المحفظة الطلب في أي مكان آخر.",
            "maxLength": 256
          }
        },
        "required": [
          "country",
          "origin"
        ]
      },
      "DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum": {
        "enum": [
          "USA",
          "GBR",
          "BRA",
          "SGP",
          "TWN"
        ],
        "type": "string",
        "description": "* `USA` - USA\n* `GBR` - GBR\n* `BRA` - BRA\n* `SGP` - SGP\n* `TWN` - TWN"
      },
      "DigitalIdWalletApiWalletDigitalCredentialResponseRequest": {
        "type": "object",
        "description": "ما أجابت به المحفظة صفحتك أو تطبيقك، بالنسبة لعملية تحقق من نوع ``request_digital_credential``.",
        "properties": {
          "response": {
            "type": "object",
            "additionalProperties": {},
            "description": "ما أرجعته المحفظة تماماً: {protocol, data} لـ DigitalCredential من navigator.credentials.get، أو credentialJson المحلل لـ DigitalCredential الخاص بنظام Android. مشفر لـ Didit؛ لا تقم بتعديله."
          }
        },
        "required": [
          "response"
        ]
      },
      "SessionFilesExport": {
        "type": "object",
        "description": "ملف ZIP واحد يحتوي على كل ملفات الجلسة، بالجودة الأصلية.",
        "required": [
          "export_id",
          "session_id",
          "status",
          "file_count",
          "size_bytes",
          "download_url",
          "expires_at",
          "error",
          "created_at",
          "completed_at"
        ],
        "properties": {
          "export_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف التصدير. مرره إلى `GET /v3/session/{sessionId}/files-export/{exportId}/`."
          },
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "الجلسة التي تنتمي إليها الملفات."
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "READY",
              "FAILED",
              "EXPIRED"
            ],
            "description": "`PENDING` و`PROCESSING` أثناء إعداد ملف ZIP، و`READY` بمجرد أن يصبح قابلاً للتنزيل، و`FAILED` عندما يتعذر إعداده (اطلب عملية تصدير جديدة)، و`EXPIRED` بمجرد حذف ملف ZIP."
          },
          "file_count": {
            "type": "integer",
            "nullable": true,
            "description": "الملفات الموجودة في ملف ZIP. تُعيّن فقط عندما تكون `status` هي `READY`."
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "حجم ملف ZIP بالبايت. يُعيَّن فقط عندما تكون `status` هي `READY`."
          },
          "download_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "رابط URL موقّع لملف ZIP، صالح لفترة قصيرة. يُعيَّن فقط عندما تكون `status` هي `READY`؛ اقرأ التصدير مجدداً للحصول على رابط جديد."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت حذف ملف ZIP، بعد 24 ساعة من جاهزيته. لا يُعيَّن إلا عندما تكون `status` هي `READY`."
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "سبب فشل التصدير، عندما تكون قيمة `status` هي `FAILED`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "وقت طلب التصدير."
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "وقت جاهزية ملف ZIP أو فشل التصدير."
          }
        }
      },
      "TransactionRuleSuggestionsCreatedEvent": {
        "description": "اقترحت عملية اقتراح قواعد المعاملات تغييرات جديدة في القواعد لتطبيقك. يُرسل عندما تكون إشعارات webhook مفعّلة في إعدادات اقتراح القواعد. لا توجد `status` على المستوى الأعلى.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "webhook_type": {
                "type": "string",
                "enum": [
                  "transaction_rule_suggestions.created"
                ],
                "description": "دائماً `transaction_rule_suggestions.created`."
              },
              "run_id": {
                "type": "string",
                "format": "uuid",
                "description": "عملية تشغيل الاقتراحات التي أنتجت الاقتراحات الجديدة."
              },
              "open_count": {
                "type": "integer",
                "description": "عدد الاقتراحات التي لا تزال مفتوحة بعد عملية التشغيل هذه، بما في ذلك الاقتراحات الجديدة."
              },
              "suggestions": {
                "type": "array",
                "description": "الاقتراحات التي أنشأتها عملية التشغيل هذه.",
                "items": {
                  "type": "object",
                  "required": [
                    "suggestion_id",
                    "kind",
                    "title",
                    "rule_id",
                    "expected_impact"
                  ],
                  "properties": {
                    "suggestion_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "ADD",
                        "TWEAK",
                        "DISABLE"
                      ],
                      "description": "`ADD` تقترح قاعدة جديدة، و`TWEAK` تُعدل قاعدة موجودة، و`DISABLE` تُعطل قاعدة."
                    },
                    "title": {
                      "type": "string"
                    },
                    "rule_id": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true,
                      "description": "القاعدة التي ينطبق عليها اقتراح `TWEAK` أو `DISABLE`؛ وقيمة `null` لاقتراح `ADD`."
                    },
                    "expected_impact": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "ما سيفعله التغيير، كما يظهره الاقتراح في Console."
                    }
                  }
                }
              }
            },
            "required": [
              "webhook_type",
              "run_id",
              "open_count",
              "suggestions"
            ]
          }
        ]
      },
      "GeolocationCheck": {
        "type": "object",
        "description": "نتيجة واحدة للتحقق من الموقع الجغرافي، وهي المحاولة المقبولة لعقدة سير عمل واحدة. القياس وعدم اليقين والأصالة هي مفاتيح منفصلة، لذا تتم قراءة التحديد الدقيق غير المقترن بإقرار بشكل مختلف عن التحديد غير الدقيق المقترن بإقرار.",
        "properties": {
          "node_id": {
            "type": "string",
            "nullable": true,
            "description": "عقدة سير العمل التي أنتجت هذه النتيجة، لكي يظل سير العمل الذي يتضمن خطوتين للتحقق من الموقع قابلاً للقراءة."
          },
          "status": {
            "type": "string",
            "enum": [
              "Not Finished",
              "Approved",
              "Declined",
              "In Review",
              "Resub Requested"
            ],
            "description": "حالة مستوى الميزة لخطوة التحقق من الموقع هذه، ويتم تحديدها بناءً على تحذيراتها. مستقلة عن `status` الجلسة."
          },
          "outcome": {
            "type": "string",
            "nullable": true,
            "description": "ما حدث في هذه المحاولة.",
            "enum": [
              "verified",
              "low_accuracy",
              "accuracy_undetermined",
              "stale",
              "approximate",
              "denied",
              "restricted",
              "unavailable",
              "timeout",
              "mock_detected",
              "outside_geofence",
              "in_blocked_area",
              "anonymizer_detected",
              "skipped",
              "replay_rejected",
              "unsupported_client",
              null
            ]
          },
          "permission": {
            "type": "string",
            "nullable": true,
            "description": "ما منحه نظام التشغيل أو المتصفح. تعني القيمة `not_requested` أن الخطوة تستخدم موقع IP الخاص بالاتصال فقط، وبالتالي لا يُطلب الإذن من الشخص مطلقاً.",
            "enum": [
              "granted_precise",
              "granted_approximate",
              "denied",
              "restricted",
              "unavailable",
              "timeout",
              "dismissed",
              "not_requested",
              null
            ]
          },
          "latitude": {
            "type": "number",
            "nullable": true,
            "description": "خط عرض WGS84 للموقع الجغرافي المثبّت. `null` عند عدم وجود تثبيت للموقع.",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "nullable": true,
            "description": "خط طول WGS84 للإحداثية المحددة. `null` عند عدم وجود إحداثية محددة.",
            "format": "double"
          },
          "accuracy_m": {
            "type": "number",
            "nullable": true,
            "description": "نصف قطر عدم اليقين بالأمتار، عند مستوى الثقة في `accuracy_confidence`.",
            "format": "double"
          },
          "accuracy_confidence": {
            "type": "string",
            "nullable": true,
            "description": "مستوى الثقة الذي تخصصه المنصة لـ `accuracy_m`: `p95` (المتصفحات)، أو `p68` (Android)، أو `unspecified` (iOS).",
            "enum": [
              "p95",
              "p68",
              "unspecified",
              null
            ]
          },
          "measured_at": {
            "type": "string",
            "nullable": true,
            "description": "وقت تطبيق الجهاز للإصلاح، وفقاً لساعته الخاصة.",
            "format": "date-time"
          },
          "age_seconds": {
            "type": "integer",
            "nullable": true,
            "description": "عدد الثواني بين تحديد الجهاز للموقع واستلام Didit له."
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "مصدر تحديد الموقع، عندما توضحه المنصة. تعني `ip` أن الموقع هو موقع عنوان IP الخاص بالاتصال.",
            "enum": [
              "gps",
              "fused",
              "network",
              "wifi",
              "cell",
              "browser",
              "unknown",
              "ip",
              null
            ]
          },
          "platform": {
            "type": "string",
            "nullable": true,
            "description": "العميل الذي أصدر الإصلاح.",
            "enum": [
              "web",
              "ios",
              "android",
              "react_native",
              "flutter",
              null
            ]
          },
          "sdk_version": {
            "type": "string",
            "nullable": true,
            "description": "إصدار SDK الذي أنتج الإصلاح."
          },
          "is_mock": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون `true` عندما يشير الجهاز إلى أن الإحداثيات جاءت من مزود موقع زائف أو برنامج محاكاة. وتكون `null` عندما لا تُبلغ المنصة عن ذلك (لا يمكن للمتصفحات معرفة ذلك)؛ والقيمة `null` لا تعني `false`."
          },
          "produced_by_accessory": {
            "type": "boolean",
            "nullable": true,
            "description": "لنظام iOS فقط: تكون القيمة `true` عندما يتم تحديد الموقع بواسطة ملحق خارجي، وتكون `null` في الحالات الأخرى."
          },
          "integrity": {
            "type": "string",
            "enum": [
              "attested",
              "not_attested",
              "failed",
              "unsupported",
              "not_determined"
            ],
            "description": "ما إذا كان إقرار الجهاز يدعم الإصلاح. `unsupported` هو ما تبلّغ عنه المتصفحات، لأن الويب لا يحتوي على آلية إقرار؛ وهو ليس فشلاً."
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "description": "الدولة وفق المعيار ISO 3166-1 alpha-2 التي يقع فيها تحديد الموقع."
          },
          "region_code": {
            "type": "string",
            "nullable": true,
            "description": "التقسيم الإداري حسب معيار ISO 3166-2 الذي يقع فيه الإصلاح."
          },
          "city": {
            "type": "string",
            "nullable": true,
            "description": "أقرب مكان مأهول بالسكان، وهو اسم للمراجعين."
          },
          "geofence": {
            "type": "object",
            "description": "نتيجة قواعد الدولة والمنطقة للخطوة.",
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "ما إذا كانت الخطوة تطبق أي قاعدة دولة أو منطقة."
              },
              "result": {
                "type": "string",
                "nullable": true,
                "description": "موضع الموقع الجغرافي مقارنةً بالقواعد. تعني القيمة `undetermined` أن دائرة الدقة تتجاوز الحدود أو أن الموقع الجغرافي لم يُحدد لأي دولة؛ وهذا لا يُعد دليلاً على وجوده بالخارج.",
                "enum": [
                  "inside",
                  "outside",
                  "undetermined",
                  null
                ]
              }
            }
          },
          "inside_geofence": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة `true` عندما تكون قيمة `geofence.result` هي `inside`، و`false` عندما تكون `outside`، و`null` في غير ذلك."
          },
          "geofence_basis": {
            "type": "string",
            "nullable": true,
            "description": "من أي موضع تم تقييم نتيجة المنطقة: تحديد موقع `device`، أو موقع `ip` الخاص بالاتصال.",
            "enum": [
              "device",
              "ip",
              null
            ]
          },
          "inside_areas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "معرّفات المناطق المسموح بها التي تم إعدادها والتي يقع الموضع داخلها."
          },
          "blocked_areas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "معرّفات المناطق المحظورة التي تم إعدادها والتي يقع الموضع فيها."
          },
          "position_source": {
            "type": "string",
            "nullable": true,
            "description": "المصدر الذي تستمد منه الخطوة الموقع الجغرافي، وفقاً للإعدادات: مقارنة الجهاز بموقع IP الجغرافي، أو الجهاز فقط، أو موقع IP الجغرافي فقط.",
            "enum": [
              "device_and_ip",
              "device_only",
              "ip_only",
              null
            ]
          },
          "anonymizers": {
            "type": "object",
            "nullable": true,
            "description": "حالة الاتصال والجهاز، وقيمة كل منها `true` أو `false` أو `null` عندما يتعذر على المصدر تحديد ذلك.",
            "properties": {
              "vpn": {
                "type": "boolean",
                "nullable": true
              },
              "proxy": {
                "type": "boolean",
                "nullable": true
              },
              "tor": {
                "type": "boolean",
                "nullable": true
              },
              "spoofing": {
                "type": "boolean",
                "nullable": true
              },
              "emulator": {
                "type": "boolean",
                "nullable": true
              }
            }
          },
          "ip_distance_km": {
            "type": "number",
            "nullable": true,
            "description": "المسافة إلى موقع عنوان IP للجلسة بعد طرح كلا قطري عدم اليقين؛ `0` عند تداخلهما.",
            "format": "double"
          },
          "ip_distance_uncertainty_km": {
            "type": "number",
            "nullable": true,
            "description": "نصف القطر الإجمالي الذي تم طرحه: نصف قطر موقع عنوان IP بالإضافة إلى دقة هذا التحديد.",
            "format": "double"
          },
          "ip_consistent": {
            "type": "boolean",
            "nullable": true,
            "description": "ما إذا كانت `ip_distance_km` تقع ضمن المسافة المهيأة في الخطوة. `null` عندما يكون أيٌّ من الطرفين غير معروف."
          },
          "document_distance_km": {
            "type": "number",
            "nullable": true,
            "description": "المسافة إلى العنوان المرمز جغرافياً في مستند الهوية أو إثبات العنوان. `null` في حال عدم وجود عنوان محفوظ في الملف.",
            "format": "double"
          },
          "travel_excused": {
            "type": "boolean",
            "nullable": true,
            "description": "ما إذا كان هامش التسامح مع السفر في الخطوة قد تجاوز عن المسافة من العنوان. يكون `null` عندما يكون التسامح معطلاً."
          },
          "consecutive_mismatches": {
            "type": "integer",
            "nullable": true,
            "description": "في المحاولة النهائية: هذا الفحص بالإضافة إلى حالات عدم التطابق السابقة لنفس الشخص على التوالي."
          },
          "attempts": {
            "type": "integer",
            "description": "رقم هذه المحاولة داخل العقدة، بدءاً من 1."
          },
          "consent": {
            "type": "object",
            "nullable": true,
            "description": "الموافقة التي قدمها الشخص قبل مطالبة النظام، مسجلة مع إصدار الصياغة واللغة التي رآها.",
            "properties": {
              "accepted_at": {
                "type": "string",
                "format": "date-time"
              },
              "version": {
                "type": "string",
                "nullable": true
              },
              "locale": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "feature": {
                  "type": "string",
                  "enum": [
                    "ID_VERIFICATION",
                    "NFC",
                    "LIVENESS",
                    "FACEMATCH",
                    "PROOF_OF_ADDRESS",
                    "PHONE",
                    "EMAIL",
                    "AML",
                    "LOCATION",
                    "DATABASE_VALIDATION",
                    "QUESTIONNAIRE",
                    "DOCUMENT_AI",
                    "KYB_REGISTRY",
                    "KYB_DOCUMENTS",
                    "KYB_KEY_PEOPLE",
                    "GEOLOCATION",
                    "SIGNATURE"
                  ],
                  "description": "الميزة التي أنشأت هذا التحذير. تحدد القيمة كتلة الميزة التي ينتمي إليها التحذير. عادةً ما تستخدم مصفوفة تحذيرات كل وحدة نمطية القيمة المطابقة لوحدتها (مثل `PHONE` داخل `phone_verifications[].warnings`)، ولكن التعداد (enum) أعلاه هو المرجع المعتمد عبر جميع تحذيرات الميزات في payload القرار."
                },
                "risk": {
                  "type": "string"
                },
                "additional_data": {
                  "type": "object",
                  "nullable": true
                },
                "log_type": {
                  "type": "string"
                },
                "short_description": {
                  "type": "string"
                },
                "long_description": {
                  "type": "string"
                },
                "node_id": {
                  "type": "string",
                  "description": "معرّف عقدة مخطط سير العمل التي أصدرت هذا التحذير"
                }
              }
            },
            "description": "التحذيرات التي أثارتها خطوة التحقق من الموقع هذه، مع تعيين `feature` إلى `GEOLOCATION`. تبدأ رموز التحذير بـ `LOCATION_`."
          }
        }
      },
      "GeolocationAttempt": {
        "type": "object",
        "description": "محاولة واحدة لخطوة التحقق من الموقع: نفس المفاتيح الموجودة في `geolocation_checks[]` باستثناء `warnings`، بالإضافة إلى وقت استلام Didit لها.",
        "properties": {
          "node_id": {
            "type": "string",
            "nullable": true,
            "description": "عقدة سير العمل التي أنتجت هذه النتيجة، لكي يظل سير العمل الذي يتضمن خطوتين للتحقق من الموقع قابلاً للقراءة."
          },
          "status": {
            "type": "string",
            "enum": [
              "Not Finished",
              "Approved",
              "Declined",
              "In Review",
              "Resub Requested"
            ],
            "description": "حالة مستوى الميزة لخطوة التحقق من الموقع هذه، ويتم تحديدها بناءً على تحذيراتها. مستقلة عن `status` الجلسة."
          },
          "outcome": {
            "type": "string",
            "nullable": true,
            "description": "ما حدث في هذه المحاولة.",
            "enum": [
              "verified",
              "low_accuracy",
              "accuracy_undetermined",
              "stale",
              "approximate",
              "denied",
              "restricted",
              "unavailable",
              "timeout",
              "mock_detected",
              "outside_geofence",
              "in_blocked_area",
              "anonymizer_detected",
              "skipped",
              "replay_rejected",
              "unsupported_client",
              null
            ]
          },
          "permission": {
            "type": "string",
            "nullable": true,
            "description": "ما منحه نظام التشغيل أو المتصفح. تعني القيمة `not_requested` أن الخطوة تستخدم موقع IP الخاص بالاتصال فقط، وبالتالي لا يُطلب الإذن من الشخص مطلقاً.",
            "enum": [
              "granted_precise",
              "granted_approximate",
              "denied",
              "restricted",
              "unavailable",
              "timeout",
              "dismissed",
              "not_requested",
              null
            ]
          },
          "latitude": {
            "type": "number",
            "nullable": true,
            "description": "خط عرض WGS84 للموقع الجغرافي المثبّت. `null` عند عدم وجود تثبيت للموقع.",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "nullable": true,
            "description": "خط طول WGS84 للإحداثية المحددة. `null` عند عدم وجود إحداثية محددة.",
            "format": "double"
          },
          "accuracy_m": {
            "type": "number",
            "nullable": true,
            "description": "نصف قطر عدم اليقين بالأمتار، عند مستوى الثقة في `accuracy_confidence`.",
            "format": "double"
          },
          "accuracy_confidence": {
            "type": "string",
            "nullable": true,
            "description": "مستوى الثقة الذي تخصصه المنصة لـ `accuracy_m`: `p95` (المتصفحات)، أو `p68` (Android)، أو `unspecified` (iOS).",
            "enum": [
              "p95",
              "p68",
              "unspecified",
              null
            ]
          },
          "measured_at": {
            "type": "string",
            "nullable": true,
            "description": "وقت تطبيق الجهاز للإصلاح، وفقاً لساعته الخاصة.",
            "format": "date-time"
          },
          "age_seconds": {
            "type": "integer",
            "nullable": true,
            "description": "عدد الثواني بين تحديد الجهاز للموقع واستلام Didit له."
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "مصدر تحديد الموقع، عندما توضحه المنصة. تعني `ip` أن الموقع هو موقع عنوان IP الخاص بالاتصال.",
            "enum": [
              "gps",
              "fused",
              "network",
              "wifi",
              "cell",
              "browser",
              "unknown",
              "ip",
              null
            ]
          },
          "platform": {
            "type": "string",
            "nullable": true,
            "description": "العميل الذي أصدر الإصلاح.",
            "enum": [
              "web",
              "ios",
              "android",
              "react_native",
              "flutter",
              null
            ]
          },
          "sdk_version": {
            "type": "string",
            "nullable": true,
            "description": "إصدار SDK الذي أنتج الإصلاح."
          },
          "is_mock": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون `true` عندما يشير الجهاز إلى أن الإحداثيات جاءت من مزود موقع زائف أو برنامج محاكاة. وتكون `null` عندما لا تُبلغ المنصة عن ذلك (لا يمكن للمتصفحات معرفة ذلك)؛ والقيمة `null` لا تعني `false`."
          },
          "produced_by_accessory": {
            "type": "boolean",
            "nullable": true,
            "description": "لنظام iOS فقط: تكون القيمة `true` عندما يتم تحديد الموقع بواسطة ملحق خارجي، وتكون `null` في الحالات الأخرى."
          },
          "integrity": {
            "type": "string",
            "enum": [
              "attested",
              "not_attested",
              "failed",
              "unsupported",
              "not_determined"
            ],
            "description": "ما إذا كان إقرار الجهاز يدعم الإصلاح. `unsupported` هو ما تبلّغ عنه المتصفحات، لأن الويب لا يحتوي على آلية إقرار؛ وهو ليس فشلاً."
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "description": "الدولة وفق المعيار ISO 3166-1 alpha-2 التي يقع فيها تحديد الموقع."
          },
          "region_code": {
            "type": "string",
            "nullable": true,
            "description": "التقسيم الإداري حسب معيار ISO 3166-2 الذي يقع فيه الإصلاح."
          },
          "city": {
            "type": "string",
            "nullable": true,
            "description": "أقرب مكان مأهول بالسكان، وهو اسم للمراجعين."
          },
          "geofence": {
            "type": "object",
            "description": "نتيجة قواعد الدولة والمنطقة للخطوة.",
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "ما إذا كانت الخطوة تطبق أي قاعدة دولة أو منطقة."
              },
              "result": {
                "type": "string",
                "nullable": true,
                "description": "موضع الموقع الجغرافي مقارنةً بالقواعد. تعني القيمة `undetermined` أن دائرة الدقة تتجاوز الحدود أو أن الموقع الجغرافي لم يُحدد لأي دولة؛ وهذا لا يُعد دليلاً على وجوده بالخارج.",
                "enum": [
                  "inside",
                  "outside",
                  "undetermined",
                  null
                ]
              }
            }
          },
          "inside_geofence": {
            "type": "boolean",
            "nullable": true,
            "description": "تكون القيمة `true` عندما تكون قيمة `geofence.result` هي `inside`، و`false` عندما تكون `outside`، و`null` في غير ذلك."
          },
          "geofence_basis": {
            "type": "string",
            "nullable": true,
            "description": "من أي موضع تم تقييم نتيجة المنطقة: تحديد موقع `device`، أو موقع `ip` الخاص بالاتصال.",
            "enum": [
              "device",
              "ip",
              null
            ]
          },
          "inside_areas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "معرّفات المناطق المسموح بها التي تم إعدادها والتي يقع الموضع داخلها."
          },
          "blocked_areas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "معرّفات المناطق المحظورة التي تم إعدادها والتي يقع الموضع فيها."
          },
          "position_source": {
            "type": "string",
            "nullable": true,
            "description": "المصدر الذي تستمد منه الخطوة الموقع الجغرافي، وفقاً للإعدادات: مقارنة الجهاز بموقع IP الجغرافي، أو الجهاز فقط، أو موقع IP الجغرافي فقط.",
            "enum": [
              "device_and_ip",
              "device_only",
              "ip_only",
              null
            ]
          },
          "anonymizers": {
            "type": "object",
            "nullable": true,
            "description": "حالة الاتصال والجهاز، وقيمة كل منها `true` أو `false` أو `null` عندما يتعذر على المصدر تحديد ذلك.",
            "properties": {
              "vpn": {
                "type": "boolean",
                "nullable": true
              },
              "proxy": {
                "type": "boolean",
                "nullable": true
              },
              "tor": {
                "type": "boolean",
                "nullable": true
              },
              "spoofing": {
                "type": "boolean",
                "nullable": true
              },
              "emulator": {
                "type": "boolean",
                "nullable": true
              }
            }
          },
          "ip_distance_km": {
            "type": "number",
            "nullable": true,
            "description": "المسافة إلى موقع عنوان IP للجلسة بعد طرح كلا قطري عدم اليقين؛ `0` عند تداخلهما.",
            "format": "double"
          },
          "ip_distance_uncertainty_km": {
            "type": "number",
            "nullable": true,
            "description": "نصف القطر الإجمالي الذي تم طرحه: نصف قطر موقع عنوان IP بالإضافة إلى دقة هذا التحديد.",
            "format": "double"
          },
          "ip_consistent": {
            "type": "boolean",
            "nullable": true,
            "description": "ما إذا كانت `ip_distance_km` تقع ضمن المسافة المهيأة في الخطوة. `null` عندما يكون أيٌّ من الطرفين غير معروف."
          },
          "document_distance_km": {
            "type": "number",
            "nullable": true,
            "description": "المسافة إلى العنوان المرمز جغرافياً في مستند الهوية أو إثبات العنوان. `null` في حال عدم وجود عنوان محفوظ في الملف.",
            "format": "double"
          },
          "travel_excused": {
            "type": "boolean",
            "nullable": true,
            "description": "ما إذا كان هامش التسامح مع السفر في الخطوة قد تجاوز عن المسافة من العنوان. يكون `null` عندما يكون التسامح معطلاً."
          },
          "consecutive_mismatches": {
            "type": "integer",
            "nullable": true,
            "description": "في المحاولة النهائية: هذا الفحص بالإضافة إلى حالات عدم التطابق السابقة لنفس الشخص على التوالي."
          },
          "attempts": {
            "type": "integer",
            "description": "رقم هذه المحاولة داخل العقدة، بدءاً من 1."
          },
          "consent": {
            "type": "object",
            "nullable": true,
            "description": "الموافقة التي قدمها الشخص قبل مطالبة النظام، مسجلة مع إصدار الصياغة واللغة التي رآها.",
            "properties": {
              "accepted_at": {
                "type": "string",
                "format": "date-time"
              },
              "version": {
                "type": "string",
                "nullable": true
              },
              "locale": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "received_at": {
            "type": "string",
            "nullable": true,
            "description": "وقت تلقي Didit للمحاولة.",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BiometricRetention": {
        "type": "object",
        "description": "متى يتم حذف البيانات البيومترية الحية لهذه الجلسة.",
        "required": [
          "jurisdictions",
          "deletes_at"
        ],
        "properties": {
          "jurisdictions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "رموز الولايات الأمريكية التي تفرض قواعدها البيومترية حداً زمنياً للحذف لهذا الشخص (`US` عندما تكون الولاية غير معروفة). تكون فارغة إذا لم ينطبق أي منها."
          },
          "deletes_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "تاريخ حذف البيانات البيومترية الحية (صور الوجه والقوالب) لهذه الجلسة، بناءً على إعداد الاحتفاظ بالبيانات الخاص بتطبيقك والحد القانوني للاختصاص القضائي للشخص، إن وجد. القيمة `null` عندما لا ينطبق أي تاريخ بعد."
          }
        }
      },
      "TravelRuleManualMatchRequest": {
        "type": "object",
        "required": [
          "transaction_id"
        ],
        "properties": {
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "description": "معرّف `transaction_id` الخاص برسالة Travel Rule المستلمة (صف يحتوي على `kind: message`)."
          }
        }
      },
      "TravelRuleManualMatchResponse": {
        "type": "object",
        "required": [
          "deposit",
          "message"
        ],
        "properties": {
          "deposit": {
            "$ref": "#/components/schemas/TravelRuleTransferRow"
          },
          "message": {
            "$ref": "#/components/schemas/TravelRuleTransferRow"
          }
        }
      }
    },
    "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."
      },
      "TransactionTokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Transaction-Token",
        "description": "token قصير الأجل ومحدد النطاق يتم إصداره عبر الواجهة الخلفية الخاصة بك باستخدام POST /v3/transactions/sdk-token/. تستخدمه Didit SDKs على endpoints الموجّهة للأجهزة /v1/transactions/."
      },
      "SessionTokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Session-Token",
        "description": "token قصير الأجل يُرجع في حقل `session_token` الخاص بـ POST /v3/session/. يُستخدم بواسطة مسار التحقق المستضاف (وواجهات البيئة التجريبية المخصصة) لاستدعاء endpoints ذات نطاق الجلسة نيابة عن المستخدم الذي يجري التحقق، دون استخدام مفتاح API الخاص بك من جانب الخادم."
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "token الوصول الخاص باعتماد العميل للتطبيق."
      },
      "CaseRequestToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Case-Request-Token",
        "description": "بيانات اعتماد خاصة بالطلب من الرابط الآمن. تمنح حق الوصول إلى هذا الطلب فقط."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "غير مصرح به",
        "content": {
          "application/json": {
            "examples": {
              "Invalid API Key": {
                "summary": "مفتاح API غير صالح",
                "value": {
                  "detail": "Invalid API Key."
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "محظور",
        "content": {
          "application/json": {
            "examples": {
              "No Permission": {
                "summary": "لا يوجد إذن",
                "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"
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "غير موجود",
        "content": {
          "application/json": {
            "examples": {
              "Not Found": {
                "summary": "غير موجود",
                "value": {
                  "detail": "Resource not found."
                }
              }
            }
          }
        }
      },
      "PhoneRiskValidationError": {
        "description": "فشل التحقق من صحة الطلب.",
        "content": {
          "application/json": {
            "examples": {
              "Missing phone number": {
                "summary": "رقم الهاتف مفقود",
                "value": {
                  "phone_number": [
                    "This field is required."
                  ]
                }
              },
              "Invalid phone number": {
                "summary": "رقم هاتف غير صالح",
                "value": {
                  "phone_number": [
                    "Invalid phone number provided."
                  ]
                }
              },
              "Invalid signal IP": {
                "summary": "عنوان IP للإشارة غير صالح",
                "value": {
                  "signals": {
                    "ip": [
                      "Enter a valid IPv4 or IPv6 address."
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "EmailRiskValidationError": {
        "description": "فشل التحقق من صحة الطلب.",
        "content": {
          "application/json": {
            "examples": {
              "Missing email": {
                "summary": "البريد الإلكتروني مفقود",
                "value": {
                  "email": [
                    "This field is required."
                  ]
                }
              },
              "Invalid email": {
                "summary": "بريد إلكتروني غير صالح",
                "value": {
                  "email": [
                    "Enter a valid email address."
                  ]
                }
              },
              "Invalid country hint": {
                "summary": "تلميح الدولة غير صالح",
                "value": {
                  "country_code": [
                    "Ensure this field has no more than 3 characters."
                  ]
                }
              }
            }
          }
        }
      },
      "IPRiskValidationError": {
        "description": "فشل التحقق من صحة الطلب.",
        "content": {
          "application/json": {
            "examples": {
              "Missing IP address": {
                "summary": "عنوان IP مفقود",
                "value": {
                  "ip_address": [
                    "This field is required."
                  ]
                }
              },
              "Invalid IP address": {
                "summary": "عنوان IP غير صالح",
                "value": {
                  "ip_address": [
                    "Enter a valid IPv4 or IPv6 address."
                  ]
                }
              },
              "Country hint too long": {
                "summary": "تلميح الدولة طويل جدًا",
                "value": {
                  "claimed_country": [
                    "Ensure this field has no more than 3 characters."
                  ]
                }
              }
            }
          }
        }
      },
      "RiskPermissionDenied": {
        "description": "مفتاح API مفقود أو غير صالح، أو لا تستطيع المؤسسة تغطية البحث المباشر. لا تُرجع هذه API أبداً الرمز `401`.",
        "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."
                }
              }
            }
          }
        }
      },
      "RateLimitedWrite": {
        "description": "تم تجاوز حد الكتابة المشترك البالغ 300 طلب في الدقيقة لكل مفتاح API. التزم بالمدة المحددة في `Retry-After` قبل إعادة المحاولة.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "detail"
              ],
              "properties": {
                "detail": {
                  "type": "string"
                }
              }
            },
            "example": {
              "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute."
            }
          }
        }
      },
      "AddressValidationValidationError": {
        "description": "نص الطلب غير صالح: `country` مفقود أو غير معروف، أو لا يوجد عنوان، أو تم توفير كل من `address` والحقول المنظمة معاً.",
        "content": {
          "application/json": {
            "examples": {
              "Unknown country": {
                "value": {
                  "country": [
                    "Use an ISO 3166-1 alpha-2 or alpha-3 country code, e.g. 'US' or 'USA'."
                  ]
                }
              },
              "No address": {
                "value": {
                  "address": [
                    "Send the address: 'address' on one line, or the structured fields with 'address_line_1'."
                  ]
                }
              },
              "Both shapes": {
                "value": {
                  "address": [
                    "Send either 'address' or the structured fields (address_line_1, ...), not both."
                  ]
                }
              }
            }
          }
        }
      },
      "AddressValidationPermissionDenied": {
        "description": "مفتاح API مفقود أو غير صالح، أو يفتقر المفتاح المحدد النطاق إلى وصول الكتابة لـ `sessions`، أو لا تستطيع المؤسسة تغطية التحقق. لا تُرجع هذه API أبداً الرمز `401`.",
        "content": {
          "application/json": {
            "examples": {
              "Missing or invalid API key": {
                "value": {
                  "detail": "You do not have permission to perform this action."
                }
              },
              "Not enough credits": {
                "value": {
                  "detail": "You don't have enough credits to perform this request. Please top up at https://business.didit.me",
                  "code": "insufficient_credits"
                }
              }
            }
          }
        }
      },
      "DocumentProcessingBusy": {
        "description": "تجري معالجة عدد كبير جداً من المستندات في الوقت الحالي، لذا لم تتم معالجة عملية الرفع هذه: لم يتم تخزين أي شيء ولم تُستهلك أي محاولة. أعد إرسال الملف نفسه بعد انقضاء عدد الثواني المحدد في `Retry-After`. اعتمد في التفريع البرمجي على `code`، وليس على نص الرسالة.",
        "headers": {
          "Retry-After": {
            "description": "عدد الثواني للانتظار قبل إرسال الطلب نفسه مرة أخرى.",
            "schema": {
              "type": "integer",
              "example": 10
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "detail",
                "code"
              ],
              "properties": {
                "detail": {
                  "type": "string"
                },
                "code": {
                  "type": "string",
                  "enum": [
                    "document_processing_busy"
                  ]
                }
              }
            },
            "example": {
              "detail": "We are busy processing documents. Please try again in a moment.",
              "code": "document_processing_busy"
            }
          }
        }
      }
    },
    "parameters": {
      "WebhookSignature": {
        "name": "X-Signature",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "سلسلة hex بأحرف صغيرة لتشفير HMAC-SHA256، بمفتاح سري خاص بالوجهة، لجسم الطلب الخام الدقيق."
      },
      "WebhookSignatureV2": {
        "name": "X-Signature-V2",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "سلسلة hex بأحرف صغيرة لتشفير HMAC-SHA256، باستخدام السر الخاص بالوجهة كمفتاح، لبيانات JSON المعيارية لنص الطلب (مفاتيح مرتبة، بدون مسافات بيضاء، ومن دون تهريب الأحرف غير ASCII). يوصى بها لأنها تصمد أمام البرمجيات الوسيطة التي تعيد ترميز نص الطلب."
      },
      "WebhookSignatureSimple": {
        "name": "X-Signature-Simple",
        "in": "header",
        "required": true,
        "deprecated": true,
        "schema": {
          "type": "string"
        },
        "description": "سلسلة hex بأحرف صغيرة لتشفير HMAC-SHA256، بمفتاح سري خاص بالوجهة، للقيمة `{timestamp}:{session_id}:{status}:{webhook_type}` (الحقول المفقودة كسلاسل فارغة). تغطي الغلاف فقط، ولا تغطي الـ payload أبداً."
      },
      "WebhookTimestamp": {
        "name": "X-Timestamp",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "توقيت Unix بالثواني، مساوٍ لقيمة `timestamp` في نص الرسالة. ارفض عمليات التسليم الأقدم من بضع دقائق."
      }
    }
  },
  "x-webhooks": {
    "status.updated": {
      "post": {
        "summary": "تغيرت حالة الجلسة",
        "description": "غيّرت جلسة تحقق حالتها. يتم إرسال `decision` فقط للحالات `Approved` و`Declined` و`In Review` و`Abandoned`؛ وله نفس شكل `GET /v3/session/{sessionId}/decision/` للوجهات التي تستخدم الإصدار 3 من webhook (الافتراضي)، والشكل الأقدم المصغر للوجهات التي تستخدم الإصدارين 1 أو 2. تتلقى جلسات الشركات دائمًا قرار الشركات من الإصدار 3.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionStatusUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "data.updated": {
      "post": {
        "summary": "تغيّرت بيانات الجلسة",
        "description": "بيانات جلسة التحقق تغيرت دون تغيير في الحالة، على سبيل المثال بعد تعديل مراجعة يدوية، أو تجاوز خطوة، أو إعادة فحص للمراقبة المستمرة. يُرسل `decision` فقط للحالات `Approved` و`Declined` و`In Review` و`Abandoned`؛ وله شكل `GET /v3/session/{sessionId}/decision/` للوجهات التي تستخدم الإصدار 3 من webhook (الافتراضي)، والشكل المختصر الأقدم لوجهات الإصدار 1 أو 2. تتلقى جلسات الشركات دائماً قرار الشركات للإصدار 3.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionDataUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "user.status.updated": {
      "post": {
        "summary": "تم تغيير حالة المستخدم",
        "description": "تغيّرت حالة مستخدم. لا يُرسل عند إنشاء المستخدم.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserStatusUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "user.data.updated": {
      "post": {
        "summary": "تم تغيير بيانات المستخدم",
        "description": "تغيرت حقول مستخدم. لا يُرسل عند إنشاء المستخدم. يمكن لعملية حفظ واحدة إنتاج حدث حالة وحدث بيانات معاً.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserDataUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "business.status.updated": {
      "post": {
        "summary": "تم تغيير حالة الشركة",
        "description": "تغيرت حالة الشركة. لا يتم الإرسال عند إنشاء الشركة.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BusinessStatusUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "business.data.updated": {
      "post": {
        "summary": "تم تغيير بيانات الشركة",
        "description": "تغيرت حقول شركة. لا يُرسل عند إنشاء الشركة. يمكن لعملية حفظ واحدة إنتاج حدث حالة وحدث بيانات معاً.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BusinessDataUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "transaction.created": {
      "post": {
        "summary": "تم إنشاء المعاملة",
        "description": "تم إنشاء معاملة وفحصها. تُرسل لتطبيقات بيئة الإنتاج فقط.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCreatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "transaction.status.updated": {
      "post": {
        "summary": "تغيرت حالة المعاملة",
        "description": "تغيرت حالة معاملة، بناءً على قاعدة أو مراجعة أو إجراء من المستخدم النهائي. تُرسل لتطبيقات بيئة الإنتاج فقط.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionStatusUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "travel_rule.status.updated": {
      "post": {
        "summary": "تغيرت حالة Travel Rule",
        "description": "تغيرت حالة تبادل Travel Rule. يُرسل عند كل انتقال حتى `FINISHED` أو `CANCELLED` أو `EXPIRED` وبما يشملها، ولا يُرسل بعدها أبداً. يُرسل لتطبيقات بيئة الإنتاج، وكذلك، بالنسبة لتبادلات Travel Rule، لتطبيقات البيئة التجريبية أيضاً (`environment: sandbox`). لا توجد `status` على المستوى الأعلى.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleStatusUpdatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "workflow.compliance_changed": {
      "post": {
        "summary": "تم تغيير امتثال سير العمل",
        "description": "تغيّرت حالة الامتثال لسير عمل منشور بعد إعادة التقييم. حدث واحد لكل سير عمل. لا يوجد `status` على المستوى الأعلى.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowComplianceChangedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "kyb.registry_search.resolved": {
      "post": {
        "summary": "اكتمل البحث عن الشركة (استدعاء غير موقّع)",
        "description": "نص الاستدعاء المُرسل إلى `webhook_url` الخاص بـ `POST /v3/kyb/search/` بمجرد اكتمال البحث في السجل. هذا النص غير موقّع: يتضمن الطلب الرأس `X-Didit-Unsigned-Callback: true` ولا يحتوي على أي من رؤوس التوقيع، لذا تحقق منه بمطابقة `request_id` مع عملية بحث بدأتها أنت. يستخدم `event_type`، وليس `webhook_type`.",
        "tags": [
          "Webhook"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KYBRegistrySearchResolvedCallback"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    },
    "transaction_rule_suggestions.created": {
      "post": {
        "summary": "تم إنشاء اقتراحات قواعد المعاملة",
        "description": "اقترحت عملية اقتراح قواعد المعاملات تغييرات جديدة في القواعد لتطبيقك. يُرسل عندما تكون إشعارات webhook مفعّلة في إعدادات اقتراح القواعد. لا توجد `status` على المستوى الأعلى.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureV2"
          },
          {
            "$ref": "#/components/parameters/WebhookSignatureSimple"
          },
          {
            "$ref": "#/components/parameters/WebhookTimestamp"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRuleSuggestionsCreatedEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "أي استجابة برمز 2xx تؤكد التسليم. تتم إعادة المحاولة للاستجابات الأخرى وحالات انتهاء المهلة؛ راجع https://docs.didit.me/integration/webhooks."
          }
        }
      }
    }
  }
}
