get
https://sandboxapi.legendtrading.com/v2/app/kyc/entity/qa
该接口用于获取企业KYB流程中的尽职调查问卷。通过提交用户ID,返回动态生成的问卷表单数据,包括行业分类、经营信息、交易预估、合规问题等多个维度的调查项。前端可根据返回的表单结构动态渲染问卷页面,收集企业的详细信息。
参数说明:
| 参数名 | 类型 | 说明 |
|---|---|---|
| uid | string | 用户ID,用于标识当前填写问卷的企业用户 |
响应示例
{
"request_id": "cb74dff351a8cb01ad111de08b82e6f4",
"status": "success",
"code": "100000",
"message": "success",
"data": [
[
{
"title": "Industry",
"type": "dropdown",
"name": "industry",
"tip": "",
"values": null,
"default_value": [],
"nested_form": []
},
{
"title": "Countries of Operation",
"type": "dropdown",
"name": "countries",
"tip": "",
"values": null,
"default_value": [],
"nested_form": []
},
{
"title": "Nature of Business",
"type": "textarea",
"name": "nature",
"tip": "",
"values": null,
"default_value": [],
"nested_form": []
},
{
"title": "Latest Annual Revenue Currency",
"type": "dropdown",
"name": "currency",
"tip": "",
"values": null,
"default_value": [
"USD"
],
"nested_form": []
},
{
"title": "Latest Annual Revenue",
"type": "dropdown",
"name": "annual_revenue",
"tip": "",
"values": null,
"default_value": [],
"nested_form": []
}
],
[
{
"title": "Purpose of account",
"type": "checkbox",
"name": "purpose",
"tip": "",
"values": null,
"default_value": [],
"nested_form": []
}
],
[
{
"title": "Transaction Estimates",
"type": "multi_dropdown",
"name": "transaction_estimates",
"tip": "",
"values": null,
"default_value": [
"{\"currency\":\"USD\"}"
],
"nested_form": []
}
],
[
{
"title": "Any dealing in sanctioned countries?",
"type": "dropdown",
"name": "any_dealing",
"tip": "Has your entity conducted business in, spent considerable time in, or had substantial contact with countries sanctioned by the US, EU or any international bodies? Sanctioned countries include North Korea, Iran, Cuba, Russia and Syria.",
"values": null,
"default_value": [
"no"
],
"nested_form": []
}
]
],
"metadata": {}
}返回参数说明
响应结构
| 字段名 | 类型 | 说明 |
|---|---|---|
| request_id | string | 请求唯一标识ID,用于追踪和排查问题 |
| status | string | 响应状态,success表示成功 |
| code | string | 响应状态码,100000表示成功 |
| message | string | 响应消息说明 |
| metadata | object | 元数据信息,当前为空对象 |
| data | array | 问卷数据主数组,按章节分组,每个元素为一个问卷章节(一组问题) |
data数组结构
data是一个二维数组结构:
- 第一层数组:按章节分组的问卷内容
- 第二层数组:每个章节下的具体问题列表
问题对象字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| title | string | 问题标题 |
| type | string | 问题类型:dropdown(下拉选择)、textarea(文本域)、checkbox(复选框)、multi_dropdown(多字段下拉组合) |
| name | string | 字段名称,用于表单数据提交 |
| tip | string | 填写提示说明,可为空 |
| values | object | 当前已保存的答案值 |
| default_value | array | 默认值 |
| options | array | 可选项列表(当type为下拉或复选框时有效) |
| nested_form | array | 嵌套表单,当前为空 |
options数组结构
| 字段名 | 类型 | 说明 |
|---|---|---|
| name | string | 选项值,用于表单提交 |
| text | string | 选项显示文本,用于前端展示 |
values对象结构说明
values对象包含当前已保存的答案,不同问题类型的values结构不同:
1. 行业选择(dropdown类型)
{
"industry": "banking_financial_services_and_payments"
}2. 经营国家(dropdown类型,多选)
{
"countries": ["US", "GB", "SG"]
}3. 业务描述(textarea类型)
{
"nature": "业务描述文本内容"
}4. 年收入(dropdown类型)
{
"currency": "USD",
"annual_revenue": "1000001_2500000"
}注:年收入问题拆分为货币和金额范围两个字段,但在返回结构中分别作为独立问题
5. 账户用途(checkbox类型)
{
"purpose": ["invest_trade", "crypto_fiat", "institutional"]
}6. 交易预估(multi_dropdown类型)
{
"currency": "USD",
"expected_monthly_volume": "100001_500000",
"expected_monthly_transaction_activity": "1_5_transactions"
}7. 制裁国家相关问题(dropdown类型)
{
"any_dealing": "no"
}问卷章节说明
| 章节索引 | 主要内容 | 说明 |
|---|---|---|
| data[0] | 企业基本信息 | 包含行业、经营国家、业务描述、年收入货币、年收入范围 |
| data[1] | 账户用途 | 开户目的,多选 |
| data[2] | 交易预估 | 交易货币、预期月交易量、预期月交易活动 |
| data[3] | 合规问题 | 是否涉及制裁国家/地区 |
使用说明
前端可根据返回的data数组结构动态生成多步骤表单:
- 遍历data数组的每个元素(章节)
- 在每个章节内遍历问题列表
- 根据type字段渲染不同的表单组件(下拉框、文本框、复选框等)
- 使用options数组渲染选项,数据来源读取字典
- 使用values字段回填已保存的答案
页面渲染示例
