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 товара. Артикул может содержать только строчные латинские буквы, цифры, точки, тире и подчеркивания.

amount
required
integer >= 0

Количество призовых баллов.

Responses
204

Призовые баллы для товаров были успешно обновлены.

401

Данные для базовой аутентификации не переданы или ошибочны. Убедитесь, что использовали базовую аутентификацию и проверьте правильность учетных данных.

404

Товар не найден. Убедитесь, что верно указали project_id и sku.

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