随月云短信 · 技术支持

短信接口 WebService


1.短信发送接口


1.0、接入信息


UserID企业ID
Account用户账户
Password用户密码


1.1、请求URL,请求方式 WebService

https://www.suisms.net/SmsWebService.asmx?wsdl


1.2、调用接口


 SendSms(string userid, string account, string password, string mobile, string content, string sendTime, string extno)



1.3、参数说明


参数名称含义说明
userid企业id企业ID
account发送用户帐号用户帐号
password发送帐号密码用户账号对应的密码
mobile手机号码发信发送的目的号码.多个号码之间用半角逗号隔开
content发送内容短信的内容,内容需要UTF-8编码
sendTime定时发送时间为空表示立即发送,定时发送格式2010-10-24 09:08:10
extno扩展子号请先询问配置的通道是否支持扩展子号,如果不支持,请填空。子号只能为数字,且最多10位数。



1.4、请求和响应


响应为WsSendResponse,具体定义如下:


元素名称含义说明
ReturnStatus任务状态Success 成功      Faild 失败
Message描述用户帐号
RemainPoint剩余短信条数剩余短信条数
TaskID任务ID每批次任务唯一的ID,用来匹配状态报告
SuccessCounts成功条数成功提交的号码数


1.4.1、SOAP 1.2请求


以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。


POST /clientsite/SmsWebService.asmx HTTP/1.1
Host: localhost
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <SendSms xmlns="http://tempuri.org/">
      <userid>string</userid>
      <account>string</account>
      <password>string</password>
      <mobile>string</mobile>
      <content>string</content>
      <sendTime>string</sendTime>
      <extno>string</extno>
    </SendSms>
  </soap12:Body>
</soap12:Envelope>


1.4.2、SOAP 1.2响应


HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <SendSmsResponse xmlns="http://tempuri.org/">
      <SendSmsResult>
        <ReturnStatus>string</ReturnStatus>
        <Message>string</Message>
        <RemainPoint>int</RemainPoint>
        <TaskID>int</TaskID>
        <SuccessCounts>int</SuccessCounts>
      </SendSmsResult>
    </SendSmsResponse>
  </soap12:Body>
</soap12:Envelope>


1.4.3、HTTP POST请求


以下是 HTTP POST 请求和响应示例。所显示的占位符需替换为实际值。


POST /clientsite/SmsWebService.asmx/SendSms HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: length
 
userid=string&account=string&password=string&mobile=string&content=string&sendTime=string&extno=string


1.4.4、HTTP POST响应


HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
 
 
<?xml version="1.0" encoding="utf-8"?>
<WsSendResponse xmlns="http://tempuri.org/">
  <ReturnStatus>string</ReturnStatus>
  <Message>string</Message>
  <RemainPoint>int</RemainPoint>
  <TaskID>int</TaskID>
  <SuccessCounts>int</SuccessCounts>
</WsSendResponse>



2.状态报告接口


注意:相同的状态报告,只能获取一次。


2.1、请求URL,请求方式 WebService

https://www.suisms.net/SmsWebService.asmx?wsdl


2.2、调用接口


 QueryStatus(string userid, string account, string password, string statusNum)


2.3、参数说明


参数名称含义说明
userid企业id企业ID
account用户帐号用户帐号
password帐号密码用户账号对应的密码
statusNum每次取得号码数必须为数字,默认4000,可不填


2.4、请求和响应


响应为WsStatusResponse,具体定义如下:


父元素名称元素名称含义说明
QueryStatusResultReturnStatus获取状态1 成功 0 暂无状态报告 其它状态皆为失败,具体失败原因见描述
QueryStatusResultMessage描述获取成功为 ok 其他为失败信息的描述
QueryStatusResultStatusList状态列表状态列表
QueryStatusResultMessage描述获取成功为 ok 其他为失败信息的描述
QueryStatusResultStatusList状态列表状态列表
StatusListWsStatusBox+状态容器后面加号表示一个状态列表内可由多个容器组合
WsStatusBoxMobile手机号码接收手机号码
WsStatusBoxTaskID任务ID发送短信时返回的任务ID
WsStatusBoxStatus状态10 发送成功 20 发送失败
WsStatusBoxReceiveTime接收时间手机接收短信时间
WsStatusBoxErrorCode发送返回值由上级通道返回,不同的通道返回值可能不同,部分通道返回值为 DELIVRD
WsStatusBoxExtno子号即自定义扩展号


2.4.1、SOAP 1.2请求


以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。


POST /clientsite/SmsWebService.asmx HTTP/1.1
Host: localhost
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <QueryStatus xmlns="http://tempuri.org/">
      <userid>string</userid>
      <account>string</account>
      <password>string</password>
      <statusNum>string</statusNum>
    </QueryStatus>
  </soap12:Body>
</soap12:Envelope>


2.4.2、SOAP 1.2响应


HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <QueryStatusResponse xmlns="http://tempuri.org/">
      <QueryStatusResult>
        <ReturnStatus>int</ReturnStatus>
        <Message>string</Message>
        <StatusList>
          <WsStatusBox>
            <Mobile>string</Mobile>
            <TaskID>int</TaskID>
            <Status>int</Status>
            <ReceiveTime>string</ReceiveTime>
            <ErrorCode>string</ErrorCode>
            <Extno>string</Extno>
          </WsStatusBox>
          <WsStatusBox>
            <Mobile>string</Mobile>
            <TaskID>int</TaskID>
            <Status>int</Status>
            <ReceiveTime>string</ReceiveTime>
            <ErrorCode>string</ErrorCode>
            <Extno>string</Extno>
          </WsStatusBox>
        </StatusList>
      </QueryStatusResult>
    </QueryStatusResponse>
  </soap12:Body>
</soap12:Envelope>


2.4.3、HTTP POST请求


以下是 HTTP POST 请求和响应示例。所显示的占位符需替换为实际值。


POST /clientsite/SmsWebService.asmx/QueryStatus HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: length
 
userid=string&account=string&password=string&statusNum=string



2.4.4、HTTP POST响应


HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<WsStatusResponse xmlns="http://tempuri.org/">
  <ReturnStatus>int</ReturnStatus>
  <Message>string</Message>
  <StatusList>
    <WsStatusBox>
      <Mobile>string</Mobile>
      <TaskID>int</TaskID>
      <Status>int</Status>
      <ReceiveTime>string</ReceiveTime>
      <ErrorCode>string</ErrorCode>
      <Extno>string</Extno>
    </WsStatusBox>
    <WsStatusBox>
      <Mobile>string</Mobile>
      <TaskID>int</TaskID>
      <Status>int</Status>
      <ReceiveTime>string</ReceiveTime>
      <ErrorCode>string</ErrorCode>
      <Extno>string</Extno>
    </WsStatusBox>
  </StatusList>
</WsStatusResponse>



3.短信上行接口


注意:相同的状态报告,只能获取一次。


3.1、请求URL,请求方式 WebService

https://www.suisms.net/SmsWebService.asmx?wsdl


3.2、调用接口


 QueryCall(string userid, string account, string password, string callNum)


3.3、参数说明


参数名称含义说明
userid企业id企业ID
account用户帐号用户帐号
password帐号密码用户账号对应的密码
callNum每次取得号码数

必须为数字,默认500,可不

最小10,最大10000


3.4、请求和响应


响应为WsCallResponse,具体定义如下:


父元素名称元素名称含义说明
QueryCallResultReturnStatus获取状态1 成功 0 暂无状态报告 其它状态皆为失败,具体失败原因见描述
QueryCallResultMessage描述获取成功为 ok 其他为失败信息的描述
QueryCallResultCallList上行列表上行列表
CallListWsCallBox+上行容器后面加号表示一个上行列表内可由多个容器组合
WsCallBoxMobile手机号码上行手机号码
WsCallBoxTaskID任务ID发送短信时返回的任务ID,如果是直接上行,这里可能为空
WsCallBoxContent上行内容上行回复内容
WsCallBoxReceiveTime接收时间手机上行短信时间
WsCallBoxExtno子号即自定义扩展号


3.4.1、SOAP 1.2请求


以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。


POST /clientsite/SmsWebService.asmx HTTP/1.1
Host: localhost
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <QueryCall xmlns="http://tempuri.org/">
      <userid>string</userid>
      <account>string</account>
      <password>string</password>
      <callNum>string</callNum>
    </QueryCall>
  </soap12:Body>
</soap12:Envelope>


3.4.2、SOAP 1.2响应


HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <QueryCallResponse xmlns="http://tempuri.org/">
      <QueryCallResult>
        <ReturnStatus>int</ReturnStatus>
        <Message>string</Message>
        <CallList>
          <WsCallBox>
            <Mobile>string</Mobile>
            <TaskID>int</TaskID>
            <Content>string</Content>
            <ReceiveTime>string</ReceiveTime>
            <Extno>string</Extno>
          </WsCallBox>
          <WsCallBox>
            <Mobile>string</Mobile>
            <TaskID>int</TaskID>
            <Content>string</Content>
            <ReceiveTime>string</ReceiveTime>
            <Extno>string</Extno>
          </WsCallBox>
        </CallList>
      </QueryCallResult>
    </QueryCallResponse>
  </soap12:Body>
</soap12:Envelope>


3.4.3、HTTP POST请求


以下是 HTTP POST 请求和响应示例。所显示的占位符需替换为实际值。


POST /clientsite/SmsWebService.asmx/QueryCall HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: length
 
userid=string&account=string&password=string&callNum=string



3.4.4、HTTP POST响应


HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<WsCallResponse xmlns="http://tempuri.org/">
  <ReturnStatus>int</ReturnStatus>
  <Message>string</Message>
  <CallList>
    <WsCallBox>
      <Mobile>string</Mobile>
      <TaskID>int</TaskID>
      <Content>string</Content>
      <ReceiveTime>string</ReceiveTime>
      <Extno>string</Extno>
    </WsCallBox>
    <WsCallBox>
      <Mobile>string</Mobile>
      <TaskID>int</TaskID>
      <Content>string</Content>
      <ReceiveTime>string</ReceiveTime>
      <Extno>string</Extno>
    </WsCallBox>
  </CallList>
</WsCallResponse>


4.余额查询接口


4.1、请求URL,请求方式 WebService

https://www.suisms.net/SmsWebService.asmx?wsdl


4.2、调用接口


 QueryOverage(string userid, string account, string password)


4.3、参数说明


参数名称含义说明
userid企业id企业ID
account用户帐号用户帐号
password帐号密码用户账号对应的密码


4.4、请求和响应


响应为WsOverageResponse,具体定义如下:


元素名称含义说明
ReturnStatus获取状态Success 成功      Faild 失败
Message描述用户帐号
PayInfo付费方式预付费    后付费
Overage余额剩余余额
SendTotal总条数总充值条数



4.4.1、SOAP 1.2请求


以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。


POST /clientsite/SmsWebService.asmx HTTP/1.1
Host: localhost
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <QueryOverage xmlns="http://tempuri.org/">
      <userid>string</userid>
      <account>string</account>
      <password>string</password>
    </QueryOverage>
  </soap12:Body>
</soap12:Envelope>


4.4.2、SOAP 1.2响应


HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <QueryOverageResponse xmlns="http://tempuri.org/">
      <QueryOverageResult>
        <ReturnStatus>string</ReturnStatus>
        <Message>string</Message>
        <PayInfo>string</PayInfo>
        <Overage>int</Overage>
        <SendTotal>int</SendTotal>
      </QueryOverageResult>
    </QueryOverageResponse>
  </soap12:Body>
</soap12:Envelope>


4.4.3、HTTP POST请求


以下是 HTTP POST 请求和响应示例。所显示的占位符需替换为实际值。


POST /clientsite/SmsWebService.asmx/QueryOverage HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: length
 
userid=string&account=string&password=string



4.4.4、HTTP POST响应


HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<WsOverageResponse xmlns="http://tempuri.org/">
  <ReturnStatus>string</ReturnStatus>
  <Message>string</Message>
  <PayInfo>string</PayInfo>
  <Overage>int</Overage>
  <SendTotal>int</SendTotal>
</WsOverageResponse>



现在注册,即享新手专属礼包!

立即免费注册

正规资质

工信部核准资质,移动、电信、联通金牌合作伙伴

价格透明

明码标价不欺瞒客户,坚决抵制扣量、漏发等行为

信息保密

所有客户信息严格保密,保护客户信息免遭外泄

售后无忧

专业团队提供免费技术支持,7X24小时售后服务

QQ咨询

QQ号码

143761

扫一扫

扫码关注 · 接收账户异常报警 · 消费账单随时查 · 活动及最新平台信息

返回顶部