| Requires any of the roles: | Worker, Agent, Administrator |
| GET,PUT,OPTIONS | /v1/ContactCategory/ |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ContactCategoryRequest
{
public UUID ContactGUID = null;
public Integer CategoryId = null;
public UUID getContactGUID() { return ContactGUID; }
public ContactCategoryRequest setContactGUID(UUID value) { this.ContactGUID = value; return this; }
public Integer getCategoryId() { return CategoryId; }
public ContactCategoryRequest setCategoryId(Integer value) { this.CategoryId = value; return this; }
}
public static class ContactCategoryResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<ContactCategory> ContactCategories = new ArrayList<ContactCategory>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ContactCategoryResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<ContactCategory> getContactCategories() { return ContactCategories; }
public ContactCategoryResponse setContactCategories(ArrayList<ContactCategory> value) { this.ContactCategories = value; return this; }
}
public static class ContactCategory
{
public Integer Id = null;
public String Name = null;
public Integer getId() { return Id; }
public ContactCategory setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public ContactCategory setName(String value) { this.Name = value; return this; }
}
}
Java ContactCategoryRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /v1/ContactCategory/ HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ContactGUID: 00000000000000000000000000000000,
CategoryId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
ContactCategories:
[
{
Id: 0,
Name: String
}
]
}