Evo Voice

<back to all web services

SearchPhoneNumbers

Search for phone numbers

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
GET/endpoints/phone-numbers/search
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


# @Api(Description="Search for phone numbers")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SearchPhoneNumbers(IGet):
    """
    Search for phone numbers
    """

    # @ApiMember(Description="The account you are searching for")
    account_id: Optional[str] = None
    """
    The account you are searching for
    """


    # @ApiMember(Description="The area code")
    area_code: Optional[str] = None
    """
    The area code
    """


    # @ApiMember(Description="The country code you are searching for")
    country_code: Optional[str] = None
    """
    The country code you are searching for
    """


    # @ApiMember(Description="The postal code you are searching for")
    postal_code: Optional[str] = None
    """
    The postal code you are searching for
    """


    # @ApiMember(Description="The distance from the specified postal code (default is 100)")
    distance: Optional[int] = None
    """
    The distance from the specified postal code (default is 100)
    """


    # @ApiMember(Description="Search for fax numbers")
    is_fax_number: Optional[bool] = None
    """
    Search for fax numbers
    """


    # @ApiMember(Description="Contains specific digits")
    contains: Optional[str] = None
    """
    Contains specific digits
    """

Python SearchPhoneNumbers DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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: evovoice.io 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ArrayOfPhoneNumberInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Endpoints">
  <PhoneNumberInfo>
    <PhoneNumber>String</PhoneNumber>
  </PhoneNumberInfo>
</ArrayOfPhoneNumberInfo>