> ## 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` として保存します。ポリシー文脈については [個人オンボーディング](/jp/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` として保存します。ポリシーおよびドキュメントの文脈については [ビジネスオンボーディング](/jp/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` として保存します。

## ケイパビリティから ready 状態を読み取る

顧客自体には、API における検証や ready 状態はありません。現在のプロファイルデータを取得するには [`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}"
```

次に、必要な製品成果を発見して有効化するために [ケイパビリティとタスク](/jp/integration/onboarding/capabilities-and-requirements) に進んでください。


## Related topics

- [KYB ワークフロー](/jp/knowledge-base/business-onboarding/kyb-workflow.md)
- [個人オンボーディング API ワークフロー](/jp/knowledge-base/individual-onboarding/api-workflow.md)
- [クイックスタート](/jp/integration/quickstart.md)
- [v3 への移行](/jp/api-reference/versioning/migrate-to-v3.md)
- [トランザクション上限](/jp/knowledge-base/compliance/transaction-limits.md)
