Files
iotlcm/docs/openapi/legacy/query.md
T
Dai0814 37a1d00f01 docs: update API endpoint examples safely
Use the documented API host and replace credential fragments with placeholders.
2026-10-26 16:12:43 +08:00

390 lines
7.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 查询类
description: iotLCM 旧版兼容查询类接口
outline: deep
---
# 查询类
## 查询 SIM 详情
```http
POST /route/open/cardInfo
```
简要描述:查询物联卡基础信息。
请求体:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| type | string | 查询类型:`msisdn` / `iccid` / `imsi` / `vid` |
| cardno | string | 对应的查询值 |
请求示例:
```json
{
"Param": {
"type": "iccid",
"cardno": "898604F4152391115474"
},
"verify": {
"timeStamp": "1784097284347",
"password": "YOUR_APP_SECRET",
"appId": "YOUR_APP_ID",
"sign": ""
}
}
```
响应结构:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| vid | string | 本地卡记录 ID |
| msisdn | string | MSISDN |
| iccid | string | ICCID |
| imsi | string | IMSI |
| imei | string | IMEI |
| deptName | string | 当前归属组织名称 |
| statusId | number | 状态编码,参考公共字典 |
| packageId | string | 当前套餐编码 |
| packageName | string | 当前套餐名称 |
| used | number | 当前周期已用流量,单位 MB |
| remaining | number | 当前周期剩余流量,单位 MB |
| type | string | 卡类型名称 |
| packetArr | array | 资费计划,未配置时返回 `null` |
| remark | string | 备注 |
| grouping | string | 分组,未配置时为空字符串 |
| deliverDate | string | 发货日期,未配置时为空字符串 |
| activateDate | string | 激活日期 |
| expireTime | string | 到期时间 |
响应示例:
```json
{
"status": 0,
"message": "",
"result": {
"vid": "3933",
"msisdn": "1441543605474",
"iccid": "898604F4152391115474",
"imsi": "460087436015474",
"imei": "",
"deptName": "示例企业",
"statusId": 4,
"packageId": "yd-100m-3y",
"packageName": "每月100m3年",
"used": 0.875,
"remaining": 99.125,
"type": "",
"packetArr": null,
"remark": "测试卡",
"grouping": "",
"deliverDate": "",
"activateDate": "2026-06-01",
"expireTime": "2029-01-31 23:59:59"
}
}
```
## 查询 SIM 账期用量
```http
POST /route/open/simDataUsage
```
请求体:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| iccid | string | ICCID |
请求示例:
```json
{
"Param": {
"iccid": "898604F4152391115474"
},
"verify": {
"timeStamp": "1784097284347",
"password": "YOUR_APP_SECRET",
"appId": "YOUR_APP_ID",
"sign": ""
}
}
```
响应结构:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| useUnit | string | 单位,当前为 `MB` |
| useAmount | number | 当前周期已用流量 |
响应示例:
```json
{
"status": 0,
"message": "",
"result": {
"useUnit": "MB",
"useAmount": 0.875
}
}
```
## 查询 SIM 历史月用量
```http
POST /route/open/simDataUsageMonthly
```
请求体:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| iccid | string | ICCID |
| dateTime | string | 查询月份,格式 `yyyyMM`(示例:`202509`) |
请求示例:
```json
{
"Param": {
"iccid": "898604F4152391115474",
"dateTime": "202509"
},
"verify": {
"timeStamp": "1784097284347",
"password": "YOUR_APP_SECRET",
"appId": "YOUR_APP_ID",
"sign": ""
}
}
```
响应结构:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| useUnit | string | 单位,当前为 `MB` |
| useAmount | number | 指定月份用量 |
响应示例:
```json
{
"status": 0,
"message": "",
"result": {
"useUnit": "MB",
"useAmount": 0
}
}
```
## 查询 SIM 状态
```http
POST /route/open/simStatus
```
请求体:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| iccid | string | ICCID |
请求示例:
```json
{
"Param": {
"iccid": "898604F4152391115474"
},
"verify": {
"timeStamp": "1784097284347",
"password": "YOUR_APP_SECRET",
"appId": "YOUR_APP_ID",
"sign": ""
}
}
```
响应结构:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| statusMessage | string | 状态描述 |
| statusCode | number | 状态编码,参考公共字典 |
响应示例:
```json
{
"status": 0,
"message": "",
"result": {
"statusMessage": "已激活",
"statusCode": 4
}
}
```
## 查询 SIM 在线会话
```http
POST /route/open/simSession
```
请求体:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| iccid | string | ICCID |
请求示例:
```json
{
"Param": {
"iccid": "898604F4152391115474"
},
"verify": {
"timeStamp": "1784097284347",
"password": "YOUR_APP_SECRET",
"appId": "YOUR_APP_ID",
"sign": ""
}
}
```
响应结构:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| typeName | string | 运营商系统类型,未上报时为空字符串 |
| imei | string | IMEI,未上报时为空字符串 |
| statusMessage | string | 状态描述,未上报时为空字符串 |
| statusCode | number | 状态码,未上报时为 `0` |
| data | object | 会话详情 |
`data` 字段:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| apnId | string | APN ID |
| rat | string | 接入方式 |
| ipv6 | string | IPv6 地址 |
| ip | string | IPv4 地址 |
| ipv6Prefix | string | IPv6 前缀 |
| status | string | 在线状态 |
| createDate | string | 会话创建时间 |
响应示例:
```json
{
"status": 0,
"message": "",
"result": {
"typeName": "",
"imei": "",
"statusMessage": "",
"statusCode": 0,
"data": {
"apnId": "",
"rat": "",
"ipv6": "",
"ip": "",
"ipv6Prefix": "",
"status": "",
"createDate": ""
}
}
}
```
## 查询卡列表信息
```http
POST /route/open/queryCardInfoList
```
请求体:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| iccid | `array<string>` | ICCID 列表,最多支持 100 个 |
请求示例:
```json
{
"Param": {
"iccid": [
"898604F4152391115473",
"898604F4152391115474"
]
},
"verify": {
"timeStamp": "1784097284347",
"password": "YOUR_APP_SECRET",
"appId": "YOUR_APP_ID",
"sign": ""
}
}
```
响应结构:
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| iccid | string | ICCID |
| activateDate | string | 激活日期 |
| dueExpireTime | string | 到期时间 |
| imei | string | IMEI |
| imsi | string | IMSI |
| msisdn | string | MSISDN |
| type | string | 卡类型 |
| remarks | string | 备注 |
| status | number | 状态编码,参考公共字典 |
响应示例:
```json
{
"status": 0,
"message": "",
"result": [
{
"iccid": "898604F4152391115473",
"activateDate": "2023-05-11",
"dueExpireTime": "",
"imei": "",
"imsi": "460087436015473",
"msisdn": "1441543605473",
"type": "",
"remarks": "测试卡",
"status": 4
},
{
"iccid": "898604F4152391115474",
"activateDate": "2026-06-01",
"dueExpireTime": "2029-01-31 23:59:59",
"imei": "",
"imsi": "460087436015474",
"msisdn": "1441543605474",
"type": "",
"remarks": "测试卡",
"status": 4
}
]
}
```