Current position: document > > Traffic card information query

Functional description

Query traffic card related information

URL

/v1/iotInfo

Request method

GET POST

Request parameters

Parameter fields Field type Is it necessary Parameter description
agentid string Yes Merchant ID
cardNum string Yes Card number, support 20 bit ICCID/11 bit or 13 bit cell phone number
ti string Yes Time Stamp UTC/GMT+08:00,Example:2016-09-23 17:33:50 is 1474623230
format string No json or xml,default is json

Invocation direction

Third party application server, HTT. server

Request examples

http://api.ht-telecom.com/v1/iotInfo?agentid=**&cardNum=**&format=json&ti=**&sign=**

Return to the example, JSON format

/**Successful return to an example**/
{
    "code": 0,
    "msg": "Error code description",
    "data": 
        {
            "msisdn": "***",
            "iccid": "***",
            "simid":"****",
            "package": [
                {
                    "startDate": "***", // The start date of the set meal (the following field may not return, please use the packageStartTime field in the back),yyyy-mm-dd Formatted string
                    "endDate": "***",  // The end date of the set meal (the following field may not return, please use the packageEndTime field in the back),yyyy-mm-dd Formatted string
                    "packageName": "***",
                    "packageStartTime: "***", // Start date of the set meal,yyyy-mm-dd Formatted string
                    "packageEndTime": "***", // End of the set meal,yyyy-mm-dd Formatted string
                    "openTime": "***",  // Registration card time,yyyy-mm-dd Formatted string.May be empty
                    "activateTime": "***" // Activation time,yyyy-mm-dd Formatted string
                }
             ],
            "status":"**",
            "supplier":"**"
        }
}

/**Failure to return to the sample**/
{
{
    "code": -1,
    "msg": "Error code description",
    "data": "" 
} 

Return field description

Parameter fields Field type Is it necessary Parameter description
code int_32 Yes Error code, 0 for success, others fail
msg string Yes Error code description
data JSON Object Yes Returned data
--msisdn string Yes GSM SIM Card
--iccid string Yes The ICCID number of the traffic card
--simid string Yes Traffic card number
--package string Yes Flow set data
--status string Yes Flow card state
--supplier string Yes The provider of the card, CMCC/CUCC/CTCC, China Mobile / China Unicom / China Telecom