Retrieve a list of numbers in an account
Description
Retrieve a list of numbers in the account associated with the current API session.
Parameters
string criteria optional | The text or number to search on. By default this will search all every field, for more details about the search fields see below. |
string searchfield optional | The field to perform a search on. Available options are: number, alias and tag. By default all fields are searched and a match in any of them will return that number. |
string exactmatch optional | Setting this will ensure only records with an exact match are returned, by default a fuzzy search is performed. |
int start optional | The starting position for the result set. |
int limit optional | The maximum number of results within the result set. |
Request
<?xml version="1.0"?>
<NoveroRequest>
<Request target="NoveroNumbers" name="GetNumbers" id="TestRequest">
<criteria>01245</criteria>
<searchfileld>number</searchfield>
<exactmatch>false</exactmatch>
<start>1</start>
<limit>5</limit>
</Request>
</NoveroRequest>
<?php
require_once('TTNCApi.php');
$Api = new TTNCApi('<username>', '<password>', '<VKey>');
$Request = $Api->NewRequest('NoveroNumbers', 'GetNumbers', 'TestRequest');
$Request->SetData('criteria', '01245');
$Request->SetData('start', '1');
$Request->SetData('limit', '5');
$Api->MakeRequests();
$Response = $Api->GetResponseFromId('TestRequest');
?>
require TTNCApi
api = TTNCApi.new('<username>', '<password>', '<vkey>')
request = api.newrequest('NoveroNumbers', 'GetNumbers', 'TestRequest')
request.setdata('criteria', '01245')
request.setdata('start', '1')
request.setdata('limit', '5')
api.makerequest()
p request.getresponse()
api = TTNCApi('<username>', '<password>', '<vkey>')
request = api.newrequest('NoveroNumbers', 'GetNumbers', 'TestRequest')
request.setdata('criteria', '01245')
request.setdata('start', '1')
request.setdata('limit', '5')
api.makerequest()
p request.getresponse()
using System;
using TTNCApi;
class Program
{
static void Main(string[] args)
{
TTNCApi api = new TTNCApi("<username>", "<password>", "<vkey>");
TTNCRequest request = api.NewRequest("NoveroNumbers", "GetNumbers", "TestRequest");
request.setData("criteria", "01245");
request.setData("start", "1");
request.setData("limit", "5");
api.MakeRequests();
TTNCParser dic = request.GetResponse();
}
}
Response
<?xml version="1.0"?>
<NoveroResponse>
<Response target="NoveroNumbers" name="GetNumbers" Code="200" RequestId="TestRequest">
<Numbers>
<Number value="01245123456">
<Number>01245123456</Number>
<Band>00</Band>
<Country>GB</Country>
<Tariff>Chelmsford</Tariff>
<NumberFormatted>01245 123 456</NumberFormatted>
<IsChargeable>1</IsChargeable>
<Owner>00001</Owner>
<ServiceName>Chelmsford number</ServiceName>
<DateOfService>0000-00-00</DateOfService>
<Modified>2013-01-08 12:32:01</Modified>
<RangeId>1406</RangeId>
<DestinationSMS></DestinationSMS>
<DestinationMCA></DestinationMCA>
<suspended>0</suspended>
<NumberFlag>0</NumberFlag>
<MonthCalls>0</MonthCalls>
<MonthMinutes>0</MonthMinutes>
<MonthCost>0</MonthCost>
<MonthMissed>0</MonthMissed>
<MonthAnswered>0</MonthAnswered>
<MonthUnanswered>0</MonthUnanswered>
<Destination></Destination>
</Number>
...
</Numbers>
</Response>
</NoveroResponse>