GET | /sales/agreement/contract | Get a contracts HTML verbiage | Get 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. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ClubReady.Web.Api.Sales.Agreement
Imports ClubReady.Web.Api
Namespace Global
Namespace ClubReady.Web.Api
Public Partial Class ApiResponse2Base
Public Overridable Property success As Boolean
Public Overridable Property message As String
End Class
Public Enum RestrictedResourceType
Store
Chain
User
Undefined
End Enum
End Namespace
Namespace ClubReady.Web.Api.Sales.Agreement
<ApiResponse(Description:="", ResponseType:=GetType(ContractTextResponse), StatusCode:=200)>
Public Partial Class ContractTextEndpoint
Implements IContractTextEndpoint
Implements IRestrictedApiRequest
'''<Summary>
'''IP address of the end user
'''</Summary>
<ApiMember(Description:="IP address of the end user", Name:="X-Forwarded-For", ParameterType:="header")>
Public Overridable Property XForwardedFor As String
'''<Summary>
'''Api Authentication Key
'''</Summary>
<ApiMember(Description:="Api Authentication Key", IsRequired:=true, ParameterType:="query")>
Public Overridable Property ApiKey As String
'''<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")>
Public Overridable Property StoreId As Nullable(Of Integer)
Public Overridable Property ChainId As Nullable(Of Integer)
'''<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")>
Public Overridable Property IncompleteAgreementToken As String
Public Overridable Property RestrictedId As Nullable(Of Integer)
Public Overridable Property RestrictedResourceType As RestrictedResourceType
End Class
Public Partial Class ContractTextResponse
Inherits ApiResponse2Base
Public Overridable Property contractHtml As String
Public Overridable Property incompleteAgreementToken As String
End Class
End Namespace
End Namespace
VB.NET ContractTextEndpoint DTOs
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.
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 }