> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# लेन-देन निगरानी नियम बनाने का API - KYT नियम

> Didit के API से कस्टम KYT नियम बनाएँ: शर्तें, वेलोसिटी विंडो, दायरा और कार्रवाइयाँ। पहले TEST मोड में बनाएँ, बैकटेस्ट करें, फिर सक्रिय करें।



नियम बनाने के लिए API प्रॉम्प्ट
        प्रॉम्प्ट को क्लिपबोर्ड पर कॉपी करें



      
      

\<pre>

\`Create a custom transaction-monitoring rule on my Didit application.

Endpoint:
POST https://verification.didit.me/v3/transactions/rules/

Authentication:
Use the x-api-key header with my Didit API key.

Request body (application/json):
\{
"title": "Structuring - inbound (custom)",   // required, unique per application - duplicate -> 400
"description": "20+ inbound EUR transfers, all under 10,000 EUR, 30 days",
"category": "finance",                        // required: finance, aml_ctf, anomaly_detection, fatf, device_intelligence, crypto_monitoring, travel_rule, responsible_gaming, e_commerce, ...
"mode": "TEST",                               // required: TEST (recommended start - evaluates, never affects transactions), ACTIVE, DISABLED
"evaluation_mode": "ALL",                     // ALL = every condition must match, ANY = at least one
"scope": {"transaction_types": ["finance"], "directions": ["INBOUND"]},  // constrains the transaction being evaluated; optional keys: transaction_types, directions (INBOUND/OUTBOUND), action_types
"conditions": [                               // read the transaction being evaluated, never the history window
\{"field": "currency", "operator": "eq", "value": "EUR"},
\{"field": "amount", "operator": "lt", "value": 10000}
],
"aggregation": [                              // velocity over the history window: ALL entries must match
\{"metric": "count", "operator": "gte", "value": 20, "window": "30d",
 "filters": {"direction": "INBOUND", "transaction_type": "finance", "currency": "EUR", "subject_vendor_data": "__current__"}},
\{"metric": "max", "field": "amount", "operator": "lt", "value": 10000, "window": "30d",
 "filters": {"direction": "INBOUND", "transaction_type": "finance", "currency": "EUR", "subject_vendor_data": "__current__"}}
],
"actions": [{"type": "add_score", "value": 35}]
}

Schema essentials:
\- Condition operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, contains_any (list of strings), regex, fuzzy_match (needs "score" 0-100), exists/is_not_empty/is_not_null, not_exists/is_empty/is_null.
\- Condition fields include amount, preferred_currency_amount, direction, action_type, payment_details, subject_vendor_data, counterparty_country, subject_device_fingerprint, subject_payment_method_*, travel_rule_status, tags, and custom_values.<key> for your own custom_properties.
\- value_type turns "value" into a List UUID ("list"), another field path ("field"), or a relative date ("relative_date").
\- Aggregation windows: <N>m (MINUTES), <N>h, <N>d. A filter value of "__current__" means same-as-the-evaluated-transaction. Records without the grouped value are never grouped together: when the evaluated transaction has no value for a "__current__" field (no counterparty, no device fingerprint), that aggregation does not match, whatever its operator.
\- Conditions and aggregation filters are NOT interchangeable. A condition constrains only the transaction being evaluated; an aggregation filter constrains only the historical window, and it compares by equality or list membership - there is no lt/gte filter. Express a range over the window as a max/min aggregation (e.g. max amount lt 10000 with currency pinned to EUR keeps every transaction in that window under 10,000 EUR), and repeat direction/currency/transaction_type on BOTH halves when the rule promises them - otherwise the rule fires on transactions it never meant to cover.
\- Actions: add_score {value}, change_status {value, workflow_id (REQUIRED for AWAITING_USER)}, add_tags {tag_uuid|tag_name, tag_color}, add_note {note}, add_to_list {list_id}, open_case {blueprint, grouping, attach_matched_transaction}.

Recommended workflow:
1\. Create in mode TEST.
2\. POST /v3/transactions/rules/backtest/ with the SAME conditions, aggregation, evaluation_mode and scope to see matches over your history. Omitted conditions, aggregation and scope add no constraints of their own; dropping scope can include directions or transaction types the saved rule skips. Omitted evaluation_mode defaults to ALL (which can reduce matches for an ANY rule), and omitted period_days defaults to 90 days, not unlimited history.
3\. PATCH the rule to mode ACTIVE once the numbers look right.

Sandbox fixtures for this example: at least 20 inbound EUR finance transactions for the same subject within 30 days, each with raw amount below 10000. No normalized amount is required. Sandbox ingestion does not evaluate rules; call backtest explicitly.

Failure modes:
\- 400 - duplicate title, unknown operator/metric, malformed window, invalid scope direction, contains_any without a list, fuzzy_match without a score, or AWAITING_USER without workflow_id. The body names the exact index and problem.
\- 401 - missing or malformed x-api-key.

Full guide: /transaction-monitoring/rules-api.`

\</pre>



      
      

यहाँ पेस्ट करें



## OpenAPI

````yaml hi/openapi-25.json POST /v3/transactions/rules/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: पहचान सत्यापन API। x-api-key हेडर के साथ प्रमाणीकृत करें।
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/transactions/rules/:
    post:
      tags:
        - Transactions
      summary: नियम बनाएं
      description: >-
        एक CUSTOM लेन-देन निगरानी नियम बनाएं। शीर्षक प्रति एप्लिकेशन अद्वितीय
        होते हैं (डुप्लिकेट -> 400)। `AWAITING_USER` को लक्षित करने वाली
        `change_status` कार्रवाई में `workflow_id` होना आवश्यक है। ACTIVE मोड
        में बनाए गए नियम नए लेन-देन पर तुरंत लागू होते हैं - अनुशंसित वर्कफ़्लो
        यह है कि TEST मोड में बनाएं, बैकटेस्ट करें, फिर मोड को ACTIVE में बदलें।
        लाइब्रेरी नियम को बदलने के लिए, इसे एक कॉपी के रूप में बनाएं:
        `metadata.based_on` (इसकी लाइब्रेरी कुंजी) और
        `metadata.based_on_rule_uuid` के साथ लाइब्रेरी नियम की परिभाषा भेजें।
      operationId: createTransactionRule
      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: >-
            सत्यापन त्रुटि - डुप्लिकेट शीर्षक, अज्ञात ऑपरेटर/मीट्रिक, विकृत
            विंडो, अमान्य स्कोप दिशा, या workflow_id के बिना AWAITING_USER।
          content:
            application/json:
              schema:
                type: object
              example:
                title:
                  - A rule with this name already exists.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST 'https://verification.didit.me/v3/transactions/rules/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -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

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.rules.create(
                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.0,
                    "window": "30d",
                    "filters": {"direction": "INBOUND", "transaction_type": "finance", "subject_vendor_data": "__current__", "currency": "EUR"},
                }, {
                    "metric": "max",
                    "field": "amount",
                    "operator": "lt",
                    "value": 10000.0,
                    "window": "30d",
                    "filters": {"direction": "INBOUND", "transaction_type": "finance", "subject_vendor_data": "__current__", "currency": "EUR"},
                }],
                actions=[{
                    "type": "add_score",
                    "value": 35,
                }],
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.transactions.rules.create({
              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.0,
                window: "30d",
                filters: { direction: "INBOUND", transaction_type: "finance", subject_vendor_data: "__current__", currency: "EUR" },
              }, {
                metric: "max",
                field: "amount",
                operator: "lt",
                value: 10000.0,
                window: "30d",
                filters: { direction: "INBOUND", transaction_type: "finance", subject_vendor_data: "__current__", currency: "EUR" },
              }],
              actions: [{
                type: "add_score",
                value: 35,
              }],
            });
            console.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;

            import java.util.Map;

            import me.didit.Didit;

            import me.didit.types.TransactionRuleAction;

            import me.didit.types.TransactionRuleActionAddScore;

            import me.didit.types.TransactionRuleAggregation;

            import me.didit.types.TransactionRuleCondition;

            import me.didit.types.TransactionRuleCreateRequest;

            import me.didit.types.TransactionRuleScope;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().rules().create(TransactionRuleCreateRequest.builder()
                    .title("Structuring - inbound (custom)")
                    .description("20+ inbound EUR transfers, all under 10,000 EUR, 30 days")
                    .category("finance")
                    .mode(TransactionRuleCreateRequest.Mode.of("TEST"))
                    .evaluationMode(TransactionRuleCreateRequest.EvaluationMode.of("ALL"))
                    .scope(TransactionRuleScope.builder()
                            .transactionTypes(List.of("finance"))
                            .directions(List.of(TransactionRuleScope.Directions.of("INBOUND")))
                            .build())
                    .conditions(List.of(
                            TransactionRuleCondition.builder()
                                    .field("currency")
                                    .operator(TransactionRuleCondition.Operator.of("eq"))
                                    .value("EUR")
                                    .build(),
                            TransactionRuleCondition.builder()
                                    .field("amount")
                                    .operator(TransactionRuleCondition.Operator.of("lt"))
                                    .value(10000)
                                    .build()))
                    .aggregation(List.of(
                            TransactionRuleAggregation.builder()
                                    .metric(TransactionRuleAggregation.Metric.of("count"))
                                    .operator(TransactionRuleAggregation.Operator.of("gte"))
                                    .value(20.0)
                                    .window("30d")
                                    .filters(Map.of("direction", "INBOUND", "transaction_type", "finance", "subject_vendor_data", "__current__", "currency", "EUR"))
                                    .build(),
                            TransactionRuleAggregation.builder()
                                    .metric(TransactionRuleAggregation.Metric.of("max"))
                                    .field("amount")
                                    .operator(TransactionRuleAggregation.Operator.of("lt"))
                                    .value(10000.0)
                                    .window("30d")
                                    .filters(Map.of("direction", "INBOUND", "transaction_type", "finance", "subject_vendor_data", "__current__", "currency", "EUR"))
                                    .build()))
                    .actions(List.of(TransactionRuleAction.ofAddScore(TransactionRuleActionAddScore.builder()
                            .type(TransactionRuleActionAddScore.Type.of("add_score"))
                            .value(35L)
                            .build())))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->transactions->rules->create([
                '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.0,
                    'window' => '30d',
                    'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],
                ], [
                    'metric' => 'max',
                    'field' => 'amount',
                    'operator' => 'lt',
                    'value' => 10000.0,
                    'window' => '30d',
                    'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],
                ]],
                'actions' => [[
                    'type' => 'add_score',
                    'value' => 35,
                ]],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.transactions.rules.create(
              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.0,
                window: "30d",
                filters: { direction: "INBOUND", transaction_type: "finance", subject_vendor_data: "__current__", currency: "EUR" },
              }, {
                metric: "max",
                field: "amount",
                operator: "lt",
                value: 10000.0,
                window: "30d",
                filters: { direction: "INBOUND", transaction_type: "finance", subject_vendor_data: "__current__", currency: "EUR" },
              }],
              actions: [{
                type: "add_score",
                value: 35,
              }]
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Collections.Generic;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.Transactions.Rules.CreateAsync(new
            TransactionRuleCreateRequest

            {
                Title = "Structuring - inbound (custom)",
                Description = "20+ inbound EUR transfers, all under 10,000 EUR, 30 days",
                Category = "finance",
                Mode = "TEST",
                EvaluationMode = new TransactionRuleCreateRequestEvaluationMode("ALL"),
                Scope = new TransactionRuleScope
                {
                    TransactionTypes = new string[] { "finance" },
                    Directions = new TransactionRuleScopeDirections[] { "INBOUND" },
                },
                Conditions = new TransactionRuleCondition[]
                {
                    new()
                    {
                        Field = "currency",
                        Operator = "eq",
                        Value = "EUR",
                    },
                    new()
                    {
                        Field = "amount",
                        Operator = "lt",
                        Value = 10000,
                    },
                },
                Aggregation = new TransactionRuleAggregation[]
                {
                    new()
                    {
                        Metric = new TransactionRuleAggregationMetric("count"),
                        Operator = new TransactionRuleAggregationOperator("gte"),
                        Value = 20.0,
                        Window = "30d",
                        Filters = new Dictionary<string, object> { ["direction"] = "INBOUND", ["transaction_type"] = "finance", ["subject_vendor_data"] = "__current__", ["currency"] = "EUR" },
                    },
                    new()
                    {
                        Metric = new TransactionRuleAggregationMetric("max"),
                        Field = "amount",
                        Operator = new TransactionRuleAggregationOperator("lt"),
                        Value = 10000.0,
                        Window = "30d",
                        Filters = new Dictionary<string, object> { ["direction"] = "INBOUND", ["transaction_type"] = "finance", ["subject_vendor_data"] = "__current__", ["currency"] = "EUR" },
                    },
                },
                Actions = new TransactionRuleAction[]
                {
                    new()
                    {
                        Type = new TransactionRuleActionType("add_score"),
                        Value = 35,
                    },
                },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    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 मोड में बनाएं और पहले बैकटेस्ट करें।
    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
    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: >-
        नियम किन लेन-देन पर लागू होता है। केवल ये तीन कुंजियाँ स्वीकार की जाती
        हैं।
    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_properties में सबमिट की गई किसी भी कुंजी के लिए
            custom_values.<key>। देश-कोड फ़ील्ड 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`: मान एक 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 से कम के ऐतिहासिक लेन-देन"
            जैसी सीमा यहाँ व्यक्त नहीं की जा सकती है। इसके बजाय सीमा को मीट्रिक
            पर रखें (lt ऑपरेटर के साथ मीट्रिक max विंडो के प्रत्येक लेन-देन को
            थ्रेशोल्ड से नीचे रखता है)।
      description: >-
        विंडो के भीतर एप्लिकेशन के ऐतिहासिक लेन-देन पर वेलोसिटी जांच।
        evaluation_mode की परवाह किए बिना, नियम से मेल खाने के लिए प्रत्येक
        एग्रीगेशन प्रविष्टि का मेल खाना आवश्यक है। एक एग्रीगेशन केवल विंडो को
        बाधित करता है; मूल्यांकित किए जा रहे लेन-देन को स्कोप और शर्तों द्वारा
        बाधित किया जाता है, इसलिए जब नियम उन्हें निर्दिष्ट करता है तो दोनों
        हिस्सों पर direction, currency या transaction_type दोहराएं।
    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 मोड में नियम बिना कोई कार्रवाई लागू
        किए यह रिकॉर्ड करते हैं कि वे क्या करते।
    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: 'लेन-देन से जुड़ा नोट टेक्स्ट (लेखक: Rule Engine)। उपनाम कुंजी: मान।'
      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
        कार्रवाई लागू की जाती है।
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        आपकी एप्लिकेशन की API कुंजी, Business Console में Developers -> API keys
        से। प्राथमिक कुंजी के पास पूर्ण एक्सेस होता है। एक नामित कुंजी को स्कोप
        किया जा सकता है: प्रति संसाधन none, read या write, कुछ वर्कफ़्लो या
        स्वीकृत सत्रों तक सीमित, IP पतों की सूची तक सीमित, और समाप्ति तिथि तक
        सीमित। 401 का अर्थ है कि कुंजी गलत है, निरस्त कर दी गई है या उसकी
        समय-सीमा समाप्त हो गई है; 403 का अर्थ है कि कोई कुंजी नहीं भेजी गई थी,
        कुंजी के पास इस संसाधन या कार्रवाई का एक्सेस नहीं है, या अनुरोध उसकी IP
        सूची से बाहर के पते से आया था; सत्र रूट पर 404 का अर्थ है कि सत्र कुंजी
        के वर्कफ़्लो या स्थितियों से बाहर है। मीडिया एक्सेस के बिना एक कुंजी को
        छवि, वीडियो और PDF URL null के रूप में प्राप्त होते हैं, और सत्र write
        के बिना एक कुंजी को सत्र लिंक और token null के रूप में प्राप्त होते हैं।
        देखें https://docs.didit.me/console/api-keys।

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.