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. |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
@ApiResponse(Description="", ResponseType=ContractTextResponse.class, StatusCode=200)
open class ContractTextEndpoint : IContractTextEndpoint, IRestrictedApiRequest
{
/**
* IP address of the end user
*/
@ApiMember(Description="IP address of the end user", Name="X-Forwarded-For", ParameterType="header")
var XForwardedFor:String? = null
/**
* Api Authentication Key
*/
@ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query")
var ApiKey:String? = null
/**
* ID# of the store to get contract for.
*/
@ApiMember(DataType="int", Description="ID# of the store to get contract for.", IsRequired=true, Name="StoreId", ParameterType="query")
var StoreId:Int? = null
var ChainId:Int? = null
/**
* Token for Incomplete Agreement to get details for
*/
@ApiMember(DataType="string", Description="Token for Incomplete Agreement to get details for", IsRequired=true, Name="IncompleteAgreementToken", ParameterType="query")
var IncompleteAgreementToken:String? = null
var RestrictedId:Int? = null
var RestrictedResourceType:RestrictedResourceType? = null
}
enum class RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
open class ContractTextResponse : ApiResponse2Base()
{
var contractHtml:String? = null
var incompleteAgreementToken:String? = null
}
open class ApiResponse2Base
{
var success:Boolean? = null
var message:String? = null
}
Kotlin ContractTextEndpoint DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"contractHtml":"String","incompleteAgreementToken":"String","success":false,"message":"String"}