ClubReady Api

<back to all web services

CreateProspectRequest

The following routes are available for this service:
POST/users/prospectCreate a Prospect
import java.math.*
import java.util.*
import net.servicestack.client.*


open class CreateProspectRequest : CreateProspectRequestDto(), IRestrictedApiRequest
{
    /**
    * Api Key - grants access to resources
    */
    @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
    var ApiKey:String? = null

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

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

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

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

    /**
    * Gender (Format:'M'|'F')
    */
    @ApiMember(DataType="string", Description="Gender (Format:'M'|'F')", Name="Gender", ParameterType="query")
    var Gender:String? = null

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

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

    @ApiMember(DataType="string", Name="State", ParameterType="query")
    var State:String? = null

    @ApiMember(DataType="string", Name="Zip", ParameterType="query")
    var Zip:String? = null

    /**
    * Home phone
    */
    @ApiMember(DataType="string", Description="Home phone", Name="Phone", ParameterType="query")
    var Phone:String? = null

    /**
    * Work phone
    */
    @ApiMember(DataType="string", Description="Work phone", Name="WorkPhone", ParameterType="query")
    var WorkPhone:String? = null

    /**
    * Date of Birth (Format:YYYY-MM-DD)
    */
    @ApiMember(DataType="date", Description="Date of Birth (Format:YYYY-MM-DD)", Name="DateOfBirth", ParameterType="query")
    var DateOfBirth:Date? = null

    /**
    * Cell phone
    */
    @ApiMember(DataType="string", Description="Cell phone", Name="CellPhone", ParameterType="query")
    var CellPhone:String? = null

    /**
    * 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")
    var AddPackageId:Int? = null

    /**
    * 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")
    var ProspectTypeId:Int? = null

    /**
    * 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")
    var ReferralTypeId:Int? = null

    /**
    * Send a Welcome email to the new prospect (Format:true|false)
    */
    @ApiMember(DataType="boolean", Description="Send a Welcome email to the new prospect (Format:true|false)", IsRequired=true, Name="SendEmail", ParameterType="query")
    var SendEmail:Boolean? = null

    /**
    * Only used if SendEmail = True
    */
    @ApiMember(DataType="integer", Description="Only used if SendEmail = True", Name="EmailTemplateId", ParameterType="query")
    var EmailTemplateId:Int? = null

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

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

    /**
    * Unique ID for the user from your system. We store internally as ExternalUserId
    */
    @ApiMember(DataType="string", Description="Unique ID for the user from your system. We store internally as ExternalUserId", Name="ExternalId", ParameterType="query")
    var ExternalId:String? = null

    /**
    * User ID of existing user who referred them.
    */
    @ApiMember(DataType="integer", Description="User ID of existing user who referred them.", Name="ReferredBy", ParameterType="query")
    var ReferredBy:Int? = null

    /**
    * ClubReady UserId of staff to assign new member to.
    */
    @ApiMember(DataType="integer", Description="ClubReady UserId of staff to assign new member to.", Name="AssignToId", ParameterType="query")
    var AssignToId:Int? = null

    /**
    * 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.
    */
    @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")
    var AssignToMethod:Int? = null

    /**
    * Username needs to be between 4 and 255 characters
    */
    @ApiMember(DataType="string", Description="Username needs to be between 4 and 255 characters", Name="Username", ParameterType="query")
    var Username:String? = null

    /**
    * Emergency contact name
    */
    @ApiMember(DataType="string", Description="Emergency contact name", Name="EmergencyContactName", ParameterType="query")
    var EmergencyContactName:String? = null

    /**
    * Emergency contact phone number
    */
    @ApiMember(DataType="string", Description="Emergency contact phone number", Name="EmergencyContactPhone", ParameterType="query")
    var EmergencyContactPhone:String? = null

    /**
    * Emergency contact relationship
    */
    @ApiMember(DataType="string", Description="Emergency contact relationship", Name="EmergencyContactType", ParameterType="query")
    var EmergencyContactType:String? = null

    /**
    * Set a prospect's email opt out status (Format:true|false)
    */
    @ApiMember(DataType="boolean", Description="Set a prospect's email opt out status (Format:true|false)", Name="EmailOptOut", ParameterType="query")
    var EmailOptOut:Boolean? = null

    /**
    * Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)
    */
    @ApiMember(DataType="boolean", Description="Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)", Name="NonPromotionalSmsOptedIn", ParameterType="query")
    var NonPromotionalSmsOptedIn:Boolean? = null

    /**
    * Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)
    */
    @ApiMember(DataType="boolean", Description="Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)", Name="PromotionalSmsOptedIn", ParameterType="query")
    var PromotionalSmsOptedIn:Boolean? = null

    var RestrictedId:Int? = null
    var RestrictedResourceType:RestrictedResourceType? = null
}

open class CreateProspectRequestDto : ApiDtoBase()
{
    var FirstName:String? = null
    var LastName:String? = null
    var Address:String? = null
    var City:String? = null
    var State:String? = null
    var Zip:String? = null
    var Email:String? = null
    var Gender:String? = null
    var AddPackageId:Int? = null
    var ProspectTypeId:Int? = null
    var ReferralTypeId:Int? = null
    var SendEmail:Boolean? = null
    var Phone:String? = null
    var WorkPhone:String? = null
    var DateOfBirth:Date? = null
    var CellPhone:String? = null
    var Coupon:String? = null
    var Note:String? = null
    var EmailTemplateId:Int? = null
    var ExternalId:String? = null
    var ReferredBy:Int? = null
    var AssignToId:Int? = null
    var AssignToMethod:Int? = null
    var ContactedHow:Int? = null
    var Username:String? = null
    var EmergencyContactName:String? = null
    var EmergencyContactPhone:String? = null
    var EmergencyContactType:String? = null
    var EmailOptOut:Boolean? = null
    var NonPromotionalSmsOptedIn:Boolean? = null
    var PromotionalSmsOptedIn:Boolean? = null
}

open class ApiDtoBase
{
    var ApiKey:String? = null
    var StoreId:Int? = null
    var ChainId:Int? = null
}

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

Kotlin 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>