# クーポンコードを取得

クーポンコードを取得します。

応答には、プロモーション内のコードの総数（total_count）と、現在のページ（codes）のコードが含まれています。次のページを取得するには、すべてのコードを回収し終えるまで、limitの値ずつoffsetを増やしてください（例：“offset”: 100の次は“offset”: 200）。

ほとんどの場合、“limit”: 100または“limit”: 1000で十分です。“limit”: 10000などのより大きな値は、1回限りの一括エクスポート用として残しておき、必要でない限り“limit”: 50000の使用は避けてください。

Endpoint: GET /v2/project/{project_id}/admin/coupon/{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)
    プロモーションexternal ID。プロジェクト内での一意のプロモーション識別子。
    Example: "coupon_44056_1"

## Query parameters:

  - `limit` (integer)
    ページでの要素数の制限。
    Example: 50

  - `offset` (integer)
    リストが生成される要素番号（カウントは0から始まります）。

## Response 200 fields (application/json):

  - `codes` (array)

  - `codes.code` (string)
    大文字と小文字を区別する一意のコードです。文字と数字が含まれます。

  - `total_count` (number)
    クーポンコードの合計数。

## 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]: Coupon not found"

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


