sms api document

sms api document


Sms Report

<h1>Report query</h1> <h5>Description</h5> <ul> <li>This interface is used to query short message sending reports</li> </ul> <h5>Request url</h5> <ul> <li><code>http://ip:port/api/v1/sms/report</code></li> </ul> <h5>Request method</h5> <ul> <li>GET</li> </ul> <h5>Request example</h5> <pre><code> http://ip:port/api/v1/sms/report?account=***&amp;amp;sign=***&amp;amp;datetime=***&amp;amp;ids=48d5112288668ebb049dbb9034402910,c11d34242000e541f63fbdef3e36b1db</code></pre> <h5>Request body</h5> <table> <thead> <tr> <th style="text-align: left;">parameter</th> <th style="text-align: left;">required</th> <th style="text-align: left;">type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">account</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>username</td> </tr> <tr> <td style="text-align: left;">sign</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>MD5 signature (For details, see Interface Description. Sign Signature Generation Method)</td> </tr> <tr> <td style="text-align: left;">datetime</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>GMT+8 current half-hour time in the format of time stamp</td> </tr> <tr> <td style="text-align: left;">ids</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>Specify the SMS id to query the sending results. (This id is returned by the system when submitting. Multiple ids are separated by commas (up to 200).</td> </tr> </tbody> </table> <h5>Responses</h5> <pre><code> { &amp;quot;status&amp;quot;:0, &amp;quot;msg&amp;quot;:&amp;quot;****&amp;quot;, &amp;quot;data&amp;quot;:[ &amp;quot;success&amp;quot;:1, &amp;quot;fail&amp;quot;:1, &amp;quot;unsent&amp;quot;:0, &amp;quot;sending&amp;quot;:0, &amp;quot;nofound&amp;quot;:0, &amp;quot;array&amp;quot;:[ [48d5112288668ebb049dbb9034402910,&amp;quot;86136****1111&amp;quot;,1628847497,0], [c11d34242000e541f63fbdef3e36b1db,&amp;quot;8613722222222&amp;quot;,1628847497,3] ] ] }</code></pre> <h5>Responses body</h5> <table> <thead> <tr> <th style="text-align: left;">parameter</th> <th style="text-align: left;">type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">status</td> <td style="text-align: left;">int</td> <td>0:Submitted successfully&lt;br&gt;-1:auth error</td> </tr> <tr> <td style="text-align: left;">msg</td> <td style="text-align: left;">string</td> <td>Prompt message</td> </tr> <tr> <td style="text-align: left;">data['success']</td> <td style="text-align: left;">int</td> <td>Number of successful submissions</td> </tr> <tr> <td style="text-align: left;">data['fail']</td> <td style="text-align: left;">int</td> <td>Number of submission failures</td> </tr> <tr> <td style="text-align: left;">data['unsent']</td> <td style="text-align: left;">int</td> <td>Number of unsent messages</td> </tr> <tr> <td style="text-align: left;">data['sending']</td> <td style="text-align: left;">int</td> <td>Number of packets being sent</td> </tr> <tr> <td style="text-align: left;">data['nofound']</td> <td style="text-align: left;">int</td> <td>id Number of bars not found</td> </tr> <tr> <td style="text-align: left;">data['array']</td> <td style="text-align: left;">array</td> <td>In sequence in a single array&lt;br&gt;array[0] : unique message ID(string)&lt;br&gt;array[1] : number (string)&lt;br&gt;array[2] : send time (GMT+8 timestamp)&lt;br&gt;array[3] : status (int) 0: being sent. 1: The message is sent successfully. Not 0,1: sending failed</td> </tr> </tbody> </table> <h1>Report push</h1> <h5>Description</h5> <ul> <li>The interface actively pushes the SMS status report to the sender. When the SMS is sent, the system actively pushes the status report to the server of the sender. The sender needs to provide the URL of the receiving interface and reply 200 OK response after receiving the push</li> </ul> <h5>Request method</h5> <ul> <li>POST</li> </ul> <h5>Request header</h5> <ul> <li>Content-Type: application/json</li> </ul> <h5>Request example</h5> <pre><code> { &amp;quot;type&amp;quot;:&amp;quot;sms&amp;quot;, &amp;quot;cnt&amp;quot;:2, &amp;quot;array&amp;quot;:[ [&amp;quot;48d5112288668ebb049dbb9034402910&amp;quot;,&amp;quot;86136****1111&amp;quot;,1628847497,1,&amp;quot;success&amp;quot;,&amp;quot;20221102xxxxx&amp;quot;], [&amp;quot;c11d34242000e541f63fbdef3e36b1db&amp;quot;,&amp;quot;8613722222222&amp;quot;,1628847497, -9, &amp;quot;number error&amp;quot;,&amp;quot;20221102xxxxx&amp;quot;] }</code></pre> <h5>body</h5> <table> <thead> <tr> <th style="text-align: left;">parameter</th> <th style="text-align: left;">type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">type</td> <td style="text-align: left;">string</td> <td>Report type</td> </tr> <tr> <td style="text-align: left;">cnt</td> <td style="text-align: left;">int</td> <td>Number of reports included in this push (no more than 50 reports per request)</td> </tr> <tr> <td style="text-align: left;">array</td> <td style="text-align: left;">array</td> <td>In sequence in a single array&lt;br&gt;array[0] : unique message ID(string)&lt;br&gt;array[1] : number (string)&lt;br&gt;array[2] : send time (GMT+8 timestamp)&lt;br&gt;array[3] : status (int) 0: being sent. 1: The message is sent successfully. Not 0,1: sending failed&lt;br&gt;array[4] : Status description (string)&lt;br&gt;array[5] : batch number (string)</td> </tr> </tbody> </table>

页面列表

ITEM_HTML