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 .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 /scheduling/booking-status-events HTTP/1.1 
Host: clubready.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BookingStatusEventsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Scheduling.Model">
  <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Message>
  <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</Success>
  <BookingStatusEvents xmlns:d2p1="http://schemas.datacontract.org/2004/07/ClubReady.Core.Scheduling.Models" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">
    <d2p1:BookingStatusEventItem>
      <d2p1:BookedFromWaitList>false</d2p1:BookedFromWaitList>
      <d2p1:BookingDateTime>0001-01-01T00:00:00</d2p1:BookingDateTime>
      <d2p1:BookingId>0</d2p1:BookingId>
      <d2p1:ChainId>0</d2p1:ChainId>
      <d2p1:ClassScheduleId>0</d2p1:ClassScheduleId>
      <d2p1:Consult>false</d2p1:Consult>
      <d2p1:ServiceId>0</d2p1:ServiceId>
      <d2p1:SessionSizeId>0</d2p1:SessionSizeId>
      <d2p1:Status>Undefined</d2p1:Status>
      <d2p1:StatusChanged>0001-01-01T00:00:00</d2p1:StatusChanged>
      <d2p1:StatusId>0</d2p1:StatusId>
      <d2p1:StoreId>0</d2p1:StoreId>
      <d2p1:UserId>0</d2p1:UserId>
    </d2p1:BookingStatusEventItem>
  </BookingStatusEvents>
</BookingStatusEventsResponse>