POST | /v2/{ApiKey}/club/{StoreId}/prospect | (obsolete) 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 CreateProspectRequestV2Dto 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 constructor(init?: Partial<CreateProspectRequestV2Dto>) { super(init); (Object as any).assign(this, init); }
}
export enum RestrictedResourceType
{
Store = 'Store',
Chain = 'Chain',
User = 'User',
Undefined = 'Undefined',
}
export class CreateProspectRequestV2 extends CreateProspectRequestV2Dto 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
*/
// @ApiMember(DataType="string", Description="Gender", 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;
public Phone: string;
public WorkPhone: string;
public DateOfBirth?: string;
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
*/
// @ApiMember(DataType="boolean", Description="Send a Welcome email to the new prospect", 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;
public RestrictedId?: number;
public RestrictedResourceType: RestrictedResourceType;
public constructor(init?: Partial<CreateProspectRequestV2>) { super(init); (Object as any).assign(this, init); }
}
TypeScript CreateProspectRequestV2 DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
}