> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/d1-v1-api/ja/d1-api-v2hesuru.md).

# D1 API v2へ移行する

## エンドユーザーとカードを V2 API に移行する

D1 では、V1 と V2 の 2 世代の API が利用可能です。

V2 は、Authorization Controls API（例：limits control API）のような新しい機能を導入します。

{% hint style="info" %}
このページは、すでに V1 API を通じてエンドユーザー（D1 API では「consumers」）およびカードを登録しており、新しい V2 機能を使用するためにそれらを V2 に移行したいイシュア向けです。
{% endhint %}

### 移行手順 <a href="#migration-steps" id="migration-steps"></a>

V1 から V2 への移行は 4 つのステップで構成されます。いくつかのステップは Thales が対応し、残りはイシュアが対応します。

<table><thead><tr><th width="100">ステップ</th><th width="100">所有者</th><th>説明</th></tr></thead><tbody><tr><td>1</td><td>Thales</td><td>Thales はあなたのイシュアテナントを V1 から V2 への移行用に構成します。この構成は既存のイシュアのバックエンド統合やライブトラフィックに影響を与えません。</td></tr><tr><td>2</td><td>イシュア</td><td>イシュアは V2 の Register consumer API と V2 の Register card API を統合し、新しい登録トラフィックをすべてこれらの V2 API にルーティングします。これにより、すべての新しいエンドユーザーとカードは直接 V2 に作成されます。イシュアは、V2 を通じて登録されたカードを含め、その他のすべての V1 API を引き続き使用できます。</td></tr><tr><td>3</td><td>Thales</td><td>Thales は一括移行プロセスを実行します。このイシュアのために以前に V1 で登録されたすべてのエンドユーザーとカードが V2 に移行されます。イシュアは、すでに V2 に移行されたカードを含め、V1 API を引き続き使用できます。</td></tr><tr><td>4</td><td>イシュア</td><td>イシュアはエンドユーザーおよびカードの残りの V2 ライフサイクル API（カードの suspend、resume、renew、replace、および delete、エンドユーザーの delete）を統合し、すべてのライフサイクルトラフィックをこれらの V2 API にルーティングします。</td></tr></tbody></table>

## 移行の制限事項 <a href="#migration-limitations" id="migration-limitations"></a>

V1 から V2 への移行中には、いくつかの動作変更および制限が適用されます。

### データマッピング <a href="#data-mapping" id="data-mapping"></a>

V1 と V2 の API が使用するデータモデルは一部の属性で異なります。移行中、特定の V1 値は自動的に対応する V2 値に変換されます。

| 属性            | V1 API  | V1 の値     | V2 API  | 移行後の V2 の値                                                        |
| ------------- | ------- | --------- | ------- | ----------------------------------------------------------------- |
| コンシューマー状態     | コンシューマー | INACTIVE  | コンシューマー | ACTIVE（V2 では INACTIVE はサポートされていません。移行されたコンシューマーは ACTIVE に設定されます）。 |
| コンシューマー状態     | コンシューマー | ACTIVE    | コンシューマー | ACTIVE                                                            |
| カード状態         | カード     | INACTIVE  | カード     | SUSPENDED                                                         |
| カード状態         | カード     | ACTIVE    | カード     | ACTIVE                                                            |
| カード accountId | カード     | accountId | 該当なし    | `consumerId` （V1 の `accountId` 値を対応する `consumerId`).              |
| カード名          | 該当なし    | 該当なし      | カード     | 空文字列（移行中にカード名は入力されません）。                                           |

### スキームの制限 <a href="#scheme-limitation" id="scheme-limitation"></a>

V2 では Mastercard と Visa のカードのみがサポートされます。V1 に存在する他の決済ネットワークのカードは V2 に移行されません。

### `cardId` および PAN の制限 <a href="#cardid-and-pan-limitation" id="cardid-and-pan-limitation"></a>

V2 API では、 `cardId` は正確に 1 つの PAN に紐づけられます。これは一対一のマッピングです。

V1 では、複数の `cardId` の値が同じ PAN にリンクされることがあります。移行中：

* 特定の PAN に対して最も最近の `cardId` のみが V2 に移行されます（「最新のカードが勝つ」）。
* 古い `cardId` 同じ PAN に関連付けられた値は移行されず、V2 ではサポートされません。
* これらの移行されていない `cardId` 値のいずれかで V2 API を呼び出すと、API は HTTP を返します `404 Not Found`.

### V1 Renew API と V2 Renew および Replace API の違い <a href="#v1-renew-api-vs-v2-renew-and-replace-api-limitation" id="v1-renew-api-vs-v2-renew-and-replace-api-limitation"></a>

この制限は、 [V1 Renew](broken://pages/3a01e333d68c5a2b5aac9295129a66f708dbe2ab#post-issuers-issuerid-cards-cardid-operations-renew) API がすでに V2 に移行されたカードで呼び出された場合にのみ適用されます（例：Thales が移行を開始したがイシュアが V2 Renew と V2 Replace API を完全に実装する前）。

この状況では、V1 Renew API は HTTP を返します `403 Forbidden` 次の条件のいずれかが満たされる場合：

* 新しい `newCardId` がペイロード内で既存の `cardId`と等しいが、カード PAN が更新されている。
* 新しい `newCardId` ペイロード内の `cardId`が既存の
* 新しい `newCardId` ペイロード内の `cardId` と等しくないが、カード PAN が依然として同じである。 `および` newCardStatus `INACTIVE`.
* 新しい `が` ペイロードで提供された reasonCode は V2 では許可されていません。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/d1-v1-api/ja/d1-api-v2hesuru.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
