# Redeem game code by client

Grants entitlement by a provided game code.

  Notice
    You can redeem codes only for the DRM-free platform.
  
  Note
    This API call returns generic item catalog data when used without
    authorization. Use authorization to retrieve
    personalized
    user data, such as limits and promotions associated with the item.
    To do this, pass the user JWT in the Authorization header.
    For more information about user JWT, see the Security block
    for this call.

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

## 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

## Request fields (application/json):

  - `code` (string, required)
    Game code.
    Example: "AAAA-BBBB-CCCC-DDDD"

  - `sandbox` (boolean)
    Redeem game code in the sandbox mode. The option is available for those users who are specified in the list of company users.

## Response 403 fields (application/json):

  - `statusCode` (integer)
    Example: 403

  - `errorCode` (integer)

  - `errorMessage` (string)
    Example: "Authorization header not sent."

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"

## Response 404 fields (application/json):

  - `statusCode` (integer)
    Example: 404

  - `errorCode` (integer)
    Example: 4603

  - `errorMessage` (string)
    Example: "[0401-4603]: Game code not found."

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"

## Response 422 fields (application/json):

  - `statusCode` (integer)
    Example: 422

  - `errorCode` (integer)
    Example: 5103

  - `errorMessage` (string)
    Example: "[0401-5103]: Selected drm is not drmfree."

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"


## Response 201 fields
