> ## 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`。政策背景請參閱[個人入駐](/zh-Hant/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`。政策與文件相關內容請參閱[企業入駐](/zh-Hant/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}"
```

接下來,請繼續前往[能力與任務](/zh-Hant/integration/onboarding/capabilities-and-requirements),以探索並啟用您需要的產品結果。


## Related topics

- [KYB 工作流程](/zh-Hant/knowledge-base/business-onboarding/kyb-workflow.md)
- [快速入門](/zh-Hant/integration/quickstart.md)
- [個人入駐 API 工作流程](/zh-Hant/knowledge-base/individual-onboarding/api-workflow.md)
- [交易限額](/zh-Hant/knowledge-base/compliance/transaction-limits.md)
- [企業入駐常見問題](/zh-Hant/knowledge-base/business-onboarding/faq.md)
