# 向用户发放商品 将指定商品添加到指定的用户物品库中。 注意: 一次只能处理50个操作。超出此限制的操作将被忽略。 Endpoint: POST /v2/project/{project_id}/inventory/reward 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: "Montly challange rewards" - `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,null) 用户玩游戏的发布平台。 Enum: null, "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