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

Syntax

C#

[OperationContractAttribute()] 
SBT.API.DataContracts.Admin.WSTemplateListResponse GetTemplates( 
   string securityToken,
   string orgCode 
)

 

WSDL

Production: https://ui.solutionsbytext.com/Sbt.App.SetUp/wsservices/templateWSService.svc?singlewsdl

Staging: https://test.solutionsbytext.com/Sbt.App.SetUp/wsservices/templateWSService.svc?singlewsdl

 

Parameters

securityToken

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

orgCode

- String[20] (Required) - Default Organization Code for the group.

 

Return Value

WSTemplateResponse
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 <TemplateDetail>

TemplateDetails object.
* TemplateID - TemplateID.
* Title - Template Title.
* Text - Template Text.
* Subject - Template Subject.
* Description - Template Description.

 

Examples

C#

lblError.Text = "";
TemplateClient templateService = new TemplateClient("TemplateWSServiceHttpEndpoint");
    string securityToken = txtToken.Text; ;
    string orgCode = txtOrgCode.Text;

    WSTemplateListResponse wSTemplateResponse = templateService.GetTemplates(securityToken, orgCode);

        if (!wSTemplateResponse.Result)
            {
                //handle error
                lblError.Text = wSTemplateResponse.Message;
            }
        else
            {
                //handle success
                lblError.Text = wSTemplateResponse.Message;
            }

 

SOAP

Soap  Request
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:GetTemplates>
         <!--Required:-->
         <ser:securityToken>Security Token</ser:securityToken>
         <!--Required:-->
         <ser:orgCode>Group Org Code</ser:orgCode>
      </ser:GetTemplates>
   </soapenv:Body>
</soapenv:Envelope>
            
 
Soap Response
 
  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
          <s:Body>
             <GetTemplatesResponse xmlns="http://SBTService/ServiceContracts/">
<GetTemplatesResult 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>1008</a:ErrorCode>
                   <a:Message>Template list displayed successfully</a:Message>
                   <a:Response>
                      <a:TemplateDetail z:Id="i2">
                         <a:TemplateID>5</a:TemplateID>
                         <a:Title>Valtech1 - 5 - MC</a:Title>
                         <a:Subject>Group1</a:Subject>
                         <a:Text>Template with variable {Misc1}</a:Text>
                         <a:Description>desc</a:Description>                       </a:TemplateDetail>
                   </a:Response>
                </GetTemplatesResult>
             </GetTemplatesResponse>
          </s:Body>
       </s:Envelope>
 

 

JAVA

 TemplateWSService srv = new TemplateWSService();
 ITemplate iTemplate = srv.getTemplateWSServiceHttpEndpoint1();
 WSTemplateListResponse res = null;
		
 String  securityToken = "securityToken";
 String orgCode = "OrgCode";
		
 try {
		res = iTemplate.getTemplates(securityToken, orgCode);

 }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/templateWSService.svc?wsdl");
    $param = array(
	'securityToken' =--> 'securityToken',
	'orgCode' => 'orgCode'
);

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

?>

 

REST

Method: GET

URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/TemplateRSService.svc/GetTemplates?securityToken=safdsfs&orgCode=dfsf

Response:

The response will be in JSON format like below:

{" GetTemplatesResult": {
   "result": true,
   "error_code": 1008,
   "Message": " Template List displayed succesfully",
   “Response”: { “List<TemplateDetail> response –
                              Template response Information will display in a list” }
}}

 

Send Feedback