JSONファイルからアイテムカタログをインポートする

JSONファイルからのインポートを使用して、アイテムの作成、更新、非アクティブ化を行うことができます。

お知らせ
APIコールを使用して、またはアドミンページで手動でアイテムを作成、更新、または無効化できます。ただし、アイテムごとに個別のリクエストやアクションを実行する必要があります。インポートを使用すると、1つのJSONファイルで指定することで、複数のアイテムに対してこれらのアクションを同時に実行できます。

このツールを使用すると、次のことが可能になります:

機能:

  • 以下のタイプのアイテムをサポート:
    • 仮想アイテム
    • 仮想通貨
    • 仮想通貨パッケージ
    • バンドル
  • データの検証。ファイルの構造やデータ形式が要件を満たしていない場合、インポート時にエラーのリストが表示されます。

制限事項:

お知らせ
事前に作成されたアイテムの場合は、CSVファイルから地域の価格をインポートできます。

アイテムカタログのインポート

アイテムカタログをファイルからインポートするには:

  1. アドミンページでプロジェクトを開きます。
  2. サイドメニューで、「ストア」にクリックして仮想通貨仮想アイテム、またはバンドルセクションに移動します。
  3. アイテムをインポート」をクリックします。

  1. アクションを選択します:
    • 新規アイテムの追加 — 新しいSKUを持つアイテムのみが追加されます。
    • 新規アイテムの追加、既存アイテムの更新 — 新しいSKUのアイテムが追加され、既存のアイテムのデータが更新されます。
    • 新規アイテムの追加、既存アイテムの更新、欠落アイテムの無効化 — ファイルからSKUを持つアイテムが追加/更新されます。カタログにアイテムがあるが、ファイルにそのようなSKUがない場合、アドミンページのアイテムのステータスは一部利用可能(アイテムは個別に購入できませんが、バンドルまたはボーナスの一部として購入できます)に変更されます。

  1. インポート用のファイルを記入します:
    • ダウンロードウィンドウでファイルテンプレートをダウンロードし、以下の例に従って入力します。
    • アイテムをエクスポートし、エクスポートされたファイルをテンプレートとして使用します。
    • 独自のJSONファイルを作成し、以下の例に従って記入します。

完全なJSONファイルの例:

Copy
Full screen
Small screen

{
    "virtual_currency": [
        {
            "sku": "Gem_test_import",
            "name": {
                "en": "Gem_test_import"
            },
            "type": "virtual_currency",
            "description": {
                "en": "my test imported currency"
            },
            "image_url": "https://cdn3.xsolla.com/img/misc/merchant/default-dc-image.png",
            "description": {
                "en": "my test imported currency",
                "de": "meine importierte Testwährung"
            },
            "attributes": [],
            "is_free": false,
            "order": 1,
            "groups": [],
            "regional_prices": [],
            "prices": [
                {
                    "amount": 2,
                    "currency": "USD",
                    "is_default": true,
                    "is_enabled": true
                }
            ],
            "media_list": [],
            "vc_prices": [],
            "is_enabled": true,
            "is_show_in_store": true,
            "regions": [],
            "limits": {
                "per_user": null,
                "per_item": null,
                "recurrent_schedule": null
            },
            "periods": [],
            "inventory_options": {
                "consumable": true,
                "expiration_period": null
            },
            "is_hard": false
        }
    ],
    "virtual_items": [
        {
            "sku": "event_access_test_import",
            "name": {
                "en": "Special Event Access_test_import"
            },
            "type": "virtual_good",
            "description": {
                "en": "Get special event access as a bonus only on your first purchase. Find the right doggy at the Robo-Dog Exhibition!"
            },
            "image_url": "https://cdn3.xsolla.com/img/misc/images/1e3ef1a96cc9dd8d98bc124d5d6fad79.png",
            "long_description": null,
            "attributes": [],
            "is_free": false,
            "order": 1,
            "groups": [
                "my_test_group"
            ],
            "regional_prices": [],
            "prices": [
                {
                    "amount": 35,
                    "currency": "USD",
                    "is_default": true,
                    "is_enabled": true
                }
            ],
            "media_list": [],
            "vc_prices": [],
            "is_enabled": true,
            "is_show_in_store": true,
            "regions": [],
            "limits": {
                "per_user": null,
                "per_item": null,
                "recurrent_schedule": null
            },
            "periods": [],
            "inventory_options": {
                "consumable": true,
                "expiration_period": null
            }
        }
    ],
    "virtual_currency_packages": [
        {
            "item_id": 441982,
            "sku": "small_gold_pack_test_import",
            "type": "bundle",
            "name": {
                "en": "Small gold pack"
            },
            "bundle_type": "virtual_currency_package",
            "description": {
                "en": "Gold x100"
            },
            "image_url": "https://cdn3.xsolla.com/img/misc/images/ba43c46ea75fd5713c210f5736993a92.png",
            "vc_prices": [],
            "regional_prices": [],
            "prices": [
                {
                    "amount": 5,
                    "currency": "USD",
                    "is_default": true,
                    "is_enabled": true
                }
            ],
            "is_enabled": true,
            "is_show_in_store": true,
            "regions": [],
            "limits": {
                "per_user": null,
                "per_item": null,
                "recurrent_schedule": null
            },
            "periods": [],
            "attributes": [],
            "long_description": null,
            "media_list": [],
            "order": 100000000,
            "is_free": false,
            "groups": [],
            "content": [
                {
                    "sku": "Gem_test_import",
                    "quantity": 100
                }
            ]
        }
    ],
    "bundles": [
        {
            "item_id": 684024,
            "sku": "start_pack_test_import_test_import",
            "type": "bundle",
            "name": {
                "en": "Legendary Start Pack"
            },
            "bundle_type": "standard",
            "description": {
                "en": "Crystal x 1\nGem x 1"
            },
            "image_url": "https://cdn3.xsolla.com/img/misc/merchant/default-dc-image.png",
            "regional_prices": [],
            "prices": [
                {
                    "amount": 20,
                    "currency": "USD",
                    "is_default": true,
                    "is_enabled": true
                }
            ],
            "virtual_prices": [],
            "is_enabled": true,
            "is_show_in_store": true,
            "regions": [],
            "limits": {
                "per_user": null,
                "per_item": null,
                "recurrent_schedule": null
            },
            "periods": [],
            "attributes": [],
            "long_description": null,
            "media_list": [],
            "order": 5,
            "is_free": false,
            "groups": [
                "my_test_group"
            ],
            "content": [
                {
                    "sku": "Gem_test_import",
                    "quantity": 1
                },
                {
                    "sku": "event_access_test_import",
                    "quantity": 1
                }
            ]
        }
    ]
}

  1. インポートウィンドウの対応するフィールドに完全なファイルをアップロードします。
  2. インポート中にエラーが発生した場合は、そのエラーのリストと修正推奨事項がインポートウィンドウに表示されます。ファイルに必要な変更を加え、再度アップロードしてください。

アップロードに成功すると、指定したSKUのアイテムが作成、更新、または無効になります。

アイテムカタログのエクスポート

アイテムまたはアイテムカタログをJSONファイルにエクスポートするには:

  1. アドミンページでプロジェクトを開きます。
  2. サイドメニューで、「ストア」にクリックして仮想通貨仮想アイテム、またはバンドルセクションに移動します。
  3. アイテムをエクスポート」をクリックします。

  1. アクションを選択します:
    • すべてのアイテムのエクスポート — このプロジェクトのすべてのタイプのアイテムカタログ全体がエクスポートされます。例えば、仮想通貨セクションに移動してすべてのアイテムをエクスポートすると、JSONファイルにはプロジェクトの仮想通貨、仮想通貨パッケージ、バーチャルアイテム、ゲームキーパッケージが含まれます。
    • 選択されたアイテムのみのエクスポート — 開いたウィンドウでエクスポートするアイテムを選択します。

  1. エクスポート」をクリックします。

JSONファイルのダウンロードが自動的に開始されます。

この記事は役に立ちましたか?
ありがとうございます!
改善できることはありますか? メッセージ
申し訳ありません
この記事が参考にならなかった理由を説明してください。 メッセージ
ご意見ありがとうございました!
あなたのメッセージを確認し、体験を向上させるために利用させていただきます。
このページを評価する
このページを評価する
改善できることはありますか?

答えたくない

ご意見ありがとうございました!
最終更新日: 2024年5月31日

誤字脱字などのテキストエラーを見つけましたか? テキストを選択し、Ctrl+Enterを押します。

問題を報告する
当社は常にコンテンツを見直しています。お客様のご意見は改善に役立ちます。
フォローアップ用のメールをご提供してください
ご意見ありがとうございました!