ClubReady Api

<back to all web services

BookingStatusEventsRequest

The following routes are available for this service:
GET/scheduling/booking-status-eventsList of booking status changes in a time frame.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubReady.Web.Api.Scheduling.Model;
using ClubReady.Core.Api.Models;
using ClubReady.Web.Api;
using ClubReady.Core.Scheduling.Models;
using ClubReady.Core.Common;

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 ApiResponseBase
    {
        public virtual bool Success { get; set; }
        public virtual string Message { get; set; }
    }

    public partial class BookingStatusEventsRequestDto
        : ApiDtoBase
    {
        public virtual DateTime FromDate { get; set; }
        public virtual DateTime ToDate { get; set; }
        public virtual int BookingTypeFilter { get; set; }
        public virtual int ConsultFilter { get; set; }
        public virtual int? StatusFilter { get; set; }
    }

    public partial class BookingStatusEventsResponseDto
        : ApiResponseBase
    {
        public BookingStatusEventsResponseDto()
        {
            BookingStatusEvents = new List<BookingStatusEventItem>{};
        }

        public virtual List<BookingStatusEventItem> BookingStatusEvents { get; set; }
    }

}

namespace ClubReady.Core.Scheduling.Models
{
    public partial class BookingStatusEventItem
    {
        public virtual int? ChainId { get; set; }
        public virtual int? StoreId { get; set; }
        public virtual int UserId { get; set; }
        public virtual int BookingId { get; set; }
        public virtual int? ClassScheduleId { get; set; }
        public virtual int? ServiceId { get; set; }
        public virtual int? SessionSizeId { get; set; }
        public virtual DateTime BookingDateTime { get; set; }
        public virtual CrEnums.BookingStatus Status { get; set; }
        public virtual int StatusId { get; set; }
        public virtual DateTime StatusChanged { get; set; }
        public virtual bool Consult { get; set; }
        public virtual bool BookedFromWaitList { get; set; }
    }

}

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

}

namespace ClubReady.Web.Api.Scheduling.Model
{
    public partial class BookingStatusEventsRequest
        : BookingStatusEventsRequestDto, 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>
        ///Chain ID
        ///</summary>
        [ApiMember(DataType="integer", Description="Chain ID", Name="ChainId", ParameterType="query")]
        public virtual int? ChainId { get; set; }

        ///<summary>
        ///Store ID
        ///</summary>
        [ApiMember(DataType="integer", Description="Store ID", Name="StoreId", ParameterType="query")]
        public virtual int? StoreId { get; set; }

        ///<summary>
        ///UTC Format
        ///</summary>
        [ApiMember(DataType="date", Description="UTC Format", IsRequired=true, Name="FromDate", ParameterType="query")]
        public virtual DateTime FromDate { get; set; }

        ///<summary>
        ///Max 24 Hours (UTC Format)
        ///</summary>
        [ApiMember(DataType="date", Description="Max 24 Hours (UTC Format)", IsRequired=true, Name="ToDate", ParameterType="query")]
        public virtual DateTime ToDate { get; set; }

        ///<summary>
        ///0 = All, 1 = Classes, 2 = Services
        ///</summary>
        [ApiMember(DataType="integer", Description="0 = All, 1 = Classes, 2 = Services", IsRequired=true, Name="BookingTypeFilter", ParameterType="query")]
        public virtual int BookingTypeFilter { get; set; }

        ///<summary>
        ///0 = Any, 1 = Only Consults, 2 = Exclude Consults
        ///</summary>
        [ApiMember(DataType="integer", Description="0 = Any, 1 = Only Consults, 2 = Exclude Consults", IsRequired=true, Name="ConsultFilter", ParameterType="query")]
        public virtual int ConsultFilter { get; set; }

        ///<summary>
        ///Leave blank for any, otherwise use ClubReady BookingStatus enum
        ///</summary>
        [ApiMember(DataType="integer", Description="Leave blank for any, otherwise use ClubReady BookingStatus enum", Name="StatusFilter", ParameterType="query")]
        public virtual int? StatusFilter { get; set; }

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

    public partial class BookingStatusEventsResponse
        : BookingStatusEventsResponseDto
    {
        public BookingStatusEventsResponse()
        {
            BookingStatusEvents = new List<BookingStatusEventItem>{};
        }

        public virtual bool Success { get; set; }
        public virtual string Message { get; set; }
        public virtual List<BookingStatusEventItem> BookingStatusEvents { get; set; }
    }

}

C# BookingStatusEventsRequest 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 /scheduling/booking-status-events HTTP/1.1 
Host: clubready.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Success: False,
	Message: String,
	BookingStatusEvents: 
	[
		{
			ChainId: 0,
			StoreId: 0,
			UserId: 0,
			BookingId: 0,
			ClassScheduleId: 0,
			ServiceId: 0,
			SessionSizeId: 0,
			BookingDateTime: 0001-01-01,
			Status: Undefined,
			StatusId: 0,
			StatusChanged: 0001-01-01,
			Consult: False,
			BookedFromWaitList: False
		}
	]
}