AIM Web Services

<back to all web services

AddContactRecordRequest

AddContactRecord web service.

The following routes are available for this service:
POST/api/AddContactRecord
import 'package:servicestack/servicestack.dart';

// @DataContract
class BaseRequest implements IConvertible
{
    /**
    * 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")
    String? ApiKey;

    // @DataMember
    // @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
    String? OAuthToken;

    BaseRequest({this.ApiKey,this.OAuthToken});
    BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiKey = json['ApiKey'];
        OAuthToken = json['OAuthToken'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiKey': ApiKey,
        'OAuthToken': OAuthToken
    };

    getTypeName() => "BaseRequest";
    TypeContext? context = _ctx;
}

// @DataContract
class BaseSecureRequest extends BaseRequest implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
    String? Token;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
    String? DeviceId;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
    String? AppId;

    BaseSecureRequest({this.Token,this.DeviceId,this.AppId});
    BaseSecureRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Token = json['Token'];
        DeviceId = json['DeviceId'];
        AppId = json['AppId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Token': Token,
        'DeviceId': DeviceId,
        'AppId': AppId
    });

    getTypeName() => "BaseSecureRequest";
    TypeContext? context = _ctx;
}

// @DataContract
class BaseResponseResult implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
    String? StatusCode;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
    String? Login;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
    String? ErrorCode;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
    String? ErrorDisplayText;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
    String? ErrorMessage;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
    String? DomainName;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
    String? IpAddress;

    BaseResponseResult({this.StatusCode,this.Login,this.ErrorCode,this.ErrorDisplayText,this.ErrorMessage,this.DomainName,this.IpAddress});
    BaseResponseResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        StatusCode = json['StatusCode'];
        Login = json['Login'];
        ErrorCode = json['ErrorCode'];
        ErrorDisplayText = json['ErrorDisplayText'];
        ErrorMessage = json['ErrorMessage'];
        DomainName = json['DomainName'];
        IpAddress = json['IpAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'StatusCode': StatusCode,
        'Login': Login,
        'ErrorCode': ErrorCode,
        'ErrorDisplayText': ErrorDisplayText,
        'ErrorMessage': ErrorMessage,
        'DomainName': DomainName,
        'IpAddress': IpAddress
    };

    getTypeName() => "BaseResponseResult";
    TypeContext? context = _ctx;
}

// @DataContract
class BaseResponse implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
    BaseResponseResult? Status;

    BaseResponse({this.Status});
    BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Status = JsonConverters.fromJson(json['Status'],'BaseResponseResult',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Status': JsonConverters.toJson(Status,'BaseResponseResult',context!)
    };

    getTypeName() => "BaseResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class AddContactRecordResponse extends BaseResponse implements IConvertible
{
    // @DataMember
    String? RefNumber;

    AddContactRecordResponse({this.RefNumber});
    AddContactRecordResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        RefNumber = json['RefNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'RefNumber': RefNumber
    });

    getTypeName() => "AddContactRecordResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class AttributeValuePair implements IConvertible
{
    // @DataMember
    String? Name;

    // @DataMember
    String? Value;

    AttributeValuePair({this.Name,this.Value});
    AttributeValuePair.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Value = json['Value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Value': Value
    };

    getTypeName() => "AttributeValuePair";
    TypeContext? context = _ctx;
}

// @DataContract
class FileAttachment implements IConvertible
{
    // @DataMember
    String? FileName;

    // @DataMember
    String? Base64Contents;

    FileAttachment({this.FileName,this.Base64Contents});
    FileAttachment.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        FileName = json['FileName'];
        Base64Contents = json['Base64Contents'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'FileName': FileName,
        'Base64Contents': Base64Contents
    };

    getTypeName() => "FileAttachment";
    TypeContext? context = _ctx;
}

/**
* AddContactRecord web service.
*/
// @DataContract
class AddContactRecordRequest extends BaseSecureRequest implements IConvertible
{
    // @DataMember
    String? Contact;

    // @DataMember
    int? CustomerAcct;

    // @DataMember
    int? ActionId;

    // @DataMember
    DateTime? ActionDate;

    // @DataMember
    bool? PopUp;

    // @DataMember
    int? TopicId;

    // @DataMember
    bool? Closed;

    // @DataMember
    DateTime? ClosedDate;

    // @DataMember
    int? ColorValue;

    // @DataMember
    String? OverrideLanID;

    // @DataMember
    bool? FormattedNotes;

    // @DataMember
    String? Note1;

    // @DataMember
    String? Note2;

    // @DataMember
    String? Note3;

    // @DataMember
    List<AttributeValuePair>? Attributes;

    // @DataMember
    List<FileAttachment>? Attachments;

    AddContactRecordRequest({this.Contact,this.CustomerAcct,this.ActionId,this.ActionDate,this.PopUp,this.TopicId,this.Closed,this.ClosedDate,this.ColorValue,this.OverrideLanID,this.FormattedNotes,this.Note1,this.Note2,this.Note3,this.Attributes,this.Attachments});
    AddContactRecordRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Contact = json['Contact'];
        CustomerAcct = json['CustomerAcct'];
        ActionId = json['ActionId'];
        ActionDate = JsonConverters.fromJson(json['ActionDate'],'DateTime',context!);
        PopUp = json['PopUp'];
        TopicId = json['TopicId'];
        Closed = json['Closed'];
        ClosedDate = JsonConverters.fromJson(json['ClosedDate'],'DateTime',context!);
        ColorValue = json['ColorValue'];
        OverrideLanID = json['OverrideLanID'];
        FormattedNotes = json['FormattedNotes'];
        Note1 = json['Note1'];
        Note2 = json['Note2'];
        Note3 = json['Note3'];
        Attributes = JsonConverters.fromJson(json['Attributes'],'List<AttributeValuePair>',context!);
        Attachments = JsonConverters.fromJson(json['Attachments'],'List<FileAttachment>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Contact': Contact,
        'CustomerAcct': CustomerAcct,
        'ActionId': ActionId,
        'ActionDate': JsonConverters.toJson(ActionDate,'DateTime',context!),
        'PopUp': PopUp,
        'TopicId': TopicId,
        'Closed': Closed,
        'ClosedDate': JsonConverters.toJson(ClosedDate,'DateTime',context!),
        'ColorValue': ColorValue,
        'OverrideLanID': OverrideLanID,
        'FormattedNotes': FormattedNotes,
        'Note1': Note1,
        'Note2': Note2,
        'Note3': Note3,
        'Attributes': JsonConverters.toJson(Attributes,'List<AttributeValuePair>',context!),
        'Attachments': JsonConverters.toJson(Attachments,'List<FileAttachment>',context!)
    });

    getTypeName() => "AddContactRecordRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'active_ewebservice.biz', types: <String, TypeInfo> {
    'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()),
    'BaseSecureRequest': TypeInfo(TypeOf.Class, create:() => BaseSecureRequest()),
    'BaseResponseResult': TypeInfo(TypeOf.Class, create:() => BaseResponseResult()),
    'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
    'AddContactRecordResponse': TypeInfo(TypeOf.Class, create:() => AddContactRecordResponse()),
    'AttributeValuePair': TypeInfo(TypeOf.Class, create:() => AttributeValuePair()),
    'FileAttachment': TypeInfo(TypeOf.Class, create:() => FileAttachment()),
    'AddContactRecordRequest': TypeInfo(TypeOf.Class, create:() => AddContactRecordRequest()),
    'List<AttributeValuePair>': TypeInfo(TypeOf.Class, create:() => <AttributeValuePair>[]),
    'List<FileAttachment>': TypeInfo(TypeOf.Class, create:() => <FileAttachment>[]),
});

Dart AddContactRecordRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/AddContactRecord HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddContactRecordRequest 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>
  <ActionDate>0001-01-01T00:00:00</ActionDate>
  <ActionId>0</ActionId>
  <Attachments xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM">
    <d2p1:FileAttachment>
      <d2p1:Base64Contents>String</d2p1:Base64Contents>
      <d2p1:FileName>String</d2p1:FileName>
    </d2p1:FileAttachment>
  </Attachments>
  <Attributes xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM">
    <d2p1:AttributeValuePair>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:AttributeValuePair>
  </Attributes>
  <Closed>false</Closed>
  <ClosedDate>0001-01-01T00:00:00</ClosedDate>
  <ColorValue>0</ColorValue>
  <Contact>String</Contact>
  <CustomerAcct>0</CustomerAcct>
  <FormattedNotes>false</FormattedNotes>
  <Note1>String</Note1>
  <Note2>String</Note2>
  <Note3>String</Note3>
  <OverrideLanID>String</OverrideLanID>
  <PopUp>false</PopUp>
  <TopicId>0</TopicId>
</AddContactRecordRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AddContactRecordResponse 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>
  <RefNumber>String</RefNumber>
</AddContactRecordResponse>