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.
To use the HTTP Access method, the minimal system configurations are as follows:
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
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
Submit SMS - Submit a SMS to the SMS server
Delivery Report – To check the submitted message delivery status/p>
Short code messages - Mobile Originated (MO) messages from Netpiper 2 WAY Short codes
Short code Interface Integration - Integrating third party short code with 2ways SMS Interface
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 |
{
"HEADER":{
"systemid":"String content",
"password":"String content”
}
}
<CREDITREQ>
<HEADER>
<systemid>String content</systemid>
<password>String content</password>
</HEADER>
</CREDITREQ>
{
"HEADER":{
"systemid":"abc",
"password":"abc123”
}
}
<CREDITREQ>
<HEADER>
<systemid>abc</systemid>
<password>abc123</password>
</HEADER>
</CREDITREQ>
$<major version>.<minor version>$<status>#Credit:<balance credits>#
or
<Error Messages>
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 |
{
"HEADER":{
"version":"String content",
"commandstatus":"String content",
"credits":"String content",
"error":"String content"
}
}
<CREDITRESP>
<HEADER>
<version>String content</version>
<commandstatus>String content</commandstatus>
<credits>String content</credits>
<error>String content</error>
</HEADER>
</CREDITRESP>
{
"HEADER":{
"version":"3.0",
"commandstatus":"Success",
"credits":"1653",
"error":""
}
}
<CREDITRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<version>3.0</version>
<commandstatus>Success</commandstatus>
<credits>1653</credits>
<error/>
</HEADER>
</CREDITRESP>
{
"HEADER":{
"version":"3.0",
"commandstatus":"Failed",
"credits":"0",
"error":"Invalid Account Details found. Login again."
}
}
<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>
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 |
{
"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"
}]
}
<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>
{
"HEADER":{
"systemid":"abc",
"password":"abc123",
"test":"0"
},
"BODY":[{
"destinationaddr":"971501111111",
"shortmessage":"This is a test",
"esmclass":"sms",
"sourceaddr":"Netpiper",
"userdataheader":""
}]
}
<?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>
{ "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 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>
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.
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 |
|
||||||||||||||||||||||
destinationaddr | Submitted mobile Number | ||||||||||||||||||||||
network | Destination country |
{
"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"
}]
}
<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>
{
"HEADER":{
"sent":"1",
"creditsused":"1",
"unitleft":"1662",
"error":""
},
"BODY": [
{
"messageid":"91E7E1F719EF0001653547",
"errorcode":"0",
"destinationaddr":"971501111111",
"network":"United Arab Emirates"
}
]
}
<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>
{
"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":""
}
]
}
<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>
{
"HEADER":{
"sent":null,
"creditsused":null,
"unitleft":null,
"error":"Invalid Account Details found. Login again."
},
"BODY":[]
}
<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>
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 |
{
"HEADER":{
"systemid":"String content",
"password":"String content",
"messageid":"String content",
"destinationaddr":"String content"
}
}
<QUERYSM>
<HEADER>
<systemid>String content</systemid>
<password>String content</password>
<messageid>String content</messageid>
<destinationaddr>String content</destinationaddr>
</HEADER>
</QUERYSM>
{
"HEADER":{
"systemid":"abc",
"password":"abc123",
"messageid":"91E7E1F8CCB70001653548",
"destinationaddr":"971501111111"
}
}
<QUERYSM>
<HEADER>
<systemid>abc</systemid>
<password>abc123</password>
<messageid>91E7E1F8CCB70001653548</messageid>
<destinationaddr>971501111111</destinationaddr>
</HEADER>
</QUERYSM>
<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>
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 |
{ "HEADER":{ "commandstatus":"String content", "error":"String content" }, "BODY":[{ "messageid":"String content", "destinationaddr":"String content", "messagestate":"String content", "finaldategmt":"String content", "network":"String content" }] }
<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>
{
"HEADER":{
"commandstatus":"Success",
"error":""
},
"BODY":[
{
"messageid":"91E7E1F8CCB70001653548",
"destinationaddr":"971501111111",
"messagestate":"DELIVERED",
"finaldategmt":"4/25/2016 11:53:13 AM",
"network":"United Arab Emirates"
}
]
}
<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>
{
"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"
}]
}
<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>
{
"HEADER":{
"commandstatus":"Failed",
"error":"Authentication Failed"
},
"BODY":[]
}
<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<commandstatus>Failed</commandstatus>
<error>Authentication Failed</error>
</HEADER>
<BODY/>
</QUERYSMRESP>
{
"HEADER": {
"commandstatus": "Success",
"error": ""
},
"BODY": []
}
<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<commandstatus>Success</commandstatus>
<error/>
</HEADER>
<BODY/>
</QUERYSMRESP>
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 |
{
"HEADER":{
"systemid":"String content",
"password":"String content",
"campaignid":"String content",
"lastrecordid":"String content",
"orderby":"String content",
"noofrecords":"String content",
"sourceaddr":"String content"
}
}
<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>
{
"HEADER":{
"systemid":"abc",
"password":"abc123",
"campaignid":"1070",
"lastrecordid":"0",
"orderby":"ASC",
"noofrecords":"10",
"sourceaddr":""
}
}
<?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>
{
"HEADER":{
"systemid":"abc",
"password":"abc123",
"campaignid":"1070",
"lastrecordid":"0",
"orderby":"ASC",
"noofrecords":"10",
"sourceaddr":"971501111111"
}
}
<?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>
<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>
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 |
{
"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"
}]
}
<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>
{
"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"
}
]
}
<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>
{
"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"
}
]
}
<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>
{
"HEADER":{
"commandstatus":"Failed",
"error":"Authentication Failed"
},
"BODY":[]
}
<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<commandstatus>Failed</commandstatus>
<error>Authentication Failed</error>
</HEADER>
<BODY/>
</QUERYSMRESP>
{
"HEADER":{
"commandstatus":"Success",
"error":""
},
"BODY":[]
}
<QUERYSMRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<commandstatus>Success</commandstatus>
<error/>
</HEADER>
<BODY/>
</QUERYSMRESP>
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 |
{
"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"
}
}
<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>
{
"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 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>
<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>
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 |
{
"HEADER":{
"commandstatus":"String content",
"error":"String content"
}
}
<DELIVERSMPUSHRESP>
<HEADER>
<commandstatus>String content</commandstatus>
<error>String content</error>
</HEADER>
</DELIVERSMPUSHRESP>
{
"HEADER":{
"commandstatus":"Success",
"error":""
}
}
<DELIVERSMPUSHRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<commandstatus>Success</commandstatus>
<error/>
</HEADER>
</DELIVERSMPUSHRESP>
{
"HEADER":{
"commandstatus":"Failed",
"error":"Authentication Failed"
}
}
<DELIVERSMPUSHRESP xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<commandstatus>Failed</commandstatus>
<error>Authentication Failed</error>
</HEADER>
</DELIVERSMPUSHRESP>