Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /endpoints/phone-numbers/search |
---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Voice.Api.Endpoints;
namespace Voice.Api.Endpoints
{
///<summary>
///Search for phone numbers
///</summary>
[Api(Description="Search for phone numbers")]
public partial class SearchPhoneNumbers
: IGet
{
///<summary>
///The account you are searching for
///</summary>
[ApiMember(Description="The account you are searching for")]
public virtual string AccountId { get; set; }
///<summary>
///The area code
///</summary>
[ApiMember(Description="The area code")]
public virtual string AreaCode { get; set; }
///<summary>
///The country code you are searching for
///</summary>
[ApiMember(Description="The country code you are searching for")]
public virtual string CountryCode { get; set; }
///<summary>
///The postal code you are searching for
///</summary>
[ApiMember(Description="The postal code you are searching for")]
public virtual string PostalCode { get; set; }
///<summary>
///The distance from the specified postal code (default is 100)
///</summary>
[ApiMember(Description="The distance from the specified postal code (default is 100)")]
public virtual int? Distance { get; set; }
///<summary>
///Search for fax numbers
///</summary>
[ApiMember(Description="Search for fax numbers")]
public virtual bool IsFaxNumber { get; set; }
///<summary>
///Contains specific digits
///</summary>
[ApiMember(Description="Contains specific digits")]
public virtual string Contains { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /endpoints/phone-numbers/search HTTP/1.1 Host: team.evovoice.io Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length [ { phoneNumber: String } ]