> For the complete documentation index, see [llms.txt](https://docs-cn.multimarkets.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-cn.multimarkets.org/client-api/jie-ru-shuo-ming/qing-qiu.md).

# 请求

## 1.接口地址=>HTTP

```
http://ip:port/应用上下文路径/
```

DEMO如下：

```http
POST https://prewppc-3.cmfbl.com/api/login/{bizType} #登录
POST https://prewppc-3.cmfbl.com/api/register/{bizType} #注册
POST https://prewppc-3.cmfbl.com/api/logout #登出
POST https://prewppc-3.cmfbl.com/api/{bizType} #其他所有请求接口地址信息
...
```

请求方式: POST

### 1.2 请求

```
请求头信息
请求体信息，以content-type=application/json形式传输
```

#### 1.2.1 Header 请求参数

| 参数        | 类型     | 是否必填项 | 描述                |
| --------- | ------ | ----- | ----------------- |
| companyId | long   | 必填    | 系统唯一公司标识          |
| trace     | String | 必填    | 全局链路唯一标志          |
| timestamp | long   | 必填    | 时间戳，毫秒            |
| version   | String | 非必填   | 接口版本号             |
| group     | String | 非必填   | 接口分组              |
| lang      | String | 非必填   | 语言信息，默认zh-CN      |
| token     | String | 非必填   | token信息，登录之后，后续所需 |

#### 1.2.2 请求体参数

| 参数      | 类型   | 是否必填项 | 描述         |
| ------- | ---- | ----- | ---------- |
| bizBody | JSON | 必填    | 请求信息体，JSON |

## 1.2 接口地址=>websocket

```
ws://ip:port/应用上下文路径/ws
```

DEMO如下：

```
ws://prewppc-3.cmfbl.com/ws
```

传入参数：

| 参数     | 类型   | 是否必填项 | 描述        |
| ------ | ---- | ----- | --------- |
| header | JSON | 必填    | 与http保持一致 |
| body   | JSON | 必填    | 与http保持一致 |

DEMO如下：

```
{
  "header": {
    "trace": "trace",
	"token": "token",
    "bizType": "customer.CustomerWebApiService.login",
    "version": "0.0.1",
	"group": "",
    "companyId": 11,
	"timestamp": 11111131331,
	"lang":"zh-CN"
  },
  "body": {
    "type": 3,
    "loginName": "139"
  }
}
```

心跳格式如下：bizType固定为ping

```
{
  "header": {
    "trace": "trace",
	"token": "token",
    "bizType": "ping",
	"sendTime":1617246557505,
	"lang":"zh-CN"，
	"timestamp": 11111131331
  }
}
```

心跳返参消息体格式如下：bizType固定为pong

```
{
  "trace": "原参数返回",
  "token": "原参数返回",
  "bizType": "pong",
  "sendTime": 1617678792458,
  "lang": "zh-CN"
}
```

返回参数：

| 参数        |   | 类型     | 描述                            |
| --------- | - | ------ | ----------------------------- |
| code      |   | String | 系统通用返回码。0-成功，其他异常             |
| msg       |   | String | 返回信息                          |
| bizCode   |   | String | 模块标识码                         |
| tm        |   | Long   | 处理时长（毫秒）                      |
| trace     |   | String | 全局链路标志信息                      |
| msgParams |   | String | 返回描述中占位符参数串，多个参数间以,分割         |
| data      |   | Object | 数据体，统一返回各个业务响应信息,异常时返回bizType |
