Xsolla-logoXsolla Developers
or
To Publisher Account

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

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

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_\\-–.]*$

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

amount
required
integer >= 0

Amount of value points.

Responses
204

Value point rewards for items were successfully updated.

401

Basic authentication not passed or wrong. Make sure you used basic authentication or correct credentials.

404

Item not found. Make sure the project_id and the sku are correct.

Request samples
application/json
[
  • {
    },
  • {
    }
]
Response samples