Versions Compared

Key

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

Permette di eseguire l'invio di un messaggio SMS  

Sends a text message (SMS)

Method parameters

  • string SendSMS(string accessKey, int listID, int smsID, Option[] options)
    • accessKey:

...

  • from: una stringa contenente il mittente SMS, se non indicato viene utilizzato quello impostato per la lista
  • send_to: (obbligatorio) una stringa che indica a chi dovrà essere fatto l'invio. send_to=ALL invia a tutti gli iscritti, send_to=RECIPIENTS invia ad un elenco di numeri, send_to=GROUPS invia agli iscritti appartenenti a determinati gruppi
  • recipients: una stringa che identifica i destinatari dell'invio. Assume un significato diverso a seconda del valore send_to. send_to=ALL il parametro recipients viene ingnorato ed il messaggio verrà inviato a tutti gli iscritti SMS della lista. send_to=RECIPIENTS, il parametero recipients contiene l'elenco dei numeri di cellulare separati dal carattere ; send_to=GROUPS il parametro recipients conterrà l'elenco dei gruppi (devono essere passati gli identificativi) separati dal carattere;
  • exclude: una stringa contenente l'elenco dei gruppi (identificativi) separati dal carattere ; da escludere dall'invio
  • filter: una stringa contenente l'elenco dei filtri (identificativi) separati dal carattere ; da utilizzare per individuare gli utenti ai quali dovrà essere inviato il messaggio.
  • filter_as: una stringa che identifica la modalità con la quale devo essere applicati i filtri.
  • filter_as=AND, tutti i filtri devono essere soddisfatti; filter_as:OR almeno uno dei filtri deve essere soddisfatto.
  • deliverydt: una stringa contenente la data e l'ora per la quale deve essere schedulato lapartenza dell'invio. Il formato deve essere il seguente: yyyyMMddHHmmss. Se nonspecificato l'invio inizia immediatamente ed in caso di invio già in corso il messaggio vieneaccodato a quelli in uscita.
  • timezone: un intero che identifica il fuso orario

...

    • 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 (note: restrictions may apply in some countries and the sender may be overwritten, please contact us for country specific information)
      • 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>5</listID>
	<smsID>23</smsID>
	<deliveryID>63</deliveryID>
	<deliveryStatus>Sending in progress</deliveryStatus>
	<cost>0.8</cost>
</SendSMSResult>