# Get list of games (admin)

Gets the list of games within a project for administration.
Game consists of game keys which could be purchased by a user.

NoteDo not use this endpoint for building a store catalog.

Endpoint: GET /v2/project/{project_id}/admin/items/game
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com//projects/.
    Example: 44056

## Query parameters:

  - `limit` (integer)
    Limit for the number of elements on the page.
    Example: 50

  - `offset` (integer)
    Number of the element from which the list is generated (the count starts from 0).

  - `promo_code` (string)
    Unique case sensitive code. Contains letters and numbers.
    Example: "WINTER2021"

## Response 200 fields (application/json):

  - `has_more` (boolean)
    Used as an indicator that there are more pages.

  - `total_items_count` (integer)
    Total number of items in the system.

  - `items` (array)

  - `items.item_id` (integer)
    Internal unique item ID that is provided upon item creation.
    Example: 1

  - `items.sku` (string)
    Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.
    Example: "game_1"

  - `items.type` (string)
    Type of item. In this case it is always unit.
    Example: "unit"

  - `items.name` (object,null)
    Object with localizations for item’s name. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character language codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/).

  - `items.description` (object,null)
    Object with localizations for item’s description. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US).  While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/).

  - `items.long_description` (object,null)
    Object with localizations for long description of item. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US).  While both formats are accepted as input, responses return two-letter lowercase language codes. When both variants for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/).

  - `items.image_url` (string)
    Image URL.
    Example: "https://image.example.com"

  - `items.media_list` (array)
    Game additional assets such as screenshots, gameplay video and so on.
    Example: [{"type":"image","url":"https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"}]

  - `items.media_list.type` (string)
    Type of media: image/video.
    Enum: "image", "video"

  - `items.media_list.url` (string)
    Resource file.
    Example: "https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"

  - `items.is_enabled` (boolean)
    If disabled, item cannot be purchased and accessed through inventory.

  - `items.is_show_in_store` (boolean)
    Item is available for purchase.

  - `items.order` (integer)
    Game order priority in the list.
    Example: 1

  - `items.groups` (array)
    Groups the item belongs to.
    Example: [{"external_id":"horror","name":{"en":"Horror"}}]

  - `items.groups.external_id` (string)
    Example: "horror"

  - `items.groups.name` (object)
    Example: {"en":"Horror"}

  - `items.attributes` (array)
    List of attributes.
    Example: [{"external_id":"attribute_external_id","name":{"en":"Attribute name","de":"Attributname"},"values":[{"external_id":"value_1","name":{"en":"value 1","de":"wert 1"}},{"external_id":"value_2","name":{"en":"value 2","de":"wert 2"}}]}]

  - `items.attributes.external_id` (string, required)
    Unique attribute ID. The external_id may contain only lowercase and uppercase Latin alphanumeric characters, dashes, and underscores.
    Example: "attribute_external_id"

  - `items.attributes.name` (object)
    Object with localizations for attribute's name. Keys are specified in ISO 3166-1.
    Example: {"en":"Attribute name","de":"Attributname"}

  - `items.attributes.values` (array, required)
    Example: [{"external_id":"value_1","name":{"en":"value 1","de":"wert 1"}},{"external_id":"value_2","name":{"en":"value 2","de":"wert 2"}}]

  - `items.attributes.values.external_id` (string, required)
    Unique value ID for an attribute. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores.
    Example: "value_external_id"

  - `items.attributes.values.value` (object, required)
    Object with localizations of the value's name. Keys are specified in ISO 3166-1.

  - `items.is_free` (boolean)
    Whether the item is free.

  - `items.unit_items` (array)
    Game keys for different DRMs.

  - `items.unit_items.item_id` (integer)
    Internal unique item ID that is provided upon item creation.
    Example: 1

  - `items.unit_items.sku` (string)
    Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.
    Example: "game_1"

  - `items.unit_items.type` (string)
    Type of item. In this case it is always game_key.
    Example: "game_key"

  - `items.unit_items.is_free` (boolean)
    Whether the item is free.

  - `items.unit_items.prices` (array)
    Prices in real currencies.
    Example: [{"amount":1299.99,"currency":"RUB","is_default":true,"is_enabled":true}]

  - `items.unit_items.prices.amount` (number)
    Example: 1299.99

  - `items.unit_items.prices.currency` (string)
    Item price currency. Three-letter code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
    Example: "RUB"

  - `items.unit_items.prices.is_default` (boolean)
    Default price is used to build catalog if no price in user's currency is specified.

  - `items.unit_items.prices.is_enabled` (boolean)

  - `items.unit_items.prices.country_iso` (string,null)
    Country where this price is available. Two-letter code per [ISO 3166-1 alpha 2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
    Example: "US"

  - `items.unit_items.virtual_prices` (array,null)
    Example: [{"sku":"com.xsolla.gold_1","name":{"en":"Gold"},"type":"virtual_currency","description":null,"image_url":"https://i.pinimg.com/originals/91/ae/56/91ae5683045f6dbef16b1482bade938f.png","amount":1000,"is_default":true}]

  - `items.unit_items.virtual_prices.sku` (string)
    Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.
    Example: "gold"

  - `items.unit_items.virtual_prices.name` (object)
    Object with localizations for virtual currency's name. Keys are specified in ISO 3166-1.
    Example: {"en":"Gold"}

  - `items.unit_items.virtual_prices.type` (string)
    Type of item. In this case it is always virtual_currency.
    Example: "virtual_currency"

  - `items.unit_items.virtual_prices.description` (object,null)
    Object with localizations for game description. Keys are specified in ISO 3166-1.
    Example: {"en":"Game 1 Example"}

  - `items.unit_items.virtual_prices.image_url` (string)
    Image URL.
    Example: "https://image.example.com"

  - `items.unit_items.virtual_prices.amount` (number)

  - `items.unit_items.virtual_prices.is_default` (boolean)

  - `items.unit_items.order` (integer)
    Game order priority in the list.
    Example: 1

  - `items.unit_items.is_enabled` (boolean)
    If disabled, item cannot be purchased and accessed through inventory.

  - `items.unit_items.is_show_in_store` (boolean)
    Item is available for purchase.

  - `items.unit_items.drm_name` (string)
    Game key DRM name.
    Example: "Steam"

  - `items.unit_items.drm_sku` (string)
    DRM unique ID.
    Example: "steam"

  - `items.unit_items.drm_image` (string,null)
    Game key DRM icon.
    Example: "https://upload.wikimedia.org/wikipedia/en/4/48/Steam_Icon_2014.png"

  - `items.unit_items.drm_id` (integer)
    DRM internal unique ID.
    Example: 1

  - `items.unit_items.keys` (object)

  - `items.unit_items.keys.available` (integer)
    Number of keys available for purchase.

  - `items.unit_items.keys.total` (integer)
    Total number of uploaded keys.

  - `items.unit_items.keys.used` (integer)
    Number of sold keys.

  - `items.unit_items.is_sales_exist` (boolean)
    If true, the game key was purchased by users.

  - `items.unit_items.pre_order` (object)
    Pre-order settings.

  - `items.unit_items.pre_order.release_date` (string,null)
    Game key release date in the ISO 8601 format.

  - `items.unit_items.pre_order.is_enabled` (boolean)
    If disabled, the item is not a pre-order.

  - `items.unit_items.pre_order.description` (string,null)
    Additional information for the pre-order which will be emailed.

  - `items.unit_items.regions` (array)

  - `items.unit_items.regions.id` (integer)
    Example: 1

  - `items.unit_items.limits` (object,null)
    Item limits.

  - `items.unit_items.limits.per_user` (object,null)
    Item limitation for a separate user.

  - `items.unit_items.limits.per_user.total` (integer)
    Maximum number of items a single user can purchase.

  - `items.unit_items.limits.per_user.limit_exceeded_visibility` (string)
    Determines the visibility of the item in the catalog after the purchase limit is reached, until the next limit reset.

Applies to items for which recurring limit resets are configured in the recurrent_schedule array.

If limit resets are not configured, the item doesn't appear in the catalog after the purchase limit is reached,
regardless of the limit_exceeded_visibility value.

Possible values:
- show — The item is returned in catalog retrieval API calls after the purchase limit is reached. In client-side
catalog retrieval API calls, once the limit is reached, the item is returned with the can_be_bought: false flag. The
next reset date is returned in reset_next_date.
- hide — The item is not returned in catalog retrieval API calls after the purchase limit is reached, until the
limit is reset.
    Enum: "show", "hide"

  - `items.unit_items.limits.per_item` (object,null)
    Global item limitation.

  - `items.unit_items.limits.per_item.total` (integer)
    Maximum number of items all users can purchase.

  - `items.unit_items.limits.per_item.available` (integer)
    Remaining number of items all users can purchase.

  - `items.unit_items.limits.per_item.reserved` (integer)

  - `items.unit_items.limits.per_item.sold` (integer)

  - `items.unit_items.limits.recurrent_schedule` (object,null)
    Limit refresh period.

  - `items.unit_items.limits.recurrent_schedule.per_user` (any)
    User limit refresh period.

  - `items.unit_items.periods` (array)
    Item sales period.

  - `items.unit_items.periods.date_from` (string,null)
    Date when the specified item will be available for sale.
    Example: "2020-08-11T10:00:00+03:00"

  - `items.unit_items.periods.date_until` (string,null)
    Date when the specified item will become unavailable for sale. Can be null.
    Example: "2020-08-11T20:00:00+03:00"

  - `items.unit_items.name` (object,null)
    Object with localizations for item’s name. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character language codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/).

  - `items.unit_items.attributes` (array)
    List of attributes.
    Example: [{"external_id":"attribute_external_id","name":{"en":"Attribute name","de":"Attributname"},"values":[{"external_id":"value_1","name":{"en":"value 1","de":"wert 1"}},{"external_id":"value_2","name":{"en":"value 2","de":"wert 2"}}]}]

  - `items.unit_items.attributes.external_id` (string, required)
    Unique attribute ID. The external_id may contain only lowercase and uppercase Latin alphanumeric characters, dashes, and underscores.
    Example: "attribute_external_id"

  - `items.unit_items.attributes.name` (object)
    Object with localizations for attribute's name. Keys are specified in ISO 3166-1.
    Example: {"en":"Attribute name","de":"Attributname"}

  - `items.unit_items.attributes.values` (array, required)
    Example: [{"external_id":"value_1","name":{"en":"value 1","de":"wert 1"}},{"external_id":"value_2","name":{"en":"value 2","de":"wert 2"}}]

  - `items.unit_items.attributes.values.external_id` (string, required)
    Unique value ID for an attribute. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores.
    Example: "value_external_id"

  - `items.unit_items.attributes.values.value` (object, required)
    Object with localizations of the value's name. Keys are specified in ISO 3166-1.

  - `items.unit_items.long_description` (object,null)
    Object with localizations for long description of item. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US).  While both formats are accepted as input, responses return two-letter lowercase language codes. When both variants for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/).

  - `items.unit_items.groups` (array)
    Groups the item belongs to.
    Example: [{"external_id":"horror","name":{"en":"Horror"}}]

  - `items.unit_items.groups.external_id` (string)
    Example: "horror"

  - `items.unit_items.groups.name` (object)
    Example: {"en":"Horror"}

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

  - `errorMessage` (string)
    Example: "[0401-1020]: Error in Authentication method occurred"


