ClubReady Api

<back to all web services

GetSalesPackagesRequest

The following routes are available for this service:
GET/sales/packagesGet Available packages for a chain or store
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubReady.Web.Api.Sales.Model;
using ClubReady.Core.Api.Models;
using ClubReady.Web.Api;

namespace ClubReady.Core.Api.Models
{
    public partial class ApiDtoBase
    {
        public virtual string ApiKey { get; set; }
        public virtual int? StoreId { get; set; }
        public virtual int? ChainId { get; set; }
    }

    public partial class GetSalesPackagesRequestDto
        : ApiDtoBase
    {
    }

}

namespace ClubReady.Web.Api
{
    public enum RestrictedResourceType
    {
        Store,
        Chain,
        User,
        Undefined,
    }

}

namespace ClubReady.Web.Api.Sales.Model
{
    public partial class GetSalesPackagesRequest
        : GetSalesPackagesRequestDto, IRestrictedApiRequest
    {
        ///<summary>
        ///Api Key - grants access to resources
        ///</summary>
        [ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")]
        public virtual string ApiKey { get; set; }

        ///<summary>
        ///ID # of store to get packages for
        ///</summary>
        [ApiMember(DataType="string", Description="ID # of store to get packages for", IsRequired=true, Name="StoreId", ParameterType="query")]
        public virtual int? StoreId { get; set; }

        ///<summary>
        ///ID # of the user to get packages for
        ///</summary>
        [ApiMember(DataType="integer", Description="ID # of the user to get packages for", Name="UserId", ParameterType="query")]
        public virtual int? UserId { get; set; }

        ///<summary>
        ///The filter type which will used for packages credit (Class = 1, ClassSchedule = 2, SessionSize = 3)
        ///</summary>
        [ApiMember(DataType="integer", Description="The filter type which will used for packages credit (Class = 1, ClassSchedule = 2, SessionSize = 3)", Name="CreditFilterType", ParameterType="query")]
        public virtual int? CreditFilterType { get; set; }

        ///<summary>
        ///ClassId or ClassScheduleId or SessionSizeId packages which drop credits
        ///</summary>
        [ApiMember(DataType="integer", Description="ClassId or ClassScheduleId or SessionSizeId packages which drop credits", Name="CreditFilterId", ParameterType="query")]
        public virtual int? CreditFilterId { get; set; }

        public virtual int? RestrictedId { get; set; }
        public virtual RestrictedResourceType RestrictedResourceType { get; set; }
        ///<summary>
        ///Show packages enabled for In App purchase. True or False
        ///</summary>
        [ApiMember(DataType="string", Description="Show packages enabled for In App purchase. True or False", Name="InApp", ParameterType="query")]
        public virtual bool InApp { get; set; }
    }

}

C# GetSalesPackagesRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /sales/packages HTTP/1.1 
Host: clubready.com 
Accept: application/json