Xsolla-logo

Create catalog filter rule

post/v2/project/{project_id}/admin/user/attribute/rule

Create rule for user attributes.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
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.

required
Array of objects or objects [ 1 .. 100 ] items
Responses
201

Rule was successfully created.

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
{
  • "rule_id": 1
}