# Create virtual items Creates a list of virtual items and adds them to Backpack of the specified user. Endpoint: POST /web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/virtual_items Version: 1.0.0 Security: bearer ## Header parameters: - `X-HOST-ID` (string, required) A unique header issued by Xsolla. To obtain it, please contact the integration team at integration@xsolla.com or your Customer Success Manager at csm@xsolla.com. Provide them with the project ID and merchant ID. Keep X-HOST-ID confidential, as it is part of the authentication key. ## Path parameters: - `userId` (string, required) User ID. - `merchantId` (integer, required) Merchant ID. You can find this parameter in your Publisher Account: - in the Company settings > Company section. - in the URL in the browser address bar on any Publisher Account page. The URL has the following format: https://publisher.xsolla.com//. - `projectId` (integer, required) Project ID. You can find this parameter in your Publisher Account next to the name of the project. ## Request fields (application/json): - `item_sku` (string, required) The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores. - `item_name` (string, required) The item's name from the Publisher Account. Currently, only English names are supported, and this information is displayed to the user in the Metaframe widget. - `image_url` (string, required) The URL pointing to the item's image, which is displayed to the user in the Metaframe widget. NoteAn image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display). - `description` (string) The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget. - `game_name` (string) The name of the game associated with the item. Refer to endpoints under the Game tag for additional details. - `game_image_url` (string) The URL pointing to the image representing the associated game. - `external_game_id` (string) The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details. NoteIt's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget. - `platform` (string) The game platform associated with the item. If specified, the user needs to link their game platform account to Backpack to get the item. Enum: "steam" ## Response 201 fields (application/json): - `item_id` (string, required) The unique identifier for the item. - `description` (string,null) The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget. - `image_url` (string, required) The URL pointing to the item's image, which is displayed to the user in the Metaframe widget. NoteAn image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display). - `item_sku` (string, required) The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores. - `game_name` (string, required) The name of the game associated with the item. Refer to endpoints under the Game tag for additional details. - `external_game_id` (string, required) The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details. NoteIt's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget. - `item_type` (string, required) The item type indicates the category of claimed item. In this case, the item type will be virtual currency. Enum: "virtual_currency" - `created_at` (string, required) The timestamp indicates the moment in which the item is claimed by user. - `item_status` (string, required) The item status shows stage of item. In this case, the item status will be claimed. - `item_name` (string, required) The item name in the Publisher Account. - `platform` (string, required) The game platform associated with the item. If specified, the user needs to link their game platform account to Backpack to get the item. Enum: "steam" - `project_id` (integer, required) The Publisher Account project ID associated with the item. - `merchant_id` (integer, required) The Publisher Account ID associated with the item. ## Response 400 fields (application/json): - `message_id` (string,null, required) A unique identifier that is used for tracking and associating log entries related to this specific request or operation. This ID can be helpful for troubleshooting, debugging, and auditing purposes. - `message` (string, required) ## Response 500 fields (application/json): - `message_id` (string,null, required) A unique identifier that is used for tracking and associating log entries related to this specific request or operation. This ID can be helpful for troubleshooting, debugging, and auditing purposes. - `message` (string, required)