HTTP Access Guide

This document is intended for those users who wish to develop applications for SMS Solutions using HTTP Access method.
In HTTP Access method, the developer will have to create their own application to submit the message details to NetpiperSMS server, using the parameters explained below. This is the simplest way of the 2 available methods and can be implemented in any platform or any application that has internet connectivity.

Requirements

To use the HTTP Access method, the minimal system configurations are as follows:

  1. Operating System - Any operating system (Windows, Unix, Mac etc)
  2. Development Tool - Any development software with internet accessibility so as to submit HTTP request (POST method).

Encoding

All requests are submitted with a POST or GET call using UTF-8 encoding and URL encoded values. The expected Content-Type for POST is application/x-www-form-urlencoded

API reference

This document is intended for those users who wish to develop applications for SMS Solutions using HTTP Access method.
In HTTP Access method, the developer will have to create their own application to submit the message details to NetpiperSMS server, using the parameters explained below. This is the simplest way of the 2 available methods and can be implemented in any platform or any application that has internet connectivity.

Credit Balance - To get Account Balance

  1. Credit Balance Request
  2. Credit Balance Response

Submit SMS - Submit a SMS to the SMS server

  1. Submit SMS Request – Request to the server
  2. Submit SMS Response – Response from SMS Server

Delivery Report – To check the submitted message delivery status/p>

  1. Delivery Report Request
  2. Delivery Report Response

Short code messages - Mobile Originated (MO) messages from Netpiper 2 WAY Short codes

  1. Short code message Request
  2. Short code message Response

Short code Interface Integration - Integrating third party short code with 2ways SMS Interface

  1. Short Code Interface Integration Request
  2. Short Code Interface Integration Response

Credit Balance

Credit Balance Request

Base URL
http://api2.netpipersms.com/rest/credits
Request URL
http://api2.netpipersms.com/rest/credits?systemid={systemid}&password={password}
Parameters

The following table shows the parameters that need to be used in the request:

Parameter Description Required
systemid Authentication id provided by Netpiper SMS Yes
password Authentication password provided by Netpiper SMS Yes
json
                          
    {
        "HEADER":{
            "systemid":"String content",
            "password":"String content”
        }
    }
                          
                        
xml
                          
    <CREDITREQ>
      <HEADER>
        <systemid>String content</systemid>
        <password>String content</password>
         </HEADER>
    </CREDITREQ>
                          
                        
Example Credit Balance Request
json
                          
    {
        "HEADER":{
            "systemid":"abc",
            "password":"abc123”
        }
    }
                          
                        
xml
                          
<CREDITREQ>
  <HEADER>
    <systemid>abc</systemid>
    <password>abc123</password>
     </HEADER>
</CREDITREQ>
                          
                        

Credit Balance Response

$<major version>.<minor version>$<status>#Credit:<balance credits>#
or
<Error Messages>

Parameters

The following table shows the parameters in the response:

Parameter Description
version Current API Version
commandstatus Success/Failed
credits Available Credit balance in the requested account
error Detailed Error message, if any
json
                          
    {
        "HEADER":{
            "version":"String content",
            "commandstatus":"String content",
            "credits":"String content",
            "error":"String content"
        }
    }
                          
                        
xml
                          
    <CREDITRESP>
      <HEADER>
        <version>String content</version>
        <commandstatus>String content</commandstatus>
        <credits>String content</credits>
        <error>String content</error>
      </HEADER>
    </CREDITRESP>
                          
                        
Example Credit Balance Response – Success
json
                          
   {
  "HEADER":{
    "version":"3.0",
    "commandstatus":"Success",
    "credits":"1653",
    "error":""
  	}
    }
                          
                          
                        
xml
                          
    <CREDITRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <HEADER>
            <version>3.0</version>
            <commandstatus>Success</commandstatus>
            <credits>1653</credits>
            <error/>
        </HEADER>
    </CREDITRESP>
                          
                        
Example Credit Balance Response – Failed
json
                          
    {
      "HEADER":{
        "version":"3.0",
        "commandstatus":"Failed",
        "credits":"0",
        "error":"Invalid Account Details found. Login again."
      }
    }
                          
                        
xml
                          
    <CREDITRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <HEADER>
            <version>3.0</version>
            <commandstatus>Failed</commandstatus>
            <credits>0
            <error>Invalid Account Details found. Login again.</error>
        </HEADER>
    </CREDITRESP>
                          
                        

Submit SMS

Submit SMS Request

Base URL
http://api2.netpipersms.com/rest/submitsm
Request URL
http://api2.netpipersms.com/rest/submitsm?systemid={systemid}&password={password}&destinationaddr={destinationaddr} &shortmessage={shortmessage}&esmclass={esmclass}&sourceaddr={sourceaddr}&test={test}&userdataheader={userdataheader}
Parameters

The following table shows the parameters that need to be used in the request:

Parameter Description Required
systemid Authentication id provided by Netpiper SMS Yes
password Authentication password provided by Netpiper SMS/td> Yes
destinationaddr Destination Mobile number in International format without any leading 0’s. For e.g. destinationaddr=971501111111 Yes
shortmessage The SMS body. Messages where esmclass=sms (the default) are in UTF-8 with URL encoding. For Non-ASCII characters you should use Unicode characters or hexadecimal characters Yes
esmclass sms - for plain text SMSmsms – for Unicode and hexadecimal characters Yes
sourceaddr An alphanumeric string for sender address. Maximum characters allowed is 11 including space. No special characters allowed except “ ” and “-”. For e.g. from=XYZCOMPANY Yes
test 0 – This parameter value should be set to 0 at all times. No
userdataheader If the message is in hexadecimal format and the message type is on esmclass=msms, set this value to userdataheader=ISO No
json
                          
    {
        "HEADER":{
            "systemid":"String content",
            "password":"String content",
            "test":"String content"
        },
        "BODY":[{
            "destinationaddr":"String content",
            "shortmessage":"String content",
            "esmclass":"String content",
            "sourceaddr":"String content",
            "userdataheader":"String content"
        }]
    }

                          
                          
                        
xml
                          
    <SUBMITSMREQ>
      <HEADER>
        <systemid>String content</systemid>
        <password>String content</password>
        <test>String content</test>
      </HEADER>
      <BODY>
        <SMSPDU>
          <destinationaddr>String content</destinationaddr>
          <shortmessage>String content</shortmessage>
          <esmclass>String content</esmclass>
          <sourceaddr>String content</sourceaddr>
          <userdataheader>String content</userdataheader>
        </SMSPDU>
      </BODY>
    </SUBMITSMREQ>                          
                        
Example - Submit one SMS
json
                          
    {
        "HEADER":{
            "systemid":"abc",
            "password":"abc123",
            "test":"0"
        },
        "BODY":[{
            "destinationaddr":"971501111111",
            "shortmessage":"This is a test",
            "esmclass":"sms",
            "sourceaddr":"Netpiper",
            "userdataheader":""
        }]
    }

                          
                          
                        
xml
                          
    <?xml version="1.0" encoding="UTF-8"?>
    <SUBMITSMREQ>
      <HEADER>
        <systemid>abc</systemid>
        <password>abc123</password>
        <test>0</test>
    </HEADER>
    <BODY>
    <SMSPDU>
    	<destinationaddr>971501111111</destinationaddr>
        <shortmessage> This is a test </shortmessage>
        <esmclass>SMS</esmclass>
        <sourceaddr> Netpiper </sourceaddr>
        <userdataheader></userdataheader>
    </SMSPDU>
        </BODY>
    </SUBMITSMREQ>                          
                        
Example - Submit Three SMS
json
                          
{
	"HEADER":{
		"systemid":"abc",
		"password":"abc123",
		"test":"0"
	},
	"BODY":[{
		"destinationaddr":"971501111111",
		"shortmessage":"This is a test",
		"esmclass":"sms",
		"sourceaddr":"Netpiper",
		"userdataheader":""
	},{
		"destinationaddr":"971501111112",
		"shortmessage":"This is a test",
		"esmclass":"sms",
		"sourceaddr":"Netpiper",
		"userdataheader":""
	},{
		"destinationaddr":"971601111113",
		"shortmessage":"This is a test",
		"esmclass":"sms",
		"sourceaddr":"Netpiper",
		"userdataheader":""
	}]
}

                          
                          
xml
                          
<?xml version="1.0" encoding="UTF-8"?>
<SUBMITSMREQ>
  <HEADER>
	<systemid>abc</systemid>
	<password>abc123</password>
	<test>0</test>
</HEADER>
<BODY>
<SMSPDU>
	<destinationaddr>971501111111</destinationaddr>
	<shortmessage>This is a test</shortmessage>
	<esmclass>SMS</esmclass>
	<sourceaddr>Netpiper</sourceaddr>
    <userdataheader></userdataheader>
</SMSPDU>
<SMSPDU>
	<destinationaddr>971501111112</destinationaddr>
	<shortmessage>This is a test</shortmessage>
	<esmclass>SMS</esmclass>
	<sourceaddr>Netpiper</sourceaddr>
    <userdataheader></userdataheader>
</SMSPDU>
<SMSPDU>
	<destinationaddr>971601111113</destinationaddr>
	<shortmessage>This is a test</shortmessage>
	<esmclass>SMS</esmclass>
	<sourceaddr>Netpiper</sourceaddr>
    <userdataheader></userdataheader>
</SMSPDU>
	</BODY>
</SUBMITSMREQ>                          
                        

Submit SMS Response

Sent: 1#Credits: 1#Units Left: 1655 ID: 91E7E204CF910001653554 To: 971501111111 Network: United Arab Emirates
or
Sent: 2#Credits: 2#Units Left: 1653 ID: 91E7E20646450001653555 To: 971501111111 Network: United Arab Emirates ID: 91E7E20646580001653556 To: 971501111112 Network: United Arab Emirates Err: 116 To: 971601111113 Network:
or
Error: Invalid Account Details found. Login again.

Parameters

The following table shows the parameters in the response (only for XML & JSON URLs):

Parameter Description
sent Total message(s) sent
creditsused Total credit(s) used to sent the submitted message(s)
unitleft The remaining balance in User account
error General Submission Error, if any
messageid The ID of the SMS that was submitted
errorcode
Code text
0 Success
105 Invalid Destination Address
106 Invalid Source Address
107 Empty Message
112 Invalid Message Type
113 Message size has exceeded
114 Operator is not supported
116 Operator is not configured
117 Opt out is mandatory for this operator
200 Unknown Error
destinationaddr Submitted mobile Number
network Destination country
json
                          
{
	"HEADER":{
		"sent":"String content",
		"creditsused":"String content",
		"unitleft":"String content",
		"error":"String content"
	},
	"BODY":[{
		"messageid":"String content",
		"errorcode":"String content",
		"destinationaddr":"String content",
		"network":"String content"
	}]
}


                          
                        
xml
                          
    <SUBMITSMRESP>
      <HEADER>
        <sent>String content</sent>
        <creditsused>String content</creditsused>
        <unitleft>String content</unitleft>
        <error>String content</error>
      </HEADER>
      <BODY>
        <SMSPDU>
          <messageid>String content</messageid>
          <errorcode>String content</errorcode>
          <destinationaddr>String content</destinationaddr>
          <network>String content</network>
        </SMSPDU>
      </BODY>
    </SUBMITSMRESP>                          
                        
Example - Successful response, submit one SMS
json
                          
    {
      "HEADER":{
        "sent":"1",
        "creditsused":"1",
        "unitleft":"1662",
        "error":""
      },
      "BODY": [
        {
          "messageid":"91E7E1F719EF0001653547",
          "errorcode":"0",
          "destinationaddr":"971501111111",
          "network":"United Arab Emirates"
        }
      ]
    }

                          
                        
xml
                          
<SUBMITSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <HEADER>
        <sent>1
        <creditsused>1</creditsused>
        <unitleft>1657</unitleft>
        <error/>
    </HEADER>
    <BODY>
        <SMSPDU>
            <messageid>91E7E201731F0001653552</messageid>
            <errorcode>0</errorcode>
            <destinationaddr>971501111111</destinationaddr>
            <network>United Arab Emirates</network>
        </SMSPDU>
    </BODY>
</SUBMITSMRESP>
                          
                        
Example - Successful response, submit Three SMS
json
                          
    {
      "HEADER":{
        "sent":"2",
        "creditsused":"2",
        "unitleft":"1660",
        "error":""
      },
      "BODY": [
        {
          "messageid":"91E7E1F8CCB70001653548",
          "errorcode":"0",
          "destinationaddr":"971501111111",
          "network":"United Arab Emirates"
        },
        {
          "messageid":"91E7E1F8CCDB0001653549",
          "errorcode":"0",
          "destinationaddr": "971501111112",
          "network":"United Arab Emirates"
        },
        {
          "messageid":"",
          "errorcode":"116",
          "destinationaddr":"971601111113",
          "network":""
        }
      ]
    }                          
                        
xml
                          
   	 <sent>2</sent>
        <creditsused>2</creditsused>
        <unitleft>1658</unitleft>
        <error/>
    </HEADER>
    <BODY>
        <SMSPDU>
            <messageid>91E7E1FE67AE0001653550</messageid>
            <errorcode>0</errorcode>
            <destinationaddr>971501111111</destinationaddr>
            <network>United Arab Emirates</network>
        </SMSPDU>
        <SMSPDU>
            <messageid>91E7E1FE67C00001653551</messageid>
            <errorcode>0</errorcode>
            <destinationaddr>971501111112</destinationaddr>
            <network>United Arab Emirates</network>
        </SMSPDU>
        <SMSPDU>
            <messageid/>
            <errorcode>116</errorcode>
            <destinationaddr>971601111113</destinationaddr>
            <network/>
        </SMSPDU>
    </BODY>      
    
                        
                        
Example - Failed response, submit SMS
json
                          
    {
      "HEADER":{
        "sent":null,
        "creditsused":null,
        "unitleft":null,
        "error":"Invalid Account Details found. Login again."
      },
      "BODY":[]
    }
						 
                        
xml
                          
    <SUBMITSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <HEADER>
            <sent i:nil="true"/>
            <creditsused i:nil="true"/>
            <unitleft i:nil="true"/>
            <error>Invalid Account Details found. Login again.</error>
        </HEADER>
        <BODY/>
    </SUBMITSMRESP>
                             
                        

Delivery Report

Delivery Report Request

Base URL
http://report.netpipersms.com/rest/querysm
Request URL
http://report.netpipersms.com/rest/querysm?systemid={systemid}&password={password}&messageid= {messageid}&destinationaddr={destinationaddr}
Parameters

The following table shows the parameters to be used in the request:

Parameter Description Required
systemid Authentication id provided by Netpiper SMS Yes
password Authentication password provided by Netpiper SMS/td> Yes
messageid The ID of the submitted SMS, required if destinationaddr not provided No
destinationaddr Destination Mobile Number, required if messageid not provided No
json
                          
    {
        "HEADER":{
            "systemid":"String content",
            "password":"String content",
            "messageid":"String content",
            "destinationaddr":"String content"
        }
    }
                          
                        
xml
                          
    <QUERYSM>
      <HEADER>
        <systemid>String content</systemid>
        <password>String content</password>
        <messageid>String content</messageid>
        <destinationaddr>String content</destinationaddr>
      </HEADER>
    </QUERYSM>                        
                        
Example Delivery Report Request
json
                          
    {
        "HEADER":{
        "systemid":"abc",
        "password":"abc123",
        "messageid":"91E7E1F8CCB70001653548",
        "destinationaddr":"971501111111"
        }
    }
                          
                        
xml
                          
<QUERYSM>
  <HEADER>
    <systemid>abc</systemid>
    <password>abc123</password>
    <messageid>91E7E1F8CCB70001653548</messageid>
    <destinationaddr>971501111111</destinationaddr>
  </HEADER>
</QUERYSM>
                          
                        

Delivery Report Response

Request URL

<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HEADER><commandstatus>Success</commandstatus><error/></HEADER><BODY><DLR><messageid>91E81965374E0001653606</messageid><destinationaddr>971501111111</destinationaddr><messagestate>SENT</messagestate><finaldategmt>4/26/2016 4:51:17 PM</finaldategmt><network>United Arab Emirates</network></DLR></BODY></QUERYSMRESP>
or
<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HEADER><commandstatus>Success</commandstatus><error/></HEADER><BODY/></QUERYSMRESP>
or
<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HEADER><commandstatus>Failed</commandstatus><error>Authentication Failed</error></HEADER><BODY/></QUERYSMRESP>

Parameters

The following table shows the parameters in the response:

Parameter Description
commandstatus Status of the request. This can be either Success/Failed
error commandstatus status field reason, if success this value will be null
messageid The ID of the SMS that was submitted
destinationaddr Destination mobile number
messagestate Current status of the message. This status will be changed based on the response from service provider
finaldategmt Final messagestate change date and time in GMT(+4 UAE)
network Destination country

Examples

json
                          
    {
        "HEADER":{
            "commandstatus":"String content",
            "error":"String content"
        },
        "BODY":[{
            "messageid":"String content",
            "destinationaddr":"String content",
            "messagestate":"String content",
            "finaldategmt":"String content",
            "network":"String content"
        }]
    }


                          
                          



xml
                          
<QUERYSMRESP>
  <HEADER>
    <commandstatus>String content</commandstatus>
    <error>String content</error>
  </HEADER>
  <BODY>
    <DLR>
      <messageid>String content</messageid>
      <destinationaddr>String content</destinationaddr>
      <messagestate>String content</messagestate>
      <finaldategmt>String content</finaldategmt>
      <network>String content</network>
    </DLR>
    <DLR>
      <messageid>String content</messageid>
      <destinationaddr>String content</destinationaddr>
      <messagestate>String content</messagestate>
      <finaldategmt>String content</finaldategmt>
      <network>String content</network>
    </DLR>
  </BODY>
</QUERYSMRESP>          
                        
Example - Successful response against message id
json
                          
    {
      "HEADER":{
        "commandstatus":"Success",
        "error":""
      },
      "BODY":[
        {
          "messageid":"91E7E1F8CCB70001653548",
          "destinationaddr":"971501111111",
          "messagestate":"DELIVERED",
          "finaldategmt":"4/25/2016 11:53:13 AM",
          "network":"United Arab Emirates"
        }
      ]
    }

                          
                        
xml
                          
<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <HEADER>
        <commandstatus>Success</commandstatus>
        <error/>
    </HEADER>
    <BODY>
        <DLR>
            <messageid>91E7E1F8CCB70001653548</messageid>
            <destinationaddr>971501111111</destinationaddr>
            <messagestate>DELIVERED</messagestate>
            <finaldategmt>4/25/2016 11:53:13 AM</finaldategmt>
            <network>United Arab Emirates</network>
        </DLR>
    </BODY>
</QUERYSMRESP>
                         
                        
Example - Successful response against destination addr
json
                          
{
  "HEADER":{
    "commandstatus":"Success",
    "error":""
  },
  "BODY":[
    {
      "messageid":"91E819CEFAC30001653608",
      "destinationaddr":"971501111111",
      "messagestate":"DELIVERED",
      "finaldategmt":"4/26/2016 5:14:35 PM",
      "network":"United Arab Emirates"
    },
    {
      "messageid":"91E819654AA60001653607",
      "destinationaddr":"971501111111",
      "messagestate":"DELIVERED",
      "finaldategmt":"4/26/2016 4:51:22 PM",
      "network":"United Arab Emirates"
    }]
}

                          
                        
xml
                          
<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <HEADER>
        <commandstatus>Success
        <error/>
    </HEADER>
    <BODY>
        <DLR>
            <messageid>91E819CEFAC30001653608</messageid>
            <destinationaddr>971505175786</destinationaddr>
            <messagestate>SENT</messagestate>
            <finaldategmt>4/26/2016 5:14:35 PM</finaldategmt>
            <network>United Arab Emirates</network>
        </DLR>
        <DLR>
            <messageid>91E819654AA60001653607</messageid>
            <destinationaddr>971501111111</destinationaddr>
            <messagestate>SENT</messagestate>
            <finaldategmt>4/26/2016 4:51:22 PM</finaldategmt>
            <network>United Arab Emirates</network>
        </DLR>
</BODY>
</QUERYSMRESP>		
                        
Example - Failed response
json
                          
    {
      "HEADER":{
        "commandstatus":"Failed",
        "error":"Authentication Failed"
      },
      "BODY":[]
    }
                          
                        
xml
                          
    <QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <HEADER>
            <commandstatus>Failed</commandstatus>
            <error>Authentication Failed</error>
        </HEADER>
        <BODY/>
    </QUERYSMRESP>                          
                        
Example – No Matching record response
json
                          
{
  "HEADER": {
    "commandstatus": "Success",
    "error": ""
  },
  "BODY": []
}                         

                        
xml
                          
    <QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <HEADER>
            <commandstatus>Success</commandstatus>
            <error/>
        </HEADER>
        <BODY/>
    </QUERYSMRESP>	
                        

Short Code messages

Short Code message Request

Base URL
http://sc.netpipersms.com/rest/deliversmpull
Request URL
http://sc.netpipersms.com/rest/deliversmpull?systemid={systemid}&password={password}&campaignid={campaignid}&lastrecordid={lastrecordid}&orderby={orderby}&noofrecords={noofrecords}&sourceaddr={sourceaddr}
Parameters

The following table shows the parameters in the request:

Parameter Description
systemid Authentication id provided by Netpiper SMS
password Authentication password provided by Netpiper SMS
campaignid Campaign id provided by Netpiper SMS
lastrecordid Last pulled record ID. If you set this 0, you will receive all the records from the beginning.
orderby DESC – Sort by last received short message by first ASC - Sort by first received short message by first
noofrecords Number of records pulled from the server in one request
sourceaddr Pull records for a particular mobile number sourceaddr=971501111111

Examples

xml
                          
     {
        "HEADER":{
            "systemid":"String content",
            "password":"String content",
            "campaignid":"String content",
            "lastrecordid":"String content",
            "orderby":"String content",
            "noofrecords":"String content",
            "sourceaddr":"String content"
        }
    }		 
                        
xml
                          
    <DELIVERSMPULLREQ>
      <HEADER>
        <systemid>String content</systemid>
        <password>String content</password>
        <campaignid>String content</campaignid>
        <lastrecordid>String content</lastrecordid>
        <orderby>String content</orderby>
        <noofrecords>String content</noofrecords>
        <sourceaddr>String content</sourceaddr>
      </HEADER>
    </DELIVERSMPULLREQ>                         
                        
Example – Request Short Code Message without Source address
json
                          
    {
        "HEADER":{
            "systemid":"abc",
            "password":"abc123",
            "campaignid":"1070",
            "lastrecordid":"0",
            "orderby":"ASC",
            "noofrecords":"10",
            "sourceaddr":""
            }
    }           
                  			 
                        
xml
                          
    <?xml version="1.0" encoding="utf-8" ?>
    <DELIVERSMPULLREQ>
    <HEADER>
        <systemid>abc</systemid>
        <password>abc123</password>
        <campaignid>1070</campaignid>
        <lastrecordid>0</lastrecordid>
        <orderby>ASC
        <noofrecords>10</noofrecords>
        <sourceaddr/>
    </HEADER>
    </DELIVERSMPULLREQ>  
                        
Example – Request Short Code Message with source address
xml
                          
    {
        "HEADER":{
            "systemid":"abc",
            "password":"abc123",
            "campaignid":"1070",
            "lastrecordid":"0",
            "orderby":"ASC",
            "noofrecords":"10",
            "sourceaddr":"971501111111"
            }
    }                      
    						
                        
xml
                          
    <?xml version="1.0" encoding="utf-8" ?>
    <DELIVERSMPULLREQ>
    <HEADER>
        <systemid>abc</systemid>
        <password>abc123</password>
        <campaignid>1070</campaignid>
        <lastrecordid>0</lastrecordid>
        <orderby>ASC</orderby>
        <noofrecords>10</noofrecords>
        <sourceaddr>971501111111</ sourceaddr>
    </HEADER>
    </DELIVERSMPULLREQ>  
                        

Short Code message Response

Request URL

<DELIVERSMPULLRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HEADER><commandstatus>Success</commandstatus><error/></HEADER><BODY><Record><messageid>7</messageid><sourceaddr>971501111111</sourceaddr><destinationaddr>5122</destinationaddr><shortmessage>Test etisalat</shortmessage><deliverytime>5/24/2012 10:18:00 AM</deliverytime><esmclass>0</esmclass><totalsegments>0</totalsegments><segmentid>0</segmentid><referencenumber>0</referencenumber><operatorcode>Et</operatorcode></Record></BODY></DELIVERSMPULLRESP>
or
<DELIVERSMPULLRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HEADER><commandstatus>Success</commandstatus><error/></HEADER><BODY /></DELIVERSMPULLRESP>
or
<DELIVERSMPULLRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HEADER><commandstatus>Failed</commandstatus><error>Authentication Failed</error></HEADER><BODY /></DELIVERSMPULLRESP>

Parameters

The following table shows the parameters in the response:

Parameter Description
commandstatus Status of the request. This can be either Success/Failed
error commandstatus status field reason, if success this value will be null
messageid Unique id of the message
sourceaddr Message originated mobile number
destinationaddr Designed short code
shortmessage Short message received from Mobile user
deliverytime Message received time
esmclass 0, 2 – English Single SMS 128, 130 – English Multiple SMS
64, 66 – Arabic Single SMS
192, 194 – Arabic Multiple SMS
totalsegments Total parts in the message
segmentid Part number of the message
referencenumber Random reference number to concatenate total segments
operatorcode Operator code. For eg: UAE Etisalat - Et, du - Du

Examples

json
                          
{
	"HEADER":{
		"commandstatus":"String content",
		"error":"String content"
	},
	"BODY":[{
		"messageid":"String content",
		"sourceaddr":"String content",
		"destinationaddr":"String content",
		"shortmessage":"String content",
		"deliverytime":"String content",
		"esmclass":"String content",
		"totalsegments":"String content",
		"segmentid":"String content",
		"referencenumber":"String content",
        "operatorcode":"String content"
	}]
}


                          
                        
xml
                          
    <DELIVERSMPULLRESP>
      <HEADER>
        <commandstatus>String content</commandstatus>
        <error>String content</error>
      </HEADER>
      <BODY>
        <Record>
          <messageid>String content</messageid>
          <sourceaddr>String content</sourceaddr>
          <destinationaddr>String content</destinationaddr>
          <shortmessage>String content</shortmessage>
          <deliverytime>String content</deliverytime>
          <esmclass>String content</esmclass>
          <totalsegments>String content</totalsegments>
          <segmentid>String content</segmentid>
          <referencenumber>String content</referencenumber>
          <operatorcode>String content</operatorcode>
        </Record>
      </BODY>
    </DELIVERSMPULLRESP>                         
                        
Example - Successful response without source address
json
                          
{
  "HEADER":{
    "commandstatus":"Success",
    "error":""
  },
  "BODY":[
    {
      "messageid":"7",
      "sourceaddr":"97150111111",
      "destinationaddr":"5122",
      "shortmessage":"Test Message 1",
      "deliverytime":"5/03/2016 10:18:00 AM",
      "esmclass":"0",
      "totalsegments":"0",
      "segmentid":"0",
      "referencenumber":"0",
      "operatorcode":"Et"
    },
    {
      "messageid":"20882",
      "sourceaddr":"971501111112",
      "destinationaddr":"5122",
      "shortmessage":"Test Message 2",
      "deliverytime":"5/02/2016 9:44:00 AM",
      "esmclass":"0",
      "totalsegments":"0",
      "segmentid":"0",
      "referencenumber":"0",
      "operatorcode":"Et"
}
  ]
}                          

                        
xml
                          
<DELIVERSMPULLRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <HEADER>
        <commandstatus>Success</commandstatus>
        <error/>
    </HEADER>
    <BODY>
        <Record>
            <messageid>7</messageid>
            <sourceaddr>97150111111</sourceaddr>
            <destinationaddr>5122</destinationaddr>
            <shortmessage>Test Message 1</shortmessage>
            <deliverytime>5/03/2016 10:18:00 AM</deliverytime>
            <esmclass>0</esmclass>
            <totalsegments>0</totalsegments>
            <segmentid>0</segmentid>
            <referencenumber>0</referencenumber>
            <operatorcode>Et</operatorcode>
        </Record>
        <Record>
            <messageid>20882</messageid>
            <sourceaddr>971501111112</sourceaddr>
            <destinationaddr>5122</destinationaddr>
            <shortmessage> Test Message 2</shortmessage>
            <deliverytime>5/02/2016 9:44:00 AM</deliverytime>
            <esmclass>0</esmclass>
            <totalsegments>0</totalsegments>
            <segmentid>0</segmentid>
            <referencenumber>0</referencenumber>
            <operatorcode>Et</operatorcode>
        </Record>
    </BODY>
</DELIVERSMPULLRESP>      
                        
Example - Successful response with source address
json
                          
{
  "HEADER":{
    "commandstatus":"Success",
    "error":""
  },
  "BODY":[
    {
      "messageid":"7",
      "sourceaddr":"97150111111",
      "destinationaddr":"5122",
      "shortmessage":" Test Message 1",
      "deliverytime":"5/03/2016 10:18:00 AM ",
      "esmclass":"0",
      "totalsegments":"0",
      "segmentid":"0",
      "referencenumber":"0",
      "operatorcode":"Et"
    },
    {
      "messageid":"20882",
      "sourceaddr":"97150111111",
      "destinationaddr":"5122",
      "shortmessage":"Test Message 2",
      "deliverytime":"5/02/2016 9:44:00 AM",
      "esmclass":"0",
      "totalsegments":"0",
      "segmentid":"0",
      "referencenumber":"0",
      "operatorcode":"Et"
}
  ]
}  

                        
xml
                          
<DELIVERSMPULLRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <HEADER>
        <commandstatus>Success</commandstatus>
        <error/>
    </HEADER>
    <BODY>
        <Record>
            <messageid>7</messageid>
            <sourceaddr>97150111111</sourceaddr>
            <destinationaddr>5122</destinationaddr>
            <shortmessage>Test Message 1</shortmessage>
            <deliverytime>5/03/2016 10:18:00 AM</deliverytime>
            <esmclass>0</esmclass>
            <totalsegments>0</totalsegments>
            <segmentid>0</segmentid>
            <referencenumber>0</referencenumber>
            <operatorcode>Et</operatorcode>
        </Record>
        <Record>
            <messageid>20882</messageid>
            <sourceaddr>971501111111</sourceaddr>
            <destinationaddr>5122</destinationaddr>
            <shortmessage> Test Message 2</shortmessage>
            <deliverytime>5/02/2016 9:44:00 AM</deliverytime>
            <esmclass>0</esmclass>
            <totalsegments>0</totalsegments>
            <segmentid>0</segmentid>
            <referencenumber>0</referencenumber>
            <operatorcode>Et</operatorcode>
        </Record>
    </BODY>
</DELIVERSMPULLRESP>
                        
Example - Failed response
json
                          
    {
      "HEADER":{
        "commandstatus":"Failed",
        "error":"Authentication Failed"
      },
      "BODY":[]
    }             
                 
                        
xml
                          
    <QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <HEADER>
            <commandstatus>Failed</commandstatus>
            <error>Authentication Failed</error>
        </HEADER>
        <BODY/>
    </QUERYSMRESP>                          
                        
Example – No Matching record response
json
                          
{
  "HEADER":{
    "commandstatus":"Success",
    "error":""
  },
  "BODY":[]
}            
             
                        
xml
                          
    <QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <HEADER>
            <commandstatus>Success</commandstatus>
            <error/>
        </HEADER>
        <BODY/>
    </QUERYSMRESP>	
                        

Short Code Interface Integration

Short Code Interface Integration Request

Base URL
http://sc.netpipersms.com/rest/deliversmpush
Request URL
http://sc.netpipersms.com/rest/deliversmpush?systemid={systemid}&password={password}&apikey={apikey}&campaignid={campaignid}&sourceaddr={sourceaddr}&destinationaddr={destinationaddr}&shortmessage={shortmessage}&esmclass={esmclass}&deliverytime={deliverytime}&userdataheader={userdataheader}&operatorcode={operatorcode}
Parameters

The following table shows the parameters in the request:

Parameter Description
systemid Authentication id provided by Netpiper SMS
password Authentication password provided by Netpiper SMS
apikey API Key provided by Netpiper SMS
campaignid Campaign ID provided by Netpiper
destinationaddr Short Code Number
sourceaddr Originating mobile Number
Shortmessage Short Message
esmclass 0 – English Single SMS
128– English Multiple SMS
64– Arabic Single SMS
192– Arabic Multiple SMS
deliverytime Message received Time
userdataheader Header Data, if any
operatorcode Operator code. For Eg: Etisalat - Et, du - Du

Examples

json
                          
{
	"HEADER":{
		"systemid":"String content",
		"password":"String content",
		"apikey":"String content",
		"campaignid":"String content",
		"destinationaddr":"String content",
		"sourceaddr":"String content",
		"shortmessage":"String content",
		"esmclass":"String content",
		"deliverytime":"String content",
		"userdataheader":"String content",
        "operatorcode":"String content"
	}
}		 
                        
xml
                          
<DELIVERSMPUSHREQ>
  <HEADER>
    <systemid>String content</systemid>
    <password>String content</password>
    <apikey>String content</apikey>
    <campaignid>String content</campaignid>
    <destinationaddr>String content</destinationaddr>
    <sourceaddr>String content</sourceaddr>
    <shortmessage>String content</shortmessage>
    <esmclass>String content</esmclass>
    <deliverytime>String content</deliverytime>
    <userdataheader>String content</userdataheader>
    <operatorcode>String content</operatorcode>
  </HEADER>
</DELIVERSMPUSHREQ>                        
                        
Example – Request Short Code Message to Interface
json
                          
{
	"HEADER":
		{
		"systemid":"abc",
		"password":"abc123",
		"apikey":"KDR34ERT",
		"campaignid":"1070",
		"destinationaddr":"5122",
		"sourceaddr":"971501111111",
		"shortmessage":"Test Message",
		"esmclass":"0",
		"deliverytime":"12/26/2012 12:02:00 PM",
		"userdataheader":"",
        "operatorcode":"Et"
		}
}                
        
                        
xml
                          
<?xml version="1.0" encoding="utf-8" ?>
<DELIVERSMPUSHREQ>
<HEADER>
	<systemid>abc</systemid>
	<password>abc123</password>
	<apikey>KDR34ERT</apikey>
	<campaignid>1070</campaignid>
	<destinationaddr>5122</destinationaddr>
	<sourceaddr>971501111111</sourceaddr>
	<shortmessage><![CDATA[Test Message]]></shortmessage>
	<esmclass>0</esmclass>
	<deliverytime>12/26/2012 12:02:00 PM</deliverytime>
	<userdataheader></userdataheader>
    <operatorcode>Et</operatorcode>
</HEADER>
</DELIVERSMPUSHREQ>  
                        

Short Code Interface Integration Response

Request URL

<DELIVERSMPUSHRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HEADER><commandstatus>Success</commandstatus><error/></HEADER></DELIVERSMPUSHRESP>
or
<<DELIVERSMPUSHRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HEADER><commandstatus>Failed</commandstatus><error>Authentication Failed</error></HEADER></DELIVERSMPUSHRESP>

Parameters

The following table shows the parameters in the response:

Parameter Description
commandstatus Status of the request. This can be either Success/Failed
error commandstatus status field reason, if success this value will be null

Examples

json
                          
{
	"HEADER":{
		"commandstatus":"String content",
		"error":"String content"
	}
}                          
                        
xml
                          
    <DELIVERSMPUSHRESP>
      <HEADER>
        <commandstatus>String content</commandstatus>
        <error>String content</error>
      </HEADER>
    </DELIVERSMPUSHRESP>                        
                        
Example - Success response
json
                          
{
  "HEADER":{
    "commandstatus":"Success",
    "error":""
  }
}        
        
                        
xml
                          
    <DELIVERSMPUSHRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <HEADER>
            <commandstatus>Success</commandstatus>
            <error/>
        </HEADER>
    </DELIVERSMPUSHRESP>                         
                        
Example – Failed response
json
                          
{
  "HEADER":{
    "commandstatus":"Failed",
    "error":"Authentication Failed"
  }
}

 
                        
xml
                          
<DELIVERSMPUSHRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <HEADER>
        <commandstatus>Failed</commandstatus>
        <error>Authentication Failed</error>
    </HEADER>
</DELIVERSMPUSHRESP>