> ## 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 스크리닝 기록 CSV 내보내기 API

> Didit에서 세션의 지속적인 AML 모니터링 기록을 CSV 파일로 다운로드합니다. 완료된 재스크리닝마다 한 줄씩 기록되어 감사인에게 바로 전달할 수 있습니다.

AML 스크리닝 기록 내보내기 API 프롬프트
프롬프트를 클립보드에 복사

<pre>
  \`Download the ongoing AML monitoring history of one Didit verification session as a CSV file through the API.

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

  Authentication:
  Send my Didit API key in the x-api-key header. A scoped key needs decisions: read and media: read (the response is a file; without media: read the call returns 403).

  Goal:

  * Produce the audit evidence that ongoing AML monitoring ran for a subject, as a file a compliance team can hand to 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.

  Behavior:

  * Works for user (KYC) and business (KYB) session IDs.
  * Streams text/csv with Content-Disposition: attachment; filename="aml-screening-history-SESSION\_ID.csv". Not paginated: the file holds the whole history, newest first.
  * The first line is the header. Each following line is one completed re-screen.
  * Columns: 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.
  * Empty cell = unknown. Dataset dates are never estimated.
  * provider is an identifier of the data source; treat it as an opaque string.
  * Values that would start a spreadsheet formula (=, +, -, @) are prefixed with an apostrophe.
  * Errors come back as JSON, not CSV.

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

  Failure modes:

  * 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 media: 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>

붙여넣을 곳

이 파일에는 [AML 스크리닝 기록 조회](https://docs.didit.me/ko/management-api/sessions/aml-screening-history.md)에 나오는 것과 같은 스크리닝이 들어 있으며, 각 스크리닝이 한 줄로 펼쳐져 있습니다. 보고된 경우 각 목록군(제재, PEP, 경고, 부정적 언론 보도)의 데이터셋 업데이트 날짜도 함께 포함됩니다. Business Console에서도 AML 결과 옆에서 같은 내보내기를 제공합니다. 각 값의 의미는 [지속적인 AML 모니터링](https://docs.didit.me/ko/core-technology/aml-screening/continuous-monitoring-aml-screening.md)을 참고하세요.


## OpenAPI

````yaml ko/openapi-25.json GET /v3/session/{sessionId}/aml-screening-history/export/
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/export/:
    get:
      tags:
        - Sessions
      summary: AML 스크리닝 내역을 CSV로 내보내기
      description: >-
        `GET /v3/session/{sessionId}/aml-screening-history/`와 동일한 지속적인 모니터링 이력을
        CSV 파일로 다운로드합니다. 완료된 재스크리닝당 한 줄씩 최신순으로 정렬되어 감사자에게 즉시 제출할 수 있습니다. 파일은
        페이지네이션 없이 전체가 스트리밍되며 헤더 줄로 시작합니다. 빈 셀은 알 수 없음을 의미하고, 데이터 세트 날짜는 추정되지
        않으며, 스프레드시트 수식을 시작할 수 있는 값 앞에는 아포스트로피가 붙습니다. KYC 및 KYB 세션 ID에 모두 작동합니다.
        세션에서 둘 이상의 AML 단계를 실행한 경우 `node_id`를 전달하세요. 1개 역월을 내보내려면 `month`를 전달하세요.
        오류는 CSV가 아닌 JSON으로 반환됩니다. 범위가 지정된 API 키에는 `decisions: read` 및 `media:
        read`가 필요합니다. 응답이 파일이므로 `media: read`가 없는 키는 `403`을 받습니다.
      operationId: get_v3_session_aml_screening_history_export
      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
      responses:
        '200':
          description: >-
            CRLF 줄 바꿈과 함께 `text/csv`로 스트리밍되는 CSV 파일입니다. 컬럼 순서:
            `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`(모니터링 실행 ID),
            `entities_screened`(실행 실패 시 `0`, 정상 실행 시 `1`), `new_hits`(알 수 없는 경우
            비어 있음). 날짜는 UTC 오프셋이 포함된 ISO 8601 형식입니다. 재스크리닝 이력이 없는 세션은 헤더 행만
            반환합니다.
          headers:
            Content-Disposition:
              description: >-
                `attachment; filename="aml-screening-history-{sessionId}.csv"`,
                또는 `month`가 전달된 경우
                `aml-screening-history-{sessionId}-{month}.csv`입니다.
              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: >-
            세션이 존재하지 않거나, 삭제되었거나, 범위가 지정된 키의 제한 범위를 벗어났거나, (해당 `node_id`에 대한)
            AML 검사가 없습니다. 세션 조회가 자격 증명 확인보다 먼저 실행되므로, 유효한 키가 없더라도 알 수 없는
            `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/export/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -o aml-screening-history.csv
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            content = client.sessions.export_aml_screening_history(
                "11111111-2222-3333-4444-555555555555",
            )
            with open("download.csv", "wb") as file:
                file.write(content)
        - lang: javascript
          label: Node.js
          source: >-
            import { writeFile } from "node:fs/promises";

            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const content = await
            didit.sessions.exportAmlScreeningHistory("11111111-2222-3333-4444-555555555555");

            await 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;

            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            client.sessions().exportAmlScreeningHistory("11111111-2222-3333-4444-555555555555")
                    .writeTo(Path.of("download.csv"));
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $content =
            $didit->sessions->exportAmlScreeningHistory('11111111-2222-3333-4444-555555555555');

            $content->saveTo('download.csv');
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            content =
            didit.sessions.export_aml_screening_history("11111111-2222-3333-4444-555555555555")

            File.binwrite("download.csv", content)
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var content = await
            client.Sessions.ExportAmlScreeningHistoryAsync("11111111-2222-3333-4444-555555555555");

            await content.SaveToAsync("download.csv");
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Business Console의 Developers -> API keys에서 발급받은 귀하 애플리케이션의 API 키입니다. 기본
        키는 전체 접근 권한을 갖습니다. 이름이 지정된 키는 리소스별 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.