Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Method parameters

Sends a text message (SMS)

  • string SendSMS(string accessKey, int listID, int smsID, Option[] options)
    • accessKey: access key to check credentials
    • listID: list identifier
    • smsID: ID of the message to be sent
    • options: an array of key/value pairs for options setting
      • from: a string containing the sender mobile number. If not specified, the default value for the list will be used
      • send_to: a mandatory string indicating to whom the message will be sent. If send_to=ALL the message is sent to all subscribers, if send_to=RECIPIENTS the message is sent to specific phone numbers, if send_to=GROUPS the message is sent to subscribers to specific groups
      • recipients: a string indicating the recipients of the message. Its content depends on the value assumed by "send_to". If send_to = ALL, "recipients" parameter is ignored and the message is sent to all the recipients in the list; if send_to=RECIPIENTS, "recipients" parameter contains a list of mobile numbers separated by the ";" character; if send_to=GROUPS, the "recipients" parameter contains the IDs of the recipient groups, separated by the ";," character (IDs must be passed)
      • exclude: a string containing the IDs of the groups to be excluded from the sending, separated by the ";" character
      • filters: a string containing the IDs of the filters separated by the ";," character, to be used to retrieve the recipients of the message
      • filters_as: a string indicating how to apply the filters: if filters_as=AND, all the conditions in the filters have to be met; if filters_as=OR, at least one of them
      • deliverydt: a string containing date and time of scheduled delivery, in the format yyyyMMddHHmmss. If not specified, the sending starts immediately, and in case another sending is in progress the message is queued
      • timezone: an integer indicating the time zone
      • isUnicode: boolean value indicating whether to use Western alphabets only (false), or Eastern alphabets as well, such as Arabic, Russian, Chinese, and so on (true).

If error code=0, the message will contain the ID of the sending

...

 

Tip

To retrieve filter ID in MailUp admin console you can put your mouse cursor on the "modify filter" button. You will see a tooltip (usually in the bottom left button of your page) that has the following format: http://consoleHostName/console/form_upd_filtro.aspx?id=NN, where NN is the filter ID that you could use when calling SendSMS method

 

SOAP Examples

 

Code Block
languagehtml/xml
titleSOAP request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://services.mailupnet.it/WS">
	<soapenv:Header/>
	<soapenv:Body>
	<ws:SendSMS>
	<!--Use accessKey value that is returned by LoginFromId method-->
	<ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9</ws:accessKey>
	<ws:listID>5</ws:listID>
        <ws:smsID>23</ws:smsID>
        <ws:options>
		<ws:Option><ws:Key>from</ws:Key><ws:Value>YourDealer</ws:Value></ws:Option>
		<ws:Option><ws:Key>send_to</ws:Key><ws:Value>GROUPS</ws:Value></ws:Option>
		<ws:Option><ws:Key>recipients</ws:Key><ws:Value>141,142</ws:Value></ws:Option>
		<ws:Option><ws:Key>exclude</ws:Key><ws:Value>48</ws:Value></ws:Option>
		<ws:Option><ws:Key>filters</ws:Key><ws:Value>45,46</ws:Value></ws:Option>
		<ws:Option><ws:Key>filters_as</ws:Key><ws:Value>AND</ws:Value></ws:Option>
		<ws:Option><ws:Key>deliverydt</ws:Key><ws:Value></ws:Value></ws:Option>
		<ws:Option><ws:Key>timezone</ws:Key><ws:Value>1</ws:Value></ws:Option>		
		<ws:Option><ws:Key>isUnicode</ws:Key><ws:Value>false</ws:Value></ws:Option>
	</ws:options>
      </ws:SendSMS>
   </soapenv:Body>
</soapenv:Envelope>
Code Block
languagehtml/xml
titleSOAP response
linenumberstrue
<SendSMSResult>
	<errorCode>0</errorCode>
	<errorDescription></errorDescription>
<listID>1<	<listID>5</listID>
<smsID>3<	<smsID>23</smsID>
<deliveryID>31<	<deliveryID>63</deliveryID>
	<deliveryStatus>Sending in progress</deliveryStatus>
<cost>1	<cost>0.5<8</cost>
</SendSMSResult>