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);
http://login.messageaspire.com/api/smsxml?xml=$xml

Description

# Parameter Description Example
1 key Your account API key <key>27c60becba5bf19b92589d1c344a80ba</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, Promo SID - 2, Promotional - 3, Promo DND - 4, Trans OTP - 6, Service Implicit - 7, Service Explicit - 8) <route>2</route>
5 sms SMS content <sms>Hello user</sms>
6 templateid DLT Template ID <templateid>123XXXXXXXXXXXXXXXX</templateid>
* All special character included content should be in urlencode format.
  • 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

* 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

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);
http://login.messageaspire.com/api/dlrxml?xml=$xml

Description

# Parameter Description Example
1 key Your account API key 27c60becba5bf19b92589d1c344a80ba
2 messageid Unique message id returned by SMS Api 987650
* Give the exact message id.
  • Error Codes

    • 101 : Invalid user
    • 110 : Invalid message id

* A successive api return a XML 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

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);
http://login.messageaspire.com/api/creditxml?xml=$xml

Description

# Parameter Description Example
1 key Your account API key 27c60becba5bf19b92589d1c344a80ba
2 route Route you want to check credits ( Transactional - 1, Promo SID - 2, Promotional - 3, Promo DND - 4, Trans OTP - 6, Service Implicit - 7, Service Explicit - 8) 2
* Give the exact route id.
  • Error Codes

    • 101 : Invalid user
    • 104 : Invalid route

* A successive api return a XML file containing the route name and credits

Sample XML will be like

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

NOTE:- API Key Will Be in your Account