Xsolla-logo
  • 문서화
  • 계정 생성

아이템에 대한 할인 프로모션 생성하기Server-sideAdmin

post/v2/project/{project_id}/admin/promotion/item

아이템에 대한 할인 프로모션을 가져옵니다.

프로모션은 아이템에 대한 할인(%) 혜택을 제공합니다. 지정된 아이템의 모든 가격에 할인이 적용됩니다.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

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

Example: 44056
Request Body schema: application/json

프로모션 데이터가 있는 개체입니다.

required
Array of objects
Array
sku
required
string
Default: "elven_sword"

아이템 SKU입니다.

required
object
percent
required
string

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

required
object

프로모션의 이름입니다. 키/값 쌍을 포함해야 합니다. 여기서 키는 "^[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

Indicates that the condition is met even if attribute is missing from user attributes. Pass true to show the item to users who don't have this attribute. Users who have the attribute, but the value does not match that specified in the condition, will not see the item. False — users who have the attribute, but the value does not match that specified in the condition, or the attribute is missing, will not see the item.

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

프로모션이 종료되는 날짜입니다. null일 수 있습니다.

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

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

object

프로모션 제한입니다.

per_user
integer or null

개별 사용자에 대한 프로모션 제한입니다.

object or null

새로고침 기간을 제한합니다.

interval_type = daily (object) or interval_type = weekly (object) or interval_type = monthly (object)
One of:

일일 사용자 유형 제한 설정을 새로고침합니다.

interval_type
required
string

반복 새로고침 기간입니다.

Value: "daily"
time
required
string((0[0-9]|1[0-9]|2[0-3]):00:00)(\+|-)(0[0-9]|1...

원하는 시간대의 제한 시간 새로고침 시간입니다(시간 단위로 반올림).

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": {
    },
  • "items": [
    ],
  • "name": {
    }
}
Response samples
application/json
{
  • "promotion_id": 2384756
}