# プロモーションコードのプロモーションのリストを取得

プロジェクトのプロモーションコードリストを取得します。

Endpoint: GET /v3/project/{project_id}/admin/promocode
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    プロジェクトID。このパラメータは、アカウント内のプロジェクト名の横、またはプロジェクトを操作している際のブラウザのアドレスバーに記載されています。URLは以下の形式になっています：https://xsolla.com/for//account//projects//.
    Example: 44056

## Query parameters:

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

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

## Response 200 fields (application/json):

  - `items` (array)

  - `items.external_id` (string)
    一意のプロモーションID。external_idには、小文字と大文字のラテン英数字、ピリオド、ダッシュ、およびアンダースコアのみが含まれます。

  - `items.promotion_periods` (array)
    プロモーションの有効期間。複数の期間を指定する場合は、date_fromとdate_untilの両方が必須となります。

  - `items.promotion_periods.date_from` (string, required)
    指定されたプロモーションの開始日。
    Example: "2020-08-11T10:00:00+03:00"

  - `items.promotion_periods.date_until` (string,null)
    指定されたプロモーションの終了日。nullに設定した場合、プロモーションは無期限となります。単一の有効期間のみが指定されている場合に限り、nullに設定可能です。
    Example: "2020-08-11T20:00:00+03:00"

  - `items.name` (object)
    プロモーションの名前。キーと値のペアを含む必要があります。
キーは"^[a-z]{2}-[A-Z]{2}$"形式のロケール、値は文字列です。

  - `items.bonus` (array,null)

  - `items.bonus.sku` (string)
    アイテムSKU。

  - `items.bonus.quantity` (number)
    アイテム数量。

  - `items.is_enabled` (boolean)

  - `items.redeem_total_limit` (integer,null)
    クーポンの総数を制限します。

  - `items.redeem_user_limit` (integer,null)
    一人のユーザーが引き換えできるクーポンの総数を制限します。

  - `items.redeem_code_limit` (integer,null)
    コードごとの引き換え回数。

  - `items.discount` (object,null)
    Example: {"discount":{"percent":"10.99"}}

  - `items.discount.percent` (string,null)
    割引率。
カートの価格は、この割引率で計算された値で減少し、小数点以下2桁に四捨五入されます。

  - `items.discounted_items` (array,null)
    プロモーションコードによる割引が適用されるアイテムリスト。

  - `items.discounted_items.sku` (string, required)
    アイテムSKU。

  - `items.discounted_items.discount` (object, required)

  - `items.discounted_items.discount.percent` (string, required)
    割引率。

カートアイテムの価格は、この割引率で
計算された値で減少し、
小数点以下2桁に四捨五入されます。

  - `items.total_limit_state` (object,null)
    一意のプロモーションコードごとの制限。

  - `items.total_limit_state.available` (integer)
    プロモーションコードの残り使用可能回数。
    Example: 3

  - `items.total_limit_state.reserved` (integer)
    プロモーションコードの予約番号。
    Example: 3

  - `items.total_limit_state.used` (integer)
    プロモーションコードの使用回数。
    Example: 5

  - `items.attribute_conditions` (array)
    ユーザー属性を検証するための条件。
ユーザー属性が指定されたすべての条件に一致するかどうかに基づいて、プロモーションの可用性を決定します。

  - `items.price_conditions` (array,null)
    カート全体にプロモーションを適用するための価格帯を設定する条件を持つオブジェクトの配列。
ユーザーのカート内の全アイテムの合計価格が、条件で指定された価格範囲と比較されます。[ボーナス](/ja/api/shop-builder/operation/create-promo-code/#!path=bonus&t=request)と[割引](/ja/api/shop-builder/operation/create-promo-code/#!path=discount&t=request)は、カートの価格が指定された条件を満たす場合に、カート内のすべてのアイテムに適用されます。
この配列を渡す場合は、[discounted_items](/ja/api/shop-builder/operation/create-promo-code/#!path=discounted_items&t=request) 配列の値をnullに設定します。

  - `items.price_conditions.operator` (string, required)
    プロモーションを適用する価格帯を設定する比較演算子。

可能な値：
- ge — 大なりイコール
- gt — より大きい
- le — 小なりイコール
- lt — より小さい
- eq — イコール
- ne — ノットイコール
    Enum: "ge", "gt", "le", "lt", "eq", "ne"

  - `items.price_conditions.value` (string, required)
    プロモーションを適用する価格帯を決定するための値。

  - `items.item_price_conditions` (array,null)
    カートの中の特定のアイテムにプロモーションを適用するための価格範囲を設定する条件を持つオブジェクトの配列。
ユーザーのカート内の各アイテムの価格は、条件で指定された価格帯と比較されます。[ボーナス](/ja/api/shop-builder/operation/create-promo-code/#!path=bonus&t=request)と[ディスカウント](/ja/api/shop-builder/operation/create-promo-code/#!path=discount&t=request)は、カート内のアイテムのうち、価格が条件を満たすものにのみ適用されます。
この配列を渡す場合は、[discounted_items](/ja/api/shop-builder/operation/create-promo-code/#!path=discounted_items&t=request)配列の値をnullに設定します。

  - `items.item_price_conditions.operator` (string, required)
    プロモーションを適用する価格帯を設定する比較演算子。

可能な値：
- ge — 大なりイコール
- gt — より大きい
- le — 小なりイコール
- lt — より小さい
- eq — イコール
- ne — ノットイコール
    Enum: "ge", "gt", "le", "lt", "eq", "ne"

  - `items.item_price_conditions.value` (string, required)
    プロモーションを適用する価格帯を決定するための値。

  - `items.excluded_promotions` (array)
    このプロモーションを適用する際に除外するプロモーションIDのリスト。Example：[12, 789]

  - `total_promotions_count` (integer)
    プロモーションの合計数。

  - `active_promotions_count` (integer)
    アクティブなプロモーションの数。

  - `inactive_promotions_count` (integer)
    非アクティブ化されたプロモーションの数。

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

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


