Xsolla-logo

Update catalog filter rule

put/v2/project/{project_id}/admin/user/attribute/rule/{rule_id}

Updates a specific rule applying to user attributes. The default value will be used for a not specified property (if property is not required).

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
rule_id
required
number

Rule ID.

Example: 1
Request Body schema: application/json
name
required
string [ 1 .. 255 ] characters ^\S

Readable name of a rule. Used to display a rule in Publisher Account.

is_enabled
required
boolean

If rule is enabled.

required
Array of objects [ 1 .. 100 ] items

Conditions which are compared to user attribute values. All conditions must be met for the action to take an effect.

Array ([ 1 .. 100 ] items)
attribute
required
string [ 1 .. 255 ] characters ^[-_.\\d\\w]+$

User attribute code.

operator
required
string

Type of operation performed by condition.

Enum: Description
eq

Equals

ne

Not equals

gt

Greater

lt

Less

ge

Greater or equals

le

Less or equals

value
required
string <= 255 characters

Condition value which user attribute value will be compared to. Type depends on attribute type.

type
required
string

User attribute type.

Enum: "string" "date" "number"
required
Array of objects or objects [ 1 .. 100 ] items
Array ([ 1 .. 100 ] items)
One of:

Items which are shown to a user if their attribute values meet conditions.

item_id
required
number

Item ID.

Responses
204

Successful update.

401

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

422

Request validation error.

Request samples
application/json
{
  • "name": "Ork race armor rule",
  • "is_enabled": true,
  • "attribute_conditions": [
    ],
  • "items": [
    ]
}
Response samples
application/json
{
  • "statusCode": 401,
  • "errorCode": 1501,
  • "errorMessage": "[0401-1501]: Authorization failed: Authorization header not sent",
  • "transactionId": "x-x-x-x-transactionId-mock-x-x-x"
}