> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swipelux.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 客户

> 创建拥有能力、账户和转账的个人或企业。

在构建入金、出金或发行的银行账户之前,先创建客户。能力、账户和转账都属于该客户的范围。请使用 `externalId` 作为与您系统中对应记录之间的稳定映射。

```bash theme={null}
export API_BASE='https://platform.swipelux.com'
export SWIPELUX_API_KEY='replace-with-your-api-key'
```

<h2 id="individual-customers">
  个人客户
</h2>

个人客户只需要 `type`。请包含您已经掌握的资料字段,只有在当前的能力或任务需要时,才添加更多字段。

使用 [`POST /v3/customers`](/api-reference/customers/post-v3-customers) 创建客户:

```bash theme={null}
curl --request POST \
  "${API_BASE}/v3/customers" \
  --header "X-API-Key: ${SWIPELUX_API_KEY}" \
  --header "Idempotency-Key: customer-user-123" \
  --header "Content-Type: application/json" \
  --data @- <<'JSON'
{
  "type": "individual",
  "externalId": "user_123",
  "individual": {
    "firstName": "Amina",
    "lastName": "Diallo",
    "residenceCountry": "FR"
  }
}
JSON
```

将返回的 `data.id` 保存为 `CUSTOMER_ID`。政策背景请参阅[个人入驻](/cn/knowledge-base/individual-onboarding/overview)。

<h2 id="business-customers">
  企业客户
</h2>

企业客户需要 `business.legalName`。使用同一个操作创建企业:

```bash theme={null}
curl --request POST \
  "${API_BASE}/v3/customers" \
  --header "X-API-Key: ${SWIPELUX_API_KEY}" \
  --header "Idempotency-Key: customer-company-456" \
  --header "Content-Type: application/json" \
  --data @- <<'JSON'
{
  "type": "business",
  "externalId": "company_456",
  "business": {
    "legalName": "Acme Payments SAS"
  }
}
JSON
```

将返回的 `data.id` 保存为 `CUSTOMER_ID`。政策和材料背景请参阅[企业入驻](/cn/knowledge-base/business-onboarding/overview)。

## 添加企业相关人员

在已知或被要求时,添加董事、股东和其他企业参与人员。以下示例使用 [`POST /v3/customers/{customerId}/related-parties`](/api-reference/customers/post-v3-customers-by-customer-id-related-parties) 创建一位董事:

```bash theme={null}
curl --request POST \
  "${API_BASE}/v3/customers/${CUSTOMER_ID}/related-parties" \
  --header "X-API-Key: ${SWIPELUX_API_KEY}" \
  --header "Idempotency-Key: related-party-director-001" \
  --header "Content-Type: application/json" \
  --data @- <<'JSON'
{
  "partyType": "person",
  "roles": ["director"],
  "title": "Chief executive officer",
  "person": {
    "firstName": "Amina",
    "lastName": "Diallo",
    "residenceCountry": "FR"
  }
}
JSON
```

将返回的 `data.id` 保存为 `RELATED_PARTY_ID`。

## 通过能力读取就绪状态

客户在 API 中并没有验证或就绪状态。请使用 [`GET /v3/customers/{customerId}`](/api-reference/customers/get-v3-customers-by-customer-id) 读取客户当前的资料数据,然后基于能力及其 `openTaskIds` 来判断该客户下一步可以做什么。

```bash theme={null}
curl --request GET \
  "${API_BASE}/v3/customers/${CUSTOMER_ID}" \
  --header "X-API-Key: ${SWIPELUX_API_KEY}"
```

接下来,请前往[能力与任务](/cn/integration/onboarding/capabilities-and-requirements),以发现并启用您所需的产品结果。


## Related topics

- [KYB 流程](/cn/knowledge-base/business-onboarding/kyb-workflow.md)
- [个人入驻 API 流程](/cn/knowledge-base/individual-onboarding/api-workflow.md)
- [快速开始](/cn/integration/quickstart.md)
- [迁移到 v3](/cn/api-reference/versioning/migrate-to-v3.md)
- [交易限额](/cn/knowledge-base/compliance/transaction-limits.md)
