GET 分页查询客户资产
GET 分页查询客户设备资产台账。query 参数:current(页码,默认1)、size(每页条数,默认20);可选 customerId、customerName(模糊)、sn(模糊)、assetStatus(运行中/维修中/停用/报废)、location、productName、salesOrderNo。
| 接口编码 | 所需范围 | 后端接口 |
|---|---|---|
sales.service-customer-asset.page | sales:read | GET /v1/service-orders/customer-asset/page(comap-sales) |
请求参数(query)
本接口的 query 参数由后端查询对象整体展开,接口规格未保留各字段的原始 类型,故类型列统一显示为
string。实际取值语义见「说明」列,按自然类型 传即可(如"pageNum": 1),服务端会完成转换。
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
current | string | — | 页码,从 1 开始 |
size | string | — | 每页条数 |
customerId | string | — | 客户ID,精确匹配,不传查全部客户 |
customerName | string | — | 客户名称,模糊匹配 |
sn | string | — | SN,模糊匹配;按 SN 精确反查资产请用 /by-sn 接口 |
assetStatus | string | — | 资产状态:在用/维修中/停用/报废,不传查全部 |
location | string | — | 安装位置,模糊匹配 |
productName | string | — | 产品名称,模糊匹配 |
salesOrderNo | string | — | 来源销售订单号,精确匹配 |
「必填」仅反映接口规格声明的部分。服务内还有未体现在规格里的校验, 标「—」不等于可以不传;租户在主站配置的字段必填不约束本接口。 详见必填字段的判定与字段清单与自定义字段。
请求示例
curl -X POST https://open.risemap.cn/v1/api/invoke \
-H "Authorization: Bearer <访问令牌>" \
-H "Content-Type: application/json" \
-d '{
"apiCode": "sales.service-customer-asset.page",
"query": {
"current": 1,
"size": 10
}
}'
响应 data 字段(分页结构:records[] + total)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
size | integer(int64) | — | — |
records24 | ServiceCustomerAssetVO[] | — | — |
total | integer(int64) | — | — |
current | integer(int64) | — | — |
pages | integer(int64) | — | — |
错误处理
响应统一信封 { code, message, data },code == 200 为成功。以下是本接口可能返回的开放平台层错误:
| 错误码 | 说明 | 可重试 |
|---|---|---|
| 92101 | 访问凭证无效 | 否 |
| 92201 | 接口未登记或已停用 | 否 |
| 92202 | 超出凭证授权范围——本接口需 sales:read | 否 |
| 92204 | 绑定员工无此接口的功能权限 | 否 |
| 92203 | 上游服务调用失败 | 是 |
| 92301 | 请求过于频繁 | 是 |
除此之外,comap-sales 自身的业务校验失败会原样透传其业务码与提示
(如字段校验、状态不允许、数据不存在),这类码不在开放平台的号段内,
以响应里的 message 为准。完整的平台层错误码见错误码说明。