# 아이템으로 장바구니 채우기

장바구니를 아이템으로 채웁니다. 장바구니에 동일한 SKU를 가진 아이템이 이미 있으면 기존 아이템이 전달된 값으로 교체됩니다.

Endpoint: PUT /v2/project/{project_id}/cart/fill
Version: 2.0.0
Security: AuthForCart

## Path parameters:

  - `project_id` (integer, required)
    프로젝트 ID. 이 매개 변수는 프로젝트 이름 옆의 관리자 페이지에서 또는 프로젝트 작업 시 브라우저 주소 표시줄에서 확인할 수 있습니다. URL 형식은 다음과 같습니다: https://publisher.xsolla.com//projects/.
    Example: 44056

## Request fields (application/json):

  - `items` (array, required)
    아이템 목록입니다.
    Example: [{"sku":"com.xsolla.booster_mega_1","quantity":123}]

  - `items.sku` (string, required)

  - `items.quantity` (number, required)

## Response 200 fields (application/json):

  - `cart_id` (string)
    장바구니 ID입니다.
    Example: "cart_id"

  - `price` (object,null)
    장바구니 가격입니다.
    Example: {"amount":"6150.0000000000000000","amount_without_discount":"6150.0000000000000000","currency":"USD"}

  - `price.amount` (string)
    Example: "6150.0000000000000000"

  - `price.amount_without_discount` (string)
    Example: "6150.0000000000000000"

  - `price.currency` (string)
    Example: "USD"

  - `is_free` (boolean)
    true이면 장바구니는 무료입니다.

  - `items` (array)

  - `items.sku` (string)

  - `items.groups` (array)

  - `items.groups.external_id` (string)

  - `items.groups.name` (string)

  - `items.name` (string,null)

  - `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.type` (string)

  - `items.description` (string)

  - `items.image_url` (string)

  - `items.quantity` (integer)

  - `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.virtual_item_type` (string)
    아이템 유형입니다.

  - `items.virtual_prices` (array)
    가상 가격입니다.

  - `items.virtual_prices.amount` (integer)
    인게임 재화로 표시된 아이템 가격입니다.
    Example: 100

  - `items.virtual_prices.amount_without_discount` (integer)
    할인 없이 인게임 재화로 표시된 아이템 가격입니다. 인게임 재화 가격에는 할인이 적용되지 않으므로 항상 amount와 같습니다.
    Example: 200

  - `items.virtual_prices.sku` (string)
    인게임 재화 SKU입니다.
    Example: "vc_gold"

  - `items.virtual_prices.is_default` (boolean)
    인게임 재화의 기본 가격인지 여부입니다.
    Example: true

  - `items.virtual_prices.image_url` (string,null)
    인게임 재화의 이미지 URL입니다.
    Example: "http://image.png"

  - `items.virtual_prices.name` (string)
    인게임 재화의 이름입니다.
    Example: "Gold"

  - `items.virtual_prices.type` (string)
    아이템 유형. 인게임 재화의 경우 virtual_currency입니다.
    Example: "virtual_currency"

  - `items.virtual_prices.description` (string,null)
    인게임 재화 설명입니다.
    Example: "In-game currency used to purchase weapons and upgrades"

  - `items.is_free` (boolean)
    아이템이 무료인지 여부입니다.

  - `items.is_bonus` (boolean)

  - `items.promotions` (array)
    장바구니의 특정 아이템에 적용된 프로모션. 다음의 경우 배열이 반환됩니다.

* 특정 아이템에 대한 할인 프로모션이 구성된 경우

* 선택한 아이템 할인 설정이 있는 프로모션 코드가 적용된 경우

적용된 아이템 수준 프로모션이 없는 경우 빈 배열이 반환됩니다.

  - `items.promotions.name` (string)

  - `items.promotions.date_start` (string,null)

  - `items.promotions.date_end` (string,null)

  - `items.promotions.discount` (object,null)

  - `items.promotions.discount.percent` (string,null)

  - `items.promotions.discount.value` (string,null)

  - `items.promotions.bonus` (array)

  - `items.promotions.bonus.sku` (string)

  - `items.promotions.bonus.quantity` (integer)

  - `items.promotions.bonus.type` (string)
    보너스 아이템 유형입니다.
    Enum: "virtual_good", "virtual_currency", "bundle", "physical_good", "game_key", "nft"

  - `items.promotions.bonus.name` (string)
    보너스 아이템 이름입니다. physical_good 보너스 아이템 유형에는 사용할 수 없습니다.

  - `items.promotions.bonus.image_url` (string)
    보너스 아이템 이미지 URL입니다. physical_good 보너스 아이템 유형에는 사용할 수 없습니다.

  - `items.promotions.bonus.bundle_type` (string)
    보너스 번들 아이템 유형입니다. bundle 보너스 아이템 유형에서만 사용할 수 있습니다.
    Enum: "standard", "virtual_currency_package"

  - `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.can_be_bought` (boolean)
    true일 경우 사용자는 아이템을 구매할 수 있습니다.

  - `items.vp_rewards` (array)
    아이템의 가치 포인트 리워드 목록입니다.

  - `items.vp_rewards.item_id` (integer)
    내부 고유 아이템 ID입니다.

  - `items.vp_rewards.sku` (string)
    고유 가치 포인트 ID입니다.

  - `items.vp_rewards.amount` (integer)
    가치 포인트의 금액입니다.

  - `items.vp_rewards.name` (string)
    가치 포인트 이름입니다.

  - `items.vp_rewards.image_url` (string)
    이미지 URL입니다.

  - `items.vp_rewards.is_clan` (boolean)
    값 포인트가 클랜 보상 체인에서 사용되는지 여부입니다.

  - `items.loyalty_rewards` (array)
    사용자가 아이템 구매 보상으로 받는 로열티 포인트입니다.

  - `items.loyalty_rewards.name` (string)
    로열티 포인트 이름입니다.

  - `items.loyalty_rewards.sku` (string)
    로열티 포인트 SKU. 예를 들어 로열티 포인트로 결제하는 주문을 생성할 때 다른 API 호출의 loyalty_point_sku 매개 변수에서 이 값을 전달합니다.

  - `items.loyalty_rewards.description` (string)
    로열티 포인트의 설명입니다.

  - `items.loyalty_rewards.image_url` (string,null)
    이미지 URL입니다.

  - `items.loyalty_rewards.amount` (integer)
    사용자가 아이템 구매 시 받는 로열티 포인트입니다.

  - `items.limits` (object,null)
    아이템 제한 사항입니다.

  - `items.limits.per_user` (object,null)
    사용자 한 명에 대한 아이템 제한 사항입니다.

  - `items.limits.per_user.total` (integer)
    사용자 한 명이 구매할 수 있는 최대 아이템 수량입니다.
    Example: 5

  - `items.limits.per_user.available` (integer)
    현재 사용자가 구매할 수 있는 남은 아이템 수량.
    Example: 3

  - `items.limits.per_user.recurrent_schedule` (any)

  - `items.limits.per_user.limit_exceeded_visibility` (string)
    구매 한도에 도달한 후 다음 한도 재설정 때까지 카탈로그 내 아이템의 표시 여부를 결정합니다.

recurrent_schedule 배열에서 반복 한도 재설정이 구성된 아이템에 적용됩니다.

구매 한도에 도달한 후, 한도 초기화를 구성하지 않았다면limit_exceeded_visibility 값과 관계없이 해당 아이템은 카탈로그에 표시되지 않습니다.

사용 가능한 값: - show - 구매 한도에 도달한 이후에도 카탈로그 검색 API 호출 시 해당 아이템이 반환됩니다. 클라이언트 측 카탈로그 검색 API 호출에서 한도에 도달하면, 해당 아이템은 can_be_bought: false 플래그와 함께 반환됩니다. 다음 재설정 날짜는 reset_next_date에 반환됩니다. - hide - 구매 한도에 도달한 후, 한도가 재설정될 때까지 해당 아이템은 카탈로그 검색 API 호출에서 반환되지 않습니다.
    Enum: "show", "hide"

  - `items.limits.per_item` (object,null)
    한 개 아이템에 대한 아이템 제한 사항입니다.

  - `items.limits.per_item.total` (integer)
    모든 사용자가 구매할 수 있는 최대 아이템 수량.
    Example: 5

  - `items.limits.per_item.available` (integer)
    모든 사용자가 구매할 수 있는 남은 아이템 수량.
    Example: 3

  - `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"

  - `promotions` (array)
    전체 장바구니에 적용된 프로모션. 다음의 경우 배열이 반환됩니다.

* 구매 시 할인 설정 프로모션 코드와 같이 프로모션이 전체 장바구니 금액에 영향을 미치는 경우

* 장바구니에 보너스 아이템을 추가하는 프로모션의 경우

적용되는 주문 수준 프로모션이 없는 경우 빈 배열이 반환됩니다.

  - `promotions.name` (string)

  - `promotions.date_start` (string,null)

  - `promotions.date_end` (string,null)

  - `promotions.discount` (object,null)

  - `promotions.discount.percent` (string,null)

  - `promotions.discount.value` (string,null)

  - `promotions.bonus` (array)

  - `promotions.bonus.sku` (string)

  - `promotions.bonus.quantity` (integer)

  - `promotions.bonus.type` (string)
    보너스 아이템 유형입니다.
    Enum: "virtual_good", "virtual_currency", "bundle", "physical_good", "game_key", "nft"

  - `promotions.bonus.name` (string)
    보너스 아이템 이름입니다. physical_good 보너스 아이템 유형에는 사용할 수 없습니다.

  - `promotions.bonus.image_url` (string)
    보너스 아이템 이미지 URL입니다. physical_good 보너스 아이템 유형에는 사용할 수 없습니다.

  - `promotions.bonus.bundle_type` (string)
    보너스 번들 아이템 유형입니다. bundle 보너스 아이템 유형에서만 사용할 수 있습니다.
    Enum: "standard", "virtual_currency_package"

  - `promotions.limits` (object)

  - `promotions.limits.per_user` (object)

  - `promotions.limits.per_user.available` (integer)

  - `promotions.limits.per_user.total` (integer)

  - `warnings` (array)

  - `warnings.sku` (string)

  - `warnings.quantity` (integer)

  - `warnings.errorCode` (integer)

  - `warnings.errorMessage` (string)


