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

아이템 프로모션 업데이트Server-sideAdmin

put/v2/project/{project_id}/admin/promotion/{promotion_id}/item

프로모션을 업데이트합니다.

참고

이전 데이터를 새 데이터로 교체합니다. 일부 프로모션만 업데이트하려면 요청 시 필요한 모든 데이터도 전송해야 합니다.

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

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

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

Example: 44056
promotion_id
required
integer

프로모션 ID입니다. 프로젝트 내부의 고유 프로모션 식별자입니다.

Example: 111425
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

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

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"

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

excluded_promotions
Array of integers

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

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...

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

Array of objects or null

Array of objects with conditions that set the price range for applying the promotion.
The promotion applies only to items whose price meets all the conditions in the array. If you pass this array, set the value of the items object to null.

Array
operator
required
string

Comparison operator for setting the price range for applying the promotion.

Enum: Description
eq

같음

ge

Greater or equal

gt

Greater than

le

Less or equal

lt

Less than

ne

같지 않음

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

Value for determining the price range for applying the promotion.

Responses
204

프로모션을 성공적으로 업데이트했습니다.

401

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

404

프로모션을 찾을 수 없습니다. promotion_id가 올바른지 확인해야 합니다.

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": null,
  • "name": {
    }
}
Response samples
application/json
{
  • "errorCode": 1020,
  • "errorMessage": "[0401-1020]: Error in Authentication method occurred",
  • "statusCode": 401
}