xml API

Developer / Xml API

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
   <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 0ec0e26506c4e213a2918b54048c1d3c
2 sender Sender id ALERTS
3 number Destination numbers 92XXXXXXXX,87XXXXXXXX
4 route Route you want to send SMS (Transactional - 1) 4
5 sms SMS content (Url encoded) Hello+useName
6 templateid DLT Template ID 448XXXXXXXXXXXXXXXX

Code errors

  • 101: User is invalid
  • 102: Sender ID is invalid
  • 103: Contact(s) are invalid
  • 104: Route is invalid
  • 105: Message is invalid
  • 106: Spam Blocked
  • 107: Promotional Block
  • 108: Low Credits in the Specified Route
  • 109: Promotional Route Availability
  • 110: Invalid DLT
  • 111: No SMSC
A numeric value other than these error codes is the unique message id for the sent slot. Keep this message id for delivery report.

Delivery Report Api

The SMS Delivery Report API enables you to retrieve the delivery report for a slot sent through the API in JSON 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 0ec0e31506c4e213a2910b618874c1d6c
2 sender Sender id ALERTS

Code errors

  • 101: User is not valid
  • 110: Message ID is invalid
A successive api return a JSON file containing the sent destination numbers with delivery report.

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

description

# Parameter Description Example
1 key Your account API key 0ec0e27406c4e213a2910b509137c1d5c
2 messageid Unique message id returned by SMS Api ALERTS

Code errors

  • 101: User is invalid
  • 104: Route is invalid
A successive api return a JSON file containing the route name and credits

$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 0ec0e27406c4e213a2910b509137c1d5c
2 route Route you want to check credits (Transactional - 1) ALERTS

Sample XML will be like

<creditreport>
      <route>Route</route>
      <credits>Available credits</credits>
</creditreport>