# 프로모션 코드 프로모션용 코드 생성하기

프로모션 코드 프로모션용 코드를 생성합니다.

Endpoint: POST /v2/project/{project_id}/admin/promocode/{external_id}/code
Version: 2.0.0
Security: basicAuth

## Path parameters:

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

  - `external_id` (integer, required)
    프로모션 외부 ID입니다. 프로젝트 내부의 고유 프로모션 식별자입니다.
    Example: "coupon_44056_1"

## Request fields (application/json):

  - `coupon_code` (string)
    고유한 대/소문자 구분 코드입니다. 문자와 숫자를 포함합니다.

## Response 201 fields (application/json):

  - `code` (string)
    고유한 대/소문자 구분 코드입니다. 문자와 숫자를 포함합니다.

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

  - `errorMessage` (string)
    Example: "[0401-9802]: Promocode 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: 9803

  - `errorMessage` (string)
    Example: "[0401-9803]: The code already exists."

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


