# Get list of games owned by user

Get the list of games owned by the user. The response will contain an array of games owned by a particular user.
<div class="notice">
<strong>Attention</strong><br><br>
All projects have the limitation to the number of items that you can
get in the response. The default and maximum value is <strong>50 items
per response.</strong> To get more data page by page, use <b>limit</b>
and <b>offset</b> fields.
</div> <br> <div class="note">
<strong>Note</strong><br><br>
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
<a href="https://developers.xsolla.com/doc/shop-builder/features/personalization/" target="_blank">personalized</a>
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the <code>Authorization</code> header.
For more information about user JWT, see the <b>Security</b> block
for this call.
</div>

Endpoint: GET /v2/project/{project_id}/entitlement
Version: 2.0.0
Security: XsollaLoginUserJWT

## Path parameters:

  - `project_id` (integer, required)
    Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/0/projects/0/) 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/<merchant_id>/projects/<project_id>`.

## Query parameters:

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

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

  - `sandbox` (integer)
    What type of entitlements should be returned. If the parameter is set to 1, the entitlements received by the user in the sandbox mode only are returned. If the parameter isn't passed or is set to 0, the entitlements received by the user in the live mode only are returned.

  - `additional_fields[]` (array)
    The list of additional fields. These fields will be in the response if you send them in your request. Available fields `attributes`.

## Response 200 fields (application/json):

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

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

  - `items` (array)

  - `items.name` (string)
    Game package name.
    Example: The Greatest Game in the World

  - `items.description` (string)
    Game package description.
    Example: Description of the greatest game in the world.

  - `items.project_id` (integer)
    Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
    Example: 44056

  - `items.game_sku` (string)
    Unique key package ID.
    Example: theGreatestGameSku

  - `items.drm` (string)
    Unique DRM ID.
    Enum: "steam", "playstation", "xbox", "uplay", "origin", "drmfree", "gog", "epicgames", "nintendo_eshop", "discord_game_store", "oculus", "rockstar", "viveport", "stadia"

  - `items.image_url` (string)
    Image URL. For the image to display correctly and load quickly on the payment UI, check our image and URL guidelines:Supported formats: WebP (recommended), PNG, JPG.File size: ≤ 50 KB (for WebP) or ≤ 150 KB (for PNG and JPG).Image size: 280 x 280 px.Color space: sRGB.Protocol: HTTPS with long-lived caching for versioned URLs.
    Example: https://image.example.com

  - `items.is_pre_order` (boolean)
    Whether the game is in pre-order status or is not.
    Example: false

  - `items.attributes` (array)
    List of attributes and their values corresponding to the Game.
Attention. This part of response is available only if you send the `additional_fields[]=attributes` query parameter.
    Example: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7…

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

  - `items.attributes.name` (string)
    Name of attribute.
    Example: Genre

  - `items.attributes.values` (array)

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

  - `items.attributes.values.value` (string)
    Value of attribute.
    Example: Strategy

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

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

