# 获取商品组列表

获取用于构建商品目录的商品组列表，不分页。

注：商品目录API调用可在未授权情况下使用，但如需获取个性化商品目录，必须在Authorization请求头中传递用户JWT。

Endpoint: GET /v2/project/{project_id}/items/groups
Version: 2.0.0

## Path parameters:

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

## Query parameters:

  - `locale` (string)
    响应语言。符合ISO 639-1标准的两位小写语言代码（例如en）。name和description等本地化字段支持五字符区域代码（例如en-US），但在响应中会标准化为两位代码。支持的语言完整列表请参阅文档。

  - `with_geo` (boolean)
    是否在响应头中返回用户的区域设置和国家/地区信息。如果设置为true，响应将包含X-User-Locale-Code和X-User-Country-Code响应头。

## Response 200 fields (application/json):

  - `groups` (array)
    Example: [{"external_id":"weapons","name":"Weapons","description":"All weapons available in the game","image_url":null,"order":1},{"external_id":"group_external_id","name":"Super","description":"Super description","image_url":null,"order":1}]

  - `groups.external_id` (string)
    外部组ID。
    Example: "weapons"

  - `groups.name` (string)
    组名称。
    Example: "Weapons"

  - `groups.description` (string)
    组描述。
    Example: "All weapons available in the game"

  - `groups.image_url` (string,null)
    图片URL。

  - `groups.order` (integer)
    定义排列顺序。
    Example: 1

  - `groups.level` (integer)
    组嵌套层级。

  - `groups.children` (array)
    子组。
    Example: [{"external_id":"background","name":"Background","description":"Background description","image_url":null,"order":1,"level":1,"children":[{"external_id":"accessory","name":"Accessory","description":"Accessory","image_url":null,"order":1,"level":2,"children":[],"parent_external_id":"background"}],"parent_external_id":"weapons"}]

  - `groups.children.external_id` (string)
    外部组ID。
    Example: "background"

  - `groups.children.name` (string)
    组名称。
    Example: "Background"

  - `groups.children.description` (string)
    组描述。
    Example: "Background description"

  - `groups.children.image_url` (string,null)
    组图片URL。

  - `groups.children.order` (integer)
    定义排列顺序。
    Example: 1

  - `groups.children.level` (integer)
    组嵌套层级。
    Example: 1

  - `groups.children.children` (array)
    子组。
    Example: [{"external_id":"accessory","name":"Accessory","description":"Accessory","image_url":null,"order":1,"level":2,"children":[],"parent_external_id":"background"}]

  - `groups.children.children.external_id` (string)
    外部组ID。
    Example: "accessory"

  - `groups.children.children.name` (string)
    组名称。
    Example: "Accessory"

  - `groups.children.children.description` (string)
    组描述。
    Example: "Accessory"

  - `groups.children.children.image_url` (string,null)
    图片URL。

  - `groups.children.children.order` (integer)
    定义排列顺序。
    Example: 1

  - `groups.children.children.level` (integer)
    组嵌套层级。
    Example: 2

  - `groups.children.children.children` (array)
    子组。
    Example: []

  - `groups.children.children.parent_external_id` (string,null)
    父级外部组ID。
    Example: "background"

  - `groups.children.parent_external_id` (string,null)
    父级外部组ID。
    Example: "weapons"

  - `groups.parent_external_id` (string,null)
    父级外部组ID。


