> 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/classic-tokenization/ja/ysuksu/batchifairuwoshitetkunwosuru/batchifairujsonsukma.md).

# バッチファイルJSONスキーマ

これらのJSONスキーマ定義を使用して、トークン同期に使用されるバッチファイルを検証します。

人間が読めるフィールド参照と例については、次を参照してください：

* [バッチファイルの構造](/classic-tokenization/ja/ysuksu/batchifairuwoshitetkunwosuru/batchifairu.md)
* [出力バッチファイルの構造](/classic-tokenization/ja/ysuksu/batchifairuwoshitetkunwosuru/batchifairu-1.md)
* [エラーコード表](/classic-tokenization/ja/ysuksu/batchifairuwoshitetkunwosuru/erkdo.md)

{% hint style="info" %}
これらのスキーマはJSON Schema draft 2020-12を対象としています。

一部のバリデータは `nullable` キーワードを非標準として扱う場合があります。イシュアのバックエンドで使用するツールで検証してください。
{% endhint %}

### 入力バッチファイルスキーマ <a href="#input-batch-file" id="input-batch-file"></a>

#### バーチャルカード登録 <a href="#virtual-card-registration" id="virtual-card-registration"></a>

次の条件の入力ファイルを検証するためにこのスキーマを使用します：

* `header.operation` は `VIRTUAL_CARD_REGISTRATION`.
* 各レコードは次を含みます `rowId` および `virtualCardRegistrationRequest.card`.
* `署名` はデタッチドJWSです（参照） [バッチファイルの構造](/classic-tokenization/ja/ysuksu/batchifairuwoshitetkunwosuru/batchifairu.md)).

{% code title="input-virtual-card-registration.schema.json" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "header": {
      "type": "object",
      "properties": {
        "batchId": { "type": "string", "nullable": false },
        "seqNumber": { "type": "string", "nullable": false },
        "operation": {
          "type": "string",
          "enum": ["VIRTUAL_CARD_REGISTRATION"]
        },
        "issuerId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "batchId",
        "seqNumber",
        "operation",
        "issuerId"
      ]
    },
    "records": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rowId": {
            "type": "integer"
          },
          "virtualCardRegistrationRequest": {
                "type": "object",
                "properties": {
                    "card": {
                        "type": "object",
                        "required": ["id", "scheme", "encryptedData"],
                        "properties": {
                            "id": { "type": "string", "nullable": false },
                            "scheme": { "type": "string", "enum": ["MASTERCARD", "VISA"] },
                            "encryptedData": { "type": "string" }
                        }
                    }
                },
                "required": ["card"],
                "additionalProperties": false
            }
        },
        "required": [
          "rowId",
          "virtualCardRegistrationRequest"
        ]
      },
      "additionalItems": false
    },
    "signature": { "type": "string", "nullable": false, "minLength": 1 }
  },
  "additionalProperties": false,
  "required": [
    "header",
    "records",
    "signature"
  ]
}
```

{% endcode %}

### 出力バッチファイルスキーマ <a href="#output-batch-file" id="output-batch-file"></a>

#### バーチャルカード登録結果 <a href="#virtual-card-registration-result" id="virtual-card-registration-result"></a>

入力バッチファイルを処理した後に生成される出力結果ファイルを検証するためにこのスキーマを使用します。

{% code title="output-virtual-card-registration.schema.json" %}

```json
{
    "type": "object",
    "properties": {
        "header": {
            "type": "object",
            "properties": {
                "batchId": { "type": "string" },
                "seqNumber": { "type": "string" },
                "operation": { "type": "string", "enum": ["VIRTUAL_CARD_REGISTRATION"] },
                "issuerId": { "type": "string", "minLength": 10, "maxLength": 10 },
                "errorCode": { "type": "string" },
                "totalRecords": { "type": "integer" }
            },
            "additionalProperties": false
        },
        "recordsResults": {
            "type": "array",
            "items": [
                {
                    "type": "object",
                    "properties": {
                        "rowId": {
                            "type": "integer"
                        },
                        "virtualCardRegistrationResult": {
                            "type": "object",
                            "properties": {
                                "card": {
                                  "type": "object",
                                  "properties": {
                                    "id": { "type": "string" },
                                    "status": { "type": "string" },
                                    "digitalCardIds": {
                                        "type": "array",
                                        "items": [
                                          {
                                            "type": "string"
                                          }
                                        ]
                                    }
                                    "errorCode": { "type": "string" }
                                  },
                                  "required": ["id", "status"],
                                  "additionalProperties": false
                                },
                                "errorCode": { "type": "string" },
                                "status": { "type": "string" }
                            },
                            "required": ["card"],
                            "additionalProperties": false
                        }
                    },
                    "required": ["rowId", "virtualCardRegistrationResult"]
                }
            ]
        }
    },
    "required": ["header"],
    "additionalProperties": false
}
```

{% endcode %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/classic-tokenization/ja/ysuksu/batchifairuwoshitetkunwosuru/batchifairujsonsukma.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
