POST | /users/prospect | Create a Prospect |
---|
export class ApiDtoBase
{
public ApiKey: string;
public StoreId?: number;
public ChainId?: number;
public constructor(init?: Partial<ApiDtoBase>) { (Object as any).assign(this, init); }
}
export class CreateProspectRequestDto extends ApiDtoBase
{
public FirstName: string;
public LastName: string;
public Address: string;
public City: string;
public State: string;
public Zip: string;
public Email: string;
public Gender: string;
public AddPackageId?: number;
public ProspectTypeId?: number;
public ReferralTypeId?: number;
public SendEmail: boolean;
public Phone: string;
public WorkPhone: string;
public DateOfBirth?: string;
public CellPhone: string;
public Coupon: string;
public Note: string;
public EmailTemplateId?: number;
public ExternalId: string;
public ReferredBy?: number;
public AssignToId?: number;
public AssignToMethod: number;
public ContactedHow?: number;
public Username: string;
public EmergencyContactName: string;
public EmergencyContactPhone: string;
public EmergencyContactType: string;
public EmailOptOut: boolean;
public NonPromotionalSmsOptedIn?: boolean;
public PromotionalSmsOptedIn?: boolean;
public constructor(init?: Partial<CreateProspectRequestDto>) { super(init); (Object as any).assign(this, init); }
}
export enum RestrictedResourceType
{
Store = 'Store',
Chain = 'Chain',
User = 'User',
Undefined = 'Undefined',
}
export class CreateProspectRequest extends CreateProspectRequestDto implements IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
// @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
public ApiKey: string;
/**
* ClubReady Club ID (StoreID internally)
*/
// @ApiMember(DataType="integer", Description="ClubReady Club ID (StoreID internally)", IsRequired=true, Name="StoreId", ParameterType="query")
public StoreId: number;
/**
* First Name
*/
// @ApiMember(DataType="string", Description="First Name", IsRequired=true, Name="FirstName", ParameterType="query")
public FirstName: string;
/**
* Last Name
*/
// @ApiMember(DataType="string", Description="Last Name", IsRequired=true, Name="LastName", ParameterType="query")
public LastName: string;
/**
* Email Address
*/
// @ApiMember(DataType="string", Description="Email Address", IsRequired=true, Name="Email", ParameterType="query")
public Email: string;
/**
* Gender (Format:'M'|'F')
*/
// @ApiMember(DataType="string", Description="Gender (Format:'M'|'F')", Name="Gender", ParameterType="query")
public Gender: string;
/**
* Address
*/
// @ApiMember(DataType="string", Description="Address", Name="Address", ParameterType="query")
public Address: string;
/**
* City
*/
// @ApiMember(DataType="string", Description="City", Name="City", ParameterType="query")
public City: string;
// @ApiMember(DataType="string", Name="State", ParameterType="query")
public State: string;
// @ApiMember(DataType="string", Name="Zip", ParameterType="query")
public Zip: string;
/**
* Home phone
*/
// @ApiMember(DataType="string", Description="Home phone", Name="Phone", ParameterType="query")
public Phone: string;
/**
* Work phone
*/
// @ApiMember(DataType="string", Description="Work phone", Name="WorkPhone", ParameterType="query")
public WorkPhone: string;
/**
* Date of Birth (Format:YYYY-MM-DD)
*/
// @ApiMember(DataType="date", Description="Date of Birth (Format:YYYY-MM-DD)", Name="DateOfBirth", ParameterType="query")
public DateOfBirth?: string;
/**
* Cell phone
*/
// @ApiMember(DataType="string", Description="Cell phone", Name="CellPhone", ParameterType="query")
public CellPhone: string;
/**
* 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")
public AddPackageId?: number;
/**
* 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")
public ProspectTypeId?: number;
/**
* 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")
public ReferralTypeId?: number;
/**
* 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")
public SendEmail: boolean;
/**
* Only used if SendEmail = True
*/
// @ApiMember(DataType="integer", Description="Only used if SendEmail = True", Name="EmailTemplateId", ParameterType="query")
public EmailTemplateId?: number;
/**
*
*/
// @ApiMember(DataType="string", Description="", Name="Coupon", ParameterType="query")
public Coupon: string;
/**
* Add an internal note for the new prospect
*/
// @ApiMember(DataType="string", Description="Add an internal note for the new prospect", Name="Note", ParameterType="query")
public Note: string;
/**
* 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")
public ExternalId: string;
/**
* User ID of existing user who referred them.
*/
// @ApiMember(DataType="integer", Description="User ID of existing user who referred them.", Name="ReferredBy", ParameterType="query")
public ReferredBy?: number;
/**
* 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")
public AssignToId?: number;
/**
* 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")
public AssignToMethod: number;
/**
* 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")
public Username: string;
/**
* Emergency contact name
*/
// @ApiMember(DataType="string", Description="Emergency contact name", Name="EmergencyContactName", ParameterType="query")
public EmergencyContactName: string;
/**
* Emergency contact phone number
*/
// @ApiMember(DataType="string", Description="Emergency contact phone number", Name="EmergencyContactPhone", ParameterType="query")
public EmergencyContactPhone: string;
/**
* Emergency contact relationship
*/
// @ApiMember(DataType="string", Description="Emergency contact relationship", Name="EmergencyContactType", ParameterType="query")
public EmergencyContactType: string;
/**
* 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")
public EmailOptOut: boolean;
/**
* 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")
public NonPromotionalSmsOptedIn?: boolean;
/**
* 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")
public PromotionalSmsOptedIn?: boolean;
public RestrictedId?: number;
public RestrictedResourceType: RestrictedResourceType;
public constructor(init?: Partial<CreateProspectRequest>) { super(init); (Object as any).assign(this, init); }
}
TypeScript CreateProspectRequest 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
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/json
Content-Type: application/json
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-01T00:00:00.0000000","CellPhone":"String","AddPackageId":0,"ProspectTypeId":0,"ReferralTypeId":0,"SendEmail":false,"EmailTemplateId":0,"Coupon":"String","Note":"String","ExternalId":"String","ReferredBy":0,"AssignToId":0,"AssignToMethod":0,"Username":"String","EmergencyContactName":"String","EmergencyContactPhone":"String","EmergencyContactType":"String","EmailOptOut":false,"NonPromotionalSmsOptedIn":false,"PromotionalSmsOptedIn":false,"RestrictedId":0,"RestrictedResourceType":"Store","ContactedHow":0,"ChainId":0}