ClubReady Api

<back to all web services

CreateProspectRequest

The following routes are available for this service:
POST/users/prospectCreate a Prospect
namespace ClubReady.Core.Api.Models

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ApiDtoBase() = 
        member val ApiKey:String = null with get,set
        member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ChainId:Nullable<Int32> = new Nullable<Int32>() with get,set

    [<AllowNullLiteral>]
    type CreateProspectRequestDto() = 
        inherit ApiDtoBase()
        member val FirstName:String = null with get,set
        member val LastName:String = null with get,set
        member val Address:String = null with get,set
        member val City:String = null with get,set
        member val State:String = null with get,set
        member val Zip:String = null with get,set
        member val Email:String = null with get,set
        member val Gender:String = null with get,set
        member val AddPackageId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ProspectTypeId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ReferralTypeId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val SendEmail:Boolean = new Boolean() with get,set
        member val Phone:String = null with get,set
        member val WorkPhone:String = null with get,set
        member val DateOfBirth:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val CellPhone:String = null with get,set
        member val Coupon:String = null with get,set
        member val Note:String = null with get,set
        member val EmailTemplateId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ExternalId:String = null with get,set
        member val ReferredBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val AssignToId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val AssignToMethod:Int32 = new Int32() with get,set
        member val ContactedHow:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Username:String = null with get,set
        member val EmergencyContactName:String = null with get,set
        member val EmergencyContactPhone:String = null with get,set
        member val EmergencyContactType:String = null with get,set
        member val EmailOptOut:Boolean = new Boolean() with get,set
        member val NonPromotionalSmsOptedIn:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val PromotionalSmsOptedIn:Nullable<Boolean> = new Nullable<Boolean>() with get,set

    type RestrictedResourceType =
        | Store = 0
        | Chain = 1
        | User = 2
        | Undefined = 3

    [<AllowNullLiteral>]
    type CreateProspectRequest() = 
        inherit CreateProspectRequestDto()
        ///<summary>
        ///Api Key - grants access to resources
        ///</summary>
        [<ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")>]
        member val ApiKey:String = null with get,set

        ///<summary>
        ///ClubReady Club ID (StoreID internally)
        ///</summary>
        [<ApiMember(DataType="integer", Description="ClubReady Club ID (StoreID internally)", IsRequired=true, Name="StoreId", ParameterType="query")>]
        member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///First Name
        ///</summary>
        [<ApiMember(DataType="string", Description="First Name", IsRequired=true, Name="FirstName", ParameterType="query")>]
        member val FirstName:String = null with get,set

        ///<summary>
        ///Last Name
        ///</summary>
        [<ApiMember(DataType="string", Description="Last Name", IsRequired=true, Name="LastName", ParameterType="query")>]
        member val LastName:String = null with get,set

        ///<summary>
        ///Email Address
        ///</summary>
        [<ApiMember(DataType="string", Description="Email Address", IsRequired=true, Name="Email", ParameterType="query")>]
        member val Email:String = null with get,set

        ///<summary>
        ///Gender (Format:'M'|'F')
        ///</summary>
        [<ApiMember(DataType="string", Description="Gender (Format:'M'|'F')", Name="Gender", ParameterType="query")>]
        member val Gender:String = null with get,set

        ///<summary>
        ///Address
        ///</summary>
        [<ApiMember(DataType="string", Description="Address", Name="Address", ParameterType="query")>]
        member val Address:String = null with get,set

        ///<summary>
        ///City
        ///</summary>
        [<ApiMember(DataType="string", Description="City", Name="City", ParameterType="query")>]
        member val City:String = null with get,set

        [<ApiMember(DataType="string", Name="State", ParameterType="query")>]
        member val State:String = null with get,set

        [<ApiMember(DataType="string", Name="Zip", ParameterType="query")>]
        member val Zip:String = null with get,set

        ///<summary>
        ///Home phone
        ///</summary>
        [<ApiMember(DataType="string", Description="Home phone", Name="Phone", ParameterType="query")>]
        member val Phone:String = null with get,set

        ///<summary>
        ///Work phone
        ///</summary>
        [<ApiMember(DataType="string", Description="Work phone", Name="WorkPhone", ParameterType="query")>]
        member val WorkPhone:String = null with get,set

        ///<summary>
        ///Date of Birth (Format:YYYY-MM-DD)
        ///</summary>
        [<ApiMember(DataType="date", Description="Date of Birth (Format:YYYY-MM-DD)", Name="DateOfBirth", ParameterType="query")>]
        member val DateOfBirth:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///Cell phone
        ///</summary>
        [<ApiMember(DataType="string", Description="Cell phone", Name="CellPhone", ParameterType="query")>]
        member val CellPhone:String = null with get,set

        ///<summary>
        ///Specify a Package to apply to the new prospect
        ///</summary>
        [<ApiMember(DataType="integer", Description="Specify a Package to apply to the new prospect", Name="AddPackageId", ParameterType="query")>]
        member val AddPackageId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Specify a specific Prospect Type for the new prospect
        ///</summary>
        [<ApiMember(DataType="integer", Description="Specify a specific Prospect Type for the new prospect", Name="ProspectTypeId", ParameterType="query")>]
        member val ProspectTypeId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Specify a specific Referral Type for the new prospect
        ///</summary>
        [<ApiMember(DataType="integer", Description="Specify a specific Referral Type for the new prospect", Name="ReferralTypeId", ParameterType="query")>]
        member val ReferralTypeId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Send a Welcome email to the new prospect (Format:true|false)
        ///</summary>
        [<ApiMember(DataType="boolean", Description="Send a Welcome email to the new prospect (Format:true|false)", IsRequired=true, Name="SendEmail", ParameterType="query")>]
        member val SendEmail:Boolean = new Boolean() with get,set

        ///<summary>
        ///Only used if SendEmail = True
        ///</summary>
        [<ApiMember(DataType="integer", Description="Only used if SendEmail = True", Name="EmailTemplateId", ParameterType="query")>]
        member val EmailTemplateId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///
        ///</summary>
        [<ApiMember(DataType="string", Description="", Name="Coupon", ParameterType="query")>]
        member val Coupon:String = null with get,set

        ///<summary>
        ///Add an internal note for the new prospect
        ///</summary>
        [<ApiMember(DataType="string", Description="Add an internal note for the new prospect", Name="Note", ParameterType="query")>]
        member val Note:String = null with get,set

        ///<summary>
        ///Unique ID for the user from your system. We store internally as ExternalUserId
        ///</summary>
        [<ApiMember(DataType="string", Description="Unique ID for the user from your system. We store internally as ExternalUserId", Name="ExternalId", ParameterType="query")>]
        member val ExternalId:String = null with get,set

        ///<summary>
        ///User ID of existing user who referred them.
        ///</summary>
        [<ApiMember(DataType="integer", Description="User ID of existing user who referred them.", Name="ReferredBy", ParameterType="query")>]
        member val ReferredBy:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///ClubReady UserId of staff to assign new member to.
        ///</summary>
        [<ApiMember(DataType="integer", Description="ClubReady UserId of staff to assign new member to.", Name="AssignToId", ParameterType="query")>]
        member val AssignToId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Who should be assigned to this lead? 0 = Default lead assignments, 1 = When passing in a ReferredBy user, assign the new Lead to that referring user's Staff assignment.
        ///</summary>
        [<ApiMember(DataType="integer", Description="Who should be assigned to this lead? 0 = Default lead assignments, 1 = When passing in a ReferredBy user, assign the new Lead to that referring user's Staff assignment.", Name="AssignToMethod", ParameterType="query")>]
        member val AssignToMethod:Int32 = new Int32() with get,set

        ///<summary>
        ///Username needs to be between 4 and 255 characters
        ///</summary>
        [<ApiMember(DataType="string", Description="Username needs to be between 4 and 255 characters", Name="Username", ParameterType="query")>]
        member val Username:String = null with get,set

        ///<summary>
        ///Emergency contact name
        ///</summary>
        [<ApiMember(DataType="string", Description="Emergency contact name", Name="EmergencyContactName", ParameterType="query")>]
        member val EmergencyContactName:String = null with get,set

        ///<summary>
        ///Emergency contact phone number
        ///</summary>
        [<ApiMember(DataType="string", Description="Emergency contact phone number", Name="EmergencyContactPhone", ParameterType="query")>]
        member val EmergencyContactPhone:String = null with get,set

        ///<summary>
        ///Emergency contact relationship
        ///</summary>
        [<ApiMember(DataType="string", Description="Emergency contact relationship", Name="EmergencyContactType", ParameterType="query")>]
        member val EmergencyContactType:String = null with get,set

        ///<summary>
        ///Set a prospect's email opt out status (Format:true|false)
        ///</summary>
        [<ApiMember(DataType="boolean", Description="Set a prospect's email opt out status (Format:true|false)", Name="EmailOptOut", ParameterType="query")>]
        member val EmailOptOut:Boolean = new Boolean() with get,set

        ///<summary>
        ///Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)
        ///</summary>
        [<ApiMember(DataType="boolean", Description="Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)", Name="NonPromotionalSmsOptedIn", ParameterType="query")>]
        member val NonPromotionalSmsOptedIn:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)
        ///</summary>
        [<ApiMember(DataType="boolean", Description="Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)", Name="PromotionalSmsOptedIn", ParameterType="query")>]
        member val PromotionalSmsOptedIn:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        member val RestrictedId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val RestrictedResourceType:RestrictedResourceType = new RestrictedResourceType() with get,set

F# CreateProspectRequest 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 /users/prospect HTTP/1.1 
Host: clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateProspectRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Members.Model">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ApiKey>
  <ChainId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ChainId>
  <StoreId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</StoreId>
  <AddPackageId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</AddPackageId>
  <Address xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Address>
  <AssignToId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</AssignToId>
  <AssignToMethod xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</AssignToMethod>
  <CellPhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</CellPhone>
  <City xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</City>
  <ContactedHow xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ContactedHow>
  <Coupon xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Coupon>
  <DateOfBirth xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0001-01-01T00:00:00</DateOfBirth>
  <Email xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Email>
  <EmailOptOut xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</EmailOptOut>
  <EmailTemplateId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</EmailTemplateId>
  <EmergencyContactName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactName>
  <EmergencyContactPhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactPhone>
  <EmergencyContactType xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactType>
  <ExternalId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ExternalId>
  <FirstName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</FirstName>
  <Gender xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Gender>
  <LastName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</LastName>
  <NonPromotionalSmsOptedIn xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</NonPromotionalSmsOptedIn>
  <Note xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Note>
  <Phone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Phone>
  <PromotionalSmsOptedIn xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</PromotionalSmsOptedIn>
  <ProspectTypeId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ProspectTypeId>
  <ReferralTypeId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ReferralTypeId>
  <ReferredBy xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ReferredBy>
  <SendEmail xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</SendEmail>
  <State xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</State>
  <Username xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Username>
  <WorkPhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</WorkPhone>
  <Zip xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Zip>
</CreateProspectRequest>