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

Partially update value points for itemsServer-sideAdmin

patch/v2/project/{project_id}/admin/items/{value_point_sku}/value_points/rewards

Partially updates the number of value points for one or more items by the item’s SKU. Users receive these value points after purchasing the specified items.

Principles of updating value points:

  • If an item does not yet have value points, sending a non-zero value in the amount field creates them.
  • If an item already has value points, sending a non-zero value in the amount field updates them.
  • If amount is set to 0, the existing value points for that item are deleted.

Unlike the PUT method (Set value points for items), this PATCH method does not overwrite all existing value points for items in the project, it only updates the specified items. A single request can update up to 100 items. Duplicate item SKUs cannot be included in the same request.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

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

Example: 44056
value_point_sku
required
string

Value Point SKU.

Example: value_point_3
Request Body schema: application/json
Array
sku
required
string [ 1 .. 255 ] characters ^[a-zA-Z0-9_\\-–.]*$

고유 아이템 ID입니다. SKU에는 소문자 라틴 영숫자, 마침표, 대시 및 밑줄만 사용할 수 있습니다.

amount
required
integer >= 0

가치 포인트의 금액입니다.

Responses
204

Value point rewards for items were successfully updated.

401

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

404

아이템을 찾을 수 없습니다. project_idsku가 올바른지 확인해야 합니다.

Request samples
application/json
[
  • {
    },
  • {
    }
]
Response samples
application/json
{
  • "errorCode": 1020,
  • "errorMessage": "[0401-1020]: Error in Authentication method occurred",
  • "statusCode": 401
}