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.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubReady.Web.Api.Sales.Agreement;
using ClubReady.Web.Api;

namespace ClubReady.Web.Api
{
    public partial class ApiResponse2Base
    {
        public virtual bool success { get; set; }
        public virtual string message { get; set; }
    }

    public enum RestrictedResourceType
    {
        Store,
        Chain,
        User,
        Undefined,
    }

}

namespace ClubReady.Web.Api.Sales.Agreement
{
    [ApiResponse(Description="", ResponseType=typeof(ClubReady.Web.Api.Sales.Agreement.ContractTextResponse), StatusCode=200)]
    public partial class ContractTextEndpoint
        : IContractTextEndpoint, IRestrictedApiRequest
    {
        ///<summary>
        ///IP address of the end user
        ///</summary>
        [ApiMember(Description="IP address of the end user", Name="X-Forwarded-For", ParameterType="header")]
        public virtual string XForwardedFor { get; set; }

        ///<summary>
        ///Api Authentication Key
        ///</summary>
        [ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query")]
        public virtual string ApiKey { 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")]
        public virtual int? StoreId { get; set; }

        public virtual int? ChainId { 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")]
        public virtual string IncompleteAgreementToken { get; set; }

        public virtual int? RestrictedId { get; set; }
        public virtual RestrictedResourceType RestrictedResourceType { get; set; }
    }

    public partial class ContractTextResponse
        : ApiResponse2Base
    {
        public virtual string contractHtml { get; set; }
        public virtual string incompleteAgreementToken { get; set; }
    }

}

C# ContractTextEndpoint DTOs

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

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ContractTextResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales.Agreement">
  <message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api">String</message>
  <success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api">false</success>
  <contractHtml>String</contractHtml>
  <incompleteAgreementToken>String</incompleteAgreementToken>
</ContractTextResponse>