> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取子零售商

`getSubRetailer` 方法用于检索终端上加载的所有子零售商列表，并显示其当前状态。

## 要求

> [!NOTE]
>
> JSON-RPC 2.0
>
> TweezerComm 中的所有方法都遵循 JSON-RPC 2.0 结构。有关请求的结构和发送方式的更多详细信息，请参阅[“集成”部分](/docs/integrate-pos-device/tweezercomm/tweezercomm-get-started.md)。

请在请求中确保配置以下内容：

* `method` 字段必须设置为 `getSubRetailer`。
* The service must be set to `ashrait` in the `params`.

```json theme={null}
{
    "jsonrpc": "2.0",
    "method": "getSubRetailer",
    "params": [
        "ashrait"
    ],
    "id": "123454352"
}
```

### 请求参数

此方法除标准服务名称外不需要任何其他参数。

## 回复

成功调用会返回子零售商列表及其状态。

```json theme={null}
{
    "jsonrpc": "2.0",
    "id": "123454352",
    "result": {
        "statusCode": 0,
        "statusMessage": "OK",
        "subRetailers": [
            {
                "retailerId": "0883806",
                "retailerName": "",
                "isActivated": true,
                "isStartWork": false
            },
            {
                "retailerId": "0884806",
                "retailerName": "",
                "isActivated": true,
                "isStartWork": false
            }
        ]
    }
}
```

### 响应参数

The `result object` contains the following fields:

| 姓名 | 类型 | 描述 |
| :- | :- | :- |
| `statusCode` | 整数 | 操作的状态。`0` 表示成功。 |
| `statusMessage` | string | 描述状态的消息，例如 "OK"。 |
| `subRetailers` | 对象数组 | 包含子零售商对象的列表。请参见下表。 |

### 子零售商对象结构

`subRetailers` 数组中的每个对象具有以下结构：

| 姓名 | 类型 | 描述 |
| :- | :- | :- |
| `retailerId` | string | 子零售商的唯一标识符。 |
| `retailerName` | string | 子零售商的名称（可能为空）。 |
| `isActivated` | 布尔值 | 如果子零售商已成功添加到终端，则为 `true`。 |
| `isStartWork` | 布尔值 | `true` only after a `doPeriodic` call has been successfully run. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.