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.
import java.math.*
import java.util.*
import net.servicestack.client.*


open class BookingStatusEventsRequest : BookingStatusEventsRequestDto(), IRestrictedApiRequest
{
    /**
    * Api Key - grants access to resources
    */
    @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
    var ApiKey:String? = null

    /**
    * Chain ID
    */
    @ApiMember(DataType="integer", Description="Chain ID", Name="ChainId", ParameterType="query")
    var ChainId:Int? = null

    /**
    * Store ID
    */
    @ApiMember(DataType="integer", Description="Store ID", Name="StoreId", ParameterType="query")
    var StoreId:Int? = null

    /**
    * UTC Format
    */
    @ApiMember(DataType="date", Description="UTC Format", IsRequired=true, Name="FromDate", ParameterType="query")
    var FromDate:Date? = null

    /**
    * Max 24 Hours (UTC Format)
    */
    @ApiMember(DataType="date", Description="Max 24 Hours (UTC Format)", IsRequired=true, Name="ToDate", ParameterType="query")
    var ToDate:Date? = null

    /**
    * 0 = All, 1 = Classes, 2 = Services
    */
    @ApiMember(DataType="integer", Description="0 = All, 1 = Classes, 2 = Services", IsRequired=true, Name="BookingTypeFilter", ParameterType="query")
    var BookingTypeFilter:Int? = null

    /**
    * 0 = Any, 1 = Only Consults, 2 = Exclude Consults
    */
    @ApiMember(DataType="integer", Description="0 = Any, 1 = Only Consults, 2 = Exclude Consults", IsRequired=true, Name="ConsultFilter", ParameterType="query")
    var ConsultFilter:Int? = null

    /**
    * Leave blank for any, otherwise use ClubReady BookingStatus enum
    */
    @ApiMember(DataType="integer", Description="Leave blank for any, otherwise use ClubReady BookingStatus enum", Name="StatusFilter", ParameterType="query")
    var StatusFilter:Int? = null

    var RestrictedId:Int? = null
    var RestrictedResourceType:RestrictedResourceType? = null
}

open class BookingStatusEventsRequestDto : ApiDtoBase()
{
    var FromDate:Date? = null
    var ToDate:Date? = null
    var BookingTypeFilter:Int? = null
    var ConsultFilter:Int? = null
    var StatusFilter:Int? = null
}

open class ApiDtoBase
{
    var ApiKey:String? = null
    var StoreId:Int? = null
    var ChainId:Int? = null
}

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

open class BookingStatusEventsResponse : BookingStatusEventsResponseDto()
{
    var Success:Boolean? = null
    var Message:String? = null
    var BookingStatusEvents:ArrayList<BookingStatusEventItem> = ArrayList<BookingStatusEventItem>()
}

open class BookingStatusEventsResponseDto : ApiResponseBase()
{
    var BookingStatusEvents:ArrayList<BookingStatusEventItem> = ArrayList<BookingStatusEventItem>()
}

open class ApiResponseBase
{
    var Success:Boolean? = null
    var Message:String? = null
}

open class BookingStatusEventItem
{
    var ChainId:Int? = null
    var StoreId:Int? = null
    var UserId:Int? = null
    var BookingId:Int? = null
    var ClassScheduleId:Int? = null
    var ServiceId:Int? = null
    var SessionSizeId:Int? = null
    var BookingDateTime:Date? = null
    var Status:BookingStatus? = null
    var StatusId:Int? = null
    var StatusChanged:Date? = null
    var Consult:Boolean? = null
    var BookedFromWaitList:Boolean? = null
}

enum class BookingStatus(val value:Int)
{
    Undefined(0),
    Unavailable(1),
    Open(2),
    CancelledWithinPolicy(3),
    CancelledOutsidePolicy(4),
    Completed(5),
    NoShow(6),
    RescheduledWithinPolicy(8),
    RescheduledByAdmin(9),
    CancelledByAdminNotCustomerFault(10),
    Pending(11),
    WaitListed(12),
    Error(-1),
}

Kotlin 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: www.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>