POST | /sales/agreement/addNewUser | Set up a package that will be sold to an existing user | Set 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. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
XForwardedFor | header | string | Yes | IP address of the end user |
ApiKey | query | string | Yes | Api Authentication Key |
MemberId | query | int | Yes | Member Id of the user buying the Package |
StoreId | body | int? | Yes | Id of the store for the user |
ChainId | body | int? | No | |
PackageId | body | int | Yes | Package Id number of the package being purchased |
InstallmentId | body | int? | No | Installment Plan Id being purchased. If empty, the default package will be selected. |
StartDate | body | DateTime? | No | Date contract takes affect |
PromoCode | body | string | No | Promo code to apply a discount. |
StaffId | body | int? | No | Staff Id of salesperson who sold the agreement. |
RestrictedId | body | int? | No | |
RestrictedResourceType | body | RestrictedResourceType | No | |
FirstName | body | string | Yes | First Name |
LastName | body | string | Yes | Last Name |
body | string | Yes | Email Address | |
Gender | body | string | No | Gender |
Address | body | string | No | Address |
City | body | string | No | City |
State | body | string | No | State |
Zip | body | string | No | Zip Code |
Phone | body | string | No | Home phone |
WorkPhone | body | string | No | Work phone |
DateOfBirth | body | DateTime? | No | Date of Birth |
CellPhone | body | string | No | Cell phone |
Note | body | string | No | Add an internal note for the new prospect |
ExternalId | body | string | No | Unique Id for the user from your system. We store internally as ExternalUserId |
Username | body | string | No | Username should be between 4 and 255 characters long |
ReferralTypeId | body | int? | No | ReferralTypeId |
EmergencyContactName | body | string | No | Emergency contact name |
EmergencyContactPhone | body | string | No | Emergency contact phone number |
EmergencyContactType | body | string | No | Emergency contact relationship |
Store | |
Chain | |
User | |
Undefined |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
incompleteAgreementToken | form | string | No | |
memberId | form | int? | No | |
contractId | form | int? | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
success | form | bool | No | |
message | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
Content-Type: application/json
Content-Length: length
{"XForwardedFor":"String","ApiKey":"String","MemberId":0,"StoreId":0,"ChainId":0,"PackageId":0,"InstallmentId":0,"StartDate":"0001-01-01T00:00:00.0000000","PromoCode":"String","StaffId":0,"RestrictedId":0,"RestrictedResourceType":"Store","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","Note":"String","ExternalId":"String","Username":"String","ReferralTypeId":0,"EmergencyContactName":"String","EmergencyContactPhone":"String","EmergencyContactType":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"incompleteAgreementToken":"String","memberId":0,"contractId":0,"success":false,"message":"String"}