POST | /v2/{ApiKey}/club/{StoreId}/prospect | (obsolete) Create a Prospect |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ClubReady.Web.Api.Members.Model
Imports ClubReady.Core.Api.Models
Imports ClubReady.Web.Api
Namespace Global
Namespace ClubReady.Core.Api.Models
Public Partial Class ApiDtoBase
Public Overridable Property ApiKey As String
Public Overridable Property StoreId As Nullable(Of Integer)
Public Overridable Property ChainId As Nullable(Of Integer)
End Class
Public Partial Class CreateProspectRequestV2Dto
Inherits ApiDtoBase
Public Overridable Property FirstName As String
Public Overridable Property LastName As String
Public Overridable Property Address As String
Public Overridable Property City As String
Public Overridable Property State As String
Public Overridable Property Zip As String
Public Overridable Property Email As String
Public Overridable Property Gender As String
Public Overridable Property AddPackageId As Nullable(Of Integer)
Public Overridable Property ProspectTypeId As Nullable(Of Integer)
Public Overridable Property ReferralTypeId As Nullable(Of Integer)
Public Overridable Property SendEmail As Boolean
Public Overridable Property Phone As String
Public Overridable Property WorkPhone As String
Public Overridable Property DateOfBirth As Nullable(Of Date)
Public Overridable Property CellPhone As String
Public Overridable Property Coupon As String
Public Overridable Property Note As String
Public Overridable Property EmailTemplateId As Nullable(Of Integer)
End Class
End Namespace
Namespace ClubReady.Web.Api
Public Enum RestrictedResourceType
Store
Chain
User
Undefined
End Enum
End Namespace
Namespace ClubReady.Web.Api.Members.Model
Public Partial Class CreateProspectRequestV2
Inherits CreateProspectRequestV2Dto
Implements IRestrictedApiRequest
'''<Summary>
'''Api Key - grants access to resources
'''</Summary>
<ApiMember(DataType:="string", Description:="Api Key - grants access to resources", IsRequired:=true, Name:="ApiKey", ParameterType:="query")>
Public Overridable Property ApiKey As String
'''<Summary>
'''ClubReady Club ID (StoreID internally)
'''</Summary>
<ApiMember(DataType:="integer", Description:="ClubReady Club ID (StoreID internally)", IsRequired:=true, Name:="StoreId", ParameterType:="query")>
Public Overridable Property StoreId As Nullable(Of Integer)
'''<Summary>
'''First Name
'''</Summary>
<ApiMember(DataType:="string", Description:="First Name", IsRequired:=true, Name:="FirstName", ParameterType:="query")>
Public Overridable Property FirstName As String
'''<Summary>
'''Last Name
'''</Summary>
<ApiMember(DataType:="string", Description:="Last Name", IsRequired:=true, Name:="LastName", ParameterType:="query")>
Public Overridable Property LastName As String
'''<Summary>
'''Email Address
'''</Summary>
<ApiMember(DataType:="string", Description:="Email Address", IsRequired:=true, Name:="Email", ParameterType:="query")>
Public Overridable Property Email As String
'''<Summary>
'''Gender
'''</Summary>
<ApiMember(DataType:="string", Description:="Gender", Name:="Gender", ParameterType:="query")>
Public Overridable Property Gender As String
'''<Summary>
'''Address
'''</Summary>
<ApiMember(DataType:="string", Description:="Address", Name:="Address", ParameterType:="query")>
Public Overridable Property Address As String
'''<Summary>
'''City
'''</Summary>
<ApiMember(DataType:="string", Description:="City", Name:="City", ParameterType:="query")>
Public Overridable Property City As String
<ApiMember(DataType:="string", Name:="State", ParameterType:="query")>
Public Overridable Property State As String
<ApiMember(DataType:="string", Name:="Zip", ParameterType:="query")>
Public Overridable Property Zip As String
Public Overridable Property Phone As String
Public Overridable Property WorkPhone As String
Public Overridable Property DateOfBirth As Nullable(Of Date)
Public Overridable Property CellPhone As String
'''<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")>
Public Overridable Property AddPackageId As Nullable(Of Integer)
'''<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")>
Public Overridable Property ProspectTypeId As Nullable(Of Integer)
'''<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")>
Public Overridable Property ReferralTypeId As Nullable(Of Integer)
'''<Summary>
'''Send a Welcome email to the new prospect
'''</Summary>
<ApiMember(DataType:="boolean", Description:="Send a Welcome email to the new prospect", IsRequired:=true, Name:="SendEmail", ParameterType:="query")>
Public Overridable Property SendEmail As Boolean
'''<Summary>
'''Only used if SendEmail = True
'''</Summary>
<ApiMember(DataType:="integer", Description:="Only used if SendEmail = True", Name:="EmailTemplateId", ParameterType:="query")>
Public Overridable Property EmailTemplateId As Nullable(Of Integer)
'''<Summary>
'''
'''</Summary>
<ApiMember(DataType:="string", Description:="", Name:="Coupon", ParameterType:="query")>
Public Overridable Property Coupon As String
'''<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")>
Public Overridable Property Note As String
Public Overridable Property RestrictedId As Nullable(Of Integer)
Public Overridable Property RestrictedResourceType As RestrictedResourceType
End Class
End Namespace
End Namespace
VB.NET CreateProspectRequestV2 DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
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","RestrictedId":0,"RestrictedResourceType":"Store","ChainId":0}