# クーポン特典を入手 このコードによりクーポン特典を入手します。 ユーザーが多くのアイテムの中から1つをボーナスとして選択できるようにするために使用することができます。 通常のケースでは、クーポンにボーナスとしてゲームが含まれている場合、DRMを選択します(type=unit)。 Endpoint: GET /v2/project/{project_id}/coupon/code/{coupon_code}/rewards Version: 2.0.0 Security: XsollaLoginUserJWT ## Path parameters: - `project_id` (integer, required) プロジェクトID。このパラメータは、パブリッシャーアカウントのプロジェクト名の横にあります。 Example: 44056 - `coupon_code` (string, required) 大文字と小文字を区別する一意のコードです。文字と数字が含まれます。 Example: "WINTER2021" ## Response 200 fields (application/json): - `bonus` (array) - `bonus.item` (object) - `bonus.item.bundle_type` (string) バンドルタイプ。アイテムタイプがバンドルの場合に返されます。 Enum: "standard", "virtual_currency_package" - `bonus.item.content` (array) - `bonus.item.description` (string,null) アイテム説明。 Example: "Game description" - `bonus.item.image_url` (string,null) 画像URL。 Example: "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png" - `bonus.item.name` (object) アイテム名。 Example: {"en":"Game name"} - `bonus.item.sku` (string) 一意のアイテムID。SKUには、小文字と大文字のラテン英数字、ピリオド、ダッシュ、およびアンダースコアのみが含まれます。 Example: "game_01" - `bonus.item.type` (string) アイテムタイプ:virtual_good/virtual_currency/bundle/physical_good/unit。 Example: "unit" - `bonus.item.unit_items` (array) アイテムにユニットタイプがある場合は、ユニット内のすべてのアイテムが含まれます。ほとんどの場合、ユーザーはそのうちの1つをクーポンボーナスとして選択する必要があります。 - `bonus.item.unit_items.drm_name` (string) DRM名。 Example: "Steam" - `bonus.item.unit_items.drm_sku` (string) 一意のDRM ID。SKUには、小文字と大文字のラテン英数字、ピリオド、ダッシュ、およびアンダースコアのみが含まれます。 Example: "steam" - `bonus.item.unit_items.is_free` (boolean) - `bonus.item.unit_items.type` (string) アイテムタイプ:game_key。 Example: "game_key" - `bonus.quantity` (number) アイテム数量。 - `discount` (object,null) 割引率。 カートの価格は、この割引率で計算された値で減少し、小数点以下2桁に四捨五入されます。 - `discount.percent` (string) Example: "10.00" - `is_selectable` (boolean) trueの場合、ユーザーはクーポンを引き換える前にボーナスを選択する必要があります。 ## Response 401 fields (application/json): - `errorCode` (integer) Example: 1501 - `errorMessage` (string) Example: "[0401-1501]: Authorization failed: Provide authorization" - `statusCode` (integer) Example: 401 ## Response 403 fields (application/json): - `errorCode` (integer) - `errorMessage` (string) Example: "Authorization header not sent." - `statusCode` (integer) Example: 403 - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x" ## Response 404 fields (application/json): - `errorCode` (integer) Example: 4001 - `errorMessage` (string) Example: "[0401-9807]: Enter valid coupon code." - `statusCode` (integer) Example: 404