POST, GET | /api/SearchContactManagement |
---|
// @DataContract
export class BaseRequest
{
/** @description This is your AIM API Key provided by Tri-Tech */
// @DataMember
// @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
public ApiKey: string;
// @DataMember
// @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
public OAuthToken: string;
public constructor(init?: Partial<BaseRequest>) { (Object as any).assign(this, init); }
}
// @DataContract
export class BaseSecureRequest extends BaseRequest
{
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
public Token: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
public DeviceId: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
public AppId: string;
public constructor(init?: Partial<BaseSecureRequest>) { super(init); (Object as any).assign(this, init); }
}
// @DataContract
export class BaseResponseResult
{
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
public StatusCode: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
public Login: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
public ErrorCode: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
public ErrorDisplayText: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
public ErrorMessage: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
public DomainName: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
public IpAddress: string;
public constructor(init?: Partial<BaseResponseResult>) { (Object as any).assign(this, init); }
}
// @DataContract
export class BaseResponse
{
/** @description */
// @DataMember
// @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
public Status: BaseResponseResult;
public constructor(init?: Partial<BaseResponse>) { (Object as any).assign(this, init); }
}
// @DataContract
export class AttributeValuePair
{
// @DataMember
public Name: string;
// @DataMember
public Value: string;
public constructor(init?: Partial<AttributeValuePair>) { (Object as any).assign(this, init); }
}
// @DataContract
export class ContactManagementRecord
{
// @DataMember
public Ref: string;
// @DataMember
public DateTime: string;
// @DataMember
public Contact: string;
// @DataMember
public CusAcct: number;
// @DataMember
public ActionId: number;
// @DataMember
public Status: string;
// @DataMember
public ActionDate?: string;
// @DataMember
public PopUp: boolean;
// @DataMember
public TopicId?: number;
// @DataMember
public Topic: string;
// @DataMember
public Closed: boolean;
// @DataMember
public ClosedDate?: string;
// @DataMember
public ColorValue: number;
// @DataMember
public LanId: string;
// @DataMember
public FormattedNotes: boolean;
// @DataMember
public Note1: string;
// @DataMember
public Note2: string;
// @DataMember
public Note3: string;
// @DataMember
public Attributes: AttributeValuePair[];
public constructor(init?: Partial<ContactManagementRecord>) { (Object as any).assign(this, init); }
}
// @DataContract
export class SearchContactManagementResponse extends BaseResponse
{
// @DataMember
public ContactManagementRecords: ContactManagementRecord[];
public constructor(init?: Partial<SearchContactManagementResponse>) { super(init); (Object as any).assign(this, init); }
}
/** @description SearchContactManagement web service. */
// @DataContract
export class SearchContactManagementRequest extends BaseSecureRequest
{
// @DataMember
public FormattedNotes?: boolean;
/** @description If sent, all other search parameters will be ignored. */
// @DataMember
// @ApiMember(DataType="string", Description="If sent, all other search parameters will be ignored.", Name="Ref", ParameterType="query")
public Ref: string;
// @DataMember
public Acct?: number;
// @DataMember
public DateFrom?: string;
// @DataMember
public DateTo?: string;
// @DataMember
public IncludeClosed?: boolean;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="SearchString", ParameterType="query")
public SearchString: string;
// @DataMember
public ActionId?: number;
public constructor(init?: Partial<SearchContactManagementRequest>) { super(init); (Object as any).assign(this, init); }
}
TypeScript SearchContactManagementRequest DTOs
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.
POST /api/SearchContactManagement HTTP/1.1
Host: active-ewebservice.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SearchContactManagementRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
<ApiKey>String</ApiKey>
<OAuthToken>String</OAuthToken>
<AppId>String</AppId>
<DeviceId>String</DeviceId>
<Token>String</Token>
<Acct>0</Acct>
<ActionId>0</ActionId>
<DateFrom>0001-01-01T00:00:00</DateFrom>
<DateTo>0001-01-01T00:00:00</DateTo>
<FormattedNotes>false</FormattedNotes>
<IncludeClosed>false</IncludeClosed>
<Ref>String</Ref>
<SearchString>String</SearchString>
</SearchContactManagementRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <SearchContactManagementResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService"> <Status> <DomainName>String</DomainName> <ErrorCode>String</ErrorCode> <ErrorDisplayText>String</ErrorDisplayText> <ErrorMessage>String</ErrorMessage> <IpAddress>String</IpAddress> <Login>String</Login> <StatusCode>String</StatusCode> </Status> <ContactManagementRecords xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM"> <d2p1:ContactManagementRecord> <d2p1:ActionDate>0001-01-01T00:00:00</d2p1:ActionDate> <d2p1:ActionId>0</d2p1:ActionId> <d2p1:Attributes> <d2p1:AttributeValuePair> <d2p1:Name>String</d2p1:Name> <d2p1:Value>String</d2p1:Value> </d2p1:AttributeValuePair> </d2p1:Attributes> <d2p1:Closed>false</d2p1:Closed> <d2p1:ClosedDate>0001-01-01T00:00:00</d2p1:ClosedDate> <d2p1:ColorValue>0</d2p1:ColorValue> <d2p1:Contact>String</d2p1:Contact> <d2p1:CusAcct>0</d2p1:CusAcct> <d2p1:DateTime>0001-01-01T00:00:00</d2p1:DateTime> <d2p1:FormattedNotes>false</d2p1:FormattedNotes> <d2p1:LanId>String</d2p1:LanId> <d2p1:Note1>String</d2p1:Note1> <d2p1:Note2>String</d2p1:Note2> <d2p1:Note3>String</d2p1:Note3> <d2p1:PopUp>false</d2p1:PopUp> <d2p1:Ref>String</d2p1:Ref> <d2p1:Status>String</d2p1:Status> <d2p1:Topic>String</d2p1:Topic> <d2p1:TopicId>0</d2p1:TopicId> </d2p1:ContactManagementRecord> </ContactManagementRecords> </SearchContactManagementResponse>