Requires any of the roles: | SystemAdministrator, Manager, Customer |
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: bool = False
"""
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 .other suffix or ?format=other
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/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length [{"phoneNumber":"String"}]