Description
This API may be used to create alerts from any external systems using HTTP POST method.This API expects an XML file as an input
which must be URL - encoded and when the request comes,the customer identity is validated first and then it parses the XML file.
Each mobile number passed in the XML file will be treated as a customer contact and if that mobile number doesn’t already exist
in the contacts list,a new contact is created automatically.Once the contact lookup/creation is done then the alerts will be
created and scheduled as per the XML file request.
URL
http://www.Alerts360.com/api/SmsBatch.aspx
API Request XML
USERNAME - Alerts360 Username (Required)
PASSWORD - Alerts360 Password (Required)
Each XML File can have any number of Messages
Each
MESSAGE should have the following values
MID - A Sequence which can be used to identify each Message. This is an attribute of the MESSAGE tag.
TEXT - Description of the Message that is sent to the contacts. If the Text length is greater than 140 characters it will be sent in multiple Messages.
ALERT- Contains the following attributes
TO - One or more Mobile Numbers Required. Multiple Mobile Numbers should be Comma delimited.
TIME - Date Time. If the date time is in the future an alert will get scheduled. If the value is missing or invalid the alert will get transmitted right away.
INDEX– A Sequence which can be used to identify each Alert. This is an attribute of the ALERT tag.
API Response XML
RESPCODE- 0 For Success else Error Code.
RESPMSG- Message.
MSGID- Message Id passed in the request.
Response Codes
“0” - Success
“-1” - Unexpected Error
“-100” - Invalid Credentials Passed
“-1000” - Invalid Mobile Number(s) List
“-1001” - Blank Message Passed.
Sample XML Request
<
? xml version="1.0" encoding="UTF-8"?>
<
REQ>
<
USER>
<
USERNAME>User Name<
/USERNAME>
<
PASSWORD>Password<
/PASSWORD>
<
/USER>
<
MESSAGE>
<
TEXT>you have an appointment @5:30PM tomorrow<
/TEXT>
<
MID>1
>/MID>
<
ALERT> TO="1234567890" TIME="1/30/2010 10:47:49" INDEX=”1”/>
<
/MESSAGE>
<
MESSAGE>
<
TEXT>Your need to come with x-ray reports tomorrow<
/TEXT>
<
MID>2<
/MID>
<
ALERT TO="1234567890" TIME="1/30/2010 10:47:49" INDEX=”1”/>
<
ALERT TO="5555555555, 6666666666" TIME ="1/30/2010 16:47:49" INDEX=”2”/>
<
ALERT TO ="7777777777" INDEX=”3’/>
<
/MESSAGE>
<
/REQ>
Sample XML Response
<
? xml version="1.0" encoding="UTF-8"?>
<
RESPONSE>
<
MSG ID="1"
NDEX="1"
RESPCODE="0"
RESPMSG="Success"
SUBMITDATE="20/04/2010 15:48"/>
<
MSG ID="2"
INDEX="1"
RESPCODE="0"
RESPMSG="Success"
SUBMITDATE="20/04/2010 15:48"/>
<
MSG ID="2"
INDEX="2"
RESPCODE="0"
RESPMSG="Success"
SUBMITDATE="20/04/2010 15:48"/>
<
MSG ID="2"
INDEX="3"
RESPCODE="0"
ESPMSG="Success"
SUBMITDATE="20/04/2010 15:48"/>
<
/RESPONSE>