# アイテムプロモーションを更新する プロモーションを更新します。 注意新しいデータは古いデータに取って代わります。プロモーションの一部だけを更新したい場合は、必要なデータもすべてリクエストで転送する必要があります。 プロモーションは、商品の割引(%)を提供します。 指定した商品の全価格に割引が適用されます。 Endpoint: PUT /v3/project/{project_id}/admin/promotion/{promotion_id}/item Version: 2.0.0 Security: basicAuth ## Path parameters: - `project_id` (integer, required) プロジェクトID。このパラメータは、パブリッシャーアカウントのプロジェクト名の横にあります。 Example: 44056 - `promotion_id` (integer, required) プロモーションID。プロジェクト内での一意のプロモーション識別子。 Example: 111425 ## Request fields (application/json): - `attribute_conditions` (array) ユーザー属性を検証するための条件。 ユーザー属性が指定されたすべての条件に一致するかどうかに基づいて、プロモーションの可用性を決定します。 - `discount` (object, required) - `discount.percent` (string, required) 割引率。 アイテムの価格は、この割引率で計算された値で減少し、小数点以下2桁に四捨五入されます。 Example: 10 - `excluded_promotions` (array) このプロモーションを適用する際に除外するプロモーションIDのリスト。Example:[12, 789] Example: [12,789] - `is_enabled` (boolean) プロモーションが有効かどうか。 Example: true - `items` (array, required) - `items.sku` (string, required) アイテムSKU。 - `limits` (object) プロモーションの制限。 - `limits.per_user` (integer,null) 別ユーザーでのプロモーション制限。 - `limits.recurrent_schedule` (object,null) 制限更新期間。 - `limits.recurrent_schedule.per_user` (object) ユーザー制限更新期間。 - `limits.recurrent_schedule.per_user.day_of_month` (integer,null) 制限が更新される月の日。月の残り時間が短いために選択された日がない場合、更新はその月の最終日に行われます。monthly制限更新期間タイプはnullのみではありません。 - `limits.recurrent_schedule.per_user.day_of_week` (integer,null) 制限が更新される曜日。1は月曜日、7は日曜日です。weekly制限更新期間タイプはnullのみではありません。 - `limits.recurrent_schedule.per_user.displayable_reset_next_date` (string) 制限をリセットする日時(ISO 8601)。 Example: "2023-02-28T11:00:00+08:00" - `limits.recurrent_schedule.per_user.displayable_reset_start_date` (string) 最初の制限更新の日時(ISO 8601)。 Example: "2023-02-28T11:00:00+08:00" - `limits.recurrent_schedule.per_user.interval_type` (string) 定期更新期間のタイプ。 Enum: "daily", "weekly", "monthly" - `limits.recurrent_schedule.per_user.reset_next_date` (integer) 制限が更新された日時(UNIXタイムスタンプ)。 Example: 1677553200 - `limits.recurrent_schedule.per_user.time` (string) 希望するタイムゾーンでのリミットの更新時刻(時間単位で四捨五入)。 Example: "11:00:00+03:00" - `name` (object, required) プロモーション名。キーと値のペアを含む必要があります。 キーは"^[a-z]{{2}-[A-Z]{2}$"フォーマットのロケール、値は文字列です。 Example: {"en-US":"Promotion","ru-RU":"Акция"} - `price_conditions` (array,null) プロモーションを適用する価格帯を設定する条件を持つオブジェクトの配列。 プロモーションは、価格が配列内のすべての条件を満たすアイテムにのみ適用されます。この配列を渡す場合は、[アイテム](/ja/api/shop-builder/operation/create-item-promotion/#!path=items&t=request)オブジェクトの値をnullに設定します。 - `price_conditions.operator` (string, required) プロモーションを適用する価格帯を設定する比較演算子。 Enum: "ge", "gt", "le", "lt", "eq", "ne" - `price_conditions.value` (string, required) プロモーションを適用する価格帯を決定するための値。 - `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" ## 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: 9502 - `errorMessage` (string) Example: "[0401-9502]: Can not find promotion with ID = 111425 in project 59080" - `statusCode` (integer) Example: 404 ## Response 422 fields (application/json): - `errorCode` (integer) Example: 1102 - `errorMessage` (string) Example: "[0401-1102]: Unprocessable Entity. The property `items` is required" - `statusCode` (integer) Example: 422 - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x" ## Response 204 fields