> ## 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.

# 获取欺诈检测结果

> 在 Didit 中检索您应用内某次欺诈检测（Fraud Check）已存储的结果。该检测须属于您的应用，接口仅返回这一已存储的结果。

使用同一应用的凭证检索已完成的检查。
响应是已存储的执行结果；检索不会重新运行检查，也不会产生额外费用。
当前的共享访问权限适用于全球网络证据：撤销访问权限后，共享聚合数据及其派生的风险证据将被隐藏。
历史建议会被保留。
未知、未完成或已删除的检查返回 `404`。
属于其他应用的检查同样返回 `404`。


## OpenAPI

````yaml zh/openapi-25.json GET /v3/fraud/checks/{check_id}/
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/fraud/checks/{check_id}/:
    get:
      tags:
        - Fraud Check
      summary: 获取欺诈检查
      description: 通过 `check_id` 获取先前创建的检查。
      operationId: root_retrieve
      parameters:
        - in: path
          name: check_id
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FraudCheckResponse'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FraudClientCredentialsErrorMessage'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FraudClientCredentialsForbiddenErrorMessage
          description: ''
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.fraud_checks.retrieve(
                "11111111-2222-3333-4444-555555555555",
            )
            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.fraudChecks.retrieve("11111111-2222-3333-4444-555555555555");

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FraudChecks.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.fraudChecks().retrieve("11111111-2222-3333-4444-555555555555");

            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->fraudChecks->retrieve('11111111-2222-3333-4444-555555555555');

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


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result =
            didit.fraud_checks.retrieve("11111111-2222-3333-4444-555555555555")

            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.FraudChecks.RetrieveAsync("11111111-2222-3333-4444-555555555555");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    FraudCheckResponse:
      type: object
      properties:
        check_id:
          type: string
          format: uuid
        request_id:
          type: string
          format: uuid
          description: 为此检查创建的原生验证会话。
        client_reference:
          type: string
          nullable: true
        processing_status:
          $ref: '#/components/schemas/FraudProcessingStatusEnum'
        profile_id:
          type: string
        profile_version:
          type: string
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/FraudCheckInput'
        modules:
          type: array
          items:
            $ref: '#/components/schemas/FraudCheckModuleReport'
        attribute_evidence:
          type: array
          items:
            type: object
            additionalProperties: {}
        compound_evidence:
          type: array
          items:
            type: object
            additionalProperties: {}
        risk:
          type: array
          items:
            $ref: '#/components/schemas/FraudCheckRisk'
        network:
          type: object
          additionalProperties: {}
        enrichment:
          type: object
          additionalProperties: {}
        identity_relationship:
          allOf:
            - $ref: '#/components/schemas/FraudCheckIdentityRelationship'
          nullable: true
        recommendation:
          $ref: '#/components/schemas/FraudRecommendationEnum'
        next_action:
          $ref: '#/components/schemas/FraudNextActionEnum'
        decision_reasons:
          type: array
          items:
            type: string
        coverage:
          type: object
          additionalProperties: {}
        usage:
          type: array
          items:
            type: object
            additionalProperties: {}
        vendor_data:
          type: string
          nullable: true
        metadata:
          nullable: true
      required:
        - attribute_evidence
        - check_id
        - client_reference
        - completed_at
        - compound_evidence
        - coverage
        - created_at
        - decision_reasons
        - inputs
        - modules
        - network
        - next_action
        - processing_status
        - profile_id
        - profile_version
        - recommendation
        - risk
        - usage
    FraudClientCredentialsErrorMessage:
      type: object
      properties:
        detail:
          type: string
          default: 'Authentication failed: Invalid client access token.'
    FraudClientCredentialsForbiddenErrorMessage:
      type: object
      properties:
        detail:
          type: string
          default: Forbidden - User doesn't have permission
    FraudProcessingStatusEnum:
      enum:
        - pending
        - running
        - completed
        - failed
      type: string
      description: |-
        * `pending` - 等待中
        * `running` - 运行中
        * `completed` - 已完成
        * `failed` - 失败
    FraudCheckInput:
      type: object
      properties:
        reference:
          type: string
          description: 所提交标识符的脱敏句柄。
        type:
          $ref: '#/components/schemas/FraudTypeEnum'
        namespace:
          type: object
          additionalProperties: {}
        quality:
          type: string
        normalization:
          type: object
          additionalProperties: {}
        availability:
          $ref: '#/components/schemas/FraudAvailabilityEnum'
      required:
        - availability
        - namespace
        - normalization
        - quality
        - reference
        - type
    FraudCheckModuleReport:
      type: object
      properties:
        module:
          $ref: '#/components/schemas/FraudExcludeEnum'
        status:
          $ref: '#/components/schemas/FraudStatusEnum'
        reason:
          type: string
          nullable: true
        latency_ms:
          type: integer
        freshness:
          type: string
          nullable: true
        billable_units:
          type: integer
      required:
        - billable_units
        - freshness
        - latency_ms
        - module
        - reason
        - status
    FraudCheckRisk:
      type: object
      properties:
        dimension:
          $ref: '#/components/schemas/FraudDimensionEnum'
        score:
          type: integer
          nullable: true
        band:
          $ref: '#/components/schemas/FraudBandEnum'
        availability:
          $ref: '#/components/schemas/FraudAvailabilityEnum'
        requested_but_unavailable:
          type: boolean
          description: 当请求提供了该维度所需的一切信息，但平台仍无法给出结果时为 true。仅凭已有结果的维度，此类核验绝不建议予以批准。
        reason_codes:
          type: array
          items:
            type: string
        evidence_indexes:
          type: array
          items:
            type: integer
      required:
        - availability
        - band
        - dimension
        - evidence_indexes
        - reason_codes
        - requested_but_unavailable
        - score
    FraudCheckIdentityRelationship:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/FraudResultEnum'
        reference_type:
          type: string
        country:
          type: string
        availability:
          $ref: '#/components/schemas/FraudAvailabilityEnum'
        reason_codes:
          type: array
          items:
            type: string
      required:
        - availability
        - country
        - reason_codes
        - reference_type
        - result
    FraudRecommendationEnum:
      enum:
        - approve
        - review
        - reject
      type: string
      description: |-
        * `approve` - 通过
        * `review` - 审核
        * `reject` - 拒绝
    FraudNextActionEnum:
      enum:
        - none
        - manual_review
        - step_up
        - resubmit_capture
      type: string
      description: |-
        * `none` - 无
        * `manual_review` - 人工审核
        * `step_up` - 强化验证
        * `resubmit_capture` - 重新提交采集
    FraudTypeEnum:
      enum:
        - email
        - phone
        - national_id
        - tax_number
        - passport_number
        - driving_licence_number
        - residence_permit_number
        - voter_id
        - external_id
      type: string
      description: |-
        * `email` - 邮箱
        * `phone` - 电话
        * `national_id` - 国民身份证号
        * `tax_number` - 税号
        * `passport_number` - 护照号码
        * `driving_licence_number` - 驾驶证号
        * `residence_permit_number` - 居留许可号码
        * `voter_id` - 选民证号
        * `external_id` - 外部 ID
    FraudAvailabilityEnum:
      enum:
        - available
        - not_requested
        - no_reference
        - insufficient_history
        - unsupported_region
        - source_unavailable
      type: string
      description: |-
        * `available` - 可用
        * `not_requested` - 未请求
        * `no_reference` - 无参考数据
        * `insufficient_history` - 历史记录不足
        * `unsupported_region` - 不受支持的地区
        * `source_unavailable` - 数据源不可用
    FraudExcludeEnum:
      enum:
        - normalization
        - email_risk
        - email_social
        - phone_social
        - phone_risk
        - ip_risk
        - database_validation
        - networks_same_org
        - networks_cross_org
        - biometric_identity
      type: string
      description: |-
        * `normalization` - 标准化
        * `email_risk` - 邮箱风险
        * `email_social` - 邮箱社交账号
        * `phone_social` - 电话社交账号
        * `phone_risk` - 电话风险
        * `ip_risk` - IP 风险
        * `database_validation` - 数据库核验
        * `networks_same_org` - 同组织网络
        * `networks_cross_org` - 跨组织网络
        * `biometric_identity` - 生物识别身份
    FraudStatusEnum:
      enum:
        - planned
        - completed
        - skipped
        - failed
      type: string
      description: |-
        * `planned` - 已计划
        * `completed` - 已完成
        * `skipped` - 已跳过
        * `failed` - 已失败
    FraudDimensionEnum:
      enum:
        - identity
        - contact
        - device_network
        - behavioral
        - fraud_network
      type: string
      description: |-
        * `identity` - 身份
        * `contact` - 联系方式
        * `device_network` - 设备网络
        * `behavioral` - 行为
        * `fraud_network` - 欺诈网络
    FraudBandEnum:
      enum:
        - low
        - medium
        - high
        - unknown
      type: string
      description: |-
        * `low` - 低
        * `medium` - 中
        * `high` - 高
        * `unknown` - 未知
    FraudResultEnum:
      enum:
        - match
        - mismatch
        - inconclusive
        - no_reference
      type: string
      description: |-
        * `match` - 匹配
        * `mismatch` - 不匹配
        * `inconclusive` - 无明确结论
        * `no_reference` - 无参考数据
  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。
    BearerAuth:
      type: http
      scheme: bearer
      description: 该应用的客户端凭证访问 token。

````

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