Xml API
SMS Xml Api
SMS Xml Api allows you to integrate our sms service to your own web based / stand alone applications.
$xml = ‘<?xml version=”1.0″ encoding=”UTF-8″?>
<message>
<key>Account key</key>
<sms>Message</sms>
<templateid>DLT_Templateid</templateid>
<sender>Sender id</sender>
<route>Route</route>
<number>Number</number>
<number>Number 2</number>
</message>’;
$xml = urlencode($xml);
https://app.smslocal.in/api/smsxml?xml=$xml
Description
# | Parameter | Description | Example |
---|---|---|---|
1 | key | Your account API key | <key>0ec0e29706c4e213a2910b54147c1d5c</key> |
2 | sender | Sender id | <sender>ALERTS</sender> |
3 | number | Destination numbers |
<number>99XXXXXXXX</number> <number>98XXXXXXXX</number>
|
4 | route | Route you want to send SMS (Transactional - 1) | <route>2</route> |
5 | sms | SMS content | <sms>Hello user</sms> |
6 | templateid | DLT Template ID | <templateid>123XXXXXXXXXXXXXXXX</templateid> |
Error Codes
- 101 : Invalid user
- 102 : Invalid sender ID
- 103 : Invalid contact(s)
- 104 : Invalid route
- 105 : Invalid message
- 106 : Spam blocked
- 107 : Promotional block
- 108 : Low credits in the specified route
- 109 : Promotional route will be working from 9am to 8:45pm only
- 110 : Invalid DLT Template ID
- 111 : No SMSC
Delivery Report Api
SMS Delivery Report Xml Api allows you to get delivery report of a slot sent via Api as XML format.
$xml = ‘<?xml version=”1.0″ encoding=”UTF-8″?>
<deliveryreport>
<key>Account key</key>
<messageid>Unique id</messageid>
</deliveryreport>’;
$xml = urlencode($xml);
https://app.smslocal.in/api/dlrxml?xml=$xml
Description
# | Parameter | Description | Example |
---|---|---|---|
1 | key | Your account API key | 0ec0e29706c4e213a2910b54147c1d5c |
2 | messageid | Unique message id returned by SMS Api | 987650 |
Error Codes
- 101 : Invalid user
- 110 : Invalid message id
Sample XML will be like
<xml>
<report>
<number>Number</number>
<status>Status</status>
<time>Date Time</time>
</report>
<report>
<number>Number 2</number>
<status>Status 2</status>
<time>Date Time 2</time>
</report>
</xml>
Credits Check Api
Available credits Api allows you to get currently available credits of a given route.
$xml = ‘<?xml version=”1.0″ encoding=”UTF-8″?>
<creditscheck>
<key>Account key</key>
<route>Route</route>
</creditscheck>’;
$xml = urlencode($xml);
https://app.smslocal.in/api/creditxml?xml=$xml
Description
# | Parameter | Description | Example |
---|---|---|---|
1 | key | Your account API key | 0ec0e29706c4e213a2910b54147c1d5c |
2 | route | Route you want to check credits (Transactional - 1) | 2 |
Error Codes
- 101 : Invalid user
- 104 : Invalid route
Sample XML will be like
<creditreport>
<route>Route</route>
<credits>Available credits</credits>
</creditreport>