Reporting Limits:
1 connection per 15 minutes
No connections from 12:00AM to 2:00AM Central Time
Overview
Returns the messages received for a group, division, and organization based on the given content type (Help, Stop, Stopall, VBT, Keyword, Inbound).
Syntax
C#
[OperationContractAttribute()] SBT.API.DataContracts.Common.WSReportInboundMsgTypeResponse InboundMessagesbyType( string securityToken, string orgCode, string fromDate, string toDate string content_type )
WSDL
Production: https://ui.solutionsbytext.com/Sbt.App.SetUp/WSServices/ReportWSService.svc?singlewsdl
Staging: https://test.solutionsbytext.com/Sbt.App.SetUp/WSServices/ReportWSService.svc?singlewsdl
Parameters
securityToken
– String[1000] (Required) – SecurityToken to authenticate the user
orgCode
– String[50] (Required) – Default Organization Code for organization, division or group.
fromDate
– String[20] (Required) – Start date for report of messages received. Date format is [mm/dd/yyyy hh:mm:ss].
toDate
– String[20] (Required) – End date for report of messages received. Date format is [mm/dd/yyyy hh:mm:ss].
content_type
– String[20] (Required) – Enter numeric value 0-6; 0-Help, 1-Stop, 2-StopAll, 3-Stop and StopAll, 4-VBT, 5-Keyword Message, 6-Inbound Message
Note: Date range should only include current and Previous month.
Return Value
WSReportInboundMessageTypeResponse
| Name | Type | Description |
|---|---|---|
| Result | bool | True/False whether the call was successful or not. |
| ErrorCode | int | For Success/Failure it returns an error number. |
| Message | string | Message related to error code |
| Response | List <WSReportInboundMessageTypeRow> |
If there are transaction details then they will be displayed TransactionTicket– Unique ticket of inbound message |
Example
C#
lblError.Text = "";
ReportClient reportService = new ReportClient("ReportWSServiceHttpEndpoint");
string securityToken = txtToken.Text; ;
string orgCode = txtOrgCode.Text;
string fromDate = dtFromDate.Text;
string toDate = dtToDate.Text;
string content_type = txtContentType.Text;
WSReportInboundMsgTypeResponse wSReportInboundMsgTypeResponse = reportService.InboundMessagesbyType(securityToken, orgCode, fromDate, toDate, content_type);
if (!wSReportInboundMsgTypeResponse.Result)
{
//handle error
lblError.Text = wSReportInboundMsgTypeResponse.Message;
}
else
{
//handle success
lblError.Text = wSReportInboundMsgTypeResponse.Message;
}SOAP
Soap Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
<soapenv:Header/>
<soapenv:Body>
<ser:InboundMessagesbyType>
<!--Required:-->
<ser:securityToken>Security Token</ser:securityToken>
<!--Required:-->
<ser:orgCode>Org Code</ser:orgCode>
<!--Required:-->
<ser:fromDate>From Date</ser:fromDate>
<!--Required:-->
<ser:toDate>To Date</ser:toDate>
<!--Required:-->
<ser:content_type>content type (e.g. 0-6; 0-Help, 1-Stop...)</ser:content_type>
</ser:InboundMessagesbyType>
</soapenv:Body>
</soapenv:Envelope>
Soap Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<InboundMessagesbyTypeResponse xmlns="http://SBTService/ServiceContracts/">
<InboundMessagesbyTypeResult z:Id="i1" xmlns:a="http://SBTAPIService/DataContract/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
<a:Result>true</a:Result>
<a:ErrorCode>1440</a:ErrorCode>
<a:Message>Successfully retrieved inbound messages report</a:Message>
<a:Response z:Id="i2">
<a:WSReportInboundMessageTypeRow z:Id="i2">
<a:Code>Comm. Code</a:Code>
<a:Group>Org Name</a:Group>
<a:GroupCode>Org Code</a:GroupCode>
<a:Message>y</a:Message>
<a:Phone>1XXXXXXXXXX8</a:Phone>
<a:TimeStamp>5/22/2015 11:43:58 AM</a:TimeStamp>
<a:ContentType>Type of message - Help, Stop, Stopall, VBT, Keyword, Inbound</a:ContentType>
<a:Note>Note of previous received message from platform</a:Note>
<a:UniqueID>UniqueID of Subscriber</a:UniqueID>
<a:TransactionTicket>Transaction ticket of inbound message</a:TransactionTicket>
</a:WSReportInboundMessageTypeRow >
</a:Response>
</InboundMessagesbyTypeResult>
</InboundMessagesbyTypeResponse>
</s:Body>
</s:Envelope>
PHP
<?php
$client = new SoapClient("<< WSDL for ReportWSService URL >>");
$param = array(
'securityToken' => 'securityToken',
'orgCode' => 'orgCode',
'fromDate' => '08/22/2013',
'toDate' => '10/22/2013',
'content_type' => '0'
);
$response = $client->__soapCall('InboundMessagesbyType', array($param));
echo '
';
print_r($response);
if($response->InboundMessagesbyTypeResult->Result){
echo 'Message: '.$response->InboundMessagesbyTypeResult->Message;
}
else {
echo 'Message: '.$response->InboundMessagesbyTypeResult->Message;
}
?>REST
Method: GET
URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/ReportRSService.svc/InboundMessagesbyType?securityToken=safdsfs&orgCode=dfsf&fromDate=01/31/2015 00:00:00&toDate=01/30/2016 00:00:00&content_type=conType
Response:
The response will be in JSON format like below:
{" InboundMessagesbyTypeResult": {
"Result": true,
"ErrorCode": 1440,
"Message": " Successfully retrieved inbound messages report",
"Response": { "List<WSReportInboundMessageTypeRow> response –
Inbound Message By Type details like Code,Group,Message etc. Information will display" }
}}