Sending Messages (HTTP Parameter based)
The API supports XML and Parameter based sending.
Parameter Based
Make use of parameter driven variables to send.
The function accepts the following parameters:
- Type (String) = “sendparam”
- Username (String)
- Password (String)
Examples:
Send to Single Number:
https://legacy.mymobileapi.com/api5/http5.aspx?Type=sendparam&username=xxx&password=
yyy&numto=1234567890&data1=mytestmsg
Send to Multiple Numbers:
https://legacy.mymobileapi.com/api5/http5.aspx?Type=sendparam&username=xxx&password=
yyy&numto=1234567890,9876543210&data1=mytestmsg
Parameter | Description | Default |
---|---|---|
- live | If Live = false then it will return the result but won’t send the data. It won’t appear in your sent report. | True |
return_credits | If True then the current Credits count will be returned. | Fasle |
return_msgs_credits_used | If True then the amount of credits used will be returned. | False |
return_msgs_success_count | If True then the total success data count will appear in the result. | False |
return_entries_failed_status | If True then the total failed data count will appear in the result. | False |
return_entries_success_status | If True then the total success data count will appear in the result. | False |
return_entries_failed_status | If True then the data that is rejected will be returned in the result. | False |
senderid | This determines where the message will come from. Only certain accounts can alter this. | Repliable |
numto | The number you wish to send your data to. | "" |
date | This is the date the messages must be sent out. Format is dd/MMM/yyyy eg: 13/apr/2009 | - |
time | This is the time the messages must be sent out. Format is HH:mm eg: 17:34 | - |
curdate | This is the current date on your server. It is used to determine when your messages should go out. If not used then the server date is used. | Server Date |
curtime | This is the current time on your server. It is used to determine when your messages should go out. If not used then the server time is used. | Server Time |
data1 | The data you wish to send | "" |
msgtype | This defines the type of message you wish to send. Values can be SMS / SMSR / VCARD / WPUSH / PORT | SMS |
costcentre | User Defined | "" |
customerid | The customerid is a field that is populated that has meaning to your system. This field can be returned in the result sets and can make updating data very easy. We suggest using a GUID or Identity key. | "" |
mo_forwardemail | All incoming replies will be forwarded to this email. | "" |
validityperiod | The amount of time in hours an SMS should remain valid. The network will continue to try to deliver the SMS over the validity period. | - |
Post Paid Customers
Return Credits will always return a value of 1000000 on Post Paid accounts as no credit deduction occurs on this account type.
All entries marked with * are mandatory
The output of the following XML example is defined by the input of the above parameters:
<api_result>
<entries_failed>
<numto/>
<customerid/>
<reason>numto invalid</reason>
</entries_failed>
<entries_success>
<numto>2782*******</numto>
<customerid>UnqiueValue1</customerid>
</entries_success>
<entries_success>
<numto>2782*******</numto>
<customerid>UnqiueValue1</customerid>
</entries_success>
<numto>2782*******</numto>
<customerid>example1</customerid>
</entries_success>
<send_info>
<eventid>27105067</eventid>
<credits>39763</credits>
<msgs_credits_used>3</msgs_credits_used>
<msgs_success>3</msgs_success>
<msgs_failed>1</msgs_failed>
</send_info>
<call_result>
<result>True</result>
<error/>
</call_result>
</api_result>
XML tag | Description |
---|---|
entries_failed | If this tag exists then some of the data you pushed has errors. It will contain: “numto”, “customerid” and “reason”. The reason will be: numto invalid senderid invalid time invalid costcentre invalid type invalid data1 invalid |
entries_success | If this tag exists then it will contain “numto” and “customerid”. |
send_info | This describes the overall data returned. It WILL contain “eventid” and COULD have “credits”, “msgscredits_used”, “msgs_success” and “msgs_failed”. credits = credits remaining in account msgs_credits_used = the amount of credits used msgssuccess = a count of the messages accepted for delivery msgs_failed = a count of the messages rejected |
Updated about 2 months ago