ClubReady Api

<back to all web services

AddNewUserEndpoint

The following routes are available for this service:
POST/sales/agreement/addNewUserSet up a package that will be sold to an existing userSet up a package that will be sold to an existing user. The header `X-Forwarded-For` is required and should be set to the IP address of the end user.
namespace ClubReady.Web.Api

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type RestrictedResourceType =
        | Store = 0
        | Chain = 1
        | User = 2
        | Undefined = 3

    [<ApiResponse(Description="", ResponseType=typeof<AddNewUserResponse>, StatusCode=200)>]
    [<AllowNullLiteral>]
    type AddNewUserEndpoint() = 
        ///<summary>
        ///IP address of the end user
        ///</summary>
        [<ApiMember(Description="IP address of the end user", IsRequired=true, Name="X-Forwarded-For", ParameterType="header")>]
        member val XForwardedFor:String = null with get,set

        ///<summary>
        ///Api Authentication Key
        ///</summary>
        [<ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query")>]
        member val ApiKey:String = null with get,set

        ///<summary>
        ///Member Id of the user buying the Package
        ///</summary>
        [<ApiMember(Description="Member Id of the user buying the Package", IsRequired=true, ParameterType="query")>]
        member val MemberId:Int32 = new Int32() with get,set

        ///<summary>
        ///Id of the store for the user
        ///</summary>
        [<ApiMember(Description="Id of the store for the user", IsRequired=true)>]
        member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set

        member val ChainId:Nullable<Int32> = new Nullable<Int32>() with get,set
        ///<summary>
        ///Package Id number of the package being purchased
        ///</summary>
        [<ApiMember(Description="Package Id number of the package being purchased", IsRequired=true)>]
        member val PackageId:Int32 = new Int32() with get,set

        ///<summary>
        ///Installment Plan Id being purchased. If empty, the default package will be selected.
        ///</summary>
        [<ApiMember(Description="Installment Plan Id being purchased. If empty, the default package will be selected.")>]
        member val InstallmentId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Date contract takes affect
        ///</summary>
        [<ApiMember(Description="Date contract takes affect")>]
        member val StartDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///Promo code to apply a discount.
        ///</summary>
        [<ApiMember(Description="Promo code to apply a discount.")>]
        member val PromoCode:String = null with get,set

        ///<summary>
        ///Staff Id of salesperson who sold the agreement.
        ///</summary>
        [<ApiMember(Description="Staff Id of salesperson who sold the agreement.")>]
        member val StaffId:Nullable<Int32> = new Nullable<Int32>() with get,set

        member val RestrictedId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val RestrictedResourceType:RestrictedResourceType = new RestrictedResourceType() with get,set
        ///<summary>
        ///First Name
        ///</summary>
        [<ApiMember(Description="First Name", IsRequired=true)>]
        member val FirstName:String = null with get,set

        ///<summary>
        ///Last Name
        ///</summary>
        [<ApiMember(Description="Last Name", IsRequired=true)>]
        member val LastName:String = null with get,set

        ///<summary>
        ///Email Address
        ///</summary>
        [<ApiMember(Description="Email Address", IsRequired=true)>]
        member val Email:String = null with get,set

        ///<summary>
        ///Gender
        ///</summary>
        [<ApiMember(Description="Gender")>]
        member val Gender:String = null with get,set

        ///<summary>
        ///Address
        ///</summary>
        [<ApiMember(Description="Address")>]
        member val Address:String = null with get,set

        ///<summary>
        ///City
        ///</summary>
        [<ApiMember(Description="City")>]
        member val City:String = null with get,set

        ///<summary>
        ///State
        ///</summary>
        [<ApiMember(Description="State")>]
        member val State:String = null with get,set

        ///<summary>
        ///Zip Code
        ///</summary>
        [<ApiMember(Description="Zip Code")>]
        member val Zip:String = null with get,set

        ///<summary>
        ///Home phone
        ///</summary>
        [<ApiMember(Description="Home phone")>]
        member val Phone:String = null with get,set

        ///<summary>
        ///Work phone
        ///</summary>
        [<ApiMember(Description="Work phone")>]
        member val WorkPhone:String = null with get,set

        ///<summary>
        ///Date of Birth
        ///</summary>
        [<ApiMember(Description="Date of Birth")>]
        member val DateOfBirth:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///Cell phone
        ///</summary>
        [<ApiMember(Description="Cell phone")>]
        member val CellPhone:String = null with get,set

        ///<summary>
        ///Add an internal note for the new prospect
        ///</summary>
        [<ApiMember(Description="Add an internal note for the new prospect")>]
        member val Note:String = null with get,set

        ///<summary>
        ///Unique Id for the user from your system. We store internally as ExternalUserId
        ///</summary>
        [<ApiMember(Description="Unique Id for the user from your system. We store internally as ExternalUserId")>]
        member val ExternalId:String = null with get,set

        ///<summary>
        ///Username should be between 4 and 255 characters long
        ///</summary>
        [<ApiMember(Description="Username should be between 4 and 255 characters long")>]
        member val Username:String = null with get,set

        ///<summary>
        ///ReferralTypeId
        ///</summary>
        [<ApiMember(Description="ReferralTypeId")>]
        member val ReferralTypeId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Emergency contact name
        ///</summary>
        [<ApiMember(Description="Emergency contact name")>]
        member val EmergencyContactName:String = null with get,set

        ///<summary>
        ///Emergency contact phone number
        ///</summary>
        [<ApiMember(Description="Emergency contact phone number")>]
        member val EmergencyContactPhone:String = null with get,set

        ///<summary>
        ///Emergency contact relationship
        ///</summary>
        [<ApiMember(Description="Emergency contact relationship")>]
        member val EmergencyContactType:String = null with get,set

    [<AllowNullLiteral>]
    type ApiResponse2Base() = 
        member val success:Boolean = new Boolean() with get,set
        member val message:String = null with get,set

    [<AllowNullLiteral>]
    type AddNewUserResponse() = 
        inherit ApiResponse2Base()
        member val incompleteAgreementToken:String = null with get,set
        member val memberId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val contractId:Nullable<Int32> = new Nullable<Int32>() with get,set

F# AddNewUserEndpoint 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 /sales/agreement/addNewUser HTTP/1.1 
Host: www.clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddNewUserEndpoint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales.Agreement">
  <Address>String</Address>
  <ApiKey>String</ApiKey>
  <CellPhone>String</CellPhone>
  <ChainId>0</ChainId>
  <City>String</City>
  <DateOfBirth>0001-01-01T00:00:00</DateOfBirth>
  <Email>String</Email>
  <EmergencyContactName>String</EmergencyContactName>
  <EmergencyContactPhone>String</EmergencyContactPhone>
  <EmergencyContactType>String</EmergencyContactType>
  <ExternalId>String</ExternalId>
  <FirstName>String</FirstName>
  <Gender>String</Gender>
  <InstallmentId>0</InstallmentId>
  <LastName>String</LastName>
  <MemberId>0</MemberId>
  <Note>String</Note>
  <PackageId>0</PackageId>
  <Phone>String</Phone>
  <PromoCode>String</PromoCode>
  <ReferralTypeId>0</ReferralTypeId>
  <StaffId>0</StaffId>
  <StartDate>0001-01-01T00:00:00</StartDate>
  <State>String</State>
  <StoreId>0</StoreId>
  <Username>String</Username>
  <WorkPhone>String</WorkPhone>
  <XForwardedFor>String</XForwardedFor>
  <Zip>String</Zip>
</AddNewUserEndpoint>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AddNewUserResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales.Agreement">
  <message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api">String</message>
  <success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api">false</success>
  <contractId>0</contractId>
  <incompleteAgreementToken>String</incompleteAgreementToken>
  <memberId>0</memberId>
</AddNewUserResponse>