Anda di halaman 1dari 3

XML API

XML API 1
XML sms can be sent by posting the values to the url

http://<SMS_Service_URL>/api/xmlapi.php

Using two methods i.e. POST and GET

POST METHOD

An from interface has to be created and the value has to be posted


<input name="data" type="text">

GET METHOD

http://<SMS_Service_URL>/api/xmlapi.php?data=<xmlapi>.....</xmlapi>

<xmlapi>
<auth>
<apikey>xxxxxx</apikey>
</auth>
<sendSMS>
<to>99XXXXXXXX,98XXXXXXXX</to>
<text>HELLO</text>
<msgid>CUSTOMID1,CUSTOMID2</msgid>
<dlrurl>http://test.dlrurl.com</dlrurl>
</sendSMS>
<schedule>DDMMYYhhmm</schedule>
<Unicode>N</unicode>
<response>Y</response>
</xmlapi>

Sl No PARAMETER NAME PARAMETER VALUE PARAMETER DESCRIPTION


1. Apikey Key Value Api key generated from sms account
2. To 98xxxxxxxx,99xxxxxxxx Destination mobile number
3. Text HELLO Message to be sent
4. Msgid CUSTOMID1 Unique Client message id reference
5. Dlrurl http://test.dlrurl.com Delivery report url
6. Schedule 280220111800 DD Schedule date
MM Schedule Month
YYYY Schedule Year
hh schedule hours in 24 hours format
mm - schedule minute e.g. 00,15,30,45
7. Unicode Y/N Y If you want to send sms in Unicode
format
N If you want to send normal sms
8. Response Y/N Y will generate XML output
N will generate simple report e.g.
TOTAL=TOTALSMS SENT=TOTALSENT
CREDITS=USEDCREDITS

XML API 2
Response
If all the values are correct and response if marked as Y browser will return as

<xmlresp>
<to>98xxxxxxxx </to>
<msgid>3215651</msgid>
<clientid>CUSTOMID1</clientid>
<status>SUBMITD</status>
<to>99xxxxxxxx</to>
<msgid>3215652</msgid>
<clientid>CUSTOMID2</clientid>
<status>SUBMITD</status>
</xmlresp>

Sl No PARAMETER NAME PARAMETER VALUE PARAMETER DESCRIPTION


1. To 98xxxxxxxx If multiple sms are sent the response xml will
divide each number
2. Msgid Xxxxxx System generated message id
3. Clientid CUSTOMID1 Client generated unique id
4. Status SUBMITD Status of the sms

If response is Not specified or it is N

TOTAL=<Total SMS> SENT=<NO OF SMS SENT> CREDITS=<Credits that were charged>

If dlrurl and msgid is specified the status report will be sent to the user in HTTP API format.

Please refer to HTTP API documentation for report status

XML API 3