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.WSTemplateResponse DeleteTemplate( 
   string securityToken,
   string orgCode,
   int templateID
)

 

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 from where template is to be deleted.

templateID

- int (Required) - TemplateId of the template which is to be deleted.

 

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.

 

Examples

C#

lblError.Text = "";
TemplateClient templateService = new TemplateClient("TemplateWSServiceHttpEndpoint");
    string securityToken = txtToken.Text; ;
    string orgCode = txtOrgCode.Text;
    int templateId = Convert.ToInt32(txtTemplateID.Text.Trim());

    WSTemplateResponse wSTemplateResponse = templateService.DeleteTemplate(securityToken, orgCode, templateId);

        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:DeleteTemplate>
         <!--Required:-->
         <ser:securityToken>Security Token</ser:securityToken>
         <!--Required:-->
         <ser:orgCode>Group Org Code</ser:orgCode>
         <!--Required:-->
         <ser:templateID>Template ID</ser:templateID>
      </ser:DeleteTemplate>
   </soapenv:Body>
</soapenv:Envelope>
   
             
Soap Response
  
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <DeleteTemplateResponse xmlns="http://SBTService/ServiceContracts/">
         <DeleteTemplateResult 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>1009</a:ErrorCode>
            <a:Message>Template deleted successfully</a:Message>
            <a:Response z:Id="i2"/>
         </DeleteTemplateResult>
      </DeleteTemplateResponse>
   </s:Body>
</s:Envelope>

 

JAVA

 TemplateWSService srv = new TemplateWSService();
 ITemplate iTemplate = srv.getTemplateWSServiceHttpEndpoint1();
 WSTemplateResponse res = null;
		
 String  securityToken = "securityToken";
 String orgCode = "orgCode";
 Integer templateID = 101;
		
 try {
		res = iTemplate.deleteTemplate(securityToken, orgCode, templateID);

 } 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',
	'templateID' => '21'
);

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

?>

 

REST

Method: DELETE

URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/TemplateRSService.svc/DeleteTemplate

Sample C# Code:

var requestdata = new
                {
                    securityToken = "validsecurityToken",
                    orgCode = "orgCode",
                    templateID = 1
                };

                string data2 = JsonConvert.SerializeObject(requestdata).ToString();
                txtRequestFormat.Text = data2;

                System.Net.WebClient webClient = new System.Net.WebClient();
                webClient.Headers["Content-type"] = "application/json";
                webClient.Encoding = Encoding.UTF8;
                
var strDelResponse = webClient.UploadString("https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/TemplateRSService.svc/DeleteTemplate", "DELETE", data2);

Note: “strDelResponse” contains the response which is in JSON format.

Response:

The response will be in JSON format like below:

{" DeleteTemplateResult": {
   "result": true,
   "error_code": 1009,
   "Message": " Template Deleted succesfully"
}}

 

Send Feedback