> For the complete documentation index, see [llms.txt](https://docs.compliance.phalcon.blocksec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.compliance.phalcon.blocksec.com/zh-hant/api-documentation/customer/get-a-customer-detail.md).

# 取得客戶詳細資料

## 获取客户风险画像

> 获取客户级风险概览、关联实体与告警信息。

```json
{"openapi":"3.0.0","info":{"title":"Compliance API","version":"2.0.0"},"tags":[{"name":"客户","description":"客户画像与关联管理 API。"}],"servers":[{"url":"https://api.blocksec.com/phalcon/compliance/v2","description":"生产环境服务器"}],"security":[{"API-Key":[]}],"components":{"securitySchemes":{"API-Key":{"type":"apiKey","in":"header","name":"API-Key"}},"schemas":{"CustomerResult":{"type":"object","properties":{"customerId":{"type":"string","description":"客户唯一标识。"},"riskLevel":{"type":"integer","description":"客户风险等级。"},"riskLevelDescription":{"type":"string","description":"风险等级说明。"},"addressCount":{"type":"integer","description":"与该客户关联的地址数量。"},"totalBalance":{"type":"string","description":"客户地址总余额。"},"transactionCount":{"type":"integer","description":"该客户当前关联的交易总数（累计值）。"},"totalDeposit":{"type":"string","description":"客户交易总入金。"},"totalWithdrawal":{"type":"string","description":"客户交易总出金。"},"addresses":{"type":"array","description":"与该客户关联的地址列表。","items":{"$ref":"#/components/schemas/CustomerAddress"}},"transactions":{"type":"array","description":"与该客户关联的交易列表。","items":{"$ref":"#/components/schemas/CustomerTransaction"}},"alerts":{"type":"array","description":"与该客户关联的告警列表。","items":{"$ref":"#/components/schemas/AlertData"}}}},"CustomerAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"地址唯一标识。"},"address":{"type":"string","description":"地址。"},"chainId":{"type":"string","description":"链 ID。关于所有支持的链及对应 chain ID，请查看：[https://docs.compliance.phalcon.blocksec.com/api-documentation/introduction/supported-chains](https://docs.compliance.phalcon.blocksec.com/api-documentation/introduction/supported-chains)。"},"riskLevel":{"type":"integer","description":"地址风险等级。"},"riskLevelDescription":{"type":"string","description":"风险等级说明。"}}},"CustomerTransaction":{"type":"object","properties":{"transactionId":{"type":"string","description":"交易唯一标识。"},"txHash":{"type":"string","description":"交易哈希。"},"chainId":{"type":"string","description":"链 ID。关于所有支持的链及对应 chain ID，请查看：[https://docs.compliance.phalcon.blocksec.com/api-documentation/introduction/supported-chains](https://docs.compliance.phalcon.blocksec.com/api-documentation/introduction/supported-chains)。"},"value":{"type":"string","description":"交易金额。"},"riskLevel":{"type":"integer","description":"交易风险等级。"},"riskLevelDescription":{"type":"string","description":"风险等级说明。"},"direction":{"type":"integer","description":"交易方向。"},"transfers":{"type":"array","description":"与该交易关联的转账列表。","items":{"$ref":"#/components/schemas/CustomerTransactionTransfer"}}}},"CustomerTransactionTransfer":{"type":"object","properties":{"txHash":{"type":"string","description":"交易哈希。"},"chainId":{"type":"string","description":"链 ID。关于所有支持的链及对应 chain ID，请查看：[https://docs.compliance.phalcon.blocksec.com/api-documentation/introduction/supported-chains](https://docs.compliance.phalcon.blocksec.com/api-documentation/introduction/supported-chains)。"},"riskLevel":{"type":"integer","description":"该转账的风险等级。"},"riskLevelDescription":{"type":"string","description":"风险等级说明。"},"value":{"type":"string","description":"该转账的价值。"},"direction":{"type":"integer","description":"该转账的方向。"}}},"AlertData":{"type":"object","properties":{"alertId":{"type":"string","description":"告警唯一标识。"},"description":{"type":"string","description":"告警描述。"},"firstTriggeredAt":{"type":"integer","format":"int64","description":"告警首次触发时间，秒级 UNIX 时间戳。"},"lastUpdatedAt":{"type":"integer","format":"int64","description":"告警最后更新时间，秒级 UNIX 时间戳。"},"riskActivityTime":{"type":"integer","format":"int64","description":"告警关联的最新风险活动时间，秒级 UNIX 时间戳。"},"riskEngineId":{"type":"string","description":"生成该告警的 Risk Engine 唯一标识。"},"riskEngineName":{"type":"string","description":"生成该告警的 Risk Engine 名称。"},"riskLevel":{"type":"integer","description":"告警的风险等级。取值：1 = critical（严重），2 = high（高），3 = medium（中），4 = low（低），5 = info（提示），6 = noRisk（无风险）。数字越小，风险越高。6 表示筛查完成且未触发任何告警。","enum":[1,2,3,4,5,6]},"riskLevelDescription":{"type":"string","description":"风险等级说明。"},"status":{"type":"integer","description":"告警状态。"},"statusDescription":{"type":"string","description":"告警状态说明。"},"riskEngineType":{"type":"integer","description":"生成该告警的 Risk Engine 类型。取值：1 = Address Entity Risk（地址实体风险），2 = Address Interaction Risk（地址交互风险），3 = Address Large Transfer（地址大额转账），4 = Address High Frequency（地址高频交易），5 = Transit Address（中转地址），6 = Address Blacklist Interaction（地址黑名单交互），7 = Transaction Participant Risk（交易参与方风险），8 = Transaction Interaction Risk（交易交互风险），9 = Transaction Large Transfer（交易大额转账），10 = Transaction Rapid Transit（交易快速中转），11 = Transaction Blacklist Interaction（交易黑名单交互）。","enum":[1,2,3,4,5,6,7,8,9,10,11]},"riskDetail":{"type":"array","description":"告警详细信息。","items":{"oneOf":[{"$ref":"#/components/schemas/EntityRiskData"},{"$ref":"#/components/schemas/InteractionRiskData"},{"$ref":"#/components/schemas/LargeTransferData"},{"$ref":"#/components/schemas/HighFrequencyData"},{"$ref":"#/components/schemas/TransitAddressData"},{"$ref":"#/components/schemas/BlacklistInteractionData"},{"$ref":"#/components/schemas/ParticipantRiskData"},{"$ref":"#/components/schemas/RapidTransitData"}]}}}},"EntityRiskData":{"type":"object","properties":{"riskIndicator":{"type":"integer","description":"告警的风险指标。取值：1 = Sanctioned（制裁），2 = Attack（攻击），3 = Scam（诈骗），4 = Ransomware（勒索软件），5 = Child Abuse Material（儿童性虐待内容），6 = Laundering（洗钱），7 = Mixing（混币），8 = Dark Market（暗网市场），9 = Darkweb Business（暗网业务），10 = Blocked（封禁），11 = Gambling（赌博），12 = No KYC Exchange（无 KYC 交易所），13 = Terrorist Financing（恐怖融资），14 = FATF Grey List Jurisdiction（FATF 灰名单司法管辖区），15 = FATF High Risk Jurisdiction（FATF 高风险司法管辖区），16 = Human Trafficking（人口贩运），17 = Drug Trafficking（毒品贩运）。","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},"riskIndicatorDescription":{"type":"string","description":"风险指标说明。"},"detail":{"type":"array","description":"补充信息。","items":{"type":"string"}}}},"InteractionRiskData":{"type":"object","properties":{"riskIndicator":{"type":"integer","description":"告警的风险指标。取值：1 = Sanctioned（制裁），2 = Attack（攻击），3 = Scam（诈骗），4 = Ransomware（勒索软件），5 = Child Abuse Material（儿童性虐待内容），6 = Laundering（洗钱），7 = Mixing（混币），8 = Dark Market（暗网市场），9 = Darkweb Business（暗网业务），10 = Blocked（封禁），11 = Gambling（赌博），12 = No KYC Exchange（无 KYC 交易所），13 = Terrorist Financing（恐怖融资），14 = FATF Grey List Jurisdiction（FATF 灰名单司法管辖区），15 = FATF High Risk Jurisdiction（FATF 高风险司法管辖区），16 = Human Trafficking（人口贩运），17 = Drug Trafficking（毒品贩运）。","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},"riskIndicatorDescription":{"type":"string","description":"风险指标说明。"},"direction":{"type":"integer","description":"交互方向。取值：1 = Incoming（流入），2 = Outgoing（流出）。","enum":[1,2]},"hop":{"type":"integer","description":"交互跳数。"},"exposureValue":{"type":"string","description":"交互的风险敞口值。"},"exposurePercent":{"type":"string","description":"交互的风险敞口比例（0 到 1 的小数，1 表示 100%）。"},"contributions":{"type":"array","description":"交互的贡献来源。","items":{"type":"object","properties":{"detail":{"type":"string","description":"贡献来源详情。"},"address":{"type":"string","description":"贡献来源地址。"},"label":{"type":"string","description":"地址标签（如有）。"},"hop":{"type":"integer","description":"贡献来源跳数。"},"exposureValue":{"type":"string","description":"贡献来源的风险敞口值。"},"exposurePercent":{"type":"number","description":"贡献来源的风险敞口比例（0 到 1 的小数，1 表示 100%）。"},"chainId":{"description":"贡献来源地址的链 ID。"}}}}}},"LargeTransferData":{"type":"object","properties":{"transaction":{"type":"string","description":"交易哈希。"},"usdValue":{"type":"string","description":"该转账的美元价值。"},"direction":{"type":"integer","description":"该转账的方向。取值：1 = Incoming（流入），2 = Outgoing（流出）。","enum":[1,2]},"timestamp":{"type":"integer","format":"int64","description":"该转账的时间，UNIX 时间戳，单位为秒。"},"token":{"type":"string","description":"代币地址。"},"tokenSymbol":{"type":"string","description":"代币符号。"},"tokenAmount":{"type":"string","description":"转移的代币数量。"}}},"HighFrequencyData":{"type":"object","properties":{"transactionCount":{"type":"integer","description":"高频交易序列中的交易数量。"},"duration":{"type":"integer","description":"高频交易序列的持续时间。"},"transactionList":{"type":"array","description":"高频交易序列中的交易列表。","items":{"$ref":"#/components/schemas/TransactionItem"}}}},"TransactionItem":{"$ref":"#/components/schemas/LargeTransferData"},"TransitAddressData":{"type":"object","properties":{"inTransaction":{"type":"string","description":"交易哈希。"},"inTimestamp":{"type":"string","description":"流入交易的时间，UNIX 时间戳，单位为秒。"},"inUsdValue":{"type":"string","description":"交易对应的 USD 金额。"},"outTransaction":{"type":"string","description":"交易哈希。"},"outTimestamp":{"type":"string","description":"流出交易的时间，UNIX 时间戳，单位为秒。"},"outUsdValue":{"type":"string","description":"交易对应的 USD 金额。"},"transitPercent":{"type":"string","description":"该交易的过路占比。"}}},"BlacklistInteractionData":{"type":"object","properties":{"transaction":{"type":"string","description":"交易哈希。"},"usdValue":{"type":"string","description":"交易对应的 USD 金额。"},"timestamp":{"type":"string","description":"该交易的时间，UNIX 时间戳，单位为秒。"},"direction":{"type":"integer","description":"交易方向。取值：1 = Incoming（流入），2 = Outgoing（流出）。","enum":[1,2]},"fromAddress":{"type":"string","description":"发送方地址。"},"toAddress":{"type":"string","description":"接收方地址。"},"token":{"type":"string","description":"代币地址。"},"tokenSymbol":{"type":"string","description":"代币符号。"},"tokenAmount":{"type":"string","description":"转账代币数量。"}}},"ParticipantRiskData":{"type":"object","properties":{"address":{"type":"string","description":"参与方地址。"},"riskIndicator":{"type":"integer","description":"参与方风险指标。"},"riskIndicatorDescription":{"type":"string","description":"风险指标说明。"},"detail":{"type":"array","description":"补充信息。","items":{"type":"string"}}}},"RapidTransitData":{"type":"object","properties":{"proceedTransaction":{"type":"object","description":"交易数据。","$ref":"#/components/schemas/LargeTransferData"},"screenedTransaction":{"type":"object","description":"交易数据。","$ref":"#/components/schemas/LargeTransferData"}}}}},"paths":{"/customers/details/{customer_id}":{"get":{"tags":["客户"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"},"description":"你系统中的客户 ID。"}],"responses":{"200":{"description":"响应。即使 HTTP 状态码为 200，`code` 非 0 也表示业务错误。","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"$ref":"#/components/schemas/CustomerResult"}}}}}},"401":{"description":"鉴权失败。`API-Key` 请求头缺失或无效。"},"429":{"description":"超出调用频率限制。请降低请求频率后重试。"}},"description":"获取客户级风险概览、关联实体与告警信息。","summary":"获取客户风险画像"}}}}
```
