# 获取商品目录筛选规则列表

获取应用于用户属性的所有规则。

Endpoint: GET /v2/project/{project_id}/admin/user/attribute/rule
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    项目ID。您可以在发布商帐户的项目名称旁找到此参数；使用项目时，也可以在浏览器地址栏中找到此参数。URL格式如下：https://publisher.xsolla.com//projects/。
    Example: 44056

## Query parameters:

  - `limit` (integer)
    页面上元素数量的限制。
    Example: 50

  - `offset` (integer)
    生成列表时作为起始位置的元素编号（从0开始计数）。

  - `is_enabled` (integer)
    通过is_enabled标志筛选元素。

## Response 200 fields (application/json):

  - `items` (array)

  - `items.rule_id` (number, required)
    规则ID。

  - `items.name` (string, required)
    规则的可读名称。用于在发布商帐户中显示规则。

  - `items.is_enabled` (boolean, required)
    如果已启用规则。

  - `items.is_satisfied_for_unauth` (boolean)
    是否向未经授权的用户显示该商品。如为true，无论商品目录显示规则如何，该商品都会向未经授权的用户显示。默认为false。

  - `items.attribute_conditions` (array, required)
    用于验证用户属性的条件。
根据用户属性是否匹配所有指定条件，确定商品在商品目录中是否可用。

  - `items.items` (array, required)

  - `items.items.item_id` (number)
    商品ID。

  - `items.items.sku` (string)
    商品SKU。

  - `items.items.name` (string)
    商品名称。

  - `items.items.type` (string)
    商品类型。
    Enum: "virtual_good", "virtual_currency", "bundle", "physical_good", "unit"

  - `items.items.bundle_type` (string)
    捆绑包类型。当商品类型为捆绑包时返回。
    Enum: "standard", "virtual_currency_package"

  - `total_items_count` (number)
    Total number of rules.

  - `has_more` (boolean)
    If another page with rules exists.

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1501

  - `errorMessage` (string)
    Example: "[0401-1501]: Authorization failed: Authorization header not sent"

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"

## Response 403 fields (application/json):

  - `statusCode` (integer)
    Example: 403

  - `errorCode` (integer)

  - `errorMessage` (string)
    Example: "Authorization header not sent."

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"


