Required role: | User |
GET | /app/contacts |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Gets the contacts associated with the authenticated user
*/
@Api(Description="Gets the contacts associated with the authenticated user")
public static class GetMyContacts
{
}
public static class GetMyContactsResponse
{
public ArrayList<AppContact> contacts = null;
public ArrayList<AppContact> getContacts() { return contacts; }
public GetMyContactsResponse setContacts(ArrayList<AppContact> value) { this.contacts = value; return this; }
}
public static class AppContact
{
public String displayName = null;
public String address = null;
public AppContactTypes type = null;
public String customerName = null;
public Boolean canCall = null;
public Boolean canChat = null;
public String getDisplayName() { return displayName; }
public AppContact setDisplayName(String value) { this.displayName = value; return this; }
public String getAddress() { return address; }
public AppContact setAddress(String value) { this.address = value; return this; }
public AppContactTypes getType() { return type; }
public AppContact setType(AppContactTypes value) { this.type = value; return this; }
public String getCustomerName() { return customerName; }
public AppContact setCustomerName(String value) { this.customerName = value; return this; }
public Boolean isCanCall() { return canCall; }
public AppContact setCanCall(Boolean value) { this.canCall = value; return this; }
public Boolean isCanChat() { return canChat; }
public AppContact setCanChat(Boolean value) { this.canChat = value; return this; }
}
public static enum AppContactTypes
{
User,
Team,
Contact;
}
}
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 /app/contacts HTTP/1.1 Host: evovoice.io Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetMyContactsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.App"> <Contacts> <AppContact> <Address>String</Address> <CanCall>false</CanCall> <CanChat>false</CanChat> <CustomerName>String</CustomerName> <DisplayName>String</DisplayName> <Type>User</Type> </AppContact> </Contacts> </GetMyContactsResponse>