ClubReady Api

<back to all web services

ContractTextEndpoint

The following routes are available for this service:
GET/sales/agreement/contractGet a contracts HTML verbiageGet the agreements contract in HTML. Uses the Incomplete Agreements Token to identify the contract verbiage, and converts it into HTML, and returns it to the requestor. The header `X-Forwarded-For` is NOT required. It can be set to the IP address of the end user, or left blank.
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<ContractTextResponse>, StatusCode=200)>]
    [<AllowNullLiteral>]
    type ContractTextEndpoint() = 
        ///<summary>
        ///IP address of the end user
        ///</summary>
        [<ApiMember(Description="IP address of the end user", 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>
        ///ID# of the store to get contract for.
        ///</summary>
        [<ApiMember(DataType="int", Description="ID# of the store to get contract for.", IsRequired=true, Name="StoreId", ParameterType="query")>]
        member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set

        member val ChainId:Nullable<Int32> = new Nullable<Int32>() with get,set
        ///<summary>
        ///Token for Incomplete Agreement to get details for
        ///</summary>
        [<ApiMember(DataType="string", Description="Token for Incomplete Agreement to get details for", IsRequired=true, Name="IncompleteAgreementToken", ParameterType="query")>]
        member val IncompleteAgreementToken:String = null with get,set

        member val RestrictedId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val RestrictedResourceType:RestrictedResourceType = new RestrictedResourceType() 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 ContractTextResponse() = 
        inherit ApiResponse2Base()
        member val contractHtml:String = null with get,set
        member val incompleteAgreementToken:String = null with get,set

F# ContractTextEndpoint DTOs

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

HTTP + JSV

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

GET /sales/agreement/contract HTTP/1.1 
Host: www.clubready.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	contractHtml: String,
	incompleteAgreementToken: String,
	success: False,
	message: String
}