Business at the Speed of Text

Take a few minutes to watch how Solutions by Text can provide you with a compliant solution to enhance the customer experience and increase your bottom line through the power of texting.

Watch Videos

Two-Way Texting Changes the Game

Put real-time text responses in your customers’ pockets and real-time access at your staff’s fingertips.

Find Out More

Two-Way Texting Changes the Game

Put real-time text responses in your customers’ pockets and real-time access at your staff’s fingertips.

Find Out More

Business at the Speed of Text

Take a few minutes to watch how Solutions by Text can provide you with a compliant solution to enhance the customer experience and increase your bottom line through the power of texting.

Watch Videos

We're here for you.

Solutions by Text offers 24 hour support - both online and offline.

Give us a Call

Two-Way Texting Changes the Game

Put real-time text responses in your customers’ pockets and real-time access at your staff’s fingertips.

Find Out More

See What's New

Solutions by Text continues to evolve and develop its suite of products and features. Take a look at what's new in our world.

Read more

We Work With the Best

From retail to financial solutions, we’re constantly working with our clients to push the boundaries and find new ways to leverage SMS for business.

See Our Success Stories

Reporting Limits:

1 connection per 15 minutes

No connections from 12:00AM to 2:00AM Central Time

Overview 

Returns archived messages sent from various levels of the platform. (Only top level orgcodes are to be used) 

Syntax

C#

[OperationContractAttribute()]
SBT.API.DataContracts.Common.WSReportArchiveSentMessagesResponse ArchiveMessagesSent(
   string securityToken,
   string orgCode,
   string fromDate,
   string toDate,
   string note
)

 

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 the company, organization, division or group.

fromDate

- String[20] (Required) - Start date for report of messages sent. Date format is [mm/dd/yyyy hh:mm:ss].

toDate

- String[20] (Required) - End date for report of messages sent. Date format is [mm/dd/yyyy hh:mm:ss].

note

- String[200] (Optional) - This is an optional parameter to pass to narrow the search to only return messages sent with a particular note.

Note: This service is capable of returning the out boundmessages of past one year. data range starts from beyond previous month. In From and To date range, pass only 15 days. Previous one year data can be accessed as 15 days data chunks.

 

Return Value

WSReportArchiveSentMessagesResponse
NameTypeDescription
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 <WSReportArchiveSentMessageRow> If there are transaction details, then they will be displayed.
Group - Org name to which message was sent.
Code - Communication code from which message was sent.
Phone - Phone number message was sent to.
ModeOfCommunication - SMS/MMS - based on message type.
Message - content of message that was sent.
MessageCategory - Category of sent message. e.g. Outbound, Template, VBT, compliance, keyword etc.
MessageSubCategory - Sub Category of sent message. e.g. UI, API, HELP, STOP, STOPALL, VBT, Keyword etc...
TimeStamp - DateTime that the message was sent. * Note - Custom note added while sending the message
DeliveryStatus - Delivery Status of the message, for more info see the status code page.
DeliveryStatusID - Delivery Status ID of message, for more info see the status code page.
UniqueID - UniqueID of the Subscriber

 

Additional Validation

Error CodesDescriptionExample
1485 Current and previous month's data are not available. For example, if current month date is 7/28/2015, it will not allow fetching any date of the current month or previous month
1484 Date range should not be more than 15 calendar days. For example, if fromDate is 6/1/2015 and toDate is 6/16/2015, the date difference between fromDate and toDate is more than 15 days and API call will not return results
1486 Sorry! You cannot access the data beyond 1 year old. For example, if current month is August 2015, the API will allow fetching data from 1 July 2014 to 30 June 2015

 

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 note = txtNote.Text;

    WSReportArchiveSentMessagesResponse wSReportArchiveSentMessagesResponse = reportService.ArchiveMessagesSent(securityToken, orgCode, fromDate, toDate, note);
        if (!wSReportArchiveSentMessagesResponse.Result)
            {
                //handle error
                lblError.Text = wSReportArchiveSentMessagesResponse.Message;
            }
        else
            {
                //handle success
                lblError.Text = wSReportArchiveSentMessagesResponse.Message;
            }

SOAP

Soap Request 
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:ArchiveMessagesSent>
         <!--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>
         <!--Optional:-->
         <ser:note>Search with Note. If it is blank all messages returned in the date range</ser:note>
      </ser:ArchiveMessagesSent>
   </soapenv:Body>
</soapenv:Envelope>
            

Soap Response
             
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
     <s:Body>
        <ArchiveMessagesSentResponse xmlns="http://SBTService/ServiceContracts/">
           <ArchiveMessagesSentResult 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>1441</a:ErrorCode>
              <a:Message>Successfully retrieved Archive messages sent report</a:Message>
              <a:Response z:Id="i2">
	      <a:WSReportArchiveSentMessageRow z:Id="i2">
              <a:Group>Org1->Div2->Grp01</a:Group>
	      <a:Code>10958</a:Code>
              <a:ModeOfCommunication>SMS</a:ModeOfCommunication>
              <a:Message>Message</a:Message>
	      <a:MessageCategory>Keyword</a:MessageCategory>
	      <a:MessageSubCategory>UI</a:MessageSubCategory>
	      <a:Phone>Phone</a:Phone>
              <a:TimeStamp>8/30/2013 2:49:37 PM</a:TimeStamp>
                   <a:Note>NoteID</a:Note>
		  <a:DeliveryStatus>Delivered</a:DeliveryStatus>
		  <a:DeliveryStatusID>100</a:DeliveryStatusID>
		  <a:UniqueID>UniqueID of Subscriber</a:UniqueID>
              </a:WSReportArchiveSentMessageRow>
	    </a:Response> 
           </ArchiveMessagesSentResult>
        </ArchiveMessagesSentResponse>
     </s:Body>
  </s:Envelope>

JAVA

 ReportWSService srv = new ReportWSService();
 IReport iReport = srv.getReportWSServiceHttpEndpoint1();
 WSReportArchiveSentMessagesResponse res = null;

 String securityToken = "securityToken";
 String orgCode = "OrgCode";
 String fromDate = "08/22/2013";
 String toDate = "09/22/2013";
 String note = "test";

 try {
    	 res = iReport.ArchiveMessagesSent(securityToken, orgCode, fromDate, toDate, note);

 } catch (Throwable e) {
		e.printStackTrace();
 }

 if(res == null ){
		System.out.println("::Erron::");
		return;

 }
 if (res.isResult() == null || !res.isResult())
 {
		//handle error
		System.out.println("ErrorCode::"+res.getErrorCode());
		System.out.println("ErrorMessage::"+res.getMessage().getValue());
 }
 else
 {
	   	//handle success
		System.out.println("ID::"+res.getId());
		System.out.println("Message::"+res.getMessage().getValue());
 }

PHP

<?php 
    $client = new SoapClient("https://ui.solutionsbytext.com/Sbt.App.SetUp/WSServices/ReportWSService.svc?wsdl");
    $param = array(
	'securityToken' =--> 'securityToken',
	'orgCode' => 'orgCode',
	'fromDate' => '08/22/2013',
	'toDate' => '10/22/2013',
	'note' => 'note'
);

$response = $client->__soapCall('ArchiveMessagesSent', array($param));
echo '<pre?>';
print_r($response);
if($response->ArchiveMessagesSentResult->Result){
	echo 'Message: '.$response->ArchiveMessagesSentResult->Message;
}
else {
	echo 'Message: '.$response->ArchiveMessagesSentResult->Message;
}

?>

REST 

Method: GET

URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/ReportRSService.svc/ArchiveMessagesSent?securityToken=safdsfs&orgCode=dfsf&fromDate=01/31/2015 00:00:00&toDate=01/30/2016 00:00:00&note=sampleNote

Response:

The response will be in JSON format like below:

{" ArchiveMessagesSentResult": {
   "Result": true,
   "ErrorCode": 1441,
   "Message": " Successfully retrieved messages sent report",
   "Response": { "List<WSReportArchiveSentMessageRow> response –
                         Archive Sent Message details like Code,Group,Message etc. Information will display" }
   }}

 

 

Send Feedback