# 코드로 교환 가능한 프로모션 가져오기

프로모션 코드 또는 쿠폰 코드로 프로모션을 가져옵니다.

Endpoint: GET /v3/project/{project_id}/admin/promotion/redeemable/code/{code}
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    프로젝트 ID. 이 매개 변수는 프로젝트 이름 옆의 관리자 페이지에서 또는 프로젝트 작업 시 브라우저 주소 표시줄에서 확인할 수 있습니다. URL 형식은 다음과 같습니다: https://publisher.xsolla.com//projects/.
    Example: 44056

  - `code` (string, required)
    대/소문자를 구분하는 고유한 코드입니다. 문자와 숫자를 포함합니다.
    Example: "WINTER2021"

## Response 200 fields (application/json):

  - `external_id` (string)
    고유 프로모션 ID입니다. external_id는 소문자 및 대문자 라틴 영숫자, 마침표, 대시 및 밑줄만 포함할 수 있습니다.

  - `promotion_periods` (array)
    프로모션의 유효 기간. 기간이 여러 개 지정된 경우 date_from와 date_until가 모두 필요합니다.

  - `promotion_periods.date_from` (string, required)
    지정된 프로모션의 시작 날짜.
    Example: "2020-08-11T10:00:00+03:00"

  - `promotion_periods.date_until` (string,null)
    지정된 프로모션의 종료 날짜. null로 설정된 경우 프로모션은 무기한입니다. 단일 유효 기간이 지정된 경우에만 null로 설정할 수 있습니다.
    Example: "2020-08-11T20:00:00+03:00"

  - `name` (object)
    프로모션의 이름입니다. 키가 "^[a-z]{2}-[A-Z]{2}$" 형식의 로케일인
키/값 쌍을 포함해야 하며 값은 문자열입니다.

  - `bonus` (array,null)

  - `bonus.sku` (string)
    아이템 SKU입니다.

  - `bonus.quantity` (number)
    아이템 수량입니다.

  - `is_enabled` (boolean)

  - `redeem_total_limit` (integer,null)
    총 쿠폰 수를 제한합니다.

  - `redeem_user_limit` (integer,null)
    단일 사용자가 사용한 총 쿠폰 수를 제한합니다.

  - `redeem_code_limit` (integer,null)
    코드당 사용 횟수입니다.

  - `total_limit_state` (object,null)
    각 쿠폰 코드별 사용 제한입니다.

  - `total_limit_state.available` (integer)
    쿠폰을 사용할 수 있는 남은 횟수입니다.
    Example: 3

  - `total_limit_state.reserved` (integer)
    쿠폰의 예약 횟수입니다.
    Example: 3

  - `total_limit_state.used` (integer)
    쿠폰이 사용된 횟수입니다.
    Example: 5

  - `discount` (object,null)
    프로모션 코드에만 해당됩니다.
    Example: {"discount":{"percent":"10.99"}}

  - `discount.percent` (string,null)
    퍼센트 할인입니다.
이 퍼센트를 사용하여 계산한 값을 사용하여 장바구니 항목의 가격을 낮추어 계산한 다음 소수점 이하 2자리로 반올림합니다.
    Example: "10.00"

  - `discounted_items` (array,null)
    프로모션 코드로 할인한 아이템의 목록입니다. 프로모션 코드에만 해당됩니다.

  - `discounted_items.sku` (string, required)
    아이템 SKU입니다.

  - `discounted_items.discount` (object, required)

  - `discounted_items.discount.percent` (string, required)
    퍼센트 할인입니다.

이 퍼센트를 사용하여 계산한 값을 사용하여
장바구니 아이템의 가격이 낮아지게 한 다음
소수점 이하 2자리로 반올림합니다.

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


