ClubReady Api

<back to all web services

AgreementAddEndpoint

The following routes are available for this service:
POST/sales/agreement/addSet up a package that will be sold to an existing userSet up a package that will be sold to an existing user. The PaymentMethods property is an array of objects describing how you want ClubReady to take payment while selling the PackageId/InstallmentPlanId. If omitted (or null), the preferred on-file profile will be used. The header `X-Forwarded-For` is required and should be set to the IP address of the end user.
AgreementAddEndpoint Parameters:
NameParameterData TypeRequiredDescription
XForwardedForheaderstringYesIP address of the end user
ApiKeyquerystringYesApi Authentication Key
MemberIdqueryintYesMember Id of the user buying the Package
ChainIdbodyint?No
StoreIdbodyint?YesId of the store for the user
PackageIdbodyintYesPackage Id number of the package being purchased
InstallmentIdbodyint?NoInstallment Plan Id being purchased. If empty, the default package will be selected.
StartDatebodyDateTime?NoDate contract takes affect
PromoCodebodystringNoPromo code to apply a discount.
StaffIdbodyint?NoStaff Id of salesperson who sold the agreement.
RestrictedIdbodyint?No
RestrictedResourceTypebodyRestrictedResourceTypeNo
RestrictedResourceType Enum:
Store
Chain
User
Undefined
AddResponse Parameters:
NameParameterData TypeRequiredDescription
incompleteAgreementTokenformstringNo
contractIdformint?No
ApiResponse2Base Parameters:
NameParameterData TypeRequiredDescription
successformboolNo
messageformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /sales/agreement/add HTTP/1.1 
Host: www.clubready.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"XForwardedFor":"String","ApiKey":"String","MemberId":0,"ChainId":0,"StoreId":0,"PackageId":0,"InstallmentId":0,"StartDate":"0001-01-01T00:00:00.0000000","PromoCode":"String","StaffId":0,"RestrictedId":0,"RestrictedResourceType":"Store"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"incompleteAgreementToken":"String","contractId":0,"success":false,"message":"String"}