更新时间:2023-09-18 GMT+08:00
分享

查询SIM卡详情

功能介绍

查询SIM卡详情

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/sim-cards/{sim_card_id}

表1 路径参数

参数

是否必选

参数类型

描述

sim_card_id

Long

SIM卡标识,如果SIM卡标识传0则表示需要根据iccid处理。可通过查询SIM卡列表接口获取

最小值:0

表2 Query参数

参数

是否必选

参数类型

描述

iccid

String

iccid

最小长度:19

最大长度:20

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。通过调用IAM服务 获取IAM用户Token接口获取,接口返回的响应消息头中“X-Subject-Token”就是需要获取的用户Token。简要的获取方法样例请参见 Token认证

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

sim_card_id

Long

sim卡id

account_id

String

账户id

cid

String

容器ID:不同类型卡含义如下 iccid(实体卡),eid(eSIM)cid(vSIM)

sim_pool_id

Long

流量池ID

imei

String

设备IMEI

sim_status

Integer

sim卡状态: 10.可测试 11.未激活 13.可激活 14.已停用 20.在用 30.已拆机

device_status

Integer

设备状态

device_model

String

设备模组

act_date

String

激活日期 例如2020-01-31T16:00:00.000Z

device_status_date

String

设备状态变更时间 例如2020-01-31T16:00:00.000Z

node_id

String

设备标识

iccid

String

码号iccid

network_type

String

网络类型

dbm

String

信号强度

signal_level

String

信号等级:1.差 2.良 3.优(该参数只有eSIM,vSIM返回,实体卡不返回)

sim_type

Integer

sim卡类型 1.vSIM 2.eSIM 3.实体卡

tag_names

String

标签名

order_id

Long

批次号

expire_time

String

到期时间 例如2021-06-30T00:00:00.000Z

price_plan_name

String

在用套餐名

最大长度:128

sim_price_plan_id

Long

套餐订购实例ID

flow_left

Double

剩余流量(单位M),数据默认截止到昨日24点。

flow_used

Double

已用流量(单位M),数据默认截止到昨日24点。

operator_status

Integer

运营商状态 -1.正常(非停机状态) 1.停机(超流量停机) 2.停机(超流量阈值停机) 3.停机(流量池停机) 4.停机(套餐到期停机) 5.停机(主动停机) 6.停机(违规停机) 7.停机(机卡分离停机)

msisdn

String

MSISDN

最大长度:32

imsi

String

IMSI

最大长度:32

customer_attribute1

String

自定义属性一

最大长度:100

customer_attribute2

String

自定义属性二

最大长度:100

customer_attribute3

String

自定义属性三

最大长度:100

customer_attribute4

String

自定义属性四

最大长度:100

customer_attribute5

String

自定义属性五

最大长度:100

customer_attribute6

String

自定义属性六

最大长度:100

real_named

Boolean

是否已实名认证: true表示是,false表示否,系统SIM卡实名认证状态非实时。

cut_net_flag

Boolean

是否单独断网 true:断网,false:未断网 (当前只支持联通、移动的组池卡,电信卡不限制)

exceed_cut_net_flag

Boolean

是否达量断网 true:达量断网,false:未达量断网 (当前只支持联通、移动的组池卡,电信卡不限制)

exceed_cut_net_quota

Integer

达量断网阈值(单位MB 当前仅电信卡支持)

imei_bind_remain_times

Integer

本月机卡绑定剩余次数(当前仅电信卡支持)

speed_value

Integer

网络限制速率(单位Kbps,当前电信联通卡支持)

状态码: 400

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 500

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

请求示例

  • 查询sim_card_id对应的卡详情信息。

    GET https://{endpoint} /v1/sim-cards/{sim_card_id}
  • 查询SIM卡详情。当参数sim_card_id为最小值时,查询卡标识iccid为“8986xxxxxxxxxxxxxxx”的SIM卡详情。

    GET https://{endpoint} /v1/sim-cards/{sim_card_id}
    
    {
      "iccid" : "8986xxxxxxxxxxxxxxx"
    }

响应示例

状态码: 200

OK

{
  "sim_card_id" : 10000000000000000,
  "account_id" : "04eexxxxxxxxx",
  "cid" : "8986xxxxxxxxxxxxxxx",
  "sim_pool_id" : 10000000000000000,
  "imei" : null,
  "sim_status" : 14,
  "device_status" : null,
  "device_model" : null,
  "act_date" : "2022-09-16T01:14:58.000+00:00",
  "device_status_date" : null,
  "node_id" : null,
  "iccid" : "8986xxxxxxxxxxxxxxx",
  "network_type" : null,
  "dbm" : null,
  "signal_level" : null,
  "sim_type" : 3,
  "tag_names" : null,
  "order_id" : 10000000000000000,
  "expire_time" : "2023-08-26T15:59:59.000+00:00",
  "price_plan_name" : "中国联通消费级每月30M联接服务(1年)",
  "sim_price_plan_id" : 10000000000000000,
  "flow_left" : 10,
  "flow_used" : 0,
  "operator_status" : 5,
  "msisdn" : "8986xxxxxxxxxxxxxxx",
  "imsi" : "46xxxxxxxxxxxxxxx",
  "customer_attribute1" : null,
  "customer_attribute2" : null,
  "customer_attribute3" : null,
  "customer_attribute4" : null,
  "customer_attribute5" : null,
  "customer_attribute6" : null,
  "real_named" : false,
  "cut_net_flag" : false,
  "exceed_cut_net_flag" : false,
  "exceed_cut_net_quota" : null,
  "imei_bind_remain_times" : null,
  "speed_value" : null
}

状态码: 400

Parameter Invalid

{
  "error_code" : "GSL.00010004",
  "error_msg" : "参数异常"
}

状态码: 500

Internal Server Error

{
  "error_code" : "GSL.00010003",
  "error_msg" : "系统繁忙,请稍后重试。"
}

状态码

状态码

描述

200

OK

400

Parameter Invalid

500

Internal Server Error

错误码

请参见错误码

分享:

    相关文档

    相关产品