Trendsic Platform Service

<back to all web services

AgentCRMRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET/v1/AgentCRM/{AgentId}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class QueueDefault implements IConvertible
{
    String? LocationId;
    List<String>? Services = [];

    QueueDefault({this.LocationId,this.Services});
    QueueDefault.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'LocationId': LocationId,
        'Services': JsonConverters.toJson(Services,'List<String>',context!)
    };

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

class Agent implements IConvertible
{
    int? AgentId;
    String? Company;
    String? AgentName;
    String? FirstName;
    String? LastName;
    String? MiddleInitial;
    String? Address1;
    String? Address2;
    String? City;
    String? State;
    String? Zip;
    String? Country;
    String? Email;
    String? EmailSignature;
    String? HomePhone;
    String? CellPhone;
    String? WorkPhone;
    bool? InsLicensed;
    bool? AgreeToDisclosures;
    DateTime? AgreeToDate;
    DateTime? PaidDate;
    String? AgentNumber;
    String? ReferringAgent;
    String? PlacementAgent;
    DateTime? CreatedDate;
    String? UserId;
    bool? IsAgent;
    String? Package;
    String? StoreName;
    String? Notes;
    int? Upline1;
    int? Upline2;
    int? Upline3;
    int? Upline4;
    int? MVPID;
    int? AVPID;
    int? RVPID;
    double? AgentLevel;
    bool? IsMVP;
    bool? IsRVP;
    bool? IsAVP;
    bool? IsAdmin;
    bool? IsBusinessCardAdmin;
    String? TeamName;
    String? LocationId;
    String? CalendarId;
    String? Rank;
    bool? NBC;
    double? Upline1Percent;
    double? Upline2Percent;
    double? Upline3Percent;
    double? Upline4Percent;
    String? AgentStatus;
    String? Office;
    DateTime? DOB;
    String? SSN;
    String? Fax;
    String? BusinessEmail;
    DateTime? ModifiedDate;
    String? ModifiedBy;
    String? TimeZone;
    bool? LeaderLocked;
    DateTime? LastSubmittedBusinessDate;
    DateTime? GracePeriodDate;
    bool? Vested;
    DateTime? DirectPay;
    String? DirectPayApprBy;
    double? FactFinderBilling;
    String? FullName;
    String? ByLastName;
    bool? IsSecurityLicensed;
    bool? IsEncompassAdmin;
    String? ApiKey;
    String? LastSessionId;
    DateTime? LastLogin;
    bool? MfaActive;
    bool? RequireMFA;
    String? SMSPhoneNumber;
    bool? VerifiedEmailStatus;
    bool? VerifiedCellPhoneStatus;
    String? SchedulerUrl;
    QueueDefault? QueueDefaults;
    List<String>? Roles = [];
    bool? PasswordUpdated;
    bool? RestrictToSingleSession;

    Agent({this.AgentId,this.Company,this.AgentName,this.FirstName,this.LastName,this.MiddleInitial,this.Address1,this.Address2,this.City,this.State,this.Zip,this.Country,this.Email,this.EmailSignature,this.HomePhone,this.CellPhone,this.WorkPhone,this.InsLicensed,this.AgreeToDisclosures,this.AgreeToDate,this.PaidDate,this.AgentNumber,this.ReferringAgent,this.PlacementAgent,this.CreatedDate,this.UserId,this.IsAgent,this.Package,this.StoreName,this.Notes,this.Upline1,this.Upline2,this.Upline3,this.Upline4,this.MVPID,this.AVPID,this.RVPID,this.AgentLevel,this.IsMVP,this.IsRVP,this.IsAVP,this.IsAdmin,this.IsBusinessCardAdmin,this.TeamName,this.LocationId,this.CalendarId,this.Rank,this.NBC,this.Upline1Percent,this.Upline2Percent,this.Upline3Percent,this.Upline4Percent,this.AgentStatus,this.Office,this.DOB,this.SSN,this.Fax,this.BusinessEmail,this.ModifiedDate,this.ModifiedBy,this.TimeZone,this.LeaderLocked,this.LastSubmittedBusinessDate,this.GracePeriodDate,this.Vested,this.DirectPay,this.DirectPayApprBy,this.FactFinderBilling,this.FullName,this.ByLastName,this.IsSecurityLicensed,this.IsEncompassAdmin,this.ApiKey,this.LastSessionId,this.LastLogin,this.MfaActive,this.RequireMFA,this.SMSPhoneNumber,this.VerifiedEmailStatus,this.VerifiedCellPhoneStatus,this.SchedulerUrl,this.QueueDefaults,this.Roles,this.PasswordUpdated,this.RestrictToSingleSession});
    Agent.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AgentId = json['AgentId'];
        Company = json['Company'];
        AgentName = json['AgentName'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        MiddleInitial = json['MiddleInitial'];
        Address1 = json['Address1'];
        Address2 = json['Address2'];
        City = json['City'];
        State = json['State'];
        Zip = json['Zip'];
        Country = json['Country'];
        Email = json['Email'];
        EmailSignature = json['EmailSignature'];
        HomePhone = json['HomePhone'];
        CellPhone = json['CellPhone'];
        WorkPhone = json['WorkPhone'];
        InsLicensed = json['InsLicensed'];
        AgreeToDisclosures = json['AgreeToDisclosures'];
        AgreeToDate = JsonConverters.fromJson(json['AgreeToDate'],'DateTime',context!);
        PaidDate = JsonConverters.fromJson(json['PaidDate'],'DateTime',context!);
        AgentNumber = json['AgentNumber'];
        ReferringAgent = json['ReferringAgent'];
        PlacementAgent = json['PlacementAgent'];
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        UserId = json['UserId'];
        IsAgent = json['IsAgent'];
        Package = json['Package'];
        StoreName = json['StoreName'];
        Notes = json['Notes'];
        Upline1 = json['Upline1'];
        Upline2 = json['Upline2'];
        Upline3 = json['Upline3'];
        Upline4 = json['Upline4'];
        MVPID = json['MVPID'];
        AVPID = json['AVPID'];
        RVPID = json['RVPID'];
        AgentLevel = JsonConverters.toDouble(json['AgentLevel']);
        IsMVP = json['IsMVP'];
        IsRVP = json['IsRVP'];
        IsAVP = json['IsAVP'];
        IsAdmin = json['IsAdmin'];
        IsBusinessCardAdmin = json['IsBusinessCardAdmin'];
        TeamName = json['TeamName'];
        LocationId = json['LocationId'];
        CalendarId = json['CalendarId'];
        Rank = json['Rank'];
        NBC = json['NBC'];
        Upline1Percent = JsonConverters.toDouble(json['Upline1Percent']);
        Upline2Percent = JsonConverters.toDouble(json['Upline2Percent']);
        Upline3Percent = JsonConverters.toDouble(json['Upline3Percent']);
        Upline4Percent = JsonConverters.toDouble(json['Upline4Percent']);
        AgentStatus = json['AgentStatus'];
        Office = json['Office'];
        DOB = JsonConverters.fromJson(json['DOB'],'DateTime',context!);
        SSN = json['SSN'];
        Fax = json['Fax'];
        BusinessEmail = json['BusinessEmail'];
        ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!);
        ModifiedBy = json['ModifiedBy'];
        TimeZone = json['TimeZone'];
        LeaderLocked = json['LeaderLocked'];
        LastSubmittedBusinessDate = JsonConverters.fromJson(json['LastSubmittedBusinessDate'],'DateTime',context!);
        GracePeriodDate = JsonConverters.fromJson(json['GracePeriodDate'],'DateTime',context!);
        Vested = json['Vested'];
        DirectPay = JsonConverters.fromJson(json['DirectPay'],'DateTime',context!);
        DirectPayApprBy = json['DirectPayApprBy'];
        FactFinderBilling = JsonConverters.toDouble(json['FactFinderBilling']);
        FullName = json['FullName'];
        ByLastName = json['ByLastName'];
        IsSecurityLicensed = json['IsSecurityLicensed'];
        IsEncompassAdmin = json['IsEncompassAdmin'];
        ApiKey = json['ApiKey'];
        LastSessionId = json['LastSessionId'];
        LastLogin = JsonConverters.fromJson(json['LastLogin'],'DateTime',context!);
        MfaActive = json['MfaActive'];
        RequireMFA = json['RequireMFA'];
        SMSPhoneNumber = json['SMSPhoneNumber'];
        VerifiedEmailStatus = json['VerifiedEmailStatus'];
        VerifiedCellPhoneStatus = json['VerifiedCellPhoneStatus'];
        SchedulerUrl = json['SchedulerUrl'];
        QueueDefaults = JsonConverters.fromJson(json['QueueDefaults'],'QueueDefault',context!);
        Roles = JsonConverters.fromJson(json['Roles'],'List<String>',context!);
        PasswordUpdated = json['PasswordUpdated'];
        RestrictToSingleSession = json['RestrictToSingleSession'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AgentId': AgentId,
        'Company': Company,
        'AgentName': AgentName,
        'FirstName': FirstName,
        'LastName': LastName,
        'MiddleInitial': MiddleInitial,
        'Address1': Address1,
        'Address2': Address2,
        'City': City,
        'State': State,
        'Zip': Zip,
        'Country': Country,
        'Email': Email,
        'EmailSignature': EmailSignature,
        'HomePhone': HomePhone,
        'CellPhone': CellPhone,
        'WorkPhone': WorkPhone,
        'InsLicensed': InsLicensed,
        'AgreeToDisclosures': AgreeToDisclosures,
        'AgreeToDate': JsonConverters.toJson(AgreeToDate,'DateTime',context!),
        'PaidDate': JsonConverters.toJson(PaidDate,'DateTime',context!),
        'AgentNumber': AgentNumber,
        'ReferringAgent': ReferringAgent,
        'PlacementAgent': PlacementAgent,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'UserId': UserId,
        'IsAgent': IsAgent,
        'Package': Package,
        'StoreName': StoreName,
        'Notes': Notes,
        'Upline1': Upline1,
        'Upline2': Upline2,
        'Upline3': Upline3,
        'Upline4': Upline4,
        'MVPID': MVPID,
        'AVPID': AVPID,
        'RVPID': RVPID,
        'AgentLevel': AgentLevel,
        'IsMVP': IsMVP,
        'IsRVP': IsRVP,
        'IsAVP': IsAVP,
        'IsAdmin': IsAdmin,
        'IsBusinessCardAdmin': IsBusinessCardAdmin,
        'TeamName': TeamName,
        'LocationId': LocationId,
        'CalendarId': CalendarId,
        'Rank': Rank,
        'NBC': NBC,
        'Upline1Percent': Upline1Percent,
        'Upline2Percent': Upline2Percent,
        'Upline3Percent': Upline3Percent,
        'Upline4Percent': Upline4Percent,
        'AgentStatus': AgentStatus,
        'Office': Office,
        'DOB': JsonConverters.toJson(DOB,'DateTime',context!),
        'SSN': SSN,
        'Fax': Fax,
        'BusinessEmail': BusinessEmail,
        'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!),
        'ModifiedBy': ModifiedBy,
        'TimeZone': TimeZone,
        'LeaderLocked': LeaderLocked,
        'LastSubmittedBusinessDate': JsonConverters.toJson(LastSubmittedBusinessDate,'DateTime',context!),
        'GracePeriodDate': JsonConverters.toJson(GracePeriodDate,'DateTime',context!),
        'Vested': Vested,
        'DirectPay': JsonConverters.toJson(DirectPay,'DateTime',context!),
        'DirectPayApprBy': DirectPayApprBy,
        'FactFinderBilling': FactFinderBilling,
        'FullName': FullName,
        'ByLastName': ByLastName,
        'IsSecurityLicensed': IsSecurityLicensed,
        'IsEncompassAdmin': IsEncompassAdmin,
        'ApiKey': ApiKey,
        'LastSessionId': LastSessionId,
        'LastLogin': JsonConverters.toJson(LastLogin,'DateTime',context!),
        'MfaActive': MfaActive,
        'RequireMFA': RequireMFA,
        'SMSPhoneNumber': SMSPhoneNumber,
        'VerifiedEmailStatus': VerifiedEmailStatus,
        'VerifiedCellPhoneStatus': VerifiedCellPhoneStatus,
        'SchedulerUrl': SchedulerUrl,
        'QueueDefaults': JsonConverters.toJson(QueueDefaults,'QueueDefault',context!),
        'Roles': JsonConverters.toJson(Roles,'List<String>',context!),
        'PasswordUpdated': PasswordUpdated,
        'RestrictToSingleSession': RestrictToSingleSession
    };

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

class AgentResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<Agent>? Agent = [];

    AgentResponse({this.ResponseStatus,this.Agent});
    AgentResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Agent': JsonConverters.toJson(Agent,'List<Agent>',context!)
    };

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

class AgentCRMRequest implements IConvertible
{
    int? AgentId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'QueueDefault': TypeInfo(TypeOf.Class, create:() => QueueDefault()),
    'Agent': TypeInfo(TypeOf.Class, create:() => Agent()),
    'AgentResponse': TypeInfo(TypeOf.Class, create:() => AgentResponse()),
    'List<Agent>': TypeInfo(TypeOf.Class, create:() => <Agent>[]),
    'AgentCRMRequest': TypeInfo(TypeOf.Class, create:() => AgentCRMRequest()),
});

Dart AgentCRMRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /v1/AgentCRM/{AgentId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Agent":[{"AgentId":0,"Company":"String","AgentName":"String","FirstName":"String","LastName":"String","MiddleInitial":"String","Address1":"String","Address2":"String","City":"String","State":"String","Zip":"String","Country":"String","Email":"String","EmailSignature":"String","HomePhone":"String","CellPhone":"String","WorkPhone":"String","InsLicensed":false,"AgreeToDisclosures":false,"AgreeToDate":"0001-01-01T00:00:00.0000000","PaidDate":"0001-01-01T00:00:00.0000000","AgentNumber":"String","ReferringAgent":"String","PlacementAgent":"String","CreatedDate":"0001-01-01T00:00:00.0000000","UserId":"00000000000000000000000000000000","IsAgent":false,"Package":"String","StoreName":"String","Notes":"String","Upline1":0,"Upline2":0,"Upline3":0,"Upline4":0,"MVPID":0,"AVPID":0,"RVPID":0,"AgentLevel":0,"IsMVP":false,"IsRVP":false,"IsAVP":false,"IsAdmin":false,"IsBusinessCardAdmin":false,"TeamName":"String","LocationId":"00000000000000000000000000000000","CalendarId":"00000000000000000000000000000000","Rank":"String","NBC":false,"Upline1Percent":0,"Upline2Percent":0,"Upline3Percent":0,"Upline4Percent":0,"AgentStatus":"String","Office":"String","DOB":"0001-01-01T00:00:00.0000000","SSN":"String","Fax":"String","BusinessEmail":"String","ModifiedDate":"0001-01-01T00:00:00.0000000","ModifiedBy":"String","TimeZone":"String","LeaderLocked":false,"LastSubmittedBusinessDate":"0001-01-01T00:00:00.0000000","GracePeriodDate":"0001-01-01T00:00:00.0000000","Vested":false,"DirectPay":"0001-01-01T00:00:00.0000000","DirectPayApprBy":"String","FactFinderBilling":0,"FullName":"String","ByLastName":"String","IsSecurityLicensed":false,"IsEncompassAdmin":false,"ApiKey":"00000000000000000000000000000000","LastSessionId":"String","LastLogin":"0001-01-01T00:00:00.0000000","MfaActive":false,"RequireMFA":false,"SMSPhoneNumber":"String","VerifiedEmailStatus":false,"VerifiedCellPhoneStatus":false,"SchedulerUrl":"String","QueueDefaults":{"LocationId":"00000000000000000000000000000000","Services":["00000000000000000000000000000000"]},"Roles":["String"],"PasswordUpdated":false,"RestrictToSingleSession":false}]}