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

# AML जाँच स्थिति अपडेट API

> Didit API से किसी सत्र के AML स्क्रीनिंग जाँच की स्थिति सेट करें, जैसे हिट साफ़ होने पर स्वीकृत, बिना समग्र सत्र निर्णय बदले।



AML जाँच स्थिति अपडेट करने का API प्रॉम्प्ट
        प्रॉम्प्ट को क्लिपबोर्ड पर कॉपी करें



      
      

\<pre>

\`Set the status of the AML screening check of a Didit verification session through the API.

Endpoint:
PATCH https://verification.didit.me/v3/session/{session_id}/update-aml-status/

Authentication:
Send my Didit API key in the x-api-key header. A scoped key needs decisions: write.

Goal:
\- Record my compliance decision on a session's AML check as a whole (the status of an aml_screenings[] entry in the session decision), for example Approved after my team cleared every hit.

Request body (JSON):
\- status (required): "Approved", "Declined", "In Review", "Not Finished" or "Resub Requested".
\- node_id (optional): the workflow node ID of the AML check when the session ran several AML steps. It can also be sent as the node_id query parameter. Without it the most recent AML check is updated.

Behavior:
\- Works for user (KYC) and business (KYB) session IDs.
\- Only the AML check changes. The session status is not recomputed: use PATCH /v3/session/{session_id}/update-status/ to change the session decision, and PATCH /v3/session/{session_id}/update-aml-hit-status/ to mark individual hits.
\- When the status changes, Didit adds an AML_STATUS_UPDATED activity entry and sends a data.updated webhook.
\- Sending the status the check already has returns 200 and changes nothing (no activity entry, no webhook).

Example call:
curl -X PATCH "https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-aml-status/" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "Approved"}'

What to read from the response:
\- status: the AML check status now.
\- previous_status: the status before the call (equal to status when nothing changed).

Failure modes:
\- 400: status missing or not one of the allowed values.
\- 401: the API key has expired.
\- 403: missing key (a wrong, revoked or expired key gets 401), a key of another application, a scoped key without decisions: write, or a request from outside the key's IP allowlist.
\- 404: the session does not exist, was deleted, or is outside a scoped key's limits, or it has no AML check (for that node_id). This is checked before the body, so it wins over a 400.

Side effects: changes the AML check status, adds an activity entry and sends a data.updated webhook (only when the status changed).

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

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

पूरी जाँच के बजाय अलग-अलग मिलानों पर निर्णय लेने के लिए, [AML हिट स्थिति अपडेट करें](https://docs.didit.me/hi/sessions-api/update-aml-hit-status.md) देखें। स्क्रीनिंग के परिणाम और स्थितियाँ कैसे तैयार किए जाते हैं, यह जानने के लिए [AML स्क्रीनिंग](https://docs.didit.me/hi/core-technology/aml-screening/overview.md) देखें।


## OpenAPI

````yaml hi/openapi-25.json PATCH /v3/session/{sessionId}/update-aml-status/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: पहचान सत्यापन API। x-api-key हेडर के साथ प्रमाणीकृत करें।
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/session/{sessionId}/update-aml-status/:
    patch:
      tags:
        - Sessions
      summary: AML जाँच स्थिति अपडेट करें
      description: >-
        सत्र की AML स्क्रीनिंग जांच की स्थिति को समग्र रूप से सेट करें (सत्र
        निर्णय में `aml_screenings[]` प्रविष्टि का `status`), उदाहरण के लिए आपकी
        टीम द्वारा प्रत्येक हिट को साफ़ करने के बाद `Approved`। KYC और KYB सत्र
        IDs के लिए काम करता है; जब सत्र में एक से अधिक AML चरण चलाए गए हों, तो
        `node_id` (क्वेरी पैरामीटर या बॉडी फ़ील्ड) पास करें, अन्यथा सबसे हालिया
        AML जांच अपडेट की जाती है। जब स्थिति वास्तव में बदलती है, तो एक
        `AML_STATUS_UPDATED` गतिविधि प्रविष्टि दर्ज की जाती है और एक
        `data.updated` [webhook](https://docs.didit.me/hi/integration/webhooks)
        भेजा जाता है; वर्तमान स्थिति भेजने पर `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
      parameters:
        - name: sessionId
          in: path
          required: true
          description: >-
            सत्यापन सत्र का UUID (`POST /v3/session/` द्वारा लौटाया गया
            `session_id`)। उपयोगकर्ता सत्यापन (KYC) और व्यवसाय सत्यापन (KYB)
            दोनों सत्र ID स्वीकार करता है: सर्वर दोनों सत्र प्रकारों में ID को
            रिज़ॉल्व करता है। यह एक सही प्रारूप वाला UUID होना चाहिए; गलत
            प्रारूप वाला मान रूट से मेल नहीं खाता है और एक HTML `404` लौटाता है।
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
        - name: node_id
          in: query
          required: false
          description: >-
            अपडेट किए जाने वाले AML चेक का वर्कफ़्लो ग्राफ़ नोड ID। केवल तभी
            आवश्यक जब सत्र में एक से अधिक 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 चेक का वर्कफ़्लो
                    ग्राफ़ नोड ID।
                  example: feature_aml_1
            example:
              status: Approved
      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 enum में नहीं है
                  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 अनुमति सूची (allowlist) के
            बाहर से किया गया अनुरोध भी यही लौटाता है; गलत, निरस्त या समय-सीमा
            समाप्त कुंजी `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: इस ID वाला कोई सत्र मौजूद नहीं है, या इसे हटा दिया गया था
                  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: >-
            रेट लिमिट पार हो गई: प्रति मिनट प्रति API कुंजी 300 राइट (POST,
            PATCH, DELETE) अनुरोध। पुनः प्रयास करने से पहले `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: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X PATCH
            'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-aml-status/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"status": "Approved"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.update_aml_status(
                "11111111-2222-3333-4444-555555555555",
                status="Approved",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const result = await
            didit.sessions.updateAmlStatus("11111111-2222-3333-4444-555555555555",
            {
              status: "Approved",
            });

            console.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;

            import me.didit.types.SessionsUpdateAmlStatusParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().updateAmlStatus("11111111-2222-3333-4444-555555555555",
            SessionsUpdateAmlStatusParams.builder()
                    .status(SessionsUpdateAmlStatusParams.Status.of("Approved"))
                    .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->sessions->updateAmlStatus('11111111-2222-3333-4444-555555555555',
            [
                'status' => 'Approved',
            ]);

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

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

            result = didit.sessions.update_aml_status(
              "11111111-2222-3333-4444-555555555555",
              status: "Approved"
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.Sessions.UpdateAmlStatusAsync("11111111-2222-3333-4444-555555555555",
            new SessionsUpdateAmlStatusParams

            {
                Status = "Approved",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  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.