| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/Report/AgentCategorization/{AgentId}/ | ||
|---|---|---|---|
| GET,OPTIONS | /v1/Report/AgentCategorization/{AgentId}/{ContactCategoryId} |
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
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AgentCategorization:
agent_id: int = 0
agent_first_name: Optional[str] = None
agent_last_name: Optional[str] = None
contact_id: int = 0
contact_g_u_i_d: Optional[str] = None
contact_first_name: Optional[str] = None
contact_last_name: Optional[str] = None
contact_status: int = 0
contact_status_name: Optional[str] = None
contact_category: int = 0
contact_category_name: Optional[str] = None
contact_email: Optional[str] = None
contact_phone: Optional[str] = None
is_shared: bool = False
writing_agent_id: int = 0
is_writing_agent: bool = False
writing_agent_name: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AgentCategorizationResponse:
response_status: Optional[ResponseStatus] = None
contacts: List[AgentCategorization] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AgentCategorizationRequest:
agent_id: int = 0
contact_category_id: int = 0
Python AgentCategorizationRequest 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.
GET /v1/Report/AgentCategorization/{AgentId}/ HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
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
}
},
Contacts:
[
{
AgentId: 0,
AgentFirstName: String,
AgentLastName: String,
ContactId: 0,
ContactGUID: 00000000000000000000000000000000,
ContactFirstName: String,
ContactLastName: String,
ContactStatus: 0,
ContactStatusName: String,
ContactCategory: 0,
ContactCategoryName: String,
ContactEmail: String,
ContactPhone: String,
IsShared: False,
WritingAgentId: 0,
IsWritingAgent: False,
WritingAgentName: String
}
]
}