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 .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /conversations HTTP/1.1 Host: team.evovoice.io Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl 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}}]}