# Get redeemable promotion by code

Gets the promotion by a promo code or coupon code.

Endpoint: GET /v3/project/{project_id}/admin/promotion/redeemable/code/{code}
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

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

## Response 200 fields (application/json):

  - `external_id` (string)
    Unique promotion ID. The external_id may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.

  - `promotion_periods` (array)
    Promotion validity periods. If multiple periods are specified, both date_from and date_until are required.

  - `promotion_periods.date_from` (string, required)
    Start date for the specified promotion.
    Example: "2020-08-11T10:00:00+03:00"

  - `promotion_periods.date_until` (string,null)
    End date for the specified promotion. If set to null, the promotion is indefinite. Can be null only if a single validity period is specified.
    Example: "2020-08-11T20:00:00+03:00"

  - `name` (object)
    Name of promotion. Should contain key/value pairs
where key is a locale with "^[a-z]{2}-[A-Z]{2}$" format, value is string.

  - `bonus` (array,null)

  - `bonus.sku` (string)
    Item SKU.

  - `bonus.quantity` (number)
    Item quantity.

  - `is_enabled` (boolean)

  - `redeem_total_limit` (integer,null)
    Limits total numbers of coupons.

  - `redeem_user_limit` (integer,null)
    Limits total numbers of coupons redeemed by single user.

  - `redeem_code_limit` (integer,null)
    Number of redemptions per code.

  - `total_limit_state` (object,null)
    Limits for each unique coupon code.

  - `total_limit_state.available` (integer)
    The remaining number of times a coupon can be used.
    Example: 3

  - `total_limit_state.reserved` (integer)
    The reserved number of a coupon.
    Example: 3

  - `total_limit_state.used` (integer)
    The number of times a coupon is used.
    Example: 5

  - `discount` (object,null)
    Only for promo codes.
    Example: {"discount":{"percent":"10.99"}}

  - `discount.percent` (string,null)
    Percent discount.
The price of cart will be decreased using a value calculated by using this percent and then rounded to 2 decimal places.
    Example: "10.00"

  - `discounted_items` (array,null)
    List of items that are discounted by a promo code. Only for promo codes.

  - `discounted_items.sku` (string, required)
    Item SKU.

  - `discounted_items.discount` (object, required)

  - `discounted_items.discount.percent` (string, required)
    Percent discount.

The price of cart item will be decreased using a value
calculated by using this percent and then rounded
to 2 decimal places.

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

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

## Response 404 fields (application/json):

  - `statusCode` (integer)
    Example: 404

  - `errorCode` (integer)
    Example: 9811

  - `errorMessage` (string)
    Example: "[0401-9811]: Code not found."

## Response 405 fields (application/json):

  - `statusCode` (integer)
    Example: 405

  - `errorCode` (integer)

  - `errorMessage` (string)
    Example: "Method is not allowed. Method must be one of: OPTIONS"


