Evo Voice

<back to all web services

ListConversations

Requires Authentication
The following routes are available for this service:
GET/conversations
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


class MessageDirections(str, Enum):
    INCOMING = 'Incoming'
    OUTGOING = 'Outgoing'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MessageInfo:
    id: Optional[str] = None
    account_id: Optional[str] = None
    customer_id: Optional[str] = None
    endpoint_id: Optional[str] = None
    endpoint_display_name: Optional[str] = None
    date: Optional[str] = None
    direction: Optional[MessageDirections] = None
    other_address: Optional[str] = None
    sender: Optional[str] = None
    text: Optional[str] = None
    is_unread: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConversationInfo:
    id: Optional[str] = None
    endpoint_id: Optional[str] = None
    other_address: Optional[str] = None
    most_recent_message: Optional[MessageInfo] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ListConversationsResponse:
    conversations: Optional[List[ConversationInfo]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ListConversations:
    # @ApiMember(Description="The IDs of the account whose conversations you want to retrieve")
    account_ids: Optional[List[str]] = None
    """
    The IDs of the account whose conversations you want to retrieve
    """


    # @ApiMember(Description="The list of endpoint IDs whose conversations you want to retrieve")
    endpoint_ids: Optional[List[str]] = None
    """
    The list of endpoint IDs whose conversations you want to retrieve
    """


    # @ApiMember(Description="The list of customer IDs whose conversations you want to retrieve")
    customer_ids: Optional[List[str]] = None
    """
    The list of customer IDs whose conversations you want to retrieve
    """


    # @ApiMember(Description="The start date for the conversations you want to retrieve")
    after_date: Optional[str] = None
    """
    The start date for the conversations you want to retrieve
    """

Python ListConversations DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /conversations HTTP/1.1 
Host: evovoice.io 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"conversations":[{"id":"String","endpointId":"String","otherAddress":"String","mostRecentMessage":{"id":"String","accountId":"String","customerId":"String","endpointId":"String","endpointDisplayName":"String","date":"String","direction":"Incoming","otherAddress":"String","sender":"String","text":"String","isUnread":false}}]}