| GET | /conversations |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ListConversations
{
/**
* The IDs of the account whose conversations you want to retrieve
*/
@ApiMember(Description="The IDs of the account whose conversations you want to retrieve")
public ArrayList<String> accountIds = null;
/**
* The list of endpoint IDs whose conversations you want to retrieve
*/
@ApiMember(Description="The list of endpoint IDs whose conversations you want to retrieve")
public ArrayList<String> endpointIds = null;
/**
* The list of customer IDs whose conversations you want to retrieve
*/
@ApiMember(Description="The list of customer IDs whose conversations you want to retrieve")
public ArrayList<String> customerIds = null;
/**
* The start date for the conversations you want to retrieve
*/
@ApiMember(Description="The start date for the conversations you want to retrieve")
public String afterDate = null;
public ArrayList<String> getAccountIds() { return accountIds; }
public ListConversations setAccountIds(ArrayList<String> value) { this.accountIds = value; return this; }
public ArrayList<String> getEndpointIds() { return endpointIds; }
public ListConversations setEndpointIds(ArrayList<String> value) { this.endpointIds = value; return this; }
public ArrayList<String> getCustomerIds() { return customerIds; }
public ListConversations setCustomerIds(ArrayList<String> value) { this.customerIds = value; return this; }
public String getAfterDate() { return afterDate; }
public ListConversations setAfterDate(String value) { this.afterDate = value; return this; }
}
public static class ListConversationsResponse
{
public ArrayList<ConversationInfo> conversations = null;
public ArrayList<ConversationInfo> getConversations() { return conversations; }
public ListConversationsResponse setConversations(ArrayList<ConversationInfo> value) { this.conversations = value; return this; }
}
public static class ConversationInfo
{
public String id = null;
public String endpointId = null;
public String otherAddress = null;
public MessageInfo mostRecentMessage = null;
public String getId() { return id; }
public ConversationInfo setId(String value) { this.id = value; return this; }
public String getEndpointId() { return endpointId; }
public ConversationInfo setEndpointId(String value) { this.endpointId = value; return this; }
public String getOtherAddress() { return otherAddress; }
public ConversationInfo setOtherAddress(String value) { this.otherAddress = value; return this; }
public MessageInfo getMostRecentMessage() { return mostRecentMessage; }
public ConversationInfo setMostRecentMessage(MessageInfo value) { this.mostRecentMessage = value; return this; }
}
public static class MessageInfo
{
public String id = null;
public String accountId = null;
public String customerId = null;
public String endpointId = null;
public String endpointDisplayName = null;
public String date = null;
public MessageDirections direction = null;
public String otherAddress = null;
public String sender = null;
public String text = null;
public Boolean isUnread = null;
public String getId() { return id; }
public MessageInfo setId(String value) { this.id = value; return this; }
public String getAccountId() { return accountId; }
public MessageInfo setAccountId(String value) { this.accountId = value; return this; }
public String getCustomerId() { return customerId; }
public MessageInfo setCustomerId(String value) { this.customerId = value; return this; }
public String getEndpointId() { return endpointId; }
public MessageInfo setEndpointId(String value) { this.endpointId = value; return this; }
public String getEndpointDisplayName() { return endpointDisplayName; }
public MessageInfo setEndpointDisplayName(String value) { this.endpointDisplayName = value; return this; }
public String getDate() { return date; }
public MessageInfo setDate(String value) { this.date = value; return this; }
public MessageDirections getDirection() { return direction; }
public MessageInfo setDirection(MessageDirections value) { this.direction = value; return this; }
public String getOtherAddress() { return otherAddress; }
public MessageInfo setOtherAddress(String value) { this.otherAddress = value; return this; }
public String getSender() { return sender; }
public MessageInfo setSender(String value) { this.sender = value; return this; }
public String getText() { return text; }
public MessageInfo setText(String value) { this.text = value; return this; }
public Boolean getIsUnread() { return isUnread; }
public MessageInfo setIsUnread(Boolean value) { this.isUnread = value; return this; }
}
public static enum MessageDirections
{
Incoming,
Outgoing;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>