# カートに特定のアイテムを入れる カートに特定のアイテムを入れます。カートにすでに同じSKUのアイテムがある場合、既存のアイテム位置が渡された値で置き換えられます。 Endpoint: PUT /v2/project/{project_id}/cart/{cart_id}/fill Version: 2.0.0 Security: AuthForCart ## Path parameters: - `project_id` (integer, required) Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com//projects/. Example: 44056 - `cart_id` (string, required) カートID。 Example: "custom_id" ## Request fields (application/json): - `items` (array, required) アイテムのリスト。 Example: [{"quantity":123,"sku":"com.xsolla.booster_mega_1"}] - `items.quantity` (number, required) - `items.sku` (string, required) ## Response 200 fields (application/json): - `cart_id` (string) カートID。 Example: "cart_id" - `is_free` (boolean) trueの場合で、カートは無料です。 - `items` (array) - `items.attributes` (array) アイテムに対応する属性と値のリスト。カタログのフィルタリングに使用できます。 - `items.attributes.external_id` (string) 一意の属性ID。external_idには、小文字と大文字のラテン英数字、ダッシュ、およびアンダースコアのみが含まれます。 - `items.attributes.name` (string) 属性名。 Example: "Genre" - `items.attributes.values` (array) - `items.attributes.values.external_id` (string) 属性の一意の値ID。external_idには、英小文字、ダッシュ、およびアンダースコアのみが含まれます。 - `items.attributes.values.value` (string) 属性値。 Example: "Strategy" - `items.can_be_bought` (boolean) trueの場合、ユーザーはアイテムを購入することができます。 - `items.description` (string) - `items.groups` (array) - `items.groups.external_id` (string) - `items.groups.name` (string) - `items.image_url` (string) - `items.is_bonus` (boolean) - `items.is_free` (boolean) アイテムが無料かどうか。 - `items.limits` (object,null) アイテム制限。 - `items.limits.per_item` (object,null) アイテムのアイテム制限。 - `items.limits.per_item.available` (integer) すべてのユーザーが購入できるアイテムの残り数。 Example: 3 - `items.limits.per_item.total` (integer) すべてのユーザーが購入できるアイテムの最大数。 Example: 5 - `items.limits.per_user` (object,null) ユーザーのアイテム制限。 - `items.limits.per_user.available` (integer) 現在のユーザーが購入できるアイテムの残り数。 Example: 3 - `items.limits.per_user.limit_exceeded_visibility` (string) Determines the visibility of the item in the catalog after the purchase limit is reached, until the next limit reset. Applies to items for which recurring limit resets are configured in the recurrent_schedule array. If limit resets are not configured, the item doesn't appear in the catalog after the purchase limit is reached, regardless of the limit_exceeded_visibility value. Possible values: - show — The item is returned in catalog retrieval API calls after the purchase limit is reached. In client-side catalog retrieval API calls, once the limit is reached, the item is returned with the can_be_bought: false flag. The next reset date is returned in reset_next_date. - hide — The item is not returned in catalog retrieval API calls after the purchase limit is reached, until the limit is reset. Enum: "show", "hide" - `items.limits.per_user.recurrent_schedule` (any) - `items.limits.per_user.total` (integer) 1ユーザーあたりのユーザーが購入できるアイテムの最大数。 Example: 5 - `items.periods` (array,null) アイテム販売期間。 - `items.periods.date_from` (string) 指定されたアイテムの販売開始日。 Example: "2020-08-11T10:00:00+03:00" - `items.periods.date_until` (string,null) 指定されたアイテムが販売できなくなる日付。nullを指定することもできます。 Example: "2020-08-11T20:00:00+03:00" - `items.price` (object,null) アイテム価格。 Example: {"amount":"6150.0000000000000000","amount_without_discount":"6150.0000000000000000","currency":"USD"} - `items.price.amount` (string) Example: "6150.0000000000000000" - `items.price.amount_without_discount` (string) Example: "6150.0000000000000000" - `items.price.currency` (string) Example: "USD" - `items.promotions` (array) カート内の特定アイテムに適用されるプロモーション。この配列は、以下のケースで返されます: * 特定のアイテムに対して、割引キャンペーンが構成されている場合。 * 選択されたアイテムの割引設定を持つプロモーションコードが適用された場合。 アイテムレベルのプロモーションが適用されない場合は、空の配列が返されます。 - `items.promotions.bonus` (array) - `items.promotions.bonus.bundle_type` (string) ボーナスバンドルアイテムタイプ。ボーナスアイテムタイプbundleのみで利用可能です。 Enum: "standard", "virtual_currency_package" - `items.promotions.bonus.image_url` (string) ボーナスアイテムの画像URLです。ボーナスアイテムのタイプ physical_good では使用できません。ー - `items.promotions.bonus.name` (string) ボーナスアイテムの名前です。ボーナスアイテムのタイプphysical_goodでは使用できません。 - `items.promotions.bonus.quantity` (integer) - `items.promotions.bonus.sku` (string) - `items.promotions.bonus.type` (string) ボーナスアイテムタイプ。 Enum: "virtual_good", "virtual_currency", "bundle", "physical_good", "game_key", "nft" - `items.promotions.date_end` (string,null) - `items.promotions.date_start` (string,null) - `items.promotions.discount` (object,null) - `items.promotions.discount.percent` (string,null) - `items.promotions.discount.value` (string,null) - `items.promotions.limits` (object) - `items.promotions.limits.per_user` (object) - `items.promotions.limits.per_user.available` (integer) - `items.promotions.limits.per_user.total` (integer) - `items.type` (string) - `items.virtual_item_type` (string) アイテムタイプ。 - `items.virtual_prices` (array) 仮想価格。 - `items.virtual_prices.amount` (integer) 割引を適用された仮想通貨建てのアイテム価格。 Example: 100 - `items.virtual_prices.amount_without_discount` (integer) 仮想通貨建てのアイテム価格。 Example: 200 - `items.virtual_prices.description` (string,null) 仮想通貨の説明。 Example: "Most popular gold" - `items.virtual_prices.image_url` (string,null) 仮想通貨のイメージ。 Example: "http://image.png" - `items.virtual_prices.is_default` (boolean) アイテムの価格をデフォルトにするかどうか。 Example: true - `items.virtual_prices.name` (string) 仮想通貨名。 Example: "Gold" - `items.virtual_prices.sku` (string) 仮想通貨アイテムSKU。 Example: "gold" - `items.virtual_prices.type` (string) 仮想通貨のタイプ。 Example: "virtual_currency" - `items.vp_rewards` (array) バリューポイントアイテム報酬。 - `items.vp_rewards.amount` (integer) バリューポイントの量。 - `items.vp_rewards.image_url` (string) 画像URL。 - `items.vp_rewards.is_clan` (boolean) バリューポイントがクランリワードチェーンで使用されるかどうか。 - `items.vp_rewards.item_id` (integer) 内部の一意のアイテムID。 - `items.vp_rewards.name` (string) バリューポイント名。 - `items.vp_rewards.sku` (string) 一意のバリューポイントID。 - `price` (object,null) カート価格。 Example: {"amount":"6150.0000000000000000","amount_without_discount":"6150.0000000000000000","currency":"USD"} - `promotions` (array) カート全体に適用されたプロモーション。この配列は、次の場合に返されます: * プロモーションがカート合計金額に影響する場合。例えば、購入割引設定が適用されたプロモーションコード。 * プロモーションがボーナスアイテムをカートに追加する場合。 注文レベルに適用されるプロモーションがない場合は、空の配列が返されます。 - `warnings` (array) - `warnings.errorCode` (integer) - `warnings.errorMessage` (string)