# コードで引き換え可能なプロモーションを入手する プロモーションコードまたはクーポンコードを取得します。 Endpoint: GET /v3/project/{project_id}/admin/promotion/redeemable/code/{code} Version: 2.0.0 Security: basicAuth ## Path parameters: - `project_id` (integer, required) プロジェクトID。このパラメータは、パブリッシャーアカウントのプロジェクト名の横にあります。 Example: 44056 - `code` (string, required) 大文字と小文字を区別する一意のコードです。文字と数字が含まれます。 Example: "WINTER2021" ## Response 200 fields (application/json): - `bonus` (array,null) - `bonus.quantity` (number) アイテム数量。 - `bonus.sku` (string) アイテムSKU。 - `discount` (object,null) プロモーションコード限定。 Example: {"discount":{"percent":"10.99"}} - `discount.percent` (string,null) 割引率。 カートの価格は、この割引率で計算された値で減少し、小数点以下2桁に四捨五入されます。 Example: "10.00" - `discounted_items` (array,null) プロモーションコードによる割引が適用されるアイテムのリスト。 プロモーションコード限定。 - `discounted_items.discount` (object, required) - `discounted_items.discount.percent` (string, required) 割引率。 カートアイテムの価格は、この割引率で 計算された値で減少し、 小数点以下2桁に四捨五入されます。 Example: "10.00" - `external_id` (string) 一意のプロモーションID。external_idには、小文字と大文字のラテン英数字、ピリオド、ダッシュ、およびアンダースコアのみが含まれます。 Example: "coupon_external_id" - `is_enabled` (boolean) - `name` (object) プロモーションの名前。キーと値のペアを含む必要があります。 キーは"^[a-z]{2}-[A-Z]{2}$"形式のロケール、値は文字列です。 Example: {"de-DE":"Gutscheintitel","en-US":"Coupon title"} - `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" - `redeem_code_limit` (integer,null) コードごとの引き換え回数。 Example: 10 - `redeem_total_limit` (integer,null) クーポンの総数を制限します。 Example: 10 - `redeem_user_limit` (integer,null) 一人のユーザーが引き換えできるクーポンの総数を制限します。 Example: 10 - `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 ## Response 401 fields (application/json): - `errorCode` (integer) Example: 1020 - `errorMessage` (string) Example: "[0401-1020]: Error in Authentication method occurred" - `statusCode` (integer) Example: 401 ## Response 404 fields (application/json): - `errorCode` (integer) Example: 9811 - `errorMessage` (string) Example: "[0401-9811]: Code not found." - `statusCode` (integer) Example: 404 ## Response 405 fields (application/json): - `errorCode` (integer) - `errorMessage` (string) Example: "Method is not allowed. Method must be one of: OPTIONS" - `statusCode` (integer) Example: 405