Overview

Get the status of sent message using note. You can have multiple recipients, but only one note per message request. To check the status of the messages, use the combination of note and mobile number.

 

Syntax

C#

[OperationContractAttribute()]
SBT.API.DataContracts.MessageCenter.WSTransactionResponse GetMessageStatusByNote(
   string securityToken,
   string note,
   string orgCode,
   string sentTo
)

 

WSDL

Production: https://ui.solutionsbytext.com/Sbt.App.SetUp/WSServices/MessageWSService.svc?singlewsdl

Staging: https://test.solutionsbytext.com/Sbt.App.SetUp/WSServices/MessageWSService.svc?singlewsdl

 

 

Parameters

securityToken

– String[1000] (Required) – SecurityToken to authenticate the user

note

– String[500] (Required) – Note ID that was created in the message while sending.

orgCode

– String[20] (Required) – Default Organization Code for the Organization, division or group.

sentTo

– String[20] (Optional) Mobile phone number message was sent to.

 

Return Value

WSTransactionResponse
Name Type Description
Result bool True/False whether the call was successful or not.
ErrorCode int For Success/Failure it will generate error number.
Message string Message related to error code.
Response List <TransactionDetail> Display transaction details if available:
* SendTo – Mobile phone number message was sent to.
* StatusCode – Status code of the message delivery (see Status Codes page)
* StatusMessage – Message that correlates to status code.

 

Examples

C#

MessageClient messageResult = new MessageClient("MessageWSServiceHttpEndpoint");
    string securityToken = txtToken.Text; ;
    string note = txtNote.Text;
    string orgCode = txtOrgCode.Text;
    string sentTo = txtMobileNo.Text; ;

    WSTransactionResponse wSTransactionResponse = messageResult.GetMessageStatusByNote(securityToken, note, orgCode, sentTo);
 
        if (!wSTransactionResponse.Result)
            {
                //handle error
                lblError.Text = wSTransactionResponse.Message;
            }
        else
            {
                //handle success
                lblError.Text = wSTransactionResponse.Message;
            }

SOAP

Soap Request 
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:GetMessageStatusByNote>
         <!--Required:-->
         <ser:securityToken>Security Token </ser:securityToken>
         <!--Required:-->
         <ser:note>Note</ser:note>
         <!--Required:-->
         <ser:orgCode>Org Code</ser:orgCode>
         <!--Optional:-->
         <ser:sentTo>Phone Number</ser:sentTo>
      </ser:GetMessageStatusByNote>
   </soapenv:Body>
</soapenv:Envelope>

            
 Soap Response
             
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetMessageStatusByNoteResponse xmlns="http://SBTService/ServiceContracts/">
         <GetMessageStatusByNoteResult 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:ErrorCode>1237</a:ErrorCode>
            <a:Message>Successfully retrieved Note Status</a:Message>
            <a:Response>
               <a:TransactionDetail z:Id="i2">
                  <a:SendTo>Phone Number</a:SendTo>
                  <a:StatusCode>100</a:StatusCode>
                  <a:StatusMessage>Message was successfully delivered</a:StatusMessage>
               </a:TransactionDetail>
            </a:Response>
            <a:Result>true</a:Result>
         </GetMessageStatusByNoteResult>
      </GetMessageStatusByNoteResponse>
   </s:Body>
</s:Envelope>

JAVA

 MessageWSService srv = new MessageWSService();
 IMessage iMessage = srv.getMessageWSServiceHttpEndpoint1();
 WSTransactionResponse res = null;
  
 String securityToken = "securityToken";
 String orgCode = "orgCode";
 String phoneNo = "12345678901";
 try {
  res = iMessage.getMessageStatusByNote(securityToken, "HI", orgCode, phoneNo);

  }
 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/MessageWSService.svc?wsdl");
	$param = array(
		'securityToken' =--> 'securityToken',
		'note' => 'test php code',
		'orgCode' => 'orgcode',
		'phone' => '12345678999',
	);
	$response = $client->__soapCall('GetMessageStatusByNote', array($param));
	echo '<pre?>';
	print_r($response);
	if($response->GetMessageStatusByNoteResult->Result){
		echo 'Message: '.$response->GetMessageStatusByNoteResult->Message;
	}
	else {
			echo 'Message: '.$response->GetMessageStatusByNoteResult->Message;
	}

?>

REST

Method: GET

URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/MessageRSService.svc/GetMessageStatusByNote?securityToken=safdsfs&note=somenotes&orgCode=haty161&sentTo=1234567891

Response:

{" GetMessageStatusByNoteResult": {
   "Result": true,
   "ErrorCode": 1237,
   "Message": " Successfully retrieved Note Status ",
   “Response”: { “List<TransactionDetail> response –
                              SendTo,StatusCode,StatusMessage Information will display” }
}}

 

 

Send Feedback