QUERY KEYWORDS
Lists keywords owned by your account
This operation allows getting information on keywords owned by your account, including keyword, status, and lease dates. See the Response Parameters table below for a complete list of the data that the QueryKeywords operation returns.
REQUEST PARAMETERS
Parameter | Dart Type | Demo Value | Description |
---|---|---|---|
QueryKeywords | object | Keywords request by query | |
MaxResults | long | 1000 | Max number of results to return limited to 1000 (default: 1000) |
FirstResult | long | 0 | Start of next result set (default: 0) |
RESPONSE PARAMETERS
Parameter | Data Type | Description |
---|---|---|
KeywordQueryResult | List of Keywords returned from query | |
TotalResults | long | Results count |
Keyword | Info on Keyword like status and lease info | |
ShortCode | PhoneNumber | |
Keyword | string | |
Status | NumberStatus | [PENDING, ACTIVE, RELEASED, UNAVAILABLE] |
LeaseInfo | Info about Lease | |
LeaseBegin | date | Date lease began |
LeaseEnd | date | Date lease ends |
AutoRenew | boolean | Is lease set to renew each month |
EXAMPLE
using RestSharp;
namespace [your-namespace]
{
public class [your-class]
{
public string QueryKeywords()
{
var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");
var request = new RestRequest("number/keyword", Method.GET);
request.AddParameter("MaxResults", "1");
request.AddParameter("FirstResult", "2");
var response = client.Execute(request);
string content = response.Content;
return content;
}
}
}
The XML returned is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<r:ResourceList xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource" totalResults="2">
<Keyword>
<ShortCode>67076</ShortCode>
<Keyword>LOOI</Keyword>
<Status>ACTIVE</Status>
<LeaseInfo>
<LeaseBegin>2014-12-02Z</LeaseBegin>
<LeaseEnd>2015-01-02Z</LeaseEnd>
<AutoRenew>true</AutoRenew>
</LeaseInfo>
</Keyword>
</r:ResourceList>