Overview
Determines if a keyword is available for use in a particular group
Syntax
C#
[OperationContractAttribute()] SBT.API.DataContracts.Admin.KeywordExistsResponse SearchKeyword( string securityToken, string groupCode, string keywordName )
WSDL
Production: https://ui.solutionsbytext.com/SBT.App.SetUp/WSServices/KeywordWSService.svc?singlewsdl
Staging: https://test.solutionsbytext.com/SBT.App.SetUp/WSServices/KeywordWSService.svc?singlewsdl
Parameters
securityToken
– String[1000] (Required) – SecurityToken to authenticate the user.
orgCode
– String[50] (Required) – Default Organization Code for the group where keyword is to be searched.
keywordName
– String[20] (Required) – Keyword to be searched for availability.
Return Value
WSSearchKeywordResponse
| NAME | TYPE | DESCRIPTION |
|---|---|---|
ErrorCode | int | For Success/Failure it returns an error number. |
Message | string | Message related to error code. |
Result | bool | True/False whether the call was successful or not. |
Examples
C#
lblError.Text = "";
KeywordClient keywordService = new KeywordClient("KeywordWSServiceHttpEndpoint");
string securityToken = txtToken.Text; ;
string groupCode = txtGroupCode.Text.Trim();
string keywordName = txtKeywordName.Text.Trim();
KeywordExistsResponse keywordExistsResponse = keywordService.SearchKeyword(securityToken, groupCode, keywordName);
if (!keywordExistsResponse.result)
{
//handle error
lblError.Text = keywordExistsResponse.message;
}
else
{
//handle success
lblError.Text = keywordExistsResponse.message;
}
SOAP
Soap Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
<soapenv:Header/>
<soapenv:Body>
<ser:SearchKeyword>
<!--Required:-->
<ser:securityToken>Security Token</ser:securityToken>
<!--Required:-->
<ser:groupCode>Group Org Code</ser:groupCode>
<!--Required:-->
<ser:keywordName>Keyword name</ser:keywordName>
</ser:SearchKeyword>
</soapenv:Body>
</soapenv:Envelope>
Soap Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<SearchKeywordResponse xmlns="http://SBTService/ServiceContracts/">
<SearchKeywordResult 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>1441</a:ErrorCode>
<a:message>Keyword available</a:message>
<a:result>true</a:result>
</SearchKeywordResult>
</SearchKeywordResponse>
</s:Body>
</s:Envelope>
REST
Method: GET
Response:
The response will be in JSON format like below:
{" SearchKeywordResult": {
"result": true,
"error_code": 1498,
"Message": " Keyword Available"
}}