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

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 .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 /v2/{ApiKey}/club/{StoreId}/prospect HTTP/1.1 
Host: www.clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateProspectRequestV2 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>
  <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>
  <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>
  <EmailTemplateId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</EmailTemplateId>
  <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>
  <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>
  <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>
  <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>
  <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>
</CreateProspectRequestV2>