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

<ListConversationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Messaging">
  <Conversations>
    <ConversationInfo>
      <EndpointId>String</EndpointId>
      <Id>String</Id>
      <MostRecentMessage>
        <AccountId>String</AccountId>
        <CustomerId>String</CustomerId>
        <Date>String</Date>
        <Direction>Incoming</Direction>
        <EndpointDisplayName>String</EndpointDisplayName>
        <EndpointId>String</EndpointId>
        <Id>String</Id>
        <IsUnread>false</IsUnread>
        <OtherAddress>String</OtherAddress>
        <Sender>String</Sender>
        <Text>String</Text>
      </MostRecentMessage>
      <OtherAddress>String</OtherAddress>
    </ConversationInfo>
  </Conversations>
</ListConversationsResponse>