Xsolla-logoXsolla Developers
또는
관리자 페이지로

프로모션 코드 프로모션 생성하기Server-sideAdmin

post/v2/project/{project_id}/admin/promocode

프로모션 코드 프로모션을 생성합니다.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

프로젝트 ID입니다. 이 매개 변수는 관리자 페이지의 프로젝트 이름 옆에서 확인할 수 있습니다.

Example: 44056
Request Body schema: application/json
external_id
required
string
Default: "coupon_external_id"

Unique promotion ID. The external_id may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.

required
object
Default: {"de-DE":"Gutscheintitel","en-US":"Coupon title"}

프로모션의 이름입니다. 키가 "^[a-z]{2}-[A-Z]{2}$" 형식의 로케일인 키/값 쌍을 포함해야 하며 값은 문자열입니다.

property name*
additional property
string
Array of type = string (objects) or Array of type = date (objects) or Array of type = number (objects)

사용자 특성 값과 비교되는 조건입니다. 작업을 적용하려면 모든 조건을 충족해야 합니다.

One of:

사용자 특성 값과 비교되는 조건입니다. 작업을 적용하려면 모든 조건을 충족해야 합니다.

[ 1 .. 100 ] items
Array ([ 1 .. 100 ] items)
attribute
required
string [ 1 .. 255 ] characters ^[-_.\d\w]+$

사용자 특성 코드입니다.

operator
required
string

조건에 따라 수행하는 작업 유형입니다. string 특성 유형에 해당합니다.

Enum: Description
eq

같음

ne

같지 않음

value
required
string <= 255 characters

사용자 특성 값을 비교할 조건 값입니다. 유형은 특성 유형에 따라 다릅니다.

type
required
string

사용자 특성 유형입니다.

Value: "string"
can_be_missing
boolean

사용자 특성에서 특성이 누락된 경우에도 조건이 충족됨을 나타냅니다. 이 특성이 없는 사용자에게 항목을 표시하려면 true를 전달하십시오. 특성이 있지만 값이 조건에 지정된 값과 일치하지 않는 사용자는 항목을 볼 수 없습니다. false - 특성이 있지만 값이 조건에 지정된 값과 일치하지 않거나 속성이 누락된 사용자는 항목을 볼 수 없습니다.

Array of objects or null
Array
quantity
number
Default: 1

아이템 수량입니다.

sku
string
Default: "elven_shield"

아이템 SKU입니다.

date_end
string or null <date-time>
Default: "2020-04-15T18:16:00+05:00"

프로모션이 완료되는 날짜입니다. null일 수 있습니다. date_endnull이면 프로모션이 시간 제한을 받지 않습니다.

date_start
string or null <date-time>
Default: "2020-04-15T18:16:00+05:00"

프로모션이 시작되는 날짜입니다.

object or null
percent
string or null
Default: "10.00"

퍼센트 할인입니다. 이 퍼센트를 사용하여 계산한 값을 사용하여 장바구니 항목의 가격을 낮추어 계산한 다음 소수점 이하 2자리로 반올림합니다.

Array of objects or null

프로모션 코드로 할인한 아이템의 목록입니다.

Array
sku
required
string
Default: "elven_shield"

아이템 SKU입니다.

required
object
percent
required
string
Default: "10.00"

퍼센트 할인입니다.

이 퍼센트를 사용하여 계산한 값을 사용하여 장바구니 아이템의 가격이 낮아지게 한 다음 소수점 이하 2자리로 반올림합니다.

excluded_promotions
Array of integers

이 프로모션을 적용할 때 제외할 프로모션 ID 목록입니다.
Example: [12, 789]

Array of objects or null

Array of objects with conditions that set the price range for applying the promotion to certain items in the cart.
The price of each item in the user's cart is compared with the price range specified in the condition. Bonuses and discounts are applied only to those items in the cart whose price meets the condition.
If you pass this array, set the value of the discounted_items array to null.

Array
operator
required
string

프로모션을 적용하기 위한 가격 범위를 설정하기 위한 비교 연산자입니다.

Enum: Description
eq

같음

ge

크거나 같음

gt

보다 큼

le

작거나 같음

lt

미만

ne

같지 않음

value
required
string^\d+(\.\d{1,4})?$

프로모션을 적용하기 위한 가격 범위를 결정하기 위한 값입니다.

Array of objects or null

Array of objects with conditions that set the price range for applying the promotion to the entire cart.
The total price of all items in the user's cart is compared with the price range specified in the condition. Bonuses and discounts are applied to all items in the cart if the price of the cart meets the specified condition.
If you pass this array, set the value of the discounted_items array to null.

Array
operator
required
string

프로모션을 적용하기 위한 가격 범위를 설정하기 위한 비교 연산자입니다.

Enum: Description
eq

같음

ge

크거나 같음

gt

보다 큼

le

작거나 같음

lt

미만

ne

같지 않음

value
required
string^\d+(\.\d{1,4})?$

프로모션을 적용하기 위한 가격 범위를 결정하기 위한 값입니다.

redeem_code_limit
integer or null
Default: 10

코드당 사용 횟수입니다.

redeem_total_limit
integer or null
Default: 10

총 쿠폰 수를 제한합니다.

redeem_user_limit
integer or null
Default: 10

단일 사용자가 사용한 총 쿠폰 수를 제한합니다.

Responses
201

프로모션 코드를 성공적으로 생성했습니다.

401

기본 인증이 전달되지 않았거나 잘못되었습니다. 기본 인증 또는 올바른 자격 증명을 사용했는지 확인해야 합니다.

422

잘못된 요청입니다.

Request samples
application/json
{
  • "attribute_conditions": [
    ],
  • "date_end": "2020-04-25T18:16:00+05:00",
  • "date_start": "2020-04-15T18:16:00+05:00",
  • "discount": {
    },
  • "external_id": "coupon_external_id",
  • "name": {
    },
  • "redeem_code_limit": 1,
  • "redeem_total_limit": 100,
  • "redeem_user_limit": 1
}
Response samples
application/json
{
  • "external_id": "coupon_external_id"
}