ClubReady Api

<back to all web services

CreateProspectRequestV2

The following routes are available for this service:
POST/v2/{ApiKey}/club/{StoreId}/prospect(obsolete) Create a Prospect
import 'package:servicestack/servicestack.dart';

class ApiDtoBase implements IConvertible
{
    String? ApiKey;
    int? StoreId;
    int? ChainId;

    ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId});
    ApiDtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class CreateProspectRequestV2Dto extends ApiDtoBase implements IConvertible
{
    String? FirstName;
    String? LastName;
    String? Address;
    String? City;
    String? State;
    String? Zip;
    String? Email;
    String? Gender;
    int? AddPackageId;
    int? ProspectTypeId;
    int? ReferralTypeId;
    bool? SendEmail;
    String? Phone;
    String? WorkPhone;
    DateTime? DateOfBirth;
    String? CellPhone;
    String? Coupon;
    String? Note;
    int? EmailTemplateId;

    CreateProspectRequestV2Dto({this.FirstName,this.LastName,this.Address,this.City,this.State,this.Zip,this.Email,this.Gender,this.AddPackageId,this.ProspectTypeId,this.ReferralTypeId,this.SendEmail,this.Phone,this.WorkPhone,this.DateOfBirth,this.CellPhone,this.Coupon,this.Note,this.EmailTemplateId});
    CreateProspectRequestV2Dto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        Address = json['Address'];
        City = json['City'];
        State = json['State'];
        Zip = json['Zip'];
        Email = json['Email'];
        Gender = json['Gender'];
        AddPackageId = json['AddPackageId'];
        ProspectTypeId = json['ProspectTypeId'];
        ReferralTypeId = json['ReferralTypeId'];
        SendEmail = json['SendEmail'];
        Phone = json['Phone'];
        WorkPhone = json['WorkPhone'];
        DateOfBirth = JsonConverters.fromJson(json['DateOfBirth'],'DateTime',context!);
        CellPhone = json['CellPhone'];
        Coupon = json['Coupon'];
        Note = json['Note'];
        EmailTemplateId = json['EmailTemplateId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'FirstName': FirstName,
        'LastName': LastName,
        'Address': Address,
        'City': City,
        'State': State,
        'Zip': Zip,
        'Email': Email,
        'Gender': Gender,
        'AddPackageId': AddPackageId,
        'ProspectTypeId': ProspectTypeId,
        'ReferralTypeId': ReferralTypeId,
        'SendEmail': SendEmail,
        'Phone': Phone,
        'WorkPhone': WorkPhone,
        'DateOfBirth': JsonConverters.toJson(DateOfBirth,'DateTime',context!),
        'CellPhone': CellPhone,
        'Coupon': Coupon,
        'Note': Note,
        'EmailTemplateId': EmailTemplateId
    });

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

enum RestrictedResourceType
{
    Store,
    Chain,
    User,
    Undefined,
}

class CreateProspectRequestV2 extends CreateProspectRequestV2Dto implements IRestrictedApiRequest, IConvertible
{
    /**
    * Api Key - grants access to resources
    */
    // @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
    String? ApiKey;

    /**
    * ClubReady Club ID (StoreID internally)
    */
    // @ApiMember(DataType="integer", Description="ClubReady Club ID (StoreID internally)", IsRequired=true, Name="StoreId", ParameterType="query")
    int? StoreId;

    /**
    * First Name
    */
    // @ApiMember(DataType="string", Description="First Name", IsRequired=true, Name="FirstName", ParameterType="query")
    String? FirstName;

    /**
    * Last Name
    */
    // @ApiMember(DataType="string", Description="Last Name", IsRequired=true, Name="LastName", ParameterType="query")
    String? LastName;

    /**
    * Email Address
    */
    // @ApiMember(DataType="string", Description="Email Address", IsRequired=true, Name="Email", ParameterType="query")
    String? Email;

    /**
    * Gender
    */
    // @ApiMember(DataType="string", Description="Gender", Name="Gender", ParameterType="query")
    String? Gender;

    /**
    * Address
    */
    // @ApiMember(DataType="string", Description="Address", Name="Address", ParameterType="query")
    String? Address;

    /**
    * City
    */
    // @ApiMember(DataType="string", Description="City", Name="City", ParameterType="query")
    String? City;

    // @ApiMember(DataType="string", Name="State", ParameterType="query")
    String? State;

    // @ApiMember(DataType="string", Name="Zip", ParameterType="query")
    String? Zip;

    String? Phone;
    String? WorkPhone;
    DateTime? DateOfBirth;
    String? CellPhone;
    /**
    * Specify a Package to apply to the new prospect
    */
    // @ApiMember(DataType="integer", Description="Specify a Package to apply to the new prospect", Name="AddPackageId", ParameterType="query")
    int? AddPackageId;

    /**
    * Specify a specific Prospect Type for the new prospect
    */
    // @ApiMember(DataType="integer", Description="Specify a specific Prospect Type for the new prospect", Name="ProspectTypeId", ParameterType="query")
    int? ProspectTypeId;

    /**
    * Specify a specific Referral Type for the new prospect
    */
    // @ApiMember(DataType="integer", Description="Specify a specific Referral Type for the new prospect", Name="ReferralTypeId", ParameterType="query")
    int? ReferralTypeId;

    /**
    * Send a Welcome email to the new prospect
    */
    // @ApiMember(DataType="boolean", Description="Send a Welcome email to the new prospect", IsRequired=true, Name="SendEmail", ParameterType="query")
    bool? SendEmail;

    /**
    * Only used if SendEmail = True
    */
    // @ApiMember(DataType="integer", Description="Only used if SendEmail = True", Name="EmailTemplateId", ParameterType="query")
    int? EmailTemplateId;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="", Name="Coupon", ParameterType="query")
    String? Coupon;

    /**
    * Add an internal note for the new prospect
    */
    // @ApiMember(DataType="string", Description="Add an internal note for the new prospect", Name="Note", ParameterType="query")
    String? Note;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

    CreateProspectRequestV2({this.ApiKey,this.StoreId,this.FirstName,this.LastName,this.Email,this.Gender,this.Address,this.City,this.State,this.Zip,this.Phone,this.WorkPhone,this.DateOfBirth,this.CellPhone,this.AddPackageId,this.ProspectTypeId,this.ReferralTypeId,this.SendEmail,this.EmailTemplateId,this.Coupon,this.Note,this.RestrictedId,this.RestrictedResourceType});
    CreateProspectRequestV2.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ApiKey = json['ApiKey'];
        StoreId = json['StoreId'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        Email = json['Email'];
        Gender = json['Gender'];
        Address = json['Address'];
        City = json['City'];
        State = json['State'];
        Zip = json['Zip'];
        Phone = json['Phone'];
        WorkPhone = json['WorkPhone'];
        DateOfBirth = JsonConverters.fromJson(json['DateOfBirth'],'DateTime',context!);
        CellPhone = json['CellPhone'];
        AddPackageId = json['AddPackageId'];
        ProspectTypeId = json['ProspectTypeId'];
        ReferralTypeId = json['ReferralTypeId'];
        SendEmail = json['SendEmail'];
        EmailTemplateId = json['EmailTemplateId'];
        Coupon = json['Coupon'];
        Note = json['Note'];
        RestrictedId = json['RestrictedId'];
        RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ApiKey': ApiKey,
        'StoreId': StoreId,
        'FirstName': FirstName,
        'LastName': LastName,
        'Email': Email,
        'Gender': Gender,
        'Address': Address,
        'City': City,
        'State': State,
        'Zip': Zip,
        'Phone': Phone,
        'WorkPhone': WorkPhone,
        'DateOfBirth': JsonConverters.toJson(DateOfBirth,'DateTime',context!),
        'CellPhone': CellPhone,
        'AddPackageId': AddPackageId,
        'ProspectTypeId': ProspectTypeId,
        'ReferralTypeId': ReferralTypeId,
        'SendEmail': SendEmail,
        'EmailTemplateId': EmailTemplateId,
        'Coupon': Coupon,
        'Note': Note,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
    });

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

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'CreateProspectRequestV2Dto': TypeInfo(TypeOf.Class, create:() => CreateProspectRequestV2Dto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'CreateProspectRequestV2': TypeInfo(TypeOf.Class, create:() => CreateProspectRequestV2()),
});

Dart CreateProspectRequestV2 DTOs

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

HTTP + JSV

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

POST /v2/{ApiKey}/club/{StoreId}/prospect HTTP/1.1 
Host: clubready.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ApiKey: String,
	StoreId: 0,
	FirstName: String,
	LastName: String,
	Email: String,
	Gender: String,
	Address: String,
	City: String,
	State: String,
	Zip: String,
	Phone: String,
	WorkPhone: String,
	DateOfBirth: 0001-01-01,
	CellPhone: String,
	AddPackageId: 0,
	ProspectTypeId: 0,
	ReferralTypeId: 0,
	SendEmail: False,
	EmailTemplateId: 0,
	Coupon: String,
	Note: String,
	RestrictedId: 0,
	RestrictedResourceType: Store,
	ChainId: 0
}