POST | /sales/agreement/add | 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 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. |
---|
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 |
ChainId | body | int? | No | |
StoreId | body | int? | Yes | Id of the store for the user |
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 |
Store | |
Chain | |
User | |
Undefined |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
incompleteAgreementToken | form | string | 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 .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
Content-Length: length
{
XForwardedFor: String,
ApiKey: String,
MemberId: 0,
ChainId: 0,
StoreId: 0,
PackageId: 0,
InstallmentId: 0,
StartDate: 0001-01-01,
PromoCode: String,
StaffId: 0,
RestrictedId: 0,
RestrictedResourceType: Store
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { incompleteAgreementToken: String, contractId: 0, success: False, message: String }