> ## 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 可列出会话的每一次持续 AML 监控复筛运行记录，包括没有任何变化的运行，并附上每次运行的结果、评分以及数据集新鲜度。

列出 AML 筛查历史 API 提示词
将提示词复制到剪贴板

<pre>
  \`List the ongoing AML monitoring history of one Didit verification session through the API.

  Endpoint:
  GET [https://verification.didit.me/v3/session/\{session\_id}/aml-screening-history/](https://verification.didit.me/v3/session/\{session_id}/aml-screening-history/)

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

  Goal:

  * Prove that ongoing AML monitoring ran for a subject, including the re-screens that found nothing new, for example to answer an auditor.

  Query parameters:

  * node\_id (optional): the workflow node ID of the AML check when the session ran several AML steps. Without it, the most recent AML check is used.
  * limit (default 50) and offset: pagination.

  Behavior:

  * Works for user (KYC) and business (KYB) session IDs.
  * Returns { count, next, previous, results }, newest first by completed\_at. count is exact up to 100 and capped at 100 above that, so follow next until it is null.
  * Only ongoing-monitoring re-screens are listed. The first screening is part of the session decision, so a session without ongoing monitoring returns an empty list.
  * History starts when the feature was introduced; earlier screenings are not reconstructed.

  Example call:
  curl -X GET "[https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/aml-screening-history/](https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/aml-screening-history/)" \
  -H "x-api-key: YOUR\_API\_KEY"

  What to read from the response:

  * results\[].completed\_at: when the re-screen finished. started\_at: when its batch started.
  * results\[].outcome: NO\_CHANGE (completed, result unchanged), CHANGED (score, status or hits moved) or FAILED (no usable answer for this subject, nothing changed).
  * results\[].status, score and total\_hits: the state the re-screen left the check in.
  * results\[].dataset\_freshness: how current the screening datasets were (sources.sanctions, pep, warnings, adverse\_media with last\_updated\_at and oldest\_updated\_at), or null when no dates were available. Dates are never estimated.
  * results\[].provider and dataset\_freshness.provider: an identifier of the data source. Treat it as an opaque string.

  Failure modes:

  * 400: limit or offset above 1,000,000.
  * 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: read, 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).

  Side effects: none. This is a pure read.

  For the full integration shape, see /integration/integration-prompt.\`
</pre>

粘贴到

警报、活动记录和 Webhook 仅在筛查结果发生变化时触发，因此这份历史记录是证明某个无异常对象仍在接受筛查的依据。[持续 AML 监控](https://docs.didit.me/zh/core-technology/aml-screening/continuous-monitoring-aml-screening.md)介绍了重新筛查的运行方式以及每个字段的含义。如需将同一份历史记录以文件形式提供给审计人员，请使用[导出 AML 筛查历史](https://docs.didit.me/zh/management-api/sessions/export-aml-screening-history.md)。


## OpenAPI

````yaml zh/openapi-25.json GET /v3/session/{sessionId}/aml-screening-history/
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}/aml-screening-history/:
    get:
      tags:
        - Sessions
      summary: 列出 AML 筛查历史记录
      description: >-
        列出会话 AML 检查中每一次已完成的持续监控重新筛查，按 `completed_at`
        最新的优先，包括未发生任何变更的运行记录：仅当结果发生变化时才会触发警报、活动条目和
        Webhook，因此该历史记录是未发现问题的主体仍在接受筛查的凭据。适用于 KYC 和 KYB 会话 ID；当会话运行了多个 AML
        步骤时，请传入
        `node_id`。仅列出持续监控重新筛查（首次筛查是会话决策的一部分），且不会重建此历史记录存在之前的运行记录，因此没有持续监控的会话将返回空列表。`count`
        在不超过 100 时是精确的，超过 100 时上限为 100，因此请持续追踪 `next` 直至其为 `null`。传入 `month`
        可一次读取一个日历月的数据。限定范围的 API 密钥需要 `decisions: read` 权限；参见[持续 AML
        监控](https://docs.didit.me/zh/core-technology/aml-screening/continuous-monitoring-aml-screening)。
      operationId: get_v3_session_aml_screening_history
      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 步骤时需要；若不提供，则使用最新的 AML 检查。未知的节点将返回
            `404`。
          schema:
            type: string
            example: feature_aml_1
        - name: month
          in: query
          required: false
          description: 格式为 `YYYY-MM` 的 UTC 日历月份。仅返回在该月份完成的筛查；若不指定则返回所有月份。格式错误的月份将返回 `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`。建议优先使用
            `next` 和 `previous` URL。
          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
      responses:
        '200':
          description: 一页筛查运行记录，最新的排在最前。
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - next
                  - previous
                  - results
                properties:
                  count:
                    type: integer
                    maximum: 100
                    description: 运行次数，100 以内为准确数值，超过 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
                        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
                        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: >-
            身份验证或授权失败。缺少密钥，以及属于其他应用的密钥、缺少该 endpoint 所需权限的限定作用域密钥和来自该密钥 IP
            允许名单之外的请求均返回 `403`；错误、已撤销或已过期的密钥返回 `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: 不存在具有此 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 密钥每分钟最多 600 次 GET 请求。请等待 `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: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/aml-screening-history/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            for item in client.sessions.list_aml_screening_history(
                "11111111-2222-3333-4444-555555555555",
            ):
                print(item)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            for await (const item of
            didit.sessions.listAmlScreeningHistory("11111111-2222-3333-4444-555555555555"))
            {
              console.log(item);
            }
        - 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;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            for (var item :
            client.sessions().listAmlScreeningHistory("11111111-2222-3333-4444-555555555555"))
            {
                System.out.println(item);
            }
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            foreach
            ($didit->sessions->listAmlScreeningHistory('11111111-2222-3333-4444-555555555555')
            as $item) {
                print_r($item->toArray());
            }
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            didit.sessions.list_aml_screening_history("11111111-2222-3333-4444-555555555555").auto_paging_each
            do |item|
              puts item.to_h
            end
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            await foreach (var item in await
            client.Sessions.ListAmlScreeningHistoryAsync("11111111-2222-3333-4444-555555555555"))

            {
                Console.WriteLine(JsonSerializer.Serialize(item));
            }
components:
  schemas:
    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`。
    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'
    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: 报告了更新日期的此类数据集数量。
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

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