GET | /portal/search-phone-numbers |
---|
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
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AppSearchPhoneNumberInfo:
phone_number: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AppSearchPhoneNumbersResponse:
numbers: Optional[List[AppSearchPhoneNumberInfo]] = None
class EndpointTypes(str, Enum):
PHONE_NUMBER = 'PhoneNumber'
USER = 'User'
FAX_NUMBER = 'FaxNumber'
EMAIL_ADDRESS = 'EmailAddress'
UNUSED_1 = 'Unused_1'
UNUSED_2 = 'Unused_2'
UNUSED_3 = 'Unused_3'
UNUSED_4 = 'Unused_4'
UNUSED_5 = 'Unused_5'
TEAM = 'Team'
ASSISTANT = 'Assistant'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AppSearchPhoneNumbers:
account_id: Optional[str] = None
customer_id: Optional[str] = None
area_code: Optional[str] = None
country_code: Optional[str] = None
postal_code: Optional[str] = None
contains: Optional[str] = None
distance: Optional[int] = None
phone_number_type: Optional[EndpointTypes] = None
Python AppSearchPhoneNumbers DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /portal/search-phone-numbers HTTP/1.1 Host: team.evovoice.io Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"numbers":[{"phoneNumber":"String"}]}