# ユーザーにアイテムを設定する 指定されたユーザーインベントリに指定された項目を設定します。ただし、新しいデータは古いデータに置き換わります。 注意一度に処理できる操作は最大50個です。この制限を超える操作は無視されます。 Endpoint: POST /v2/project/{project_id}/inventory/set Version: 2.0.0 Security: basicAuth ## Path parameters: - `project_id` (integer, required) プロジェクトID。 ## Request fields (application/json): - `comment` (string) 操作説明。例:「毎月のインベントリ同期」。 - `items` (array, required) - `items.quantity` (number, required) このクラスのアイテムが付与されるために必要な数。 - `items.sku` (string, required) アイテムクラス識別子。SKUには、英小文字、ピリオド、ダッシュ、およびアンダースコアのみが含まれます。 - `platform` (string) ユーザーがプレイするパブリッシングプラットフォーム。 Enum: "playstation_network", "xbox_live", "xsolla", "pc_standalone", "nintendo_shop", "google_play", "app_store_ios", "android_standalone", "ios_standalone", "android_other", "ios_other", "pc_other" - `user` (object, required) - `user.id` (string) プラットフォーム上でユニークなユーザー識別子。 ## Response 200 fields (application/json): - `count` (integer) Example: 10 - `operations` (array) - `operations.comment` (string) 操作説明。例:「毎日のインベントリ同期」。 Example: "Daily inventory syncing" - `operations.items` (array) - `operations.items.balance` (integer) ユーザーが所有しているこのクラスのアイテムの合計数。 Example: 5 - `operations.items.quantity` (integer) このクラスのアイテムが付与されるために必要な数。 Example: 1 - `operations.items.sku` (string) アイテムクラス識別子。SKUには、英小文字、ピリオド、ダッシュ、およびアンダースコアのみが含まれます。 Example: "com.xsolla.item_1" - `operations.platform` (string) ユーザーがプレイするパブリッシングプラットフォーム。 Enum: "playstation_network", "xbox_live", "xsolla", "pc_standalone", "nintendo_shop", "google_play", "app_store_ios", "android_standalone", "ios_standalone", "android_other", "ios_other", "pc_other" - `operations.user_id` (string) プラットフォーム上でユニークなユーザー識別子。 Example: "d.user" ## Response 404 fields (application/json): - `errorCode` (integer) エラーコード。 Example: 4001 - `errorMessage` (string) エラーメッセージ。 Example: "[0401-4001]: Could not find item for project 44056 with id armor_max ()" - `statusCode` (integer) Example: 404