POST | /users/prospect | 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 CreateProspectRequestDto
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)
Public Overridable Property ExternalId As String
Public Overridable Property ReferredBy As Nullable(Of Integer)
Public Overridable Property AssignToId As Nullable(Of Integer)
Public Overridable Property AssignToMethod As Integer
Public Overridable Property ContactedHow As Nullable(Of Integer)
Public Overridable Property Username As String
Public Overridable Property EmergencyContactName As String
Public Overridable Property EmergencyContactPhone As String
Public Overridable Property EmergencyContactType As String
Public Overridable Property EmailOptOut As Boolean
Public Overridable Property NonPromotionalSmsOptedIn As Nullable(Of Boolean)
Public Overridable Property PromotionalSmsOptedIn As Nullable(Of Boolean)
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 CreateProspectRequest
Inherits CreateProspectRequestDto
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 (Format:'M'|'F')
'''</Summary>
<ApiMember(DataType:="string", Description:="Gender (Format:'M'|'F')", 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
'''<Summary>
'''Home phone
'''</Summary>
<ApiMember(DataType:="string", Description:="Home phone", Name:="Phone", ParameterType:="query")>
Public Overridable Property Phone As String
'''<Summary>
'''Work phone
'''</Summary>
<ApiMember(DataType:="string", Description:="Work phone", Name:="WorkPhone", ParameterType:="query")>
Public Overridable Property WorkPhone As String
'''<Summary>
'''Date of Birth (Format:YYYY-MM-DD)
'''</Summary>
<ApiMember(DataType:="date", Description:="Date of Birth (Format:YYYY-MM-DD)", Name:="DateOfBirth", ParameterType:="query")>
Public Overridable Property DateOfBirth As Nullable(Of Date)
'''<Summary>
'''Cell phone
'''</Summary>
<ApiMember(DataType:="string", Description:="Cell phone", Name:="CellPhone", ParameterType:="query")>
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 (Format:true|false)
'''</Summary>
<ApiMember(DataType:="boolean", Description:="Send a Welcome email to the new prospect (Format:true|false)", 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
'''<Summary>
'''Unique ID for the user from your system. We store internally as ExternalUserId
'''</Summary>
<ApiMember(DataType:="string", Description:="Unique ID for the user from your system. We store internally as ExternalUserId", Name:="ExternalId", ParameterType:="query")>
Public Overridable Property ExternalId As String
'''<Summary>
'''User ID of existing user who referred them.
'''</Summary>
<ApiMember(DataType:="integer", Description:="User ID of existing user who referred them.", Name:="ReferredBy", ParameterType:="query")>
Public Overridable Property ReferredBy As Nullable(Of Integer)
'''<Summary>
'''ClubReady UserId of staff to assign new member to.
'''</Summary>
<ApiMember(DataType:="integer", Description:="ClubReady UserId of staff to assign new member to.", Name:="AssignToId", ParameterType:="query")>
Public Overridable Property AssignToId As Nullable(Of Integer)
'''<Summary>
'''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.
'''</Summary>
<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 Overridable Property AssignToMethod As Integer
'''<Summary>
'''Username needs to be between 4 and 255 characters
'''</Summary>
<ApiMember(DataType:="string", Description:="Username needs to be between 4 and 255 characters", Name:="Username", ParameterType:="query")>
Public Overridable Property Username As String
'''<Summary>
'''Emergency contact name
'''</Summary>
<ApiMember(DataType:="string", Description:="Emergency contact name", Name:="EmergencyContactName", ParameterType:="query")>
Public Overridable Property EmergencyContactName As String
'''<Summary>
'''Emergency contact phone number
'''</Summary>
<ApiMember(DataType:="string", Description:="Emergency contact phone number", Name:="EmergencyContactPhone", ParameterType:="query")>
Public Overridable Property EmergencyContactPhone As String
'''<Summary>
'''Emergency contact relationship
'''</Summary>
<ApiMember(DataType:="string", Description:="Emergency contact relationship", Name:="EmergencyContactType", ParameterType:="query")>
Public Overridable Property EmergencyContactType As String
'''<Summary>
'''Set a prospect's email opt out status (Format:true|false)
'''</Summary>
<ApiMember(DataType:="boolean", Description:="Set a prospect's email opt out status (Format:true|false)", Name:="EmailOptOut", ParameterType:="query")>
Public Overridable Property EmailOptOut As Boolean
'''<Summary>
'''Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)
'''</Summary>
<ApiMember(DataType:="boolean", Description:="Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)", Name:="NonPromotionalSmsOptedIn", ParameterType:="query")>
Public Overridable Property NonPromotionalSmsOptedIn As Nullable(Of Boolean)
'''<Summary>
'''Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)
'''</Summary>
<ApiMember(DataType:="boolean", Description:="Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)", Name:="PromotionalSmsOptedIn", ParameterType:="query")>
Public Overridable Property PromotionalSmsOptedIn As Nullable(Of Boolean)
Public Overridable Property RestrictedId As Nullable(Of Integer)
Public Overridable Property RestrictedResourceType As RestrictedResourceType
End Class
End Namespace
End Namespace
VB.NET CreateProspectRequest 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 /users/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,
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
}