SystorSMS


Click here for a complete list of operations.

SendMessageJson

Send one or more sms. This method returns a sent status for each message. 
A single line with an error message will be returned if an invalid login or illegal IP is used. 
    Parameters:
        sJsonData            String with json format. 

          {"sUser":"login", "sPass":"passord", "SMS":[{"sFrom":"originator","sRecv":"receiver","sMsg":"message","nForeign":"","nValidity":"","dtHoldUntil":""}]}
          
          sUser                  Account username. This field is required. String.
          sPass                  Account password. This field is required. String.
          SMS (list)
              sFrom          The SMS originator. If an illegal originator is used, then the system will use an originator registered to your account or 26001
              sRecv          The recipient's phone number. This field is required.
              sMsg           The message. String with max 1530 characters. This field is required.
              nForeign       Your unique 32bit message identifier (set to 0 if not used). The message identifier is used for referencing optional delivery reports. This field is optional.
              nValidity      Default value is 10080 minutes which means we will try to deliver this sms for a week. Use an empty string or a number between 180 and 10080. This field is optional.
              dtHoldUntil    Time of delivery. Empty string or datetime with format 'yyyy-MM-dd HH:mm' ie '2017-05-23 19:30'. SMS with invalid dates are sent without delay. This field is optional.
        
    Return value. String with json. 
      (list) 
        sRecv                The recipient's phone number. 
        sFrom                The SMS originator. If an illegal originator is used then the system will use an originator registered to your account or 26001
        nForeign             This is your message id. String with integer above zero. Empty string when not in use. 
        bSent                True if the message was sent. See tErrorMessage for details when this value is False. Boolean.
        tErrorMessage        Error message. Empty string if bSent is True. String.

    Example: 
        {"sUser":"validlogin1", "sPass":"validpassord1", "SMS":[
             {"sFrom":"SystorVest","sRecv":"123","sMsg":"testmsg1","nForeign":"2001234"}
            ,{"sFrom":"SystorVest","sRecv":"+4741109511","sMsg":"testmsg1","nForeign":"2001235","dtHoldUntil":"2018-01-23 19:30"}
            ,{"sFrom":"SystorVest","sRecv":"47933155","sMsg":"testmsg2"}
        ]}

    Return value for the previous example: (Note that 123 is not a valid receiver.)
        [{"sFrom":"SystorVest","sRecv":"123","nForeign":"2001234","bSent":false,"sErrorMessage":"Invalid receiver. "}
        ,{"sFrom":"SystorVest","sRecv":"+4741109511","nForeign":"2001235","bSent":true,"sErrorMessage":""}
        ,{"sFrom":"SystorVest","sRecv":"47933155","nForeign":"","bSent":true,"sErrorMessage":""}]

Test

To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
sJsonData:

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /systorsmsvarious/systorsmsvarious.asmx HTTP/1.1
Host: smsalert.no
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.systorvest.no/SendMessageJson"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SendMessageJson xmlns="http://www.systorvest.no/">
      <sJsonData>string</sJsonData>
    </SendMessageJson>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SendMessageJsonResponse xmlns="http://www.systorvest.no/">
      <SendMessageJsonResult>string</SendMessageJsonResult>
    </SendMessageJsonResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /systorsmsvarious/systorsmsvarious.asmx HTTP/1.1
Host: smsalert.no
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <SendMessageJson xmlns="http://www.systorvest.no/">
      <sJsonData>string</sJsonData>
    </SendMessageJson>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <SendMessageJsonResponse xmlns="http://www.systorvest.no/">
      <SendMessageJsonResult>string</SendMessageJsonResult>
    </SendMessageJsonResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /systorsmsvarious/systorsmsvarious.asmx/SendMessageJson?sJsonData=string HTTP/1.1
Host: smsalert.no
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.systorvest.no/">string</string>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /systorsmsvarious/systorsmsvarious.asmx/SendMessageJson HTTP/1.1
Host: smsalert.no
Content-Type: application/x-www-form-urlencoded
Content-Length: length

sJsonData=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.systorvest.no/">string</string>