ӿĵ

ؽӿڹ淶(JSON)

version 1.1

 

汾޶ʷ

˵

1.0

2020-06-09

ӿڹ淶

1.1

2021-01-01

ǿӿڵðȫ

Ŀ¼

 

1. ǰ

ЭHTTPʹPOSTʽӦΪJSONʽ.

ֶʽշ巨

ͳһӦ룺UTF-8

ͳһHeaderContent-Type: application/json

sign򣺶ֵָϳַMD5 32λСд

ҪMD5(userName + content + timestamp + MD5(password))

userName(ʺ)=test

           password(ʺ)=123

           content=

           timestamp=1596254400000

  MD5(password)=202cb962ac59075b964b07152d234b70

     ַtest1596254400000202cb962ac59075b964b07152d234b70

signMD5(ַ)=92f4abe1a56cac716bc790c93149a3ae

 

2. ͽӿ

2.1 õַ

ַhttp://send.it1688.com.cn:8001/sms/api/sendMessage

󷽷POST

2.2 ͷ

Accept: application/json

Content-Type: application/json;charset=utf-8

2.3 

˵

userName

String

ʺû

content

String

phoneList

[Array]

ֻ룬JSONʽ

ó10000룬ϵͳԶȥظ롣

timestamp

Long

ǰʱȷ롣

20208112:00:00 ʱΪ1596254400000

sign

String

²ֵϳַMD5ֵοϸ

MD5(userName + content + timestamp + MD5(password))

sendTime

String

Ŷʱʱ䣬ʽyyyy-MM-dd HH:mm:ss

ʱʱ15ڡ

extcode

String

ѡͨչ

callData

String

ûشݣ󳤶64

ûݴ˲ڻִʱشû

2.4 Ӧ

˵

code

Integer

0ΪɹʧܣϸοӦ״̬

message

String

msgId

Long

code=0ʱϵͳΨһϢId

 

2.5 ʾ

POST http://send.it1688.com.cn:8001/sms/api/sendMessage

Accept: application/json

Content-Type: application/json;charset=utf-8

 

{

"userName": "test",

"content": "ǩ֤123456",

"phoneList": ["13500000001", "13500000002", "13500000003"],

"timestamp": 1596254400000,

"sign": "43fcac8cf3079f86f2f8409158c51ff6"

}

Ӧ

{

"code": 0,

"message": "ɹ",

"smsId": 123456

}

3. һһͽӿ

3.1 õַ

ַhttp://send.it1688.com.cn:8001/sms/api/sendMessageOne

󷽷POST

3.2 ͷ

Accept: application/json

Content-Type: application/json;charset=utf-8

3.3 

˵

userName

String

ʺû

messageList

[Array]

ʽJSON󣬶±

ÿJSONݺͺݣ1000롣

timestamp

Long

ǰʱȷ롣

20208112:00:00 ʱΪ1596254400000

sign

String

²ֵϳַMD5ֵοϸ

MD5(userName + timestamp + MD5(password))

sendTime

String

Ŷʱʱ䣬ʽyyyy-MM-dd HH:mm:ss

ʱʱ15ڡ

messageListɶJSON󹹳ɵJSON飬б

˵

phone

String

ֻ

content

String

extcode

String

ѡͨչ

callData

String

ûشݣ󳤶64

ûݴ˲ڻִʱشû

3.4 Ӧ

˵

code

Integer

0ΪɹʧܣϸοӦ״̬

message

String

data

[Array]

code=0ʱϵͳش󼯺ϣ±

dataɶJSON󹹳ɵJSON飬б

˵

code

Integer

0ΪɹʧܣϸοӦ״̬

message

String

msgId

Long

code=0ʱϵͳΨһϢId

phone

String

ֻ

3.5 ʾ

POST http://send.it1688.com.cn:8001/sms/api/sendMessageOne

Accept: application/json

Content-Type: application/json;charset=utf-8

 

{

"userName": "test",

"messageList": [

{

"phone": "13500000001",

"content" : "ǩ𾴵ι211.45Ԫ"

},

{

"phone": "13500000002",

"content" : "ǩ𾴵Ůʿι78.00Ԫ"

}

],

"timestamp": 1596254400000,

"sign": "e315cf297826abdeb2092cc57f29f0bf"

}

Ӧ

{

"code": 0,

"message": "ɹ",

"data": [

{

"code": 0,

"message": "ɹ",

"msgId": 11600001,

"phone": "13500000001"

},

{

"code": 0,

"message": "ɹ",

"msgId": 11600002,

"phone": "13500000002"

}

]

}

4. ִ״̬ͽӿ

4.1 õַ

ַͻ˾ύջִ״ַ̬ƽ̨ͻִ״̬

󷽷POST

4.2 ͷ

Content-Type: application/json;charset=utf-8

4.3 

ΪJSONʽÿͲ2000ֶ£

˵

msgId

Long

ϢidӦͳɹʱϵͳӦmsgId

phone

String

ֻ

status

String

ִ״̬DELIVRDɹʧ

receiveTime

String

ִʱ䣬ʽyyyy-MM-dd HH:mm:ss

callData

String

ûشݣύʱдݴ˲ԭʹ

4.4 Ӧ

ӦHTTP״̬200ɡ200״̬뽫תΪͻȡʽ

4.5 ʾ

[

{

"msgId": 11600001,

"phone": "13500000001",

"receiveTime": "2020-06-09 11:10:32",

"status": "DELIVRD"

},

{

"msgId": 11600002,

"phone": "13500000002",

"receiveTime": "2020-06-09 11:10:32",

"status": "FAILURE"

}

]

5. лظͽӿ

5.1 õַ

ַͻ˾ύлظַƽ̨лظ

󷽷POST

5.2 ͷ

Content-Type: application/json;charset=utf-8

5.3 

ΪJSONʽÿͲ2000ֶ£

˵

content

String

лظ

phone

String

ֻ

receiveTime

String

ִʱ䣬ʽyyyy-MM-dd HH:mm:ss

destId

String

ͨ˿ں

callData

String

ûشݣύʱдݴ˲ԭʹ

5.4 Ӧ

ӦHTTP״̬200ɡ200״̬뽫תΪͻȡʽ

5.5 ʾ

[

{

"content": "õ, յ",

"destId": "106203069598",

"phone": "13500000001",

"receiveTime": "2020-06-09 11:10:32"

},

{

"content": "OK",

"phone": "13500000002",

"receiveTime": "2020-06-09 11:10:32"

}

]

6. ִ״̬ȡӿ

6.1 õַ

ַhttp://send.it1688.com.cn:8001/sms/api/getReport

󷽷POST

6.2 ͷ

Accept: application/json

Content-Type: application/json;charset=utf-8

6.3 

ÿʱ䲻С30룬ȡΪ2000ʾлִδȡٴȡִ

˵

userName

String

ʺû

timestamp

Long

ǰʱȷ롣

20208112:00:00 ʱΪ1596254400000

sign

String

²ֵϳַMD5ֵοϸ

MD5(userName + timestamp + MD5(password))

6.4 Ӧ

ӦΪJSONʽÿλȡ2000ѻȡݲᱻٴλȡ

˵

code

Integer

0ΪɹʧܣϸοӦ״̬

message

String

data

[Array]

ȡĻִбJSONʽֶ

 

dataֶ£4.4Ͳһ£

˵

msgId

Long

ϢidӦͳɹʱϵͳӦmsgId

phone

String

ֻ

status

String

ִ״̬DELIVRDɹʧ

receiveTime

String

ִʱ䣬ʽyyyy-MM-dd HH:mm:ss

callData

String

ûشݣύʱдݴ˲ԭʹ

 

6.5 ʾ

״̬ȡ

POST http://send.it1688.com.cn:8001/sms/api/getReport

Accept: application/json

Content-Type: application/json;charset=utf-8

 

{

"userName": "test",

"timestamp": 1596254400000,

"sign": "e315cf297826abdeb2092cc57f29f0bf"

}

Ӧ

{

"code": 0,

"message": "ɹ",

"data": [

{

"msgId": 11600001,

"phone": "13500000001",

"receiveTime": "2020-06-09 11:10:32",

"status": "DELIVRD"

},

{

"msgId": 11600002,

"phone": "13500000002",

"receiveTime": "2020-06-09 11:10:32",

"status": "FAILURE"

}

]

}

7. лظȡӿ

7.1 õַ

ַhttp://send.it1688.com.cn:8001/sms/api/getUpstream

󷽷POST

7.2 ͷ

Accept: application/json

Content-Type: application/json;charset=utf-8

7.3 

ÿʱ䲻С30룬ȡΪ2000ʾδȡٴȡݡ

˵

userName

String

ʺû

timestamp

Long

ǰʱȷ롣

20208112:00:00 ʱΪ1596254400000

sign

String

²ֵϳַMD5ֵοϸ

MD5(userName + timestamp + MD5(password))

7.4 Ӧ

ӦΪJSONʽÿλȡ2000ѻȡݲᱻٴλȡ

˵

code

Integer

0ΪɹʧܣϸοӦ״̬

message

String

data

[Array]

ȡбJSONʽֶ

 

dataֶ£5.4Ͳһ£

˵

content

String

лظ

phone

String

ֻ

receiveTime

String

ִʱ䣬ʽyyyy-MM-dd HH:mm:ss

destId

String

ͨ˿ں

callData

String

ûشݣύʱдݴ˲ԭʹ

 

7.5 ʾ

״̬ȡ

POST http://send.it1688.com.cn:8001/sms/api/getUpstream

Accept: application/json

Content-Type: application/json;charset=utf-8

 

{

"userName": "test",

"timestamp": 1596254400000,

"sign": "e315cf297826abdeb2092cc57f29f0bf"

}

Ӧ

{

"code": 0,

"message": "ɹ",

"data": [

{

"content": "õ, յ",

"destId": "106203069598",

"phone": "13500000001",

"receiveTime": "2020-06-09 11:10:32"

},

{

"content": "OK",

"phone": "13500000002",

"receiveTime": "2020-06-09 11:10:32"

}

]

}

8. ѯӿ

8.1 õַ

ַhttp://send.it1688.com.cn:8001/sms/api/getBalance

󷽷POST

8.2 ͷ

Accept: application/json

Content-Type: application/json;charset=utf-8

8.3 

˵

userName

String

ʺû

timestamp

Long

ǰʱȷ롣

20208112:00:00 ʱΪ1596254400000

sign

String

²ֵϳַMD5ֵοϸ

MD5(userName + timestamp + MD5(password))

8.4 Ӧ

˵

code

Integer

0ΪɹʧܣϸοӦ״̬

message

String

balance

Long

code=0ʱϵͳʺŶ

 

8.5 ʾ

״̬ȡ

POST http://send.it1688.com.cn:8001/sms/api/getBalance

Accept: application/json

Content-Type: application/json;charset=utf-8

 

{

"userName": "test",

"timestamp": 1596254400000,

"sign": "e315cf297826abdeb2092cc57f29f0bf"

}

Ӧ

{

"code": 0,

"message": "ɹ",

"balance": 967793

}

 

9. Ӧ״̬б

״̬

˵

0

ɹ

1

ʺΪ

2

ʺȨ

3

ʺѱ

4

ʺҵδͨ

5

ʺ

6

ȱٷͺ

7

ͺ10000

8

ϢΪ

9

ЧRCSģID

10

ǷIPַύԴIPַʺŰIPһ

11

24Сʱʱ

12

ʱʱ򳬹15

13

ƵÿλȡСΪ30

14

ûչ

16

ʱϵͳʱó5

50

ȱģ

51

ȱģ

52

ģݲȫ

53

ֵ֧ģ֡

54

ֵ֧ļ

97

Ӳ֧GET

98

HTTP Content-Type, Content-Type: application/json

99

JSONַ

500

ϵͳ쳣

 

 


ɨһɨ

ɨע ֤˽֪ͨ ŷͽ֪ͨ ƽ̨Ϣ

ض