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

# 位置验证报告：geolocation_checks 字段解析

> Didit位置验证报告字段详解：解析会话决策中的 geolocation_checks 与 geolocation_attempts，涵盖位置、精度、区域、距离、匿名器、同意与警告。

## 概览

会话决策通过两个列表返回每个定位验证步骤的结果：`geolocation_checks[]` 包含每个步骤已接受的尝试，`geolocation_attempts[]` 按顺序列出每一次尝试。
两者都在 `GET /v3/session/{sessionId}/decision/` 中返回（参见 [获取会话](https://docs.didit.me/zh/sessions-api/retrieve-session.md)），也会在 `status.updated` Webhook 中返回。
如果工作流中没有定位步骤，两者都返回 `null` 或空列表。

```text theme={null}
GET /v3/session/{sessionId}/decision/
  --> { "geolocation_checks": [ { node_id, status, outcome, permission, latitude, longitude, accuracy_m, ... } ],
        "geolocation_attempts": [ { node_id, outcome, attempts, received_at, ... } ] }
```

## `geolocation_checks[]`

每个定位步骤（`node_id`）返回一项，取自该步骤最新的一次尝试。

```json theme={null}
{
  "node_id": "geolocation_1",
  "status": "Declined",
  "outcome": "outside_geofence",
  "permission": "granted_precise",
  "latitude": 48.8566,
  "longitude": 2.3522,
  "accuracy_m": 35.0,
  "accuracy_confidence": "p95",
  "measured_at": "2026-11-03T10:15:02Z",
  "age_seconds": 2,
  "source": "browser",
  "platform": "web",
  "sdk_version": null,
  "is_mock": null,
  "produced_by_accessory": null,
  "integrity": "unsupported",
  "country_code": "FR",
  "region_code": "FR-IDF",
  "city": "Paris",
  "geofence": { "enabled": true, "result": "outside" },
  "inside_geofence": false,
  "geofence_basis": "device",
  "inside_areas": [],
  "blocked_areas": [],
  "position_source": "device_and_ip",
  "anonymizers": { "vpn": false, "proxy": false, "tor": false, "spoofing": null, "emulator": null },
  "ip_distance_km": 0,
  "ip_distance_uncertainty_km": 12.4,
  "ip_consistent": true,
  "document_distance_km": null,
  "travel_excused": null,
  "consecutive_mismatches": 1,
  "attempts": 3,
  "consent": { "accepted_at": "2026-11-03T10:14:55Z", "version": "hosted-web-1", "locale": "en" },
  "warnings": [
    {
      "risk": "LOCATION_OUTSIDE_GEOFENCE",
      "log_type": "error",
      "short_description": "Device location outside the allowed area",
      "node_id": "geolocation_1"
    }
  ]
}
```

| 字段 | 类型 | 说明 |
| - | - | - |
| `node_id` | 字符串 | 产生该结果的工作流节点，使包含两个定位步骤的工作流仍然易于阅读。 |
| `status` | 字符串 | `Approved`、`In Review`、`Declined` 或 `Not Finished`，根据警告确定。 |
| `outcome` | 字符串 | 已接受尝试的结果。参见[结果](https://docs.didit.me/zh/core-technology/location-verification/overview.md#结果)。 |
| `permission` | 字符串 | 系统授予的权限：`granted_precise`、`granted_approximate`、`denied`、`restricted`、`unavailable`、`timeout`、`dismissed`，或 `not_requested`（仅 IP 定位步骤）。 |
| `latitude`、`longitude` | 数字或 null | WGS84 坐标。没有位置时为 `null`。 |
| `accuracy_m` | 数字或 null | 不确定半径，单位为米。 |
| `accuracy_confidence` | 字符串或 null | 半径的置信水平：`p95`（网页）、`p68`（Android）或 `unspecified`（iOS）。各平台存在差异，因此原样记录，不做标准化。 |
| `measured_at` | 日期时间或 null | 设备测量位置的时间，以设备时钟为准。 |
| `age_seconds` | 整数或 null | 测量时间与 Didit 收到该测量值的时刻之间的间隔。 |
| `source` | 字符串或 null | `gps`、`fused`、`network`、`wifi`、`cell`、`browser`、`unknown`，或仅 IP 定位步骤中的 `ip`。 |
| `platform` | 字符串或 null | `web`、`ios`、`android`、`react_native` 或 `flutter`。 |
| `sdk_version` | 字符串或 null | 生成该位置的 SDK 版本。 |
| `is_mock` | 布尔值或 null | 系统报告该位置为模拟位置。`null` 表示平台无法判断（网页），而不是 `false`。 |
| `produced_by_accessory` | 布尔值或 null | 仅 iOS：该位置来自外部配件。 |
| `integrity` | 字符串 | 设备证明：`attested`、`not_attested`、`failed`、`unsupported`（网页）或 `not_determined`。 |
| `country_code`、`region_code`、`city` | 字符串或 null | 该位置对应的地点，离线计算得出：ISO 3166-1 alpha-2、ISO 3166-2 以及最近的人口聚居地。城市仅作为审核人员参考的标签，绝不作为规则输入。 |
| `geofence` | 对象 | `enabled`，以及 `result`：`inside`、`outside` 或 `undetermined`。地理围栏关闭时，`result` 为 `null`。 |
| `inside_geofence` | 布尔值或 null | `true` 或 `false`。地理围栏关闭，或精度圆跨越边界时，为 `null`。 |
| `geofence_basis` | 字符串或 null | 区域判定所依据的位置：`device` 或 `ip`。 |
| `inside_areas`、`blocked_areas` | 数组 | 整个精度圆都位于其中的允许区域，以及精度圆位于其中的被阻止区域的 `id`。 |
| `position_source` | 字符串或 null | 尝试运行时该节点的 `geolocation_position_source`。 |
| `anonymizers` | 对象或 null | `vpn`、`proxy`、`tor`、`spoofing` 和 `emulator`，每项为 `true`、`false`，或在来源无法判断时为 `null`。 |
| `ip_distance_km` | 数字或 null | 扣除两个不确定半径后，与 IP 位置之间的距离。0 表示两者重叠。 |
| `ip_distance_uncertainty_km` | 数字或 null | 扣除时使用的合并半径。 |
| `ip_consistent` | 布尔值或 null | `ip_distance_km` 是否在 `geolocation_ip_distance_km` 之内。任一方未知时为 `null`。 |
| `document_distance_km` | 数字或 null | 与证件地址地理编码结果之间的距离。没有登记地址时为 `null`。 |
| `travel_excused` | 布尔值或 null | 旅行容差豁免了该距离。容差关闭时为 `null`。 |
| `consecutive_mismatches` | 整数或 null | 在最终尝试中，为本次检查加上同一人此前连续的不匹配次数。 |
| `attempts` | 整数 | 该尝试的序号。 |
| `consent` | 对象或 null | 用户接受的定位通知中的 `accepted_at`、`version` 和 `locale`。 |
| `warnings` | 数组 | 该步骤的[警告](https://docs.didit.me/zh/core-technology/location-verification/warnings-location-verification.md)。 |

## `geolocation_attempts[]`

每个定位步骤的每一次尝试，按从旧到新的顺序排列，包含与 `geolocation_checks[]` 相同的测量、不确定性、区域和距离字段，但不包含 `warnings`，并额外包含：

| 字段 | 类型 | 说明 |
| - | - | - |
| `received_at` | 日期时间 | Didit 收到该次尝试的时间。 |
| `created_at` | 日期时间 | 该次尝试被记录的时间。 |

被重新提交取代的尝试不会包含在内。
原始客户端提交内容和挑战信息永远不会返回。

## 状态规则与分支的字段

自定义 `status_rules` 和分支规则可以读取以下字段：
`geolocation.status`、`geolocation.outcome`、`geolocation.permission`、`geolocation.latitude`、`geolocation.longitude`、`geolocation.accuracy_m`、`geolocation.accuracy_confidence`、`geolocation.age_seconds`、`geolocation.measured_at`、`geolocation.source`、`geolocation.platform`、`geolocation.country`（ISO 3166-1 alpha-3）、`geolocation.region`、`geolocation.city`、`geolocation.is_mock`、`geolocation.integrity`、`geolocation.inside_geofence`、`geolocation.ip_distance_km`、`geolocation.ip_consistent`、`geolocation.document_distance_km`、`geolocation.attempts`、`geolocation.consent_at`、`geolocation.inside_areas`、`geolocation.blocked_areas`、`geolocation.anonymizers`（`vpn`、`proxy`、`tor`、`spoofing`、`emulator`）和 `geolocation.consecutive_mismatches`。
缺失值只会匹配 `is_empty`，因此为欺诈信号编写的规则绝不会在缺失数据上触发。

## 相关内容

* [位置验证](https://docs.didit.me/zh/core-technology/location-verification/overview.md) - 该步骤的工作方式及费用。
* [位置验证警告](https://docs.didit.me/zh/core-technology/location-verification/warnings-location-verification.md) - 每个 `LOCATION_*` 代码。
* [Webhook](https://docs.didit.me/zh/integration/webhooks.md) - `status.updated` 携带这些列表。
* [数据模型 - 警告对象](https://docs.didit.me/zh/reference/data-models.md#警告对象) - `warnings[]` 中每个条目的结构。


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